diff options
author | Brian <[email protected]> | 2007-03-22 16:07:14 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-22 16:07:14 -0600 |
commit | e6aeb24b23097024ba60e1c49239a18692f781e1 (patch) | |
tree | 0e07b8bd5f798fde7d7b49e4e10c23679263ec0b /src/mesa/shader/slang/slang_codegen.c | |
parent | 0aad9e262784b0f2ac85afdce88414c986dae2f7 (diff) |
Overhaul emit_compare() function.
Previously, comparing vec2, vec3, vec4 was broken.
Added IR_EQUAL, IR_NOTEQUAL nodes/operators to compute boolean
equality/inequality vs. IR_SEQUAL/IR_SNEQUAL which work component-wise.
Use IR_EQUAL/IR_NOTEQUAL for the == and != operators.
To compute vec4 equality, use SNE, DP4, SEQ instruction sequence.
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 89a891562ea..f1be713c05b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2369,11 +2369,11 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return new_node0(IR_KILL); case SLANG_OPER_EQUAL: - return new_node2(IR_SEQUAL, + return new_node2(IR_EQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_NOTEQUAL: - return new_node2(IR_SNEQUAL, + return new_node2(IR_NOTEQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_GREATER: |