[RFC,7/7] anv: Advertise support for VK_KHR_vulkan_memory_model

Submitted by Jason Ekstrand on Sept. 10, 2018, 6:04 p.m.

Details

Message ID 20180910180437.25000-8-jason.ekstrand@intel.com
State New
Headers show
Series "anv: Support VK_KHR_vulkan_memory_model" ( rev: 1 ) in Mesa

Browsing this patch as part of:
"anv: Support VK_KHR_vulkan_memory_model" rev 1 in Mesa
<< prev patch [7/7] next patch >>

Commit Message

Jason Ekstrand Sept. 10, 2018, 6:04 p.m.
---
 src/intel/vulkan/anv_device.c      | 7 +++++++
 src/intel/vulkan/anv_extensions.py | 1 +
 src/intel/vulkan/anv_pipeline.c    | 1 +
 3 files changed, 9 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 47c6c6e93b4..9b15fc0648b 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -898,6 +898,13 @@  void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR: {
+         VkPhysicalDeviceVulkanMemoryModelFeaturesKHR *features =
+            (VkPhysicalDeviceVulkanMemoryModelFeaturesKHR *)ext;
+         features->vulkanMemoryModel = VK_TRUE;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
          VkPhysicalDeviceSamplerYcbcrConversionFeatures *features =
             (VkPhysicalDeviceSamplerYcbcrConversionFeatures *) ext;
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index a21aee5a001..53759b6dc49 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -107,6 +107,7 @@  EXTENSIONS = [
     Extension('VK_KHR_surface',                          25, 'ANV_HAS_SURFACE'),
     Extension('VK_KHR_swapchain',                        68, 'ANV_HAS_SURFACE'),
     Extension('VK_KHR_variable_pointers',                 1, True),
+    Extension('VK_KHR_vulkan_memory_model',               1, True),
     Extension('VK_KHR_wayland_surface',                   6, 'VK_USE_PLATFORM_WAYLAND_KHR'),
     Extension('VK_KHR_xcb_surface',                       6, 'VK_USE_PLATFORM_XCB_KHR'),
     Extension('VK_KHR_xlib_surface',                      6, 'VK_USE_PLATFORM_XLIB_KHR'),
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index be05c11f45d..1a8dfda5096 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -156,6 +156,7 @@  anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
          .stencil_export = device->instance->physicalDevice.info.gen >= 9,
          .storage_8bit = device->instance->physicalDevice.info.gen >= 8,
          .post_depth_coverage = device->instance->physicalDevice.info.gen >= 9,
+         .vk_memory_model = true,
       },
    };