From 00cdc0a472c55330cbc58317f01b07f8f90be5a5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:01:06 -0700 Subject: Split the program.[ch] files into several new files. --- src/mesa/shader/prog_parameter.h | 123 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 src/mesa/shader/prog_parameter.h (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h new file mode 100644 index 0000000000..c60ef543b7 --- /dev/null +++ b/src/mesa/shader/prog_parameter.h @@ -0,0 +1,123 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file prog_parameter.c + * Program parameter lists and functions. + * \author Brian Paul + */ + +#ifndef PROG_PARAMETER_H +#define PROG_PARAMETER_H + +#include "mtypes.h" + + +/** + * Named program parameters + * Used for NV_fragment_program "DEFINE"d constants and "DECLARE"d parameters, + * and ARB_fragment_program global state references. For the later, Name + * might be "state.light[0].diffuse", for example. + */ +struct gl_program_parameter +{ + const char *Name; /**< Null-terminated string */ + enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ + GLuint Size; /**< Number of components (1..4) */ + /** + * A sequence of STATE_* tokens and integers to identify GL state. + */ + GLuint StateIndexes[6]; +}; + + +/** + * A list of the above program_parameter instances. + */ +struct gl_program_parameter_list +{ + GLuint Size; /**< allocated size of Parameters, ParameterValues */ + GLuint NumParameters; /**< number of parameters in arrays */ + struct gl_program_parameter *Parameters; /**< Array [Size] */ + GLfloat (*ParameterValues)[4]; /**< Array [Size] of GLfloat[4] */ + GLbitfield StateFlags; /**< _NEW_* flags indicating which state changes + might invalidate ParameterValues[] */ +}; + + +extern struct gl_program_parameter_list * +_mesa_new_parameter_list(void); + +extern void +_mesa_free_parameter_list(struct gl_program_parameter_list *paramList); + +extern struct gl_program_parameter_list * +_mesa_clone_parameter_list(const struct gl_program_parameter_list *list); + +extern GLint +_mesa_add_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], GLuint size, + enum register_file type); + +extern GLint +_mesa_add_named_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4]); + +extern GLint +_mesa_add_named_constant(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], + GLuint size); + +extern GLint +_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, + const GLfloat values[4], GLuint size, + GLuint *swizzleOut); + +extern GLint +_mesa_add_uniform(struct gl_program_parameter_list *paramList, + const char *name, GLuint size); + +extern GLint +_mesa_add_varying(struct gl_program_parameter_list *paramList, + const char *name, GLuint size); + +extern GLint +_mesa_add_state_reference(struct gl_program_parameter_list *paramList, + const GLint *stateTokens); + +extern GLfloat * +_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, + GLsizei nameLen, const char *name); + +extern GLint +_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, + GLsizei nameLen, const char *name); + +extern GLboolean +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, + const GLfloat v[], GLsizei vSize, + GLint *posOut, GLuint *swizzleOut); + + +#endif /* PROG_PARAMETER_H */ -- cgit v1.2.3 From 5b01c5e9d2c0283cc31981b6c85dc6392144b3db Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 18:02:03 -0700 Subject: Overhaul of GLSL API functions, dispatching, etc. --- src/mesa/shader/prog_parameter.c | 19 + src/mesa/shader/prog_parameter.h | 4 +- src/mesa/shader/shader_api.c | 1585 ++++++++++++++------------------------ src/mesa/shader/shader_api.h | 111 ++- 4 files changed, 693 insertions(+), 1026 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 7094d6fc03..84e92d7ed0 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -444,3 +444,22 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) return clone; } + + +/** + * Find longest name of any parameter in list. + */ +GLuint +_mesa_parameter_longest_name(const struct gl_program_parameter_list *list) +{ + GLuint i, maxLen = 0; + if (!list) + return 0; + for (i = 0; i < list->NumParameters; i++) { + GLuint len = _mesa_strlen(list->Parameters[i].Name); + if (len > maxLen) + maxLen = len; + } + return maxLen; +} + diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index c60ef543b7..fb82757d83 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -115,9 +115,11 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name); extern GLboolean -_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, const GLfloat v[], GLsizei vSize, GLint *posOut, GLuint *swizzleOut); +extern GLuint +_mesa_parameter_longest_name(const struct gl_program_parameter_list *list); #endif /* PROG_PARAMETER_H */ diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index aaaf942cf5..ab2fd438c8 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2004-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,24 +24,22 @@ /** * \file shader_api.c - * API functions for shader objects + * Implementation of GLSL-related API functions * \author Brian Paul */ /** * XXX things to do: * 1. Check that the right error code is generated for all _mesa_error() calls. - * + * 2. Insert FLUSH_VERTICES calls in various places */ #include "glheader.h" #include "context.h" #include "hash.h" -#include "macros.h" #include "program.h" #include "prog_parameter.h" -#include "shaderobjects.h" #include "shader_api.h" #include "slang_compile.h" @@ -49,100 +47,106 @@ -GLvoid GLAPIENTRY -_mesa_DeleteObjectARB(GLhandleARB obj) -{ -#if 000 - if (obj != 0) { - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glDeleteObjectARB"); - - if (gen != NULL) { - (**gen).Delete(gen); - RELEASE_GENERIC(gen); - } - } -#endif -} -GLhandleARB GLAPIENTRY -_mesa_GetHandleARB(GLenum pname) +/** + * Copy string from to , up to maxLength characters, returning + * length of in . + * \param src the strings source + * \param maxLength max chars to copy + * \param length returns number of chars copied + * \param dst the string destination + */ +static void +copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src) { -#if 0 - GET_CURRENT_CONTEXT(ctx); + GLsizei len; + for (len = 0; len < maxLength - 1 && src && src[len]; len++) + dst[len] = src[len]; + if (maxLength > 0) + dst[len] = 0; + if (length) + *length = len; +} - switch (pname) { - case GL_PROGRAM_OBJECT_ARB: - { - struct gl2_program_intf **pro = ctx->ShaderObjects.CurrentProgram; - if (pro != NULL) - return (**pro)._container._generic. - GetName((struct gl2_generic_intf **) (pro)); - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); - } -#endif - return 0; -} -GLvoid GLAPIENTRY -_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader) +/** + * Called via ctx->Driver.AttachShader() + */ +void +_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader) { - GET_CURRENT_CONTEXT(ctx); struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, program); struct gl_program *prog = _mesa_lookup_shader(ctx, shader); const GLuint n = linked->NumShaders; - GLuint i, j; + GLuint i; if (!linked || !prog) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glDetachObjectARB(bad program or shader name)"); + "glAttachShader(bad program or shader name)"); return; } for (i = 0; i < n; i++) { if (linked->Shaders[i] == prog) { - struct gl_program **newList; - /* found it */ - /* alloc new list */ - newList = (struct gl_program **) - _mesa_malloc((n - 1) * sizeof(struct gl_program *)); - if (!newList) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachObjectARB"); - return; - } - for (j = 0; j < i; j++) { - newList[j] = linked->Shaders[j]; - } - while (++i < n) - newList[j++] = linked->Shaders[i]; - _mesa_free(linked->Shaders); - linked->Shaders = newList; + /* already attached */ return; } } - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDetachObjectARB(shader not found)"); + /* grow list */ + linked->Shaders = (struct gl_program **) + _mesa_realloc(linked->Shaders, + n * sizeof(struct gl_program *), + (n + 1) * sizeof(struct gl_program *)); + if (!linked->Shaders) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAttachShader"); + return; + } + + /* append */ + linked->Shaders[n] = prog; + prog->RefCount++; + linked->NumShaders++; } -GLhandleARB GLAPIENTRY -_mesa_CreateShaderObjectARB(GLenum shaderType) +void +_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, + const GLchar *name) +{ + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocation(program)"); + return; + } + +#if 0 /* XXXX */ + if (name == NULL || index >= MAX_VERTEX_ATTRIBS) + _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); + else if (IS_NAME_WITH_GL_PREFIX(name)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); + else + (**pro).OverrideAttribBinding(pro, index, name); + RELEASE_PROGRAM(pro); +#endif +} + + +GLuint +_mesa_create_shader(GLcontext *ctx, GLenum type) { - GET_CURRENT_CONTEXT(ctx); struct gl_program *newProg; GLuint name; name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1); - switch (shaderType) { + switch (type) { case GL_FRAGMENT_SHADER_ARB: /* alloc new gl_fragment_program */ newProg = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, name); @@ -152,7 +156,7 @@ _mesa_CreateShaderObjectARB(GLenum shaderType) newProg = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, name); break; default: - _mesa_error(ctx, GL_INVALID_ENUM, "CreateShaderObject(shaderType)"); + _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)"); return 0; } @@ -162,1119 +166,660 @@ _mesa_CreateShaderObjectARB(GLenum shaderType) } - -GLvoid GLAPIENTRY -_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, - const GLcharARB ** string, const GLint * length) +GLuint +_mesa_create_program(GLcontext *ctx) { - GET_CURRENT_CONTEXT(ctx); - struct gl_program *shader; - GLint *offsets; - GLsizei i; - GLcharARB *source; - - if (string == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); - return; - } - - shader = _mesa_lookup_shader(ctx, shaderObj); - if (!shader) { - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(shaderObj)"); - return; - } - - /* - * This array holds offsets of where the appropriate string ends, thus the - * last element will be set to the total length of the source code. - */ - offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); - if (offsets == NULL) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } - - for (i = 0; i < count; i++) { - if (string[i] == NULL) { - _mesa_free((GLvoid *) offsets); - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(null string)"); - return; - } - if (length == NULL || length[i] < 0) - offsets[i] = _mesa_strlen(string[i]); - else - offsets[i] = length[i]; - /* accumulate string lengths */ - if (i > 0) - offsets[i] += offsets[i - 1]; - } + GLuint name; + struct gl_linked_program *linked; - source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * - sizeof(GLcharARB)); - if (source == NULL) { - _mesa_free((GLvoid *) offsets); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } + name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ProgramObjects, 1); + linked = _mesa_new_linked_program(ctx, name); - for (i = 0; i < count; i++) { - GLint start = (i > 0) ? offsets[i - 1] : 0; - _mesa_memcpy(source + start, string[i], - (offsets[i] - start) * sizeof(GLcharARB)); - } - source[offsets[count - 1]] = '\0'; + _mesa_HashInsert(ctx->Shared->ProgramObjects, name, linked); - /* free old shader source string and install new one */ - if (shader->String) { - _mesa_free(shader->String); - } - shader->String = (GLubyte *) source; + return name; } -GLvoid GLAPIENTRY -_mesa_CompileShaderARB(GLhandleARB shaderObj) +void +_mesa_delete_program2(GLcontext *ctx, GLuint name) { - GET_CURRENT_CONTEXT(ctx); - struct gl_program *prog = _mesa_lookup_shader(ctx, shaderObj); - slang_info_log info_log; - slang_code_object obj; - slang_unit_type type; + struct gl_linked_program *linked; - if (!prog) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); + linked = _mesa_lookup_linked_program(ctx, name); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); return; } - slang_info_log_construct(&info_log); - _slang_code_object_ctr(&obj); - - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { - type = slang_unit_vertex_shader; - } - else { - assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); - type = slang_unit_fragment_shader; - } - - if (_slang_compile((const char*) prog->String, &obj, - type, &info_log, prog)) { - /* - prog->CompileStatus = GL_TRUE; - */ - } - else { - /* - prog->CompileStatus = GL_FALSE; - */ - _mesa_problem(ctx, "Program did not compile!"); - } + /* XXX refcounting! */ + _mesa_HashRemove(ctx->Shared->ProgramObjects, name); + _mesa_delete_linked_program(ctx, linked); } -GLhandleARB GLAPIENTRY -_mesa_CreateProgramObjectARB(GLvoid) +void +_mesa_delete_shader(GLcontext *ctx, GLuint shader) { - GET_CURRENT_CONTEXT(ctx); - GLuint name; - struct gl_linked_program *linked; - - name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ProgramObjects, 1); - linked = _mesa_new_linked_program(ctx, name); - - _mesa_HashInsert(ctx->Shared->ProgramObjects, name, linked); + /* XXX refcounting! */ - return name; + /* + _mesa_DeleteObjectARB(shader); + */ } -GLvoid GLAPIENTRY -_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader) +void +_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) { - GET_CURRENT_CONTEXT(ctx); struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, program); - struct gl_program *prog = _mesa_lookup_shader(ctx, shader); const GLuint n = linked->NumShaders; - GLuint i; + GLuint i, j; - if (!linked || !prog) { + if (!linked) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glAttachShader(bad program or shader name)"); + "glDetachShader(bad program or shader name)"); return; } for (i = 0; i < n; i++) { - if (linked->Shaders[i] == prog) { - /* already attached */ + if (linked->Shaders[i]->Id == shader) { + struct gl_program **newList; + /* found it */ + /* alloc new, smaller array */ + newList = (struct gl_program **) + _mesa_malloc((n - 1) * sizeof(struct gl_program *)); + if (!newList) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachShader"); + return; + } + for (j = 0; j < i; j++) { + newList[j] = linked->Shaders[j]; + } + while (++i < n) + newList[j++] = linked->Shaders[i]; + _mesa_free(linked->Shaders); + + /* XXX refcounting! */ + + linked->Shaders = newList; return; } } - /* grow list */ - linked->Shaders = (struct gl_program **) - _mesa_realloc(linked->Shaders, - n * sizeof(struct gl_program *), - (n + 1) * sizeof(struct gl_program *)); - /* append */ - linked->Shaders[n] = prog; - prog->RefCount++; - linked->NumShaders++; + /* not found */ + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDetachShader(shader not found)"); } - - -GLvoid GLAPIENTRY -_mesa_LinkProgramARB(GLhandleARB programObj) +void +_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *nameOut) { - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked; + static const GLenum vec_types[] = { + GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 + }; + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + GLint sz; - linked = _mesa_lookup_linked_program(ctx, programObj); if (!linked) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(programObj)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); return; } - _slang_link2(ctx, programObj, linked); -} + if (!linked->Attributes || index >= linked->Attributes->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); + return; + } + copy_string(nameOut, maxLength, length, + linked->Attributes->Parameters[index].Name); + sz = linked->Attributes->Parameters[index].Size; + if (size) + *size = sz; + if (type) + *type = vec_types[sz]; /* XXX this is a temporary hack */ +} -GLvoid GLAPIENTRY -_mesa_UseProgramObjectARB(GLhandleARB programObj) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); +/** + * Called via ctx->Driver.GetActiveUniform(). + */ +void +_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *nameOut) +{ + static const GLenum vec_types[] = { + GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 + }; + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + GLint sz; - linked = _mesa_lookup_linked_program(ctx, programObj); if (!linked) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glUseProgramObjectARB(programObj)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); + return; + } + + if (!linked->Uniforms || index >= linked->Uniforms->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); return; } - ctx->ShaderObjects.Linked = linked; + copy_string(nameOut, maxLength, length, + linked->Uniforms->Parameters[index].Name); + sz = linked->Uniforms->Parameters[index].Size; + if (size) + *size = sz; + if (type) + *type = vec_types[sz]; /* XXX this is a temporary hack */ } -GLvoid GLAPIENTRY -_mesa_ValidateProgramARB(GLhandleARB programObj) +/** + * Called via ctx->Driver.GetAttachedShaders(). + */ +void +_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj) { -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glValidateProgramARB"); - - if (pro != NULL) { - (**pro).Validate(pro); - RELEASE_PROGRAM(pro); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (linked) { + GLuint i; + for (i = 0; i < maxCount && i < linked->NumShaders; i++) { + obj[i] = linked->Shaders[i]->Id; + } + if (count) + *count = i; + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); } -#endif } -/** - * Helper function for all the _mesa_Uniform*() functions below. - */ -static INLINE void -uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, - const char *caller) +GLint +_mesa_get_attrib_location(GLcontext *ctx, GLuint program, + const GLchar *name) { - GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); - if (ctx->ShaderObjects.Linked) { - struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - if (location >= 0 && location < linked->Uniforms->NumParameters) { - GLfloat *v = linked->Uniforms->ParameterValues[location]; - const GLfloat *fValues = (const GLfloat *) values; /* XXX */ - GLint i; - if (type == GL_FLOAT_VEC4) - count *= 4; - else if (type == GL_FLOAT_VEC3) - count *= 3; - else - abort(); - - for (i = 0; i < count; i++) - v[i] = fValues[i]; - return; - } - } -} - - -GLvoid GLAPIENTRY -_mesa_Uniform1fARB(GLint location, GLfloat v0) -{ - uniform(location, 1, &v0, GL_FLOAT, "glUniform1fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) -{ - GLfloat v[2]; - v[0] = v0; - v[1] = v1; - uniform(location, 1, v, GL_FLOAT_VEC2, "glUniform2fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - GLfloat v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - uniform(location, 1, v, GL_FLOAT_VEC3, "glUniform3fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, - GLfloat v3) -{ - GLfloat v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - uniform(location, 1, v, GL_FLOAT_VEC4, "glUniform4fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1iARB(GLint location, GLint v0) -{ - uniform(location, 1, &v0, GL_INT, "glUniform1iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) -{ - GLint v[2]; - v[0] = v0; - v[1] = v1; - uniform(location, 1, v, GL_INT_VEC2, "glUniform2iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) -{ - GLint v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - uniform(location, 1, v, GL_INT_VEC3, "glUniform3iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - GLint v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - uniform(location, 1, v, GL_INT_VEC4, "glUniform4iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT, "glUniform1fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC2, "glUniform2fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC3, "glUniform3fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC4, "glUniform4fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT, "glUniform1ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC2, "glUniform2ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC3, "glUniform3ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC4, "glUniform4ivARB"); -} - - -/** - * Helper function used by UniformMatrix**vARB() functions below. - */ -static void -uniform_matrix(GLint cols, GLint rows, const char *caller, - GLenum matrixType, - GLint location, GLsizei count, GLboolean transpose, - const GLfloat *values) -{ - const GLint matElements = rows * cols; - GET_CURRENT_CONTEXT(ctx); - -#ifdef OLD - GET_CURRENT_LINKED_PROGRAM(pro, caller); -#endif - - if (values == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, caller); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - GLint i, j, k; - - trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); - if (!trans) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); - return; - } - - pt = trans; - pv = values; - for (i = 0; i < count; i++) { - /* transpose from pv matrix into pt matrix */ - for (j = 0; j < cols; j++) { - for (k = 0; k < rows; k++) { - /* XXX verify this */ - pt[j * rows + k] = pv[k * cols + j]; - } - } - pt += matElements; - pv += matElements; - } - -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif - _mesa_free(trans); - } - else { -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif - } -} - - -GLvoid GLAPIENTRY -_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(2, 2, "glUniformMatrix2fvARB", GL_FLOAT_MAT2, - location, count, transpose, value); -} - -GLvoid GLAPIENTRY -_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(3, 3, "glUniformMatrix3fvARB", GL_FLOAT_MAT3, - location, count, transpose, value); -} - -GLvoid GLAPIENTRY -_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(4, 4, "glUniformMatrix4fvARB", GL_FLOAT_MAT4, - location, count, transpose, value); -} - -static GLboolean -_mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, - GLboolean * integral, GLint * size) -{ -#if 000 - GET_CURRENT_CONTEXT(ctx); - GLint *ipar = (GLint *) params; - - /* set default values */ - *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ - *size = 1; /* param array size */ - - switch (pname) { - case GL_OBJECT_TYPE_ARB: - case GL_OBJECT_DELETE_STATUS_ARB: - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - { - GET_GENERIC(gen, obj, "glGetObjectParameterivARB"); - - if (gen == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_TYPE_ARB: - *ipar = (**gen).GetType(gen); - break; - case GL_OBJECT_DELETE_STATUS_ARB: - *ipar = (**gen).GetDeleteStatus(gen); - break; - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - *ipar = (**gen).GetInfoLogLength(gen); - break; - } - - RELEASE_GENERIC(gen); - } - break; - case GL_OBJECT_SUBTYPE_ARB: - case GL_OBJECT_COMPILE_STATUS_ARB: - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - GET_SHADER(sha, obj, "glGetObjectParameterivARB"); - - if (sha == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_SUBTYPE_ARB: - *ipar = (**sha).GetSubType(sha); - break; - case GL_OBJECT_COMPILE_STATUS_ARB: - *ipar = (**sha).GetCompileStatus(sha); - break; - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - const GLcharARB *src = (**sha).GetSource(sha); - if (src == NULL) - *ipar = 0; - else - *ipar = _mesa_strlen(src) + 1; - } - break; - } - - RELEASE_SHADER(sha); - } - break; - case GL_OBJECT_LINK_STATUS_ARB: - case GL_OBJECT_VALIDATE_STATUS_ARB: - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - { - GET_PROGRAM(pro, obj, "glGetObjectParameterivARB"); - - if (pro == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_LINK_STATUS_ARB: - *ipar = (**pro).GetLinkStatus(pro); - break; - case GL_OBJECT_VALIDATE_STATUS_ARB: - *ipar = (**pro).GetValidateStatus(pro); - break; - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - *ipar = - (**pro)._container. - GetAttachedCount((struct gl2_container_intf **) (pro)); - break; - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - *ipar = (**pro).GetActiveUniformCount(pro); - break; - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveUniformMaxLength(pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTES_ARB: - *ipar = (**pro).GetActiveAttribCount(pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveAttribMaxLength(pro); - break; - } - - RELEASE_PROGRAM(pro); - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB"); - return GL_FALSE; - } -#endif - return GL_TRUE; -} - -GLvoid GLAPIENTRY -_mesa_GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterfvARB"); - return; - } - - assert(sizeof(GLfloat) == sizeof(GLint)); - - if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, - &integral, &size)) { - if (integral) { - GLint i; - for (i = 0; i < size; i++) - params[i] = (GLfloat) ((GLint *) params)[i]; - } - } -} - -GLvoid GLAPIENTRY -_mesa_GetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB"); - return; - } - - assert(sizeof(GLfloat) == sizeof(GLint)); - - if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, - &integral, &size)) { - if (!integral) { - GLint i; - for (i = 0; i < size; i++) - params[i] = (GLint) ((GLfloat *) params)[i]; - } + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttribLocation"); + return -1; } -} - - -/** - * Copy string from to , up to maxLength characters, returning - * length of in . - * \param src the strings source - * \param maxLength max chars to copy - * \param length returns numberof chars copied - * \param dst the string destination - */ -static GLvoid -copy_string(const GLcharARB * src, GLsizei maxLength, GLsizei * length, - GLcharARB * dst) -{ - GLsizei len; - for (len = 0; len < maxLength - 1 && src && src[len]; len++) - dst[len] = src[len]; - if (maxLength > 0) - dst[len] = 0; - if (length) - *length = len; -} - -GLvoid GLAPIENTRY -_mesa_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, - GLcharARB * infoLog) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glGetInfoLogARB"); - - if (gen == NULL) - return; - - if (infoLog == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetInfoLogARB"); - else { - GLsizei actualsize = (**gen).GetInfoLogLength(gen); - if (actualsize > maxLength) - actualsize = maxLength; - (**gen).GetInfoLog(gen, actualsize, infoLog); - if (length != NULL) - *length = (actualsize > 0) ? actualsize - 1 : 0; + if (!linked->LinkStatus) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetAttribLocation(program not linked)"); + return -1; } - RELEASE_GENERIC(gen); -#endif -} + if (!name) + return -1; -GLvoid GLAPIENTRY -_mesa_GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, - GLsizei * count, GLhandleARB * obj) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB"); - - if (con == NULL) - return; - - if (obj == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB"); - else { - GLsizei cnt, i; - - cnt = (**con).GetAttachedCount(con); - if (cnt > maxCount) - cnt = maxCount; - if (count != NULL) - *count = cnt; - - for (i = 0; i < cnt; i++) { - struct gl2_generic_intf **x = (**con).GetAttached(con, i); - obj[i] = (**x).GetName(x); - RELEASE_GENERIC(x); - } - } - RELEASE_CONTAINER(con); -#endif -} - -GLint GLAPIENTRY -_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) -{ - GET_CURRENT_CONTEXT(ctx); - - if (ctx->ShaderObjects.Linked) { - const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - GLuint loc; - for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { - const struct gl_program_parameter *u - = linked->Uniforms->Parameters + loc; - if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { - return loc; + if (linked->Attributes) { + GLuint i; + for (i = 0; i < linked->Attributes->NumParameters; i++) { + if (!strcmp(linked->Attributes->Parameters[i].Name, name)) { + return i; } } } return -1; - -} - - -GLvoid GLAPIENTRY -_mesa_GetActiveUniformARB(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLcharARB * name) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveUniformARB"); - - if (pro == NULL) - return; - - if (size == NULL || type == NULL || name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - else { - if (index < (**pro).GetActiveUniformCount(pro)) - (**pro).GetActiveUniform(pro, index, maxLength, length, size, type, - name); - else - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - } - RELEASE_PROGRAM(pro); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); - - if (!pro) - return; - - if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); - - RELEASE_PROGRAM(pro); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); - - if (!pro) - return; - - if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); - RELEASE_PROGRAM(pro); -#endif -} - -GLvoid GLAPIENTRY -_mesa_GetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, - GLcharARB * sourceOut) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_program *shader = _mesa_lookup_shader(ctx, obj); - - if (!shader) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSourceARB(obj)"); - return; - } - - copy_string((GLcharARB *) shader->String, maxLength, length, sourceOut); -} - - -/* GL_ARB_vertex_shader */ - -GLvoid GLAPIENTRY -_mesa_BindAttribLocationARB(GLhandleARB programObj, GLuint index, - const GLcharARB * name) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glBindAttribLocationARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= MAX_VERTEX_ATTRIBS) - _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); - else if (IS_NAME_WITH_GL_PREFIX(name)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); - else - (**pro).OverrideAttribBinding(pro, index, name); - RELEASE_PROGRAM(pro); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_GetActiveAttribARB(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLcharARB * name) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveAttribARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= (**pro).GetActiveAttribCount(pro)) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveAttribARB"); - else - (**pro).GetActiveAttrib(pro, index, maxLength, length, size, type, - name); - RELEASE_PROGRAM(pro); -#endif } -GLint GLAPIENTRY -_mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) +GLuint +_mesa_get_handle(GLcontext *ctx, GLenum pname) { #if 0 GET_CURRENT_CONTEXT(ctx); - GLint loc = -1; - GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); - - if (!pro) - return -1; - - if (name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocationARB"); - else if (!IS_NAME_WITH_GL_PREFIX(name)) - loc = (**pro).GetAttribLocation(pro, name); - RELEASE_PROGRAM(pro); - return loc; -#endif - return 0; -} - - -/** - ** OpenGL 2.0 functions which basically wrap the ARB_shader functions - **/ - -void GLAPIENTRY -_mesa_AttachShader(GLuint program, GLuint shader) -{ - _mesa_AttachObjectARB(program, shader); -} - - -GLuint GLAPIENTRY -_mesa_CreateShader(GLenum type) -{ - return (GLuint) _mesa_CreateShaderObjectARB(type); -} - -GLuint GLAPIENTRY -_mesa_CreateProgram(void) -{ - return (GLuint) _mesa_CreateProgramObjectARB(); -} - - -void GLAPIENTRY -_mesa_DeleteProgram(GLuint name) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked; - - linked = _mesa_lookup_linked_program(ctx, name); - if (!linked) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); - return; - } - - _mesa_HashRemove(ctx->Shared->ProgramObjects, name); - _mesa_delete_linked_program(ctx, linked); -} - - -void GLAPIENTRY -_mesa_DeleteShader(GLuint shader) -{ - _mesa_DeleteObjectARB(shader); -} - -void GLAPIENTRY -_mesa_DetachShader(GLuint program, GLuint shader) -{ - _mesa_DetachObjectARB(program, shader); -} -void GLAPIENTRY -_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, - GLsizei *count, GLuint *obj) -{ - { - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - if (linked) { - GLuint i; - for (i = 0; i < maxCount && i < linked->NumShaders; i++) { - obj[i] = linked->Shaders[i]->Id; - } - if (count) - *count = i; - } - else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); + switch (pname) { + case GL_PROGRAM_OBJECT_ARB: + { + struct gl2_program_intf **pro = ctx->Shader.CurrentProgram; + + if (pro != NULL) + return (**pro)._container._generic. + GetName((struct gl2_generic_intf **) (pro)); } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); } +#endif + return 0; } -void GLAPIENTRY -_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) +void +_mesa_get_programiv(GLcontext *ctx, GLuint program, + GLenum pname, GLint *params) { -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, program, "glGetProgramiv"); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); - if (!pro) + if (!linked) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramiv(program)"); return; + } switch (pname) { case GL_DELETE_STATUS: - *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_intf **) pro); + *params = linked->DeletePending; break; case GL_LINK_STATUS: - *params = (**pro).GetLinkStatus(pro); + *params = linked->LinkStatus; break; case GL_VALIDATE_STATUS: - *params = (**pro).GetValidateStatus(pro); + *params = linked->Validated; break; case GL_INFO_LOG_LENGTH: - *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_generic_intf **) pro ); + *params = linked->InfoLog ? strlen(linked->InfoLog) : 0; break; case GL_ATTACHED_SHADERS: - *params = (**pro)._container.GetAttachedCount( (struct gl2_container_intf **) pro ); + *params = linked->NumShaders; break; case GL_ACTIVE_ATTRIBUTES: - *params = (**pro).GetActiveAttribCount(pro); + *params = linked->Uniforms ? linked->Uniforms->NumParameters : 0; break; case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = (**pro).GetActiveAttribMaxLength(pro); + *params = _mesa_parameter_longest_name(linked->Attributes); break; case GL_ACTIVE_UNIFORMS: - *params = (**pro).GetActiveUniformCount(pro); + *params = linked->Uniforms ? linked->Uniforms->NumParameters : 0; break; case GL_ACTIVE_UNIFORM_MAX_LENGTH: - *params = (**pro).GetActiveUniformMaxLength(pro); + *params = _mesa_parameter_longest_name(linked->Uniforms); break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); return; } -#endif } -void GLAPIENTRY -_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) -{ - _mesa_GetInfoLogARB(program, bufSize, length, infoLog); -} - - -void GLAPIENTRY -_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) +void +_mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params) { #if 0 - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sh, shader, "glGetShaderiv"); + struct gl_program *shader = _mesa_lookup_shader(ctx, name); - if (!sh) + if (!shader) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderiv(shader)"); return; - + } +#else + struct gl_shader *shader; +#endif switch (pname) { case GL_SHADER_TYPE: - *params = (**sh).GetSubType(sh); + *params = shader->Type; break; case GL_DELETE_STATUS: - *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_intf **) sh); + *params = shader->DeletePending; break; case GL_COMPILE_STATUS: - *params = (**sh).GetCompileStatus(sh); + *params = shader->CompileStatus; break; case GL_INFO_LOG_LENGTH: - *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_intf **)sh); + *params = shader->InfoLog ? strlen(shader->InfoLog) : 0; break; case GL_SHADER_SOURCE_LENGTH: - { - const GLchar *src = (**sh).GetSource(sh); - *params = src ? (_mesa_strlen(src) + 1) : 0; - } + *params = shader->Source ? strlen((char *) shader->Source) : 0; break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)"); return; } -#endif } -void GLAPIENTRY -_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) +void +_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) { - _mesa_GetInfoLogARB(shader, bufSize, length, infoLog); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramInfoLog(program)"); + return; + } + /* XXX also test length, infoLog params for NULL? */ + copy_string(linked->InfoLog, bufSize, length, infoLog); } -GLboolean GLAPIENTRY -_mesa_IsProgram(GLuint name) +void +_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); + if (!shProg) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderInfoLog(shader)"); + return; + } + /* + copy_string(shProg->InfoLog, bufSize, length, infoLog); + */ +} + + +/** + * Called via ctx->Driver.GetShaderSource(). + */ +void +_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, + GLsizei *length, GLchar *sourceOut) +{ + struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); + if (!shProg) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSource(shader)"); + return; + } + copy_string((GLchar *) shProg->String, maxLength, length, sourceOut); +} + + +/** + * Called via ctx->Driver.GetUniformfv(). + */ +void +_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, + GLfloat *params) +{ + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (linked) { + GLuint i; + if (location >= 0 && location < linked->Uniforms->NumParameters) { + for (i = 0; i < linked->Uniforms->Parameters[location].Size; i++) { + params[i] = linked->Uniforms->ParameterValues[location][i]; + } + } + else { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetUniformfv(location)"); + } + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)"); + } +} + + +/** + * Called via ctx->Driver.GetUniformLocation(). + */ +GLint +_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) +{ + if (ctx->Shader.CurrentProgram) { + const struct gl_linked_program *linked = ctx->Shader.CurrentProgram; + GLuint loc; + for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { + const struct gl_program_parameter *u + = linked->Uniforms->Parameters + loc; + if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { + return loc; + } + } + } + return -1; + +} + + +GLboolean +_mesa_is_program(GLcontext *ctx, GLuint name) { - GET_CURRENT_CONTEXT(ctx); struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, name); - if (linked) - return GL_TRUE; - else - return GL_FALSE; + return linked ? GL_TRUE : GL_FALSE; } -GLboolean GLAPIENTRY -_mesa_IsShader(GLuint name) +GLboolean +_mesa_is_shader(GLcontext *ctx, GLuint name) { - GET_CURRENT_CONTEXT(ctx); struct gl_program *shader = _mesa_lookup_shader(ctx, name); - if (shader) - return GL_TRUE; - else - return GL_FALSE; + return shader ? GL_TRUE : GL_FALSE; } -/** - ** 2.1 functions - **/ -void GLAPIENTRY -_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) +/** + * Called via ctx->Driver.ShaderSource() + */ +void +_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) { - uniform_matrix(2, 3, "glUniformMatrix2x3fv", GL_FLOAT_MAT2x3, - location, count, transpose, value); + struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); + if (!shProg) { + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSource(shaderObj)"); + return; + } + + /* free old shader source string and install new one */ + if (shProg->String) { + _mesa_free(shProg->String); + } + shProg->String = (GLubyte *) source; } -void GLAPIENTRY -_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called via ctx->Driver.CompileShader() + */ +void +_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj) { - uniform_matrix(3, 2, "glUniformMatrix3x2fv", GL_FLOAT_MAT3x2, - location, count, transpose, value); + struct gl_program *prog = _mesa_lookup_shader(ctx, shaderObj); + slang_info_log info_log; + slang_code_object obj; + slang_unit_type type; + + if (!prog) { + _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); + return; + } + + slang_info_log_construct(&info_log); + _slang_code_object_ctr(&obj); + + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + type = slang_unit_vertex_shader; + } + else { + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + type = slang_unit_fragment_shader; + } + + if (_slang_compile((const char*) prog->String, &obj, + type, &info_log, prog)) { + /* + prog->CompileStatus = GL_TRUE; + */ + } + else { + /* + prog->CompileStatus = GL_FALSE; + */ + _mesa_problem(ctx, "Program did not compile!"); + } } -void GLAPIENTRY -_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called via ctx->Driver.LinkProgram() + */ +void +_mesa_link_program(GLcontext *ctx, GLuint program) { - uniform_matrix(2, 4, "glUniformMatrix2x4fv", GL_FLOAT_MAT2x4, - location, count, transpose, value); + struct gl_linked_program *linked; + + linked = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(program)"); + return; + } + + _slang_link2(ctx, program, linked); +} + + +/** + * Called via ctx->Driver.UseProgram() + */ +void +_mesa_use_program(GLcontext *ctx, GLuint program) +{ + /* XXXX need to handle reference counting here! */ + if (program) { + struct gl_linked_program *linked; + linked = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUseProgramObjectARB(programObj)"); + return; + } + ctx->Shader.CurrentProgram = linked; + } + else { + /* don't use a shader program */ + ctx->Shader.CurrentProgram = NULL; + } } -void GLAPIENTRY -_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called via ctx->Driver.Uniform(). + */ +void +_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, + const GLvoid *values, GLenum type) { - uniform_matrix(4, 2, "glUniformMatrix4x2fv", GL_FLOAT_MAT4x2, - location, count, transpose, value); + if (ctx->Shader.CurrentProgram) { + struct gl_linked_program *linked = ctx->Shader.CurrentProgram; + if (location >= 0 && location < linked->Uniforms->NumParameters) { + GLfloat *v = linked->Uniforms->ParameterValues[location]; + const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + GLint i; + if (type == GL_FLOAT_VEC4) + count *= 4; + else if (type == GL_FLOAT_VEC3) + count *= 3; + else + abort(); + + for (i = 0; i < count; i++) + v[i] = fValues[i]; + return; + } + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); + } } -void GLAPIENTRY -_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called by ctx->Driver.UniformMatrix(). + */ +void +_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, + GLenum matrixType, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *values) { - uniform_matrix(3, 4, "glUniformMatrix3x4fv", GL_FLOAT_MAT3x4, - location, count, transpose, value); + const char *caller = "glUniformMatrix"; + const GLint matElements = rows * cols; + + if (values == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, caller); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + GLint i, j, k; + + trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); + if (!trans) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); + return; + } + + pt = trans; + pv = values; + for (i = 0; i < count; i++) { + /* transpose from pv matrix into pt matrix */ + for (j = 0; j < cols; j++) { + for (k = 0; k < rows; k++) { + /* XXX verify this */ + pt[j * rows + k] = pv[k * cols + j]; + } + } + pt += matElements; + pv += matElements; + } + +#ifdef OLD + if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif + _mesa_free(trans); + } + else { +#ifdef OLD + if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif + } } -void GLAPIENTRY -_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +void +_mesa_validate_program(GLcontext *ctx, GLuint program) { - uniform_matrix(4, 3, "glUniformMatrix4x3fv", GL_FLOAT_MAT4x3, - location, count, transpose, value); + struct gl_linked_program *linked; + linked = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glValidateProgram(program)"); + return; + } + /* XXX temporary */ + linked->Validated = GL_TRUE; + + /* From the GL spec: + any two active samplers in the current program object are of + different types, but refer to the same texture image unit, + + any active sampler in the current program object refers to a texture + image unit where fixed-function fragment processing accesses a + texture target that does not match the sampler type, or + + the sum of the number of active samplers in the program and the + number of texture image units enabled for fixed-function fragment + processing exceeds the combined limit on the total number of texture + image units allowed. + */ } + +/**********************************************************************/ + + /** * Create a new GLSL program object. */ @@ -1376,15 +921,9 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) } -GLvoid -_mesa_init_shaderobjects(GLcontext * ctx) +void +_mesa_init_shader_state(GLcontext * ctx) { - - ctx->ShaderObjects.CurrentProgram = NULL; - ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; - ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; - -#if 0 - _mesa_init_shaderobjects_3dlabs(ctx); -#endif + ctx->Shader._FragmentShaderPresent = GL_FALSE; + ctx->Shader._VertexShaderPresent = GL_FALSE; } diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 388692b623..723f92690d 100644 --- a/src/mesa/shader/shader_api.h +++ b/src/mesa/shader/shader_api.h @@ -31,6 +31,13 @@ #include "mtypes.h" +/** + * Internal functions + */ + +extern void +_mesa_init_shader_state(GLcontext * ctx); + extern struct gl_linked_program * _mesa_new_linked_program(GLcontext *ctx, GLuint name); @@ -52,8 +59,108 @@ extern struct gl_program * _mesa_lookup_shader(GLcontext *ctx, GLuint name); -extern GLvoid -_mesa_init_shaderobjects(GLcontext * ctx); +/** + * API/Driver functions + */ + +extern void +_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader); + +extern void +_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, + const GLchar *name); + +extern void +_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj); + +extern GLuint +_mesa_create_shader(GLcontext *ctx, GLenum type); + +extern GLuint +_mesa_create_program(GLcontext *ctx); + +extern void +_mesa_delete_program2(GLcontext *ctx, GLuint name); + +extern void +_mesa_delete_shader(GLcontext *ctx, GLuint shader); + +extern void +_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader); + +extern void +_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *name); + +extern void +_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *name); + +extern void +_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj); + +extern GLint +_mesa_get_attrib_location(GLcontext *ctx, GLuint program, + const GLchar *name); + +extern GLuint +_mesa_get_handle(GLcontext *ctx, GLenum pname); + +extern void +_mesa_get_programiv(GLcontext *ctx, GLuint program, + GLenum pname, GLint *params); + +extern void +_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern void +_mesa_get_shaderiv(GLcontext *ctx, GLuint shader, GLenum pname, GLint *params); + +extern void +_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern void +_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, + GLsizei *length, GLchar *sourceOut); + +extern void +_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, + GLfloat *params); + +extern GLint +_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name); + +extern GLboolean +_mesa_is_program(GLcontext *ctx, GLuint name); + +extern GLboolean +_mesa_is_shader(GLcontext *ctx, GLuint name); + +extern void +_mesa_link_program(GLcontext *ctx, GLuint program); + +extern void +_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source); + +extern void +_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, + const GLvoid *values, GLenum type); + +void +_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, + GLenum matrixType, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *values); + +extern void +_mesa_use_program(GLcontext *ctx, GLuint program); + +extern void +_mesa_validate_program(GLcontext *ctx, GLuint program); #endif /* SHADER_API_H */ -- cgit v1.2.3 From 3a8e2776a626c971bc02cd2ee3e576cb8b4267e9 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 17:19:16 -0700 Subject: Uniform matrix support. Implement _mesa_uniform_matrix() Support for program parameters/uniforms with more than 4 elements. Store 4x4 matrices in column-major order in registers. Update mat mul built-in functions accordingly. --- src/mesa/shader/prog_parameter.c | 60 +- src/mesa/shader/prog_parameter.h | 2 +- src/mesa/shader/shader_api.c | 109 ++-- src/mesa/shader/slang/library/slang_core.gc | 156 ++--- src/mesa/shader/slang/library/slang_core_gc.h | 848 +++++++++++++------------- src/mesa/shader/slang/slang_emit.c | 20 +- src/mesa/shader/slang/slang_link2.c | 30 +- 7 files changed, 638 insertions(+), 587 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 84e92d7ed0..cdc8a20001 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -66,36 +66,41 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) /** * Add a new parameter to a parameter list. + * Note that parameter values are usually 4-element GLfloat vectors. + * When size > 4 we'll allocate a sequential block of parameters to + * store all the values (in blocks of 4). + * * \param paramList the list to add the parameter to * \param name the parameter name, will be duplicated/copied! * \param values initial parameter value, up to 4 GLfloats - * \param size number of elements in 'values' vector (1..4) + * \param size number of elements in 'values' vector (1..4, or more) * \param type type of parameter, such as * \return index of new parameter in the list, or -1 if error (out of mem) */ GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, + const char *name, const GLfloat *values, GLuint size, enum register_file type) { - const GLuint n = paramList->NumParameters; + const GLuint oldNum = paramList->NumParameters; + const GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */ + + assert(size > 0); + assert(size <= 16); /* XXX anything larger than a matrix??? */ - if (n == paramList->Size) { - /* Need to grow the parameter list array */ - if (paramList->Size == 0) - paramList->Size = 8; - else - paramList->Size *= 2; + if (oldNum + sz4 > paramList->Size) { + /* Need to grow the parameter list array (alloc some extra) */ + paramList->Size = paramList->Size + 4 * sz4; /* realloc arrays */ paramList->Parameters = (struct gl_program_parameter *) _mesa_realloc(paramList->Parameters, - n * sizeof(struct gl_program_parameter), + oldNum * sizeof(struct gl_program_parameter), paramList->Size * sizeof(struct gl_program_parameter)); paramList->ParameterValues = (GLfloat (*)[4]) _mesa_align_realloc(paramList->ParameterValues, /* old buf */ - n * 4 * sizeof(GLfloat), /* old size */ + oldNum * 4 * sizeof(GLfloat), /* old size */ paramList->Size * 4 *sizeof(GLfloat), /* new sz */ 16); } @@ -108,17 +113,25 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, return -1; } else { - paramList->NumParameters = n + 1; + GLuint i; + + paramList->NumParameters = oldNum + sz4; - _mesa_memset(¶mList->Parameters[n], 0, - sizeof(struct gl_program_parameter)); + _mesa_memset(¶mList->Parameters[oldNum], 0, + sz4 * sizeof(struct gl_program_parameter)); - paramList->Parameters[n].Name = name ? _mesa_strdup(name) : NULL; - paramList->Parameters[n].Type = type; - paramList->Parameters[n].Size = size; - if (values) - COPY_4V(paramList->ParameterValues[n], values); - return (GLint) n; + for (i = 0; i < sz4; i++) { + struct gl_program_parameter *p = paramList->Parameters + oldNum + i; + p->Name = name ? _mesa_strdup(name) : NULL; + p->Type = type; + p->Size = size; + if (values) { + COPY_4V(paramList->ParameterValues[oldNum + i], values); + values += 4; + } + size -= 4; + } + return (GLint) oldNum; } } @@ -203,7 +216,6 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, return i; } else { - assert(size == 4); i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); return i; } @@ -429,8 +441,9 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) /** Not too efficient, but correct */ for (i = 0; i < list->NumParameters; i++) { struct gl_program_parameter *p = list->Parameters + i; + GLuint size = MIN2(p->Size, 4); GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], - p->Size, p->Type); + size, p->Type); ASSERT(j >= 0); /* copy state indexes */ if (p->Type == PROGRAM_STATE_VAR) { @@ -440,6 +453,9 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) q->StateIndexes[k] = p->StateIndexes[k]; } } + else { + clone->Parameters[j].Size = p->Size; + } } return clone; diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index fb82757d83..6ce96c7972 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -77,7 +77,7 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list); extern GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, + const char *name, const GLfloat *values, GLuint size, enum register_file type); extern GLint diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 7fb4a8ac43..8daf585f7d 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -882,26 +882,34 @@ void _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type) { - if (ctx->Shader.CurrentProgram) { - struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; - if (location >= 0 && location < shProg->Uniforms->NumParameters) { - GLfloat *v = shProg->Uniforms->ParameterValues[location]; - const GLfloat *fValues = (const GLfloat *) values; /* XXX */ - GLint i; - if (type == GL_FLOAT_VEC4) - count *= 4; - else if (type == GL_FLOAT_VEC3) - count *= 3; - else - abort(); - - for (i = 0; i < count; i++) - v[i] = fValues[i]; - return; - } - } - else { + struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + + if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); + return; + } + + if (location < 0 || location >= shProg->Uniforms->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(location)"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + { + GLfloat *v = shProg->Uniforms->ParameterValues[location]; + const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + GLint i; + if (type == GL_FLOAT_VEC4) + count *= 4; + else if (type == GL_FLOAT_VEC3) + count *= 3; + else + abort(); + + for (i = 0; i < count; i++) + v[i] = fValues[i]; + return; } } @@ -914,52 +922,45 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, GLenum matrixType, GLint location, GLsizei count, GLboolean transpose, const GLfloat *values) { - const char *caller = "glUniformMatrix"; - const GLint matElements = rows * cols; - + struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + if (!shProg || !shProg->LinkStatus) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUniformMatrix(program not linked)"); + return; + } + if (location < 0 || location >= shProg->Uniforms->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix(location)"); + return; + } if (values == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, caller); + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix"); return; } FLUSH_VERTICES(ctx, _NEW_PROGRAM); + /* + * Note: the _columns_ of a matrix are stored in program registers, not + * the rows. + */ + /* XXXX need to test 3x3 and 2x2 matrices... */ if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - GLint i, j, k; - - trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); - if (!trans) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); - return; - } - - pt = trans; - pv = values; - for (i = 0; i < count; i++) { - /* transpose from pv matrix into pt matrix */ - for (j = 0; j < cols; j++) { - for (k = 0; k < rows; k++) { - /* XXX verify this */ - pt[j * rows + k] = pv[k * cols + j]; - } + GLuint row, col; + for (col = 0; col < cols; col++) { + GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; + for (row = 0; row < rows; row++) { + v[row] = values[col * rows + row]; } - pt += matElements; - pv += matElements; } - -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif - _mesa_free(trans); } else { -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif + GLuint row, col; + for (col = 0; col < cols; col++) { + GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; + for (row = 0; row < rows; row++) { + v[row] = values[row * cols + col]; + } + } } } diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 3c4862baa1..6d733773c3 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -596,25 +596,34 @@ void __operator -= (inout mat3 m, const mat3 n) { m[2] -= n[2]; } -vec3 __operator * (const mat3 m, const vec3 v) + +//// dot (formerly in slang_common_builtin.gc) + +float dot(const float a, const float b) { - vec3 r1, r2, r3; - r1.x = m[0].x; - r1.y = m[1].x; - r1.z = m[2].x; - r2.x = m[0].y; - r2.y = m[1].y; - r2.z = m[2].y; - r3.x = m[0].z; - r3.y = m[1].z; - r3.z = m[2].z; - __asm vec3_dot __retVal.x, r1, v; - __asm vec3_dot __retVal.y, r2, v; - __asm vec3_dot __retVal.z, r3, v; + return a * b; +} + +float dot(const vec2 a, const vec2 b) +{ + return a.x * b.x + a.y * b.y; +} + +float dot(const vec3 a, const vec3 b) +{ + __asm vec3_dot __retVal, a, b; +} + +float dot(const vec4 a, const vec4 b) +{ + __asm vec4_dot __retVal, a, b; } + + + mat3 __operator * (const mat3 m, const mat3 n) { - return mat3 (m * n[0], m * n[1], m * n[2]); +// return mat3 (m * n[0], m * n[1], m * n[2]); } void __operator *= (inout mat3 m, const mat3 n) { @@ -643,57 +652,24 @@ void __operator -= (inout mat4 m, const mat4 n) { -//// dot (formerly in slang_common_builtin.gc) - -float dot(const float a, const float b) +vec4 __operator * (const mat4 mx, const vec4 v) { - return a * b; -} - -float dot(const vec2 a, const vec2 b) -{ - return a.x * b.x + a.y * b.y; -} - -float dot(const vec3 a, const vec3 b) -{ - __asm vec3_dot __retVal, a, b; + __retVal.x = dot(v, mx[0]); + __retVal.y = dot(v, mx[1]); + __retVal.z = dot(v, mx[2]); + __retVal.w = dot(v, mx[3]); } -float dot(const vec4 a, const vec4 b) +//matmul +vec3 __operator * (const mat3 m, const vec3 v) { - __asm vec4_dot __retVal, a, b; + __retVal.x = dot(v, m[0]); + __retVal.y = dot(v, m[1]); + __retVal.z = dot(v, m[2]); } - - -vec4 __operator * (const mat4 m, const vec4 v) -{ - vec4 r1, r2, r3, r4; - r1.x = m[0].x; - r1.y = m[1].x; - r1.z = m[2].x; - r1.w = m[3].x; - r2.x = m[0].y; - r2.y = m[1].y; - r2.z = m[2].y; - r2.w = m[3].y; - r3.x = m[0].z; - r3.y = m[1].z; - r3.z = m[2].z; - r3.w = m[3].z; - r4.x = m[0].w; - r4.y = m[1].w; - r4.z = m[2].w; - r4.w = m[3].w; - __asm vec4_dot __retVal.x, r1, v; - __asm vec4_dot __retVal.y, r2, v; - __asm vec4_dot __retVal.z, r3, v; - __asm vec4_dot __retVal.w, r4, v; -} - -// xxx move +// xxx move this mat4 __operator * (const mat4 m, const mat4 n) { return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]); } @@ -864,28 +840,64 @@ void __operator *= (inout vec2 v, const mat2 m) { v = v * m; } -vec3 __operator * (const vec3 v, const mat3 m) { - return vec3 ( - v.x * m[0].x + v.y * m[0].y + v.z * m[0].z, - v.x * m[1].x + v.y * m[1].y + v.z * m[1].z, - v.x * m[2].x + v.y * m[2].y + v.z * m[2].z - ); -} - void __operator *= (inout vec3 v, const mat3 m) { - v = v * m; +// v = v * m; } vec4 __operator * (const vec4 v, const mat4 m) { - __retVal.x = dot(v, m[0]); - __retVal.y = dot(v, m[1]); - __retVal.z = dot(v, m[2]); - __retVal.w = dot(v, m[3]); + vec4 r1, r2, r3, r4; + r1.x = m[0].x; + r1.y = m[1].x; + r1.z = m[2].x; + r1.w = m[3].x; + r2.x = m[0].y; + r2.y = m[1].y; + r2.z = m[2].y; + r2.w = m[3].y; + r3.x = m[0].z; + r3.y = m[1].z; + r3.z = m[2].z; + r3.w = m[3].z; + r4.x = m[0].w; + r4.y = m[1].w; + r4.z = m[2].w; + r4.w = m[3].w; + __asm vec4_dot __retVal.x, r1, v; + __asm vec4_dot __retVal.y, r2, v; + __asm vec4_dot __retVal.z, r3, v; + __asm vec4_dot __retVal.w, r4, v; +} + +// matmul +vec3 __operator * (const vec3 v, const mat3 m) +{ + vec3 r1, r2, r3; + r1.x = m[0].x; + r1.y = m[1].x; + r1.z = m[2].x; + r2.x = m[0].y; + r2.y = m[1].y; + r2.z = m[2].y; + r3.x = m[0].z; + r3.y = m[1].z; + r3.z = m[2].z; + __asm vec3_dot __retVal.x, r1, v; + __asm vec3_dot __retVal.y, r2, v; + __asm vec3_dot __retVal.z, r3, v; } + + + + + + + + + void __operator *= (inout vec4 v, const mat4 m) { // xxx improve codegen for this case diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 68af99c886..ad7f8f5f0d 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -136,8 +136,94 @@ 57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, 10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, 16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0, -1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, +110,0,16,10,50,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98, +0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59, +120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0, +11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, +0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14, +110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, +0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, +0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50, +0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8, +48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109, +0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10, +49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109, +120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0, +0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, +57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18, +110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0, +18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, +0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18, +118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18, +118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18, +118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0, +18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, +118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0, +18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18, +118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18, +118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18, +97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, +118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, +10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, +57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, +0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, +50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, +10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, +13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, +59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0, +48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, +0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0, +0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, +114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, +118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, +0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, +51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, +18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0, +0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, 114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, 57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, 18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, @@ -146,430 +232,340 @@ 100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, 51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, 101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, -0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48, -0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2, -3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14, -109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110, -0,16,10,51,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0, -48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120, -0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98, -0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0, -0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, -114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, -57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59, -122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0, -20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16, -10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0, -59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116, -0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15, -109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18, -110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0, -0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0, -2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24, -0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0, -0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0, -1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1, -0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23, -0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59, -121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, -0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59, -122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23, -0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59, -122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, -0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21, -0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59, -121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1, -0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23, -0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59, -122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, -22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109, -0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50, -0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, -0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, -57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, -0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, -0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, -51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18, -118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0, -48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0, -57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18, -109,0,48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18, -118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59, -120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10, -49,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18, -109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0, -1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21, -1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, -18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, -116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, -100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, -0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, -15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1, -4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0, -3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, -110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100, -100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, -0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, -121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, -0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0, -18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, -18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1, -99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95, -116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105, -112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, -0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, -97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, -116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116, -111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118, -0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0, -59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109, +0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2, +27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0, +0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, +95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, +98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97, +116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1, +120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0, +0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108, +111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111, +97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0, +1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121, +0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10, +2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0, +1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, 117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12, -117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, -2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0, -1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, -59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, -117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22, -1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0, -49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, -8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59, -121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0, -0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0, -59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7, -117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18, -117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1, -0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, -0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0, -1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0, -59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18, -117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1, -0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121, -0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59, -119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, -59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, -0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0, -13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49, -0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0, -0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0, -1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110, -0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49, -20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, -120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27, -1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18, -117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18, -118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0, -10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, -0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98, -0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58, -118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1, -1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59, -121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18, -97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1, -0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0, -18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1, -0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47, -0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, -101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98, -0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0, -59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1, -0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59, -120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8, -58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0, -59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0, -59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2, -26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0, -18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12, -2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18, -118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1, -0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0, -18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0, -1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47, -0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0, -0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0, -48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0, -0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0, -18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99, -52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0, -18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101, -99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49, -0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97, -116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26, -1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109, -0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0, -16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116, -51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0, -16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0, -0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8, -48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14, -2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0, -18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110, -0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98, -0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, -58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0, -18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, -51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57, -18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18, -97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, -0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, -47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0, -0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8, -48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18, -110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52, -0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18, -98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, -1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18, -97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10, -49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0, -1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0, -1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0, -1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0, -1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0, -1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0, -1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0, -1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0, -1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0, -1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0, -1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0, -1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0, -1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0, -1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, -0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, -6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, -0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, -13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0, -57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18, -109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58, -109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0, -18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1, -0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0, -59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0, -9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25, -1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0, -0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2, -8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118, -0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49, -0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, -52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0, -9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0, -2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16, -10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, -1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, -122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, -0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118, -0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0, -9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0, -0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1, -0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109, -0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, -0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, -2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11, -118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, -0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, -25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, -0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, -9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, -1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, -1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, -1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, -0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, -0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, -1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, -57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, -15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, -97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, -0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, -0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, -116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, -108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, -5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, -1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, -101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, -0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, -1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, -15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, -116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, -0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, -1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, +117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, +122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2, +0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0, +0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, +59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, +0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, +6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, +118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, +49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, +0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, +122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, +59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, +0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, +18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, +0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, +122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, +99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, +59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, +118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, +118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, +18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, +0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, +122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, +0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, +59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, +0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0, +0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1, +1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1, +0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0, +14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, +0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1, +1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0, +46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, +18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1, +8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2, +27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118, +0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0, +18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, +1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48, +0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, +58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26, +1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, +117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, +18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, +1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, +0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, +1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, +48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, +20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, +11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, +0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, +1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, +117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, +0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, +18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, +118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, +18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, +0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, +18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, +1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, +0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, +0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, +57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, +8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, +1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, +0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, +0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, +0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, +46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, +0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, +16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, +1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, +49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, +109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, +116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, +16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, +109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, +48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, +16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, +0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, +49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, +0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, +110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, +0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, +98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, +51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, +97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, +47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, +16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, +1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, +49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, +2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, +18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, +98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, +110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, +97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, +0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58, +118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0, +1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, +0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, +101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, +54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109, +0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10, +50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54, +0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0, +2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16, +10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0, +1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59, +122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9, +18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, +0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118, +0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0, +9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0, +0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1, +0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109, +0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49, +0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118, +0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18, +118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0, +0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119, +0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0, +2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51, +0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, +122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18, +109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10, +51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52, +0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0, +52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, +0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, +109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, +1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, +0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, +11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, +24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, +0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, +118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, +60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, +0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, +18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, +0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, +0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, +1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, +32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, +39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, +114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index d7c224541a..39f470046b 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -191,7 +191,7 @@ storage_string(const slang_ir_storage *st) sprintf(s, "%s[%d..%d]", files[st->File], st->Index, st->Index + st->Size - 1); #endif - sprintf(s, "%s", files[st->File]); + sprintf(s, "%s[%d]", files[st->File], st->Index); return s; } @@ -533,15 +533,15 @@ slang_lookup_statevar(const char *name, GLint index, }; static const struct state_info state[] = { { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, { "gl_NormalMatrix", 3, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, STATE_MATRIX_INVTRANS } }, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MVP, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, { "gl_TextureMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } }; GLuint i; @@ -580,9 +580,9 @@ slang_lookup_statevar(const char *name, GLint index, static GLint -slang_alloc_uniform(struct gl_program *prog, const char *name) +slang_alloc_uniform(struct gl_program *prog, const char *name, GLuint size) { - GLint i = _mesa_add_uniform(prog->Parameters, name, 4); + GLint i = _mesa_add_uniform(prog->Parameters, name, size); return i; } @@ -736,7 +736,9 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, /* probably a uniform or varying */ if (n->Var->type.qualifier == slang_qual_uniform) { - i = slang_alloc_uniform(prog, (char *) n->Var->a_name); + GLint size = n->Store->Size; + assert(size > 0); + i = slang_alloc_uniform(prog, (char *) n->Var->a_name, size); if (i >= 0) { n->Store->File = PROGRAM_UNIFORM; n->Store->Index = i; diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index d3d5394265..81a1875548 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -147,15 +147,20 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) { GLuint *map, i; +#if 0 + _mesa_print_parameter_list(prog->Parameters); +#endif + map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint)); if (!map) return GL_FALSE; - for (i = 0; i < prog->Parameters->NumParameters; i++) { + for (i = 0; i < prog->Parameters->NumParameters; /* incr below*/) { /* see if this uniform is in the linked uniform list */ const struct gl_program_parameter *p = prog->Parameters->Parameters + i; const GLfloat *pVals = prog->Parameters->ParameterValues[i]; GLint j; + GLint size; /* sanity check */ assert(is_uniform(p->Type)); @@ -177,13 +182,16 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) if (j >= 0) { /* already in list, check size XXX check this */ +#if 0 assert(p->Size == shProg->Uniforms->Parameters[j].Size); +#endif } else { /* not already in linked list */ switch (p->Type) { case PROGRAM_ENV_PARAM: j = _mesa_add_named_parameter(shProg->Uniforms, p->Name, pVals); + break; case PROGRAM_CONSTANT: j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); break; @@ -200,11 +208,27 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) } ASSERT(j >= 0); - map[i] = j; + size = p->Size; + while (size > 0) { + map[i] = j; + i++; + j++; + size -= 4; + } + } +#if 0 + { + GLuint i; + for (i = 0; i < prog->Parameters->NumParameters; i++) { + printf("map[%d] = %d\n", i, map[i]); + } + _mesa_print_parameter_list(shProg->Uniforms); + } +#endif - /* OK, now scan the program/shader instructions looking for varying vars, + /* OK, now scan the program/shader instructions looking for uniform vars, * replacing the old index with the new index. */ for (i = 0; i < prog->NumInstructions; i++) { -- cgit v1.2.3 From 9805e7674424182b17ca355da2cb3b14fab8a41c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 16:00:57 -0700 Subject: added _mesa_add_sampler() --- src/mesa/shader/prog_parameter.c | 17 +++++++++++++++++ src/mesa/shader/prog_parameter.h | 15 ++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index cdc8a20001..d09cc65937 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -222,6 +222,23 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, } +GLint +_mesa_add_sampler(struct gl_program_parameter_list *paramList, + const char *name) +{ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_SAMPLER) { + /* already in list */ + return i; + } + else { + const GLint size = 1; + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_SAMPLER); + return i; + } +} + + GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size) diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 6ce96c7972..0db2bcd314 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -35,10 +35,11 @@ /** - * Named program parameters - * Used for NV_fragment_program "DEFINE"d constants and "DECLARE"d parameters, - * and ARB_fragment_program global state references. For the later, Name - * might be "state.light[0].diffuse", for example. + * Program parameter. + * Used for NV_fragment_program for "DEFINE"d constants and "DECLARE"d + * parameters. + * Also used by ARB_vertex/fragment_programs for state variables, etc. + * Used by shaders for uniforms, constants, varying vars, etc. */ struct gl_program_parameter { @@ -53,7 +54,7 @@ struct gl_program_parameter /** - * A list of the above program_parameter instances. + * List of gl_program_parameter instances. */ struct gl_program_parameter_list { @@ -98,6 +99,10 @@ extern GLint _mesa_add_uniform(struct gl_program_parameter_list *paramList, const char *name, GLuint size); +extern GLint +_mesa_add_sampler(struct gl_program_parameter_list *paramList, + const char *name); + extern GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size); -- cgit v1.2.3 From 3209c3ed0d82c158eed1020759aacf51ba1c1ad5 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 17:49:24 -0700 Subject: Implement vertex attribute binding. Users can set explicit binding with glBindAttribLocation(), otherwise the linker will allocate generic attribute slots. --- src/mesa/main/mtypes.h | 12 +-- src/mesa/shader/prog_parameter.c | 28 +++++++ src/mesa/shader/prog_parameter.h | 4 + src/mesa/shader/prog_statevars.h | 2 + src/mesa/shader/program.c | 2 + src/mesa/shader/shader_api.c | 39 ++++++---- src/mesa/shader/slang/slang_codegen.c | 24 ++++-- src/mesa/shader/slang/slang_compile.c | 1 + src/mesa/shader/slang/slang_link.h | 3 + src/mesa/shader/slang/slang_link2.c | 138 +++++++++++++++++++++++++++++----- 10 files changed, 209 insertions(+), 44 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b6c72055e1..cbb1fd47eb 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1844,16 +1844,16 @@ struct gl_program_parameter_list; struct gl_program { GLuint Id; - GLubyte *String; /**< Null-terminated program text */ + GLubyte *String; /**< Null-terminated program text */ GLint RefCount; - GLenum Target; - GLenum Format; /**< String encoding format */ + GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */ + GLenum Format; /**< String encoding format */ GLboolean Resident; struct prog_instruction *Instructions; - GLbitfield InputsRead; /* Bitmask of which input regs are read */ - GLbitfield OutputsWritten; /* Bitmask of which output regs are written to */ + GLbitfield InputsRead; /**< Bitmask of which input regs are read */ + GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */ GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */ /** Named parameters, constants, etc. from program text */ @@ -1863,6 +1863,8 @@ struct gl_program /** Vertex/fragment shader varying vars */ struct gl_program_parameter_list *Varying; + /** Vertex program user-defined attributes */ + struct gl_program_parameter_list *Attributes; /** Logical counts */ /*@{*/ diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index d09cc65937..e543871ab7 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -239,6 +239,9 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList, } +/** + * Add parameter representing a varying variable. + */ GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size) @@ -256,6 +259,31 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, } +/** + * Add parameter representing a vertex program attribute. + */ +GLint +_mesa_add_attribute(struct gl_program_parameter_list *paramList, + const char *name, GLint attrib) +{ + GLint size = 4; /* XXX ok? */ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0) { + /* replace */ + ASSERT(paramList->Parameters[i].StateIndexes[0] == STATE_USER_ATTRIB); + paramList->Parameters[i].StateIndexes[1] = attrib; + } + else { + /* add */ + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_INPUT); + if (i >= 0) { + paramList->Parameters[i].StateIndexes[0] = STATE_USER_ATTRIB; + paramList->Parameters[i].StateIndexes[1] = attrib; + } + } + return i; +} + #if 0 /* not used yet */ diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 0db2bcd314..ab4d730018 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -107,6 +107,10 @@ extern GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size); +extern GLint +_mesa_add_attribute(struct gl_program_parameter_list *paramList, + const char *name, GLint attrib); + extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const GLint *stateTokens); diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 17e38054bb..da672c9ec8 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -96,6 +96,8 @@ typedef enum gl_state_index_ { STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_POSITION_NORMALIZED, /* normalized light position */ + STATE_USER_ATTRIB, /** shader vertex attrib: user-specified */ + STATE_AUTO_ATTRIB, /** shader vertex attrib: linker-specified */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ } gl_state_index; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 1b26b6c932..7a31949673 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -365,6 +365,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); if (prog->Varying) clone->Varying = _mesa_clone_parameter_list(prog->Varying); + if (prog->Attributes) + clone->Attributes = _mesa_clone_parameter_list(prog->Attributes); memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); clone->NumInstructions = prog->NumInstructions; clone->NumTemporaries = prog->NumTemporaries; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index bd258f8737..d1b0e21b94 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -40,6 +40,8 @@ #include "hash.h" #include "program.h" #include "prog_parameter.h" +#include "prog_print.h" +#include "prog_statevars.h" #include "shader_api.h" #include "slang_compile.h" @@ -59,6 +61,7 @@ _mesa_new_shader_program(GLcontext *ctx, GLuint name) shProg->Type = GL_SHADER_PROGRAM; shProg->Name = name; shProg->RefCount = 1; + shProg->Attributes = _mesa_new_parameter_list(); } return shProg; } @@ -275,6 +278,8 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, { struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); + GLint i; + GLint oldIndex; if (!shProg) { _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocation(program)"); @@ -290,15 +295,21 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, return; } -#if 0 /* XXXX */ - if (name == NULL || index >= MAX_VERTEX_ATTRIBS) - _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); - else if (IS_NAME_WITH_GL_PREFIX(name)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); - else - (**pro).OverrideAttribBinding(pro, index, name); - RELEASE_PROGRAM(pro); -#endif + oldIndex = _mesa_get_attrib_location(ctx, program, name); + + /* this will replace the current value if it's already in the list */ + i = _mesa_add_attribute(shProg->Attributes, name, index); + if (i < 0) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation"); + } + + if (shProg->VertexProgram && oldIndex >= 0) { + _slang_remap_attribute(&shProg->VertexProgram->Base, oldIndex, index); + } + + printf("===== post BindAttrib:\n"); + _mesa_print_program(&shProg->VertexProgram->Base); + } @@ -541,11 +552,9 @@ _mesa_get_attrib_location(GLcontext *ctx, GLuint program, return -1; if (shProg->Attributes) { - GLuint i; - for (i = 0; i < shProg->Attributes->NumParameters; i++) { - if (!strcmp(shProg->Attributes->Parameters[i].Name, name)) { - return i; - } + GLint i = _mesa_lookup_parameter_index(shProg->Attributes, -1, name); + if (i >= 0) { + return shProg->Attributes->Parameters[i].StateIndexes[1]; } } return -1; @@ -605,7 +614,7 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program, *params = shProg->NumShaders; break; case GL_ACTIVE_ATTRIBUTES: - *params = shProg->Uniforms ? shProg->Uniforms->NumParameters : 0; + *params = shProg->Attributes ? shProg->Attributes->NumParameters : 0; break; case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: *params = _mesa_parameter_longest_name(shProg->Attributes); diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 79261ee29a..cc70d1de2a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -540,7 +540,8 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, } else if (var->type.qualifier == slang_qual_const) { if (prog) { - abort(); + /* user-defined constant */ + abort(); /* XXX fix */ } else { /* pre-defined global constant, like gl_MaxLights */ @@ -550,11 +551,22 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, if (dbg) printf("CONST "); } else if (var->type.qualifier == slang_qual_attribute) { - /* Vertex attribute */ - GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + if (prog) { + /* user-defined vertex attribute */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + GLint index = _mesa_add_parameter(prog->Attributes, varName, + NULL, size, PROGRAM_INPUT); + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, + VERT_ATTRIB_GENERIC0 + index, size); + } + else { + /* pre-defined vertex attrib */ + GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + } if (dbg) printf("ATTRIB "); } else if (var->type.qualifier == slang_qual_fixedinput) { diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index efb23255f9..314c32f707 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2260,6 +2260,7 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) shader->Programs[0]->Parameters = _mesa_new_parameter_list(); shader->Programs[0]->Varying = _mesa_new_parameter_list(); + shader->Programs[0]->Attributes = _mesa_new_parameter_list(); } slang_info_log_construct(&info_log); diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 2fc5525000..d9819289ca 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -357,6 +357,9 @@ extern void _slang_resolve_samplers(struct gl_shader_program *shProg, struct gl_program *prog); +extern void +_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib); + #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 3a5bce0099..0965f3e4c4 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -36,6 +36,7 @@ #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" +#include "prog_statevars.h" #include "shader_api.h" #include "slang_link.h" @@ -311,31 +312,71 @@ _slang_resolve_branches(struct gl_program *prog) /** - * Scan program for texture instructions, lookup sampler/uniform's value - * to determine which texture unit to use. - * Also, update the program's TexturesUsed[] array. + * Resolve binding of generic vertex attributes. + * For example, if the vertex shader declared "attribute vec4 foobar" we'll + * allocate a generic vertex attribute for "foobar" and plug that value into + * the vertex program instructions. */ -void -_slang_resolve_samplers(struct gl_shader_program *shProg, - struct gl_program *prog) +static GLboolean +_slang_resolve_attributes(struct gl_shader_program *shProg, + struct gl_program *prog) { - GLuint i; + GLuint i, j; + GLbitfield usedAttributes; - for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) - prog->TexturesUsed[i] = 0; + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + + /* Build a bitmask indicating which attribute indexes have been + * explicitly bound by the user with glBindAttributeLocation(). + */ + usedAttributes = 0x0; + for (i = 0; i < shProg->Attributes->NumParameters; i++) { + GLint attr = shProg->Attributes->Parameters[i].StateIndexes[1]; + usedAttributes |= attr; + } + + if (!shProg->Attributes) + shProg->Attributes = _mesa_new_parameter_list(); + /* + * Scan program for generic attribute references + */ for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_TEX || - inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXP) { - GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; - assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); - inst->TexSrcUnit = sampleUnit; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT && + inst->SrcReg[j].Index >= VERT_ATTRIB_GENERIC0) { + /* this is a generic attrib */ + const GLint k = inst->SrcReg[j].Index - VERT_ATTRIB_GENERIC0; + const char *name = prog->Attributes->Parameters[k].Name; + /* See if this attrib name is in the program's attribute list + * (i.e. was bound by the user). + */ + GLint index = _mesa_lookup_parameter_index(shProg->Attributes, + -1, name); + GLint attr; + if (index >= 0) { + /* found, user must have specified a binding */ + attr = shProg->Attributes->Parameters[index].StateIndexes[1]; + } + else { + /* not found, choose our own attribute number */ + for (attr = 0; attr < MAX_VERTEX_ATTRIBS; attr++) { + if (((1 << attr) & usedAttributes) == 0) + break; + } + if (attr == MAX_VERTEX_ATTRIBS) { + /* too many! XXX record error log */ + return GL_FALSE; + } + _mesa_add_attribute(shProg->Attributes, name, attr); + } - prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr; + } } } + return GL_TRUE; } @@ -366,6 +407,65 @@ _slang_update_inputs_outputs(struct gl_program *prog) } +/** + * Scan a vertex program looking for instances of + * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + oldAttrib) and replace with + * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + newAttrib). + * This is used when the user calls glBindAttribLocation on an already linked + * shader program. + */ +void +_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib) +{ + GLuint i, j; + + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT) { + if (inst->SrcReg[j].Index == VERT_ATTRIB_GENERIC0 + oldAttrib) { + inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + newAttrib; + } + } + } + } + + _slang_update_inputs_outputs(prog); +} + + + +/** + * Scan program for texture instructions, lookup sampler/uniform's value + * to determine which texture unit to use. + * Also, update the program's TexturesUsed[] array. + */ +void +_slang_resolve_samplers(struct gl_shader_program *shProg, + struct gl_program *prog) +{ + GLuint i; + + for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) + prog->TexturesUsed[i] = 0; + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXP) { + GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; + assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); + inst->TexSrcUnit = sampleUnit; + + prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + } + } +} + + /** cast wrapper */ static struct gl_vertex_program * @@ -463,10 +563,12 @@ _slang_link2(GLcontext *ctx, _slang_resolve_branches(&shProg->VertexProgram->Base); _slang_resolve_branches(&shProg->FragmentProgram->Base); -#if 1 + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); -#endif + + _slang_resolve_attributes(shProg, &shProg->VertexProgram->Base); + _slang_update_inputs_outputs(&shProg->VertexProgram->Base); _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); -- cgit v1.2.3 From b7978af6936d186112727cb9858fe7740eef1a7c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 19:17:17 -0700 Subject: clean up a bunch of program parameter stuff --- src/mesa/shader/arbprogparse.c | 6 +-- src/mesa/shader/prog_parameter.c | 77 +++++++++++++++++++++++------------ src/mesa/shader/prog_parameter.h | 16 ++++---- src/mesa/shader/prog_statevars.c | 6 +-- src/mesa/shader/prog_statevars.h | 11 ++++- src/mesa/shader/shader_api.c | 6 +-- src/mesa/shader/slang/slang_codegen.c | 11 ++--- src/mesa/shader/slang/slang_link2.c | 3 +- 8 files changed, 85 insertions(+), 51 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 2f74a5dc58..991378f6d4 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1719,7 +1719,7 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, { GLint idx; GLuint err = 0; - GLint state_tokens[6]; + GLint state_tokens[STATE_LENGTH]; GLfloat const_values[4]; switch (*(*inst)++) { diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index e543871ab7..8945f2d854 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -71,16 +71,18 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) * store all the values (in blocks of 4). * * \param paramList the list to add the parameter to + * \param type type of parameter, such as * \param name the parameter name, will be duplicated/copied! - * \param values initial parameter value, up to 4 GLfloats * \param size number of elements in 'values' vector (1..4, or more) - * \param type type of parameter, such as + * \param values initial parameter value, up to 4 GLfloats, or NULL + * \param state state indexes, or NULL * \return index of new parameter in the list, or -1 if error (out of mem) */ GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat *values, GLuint size, - enum register_file type) + enum register_file type, const char *name, + GLuint size, const GLfloat *values, + const gl_state_index state[STATE_LENGTH]) { const GLuint oldNum = paramList->NumParameters; const GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */ @@ -131,6 +133,12 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, } size -= 4; } + + if (state) { + for (i = 0; i < STATE_LENGTH; i++) + paramList->Parameters[oldNum].StateIndexes[i] = state[i]; + } + return (GLint) oldNum; } } @@ -144,7 +152,9 @@ GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4]) { - return _mesa_add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); + return _mesa_add_parameter(paramList, PROGRAM_NAMED_PARAM, name, + 4, values, NULL); + } @@ -173,7 +183,9 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, } #endif size = 4; /** XXX fix */ - return _mesa_add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); + return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, name, + size, values, NULL); + } @@ -202,7 +214,9 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, size, &pos, &swizzle)) { return pos; } - return _mesa_add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); + return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, NULL, + size, values, NULL); + } @@ -216,7 +230,9 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, return i; } else { - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); + i = _mesa_add_parameter(paramList, PROGRAM_UNIFORM, name, + size, NULL, NULL); + return i; } } @@ -233,7 +249,8 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList, } else { const GLint size = 1; - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_SAMPLER); + i = _mesa_add_parameter(paramList, PROGRAM_SAMPLER, name, + size, NULL, NULL); return i; } } @@ -253,7 +270,8 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, } else { assert(size == 4); - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); + i = _mesa_add_parameter(paramList, PROGRAM_VARYING, name, + size, NULL, NULL); return i; } } @@ -261,25 +279,28 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, /** * Add parameter representing a vertex program attribute. + * \param size size of attribute (in floats), may be -1 if unknown + * \param attrib the attribute index, or -1 if unknown */ GLint _mesa_add_attribute(struct gl_program_parameter_list *paramList, - const char *name, GLint attrib) + const char *name, GLint size, GLint attrib) { - GLint size = 4; /* XXX ok? */ GLint i = _mesa_lookup_parameter_index(paramList, -1, name); if (i >= 0) { /* replace */ ASSERT(paramList->Parameters[i].StateIndexes[0] == STATE_USER_ATTRIB); + if (attrib < 0) + attrib = i; paramList->Parameters[i].StateIndexes[1] = attrib; } else { /* add */ - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_INPUT); - if (i >= 0) { - paramList->Parameters[i].StateIndexes[0] = STATE_USER_ATTRIB; - paramList->Parameters[i].StateIndexes[1] = attrib; - } + gl_state_index state[STATE_LENGTH]; + state[0] = STATE_USER_ATTRIB; + state[1] = attrib; + i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name, + size, NULL, state); } return i; } @@ -315,12 +336,12 @@ sizeof_state_reference(const GLint *stateTokens) * PARAM ambient = state.material.front.ambient; * * \param paramList the parameter list - * \param state an array of 6 state tokens + * \param state an array of 6 (STATE_LENGTH) state tokens * \return index of the new parameter. */ GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint *stateTokens) + const GLint stateTokens[STATE_LENGTH]) { const GLuint size = 4; /* XXX fix */ const char *name; @@ -337,17 +358,19 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, break; } } - if (match == 6) { + if (match == STATE_LENGTH) { /* this state reference is already in the parameter list */ return index; } } name = _mesa_program_state_string(stateTokens); - index = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); + index = _mesa_add_parameter(paramList, PROGRAM_STATE_VAR, name, + size, NULL, NULL); + if (index >= 0) { GLuint i; - for (i = 0; i < 6; i++) { + for (i = 0; i < STATE_LENGTH; i++) { paramList->Parameters[index].StateIndexes[i] = (gl_state_index) stateTokens[i]; } @@ -487,14 +510,14 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) for (i = 0; i < list->NumParameters; i++) { struct gl_program_parameter *p = list->Parameters + i; GLuint size = MIN2(p->Size, 4); - GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], - size, p->Type); + GLint j = _mesa_add_parameter(clone, p->Type, p->Name, + size, list->ParameterValues[i], NULL); ASSERT(j >= 0); /* copy state indexes */ if (p->Type == PROGRAM_STATE_VAR) { GLint k; struct gl_program_parameter *q = clone->Parameters + j; - for (k = 0; k < 6; k++) { + for (k = 0; k < STATE_LENGTH; k++) { q->StateIndexes[k] = p->StateIndexes[k]; } } diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index ab4d730018..bfae071be0 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,6 +32,7 @@ #define PROG_PARAMETER_H #include "mtypes.h" +#include "prog_statevars.h" /** @@ -49,7 +50,7 @@ struct gl_program_parameter /** * A sequence of STATE_* tokens and integers to identify GL state. */ - GLuint StateIndexes[6]; + GLuint StateIndexes[STATE_LENGTH]; }; @@ -78,8 +79,9 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list); extern GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat *values, GLuint size, - enum register_file type); + enum register_file type, const char *name, + GLuint size, const GLfloat *values, + const gl_state_index state[STATE_LENGTH]); extern GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, @@ -109,11 +111,11 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_attribute(struct gl_program_parameter_list *paramList, - const char *name, GLint attrib); + const char *name, GLint size, GLint attrib); extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint *stateTokens); + const GLint stateTokens[STATE_LENGTH]); extern GLfloat * _mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 7377c7d821..a0a00cfb95 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -418,7 +418,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], * some GL state has changed. */ GLbitfield -_mesa_program_state_flags(const GLint state[]) +_mesa_program_state_flags(const GLint state[STATE_LENGTH]) { switch (state[0]) { case STATE_MATERIAL: @@ -661,7 +661,7 @@ append_index(char *dst, GLint index) * Use _mesa_free() to deallocate the string. */ const char * -_mesa_program_state_string(const GLint state[6]) +_mesa_program_state_string(const GLint state[STATE_LENGTH]) { char str[1000] = ""; char tmp[30]; diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index da672c9ec8..47ef615f9b 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -28,6 +28,13 @@ #include "mtypes.h" +/** + * Number of STATE_* values we need to address any GL state. + * Used to dimension arrays. + */ +#define STATE_LENGTH 6 + + /** * Used for describing GL state referenced from inside ARB vertex and * fragment programs. @@ -109,11 +116,11 @@ _mesa_load_state_parameters(GLcontext *ctx, extern GLbitfield -_mesa_program_state_flags(const GLint state[]); +_mesa_program_state_flags(const GLint state[STATE_LENGTH]); extern const char * -_mesa_program_state_string(const GLint state[6]); +_mesa_program_state_string(const GLint state[STATE_LENGTH]); #endif /* PROG_STATEVARS_H */ diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index d1b0e21b94..397ce916ea 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -278,8 +278,8 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, { struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); - GLint i; - GLint oldIndex; + const GLint size = -1; /* unknown size */ + GLint i, oldIndex; if (!shProg) { _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocation(program)"); @@ -298,7 +298,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, oldIndex = _mesa_get_attrib_location(ctx, program, name); /* this will replace the current value if it's already in the list */ - i = _mesa_add_attribute(shProg->Attributes, name, index); + i = _mesa_add_attribute(shProg->Attributes, name, size, index); if (i < 0) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation"); } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index cc70d1de2a..91e117367e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -119,7 +119,7 @@ slang_lookup_statevar(const char *name, GLint index, const char *Name; const GLuint NumRows; /** for matrices */ const GLuint Swizzle; - const GLint Indexes[6]; + const GLint Indexes[STATE_LENGTH]; }; static const struct state_info state[] = { { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, @@ -143,9 +143,9 @@ slang_lookup_statevar(const char *name, GLint index, if (state[i].NumRows > 1) { /* a matrix */ GLuint j; - GLint pos[4], indexesCopy[6]; + GLint pos[4], indexesCopy[STATE_LENGTH]; /* make copy of state tokens */ - for (j = 0; j < 6; j++) + for (j = 0; j < STATE_LENGTH; j++) indexesCopy[j] = state[i].Indexes[j]; /* load rows */ for (j = 0; j < state[i].NumRows; j++) { @@ -554,8 +554,9 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, if (prog) { /* user-defined vertex attribute */ const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - GLint index = _mesa_add_parameter(prog->Attributes, varName, - NULL, size, PROGRAM_INPUT); + const GLint attr = -1; /* unknown */ + GLint index = _mesa_add_attribute(prog->Attributes, varName, + size, attr); assert(index >= 0); store = _slang_new_ir_storage(PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + index, size); diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 0965f3e4c4..da5ba5c292 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -323,6 +323,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, { GLuint i, j; GLbitfield usedAttributes; + GLint size = 4; /* XXX fix */ assert(prog->Target == GL_VERTEX_PROGRAM_ARB); @@ -369,7 +370,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, /* too many! XXX record error log */ return GL_FALSE; } - _mesa_add_attribute(shProg->Attributes, name, attr); + _mesa_add_attribute(shProg->Attributes, name, size, attr); } inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr; -- cgit v1.2.3 From 223d7cb3c785ad58c869a3ee0fbf2f1d42c3310d Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 23 Jan 2007 16:37:51 -0700 Subject: fix g++ warnings/errors --- src/mesa/main/texenvprogram.c | 5 ++-- src/mesa/shader/arbprogram.c | 4 +-- src/mesa/shader/prog_parameter.c | 8 +++--- src/mesa/shader/prog_parameter.h | 4 +-- src/mesa/shader/prog_statevars.c | 2 +- src/mesa/shader/shader_api.c | 6 ++--- src/mesa/shader/slang/slang_codegen.c | 17 ++++++++----- src/mesa/shader/slang/slang_emit.c | 46 +++++++++++++++++------------------ src/mesa/shader/slang/slang_link2.c | 2 +- src/mesa/sources | 1 + src/mesa/swrast/s_fragprog.c | 7 +++--- 11 files changed, 54 insertions(+), 48 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 3cb2adbde2..b69e650159 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1187,13 +1187,14 @@ static void cache_item( struct texenvprog_cache *cache, const struct state_key *key, void *data ) { - struct texenvprog_cache_item *c = MALLOC(sizeof(*c)); + struct texenvprog_cache_item *c + = (struct texenvprog_cache_item *) MALLOC(sizeof(*c)); c->hash = hash; c->key = _mesa_malloc(sizeof(*key)); memcpy(c->key, key, sizeof(*key)); - c->data = data; + c->data = (struct gl_fragment_program *) data; if (cache->n_items > cache->size * 1.5) { if (cache->size < 1000) diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index f3b25da394..5583f16ce8 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -312,7 +312,7 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - unsigned i; + GLint i; GLfloat * dest; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -464,7 +464,7 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, { GET_CURRENT_CONTEXT(ctx); struct gl_program *prog; - unsigned i; + GLint i; ASSERT_OUTSIDE_BEGIN_END(ctx); FLUSH_VERTICES(ctx, _NEW_PROGRAM); diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 90118b6294..a87dafc598 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -217,7 +217,7 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, * constants because we rely on smearing (i.e. .yyyy or .zzzz). */ if (size == 1) { - for (pos = 0; pos < paramList->NumParameters; pos++) { + for (pos = 0; pos < (GLint) paramList->NumParameters; pos++) { struct gl_program_parameter *p = paramList->Parameters + pos; if (p->Type == PROGRAM_CONSTANT && p->Size + size <= 4) { /* ok, found room */ @@ -321,7 +321,7 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList, else { /* add */ gl_state_index state[STATE_LENGTH]; - state[0] = attrib; + state[0] = (gl_state_index) attrib; if (size < 0) size = 4; i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name, @@ -373,7 +373,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, GLint index; /* Check if the state reference is already in the list */ - for (index = 0; index < paramList->NumParameters; index++) { + for (index = 0; index < (GLint) paramList->NumParameters; index++) { GLuint i, match = 0; for (i = 0; i < 6; i++) { if (paramList->Parameters[index].StateIndexes[i] == stateTokens[i]) { @@ -468,7 +468,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, */ GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, - const GLfloat v[], GLsizei vSize, + const GLfloat v[], GLuint vSize, GLint *posOut, GLuint *swizzleOut) { GLuint i; diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index bfae071be0..459643f425 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -50,7 +50,7 @@ struct gl_program_parameter /** * A sequence of STATE_* tokens and integers to identify GL state. */ - GLuint StateIndexes[STATE_LENGTH]; + GLint StateIndexes[STATE_LENGTH]; }; @@ -127,7 +127,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, extern GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, - const GLfloat v[], GLsizei vSize, + const GLfloat v[], GLuint vSize, GLint *posOut, GLuint *swizzleOut); extern GLuint diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index a0a00cfb95..3a54ab8c58 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -775,7 +775,7 @@ _mesa_load_state_parameters(GLcontext *ctx, for (i = 0; i < paramList->NumParameters; i++) { if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) { _mesa_fetch_state(ctx, - paramList->Parameters[i].StateIndexes, + (gl_state_index *) paramList->Parameters[i].StateIndexes, paramList->ParameterValues[i]); } } diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index c18bbcec4b..6bae17a905 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -518,7 +518,7 @@ _mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); if (shProg) { - GLuint i; + GLint i; for (i = 0; i < maxCount && i < shProg->NumShaders; i++) { obj[i] = shProg->Shaders[i]->Name; } @@ -719,7 +719,7 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); if (shProg) { - GLuint i; + GLint i; if (location >= 0 && location < shProg->Uniforms->NumParameters) { for (i = 0; i < shProg->Uniforms->Parameters[location].Size; i++) { params[i] = shProg->Uniforms->ParameterValues[location][i]; @@ -883,7 +883,7 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, return; } - if (location < 0 || location >= shProg->Uniforms->NumParameters) { + if (location < 0 || location >= (GLint) shProg->Uniforms->NumParameters) { _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(location)"); return; } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index aba6813a8b..ff42db9def 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -661,7 +661,7 @@ static slang_operation * slang_inline_asm_function(slang_assemble_ctx *A, slang_function *fun, slang_operation *oper) { - const int numArgs = oper->num_children; + const GLuint numArgs = oper->num_children; const slang_operation *args = oper->children; GLuint i; slang_operation *inlined = slang_operation_new(1); @@ -1052,7 +1052,8 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, &inlined->children, inlined->num_children); lab->type = slang_oper_label; - lab->a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); + lab->a_id = slang_atom_pool_atom(A->atoms, + (char *) A->CurFunction->end_label); } for (i = 0; i < totalArgs; i++) { @@ -1281,7 +1282,7 @@ _slang_gen_cond(slang_ir_node *n) static void print_funcs(struct slang_function_scope_ *scope, const char *name) { - int i; + GLuint i; for (i = 0; i < scope->num_functions; i++) { slang_function *f = &scope->functions[i]; if (!name || strcmp(name, (char*) f->header.a_name) == 0) @@ -1301,7 +1302,7 @@ print_funcs(struct slang_function_scope_ *scope, const char *name) static slang_function * _slang_first_function(struct slang_function_scope_ *scope, const char *name) { - int i; + GLuint i; for (i = 0; i < scope->num_functions; i++) { slang_function *f = &scope->functions[i]; if (strcmp(name, (char*) f->header.a_name) == 0) @@ -1800,7 +1801,9 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_operation gotoOp; slang_operation_construct(&gotoOp); gotoOp.type = slang_oper_goto; - gotoOp.a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); + /* XXX don't call function? */ + gotoOp.a_id = slang_atom_pool_atom(A->atoms, + (char *) A->CurFunction->end_label); /* assemble the new code */ n = _slang_gen_operation(A, &gotoOp); /* destroy temp code */ @@ -1855,7 +1858,9 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) jump = &block->children[1]; jump->type = slang_oper_goto; assert(A->CurFunction->end_label); - jump->a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); + /* XXX don't call function? */ + jump->a_id = slang_atom_pool_atom(A->atoms, + (char *) A->CurFunction->end_label); #if 0 /* debug */ printf("NEW RETURN:\n"); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 036509c51c..82e8c0b158 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -83,35 +83,35 @@ static slang_ir_info IrInfo[] = { { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, - { IR_NEG, "IR_NEG", 0/*spec case*/, 4, 1 }, + { IR_NEG, "IR_NEG", OPCODE_NOP/*spec case*/, 4, 1 }, { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, /* other */ - { IR_SEQ, "IR_SEQ", 0, 0, 0 }, - { IR_SCOPE, "IR_SCOPE", 0, 0, 0 }, - { IR_LABEL, "IR_LABEL", 0, 0, 0 }, - { IR_JUMP, "IR_JUMP", 0, 0, 0 }, - { IR_CJUMP0, "IR_CJUMP0", 0, 0, 0 }, - { IR_CJUMP1, "IR_CJUMP1", 0, 0, 0 }, - { IR_IF, "IR_IF", 0, 0, 0 }, - { IR_ELSE, "IR_ELSE", 0, 0, 0 }, - { IR_ENDIF, "IR_ENDIF", 0, 0, 0 }, - { IR_KILL, "IR_KILL", 0, 0, 0 }, - { IR_COND, "IR_COND", 0, 0, 0 }, - { IR_CALL, "IR_CALL", 0, 0, 0 }, - { IR_MOVE, "IR_MOVE", 0, 0, 1 }, - { IR_NOT, "IR_NOT", 0, 1, 1 }, - { IR_VAR, "IR_VAR", 0, 0, 0 }, - { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, + { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 }, + { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, + { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 }, + { IR_JUMP, "IR_JUMP", OPCODE_NOP, 0, 0 }, + { IR_CJUMP0, "IR_CJUMP0", OPCODE_NOP, 0, 0 }, + { IR_CJUMP1, "IR_CJUMP1", OPCODE_NOP, 0, 0 }, + { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 }, + { IR_ELSE, "IR_ELSE", OPCODE_NOP, 0, 0 }, + { IR_ENDIF, "IR_ENDIF", OPCODE_NOP, 0, 0 }, + { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 }, + { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 }, + { IR_CALL, "IR_CALL", OPCODE_NOP, 0, 0 }, + { IR_MOVE, "IR_MOVE", OPCODE_NOP, 0, 1 }, + { IR_NOT, "IR_NOT", OPCODE_NOP, 1, 1 }, + { IR_VAR, "IR_VAR", OPCODE_NOP, 0, 0 }, + { IR_VAR_DECL, "IR_VAR_DECL", OPCODE_NOP, 0, 0 }, { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 1 }, { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, - { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, - { IR_FIELD, "IR_FIELD", 0, 0, 0 }, - { IR_ELEMENT, "IR_ELEMENT", 0, 0, 0 }, - { IR_SWIZZLE, "IR_SWIZZLE", 0, 0, 0 }, + { IR_FLOAT, "IR_FLOAT", OPCODE_NOP, 0, 0 }, + { IR_FIELD, "IR_FIELD", OPCODE_NOP, 0, 0 }, + { IR_ELEMENT, "IR_ELEMENT", OPCODE_NOP, 0, 0 }, + { IR_SWIZZLE, "IR_SWIZZLE", OPCODE_NOP, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } }; @@ -219,7 +219,7 @@ storage_string(const slang_ir_storage *st) sprintf(s, "%s[%d..%d]", files[st->File], st->Index, st->Index + st->Size - 1); #endif - assert(st->File < sizeof(files) / sizeof(files[0])); + assert(st->File < (GLint) (sizeof(files) / sizeof(files[0]))); sprintf(s, "%s[%d]", files[st->File], st->Index); return s; } @@ -966,7 +966,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) if (n->Children[1]->Opcode == IR_FLOAT) { /* OK, constant index */ const GLint arrayAddr = n->Children[0]->Store->Index; - const GLint index = n->Children[1]->Value[0]; + const GLint index = (GLint) n->Children[1]->Value[0]; n->Store->Index = arrayAddr + index; } else { diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 0a517aecc5..9676aa5fa1 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -133,7 +133,7 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog) static GLboolean -is_uniform(enum register_file file) +is_uniform(GLuint file) { return (file == PROGRAM_ENV_PARAM || file == PROGRAM_STATE_VAR || diff --git a/src/mesa/sources b/src/mesa/sources index 1b0474c14b..d0b7246ed6 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -182,6 +182,7 @@ SLANG_SOURCES = \ shader/slang/slang_error.c \ shader/slang/slang_execute.c \ shader/slang/slang_export.c \ + shader/slang/slang_label.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ shader/slang/slang_link.c \ diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 813345f4cd..ed82460669 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -200,8 +200,7 @@ fetch_vector4( GLcontext *ctx, const GLfloat *src = get_register_pointer(ctx, source, machine, program); ASSERT(src); - if (source->Swizzle == MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, - SWIZZLE_Z, SWIZZLE_W)) { + if (source->Swizzle == SWIZZLE_NOOP) { /* no swizzling */ COPY_4V(result, src); } @@ -1263,8 +1262,8 @@ execute_program( GLcontext *ctx, { GLfloat a[4], result[4]; fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (GLfloat)_mesa_cos(a[0]); - result[1] = (GLfloat)_mesa_sin(a[0]); + result[0] = (GLfloat) _mesa_cos(a[0]); + result[1] = (GLfloat) _mesa_sin(a[0]); result[2] = 0.0; /* undefined! */ result[3] = 0.0; /* undefined! */ store_vector4( inst, machine, result ); -- cgit v1.2.3 From aa9d22a1c0f3256497088985c290d4046e089456 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:21:03 -0700 Subject: replace GLint with gl_state_index --- src/mesa/shader/arbprogparse.c | 18 +++++++++++------- src/mesa/shader/prog_parameter.c | 2 +- src/mesa/shader/prog_parameter.h | 4 ++-- src/mesa/shader/prog_statevars.c | 4 ++-- src/mesa/shader/prog_statevars.h | 4 ++-- src/mesa/shader/programopt.c | 6 +++--- src/mesa/shader/slang/slang_builtin.c | 4 ++-- src/mesa/shader/slang/slang_link.c | 2 +- 8 files changed, 24 insertions(+), 20 deletions(-) (limited to 'src/mesa/shader/prog_parameter.h') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 43e2c7e1be..6058fc9889 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1085,7 +1085,8 @@ parse_matrix (GLcontext * ctx, const GLubyte ** inst, struct arb_program *Progra */ static GLuint parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, - struct arb_program *Program, GLint * state_tokens) + struct arb_program *Program, + gl_state_index state_tokens[STATE_LENGTH]) { switch (*(*inst)++) { case STATE_MATERIAL_PARSER: @@ -1269,7 +1270,8 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, case STATE_CLIP_PLANE: state_tokens[0] = STATE_CLIPPLANE; state_tokens[1] = parse_integer (inst, Program); - if (parse_clipplane_num (ctx, inst, Program, &state_tokens[1])) + if (parse_clipplane_num (ctx, inst, Program, + (GLint *) &state_tokens[1])) return 1; break; @@ -1287,9 +1289,10 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, /* XXX: I think this is the correct format for a matrix row */ case STATE_MATRIX_ROWS: - if (parse_matrix - (ctx, inst, Program, &state_tokens[0], &state_tokens[1], - &state_tokens[4])) + if (parse_matrix(ctx, inst, Program, + (GLint *) &state_tokens[0], + (GLint *) &state_tokens[1], + (GLint *) &state_tokens[4])) return 1; state_tokens[2] = parse_integer (inst, Program); /* The first row to grab */ @@ -1345,7 +1348,8 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, */ static GLuint parse_program_single_item (GLcontext * ctx, const GLubyte ** inst, - struct arb_program *Program, GLint * state_tokens) + struct arb_program *Program, + gl_state_index state_tokens[STATE_LENGTH]) { if (Program->Base.Target == GL_FRAGMENT_PROGRAM_ARB) state_tokens[0] = STATE_FRAGMENT_PROGRAM; @@ -1720,7 +1724,7 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, { GLint idx; GLuint err = 0; - GLint state_tokens[STATE_LENGTH]; + gl_state_index state_tokens[STATE_LENGTH]; GLfloat const_values[4]; switch (*(*inst)++) { diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 505c5016ac..14b272c2c5 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -370,7 +370,7 @@ sizeof_state_reference(const GLint *stateTokens) */ GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint stateTokens[STATE_LENGTH]) + const gl_state_index stateTokens[STATE_LENGTH]) { const GLuint size = 4; /* XXX fix */ const char *name; diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 459643f425..3d32a64f38 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -50,7 +50,7 @@ struct gl_program_parameter /** * A sequence of STATE_* tokens and integers to identify GL state. */ - GLint StateIndexes[STATE_LENGTH]; + gl_state_index StateIndexes[STATE_LENGTH]; }; @@ -115,7 +115,7 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint stateTokens[STATE_LENGTH]); + const gl_state_index stateTokens[STATE_LENGTH]); extern GLfloat * _mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 0d70af3b27..93d9244523 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -439,7 +439,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], * some GL state has changed. */ GLbitfield -_mesa_program_state_flags(const GLint state[STATE_LENGTH]) +_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]) { switch (state[0]) { case STATE_MATERIAL: @@ -678,7 +678,7 @@ append_index(char *dst, GLint index) * Use _mesa_free() to deallocate the string. */ const char * -_mesa_program_state_string(const GLint state[STATE_LENGTH]) +_mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) { char str[1000] = ""; char tmp[30]; diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 82169342cd..3281a4a2a0 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -119,11 +119,11 @@ _mesa_load_state_parameters(GLcontext *ctx, extern GLbitfield -_mesa_program_state_flags(const GLint state[STATE_LENGTH]); +_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]); extern const char * -_mesa_program_state_string(const GLint state[STATE_LENGTH]); +_mesa_program_state_string(const gl_state_index state[STATE_LENGTH]); #endif /* PROG_STATEVARS_H */ diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index 18da39c2d3..2d14cd3855 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -56,7 +56,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) * Setup state references for the modelview/projection matrix. * XXX we should check if these state vars are already declared. */ - static const GLint mvpState[4][STATE_LENGTH] = { + static const gl_state_index mvpState[4][STATE_LENGTH] = { { STATE_MVP_MATRIX, 0, 0, 0, 0 }, /* state.matrix.mvp.row[0] */ { STATE_MVP_MATRIX, 0, 1, 1, 0 }, /* state.matrix.mvp.row[1] */ { STATE_MVP_MATRIX, 0, 2, 2, 0 }, /* state.matrix.mvp.row[2] */ @@ -125,9 +125,9 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) void _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) { - static const GLint fogPStateOpt[STATE_LENGTH] + static const gl_state_index fogPStateOpt[STATE_LENGTH] = { STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 }; - static const GLint fogColorState[STATE_LENGTH] + static const gl_state_index fogColorState[STATE_LENGTH] = { STATE_FOG_COLOR, 0, 0, 0, 0}; struct prog_instruction *newInst, *inst; const GLuint origLen = fprog->Base.NumInstructions; diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 2e4687afc5..b01b74d359 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -309,7 +309,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, GLuint j; for (j = 0; j < 4; j++) { tokens[2] = tokens[3] = j; /* jth row of matrix */ - pos[j] = _mesa_add_state_reference(paramList, (GLint *) tokens); + pos[j] = _mesa_add_state_reference(paramList, tokens); assert(pos[j] >= 0); ASSERT(pos[j] >= 0); } @@ -317,7 +317,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, } else { /* allocate a single register */ - GLint pos = _mesa_add_state_reference(paramList, (GLint *) tokens); + GLint pos = _mesa_add_state_reference(paramList, tokens); ASSERT(pos >= 0); return pos; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index e2bb6ee2d8..f468a8cbc2 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -199,7 +199,7 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); break; case PROGRAM_STATE_VAR: - j = _mesa_add_state_reference(shProg->Uniforms, (const GLint *) p->StateIndexes); + j = _mesa_add_state_reference(shProg->Uniforms, p->StateIndexes); break; case PROGRAM_UNIFORM: j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size); -- cgit v1.2.3