mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
nir: Fix fddy swizzles in nir_lower_wpos_ytransform().
The original value might have been swizzled. That's taken care of in the fmul source - we don't want to reswizzle it again. Fixes validation failures in glsl-derivs-varyings on a branch of mine which uses this pass in i965. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
7fe9a19302
commit
287f099db1
1 changed files with 3 additions and 0 deletions
|
|
@ -252,6 +252,9 @@ lower_fddy(lower_wpos_ytransform_state *state, nir_alu_instr *fddy)
|
|||
nir_instr_rewrite_src(&fddy->instr,
|
||||
&fddy->src[0].src,
|
||||
nir_src_for_ssa(pt));
|
||||
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
fddy->src[0].swizzle[i] = MIN2(i, pt->num_components - 1);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue