mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
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:
parent
0ec2183dfc
commit
4dcfb681bc
1 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue