diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-08-16 01:53:30 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-08-16 02:19:18 +0200 |
commit | 83baa8a6c5541829003bbffe1d2b8cee5a0263fd (patch) | |
tree | 409465a0da08bb62ca82d857037ab555faf7c896 /src/mesa | |
parent | a0b0afc6944b00df27145a96ad2727a36752e1d6 (diff) |
st/mesa: remove output register reads inside shaders
This is a GLSL2 regression fix.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 91528c227b..8c2d8b6154 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; |