From 87c915e54dffd2788701b0f98036bf76e0588b38 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 27 Jul 2016 23:59:25 -0500 Subject: [PATCH] Vulkan: Re-enable the validation layers properly. --- src/xenia/ui/vulkan/vulkan_device.cc | 32 +++++++++++++++----------- src/xenia/ui/vulkan/vulkan_instance.cc | 12 ++++++---- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/xenia/ui/vulkan/vulkan_device.cc b/src/xenia/ui/vulkan/vulkan_device.cc index 7b1dc7f8d..9c465a0b2 100644 --- a/src/xenia/ui/vulkan/vulkan_device.cc +++ b/src/xenia/ui/vulkan/vulkan_device.cc @@ -33,24 +33,27 @@ namespace vulkan { VulkanDevice::VulkanDevice(VulkanInstance* instance) : instance_(instance) { if (FLAGS_vulkan_validation) { - /*DeclareRequiredLayer("VK_LAYER_GOOGLE_unique_objects", - Version::Make(0, 0, 0), true);*/ - DeclareRequiredLayer("VK_LAYER_LUNARG_threading", Version::Make(0, 0, 0), - true); - /*DeclareRequiredLayer("VK_LAYER_LUNARG_mem_tracker", Version::Make(0, 0, - 0), - true);*/ + DeclareRequiredLayer("VK_LAYER_LUNARG_standard_validation", + Version::Make(0, 0, 0), true); + // DeclareRequiredLayer("VK_LAYER_GOOGLE_unique_objects", Version::Make(0, + // 0, 0), true); + /* + DeclareRequiredLayer("VK_LAYER_GOOGLE_threading", Version::Make(0, 0, 0), + true); + DeclareRequiredLayer("VK_LAYER_LUNARG_core_validation", + Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_object_tracker", - Version::Make(0, 0, 0), true); + Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_draw_state", Version::Make(0, 0, 0), - true); - DeclareRequiredLayer("VK_LAYER_LUNARG_param_checker", - Version::Make(0, 0, 0), true); + true); + DeclareRequiredLayer("VK_LAYER_LUNARG_parameter_validation", + Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_swapchain", Version::Make(0, 0, 0), - true); + true); DeclareRequiredLayer("VK_LAYER_LUNARG_device_limits", - Version::Make(0, 0, 0), true); + Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_image", Version::Make(0, 0, 0), true); + */ } } @@ -91,6 +94,9 @@ bool VulkanDevice::Initialize(DeviceInfo device_info) { } else { \ enabled_features.name = VK_TRUE; \ } + ENABLE_AND_EXPECT(shaderClipDistance); + ENABLE_AND_EXPECT(shaderCullDistance); + ENABLE_AND_EXPECT(shaderTessellationAndGeometryPointSize); ENABLE_AND_EXPECT(geometryShader); ENABLE_AND_EXPECT(depthClamp); ENABLE_AND_EXPECT(multiViewport); diff --git a/src/xenia/ui/vulkan/vulkan_instance.cc b/src/xenia/ui/vulkan/vulkan_instance.cc index 62598b5d2..f6b43644c 100644 --- a/src/xenia/ui/vulkan/vulkan_instance.cc +++ b/src/xenia/ui/vulkan/vulkan_instance.cc @@ -34,23 +34,27 @@ namespace vulkan { VulkanInstance::VulkanInstance() { if (FLAGS_vulkan_validation) { + DeclareRequiredLayer("VK_LAYER_LUNARG_standard_validation", + Version::Make(0, 0, 0), true); // DeclareRequiredLayer("VK_LAYER_GOOGLE_unique_objects", Version::Make(0, // 0, 0), true); - DeclareRequiredLayer("VK_LAYER_LUNARG_threading", Version::Make(0, 0, 0), + /* + DeclareRequiredLayer("VK_LAYER_GOOGLE_threading", Version::Make(0, 0, 0), true); - // DeclareRequiredLayer("VK_LAYER_LUNARG_mem_tracker", Version::Make(0, 0, - // 0), true); + DeclareRequiredLayer("VK_LAYER_LUNARG_core_validation", + Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_object_tracker", Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_draw_state", Version::Make(0, 0, 0), true); - DeclareRequiredLayer("VK_LAYER_LUNARG_param_checker", + DeclareRequiredLayer("VK_LAYER_LUNARG_parameter_validation", Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_swapchain", Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_device_limits", Version::Make(0, 0, 0), true); DeclareRequiredLayer("VK_LAYER_LUNARG_image", Version::Make(0, 0, 0), true); + */ DeclareRequiredExtension(VK_EXT_DEBUG_REPORT_EXTENSION_NAME, Version::Make(0, 0, 0), true); }