broadcom/compiler: Use nir_lower_robust_access
The common code version, instead of the vendor version. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23895>
This commit is contained in:
committed by
Marge Bot
parent
f0fb8d05e3
commit
596176a720
@@ -1581,8 +1581,9 @@ v3d_attempt_compile(struct v3d_compile *c)
|
||||
NIR_PASS(_, c->s, nir_lower_idiv, &idiv_options);
|
||||
NIR_PASS(_, c->s, nir_lower_alu);
|
||||
|
||||
if (c->key->robust_uniform_access || c->key->robust_storage_access) {
|
||||
/* v3d_nir_lower_robust_buffer_access assumes constant buffer
|
||||
if (c->key->robust_uniform_access || c->key->robust_storage_access ||
|
||||
c->key->robust_image_access) {
|
||||
/* nir_lower_robust_access assumes constant buffer
|
||||
* indices on ubo/ssbo intrinsics so run copy propagation and
|
||||
* constant folding passes before we run the lowering to warrant
|
||||
* this. We also want to run the lowering before v3d_optimize to
|
||||
@@ -1590,11 +1591,16 @@ v3d_attempt_compile(struct v3d_compile *c)
|
||||
*/
|
||||
NIR_PASS(_, c->s, nir_copy_prop);
|
||||
NIR_PASS(_, c->s, nir_opt_constant_folding);
|
||||
NIR_PASS(_, c->s, v3d_nir_lower_robust_buffer_access, c);
|
||||
}
|
||||
|
||||
if (c->key->robust_image_access)
|
||||
NIR_PASS(_, c->s, v3d_nir_lower_robust_image_access, c);
|
||||
nir_lower_robust_access_options opts = {
|
||||
.lower_image = c->key->robust_image_access,
|
||||
.lower_ssbo = c->key->robust_storage_access,
|
||||
.lower_ubo = c->key->robust_uniform_access,
|
||||
.skip_ubo_0 = c->key->environment == V3D_ENVIRONMENT_VULKAN,
|
||||
};
|
||||
|
||||
NIR_PASS(_, c->s, nir_lower_robust_access, &opts);
|
||||
}
|
||||
|
||||
NIR_PASS(_, c->s, nir_lower_wrmasks, should_split_wrmask, c->s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user