r600: implement EXT_shader_image_load_store
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Evergreen and cayman have the hardware support for this extension.
This is described by the manual as EXPORT_RAT_INST_INC_UINT_RTN
and EXPORT_RAT_INST_DEC_UINT_RTN.

This change was tested and passes the piglit tests (17/17)
on cypress, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34501>
This commit is contained in:
Patrick Lerda 2025-04-11 14:53:07 +02:00 committed by Marge Bot
parent 1d4ebe79b5
commit 769510f1cc
3 changed files with 8 additions and 2 deletions

View file

@ -440,7 +440,8 @@ static void r600_init_screen_caps(struct r600_screen *rscreen)
caps->shader_array_components = caps->shader_array_components =
caps->query_buffer_object = caps->query_buffer_object =
caps->image_store_formatted = caps->image_store_formatted =
caps->alpha_to_coverage_dither_control = family >= CHIP_CEDAR; caps->alpha_to_coverage_dither_control =
caps->image_atomic_inc_wrap = family >= CHIP_CEDAR;
caps->max_texture_gather_components = family >= CHIP_CEDAR ? 4 : 0; caps->max_texture_gather_components = family >= CHIP_CEDAR ? 4 : 0;
/* kernel command checker support is also required */ /* kernel command checker support is also required */
caps->draw_indirect = family >= CHIP_CEDAR; caps->draw_indirect = family >= CHIP_CEDAR;

View file

@ -457,6 +457,10 @@ get_rat_opcode(const nir_atomic_op opcode)
return RatInstr::CMPXCHG_INT_RTN; return RatInstr::CMPXCHG_INT_RTN;
case nir_atomic_op_xchg: case nir_atomic_op_xchg:
return RatInstr::XCHG_RTN; return RatInstr::XCHG_RTN;
case nir_atomic_op_inc_wrap:
return RatInstr::WRAP_INC_RTN;
case nir_atomic_op_dec_wrap:
return RatInstr::WRAP_DEC_RTN;
default: default:
unreachable("Unsupported atomic"); unreachable("Unsupported atomic");
} }

View file

@ -98,7 +98,8 @@ public:
OR_RTN, OR_RTN,
XOR_RTN, XOR_RTN,
MSKOR_RTN, MSKOR_RTN,
UINT_RTN, WRAP_INC_RTN,
WRAP_DEC_RTN,
UNSUPPORTED UNSUPPORTED
}; };