diff --git a/src/xenia/ui/vulkan/vulkan_device.cc b/src/xenia/ui/vulkan/vulkan_device.cc index 9d19be370..d31ffc327 100644 --- a/src/xenia/ui/vulkan/vulkan_device.cc +++ b/src/xenia/ui/vulkan/vulkan_device.cc @@ -57,10 +57,15 @@ VulkanDevice::VulkanDevice(VulkanInstance* instance) : instance_(instance) { */ } - DeclareRequiredExtension(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, - Version::Make(0, 0, 0), false); + // AMD shader info (optional) + DeclareRequiredExtension(VK_AMD_SHADER_INFO_EXTENSION_NAME, + Version::Make(0, 0, 0), true); + // Debug markers (optional) DeclareRequiredExtension(VK_EXT_DEBUG_MARKER_EXTENSION_NAME, Version::Make(0, 0, 0), true); + + DeclareRequiredExtension(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME, + Version::Make(0, 0, 0), false); } VulkanDevice::~VulkanDevice() { @@ -252,6 +257,16 @@ bool VulkanDevice::Initialize(DeviceInfo device_info) { return true; } +bool VulkanDevice::HasEnabledExtension(const char* name) { + for (auto extension : enabled_extensions_) { + if (!std::strcmp(extension, name)) { + return true; + } + } + + return false; +} + VkQueue VulkanDevice::AcquireQueue(uint32_t queue_family_index) { std::lock_guard lock(queue_mutex_); if (free_queues_[queue_family_index].empty()) { diff --git a/src/xenia/ui/vulkan/vulkan_device.h b/src/xenia/ui/vulkan/vulkan_device.h index f3448dc9a..b4bf384d5 100644 --- a/src/xenia/ui/vulkan/vulkan_device.h +++ b/src/xenia/ui/vulkan/vulkan_device.h @@ -57,6 +57,8 @@ class VulkanDevice { // issues will occur. bool Initialize(DeviceInfo device_info); + bool HasEnabledExtension(const char* name); + uint32_t queue_family_index() const { return queue_family_index_; } std::mutex& primary_queue_mutex() { return queue_mutex_; } // Access to the primary queue must be synchronized with primary_queue_mutex.