mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 21:00:16 +01:00
nir/lower_blend: Pad src to a 4-component vector
nir_ssa_for_src() is not supposed to pad the src vector if dst->num_components > src->num_components. Let's pad things explicitly with nir_pad_vector(). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13060>
This commit is contained in:
parent
641bed3103
commit
637cd5ac00
1 changed files with 3 additions and 1 deletions
|
|
@ -347,7 +347,9 @@ nir_lower_blend_instr(nir_builder *b, nir_instr *instr, void *data)
|
|||
b->cursor = nir_before_instr(instr);
|
||||
|
||||
/* Grab the input color */
|
||||
nir_ssa_def *src = nir_ssa_for_src(b, intr->src[1], 4);
|
||||
unsigned src_num_comps = nir_src_num_components(intr->src[1]);
|
||||
nir_ssa_def *src =
|
||||
nir_pad_vector(b, nir_ssa_for_src(b, intr->src[1], src_num_comps), 4);
|
||||
|
||||
/* Grab the previous fragment color */
|
||||
var->data.fb_fetch_output = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue