anv: Bounds-check pushed UBOs when robustBufferAccess = true

We also have to add nir_intrinsic_load_push_constant to the list of
intrinsics which use push constants in brw_nir_analyze_ubo_ranges
because we're moving the loop where we rewrite the intrinsics to after
we've analyzed UBO loads.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3777>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3777>
This commit is contained in:
Jason Ekstrand
2020-02-07 07:13:12 -06:00
committed by Marge Bot
parent faea84e254
commit e03f965280
5 changed files with 267 additions and 41 deletions

View File

@@ -2476,6 +2476,9 @@ struct anv_push_constants {
/** Dynamic offsets for dynamic UBOs and SSBOs */
uint32_t dynamic_offsets[MAX_DYNAMIC_BUFFERS];
/** Pad out to a multiple of 32 bytes */
uint32_t push_ubo_sizes[4];
struct {
/** Base workgroup ID
*
@@ -2489,9 +2492,6 @@ struct anv_push_constants {
* uploading the push constants for compute shaders.
*/
uint32_t subgroup_id;
/** Pad out to a multiple of 32 bytes */
uint32_t pad[4];
} cs;
};