Module: Mesa
Branch: master
Commit: c04b36de39b808bcffe0934844080e15d55fe86a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c04b36de39b808bcffe0934844080e15d55fe86a

Author: Jesse Natalie <jenat...@microsoft.com>
Date:   Sun Apr 11 14:09:58 2021 -0700

vtn: Add a cap for CL drivers to support read-write images

This is a required CL2.0, optional CL3.0 feature

Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net>
Reviewed-by: Karol Herbst <kher...@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10181>

---

 src/compiler/shader_info.h        | 1 +
 src/compiler/spirv/spirv_to_nir.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 5208d8b73af..ebc2c43923f 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -67,6 +67,7 @@ struct spirv_supported_capabilities {
    bool integer_functions2;
    bool kernel;
    bool kernel_image;
+   bool kernel_image_read_write;
    bool literal_sampler;
    bool min_lod;
    bool multiview;
diff --git a/src/compiler/spirv/spirv_to_nir.c 
b/src/compiler/spirv/spirv_to_nir.c
index aa254f85c64..35b64570814 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -4349,11 +4349,14 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, 
SpvOp opcode,
          spv_check_supported(kernel_image, cap);
          break;
 
+      case SpvCapabilityImageReadWrite:
+         spv_check_supported(kernel_image_read_write, cap);
+         break;
+
       case SpvCapabilityLiteralSampler:
          spv_check_supported(literal_sampler, cap);
          break;
 
-      case SpvCapabilityImageReadWrite:
       case SpvCapabilityImageMipmap:
       case SpvCapabilityPipes:
       case SpvCapabilityDeviceEnqueue:

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to