From fc0a2e5d017dcb9e7f236d69745dff89e116b92e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 12 Jul 2019 16:38:44 +0200 Subject: glsl: add EXT_shader_image_load_store new image functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This extension has 2 functions that are missing from the ARB versions: - imageAtomicIncWrap - imageAtomicDecWrap Reviewed-by: Marek Olšák --- src/compiler/glsl/builtin_functions.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/compiler/glsl/builtin_functions.cpp') diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index 095eb84055a..95d45033a01 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -4423,6 +4423,18 @@ builtin_builder::add_image_functions(bool glsl) flags | IMAGE_FUNCTION_SUPPORTS_FLOAT_DATA_TYPE | IMAGE_FUNCTION_MS_ONLY, ir_intrinsic_image_samples); + + /* EXT_shader_image_load_store */ + add_image_function(glsl ? "imageAtomicIncWrap" : "__intrinsic_image_atomic_inc_wrap", + "__intrinsic_image_atomic_inc_wrap", + &builtin_builder::_image_prototype, 1, + (atom_flags | IMAGE_FUNCTION_EXT_ONLY), + ir_intrinsic_image_atomic_inc_wrap); + add_image_function(glsl ? "imageAtomicDecWrap" : "__intrinsic_image_atomic_dec_wrap", + "__intrinsic_image_atomic_dec_wrap", + &builtin_builder::_image_prototype, 1, + (atom_flags | IMAGE_FUNCTION_EXT_ONLY), + ir_intrinsic_image_atomic_dec_wrap); } ir_variable * -- cgit v1.2.3