agx/lower_vbo: Handle nonzero component
Fixes dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847>
This commit is contained in:
committed by
Marge Bot
parent
0ec2183dfc
commit
4dcfb681bc
@@ -240,10 +240,11 @@ pass(struct nir_builder *b, nir_instr *instr, void *data)
|
||||
* the format swizzle forwards to trim/pad/reorder as needed.
|
||||
*/
|
||||
nir_def *channels[4] = {NULL};
|
||||
assert(nir_intrinsic_component(intr) == 0 && "unimplemented");
|
||||
|
||||
for (unsigned i = 0; i < intr->num_components; ++i)
|
||||
channels[i] = apply_swizzle_channel(b, memory, desc->swizzle[i], is_int);
|
||||
for (unsigned i = 0; i < intr->num_components; ++i) {
|
||||
unsigned c = nir_intrinsic_component(intr) + i;
|
||||
channels[i] = apply_swizzle_channel(b, memory, desc->swizzle[c], is_int);
|
||||
}
|
||||
|
||||
nir_def *logical = nir_vec(b, channels, intr->num_components);
|
||||
nir_def_rewrite_uses(&intr->def, logical);
|
||||
|
||||
Reference in New Issue
Block a user