summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/codegen
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-02-07 17:42:58 -0500
committerIlia Mirkin <[email protected]>2014-02-25 14:42:34 -0500
commit0e71c65db0df86401f2caf26209ff73e3715443a (patch)
tree4eeb585705a0644a695b558660c545dbd1b8b4b1 /src/gallium/drivers/nouveau/codegen
parent5a3dc449a9340efd461725cb8c5f25eac716e1ce (diff)
nv50: enable cube map array texture support
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index 984a8ca17b3..0908447e056 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -664,7 +664,7 @@ NV50LoweringPreSSA::handleTEX(TexInstruction *i)
bld.mkOp2(OP_MIN, TYPE_U32, src, src, bld.loadImm(NULL, 511));
i->setSrc(arg - 1, src);
}
- if (i->tex.target.isCube()) {
+ if (i->tex.target.isCube() && i->srcCount() > 4) {
std::vector<Value *> acube, a2d;
int c;
@@ -681,9 +681,10 @@ NV50LoweringPreSSA::handleTEX(TexInstruction *i)
for (c = 0; c < 3; ++c)
i->setSrc(c, a2d[c]);
- i->setSrc(c, NULL);
for (; i->srcExists(c + 1); ++c)
i->setSrc(c, i->getSrc(c + 1));
+ i->setSrc(c, NULL);
+ assert(c <= 4);
i->tex.target = i->tex.target.isShadow() ?
TEX_TARGET_2D_ARRAY_SHADOW : TEX_TARGET_2D_ARRAY;