Commit 7a7f182d authored by Tapani Pälli's avatar Tapani Pälli Committed by Kristian H. Kristensen
Browse files

nir: use braces around subobject in initializer



Used same syntax as elsewhere with Mesa sources, verified result
against MSVC with godbolt.org.

fixes following warning with clang:
   warning: suggest braces around initialization of subobject

v2: empty braces -> braces around subobject (Caio, Kristian)
Signed-off-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho's avatarCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kristian H. Kristensen's avatarKristian H. Kristensen <hoegsberg@google.com>
parent a7c70bb2
......@@ -476,7 +476,7 @@ gather_varying_component_info(nir_shader *consumer,
unsigned *varying_comp_info_size,
bool default_to_smooth_interp)
{
unsigned store_varying_info_idx[MAX_VARYINGS_INCL_PATCH][4] = {0};
unsigned store_varying_info_idx[MAX_VARYINGS_INCL_PATCH][4] = {{0}};
unsigned num_of_comps_to_pack = 0;
/* Count the number of varying that can be packed and create a mapping
......@@ -726,7 +726,7 @@ nir_compact_varyings(nir_shader *producer, nir_shader *consumer,
assert(producer->info.stage != MESA_SHADER_FRAGMENT);
assert(consumer->info.stage != MESA_SHADER_VERTEX);
struct assigned_comps assigned_comps[MAX_VARYINGS_INCL_PATCH] = {0};
struct assigned_comps assigned_comps[MAX_VARYINGS_INCL_PATCH] = {{0}};
get_unmoveable_components_masks(&producer->outputs, assigned_comps,
producer->info.stage,
......
......@@ -197,10 +197,10 @@ nir_lower_io_to_vector_impl(nir_function_impl *impl, nir_variable_mode modes)
nir_metadata_require(impl, nir_metadata_dominance);
nir_shader *shader = impl->function->shader;
nir_variable *old_inputs[MAX_VARYINGS_INCL_PATCH][4] = {0};
nir_variable *new_inputs[MAX_VARYINGS_INCL_PATCH][4] = {0};
nir_variable *old_outputs[MAX_VARYINGS_INCL_PATCH][4] = {0};
nir_variable *new_outputs[MAX_VARYINGS_INCL_PATCH][4] = {0};
nir_variable *old_inputs[MAX_VARYINGS_INCL_PATCH][4] = {{0}};
nir_variable *new_inputs[MAX_VARYINGS_INCL_PATCH][4] = {{0}};
nir_variable *old_outputs[MAX_VARYINGS_INCL_PATCH][4] = {{0}};
nir_variable *new_outputs[MAX_VARYINGS_INCL_PATCH][4] = {{0}};
if (modes & nir_var_shader_in) {
/* Vertex shaders support overlapping inputs. We don't do those */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment