summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_execute.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-06 17:14:33 -0700
committerBrian Paul <[email protected]>2008-11-06 17:14:33 -0700
commit035c0cf71a5fe3beee55654e1f7148adfe626cc0 (patch)
tree11ec1f5164f02a8323875b7aa53b74f953229d11 /src/mesa/shader/prog_execute.c
parent517401af07ea17a7e88659e6ba95a0628ff826b3 (diff)
mesa: rename OPCODE_INT -> OPCODE_TRUNC
Trunc is a more accurate description; there's no type conversion involved.
Diffstat (limited to 'src/mesa/shader/prog_execute.c')
-rw-r--r--src/mesa/shader/prog_execute.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index 32b6ff4fd42..d843761723b 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -789,17 +789,6 @@ _mesa_execute_program(GLcontext * ctx,
case OPCODE_ENDIF:
/* nothing */
break;
- case OPCODE_INT: /* float to int */
- {
- GLfloat a[4], result[4];
- fetch_vector4(&inst->SrcReg[0], machine, a);
- result[0] = (GLfloat) (GLint) a[0];
- result[1] = (GLfloat) (GLint) a[1];
- result[2] = (GLfloat) (GLint) a[2];
- result[3] = (GLfloat) (GLint) a[3];
- store_vector4(inst, machine, result);
- }
- break;
case OPCODE_KIL_NV: /* NV_f_p only (conditional) */
if (eval_condition(machine, inst)) {
return GL_FALSE;
@@ -1425,6 +1414,17 @@ _mesa_execute_program(GLcontext * ctx,
store_vector4(inst, machine, color);
}
break;
+ case OPCODE_TRUNC: /* truncate toward zero */
+ {
+ GLfloat a[4], result[4];
+ fetch_vector4(&inst->SrcReg[0], machine, a);
+ result[0] = (GLfloat) (GLint) a[0];
+ result[1] = (GLfloat) (GLint) a[1];
+ result[2] = (GLfloat) (GLint) a[2];
+ result[3] = (GLfloat) (GLint) a[3];
+ store_vector4(inst, machine, result);
+ }
+ break;
case OPCODE_UP2H: /* unpack two 16-bit floats */
{
GLfloat a[4], result[4];