Mesa (master): nouveau: codegen: LOAD: Always use component 0 when getting the address
Hans de Goede
jwrdegoede at kemper.freedesktop.org
Wed Apr 27 14:42:49 UTC 2016
Module: Mesa
Branch: master
Commit: 1958397a587919e4a3ec83441c3717813ba2f18b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1958397a587919e4a3ec83441c3717813ba2f18b
Author: Hans de Goede <hdegoede at redhat.com>
Date: Thu Apr 21 13:31:01 2016 +0200
nouveau: codegen: LOAD: Always use component 0 when getting the address
LOAD loads upto 4 components from the specified resource starting at
the passed in x value of the 2nd source operand, the y, z and w
components of the address should not be used.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 1376a1a..cdf9d94 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -2383,7 +2383,8 @@ Converter::handleLOAD(Value *dst0[4])
if (!dst0[c])
continue;
- Value *off = fetchSrc(1, c);
+ // yzw are ignored for buffers
+ Value *off = fetchSrc(1, 0);
Symbol *sym;
if (tgsi.getSrc(1).getFile() == TGSI_FILE_IMMEDIATE) {
off = NULL;
@@ -2522,6 +2523,7 @@ Converter::handleSTORE()
sym = makeSym(tgsi.getDst(0).getFile(), r, -1, c,
tgsi.getSrc(0).getValueU32(0, info) + 4 * c);
} else {
+ // yzw are ignored for buffers
off = fetchSrc(0, 0);
sym = makeSym(tgsi.getDst(0).getFile(), r, -1, c, 4 * c);
}
More information about the mesa-commit
mailing list