diff options
author | Brian Paul <[email protected]> | 2008-08-12 10:00:59 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-12 10:00:59 -0600 |
commit | ee7296d3199c0b0c0b6695f553a4d0919760fd41 (patch) | |
tree | e8ba105dcaa5377213d5409473d0ef8f895ba3f8 /src | |
parent | af3d9dba562813ffed71691bffd7faf6665c4487 (diff) |
mesa: glsl: remove reads of output regs from fragment shaders too
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 64c0dad611d..9cf0f8b81a3 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2431,19 +2431,20 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) _slang_delete_mempool((slang_mempool *) ctx->Shader.MemPool); ctx->Shader.MemPool = NULL; - if (shader->Type == GL_VERTEX_SHADER) { - /* remove any reads of varying (output) registers */ + /* remove any reads of output registers */ #if 0 - printf("Pre-remove output reads:\n"); - _mesa_print_program(shader->Programs); + printf("Pre-remove output reads:\n"); + _mesa_print_program(shader->Program); #endif + _mesa_remove_output_reads(shader->Program, PROGRAM_OUTPUT); + if (shader->Type == GL_VERTEX_SHADER) { + /* and remove writes to varying vars in vertex programs */ _mesa_remove_output_reads(shader->Program, PROGRAM_VARYING); - _mesa_remove_output_reads(shader->Program, PROGRAM_OUTPUT); + } #if 0 - printf("Post-remove output reads:\n"); - _mesa_print_program(shader->Programs); + printf("Post-remove output reads:\n"); + _mesa_print_program(shader->Program); #endif - } return success; } |