diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index ac6e79d37..1023858af 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1925,7 +1925,7 @@ namespace dxvk { enabled.core.features.shaderStorageImageWriteWithoutFormat = VK_TRUE; enabled.core.features.depthBounds = supported.core.features.depthBounds; - enabled.shaderDrawParameters.shaderDrawParameters = VK_TRUE; + enabled.vk11.shaderDrawParameters = VK_TRUE; enabled.extMemoryPriority.memoryPriority = supported.extMemoryPriority.memoryPriority; diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp index ac8da7978..7ca05fffe 100644 --- a/src/d3d9/d3d9_adapter.cpp +++ b/src/d3d9/d3d9_adapter.cpp @@ -67,7 +67,7 @@ namespace dxvk { return D3DERR_INVALIDCALL; } - GUID guid = bit::cast(m_adapter->devicePropertiesExt().coreDeviceId.deviceUUID); + GUID guid = bit::cast(m_adapter->devicePropertiesExt().vk11.deviceUUID); uint32_t vendorId = options.customVendorId == -1 ? props.vendorID : uint32_t(options.customVendorId); uint32_t deviceId = options.customDeviceId == -1 ? props.deviceID : uint32_t(options.customDeviceId); @@ -702,10 +702,10 @@ namespace dxvk { if (pLUID == nullptr) return D3DERR_INVALIDCALL; - auto& deviceId = m_adapter->devicePropertiesExt().coreDeviceId; + auto& vk11 = m_adapter->devicePropertiesExt().vk11; - if (deviceId.deviceLUIDValid) - *pLUID = bit::cast(deviceId.deviceLUID); + if (vk11.deviceLUIDValid) + *pLUID = bit::cast(vk11.deviceLUID); else *pLUID = dxvk::GetAdapterLUID(m_ordinal); diff --git a/src/dxbc/dxbc_options.cpp b/src/dxbc/dxbc_options.cpp index df05d3caf..154d25079 100644 --- a/src/dxbc/dxbc_options.cpp +++ b/src/dxbc/dxbc_options.cpp @@ -20,14 +20,14 @@ namespace dxvk { useStorageImageReadWithoutFormat = devFeatures.core.features.shaderStorageImageReadWithoutFormat; useSubgroupOpsForAtomicCounters - = (devInfo.coreSubgroup.supportedStages & VK_SHADER_STAGE_COMPUTE_BIT) - && (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); + = (devInfo.vk11.subgroupSupportedStages & VK_SHADER_STAGE_COMPUTE_BIT) + && (devInfo.vk11.subgroupSupportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); useDemoteToHelperInvocation = (devFeatures.extShaderDemoteToHelperInvocation.shaderDemoteToHelperInvocation); useSubgroupOpsForEarlyDiscard - = (devInfo.coreSubgroup.subgroupSize >= 4) - && (devInfo.coreSubgroup.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT) - && (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); + = (devInfo.vk11.subgroupSize >= 4) + && (devInfo.vk11.subgroupSupportedStages & VK_SHADER_STAGE_FRAGMENT_BIT) + && (devInfo.vk11.subgroupSupportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); useSdivForBufferIndex = adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0); diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index 3e8f6307e..81c471746 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -244,7 +244,7 @@ namespace dxvk { auto deviceProp = m_adapter->deviceProperties(); auto memoryProp = m_adapter->memoryProperties(); - auto deviceId = m_adapter->devicePropertiesExt().coreDeviceId; + auto vk11 = m_adapter->devicePropertiesExt().vk11; // Custom Vendor / Device ID if (options->customVendorId >= 0) @@ -322,8 +322,8 @@ namespace dxvk { pDesc->GraphicsPreemptionGranularity = DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY; pDesc->ComputePreemptionGranularity = DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY; - if (deviceId.deviceLUIDValid) - std::memcpy(&pDesc->AdapterLuid, deviceId.deviceLUID, VK_LUID_SIZE); + if (vk11.deviceLUIDValid) + std::memcpy(&pDesc->AdapterLuid, vk11.deviceLUID, VK_LUID_SIZE); else pDesc->AdapterLuid = GetAdapterLUID(m_index); diff --git a/src/dxso/dxso_options.cpp b/src/dxso/dxso_options.cpp index 5e05ee650..e7c94e589 100644 --- a/src/dxso/dxso_options.cpp +++ b/src/dxso/dxso_options.cpp @@ -18,9 +18,9 @@ namespace dxvk { = (devFeatures.extShaderDemoteToHelperInvocation.shaderDemoteToHelperInvocation); useSubgroupOpsForEarlyDiscard - = (devInfo.coreSubgroup.subgroupSize >= 4) - && (devInfo.coreSubgroup.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT) - && (devInfo.coreSubgroup.supportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); + = (devInfo.vk11.subgroupSize >= 4) + && (devInfo.vk11.subgroupSupportedStages & VK_SHADER_STAGE_FRAGMENT_BIT) + && (devInfo.vk11.subgroupSupportedOperations & VK_SUBGROUP_FEATURE_BALLOT_BIT); // Disable early discard on Nvidia because it may hurt performance if (adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0)) diff --git a/src/dxvk/dxvk_adapter.cpp b/src/dxvk/dxvk_adapter.cpp index 0a489fab5..7dec71d0b 100644 --- a/src/dxvk/dxvk_adapter.cpp +++ b/src/dxvk/dxvk_adapter.cpp @@ -220,8 +220,8 @@ namespace dxvk { || !required.core.features.variableMultisampleRate) && (m_deviceFeatures.core.features.inheritedQueries || !required.core.features.inheritedQueries) - && (m_deviceFeatures.shaderDrawParameters.shaderDrawParameters - || !required.shaderDrawParameters.shaderDrawParameters) + && (m_deviceFeatures.vk11.shaderDrawParameters + || !required.vk11.shaderDrawParameters) && (m_deviceFeatures.ext4444Formats.formatA4R4G4B4 || !required.ext4444Formats.formatA4R4G4B4) && (m_deviceFeatures.ext4444Formats.formatA4B4G4R4 @@ -373,8 +373,8 @@ namespace dxvk { enabledFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; enabledFeatures.core.pNext = nullptr; - enabledFeatures.shaderDrawParameters.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; - enabledFeatures.shaderDrawParameters.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.shaderDrawParameters); + enabledFeatures.vk11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; + enabledFeatures.vk11.pNext = std::exchange(enabledFeatures.core.pNext, &enabledFeatures.vk11); if (devExtensions.ext4444Formats) { enabledFeatures.ext4444Formats.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; @@ -627,11 +627,8 @@ namespace dxvk { // Query info now so that we have basic device properties available m_vki->vkGetPhysicalDeviceProperties2(m_handle, &m_deviceInfo.core); - m_deviceInfo.coreDeviceId.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; - m_deviceInfo.coreDeviceId.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreDeviceId); - - m_deviceInfo.coreSubgroup.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; - m_deviceInfo.coreSubgroup.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.coreSubgroup); + m_deviceInfo.vk11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES; + m_deviceInfo.vk11.pNext = std::exchange(m_deviceInfo.core.pNext, &m_deviceInfo.vk11); if (m_deviceExtensions.supports(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME)) { m_deviceInfo.extConservativeRasterization.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT; @@ -706,8 +703,8 @@ namespace dxvk { m_deviceFeatures.core.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; m_deviceFeatures.core.pNext = nullptr; - m_deviceFeatures.shaderDrawParameters.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; - m_deviceFeatures.shaderDrawParameters.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.shaderDrawParameters); + m_deviceFeatures.vk11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; + m_deviceFeatures.vk11.pNext = std::exchange(m_deviceFeatures.core.pNext, &m_deviceFeatures.vk11); if (m_deviceExtensions.supports(VK_EXT_4444_FORMATS_EXTENSION_NAME)) { m_deviceFeatures.ext4444Formats.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; @@ -855,6 +852,8 @@ namespace dxvk { "\n shaderFloat64 : ", features.core.features.shaderFloat64 ? "1" : "0", "\n shaderInt64 : ", features.core.features.shaderInt64 ? "1" : "0", "\n variableMultisampleRate : ", features.core.features.variableMultisampleRate ? "1" : "0", + "\nVulkan 1.1", + "\n shaderDrawParameters : ", features.vk11.shaderDrawParameters, "\n", VK_EXT_4444_FORMATS_EXTENSION_NAME, "\n formatA4R4G4B4 : ", features.ext4444Formats.formatA4R4G4B4 ? "1" : "0", "\n formatA4B4G4R4 : ", features.ext4444Formats.formatA4B4G4R4 ? "1" : "0", diff --git a/src/dxvk/dxvk_device_info.h b/src/dxvk/dxvk_device_info.h index 55ae18233..501acb093 100644 --- a/src/dxvk/dxvk_device_info.h +++ b/src/dxvk/dxvk_device_info.h @@ -14,8 +14,7 @@ namespace dxvk { */ struct DxvkDeviceInfo { VkPhysicalDeviceProperties2 core; - VkPhysicalDeviceIDProperties coreDeviceId; - VkPhysicalDeviceSubgroupProperties coreSubgroup; + VkPhysicalDeviceVulkan11Properties vk11; VkPhysicalDeviceConservativeRasterizationPropertiesEXT extConservativeRasterization; VkPhysicalDeviceCustomBorderColorPropertiesEXT extCustomBorderColor; VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT extGraphicsPipelineLibrary; @@ -37,7 +36,7 @@ namespace dxvk { */ struct DxvkDeviceFeatures { VkPhysicalDeviceFeatures2 core; - VkPhysicalDeviceShaderDrawParametersFeatures shaderDrawParameters; + VkPhysicalDeviceVulkan11Features vk11; VkPhysicalDevice4444FormatsFeaturesEXT ext4444Formats; VkPhysicalDeviceCustomBorderColorFeaturesEXT extCustomBorderColor; VkPhysicalDeviceDepthClipEnableFeaturesEXT extDepthClipEnable; diff --git a/src/dxvk/dxvk_instance.cpp b/src/dxvk/dxvk_instance.cpp index f093ed440..e6fabd8c2 100644 --- a/src/dxvk/dxvk_instance.cpp +++ b/src/dxvk/dxvk_instance.cpp @@ -61,7 +61,7 @@ namespace dxvk { Rc DxvkInstance::findAdapterByLuid(const void* luid) const { for (const auto& adapter : m_adapters) { - const auto& props = adapter->devicePropertiesExt().coreDeviceId; + const auto& props = adapter->devicePropertiesExt().vk11; if (props.deviceLUIDValid && !std::memcmp(luid, props.deviceLUID, VK_LUID_SIZE)) return adapter;