/tmp/build_root/m64/lib/piglit/bin/shader_runner /tmp/build_root/m64/lib/piglit/tests/spec/glsl-1.20/execution/out-parameter-indexing/fs-inout-index-two-level.shader_test -auto -fbo Probe color at (0,0) Expected: 0 255 0 255 Observed: 255 51 0 0 Test failure on line 48 ----------------------------------------------------------------- Bisected to: 76c27e47b90647df047e785d6b3ab5d0d979a1ee Author: Timothy Arceri <tarceri@itsqueeze.com> glsl: Copy function out to temp if we don't directly ref a variable Otherwise we can end up with IR that looks like this: ( (declare (temporary ) vec4 f@8) (assign (xyzw) (var_ref f@8) (var_ref f) ) (call f16 ((swiz y (var_ref f@8) ))) (assign (xyzw) (var_ref f) (var_ref f@8) ) )) When we really need: (declare (temporary ) float inout_tmp) (assign (x) (var_ref inout_tmp) (swiz y (var_ref f) )) (call f16 ((var_ref inout_tmp) )) (assign (y) (var_ref f) (swiz y (swiz xxxx (var_ref inout_tmp) ))) (declare (temporary ) void void_var) The GLSL IR function inlining code seemed to produce correct code even without this but we need the correct IR for GLSL IR -> NIR to be able to understand whats going on.
Reportedly fixed by: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/86?commit_id=c35695842b8567cdaed5ddf5a90559ac68930c7d
Should be fixed by: commit 0862929bf64222e85e8242824aecf05e494c157c Author: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Date: Thu Jan 10 18:16:59 2019 +0200 glsl: Fix copying function's out to temp if dereferenced by array Function's out variable could be an array dereferenced by an array: func(v[w[i]]); or something more complicated. Copy index in any case. Fixes: 76c27e47b906 ("glsl: Copy function out to temp if we don't directly ref a variable") Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.