diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2015-05-22 19:02:41 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2015-05-22 19:08:14 -0400 |
commit | 0bab3962f5f313ea829c95920c02f32afb23715d (patch) | |
tree | 35a89ca56b563ec2feb5cdced370f5d01d9b4fdd /src | |
parent | d1eea18a595a468dbc2267a8d14197a3b1a5a4b6 (diff) | |
download | external_mesa3d-0bab3962f5f313ea829c95920c02f32afb23715d.zip external_mesa3d-0bab3962f5f313ea829c95920c02f32afb23715d.tar.gz external_mesa3d-0bab3962f5f313ea829c95920c02f32afb23715d.tar.bz2 |
nv50/ir: guess that the constant offset is the starting slot of array
When we get something like IN[ADDR[0].x+5], we will now guess that we
should look at IN[5] for the "base" information.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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 2dcadee..ecd115f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -1356,18 +1356,20 @@ Converter::srcToSym(tgsi::Instruction::SrcRegister src, int c) { const int swz = src.getSwizzle(c); + /* TODO: Use Array ID when it's available for the index */ return makeSym(src.getFile(), src.is2D() ? src.getIndex(1) : 0, - src.isIndirect(0) ? -1 : src.getIndex(0), swz, + src.getIndex(0), swz, src.getIndex(0) * 16 + swz * 4); } Symbol * Converter::dstToSym(tgsi::Instruction::DstRegister dst, int c) { + /* TODO: Use Array ID when it's available for the index */ return makeSym(dst.getFile(), dst.is2D() ? dst.getIndex(1) : 0, - dst.isIndirect(0) ? -1 : dst.getIndex(0), c, + dst.getIndex(0), c, dst.getIndex(0) * 16 + c * 4); } |