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@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
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;
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);
}