X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fshader%2Fprog_parameter.c;h=66edae9001dbcbc1fe0d90eea341a6758e828e46;hb=3d4246e22e90ffef5fe0cd935bd54c7f862e82f7;hp=c0602ad2c948b35588a68841519fb556802cead4;hpb=0da44c62cc91c60d392f6e57aa047473b67ffb9b;p=mesa.git diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index c0602ad2c94..66edae9001d 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -78,7 +78,7 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) */ GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - enum register_file type, const char *name, + gl_register_file type, const char *name, GLuint size, GLenum datatype, const GLfloat *values, const gl_state_index state[STATE_LENGTH], GLbitfield flags) @@ -290,7 +290,8 @@ _mesa_use_uniform(struct gl_program_parameter_list *paramList, GLuint i; for (i = 0; i < paramList->NumParameters; i++) { struct gl_program_parameter *p = paramList->Parameters + i; - if (p->Type == PROGRAM_UNIFORM && _mesa_strcmp(p->Name, name) == 0) { + if ((p->Type == PROGRAM_UNIFORM || p->Type == PROGRAM_SAMPLER) && + _mesa_strcmp(p->Name, name) == 0) { p->Used = GL_TRUE; /* Note that large uniforms may occupy several slots so we're * not done searching yet. @@ -423,7 +424,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const gl_state_index stateTokens[STATE_LENGTH]) { const GLuint size = 4; /* XXX fix */ - const char *name; + char *name; GLint index; /* Check if the state reference is already in the list */ @@ -450,7 +451,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, paramList->StateFlags |= _mesa_program_state_flags(stateTokens); /* free name string here since we duplicated it in add_parameter() */ - _mesa_free((void *) name); + _mesa_free(name); return index; } @@ -516,7 +517,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, * swizzling to find a match. * \param list the parameter list to search * \param v the float vector to search for - * \param size number of element in v + * \param vSize number of element in v * \param posOut returns the position of the constant, if found * \param swizzleOut returns a swizzle mask describing location of the * vector elements if found. @@ -680,7 +681,7 @@ _mesa_combine_parameter_lists(const struct gl_program_parameter_list *listA, */ GLuint _mesa_longest_parameter_name(const struct gl_program_parameter_list *list, - enum register_file type) + gl_register_file type) { GLuint i, maxLen = 0; if (!list) @@ -701,7 +702,7 @@ _mesa_longest_parameter_name(const struct gl_program_parameter_list *list, */ GLuint _mesa_num_parameters_of_type(const struct gl_program_parameter_list *list, - enum register_file type) + gl_register_file type) { GLuint i, count = 0; if (list) {