Module: Mesa
Branch: main
Commit: 5d937f09b2c90148c7bc205da6c516da01cd54ee
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d937f09b2c90148c7bc205da6c516da01cd54ee

Author: Faith Ekstrand <faith.ekstr...@collabora.com>
Date:   Thu Dec 14 16:32:54 2023 -0600

nvk: Advertise VK_KHR_vulkan_memory_model

Now that the NAK barrier bugs seem fixed and we're passing all the
tests, we can turn this on.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9608
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>

---

 docs/features.txt                        | 2 +-
 src/nouveau/vulkan/nvk_physical_device.c | 4 ++++
 src/nouveau/vulkan/nvk_shader.c          | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/features.txt b/docs/features.txt
index 25e35563471..367ebd4a689 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -465,7 +465,7 @@ Vulkan 1.2 -- all DONE: anv, tu, vn
   VK_KHR_spirv_1_4                                      DONE (anv, dzn, hasvk, 
lvp, nvk, radv, tu, v3dv, vn)
   VK_KHR_timeline_semaphore                             DONE (anv, dzn, hasvk, 
lvp, nvk, pvr, radv, tu, v3dv, vn)
   VK_KHR_uniform_buffer_standard_layout                 DONE (anv, dzn, hasvk, 
lvp, nvk, pvr, radv, tu, v3dv, vn)
-  VK_KHR_vulkan_memory_model                            DONE (anv, hasvk, lvp, 
radv, tu, v3dv, vn)
+  VK_KHR_vulkan_memory_model                            DONE (anv, hasvk, lvp, 
nvk, radv, tu, v3dv, vn)
   VK_EXT_descriptor_indexing                            DONE (anv/gen9+, dzn, 
lvp, nvk, radv, tu, vn)
   VK_EXT_host_query_reset                               DONE (anv, hasvk, lvp, 
nvk, pvr, radv, tu, v3dv, vn)
   VK_EXT_sampler_filter_minmax                          DONE (anv/gen9+, lvp, 
nvk, radv, tu, vn)
diff --git a/src/nouveau/vulkan/nvk_physical_device.c 
b/src/nouveau/vulkan/nvk_physical_device.c
index 2d5cf0ae4bd..bbe56c766f5 100644
--- a/src/nouveau/vulkan/nvk_physical_device.c
+++ b/src/nouveau/vulkan/nvk_physical_device.c
@@ -133,6 +133,7 @@ nvk_get_device_extensions(const struct nv_device_info *info,
       .KHR_synchronization2 = true,
       .KHR_uniform_buffer_standard_layout = true,
       .KHR_variable_pointers = true,
+      .KHR_vulkan_memory_model = nvk_use_nak(info),
       .KHR_workgroup_memory_explicit_layout = true,
       .EXT_4444_formats = true,
       .EXT_attachment_feedback_loop_layout = true,
@@ -301,6 +302,9 @@ nvk_get_device_features(const struct nv_device_info *info,
       .bufferDeviceAddress = true,
       .bufferDeviceAddressCaptureReplay = true,
       .bufferDeviceAddressMultiDevice = false,
+      .vulkanMemoryModel = nvk_use_nak(info),
+      .vulkanMemoryModelDeviceScope = nvk_use_nak(info),
+      .vulkanMemoryModelAvailabilityVisibilityChains = nvk_use_nak(info),
       .shaderOutputViewportIndex = info->cls_eng3d >= MAXWELL_B,
       .shaderOutputLayer = info->cls_eng3d >= MAXWELL_B,
       .subgroupBroadcastDynamicId = nvk_use_nak(info),
diff --git a/src/nouveau/vulkan/nvk_shader.c b/src/nouveau/vulkan/nvk_shader.c
index 88f83343b6e..329594cb852 100644
--- a/src/nouveau/vulkan/nvk_shader.c
+++ b/src/nouveau/vulkan/nvk_shader.c
@@ -147,6 +147,8 @@ nvk_physical_device_spirv_options(const struct 
nvk_physical_device *pdev,
          .tessellation = true,
          .transform_feedback = true,
          .variable_pointers = true,
+         .vk_memory_model_device_scope = true,
+         .vk_memory_model = true,
          .workgroup_memory_explicit_layout = true,
       },
       .ssbo_addr_format = nvk_buffer_addr_format(rs->storage_buffers),

Reply via email to