mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
r600: fix warnings for missing-braces on clang
[2624/3754] Compiling C++ object src/gallium/drivers/r600/sfn/tests/libr600_test.a.p/sfn_test_shaders.cpp.o
../src/gallium/drivers/r600/sfn/tests/sfn_test_shaders.cpp:3066:27: warning: suggest braces around initialization of subobject [-Wmissing-braces]
r600_shader_key key = {0};
^
{}
1 warning generated.
[2711/3754] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_nir_lower_64bit.cpp.o
../src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp:910:33: warning: suggest braces around initialization of subobject [-Wmissing-braces]
nir_const_value val[4] = {0};
^
{}
../src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp:1328:38: warning: suggest braces around initialization of subobject [-Wmissing-braces]
nir_ssa_scalar channels[4] = { 0 };
^
{}
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18307>
This commit is contained in:
parent
16e9d1b528
commit
ded4fc48a3
2 changed files with 3 additions and 3 deletions
|
|
@ -907,7 +907,7 @@ Lower64BitToVec2::lower(nir_instr *instr)
|
|||
case nir_instr_type_load_const: {
|
||||
auto lc = nir_instr_as_load_const(instr);
|
||||
assert(lc->def.num_components < 3);
|
||||
nir_const_value val[4] = {0};
|
||||
nir_const_value val[4] = { { 0 } };
|
||||
for (uint i = 0; i < lc->def.num_components; ++i) {
|
||||
uint64_t v = lc->value[i].u64;
|
||||
val[0].u32 = v & 0xffffffff;
|
||||
|
|
@ -1325,7 +1325,7 @@ r600_lower_64bit_intrinsic(nir_builder *b, nir_intrinsic_instr *instr)
|
|||
b->cursor = nir_before_instr(&instr->instr);
|
||||
|
||||
nir_ssa_def *src0 = instr->src[0].ssa;
|
||||
nir_ssa_scalar channels[4] = { 0 };
|
||||
nir_ssa_scalar channels[4] = { { 0 } };
|
||||
for (int i = 0; i < instr->num_components; i++)
|
||||
channels[i] = nir_get_ssa_scalar(src0, i);
|
||||
|
||||
|
|
|
|||
|
|
@ -3063,7 +3063,7 @@ Shader *TestShader::from_string(const std::string& s)
|
|||
istringstream is(s);
|
||||
string line;
|
||||
|
||||
r600_shader_key key = {0};
|
||||
r600_shader_key key = { { 0 } };
|
||||
key.ps.nr_cbufs = 1;
|
||||
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue