mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
intel/blorp: Initialize texture_data[0]
Avoids warning with GCC 10:
../src/intel/blorp/blorp_blit.c: In function 'blorp_nir_combine_samples':
../src/intel/blorp/blorp_blit.c:702:25: error: 'texture_data[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
702 | texture_data[0] = nir_fmul(b, texture_data[0],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
703 | nir_imm_float(b, 1.0 / tex_samples));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833>
This commit is contained in:
parent
8ad26e6715
commit
efcdc7f7d8
1 changed files with 1 additions and 0 deletions
|
|
@ -635,6 +635,7 @@ blorp_nir_combine_samples(nir_builder *b, struct brw_blorp_blit_vars *v,
|
|||
* operations and skip the final division.
|
||||
*/
|
||||
nir_ssa_def *texture_data[5];
|
||||
texture_data[0] = NULL; /* Avoid maybe-uninitialized warning with GCC 10 */
|
||||
unsigned stack_depth = 0;
|
||||
for (unsigned i = 0; i < tex_samples; ++i) {
|
||||
assert(stack_depth == util_bitcount(i)); /* Loop invariant */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue