diff options
author | Eric Anholt <[email protected]> | 2012-10-09 15:31:42 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-10-15 11:53:23 -0700 |
commit | bcfd51f8c45be2ee99f302ed3310c34998b19ff6 (patch) | |
tree | 147b3daf47e3020e363a4787ab4a163e3e0e3884 /src/mesa/program/prog_execute.c | |
parent | 422566e1c7bb4b14fdc133a963bd9787cd98f369 (diff) |
mesa: Remove Mesa IR opcodes that existed only for NV_vertex_program.
v2: Remove dead positive() function, caught by Matt.
Reviewed-by: Brian Paul <[email protected]> (v1)
Diffstat (limited to 'src/mesa/program/prog_execute.c')
-rw-r--r-- | src/mesa/program/prog_execute.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index dd1706e1444..f57027c0756 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execute.c @@ -79,23 +79,6 @@ static const GLfloat ZeroVec[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; - -/** - * Return TRUE for +0 and other positive values, FALSE otherwise. - * Used for RCC opcode. - */ -static inline GLboolean -positive(float x) -{ - fi_type fi; - fi.f = x; - if (fi.i & 0x80000000) - return GL_FALSE; - return GL_TRUE; -} - - - /** * Return a pointer to the 4-element float vector specified by the given * source register. @@ -728,13 +711,6 @@ _mesa_execute_program(struct gl_context * ctx, break; case OPCODE_ENDSUB: /* end subroutine */ break; - case OPCODE_BRA: /* branch (conditional) */ - if (eval_condition(machine, inst)) { - /* take branch */ - /* Subtract 1 here since we'll do pc++ below */ - pc = inst->BranchTarget - 1; - } - break; case OPCODE_BRK: /* break out of loop (conditional) */ ASSERT(program->Instructions[inst->BranchTarget].Opcode == OPCODE_ENDLOOP); @@ -1367,43 +1343,6 @@ _mesa_execute_program(struct gl_context * ctx, store_vector4(inst, machine, result); } break; - case OPCODE_RCC: /* clamped riciprocal */ - { - const float largest = 1.884467e+19, smallest = 5.42101e-20; - GLfloat a[4], r, result[4]; - fetch_vector1(&inst->SrcReg[0], machine, a); - if (DEBUG_PROG) { - if (a[0] == 0) - printf("RCC(0)\n"); - else if (IS_INF_OR_NAN(a[0])) - printf("RCC(inf)\n"); - } - if (a[0] == 1.0F) { - r = 1.0F; - } - else { - r = 1.0F / a[0]; - } - if (positive(r)) { - if (r > largest) { - r = largest; - } - else if (r < smallest) { - r = smallest; - } - } - else { - if (r < -largest) { - r = -largest; - } - else if (r > -smallest) { - r = -smallest; - } - } - result[0] = result[1] = result[2] = result[3] = r; - store_vector4(inst, machine, result); - } - break; case OPCODE_RCP: { |