mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-24 20:20:31 +01:00
nir/lower_viewport: Check variable mode first
The location is unused for shader_temp and function_temp variables, and due to the way we nir_lower_io_to_temproraries demotes shader_out variables to shader_temp variables, it happened to equal VARYING_SLOT_POS for the gl_Position temporary, which made this pass fail with the offline compiler due to this coming before vars_to_ssa. Reviewed-by: Qiang Yu <yuq825@gmail.com>
This commit is contained in:
parent
6e5e4bf050
commit
4423552ff0
1 changed files with 2 additions and 1 deletions
|
|
@ -56,7 +56,8 @@ nir_lower_viewport_transform(nir_shader *shader)
|
|||
continue;
|
||||
|
||||
nir_variable *var = nir_intrinsic_get_var(intr, 0);
|
||||
if (var->data.location != VARYING_SLOT_POS)
|
||||
if (var->data.mode != nir_var_shader_out ||
|
||||
var->data.location != VARYING_SLOT_POS)
|
||||
continue;
|
||||
|
||||
nir_builder b;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue