mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
nir/nir_opt_move: allow to move uniform loads
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15056>
This commit is contained in:
parent
f692bda484
commit
0a04468704
2 changed files with 9 additions and 6 deletions
|
|
@ -5256,12 +5256,13 @@ bool nir_opt_large_constants(nir_shader *shader,
|
|||
bool nir_opt_loop_unroll(nir_shader *shader);
|
||||
|
||||
typedef enum {
|
||||
nir_move_const_undef = (1 << 0),
|
||||
nir_move_load_ubo = (1 << 1),
|
||||
nir_move_load_input = (1 << 2),
|
||||
nir_move_comparisons = (1 << 3),
|
||||
nir_move_copies = (1 << 4),
|
||||
nir_move_load_ssbo = (1 << 5),
|
||||
nir_move_const_undef = (1 << 0),
|
||||
nir_move_load_ubo = (1 << 1),
|
||||
nir_move_load_input = (1 << 2),
|
||||
nir_move_comparisons = (1 << 3),
|
||||
nir_move_copies = (1 << 4),
|
||||
nir_move_load_ssbo = (1 << 5),
|
||||
nir_move_load_uniform = (1 << 6),
|
||||
} nir_move_options;
|
||||
|
||||
bool nir_can_move_instr(nir_instr *instr, nir_move_options options);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ nir_can_move_instr(nir_instr *instr, nir_move_options options)
|
|||
case nir_intrinsic_load_interpolated_input:
|
||||
case nir_intrinsic_load_per_vertex_input:
|
||||
return options & nir_move_load_input;
|
||||
case nir_intrinsic_load_uniform:
|
||||
return options & nir_move_load_uniform;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue