ttn: Fix out-of-bounds accesses since the always-2D-constants change.
authorEric Anholt <eric@anholt.net>
Thu, 7 Sep 2017 17:17:02 +0000 (10:17 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 18 Sep 2017 23:14:27 +0000 (16:14 -0700)
commit6e3d7a59162a48cd55c7405295061301839c8135
tree64098cc010594eedf9f5979e22e5e02e13081ef2
parent9f763c1f9b7654912e3fcfac814a55eed68881fe
ttn: Fix out-of-bounds accesses since the always-2D-constants change.

Only one of the three checks for dim was updated, so we would try to set a
UBO buffer index source value on a nir_load_uniform, and wouldn't actually
declare non-UBO uniforms.

Fixes: 37dd8e8dee1d ("gallium: all drivers should accept two-dimensional constant buffer indexing")
Tested-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/nir/tgsi_to_nir.c