anv: Fix UBO range detection in anv_nir_compute_push_layout
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 3 Apr 2020 17:38:32 +0000 (12:38 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Apr 2020 21:51:55 +0000 (21:51 +0000)
commit26a1adce5bd2f0e44900f21e58ea09fea9f6690f
tree6760682a40f44b43107989ed2dbb2781ca948fa4
parentb2e4157143439a211d2f8e761dc8afd750fa791d
anv: Fix UBO range detection in anv_nir_compute_push_layout

This fixes two bugs:  First, if the same block index showed up twice, we
only pick the first one.  Second, we weren't multiplying by 32.  This
didn't show up in tests because RBA testing is garbage.  Found while
looking at shaders from the UE4 Shooter demo.

Fixes: e03f9652 "anv: Bounds-check pushed UBOs when..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4578>
src/intel/vulkan/anv_nir_compute_push_layout.c