diff options
author | Timothy Arceri <[email protected]> | 2016-12-02 16:44:44 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-12-02 16:44:44 +1100 |
commit | c45d84ad8349d0c69893458d6c58eb5f6f1609c4 (patch) | |
tree | 00ed2981f5dbe62cedb7c1fc7b51a59966036bca /src | |
parent | 6bf63b011992dbbc899a28bde5692070dbcf965a (diff) |
Revert "st/mesa: get Version from gl_program rather than gl_shader_program"
This reverts commit 6bf63b011992dbbc899a28bde5692070dbcf965a.
A patch that adds a reference to gl_shader_program_data to gl_program
needs to land befor this one.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_atom_texture.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 58e753dab64..5fe042b37ab 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -111,6 +111,9 @@ 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) @@ -127,7 +130,7 @@ update_textures(struct st_context *st, GLboolean retval; retval = update_single_texture(st, &sampler_view, texUnit, - prog->sh.data->Version); + glsl_version); if (retval == GL_FALSE) continue; |