summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-06-07 00:18:34 -0400
committerCarl Worth <cworth@cworth.org>2014-06-23 11:38:38 -0700
commit1e1bdee5ec018ab92ccef76882e74fca31115fde (patch)
treebad5c97a51a4d437b3bead68ce14bb06adf1e0bf /src/gallium/drivers/nouveau
parent9e50fc38120735603e8a8150fb450fa8dd049f36 (diff)
gk110/ir: fix emitting constbuf file index
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7a673187948b38d2d80aa48d9fc09176fa3547e8)
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
index caf42c1f78b..bc77bd8c07a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -287,10 +287,12 @@ CodeEmitterGK110::emitPredicate(const Instruction *i)
void
CodeEmitterGK110::setCAddress14(const ValueRef& src)
{
- const int32_t addr = src.get()->asSym()->reg.data.offset / 4;
+ const Storage& res = src.get()->asSym()->reg;
+ const int32_t addr = res.data.offset / 4;
code[0] |= (addr & 0x01ff) << 23;
code[1] |= (addr & 0x3e00) >> 9;
+ code[1] |= res.fileIndex << 5;
}
void
@@ -413,7 +415,6 @@ CodeEmitterGK110::emitForm_21(const Instruction *i, uint32_t opc2,
case FILE_MEMORY_CONST:
code[1] &= (s == 2) ? ~(0x4 << 28) : ~(0x8 << 28);
setCAddress14(i->src(s));
- code[1] |= i->getSrc(s)->reg.fileIndex << 5;
break;
case FILE_IMMEDIATE:
setShortImmediate(i, s);