mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
kk: Fix compilation error when viewMask is 0
Reviewed-By: Arcady Goldmints-Orlov <arcady@lunarg.com> Signed-off-by: Aitor Camacho <aitor@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39321>
This commit is contained in:
parent
b52b1a08bf
commit
1025715c6a
1 changed files with 6 additions and 0 deletions
|
|
@ -60,6 +60,12 @@ kk_nir_lower_vs_multiview(nir_shader *nir, uint32_t view_mask)
|
|||
nir_function_impl *entrypoint = nir_shader_get_entrypoint(nir);
|
||||
nir_builder b = nir_builder_at(nir_before_impl(entrypoint));
|
||||
|
||||
if (view_count == 0u) {
|
||||
return nir_shader_intrinsics_pass(nir, replace_view_id_with_value,
|
||||
nir_metadata_control_flow,
|
||||
nir_imm_int(&b, 0u));
|
||||
}
|
||||
|
||||
/* Create array and initialize */
|
||||
nir_variable *view_indices = nir_local_variable_create(
|
||||
entrypoint, glsl_array_type(glsl_uint_type(), view_count, 0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue