summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-04-07 11:22:41 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-04-07 11:23:44 -0600
commit42a9218daa8f564ea1b992a48cc3c375fd1b815e (patch)
tree1f13ee23587427211de8988f20917f4fd8d4e7dc /src/mesa/shader/slang
parent48a25bdd3693ec4a2556efb3c387cc3eb8151cb5 (diff)
mesa: call _mesa_remove_varying_reads() after compiling vertex shaders
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r--src/mesa/shader/slang/slang_compile.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index bfb9ca4db6..0df673085b 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -31,6 +31,8 @@
#include "main/imports.h"
#include "main/context.h"
#include "shader/program.h"
+#include "shader/programopt.h"
+#include "shader/prog_print.h"
#include "shader/prog_parameter.h"
#include "shader/grammar/grammar_mesa.h"
#include "slang_codegen.h"
@@ -2186,6 +2188,19 @@ _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 */
+#if 0
+ printf("Pre-remove output reads:\n");
+ _mesa_print_program(shader->Programs[0]);
+#endif
+ _mesa_remove_varying_reads(shader->Programs[0]);
+#if 0
+ printf("Post-remove output reads:\n");
+ _mesa_print_program(shader->Programs[0]);
+#endif
+ }
+
return success;
}