r600/sfn: legalize image acccess on Cayman
If we access non-existing images Cayman hardware may lock up and trigger a reset that is not always successful. Therefore, make sure the images access is legal. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20141>
This commit is contained in:
@@ -774,6 +774,9 @@ r600_finalize_nir(pipe_screen *screen, void *shader)
|
||||
NIR_PASS_V(nir, r600_lower_shared_io);
|
||||
NIR_PASS_V(nir, r600_nir_lower_atomics);
|
||||
|
||||
if (rs->b.gfx_level == CAYMAN)
|
||||
NIR_PASS_V(nir, r600_legalize_image_load_store);
|
||||
|
||||
while (optimize_once(nir))
|
||||
;
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ r600_legalize_image_load_store_impl(nir_builder *b,
|
||||
num_components = 1;
|
||||
break;
|
||||
case GLSL_SAMPLER_DIM_2D:
|
||||
case GLSL_SAMPLER_DIM_MS:
|
||||
case GLSL_SAMPLER_DIM_RECT:
|
||||
case GLSL_SAMPLER_DIM_CUBE:
|
||||
num_components = 2;
|
||||
|
||||
Reference in New Issue
Block a user