aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-09-05 11:10:02 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-10-24 11:39:56 -0700
commit06aecb14c0476c1a4664f75b17fa2ba06fa5aa46 (patch)
tree59890d3ea54f7fbfef5055cd9cbf73aaff9634dc /src/intel
parentb8784fe65252f82ee528459ec876c43b8586cac3 (diff)
anv: Implement VK_KHR_vulkan_memory_model
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_device.c8
-rw-r--r--src/intel/vulkan/anv_extensions.py1
-rw-r--r--src/intel/vulkan/anv_pipeline.c3
3 files changed, 12 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 9730e027392..2bd3093bce8 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1270,6 +1270,14 @@ void anv_GetPhysicalDeviceFeatures2(
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR: {
+ VkPhysicalDeviceVulkanMemoryModelFeaturesKHR *features = (void *)ext;
+ features->vulkanMemoryModel = true;
+ features->vulkanMemoryModelDeviceScope = true;
+ features->vulkanMemoryModelAvailabilityVisibilityChains = true;
+ break;
+ }
+
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: {
VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *features =
(VkPhysicalDeviceYcbcrImageArraysFeaturesEXT *)ext;
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index c72c23530f8..2c2bea1806a 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -120,6 +120,7 @@ EXTENSIONS = [
Extension('VK_KHR_swapchain', 70, 'ANV_HAS_SURFACE'),
Extension('VK_KHR_uniform_buffer_standard_layout', 1, True),
Extension('VK_KHR_variable_pointers', 1, True),
+ Extension('VK_KHR_vulkan_memory_model', 3, 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 5460bcca01a..68a8ca0c026 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -168,6 +168,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
};
struct spirv_to_nir_options spirv_options = {
.frag_coord_is_sysval = true,
+ .use_scoped_memory_barrier = true,
.caps = {
.demote_to_helper_invocation = true,
.derivative_group = true,
@@ -206,6 +207,8 @@ anv_shader_compile_to_nir(struct anv_device *device,
.tessellation = true,
.transform_feedback = pdevice->info.gen >= 8,
.variable_pointers = true,
+ .vk_memory_model = true,
+ .vk_memory_model_device_scope = true,
},
.ubo_addr_format = nir_address_format_32bit_index_offset,
.ssbo_addr_format =