mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 22:10:38 +02:00
nir/recompute_io_bases: fix for per primitive IO
It does not handle per primitive output and count per primitive input. Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35931>
This commit is contained in:
parent
35e3f4ee92
commit
25897f0692
1 changed files with 2 additions and 1 deletions
|
|
@ -50,6 +50,7 @@ nir_get_io_intrinsic(nir_instr *instr, nir_variable_mode modes,
|
|||
case nir_intrinsic_store_output:
|
||||
case nir_intrinsic_store_per_vertex_output:
|
||||
case nir_intrinsic_store_per_view_output:
|
||||
case nir_intrinsic_store_per_primitive_output:
|
||||
*out_mode = nir_var_shader_out;
|
||||
return modes & nir_var_shader_out ? intr : NULL;
|
||||
default:
|
||||
|
|
@ -149,7 +150,7 @@ nir_recompute_io_bases(nir_shader *nir, nir_variable_mode modes)
|
|||
nir_progress(changed, impl, nir_metadata_control_flow);
|
||||
|
||||
if (modes & nir_var_shader_in)
|
||||
nir->num_inputs = BITSET_COUNT(inputs);
|
||||
nir->num_inputs = BITSET_COUNT(inputs) + BITSET_COUNT(per_prim_inputs);
|
||||
if (modes & nir_var_shader_out)
|
||||
nir->num_outputs = BITSET_COUNT(outputs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue