Mesa (glsl2): glsl2: Emit OPCODE_END at the end of the Mesa program.

Eric Anholt anholt at kemper.freedesktop.org
Fri Jun 25 13:29:09 PDT 2010


Module: Mesa
Branch: glsl2
Commit: abc4e52992c53ee6b6895480b47e6a6e27ef9bd0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=abc4e52992c53ee6b6895480b47e6a6e27ef9bd0

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jun 25 13:00:38 2010 -0700

glsl2: Emit OPCODE_END at the end of the Mesa program.

The 965 driver can now run a glsl2-generated shader!

---

 src/mesa/shader/ir_to_mesa.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index accd151..f58af0f 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -1233,6 +1233,8 @@ get_mesa_program(GLcontext *ctx, void *mem_ctx, struct glsl_shader *shader)
 
    v.mem_ctx = talloc_new(NULL);
    visit_exec_list(instructions, &v);
+   v.ir_to_mesa_emit_op1(NULL, OPCODE_END,
+			 ir_to_mesa_undef_dst, ir_to_mesa_undef);
 
    prog->NumTemporaries = v.next_temp;
 



More information about the mesa-commit mailing list