summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-11-07 13:02:07 -0700
committerBrian Paul <brian.paul@tungstengraphics.com>2008-11-07 13:02:07 -0700
commit49680dae5dd014503974f20c0b943244622ca3d5 (patch)
tree681fc016675f91d8e248778404d70937d5533ed7
parentb493fdd7e333b9a94176a603009643326a538690 (diff)
parent22459e7a9ca01cc5af8d9baeb6354d2e825cdbc9 (diff)
Merge commit 'origin/master' into gallium-0.2
-rw-r--r--src/mesa/shader/prog_execute.c4
-rw-r--r--src/mesa/shader/prog_instruction.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index 914056d74..4f1a07ed7 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -1191,7 +1191,7 @@ _mesa_execute_program(GLcontext * ctx,
fetch_vector4(&inst->SrcReg[0], machine, a);
tmp = a[0] * a[0] + a[1] * a[1] + a[2] * a[2];
if (tmp != 0.0F)
- tmp = 1.0F / tmp;
+ tmp = INV_SQRTF(tmp);
result[0] = tmp * a[0];
result[1] = tmp * a[1];
result[2] = tmp * a[2];
@@ -1206,7 +1206,7 @@ _mesa_execute_program(GLcontext * ctx,
fetch_vector4(&inst->SrcReg[0], machine, a);
tmp = a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3];
if (tmp != 0.0F)
- tmp = 1.0F / tmp;
+ tmp = INV_SQRTF(tmp);
result[0] = tmp * a[0];
result[1] = tmp * a[1];
result[2] = tmp * a[2];
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index 54df3fb2e..f5c0a498f 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -196,14 +196,14 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_MIN, "MIN", 2, 1 },
{ OPCODE_MOV, "MOV", 1, 1 },
{ OPCODE_MUL, "MUL", 2, 1 },
- { OPCODE_NOT, "NOT", 1, 1 },
{ OPCODE_NOISE1, "NOISE1", 1, 1 },
{ OPCODE_NOISE2, "NOISE2", 1, 1 },
{ OPCODE_NOISE3, "NOISE3", 1, 1 },
{ OPCODE_NOISE4, "NOISE4", 1, 1 },
- { OPCODE_OR, "OR", 2, 1 },
+ { OPCODE_NOT, "NOT", 1, 1 },
{ OPCODE_NRM3, "NRM3", 1, 1 },
{ OPCODE_NRM4, "NRM4", 1, 1 },
+ { OPCODE_OR, "OR", 2, 1 },
{ OPCODE_PK2H, "PK2H", 1, 1 },
{ OPCODE_PK2US, "PK2US", 1, 1 },
{ OPCODE_PK4B, "PK4B", 1, 1 },