Mesa (master): i965: Shut up a compiler warning about uninitialized var.

Eric Anholt anholt at kemper.freedesktop.org
Fri Feb 13 00:33:52 UTC 2015


Module: Mesa
Branch: master
Commit: 6489cb1ae6f3cb999b1a9c60d941ef4c388febd1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6489cb1ae6f3cb999b1a9c60d941ef4c388febd1

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Feb 11 14:50:35 2015 -0800

i965: Shut up a compiler warning about uninitialized var.

We always pass this argument, even if it won't be used by the particular
texture op.

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/mesa/drivers/dri/i965/brw_fs_nir.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index da81b61..3014e3e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1494,7 +1494,7 @@ fs_visitor::nir_emit_texture(nir_tex_instr *instr)
    bool is_cube_array = instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE &&
                         instr->is_array;
 
-   int lod_components, offset_components = 0;
+   int lod_components = 0, offset_components = 0;
 
    fs_reg coordinate, shadow_comparitor, lod, lod2, sample_index, mcs, offset;
 




More information about the mesa-commit mailing list