nouveau: codegen: LOAD: Take src swizzle into account
The llvm TGSI backend uses pointers in registers and does things like: LOAD TEMP[0].y, MEMORY[0], TEMP[0] Expecting the data at address TEMP[0].x to get loaded to TEMP[0].y. But this will cause the data at TEMP[0].x + 4 to be loaded instead. This commit adds support for a swizzle suffix for the 1st source operand, which allows using: LOAD TEMP[0].y, MEMORY[0].xxxx, TEMP[0] And actually getting the desired behavior 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>
This commit is contained in:
@@ -2288,6 +2288,9 @@ Resource Access Opcodes
|
||||
texture arrays and 2D textures. address.w is always
|
||||
ignored.
|
||||
|
||||
A swizzle suffix may be added to the resource argument
|
||||
this will cause the resource data to be swizzled accordingly.
|
||||
|
||||
.. opcode:: STORE - Write data to a shader resource
|
||||
|
||||
Syntax: ``STORE resource, address, src``
|
||||
|
Reference in New Issue
Block a user