From 83baa8a6c5541829003bbffe1d2b8cee5a0263fd Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 16 Aug 2010 01:53:30 +0200 Subject: st/mesa: remove output register reads inside shaders This is a GLSL2 regression fix. --- src/mesa/state_tracker/st_program.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 91528c227b2..8c2d8b6154b 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -207,6 +207,9 @@ st_translate_vertex_program(struct st_context *st, enum pipe_error error; unsigned num_outputs; + _mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_OUTPUT); + _mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_VARYING); + ureg = ureg_create( TGSI_PROCESSOR_VERTEX ); if (ureg == NULL) { FREE(vpv); @@ -298,6 +301,8 @@ st_translate_fragment_program(struct st_context *st, ubyte fs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS]; uint fs_num_outputs = 0; + _mesa_remove_output_reads(&stfp->Base.Base, PROGRAM_OUTPUT); + /* * Convert Mesa program inputs to TGSI input register semantics. */ @@ -485,6 +490,9 @@ st_translate_geometry_program(struct st_context *st, GLuint maxSlot = 0; struct ureg_program *ureg; + _mesa_remove_output_reads(&stgp->Base.Base, PROGRAM_OUTPUT); + _mesa_remove_output_reads(&stgp->Base.Base, PROGRAM_VARYING); + ureg = ureg_create( TGSI_PROCESSOR_GEOMETRY ); if (ureg == NULL) { return; -- cgit v1.2.3