diff options
author | Ian Romanick <[email protected]> | 2014-10-20 14:40:34 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-10-24 19:54:38 -0700 |
commit | fefead3b63584603278b3388cc9c426a8a44e92c (patch) | |
tree | 7e9063dcc09658f5b81d09e2c16d05e932242d32 /src/glsl/standalone_scaffolding.cpp | |
parent | 7cbcff06069ad88962115b8b5030e08c74f208cf (diff) |
linker: Rely on _mesa_clear_shader_program_data to clear link information
_mesa_link_shader_program already calls _mesa_clear_shader_program_data
before calling link_shaders, so this is already done.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/standalone_scaffolding.cpp')
-rw-r--r-- | src/glsl/standalone_scaffolding.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp index 2b76dd17b2a..a635c969515 100644 --- a/src/glsl/standalone_scaffolding.cpp +++ b/src/glsl/standalone_scaffolding.cpp @@ -83,6 +83,34 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type) return shader; } +void +_mesa_clear_shader_program_data(struct gl_context *ctx, + struct gl_shader_program *shProg) +{ + unsigned i; + + shProg->NumUserUniformStorage = 0; + shProg->UniformStorage = NULL; + shProg->NumUniformRemapTable = 0; + shProg->UniformRemapTable = NULL; + shProg->UniformHash = NULL; + + ralloc_free(shProg->InfoLog); + shProg->InfoLog = ralloc_strdup(shProg, ""); + + ralloc_free(shProg->UniformBlocks); + shProg->UniformBlocks = NULL; + shProg->NumUniformBlocks = 0; + for (i = 0; i < MESA_SHADER_STAGES; i++) { + ralloc_free(shProg->UniformBlockStageIndex[i]); + shProg->UniformBlockStageIndex[i] = NULL; + } + + ralloc_free(shProg->AtomicBuffers); + shProg->AtomicBuffers = NULL; + shProg->NumAtomicBuffers = 0; +} + void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) { memset(ctx, 0, sizeof(*ctx)); |