summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-05-09 23:13:38 -0400
committerIan Romanick <ian.d.romanick@intel.com>2014-05-13 10:08:01 -0700
commit7a81788c67865ad44b6c0551d78e6d3131ab860e (patch)
tree9ce115b08abd3e548ee60c194c6e03bbace3456b /src/gallium/drivers/nouveau/codegen
parent13bb2bc84b17a1d157eaee62c5e2418636a94710 (diff)
nv50: fix setting of texture ms info to be per-stage
Different textures may be bound to each slot for each stage. So we need to be able to upload ms parameters for each one without stages overwriting each other. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 863573b9cbeb26722fe7bdfbcc4ca6bffdc7dbf6)
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp4
1 files changed, 4 insertions, 0 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 eafc0a73bc6..63db1d7554c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -591,6 +591,10 @@ void NV50LoweringPreSSA::loadTexMsInfo(uint32_t off, Value **ms,
Value *tmp = new_LValue(func, FILE_GPR);
uint8_t b = prog->driver->io.resInfoCBSlot;
off += prog->driver->io.suInfoBase;
+ if (prog->getType() > Program::TYPE_VERTEX)
+ off += 16 * 2 * 4;
+ if (prog->getType() > Program::TYPE_GEOMETRY)
+ off += 16 * 2 * 4;
*ms_x = bld.mkLoadv(TYPE_U32, bld.mkSymbol(
FILE_MEMORY_CONST, b, TYPE_U32, off + 0), NULL);
*ms_y = bld.mkLoadv(TYPE_U32, bld.mkSymbol(