mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 19:40:26 +01:00
nir: fix sorting before assigning varying driver locations
We need to make sure we also properly sort varyings sharing a single slot otherwise we can end up assigning earlier components to the next slot if we have already processed later components. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6392 Fixes:1e93b0caa1("mesa/st: add support for NIR as possible driver IR") Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16208> (cherry picked from commit180398f785)
This commit is contained in:
parent
9febc11af9
commit
a9d2d3b0b7
2 changed files with 4 additions and 2 deletions
|
|
@ -256,7 +256,7 @@
|
|||
"description": "nir: fix sorting before assigning varying driver locations",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "1e93b0caa10d9d9090eaa3bd517a5144930f28a4"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1433,7 +1433,9 @@ insert_sorted(struct exec_list *var_list, nir_variable *new_var)
|
|||
*/
|
||||
if (new_var->data.per_primitive < var->data.per_primitive ||
|
||||
(new_var->data.per_primitive == var->data.per_primitive &&
|
||||
var->data.location > new_var->data.location)) {
|
||||
(var->data.location > new_var->data.location ||
|
||||
(var->data.location == new_var->data.location &&
|
||||
var->data.location_frac > new_var->data.location_frac)))) {
|
||||
exec_node_insert_node_before(&var->node, &new_var->node);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue