mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-05 03:50:34 +02:00
nir: return progress from nir_group_loads, nir_inline_uniforms
so that NIR_PASS is usable Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
This commit is contained in:
parent
0cbcb72869
commit
fa2e7c3dfd
3 changed files with 9 additions and 5 deletions
|
|
@ -4817,7 +4817,7 @@ typedef enum {
|
|||
nir_group_same_resource_only,
|
||||
} nir_load_grouping;
|
||||
|
||||
void nir_group_loads(nir_shader *shader, nir_load_grouping grouping,
|
||||
bool nir_group_loads(nir_shader *shader, nir_load_grouping grouping,
|
||||
unsigned max_distance);
|
||||
|
||||
bool nir_shrink_vec_array_vars(nir_shader *shader, nir_variable_mode modes);
|
||||
|
|
@ -4840,7 +4840,7 @@ bool nir_link_shader_functions(nir_shader *shader,
|
|||
bool nir_lower_calls_to_builtins(nir_shader *s);
|
||||
|
||||
void nir_find_inlinable_uniforms(nir_shader *shader);
|
||||
void nir_inline_uniforms(nir_shader *shader, unsigned num_uniforms,
|
||||
bool nir_inline_uniforms(nir_shader *shader, unsigned num_uniforms,
|
||||
const uint32_t *uniform_values,
|
||||
const uint16_t *uniform_dw_offsets);
|
||||
bool nir_collect_src_uniforms(const nir_src *src, int component,
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ process_block(nir_block *block, nir_load_grouping grouping,
|
|||
/* max_distance is the maximum distance between the first and last instruction
|
||||
* in a group.
|
||||
*/
|
||||
void
|
||||
bool
|
||||
nir_group_loads(nir_shader *shader, nir_load_grouping grouping,
|
||||
unsigned max_distance)
|
||||
{
|
||||
|
|
@ -479,4 +479,6 @@ nir_group_loads(nir_shader *shader, nir_load_grouping grouping,
|
|||
nir_progress(true, impl,
|
||||
nir_metadata_control_flow | nir_metadata_loop_analysis);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,13 +380,13 @@ nir_find_inlinable_uniforms(nir_shader *shader)
|
|||
shader->info.num_inlinable_uniforms = num_offsets[0];
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
nir_inline_uniforms(nir_shader *shader, unsigned num_uniforms,
|
||||
const uint32_t *uniform_values,
|
||||
const uint16_t *uniform_dw_offsets)
|
||||
{
|
||||
if (!num_uniforms)
|
||||
return;
|
||||
return false;
|
||||
|
||||
nir_foreach_function_impl(impl, shader) {
|
||||
nir_builder b = nir_builder_create(impl);
|
||||
|
|
@ -465,4 +465,6 @@ nir_inline_uniforms(nir_shader *shader, unsigned num_uniforms,
|
|||
nir_progress(true, impl, nir_metadata_control_flow);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue