d3d12: Fix var splitting pass writemasks

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
This commit is contained in:
Jesse Natalie
2024-04-02 15:52:43 -07:00
committed by Marge Bot
parent 4a01ac1aa7
commit 5c3e96f257
+2 -2
View File
@@ -891,10 +891,10 @@ split_varying_accesses(nir_builder *b, nir_intrinsic_instr *intr,
unsigned orig_write_mask = nir_intrinsic_write_mask(intr);
nir_def *sub_value = nir_channels(b, intr->src[1].ssa, mask_num_channels << first_channel);
first_channel += var_state->subvars[subvar].num_components;
unsigned new_write_mask = (orig_write_mask >> first_channel) & mask_num_channels;
nir_build_store_deref(b, &new_path->def, sub_value, new_write_mask, nir_intrinsic_access(intr));
first_channel += var_state->subvars[subvar].num_components;
} else {
/* The load path only handles splitting dvec3/dvec4 */
assert(subvar == 0 || subvar == 1);