mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
microsoft/compiler: When sorting variables, put unused variables last
These variables will only be used for xfb Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28535>
This commit is contained in:
parent
c37e9c1e29
commit
b6b5514a5b
1 changed files with 5 additions and 1 deletions
|
|
@ -1595,8 +1595,9 @@ dxil_sort_ps_outputs(nir_shader* s)
|
|||
enum dxil_sysvalue_type {
|
||||
DXIL_NO_SYSVALUE = 0,
|
||||
DXIL_USED_SYSVALUE,
|
||||
DXIL_UNUSED_NO_SYSVALUE,
|
||||
DXIL_SYSVALUE,
|
||||
DXIL_GENERATED_SYSVALUE
|
||||
DXIL_GENERATED_SYSVALUE,
|
||||
};
|
||||
|
||||
static enum dxil_sysvalue_type
|
||||
|
|
@ -1619,6 +1620,9 @@ nir_var_to_dxil_sysvalue_type(nir_variable *var, uint64_t other_stage_mask)
|
|||
return DXIL_SYSVALUE;
|
||||
return DXIL_USED_SYSVALUE;
|
||||
default:
|
||||
if (var->data.location < VARYING_SLOT_PATCH0 &&
|
||||
!((1ull << var->data.location) & other_stage_mask))
|
||||
return DXIL_UNUSED_NO_SYSVALUE;
|
||||
return DXIL_NO_SYSVALUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue