1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-04 16:24:29 +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;
// Create pNext chain for additional device features
initFeatureChain(enabledFeatures, devExtensions);
initFeatureChain(enabledFeatures, devExtensions, instance->extensions());
// Log feature support info an extension list
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
Logger::info(str::format("Device properties:"
@ -980,7 +980,8 @@ namespace dxvk {
void DxvkAdapter::initFeatureChain(
DxvkDeviceFeatures& enabledFeatures,
const DxvkDeviceExtensions& devExtensions) {
const DxvkDeviceExtensions& devExtensions,
const DxvkInstanceExtensions& insExtensions) {
enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR;
enabledFeatures.core.pNext = nullptr;
@ -1024,7 +1025,7 @@ namespace dxvk {
enabledFeatures.extFragmentShaderInterlock.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.extFragmentShaderInterlock);
}
if (devExtensions.extFullScreenExclusive)
if (devExtensions.extFullScreenExclusive && insExtensions.khrGetSurfaceCapabilities2)
enabledFeatures.extFullScreenExclusive = VK_TRUE;
if (devExtensions.extGraphicsPipelineLibrary) {

View File

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