mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Enable VK_EXT_full_screen_exclusive if available
Also pulls in VK_KHR_get_surface_capabilities2 as a dependency.
This commit is contained in:
parent
07c2de62be
commit
dc13f48318
@ -241,11 +241,12 @@ namespace dxvk {
|
|||||||
DxvkDeviceFeatures enabledFeatures) {
|
DxvkDeviceFeatures enabledFeatures) {
|
||||||
DxvkDeviceExtensions devExtensions;
|
DxvkDeviceExtensions devExtensions;
|
||||||
|
|
||||||
std::array<DxvkExt*, 25> devExtensionList = {{
|
std::array<DxvkExt*, 26> devExtensionList = {{
|
||||||
&devExtensions.amdMemoryOverallocationBehaviour,
|
&devExtensions.amdMemoryOverallocationBehaviour,
|
||||||
&devExtensions.amdShaderFragmentMask,
|
&devExtensions.amdShaderFragmentMask,
|
||||||
&devExtensions.extConditionalRendering,
|
&devExtensions.extConditionalRendering,
|
||||||
&devExtensions.extDepthClipEnable,
|
&devExtensions.extDepthClipEnable,
|
||||||
|
&devExtensions.extFullScreenExclusive,
|
||||||
&devExtensions.extHostQueryReset,
|
&devExtensions.extHostQueryReset,
|
||||||
&devExtensions.extMemoryBudget,
|
&devExtensions.extMemoryBudget,
|
||||||
&devExtensions.extMemoryPriority,
|
&devExtensions.extMemoryPriority,
|
||||||
|
@ -262,6 +262,7 @@ namespace dxvk {
|
|||||||
DxvkExt amdShaderFragmentMask = { VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt amdShaderFragmentMask = { VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
DxvkExt extConditionalRendering = { VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, DxvkExtMode::Disabled };
|
DxvkExt extConditionalRendering = { VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, DxvkExtMode::Disabled };
|
||||||
DxvkExt extDepthClipEnable = { VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt extDepthClipEnable = { VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
|
DxvkExt extFullScreenExclusive = { VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
DxvkExt extHostQueryReset = { VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt extHostQueryReset = { VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive };
|
DxvkExt extMemoryBudget = { VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, DxvkExtMode::Passive };
|
||||||
DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };
|
DxvkExt extMemoryPriority = { VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
@ -293,6 +294,7 @@ namespace dxvk {
|
|||||||
*/
|
*/
|
||||||
struct DxvkInstanceExtensions {
|
struct DxvkInstanceExtensions {
|
||||||
DxvkExt khrGetPhysicalDeviceProperties2 = { VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, DxvkExtMode::Required };
|
DxvkExt khrGetPhysicalDeviceProperties2 = { VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, DxvkExtMode::Required };
|
||||||
|
DxvkExt khrGetSurfaceCapabilities2 = { VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME, DxvkExtMode::Optional };
|
||||||
DxvkExt khrSurface = { VK_KHR_SURFACE_EXTENSION_NAME, DxvkExtMode::Required };
|
DxvkExt khrSurface = { VK_KHR_SURFACE_EXTENSION_NAME, DxvkExtMode::Required };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,8 +87,9 @@ namespace dxvk {
|
|||||||
VkInstance DxvkInstance::createInstance() {
|
VkInstance DxvkInstance::createInstance() {
|
||||||
DxvkInstanceExtensions insExtensions;
|
DxvkInstanceExtensions insExtensions;
|
||||||
|
|
||||||
std::array<DxvkExt*, 2> insExtensionList = {{
|
std::array<DxvkExt*, 3> insExtensionList = {{
|
||||||
&insExtensions.khrGetPhysicalDeviceProperties2,
|
&insExtensions.khrGetPhysicalDeviceProperties2,
|
||||||
|
&insExtensions.khrGetSurfaceCapabilities2,
|
||||||
&insExtensions.khrSurface,
|
&insExtensions.khrSurface,
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
@ -99,6 +99,11 @@ namespace dxvk::vk {
|
|||||||
VULKAN_FN(vkGetPhysicalDeviceSparseImageFormatProperties2KHR);
|
VULKAN_FN(vkGetPhysicalDeviceSparseImageFormatProperties2KHR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VK_KHR_get_surface_capabilities2
|
||||||
|
VULKAN_FN(vkGetPhysicalDeviceSurfaceCapabilities2KHR);
|
||||||
|
VULKAN_FN(vkGetPhysicalDeviceSurfaceFormats2KHR);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef VK_KHR_surface
|
#ifdef VK_KHR_surface
|
||||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||||
VULKAN_FN(vkCreateXcbSurfaceKHR);
|
VULKAN_FN(vkCreateXcbSurfaceKHR);
|
||||||
@ -133,6 +138,13 @@ namespace dxvk::vk {
|
|||||||
VULKAN_FN(vkDestroyDebugReportCallbackEXT);
|
VULKAN_FN(vkDestroyDebugReportCallbackEXT);
|
||||||
VULKAN_FN(vkDebugReportMessageEXT);
|
VULKAN_FN(vkDebugReportMessageEXT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef VK_EXT_full_screen_exclusive
|
||||||
|
VULKAN_FN(vkGetPhysicalDeviceSurfacePresentModes2EXT);
|
||||||
|
VULKAN_FN(vkAcquireFullScreenExclusiveModeEXT);
|
||||||
|
VULKAN_FN(vkReleaseFullScreenExclusiveModeEXT);
|
||||||
|
VULKAN_FN(vkGetDeviceGroupSurfacePresentModes2EXT);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ namespace dxvk::vk {
|
|||||||
VkSurfaceFormatKHR formats[4];
|
VkSurfaceFormatKHR formats[4];
|
||||||
uint32_t numPresentModes;
|
uint32_t numPresentModes;
|
||||||
VkPresentModeKHR presentModes[4];
|
VkPresentModeKHR presentModes[4];
|
||||||
|
VkFullScreenExclusiveEXT fullscreenExclusive;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user