OSDN Git Service

anv: Stop bounds-checking pushed UBOs
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 8 Nov 2019 15:33:07 +0000 (09:33 -0600)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 20 Nov 2019 00:54:04 +0000 (16:54 -0800)
commitb7ab6e9470d888fa541cbbae173cae4e5ade258f
tree0cdd0d3dd939404cd2335a4d2214531eb308c460
parentaddf63dbd796fc08e06ac1323071a8f8f48ac7b9
anv: Stop bounds-checking pushed UBOs

The bounds checking is actually less safe than just pushing the data.
If the bounds checking actually ever kicks in and it's not on the last
UBO push range, then the shrinking will cause all subsequent ranges to
be pushed to the wrong place in the GRF.  One of the behaviors we
definitely don't want is for OOB UBO access to result in completely
unrelated UBOs returning garbage values.  It's safer to just push the
UBOs as-requested.  If we're really concerned about robustness, we can
emit shader code to do bounds checking which should be stupid cheap (a
CMP followed by SEL).

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/genX_cmd_buffer.c