summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_emit.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-07 09:49:26 -0700
committerBrian Paul <[email protected]>2008-11-07 09:51:25 -0700
commita98a25c25ff1ec3be74cf9c5f027b85a297c3e78 (patch)
treed7f01e22737aae92a8b24d87bae122fe59501733 /src/mesa/shader/slang/slang_emit.c
parent65cb74ecc0287d766493fd3649295e2e1b20099b (diff)
mesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually emitted yet though)
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r--src/mesa/shader/slang/slang_emit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 672ec4bd606..827760c917a 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -488,6 +488,9 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot,
case OPCODE_MUL:
operator = "*";
break;
+ case OPCODE_DP2:
+ operator = "DP2";
+ break;
case OPCODE_DP3:
operator = "DP3";
break;
@@ -708,7 +711,7 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
}
else {
assert(size == 2);
- dotOp = OPCODE_DP3;
+ dotOp = OPCODE_DP3; /* XXX use OPCODE_DP2 eventually */
swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y);
}
@@ -1893,12 +1896,15 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
case IR_NOISE2:
case IR_NOISE3:
case IR_NOISE4:
+ case IR_NRM4:
+ case IR_NRM3:
/* binary */
case IR_ADD:
case IR_SUB:
case IR_MUL:
case IR_DOT4:
case IR_DOT3:
+ case IR_DOT2:
case IR_CROSS:
case IR_MIN:
case IR_MAX: