Possibly incorrect a6xx disassembly?
I have a case where I'm trying to do a texture sample where the t# is in one descriptor set and the s# is in another one. I am using an a6xx GPU. Here's the fragment shader:
layout (set = 0, binding = 1) uniform texture2D _texture;
layout (set = 1, binding = 0) uniform sampler _sampler;
layout (location = 0) in vec2 inUV;
layout (location = 1) in vec2 inOffset;
layout (location = 0) out vec4 outFragColor;
void main()
{
// Sample the texture by combining the sampled image and selected sampler
vec4 color = texture(sampler2D(_texture, _sampler), inUV + inOffset);
outFragColor = color;
}
Here's the resulting disassembly, as obtained from disasm_a3xx_stat in disasm_a3xx.cpp:
I'm no expert on IR3, but this looks incorrect to me? First, the t#0 is supposed to be the second parameter, and the a1.x represents the s# and should come first? Secondly, this is listed as a t#0, when the t# should be in binding 1 (so I would expect t#1 instead). Can someone take a look and verify whether this is indeed a bug or I'm just misreading it?
Much appreciated!