diff options
author | Brian <[email protected]> | 2007-01-08 15:58:14 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-01-08 15:58:14 -0700 |
commit | 42153d7858686cfd88e919c0889a56d3a13a603e (patch) | |
tree | 3fe760df42a2f1eb963866b6bbb86dc98525fd37 /src/mesa/shader/slang/slang_emit.c | |
parent | 483ca39bca3c4a125e725e4711abde3f86a84b9e (diff) |
Implement projective texture sampling, 3D textures. Disable some debug output.
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 65a356050f2..aee3fb2ceb6 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -92,6 +92,7 @@ static slang_ir_info IrInfo[] = { { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 2 }, + { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 2 }, { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, { IR_FIELD, "IR_FIELD", 0, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } @@ -564,10 +565,13 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) if (n->Opcode == IR_TEX) { inst = new_instruction(prog, OPCODE_TEX); } - else { - assert(n->Opcode == IR_TEXB); + else if (n->Opcode == IR_TEXB) { inst = new_instruction(prog, OPCODE_TXB); } + else { + assert(n->Opcode == IR_TEXP); + inst = new_instruction(prog, OPCODE_TXP); + } if (!n->Store) slang_alloc_temp_storage(gc, n, 4); @@ -700,6 +704,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) return emit_unop(gc, n, prog); case IR_TEX: case IR_TEXB: + case IR_TEXP: return emit_tex(gc, n, prog); case IR_NEG: return emit_negation(gc, n, prog); |