From 6dc91b8371f04f9bab61c1f6504236264feac8b4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 7 Nov 2008 12:59:08 -0700 Subject: mesa: fix opcode table order bug --- src/mesa/shader/prog_instruction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index 54df3fb2e1..f5c0a498fb 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 }, -- cgit v1.2.3 From 22459e7a9ca01cc5af8d9baeb6354d2e825cdbc9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 7 Nov 2008 12:59:36 -0700 Subject: mesa: forgot sqrt in NRM3/4 instructions --- src/mesa/shader/prog_execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index ef17ed128a..96a083527f 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1190,7 +1190,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]; @@ -1205,7 +1205,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]; -- cgit v1.2.3