diff options
author | Timothy Arceri <[email protected]> | 2016-06-30 14:55:40 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-06-30 16:51:25 +1000 |
commit | 1fb8c6df884c2a17cf980c4ea32db4c214903b55 (patch) | |
tree | a21b0de699816ce28de37dd61531a025cc984114 /src/mesa/state_tracker/st_program.c | |
parent | 378f07ccb5bff7857d87a4fe5dff0b5e83f99895 (diff) |
glsl/mesa: split gl_shader in two
There are two distinctly different uses of this struct. The first
is to store GL shader objects. The second is to store information
about a shader stage thats been linked.
The two uses actually share few fields and there is clearly confusion
about their use. For example the linked shaders map one to one with
a program so can simply be destroyed along with the program. However
previously we were calling reference counting on the linked shaders.
We were also creating linked shaders with a name even though it
is always 0 and called the driver version of the _mesa_new_shader()
function unnecessarily for GL shader objects.
Acked-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index f2b55379923..57b09354487 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -1756,10 +1756,6 @@ destroy_shader_program_variants_cb(GLuint key, void *data, void *userData) struct gl_shader_program *shProg = (struct gl_shader_program *) data; GLuint i; - for (i = 0; i < shProg->NumShaders; i++) { - destroy_program_variants(st, shProg->Shaders[i]->Program); - } - for (i = 0; i < ARRAY_SIZE(shProg->_LinkedShaders); i++) { if (shProg->_LinkedShaders[i]) destroy_program_variants(st, shProg->_LinkedShaders[i]->Program); @@ -1772,9 +1768,6 @@ destroy_shader_program_variants_cb(GLuint key, void *data, void *userData) case GL_TESS_CONTROL_SHADER: case GL_TESS_EVALUATION_SHADER: case GL_COMPUTE_SHADER: - { - destroy_program_variants(st, shader->Program); - } break; default: assert(0); |