st/mesa: get Version from gl_program rather than gl_shader_program
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 9 Nov 2016 04:01:29 +0000 (15:01 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Fri, 2 Dec 2016 02:54:54 +0000 (13:54 +1100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_atom_texture.c

index 5fe042b37ab31b679161d2ae5b8f2c072e4fbc94..58e753dab641af4d3df080e21530d6ff047ff6d7 100644 (file)
@@ -111,9 +111,6 @@ update_textures(struct st_context *st,
    GLbitfield free_slots = ~prog->SamplersUsed;
    GLbitfield external_samplers_used = prog->ExternalSamplersUsed;
    GLuint unit;
-   struct gl_shader_program *shader =
-      st->ctx->_Shader->CurrentProgram[mesa_shader];
-   unsigned glsl_version = shader ? shader->data->Version : 0;
    enum pipe_shader_type shader_stage = st_shader_stage_to_ptarget(mesa_shader);
 
    if (samplers_used == 0x0 && old_max == 0)
@@ -130,7 +127,7 @@ update_textures(struct st_context *st,
          GLboolean retval;
 
          retval = update_single_texture(st, &sampler_view, texUnit,
-                                        glsl_version);
+                                        prog->sh.data->Version);
          if (retval == GL_FALSE)
             continue;