diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-06-13 10:03:52 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-06-13 17:36:29 +0900 |
commit | 6d8a387f78cdeedc8c404a1b4c116a19023f2e19 (patch) | |
tree | 7f4acc6eb9b621caa08912d47984b2331c945e33 | |
parent | 8dddb9788a2e9aa6b52b0eb9474d015b0262062e (diff) |
st_glsl_to_tgsi: init index to 0 before get_deref_offsets()
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@gmail.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 |
1 files 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 798831613f10..66f0814ddc96 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3776,7 +3776,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, true); @@ -4392,7 +4392,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, true); |