aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-10 13:36:25 +0000
committermarha <marha@users.sourceforge.net>2011-05-10 13:36:25 +0000
commit2e5094b5a8e6241621cbf8c3e41b618347de7e2f (patch)
tree5e6023f9a98e76859ed4d6184f4e4ae50877db7a /mesalib/src/mesa/program/ir_to_mesa.cpp
parent495e1bd0f33256db726731f949d2a95e75d106b8 (diff)
parent0f6aea154580c2f220be98d12108dd7d316c21f6 (diff)
downloadvcxsrv-2e5094b5a8e6241621cbf8c3e41b618347de7e2f.tar.gz
vcxsrv-2e5094b5a8e6241621cbf8c3e41b618347de7e2f.tar.bz2
vcxsrv-2e5094b5a8e6241621cbf8c3e41b618347de7e2f.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index 8dae7bb23..ebeaa9ce3 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -1966,7 +1966,7 @@ ir_to_mesa_visitor::visit(ir_call *ir)
void
ir_to_mesa_visitor::visit(ir_texture *ir)
{
- src_reg result_src, coord, lod_info, projector;
+ src_reg result_src, coord, lod_info, projector, dx, dy;
dst_reg result_dst, coord_dst;
ir_to_mesa_instruction *inst = NULL;
prog_opcode opcode = OPCODE_NOP;
@@ -2008,6 +2008,12 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
lod_info = this->result;
break;
case ir_txd:
+ opcode = OPCODE_TXD;
+ ir->lod_info.grad.dPdx->accept(this);
+ dx = this->result;
+ ir->lod_info.grad.dPdy->accept(this);
+ dy = this->result;
+ break;
case ir_txf:
assert(!"GLSL 1.30 features unsupported");
break;
@@ -2080,7 +2086,10 @@ ir_to_mesa_visitor::visit(ir_texture *ir)
coord_dst.writemask = WRITEMASK_XYZW;
}
- inst = emit(ir, opcode, result_dst, coord);
+ if (opcode == OPCODE_TXD)
+ inst = emit(ir, opcode, result_dst, coord, dx, dy);
+ else
+ inst = emit(ir, opcode, result_dst, coord);
if (ir->shadow_comparitor)
inst->tex_shadow = GL_TRUE;