[Mesa-dev] [PATCH] st_glsl_to_tgsi: init index to 0 before get_deref_offsets()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Jun 13 08:03:52 UTC 2017
Fixes: 8ec4975cd83 ("st_glsl_to_tgsi: don't try and pass 32-bit values to get_deref_offsets")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101401
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index e9c4fe5286c..24d417d6709 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3833,7 +3833,7 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call *ir)
st_src_reg reladdr;
st_src_reg image(PROGRAM_IMAGE, 0, GLSL_TYPE_UINT);
- uint16_t index;
+ uint16_t index = 0;
get_deref_offsets(img, &sampler_array_size, &sampler_base,
&index, &reladdr, !imgvar->contains_bindless());
@@ -4457,7 +4457,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
st_src_reg sampler(PROGRAM_SAMPLER, 0, GLSL_TYPE_UINT);
- uint16_t index;
+ uint16_t index = 0;
get_deref_offsets(ir->sampler, &sampler_array_size, &sampler_base,
&index, &reladdr, !var->contains_bindless());
--
2.13.1
More information about the mesa-dev
mailing list