vc4/nir_lower_blend: update write mask when we update num components
As explained at the header of the lowering: "Once this pass is done, the color write will either have one component (for single sample) with packed argb8888, or 4 components with the per-sample argb8888 result." So in several cases the lowering was updating the number of components, so we need to update the writemask too. Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14708>
This commit is contained in:
committed by
Marge Bot
parent
67220077ed
commit
4ab6631949
@@ -562,7 +562,11 @@ vc4_nir_lower_blend_instr(struct vc4_compile *c, nir_builder *b,
|
||||
|
||||
nir_instr_rewrite_src(&intr->instr, &intr->src[0],
|
||||
nir_src_for_ssa(blend_output));
|
||||
intr->num_components = blend_output->num_components;
|
||||
if (intr->num_components != blend_output->num_components) {
|
||||
unsigned component_mask = BITFIELD_MASK(blend_output->num_components);
|
||||
nir_intrinsic_set_write_mask(intr, component_mask);
|
||||
intr->num_components = blend_output->num_components;
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
||||
Reference in New Issue
Block a user