r600/sfn: legalize image access on Cayman

This,  seems to avoid hardware resets with the
  ARB_shader_image_load_store-invalid
piglit.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10608>
This commit is contained in:
Gert Wollny
2021-05-09 19:14:16 +02:00
parent 27f5157777
commit ed595c1785

View File

@@ -863,6 +863,12 @@ int r600_shader_from_nir(struct r600_context *rctx,
r600::sort_uniforms(sel->nir);
/* Cayman seems very crashy about accessing images that don't exists or are
* accessed out of range, this lowering seems to help (but it can also be
* another problem */
if (sel->nir->info.num_images > 0 && rctx->b.chip_class == CAYMAN)
NIR_PASS_V(sel->nir, r600_legalize_image_load_store);
NIR_PASS_V(sel->nir, nir_lower_vars_to_ssa);
NIR_PASS_V(sel->nir, nir_lower_regs_to_ssa);
nir_lower_idiv_options idiv_options = {