From: Kenneth Graunke Date: Fri, 24 Jun 2016 22:37:35 +0000 (-0700) Subject: glsl: Ignore ir_texture in lower_const_arrays_to_uniforms. X-Git-Tag: upstream/17.1.0~8466 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a36a73a7b8a058c037cb0307b57ac97292953c58;p=platform%2Fupstream%2Fmesa.git glsl: Ignore ir_texture in lower_const_arrays_to_uniforms. The only part of an ir_texture which can be an array is the offsets array in textureGatherOffsets() calls. We don't want to lower those, because they're required to remain constants. Fixes textureGatherOffsets with Gallium drivers such as llvmpipe, which commit ef78df8d3b0cf540e5f08c8c2f6caa338b64a6c7 regressed. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke Reviewed-by: Ilia Mirkin --- diff --git a/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp b/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp index 9948150..665a9ad 100644 --- a/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp +++ b/src/compiler/glsl/lower_const_arrays_to_uniforms.cpp @@ -57,6 +57,7 @@ public: return progress; } + ir_visitor_status visit_enter(ir_texture *); void handle_rvalue(ir_rvalue **rvalue); private: @@ -64,6 +65,12 @@ private: bool progress; }; +ir_visitor_status +lower_const_array_visitor::visit_enter(ir_texture *) +{ + return visit_continue_with_parent; +} + void lower_const_array_visitor::handle_rvalue(ir_rvalue **rvalue) {