mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
compiler/nir: check whether var is an input in lower_fragcoord_wtrans
Otherwise the lowering pass might try to lower any other load from a deref if its data.location value happens to be zero. Fixes:418c4c0d7dcompiler/nir: extend lower_fragcoord_wtrans to support VARYING_SLOT_POS Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10577> (cherry picked from commite418710f8b)
This commit is contained in:
parent
6fdd418949
commit
df7c4454a9
2 changed files with 4 additions and 1 deletions
|
|
@ -148,7 +148,7 @@
|
|||
"description": "compiler/nir: check whether var is an input in lower_fragcoord_wtrans",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "418c4c0d7d48a42f475df1ffb93b3a33763e7a4a"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ lower_fragcoord_wtrans_filter(const nir_instr *instr, UNUSED const void *_option
|
|||
return false;
|
||||
|
||||
nir_variable *var = nir_intrinsic_get_var(intr, 0);
|
||||
if (var->data.mode != nir_var_shader_in)
|
||||
return false;
|
||||
|
||||
return var->data.location == VARYING_SLOT_POS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue