summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-01-08 16:26:23 +0100
committerChristoph Bumiller <[email protected]>2012-01-10 00:39:41 +0100
commite4210a42bcfdb19336faa2ad4b807818c71a2982 (patch)
tree001a926302ba8f4d4309b2af9c8ba23e84331702 /src
parent7fd802b96cd916e5cadf7eda7329105169dd29bb (diff)
nvc0/ir: TXF array index already is an integer
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
index e4d32d0a678..5f906e4ed15 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
@@ -322,10 +322,13 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
Value *ticRel = i->getIndirectR();
Value *tscRel = i->getIndirectS();
- if (arrayIndex)
- bld.mkCvt(OP_CVT, TYPE_U16, src, TYPE_F32, arrayIndex);
- else
+ if (arrayIndex) {
+ int sat = (i->op == OP_TXF) ? 1 : 0;
+ DataType sTy = (i->op == OP_TXF) ? TYPE_U32 : TYPE_F32;
+ bld.mkCvt(OP_CVT, TYPE_U16, src, sTy, arrayIndex)->saturate = sat;
+ } else {
bld.loadImm(src, 0);
+ }
if (ticRel) {
i->setSrc(i->tex.rIndirectSrc, NULL);