diff options
author | Vinson Lee <[email protected]> | 2010-03-04 17:40:36 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-03-04 17:41:20 -0800 |
commit | 45df4bad9fc0379f05197bee10c03fd351f24094 (patch) | |
tree | 043c760f02c0d9ea9ffcb217588b6d0468e03ba9 /src | |
parent | bb35000b4b6dfe60048b2f5d60bc102c4a7fd791 (diff) |
Revert "mesa: Remove pointless comparison of unsigned integer with a negative constant."
This reverts commit a05fdbcb719ac64e6be842372813f0f4ca2f4f93.
Removing the comparison is wrong. The comparison with -1 should be changed
to another value (probably PROGRAM_UNDEFINED) along with another
change in the shader assembler.
Conflicts:
src/mesa/shader/prog_execute.c
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/prog_execute.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index a1c20a325e6..37750cc330a 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1767,10 +1767,15 @@ _mesa_execute_program(GLcontext * ctx, break; case OPCODE_PRINT: { - GLfloat a[4]; - fetch_vector4(&inst->SrcReg[0], machine, a); - printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, - a[0], a[1], a[2], a[3]); + if (inst->SrcReg[0].File != -1) { + GLfloat a[4]; + fetch_vector4(&inst->SrcReg[0], machine, a); + printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, + a[0], a[1], a[2], a[3]); + } + else { + printf("%s\n", (const char *) inst->Data); + } } break; case OPCODE_END: |