1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[dxvk] Check instance extensions for feature enablement as necessary

This commit is contained in:
Philip Rebohle 2023-03-16 01:33:44 +01:00
parent 35895ba05b
commit 27f3648a44
2 changed files with 7 additions and 5 deletions

View File

@ -461,7 +461,7 @@ namespace dxvk {
m_deviceFeatures.extShaderModuleIdentifier.shaderModuleIdentifier; m_deviceFeatures.extShaderModuleIdentifier.shaderModuleIdentifier;
// Create pNext chain for additional device features // Create pNext chain for additional device features
initFeatureChain(enabledFeatures, devExtensions); initFeatureChain(enabledFeatures, devExtensions, instance->extensions());
// Log feature support info an extension list // Log feature support info an extension list
Logger::info(str::format("Device properties:" Logger::info(str::format("Device properties:"
@ -633,7 +633,7 @@ namespace dxvk {
} }
} }
initFeatureChain(enabledFeatures, devExtensions); initFeatureChain(enabledFeatures, devExtensions, instance->extensions());
// Log feature support info an extension list // Log feature support info an extension list
Logger::info(str::format("Device properties:" Logger::info(str::format("Device properties:"
@ -980,7 +980,8 @@ namespace dxvk {
void DxvkAdapter::initFeatureChain( void DxvkAdapter::initFeatureChain(
DxvkDeviceFeatures& enabledFeatures, DxvkDeviceFeatures& enabledFeatures,
const DxvkDeviceExtensions& devExtensions) { const DxvkDeviceExtensions& devExtensions,
const DxvkInstanceExtensions& insExtensions) {
enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
enabledFeatures.core.pNext = nullptr; enabledFeatures.core.pNext = nullptr;
@ -1024,7 +1025,7 @@ namespace dxvk {
enabledFeatures.extFragmentShaderInterlock.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extFragmentShaderInterlock); enabledFeatures.extFragmentShaderInterlock.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extFragmentShaderInterlock);
} }
if (devExtensions.extFullScreenExclusive) if (devExtensions.extFullScreenExclusive && insExtensions.khrGetSurfaceCapabilities2)
enabledFeatures.extFullScreenExclusive = VK_TRUE; enabledFeatures.extFullScreenExclusive = VK_TRUE;
if (devExtensions.extGraphicsPipelineLibrary) { if (devExtensions.extGraphicsPipelineLibrary) {

View File

@ -306,7 +306,8 @@ namespace dxvk {
static void initFeatureChain( static void initFeatureChain(
DxvkDeviceFeatures& enabledFeatures, DxvkDeviceFeatures& enabledFeatures,
const DxvkDeviceExtensions& devExtensions); const DxvkDeviceExtensions& devExtensions,
const DxvkInstanceExtensions& insExtensions);
static void logNameList(const DxvkNameList& names); static void logNameList(const DxvkNameList& names);
static void logFeatures(const DxvkDeviceFeatures& features); static void logFeatures(const DxvkDeviceFeatures& features);