diff options
author | Brian Paul <[email protected]> | 2008-08-12 10:00:02 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-12 10:00:02 -0600 |
commit | 49c2ee9d99e25c8977c67c490af2416f85d3092b (patch) | |
tree | be87688bc853b20a9cdc91882d5ee375bc6fe3ce /src/mesa | |
parent | 0fe0dc32e44b62e51b20645288360c7ce97ea436 (diff) |
mesa: allow _mesa_remove_output_reads() to work on fragment programs
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/programopt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index d6a32310551..56f1eb832e9 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -368,9 +368,9 @@ _mesa_count_texture_instructions(struct gl_program *prog) /** * Scan/rewrite program to remove reads of custom (output) registers. - * The passed type has to be either PROGRAM_VARYING or PROGRAM_OUTPUT. - * In GLSL vertex shaders, varying vars can be read and written. - * Normally, vertex varying vars are implemented as output registers. + * The passed type has to be either PROGRAM_OUTPUT or PROGRAM_VARYING + * (for vertex shaders). + * In GLSL shaders, varying vars can be read and written. * On some hardware, trying to read an output register causes trouble. * So, rewrite the program to use a temporary register in this case. */ @@ -381,8 +381,8 @@ _mesa_remove_output_reads(struct gl_program *prog, enum register_file type) GLint outputMap[VERT_RESULT_MAX]; GLuint numVaryingReads = 0; - assert(prog->Target == GL_VERTEX_PROGRAM_ARB); assert(type == PROGRAM_VARYING || type == PROGRAM_OUTPUT); + assert(prog->Target == GL_VERTEX_PROGRAM_ARB || type != PROGRAM_VARYING); for (i = 0; i < VERT_RESULT_MAX; i++) outputMap[i] = -1; |