mesa: remove unused variable warning in release builds
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 19 Feb 2017 23:16:20 +0000 (10:16 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 20 Feb 2017 21:46:04 +0000 (08:46 +1100)
This assert might have made sense before but we no longer use
gl_linked_shader here. Unless the caller has really done something
crazy this assert is fairly useless.

We also do some small tidy ups in this change.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/uniforms.c

index 8376a9519f6a9fa545f968ebe92fbbf15667c926..59ae4c5dce233ff998b9ff85172e61e6a9471cc6 100644 (file)
  */
 void
 _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
-                                 struct gl_program *prog)
+                                  struct gl_program *prog)
 {
-   GLbitfield mask = prog->SamplersUsed;
-   struct gl_linked_shader *shader =
-      shProg->_LinkedShaders[_mesa_program_enum_to_shader_stage(prog->Target)];
-
-   assert(shader);
-
    memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
 
    shProg->SamplersValidated = GL_TRUE;
 
+   GLbitfield mask = prog->SamplersUsed;
    while (mask) {
       const int s = u_bit_scan(&mask);
       GLuint unit = prog->SamplerUnits[s];