GPUOpen-Drivers / AMDVLK

AMD Open Source Driver For Vulkan
MIT License
1.68k stars 159 forks source link

VKD3D-Proton Support Request #324

Open bluestang2006 opened 1 year ago

bluestang2006 commented 1 year ago

This issue is to request required features and extensions that should improve AMDVLK on VKD3D-Proton. Just recently, VKD3D added VK Profiles for D3D feature and shader model level support.

AFAICT, AMDVLK can support baseline D3D Feature Level (FL) 12.0 and up to Shader Model (SM) 6.6 but doesn't support FL 12.2 and SM 6.6 because of a few missing features/extensions. While some D3D12 games are playable on AMDVLK w/ current drivers (v2023.Q2.2), others are not due to missing features/extensions.

Lastly, there are a few other features that are needed for optimal performance.

For FL 12.1, AMDVLK will need:

VK_EXT_fragment_shader_interlock
    VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT
        fragmentShaderSampleInterlock = true
        fragmentShaderPixelInterlock = true

For FL 12.2, AMDVLK will need:

VK_EXT_conservative_rasterization (partially supported)
    VkPhysicalDeviceConservativeRasterizationPropertiesEXT
        fullyCoveredFragmentShaderInputVariable = true

For SM 6.6, AMDVLK will need:

VK_NV_compute_shader_derivatives
    VkPhysicalDeviceComputeShaderDerivativesFeaturesNV
        computeDerivativeGroupLinear = true

For overall optimal performance, AMDVLK will need:

VK_EXT_graphics_pipeline_library (ongoing work to support this is in-progress)
VK_EXT_extended_dynamic_state2 (partially supported)
    VkPhysicalDeviceExtendedDynamicState2FeaturesEXT
        extendedDynamicState2PatchControlPoints = true
VK_KHR_present_id
VK_KHR_present_wait

Updated June 26, 2024

oscarbg commented 1 year ago

nice review!

oscarbg commented 8 months ago

opened issue (https://github.com/GPUOpen-Drivers/AMDVLK/issues/341) asking specifically for taskShader for enable mesh shaders under VKD3D now that games like Alan Wake 2 can make use of it.. (for better perf?) also you can update the list to include VK_NV_device_generated_commands_compute for Starfield and also support/exposed on RADV under VKD3D..

bluestang2006 commented 4 months ago

I see that the 2024.Q1.2 driver now has VK_EXT_graphics_pipeline_library exposed but only for DOTA2 and CSGO, while not exposing it for DXVK? I also ran the VK_CTS tests and see that it doesn't pass all of the GPL tests...the obvious question here is there more work being done to bring a conformant implementation of GPL and what about the FL requests in the original post?

jinjianrong commented 4 months ago

@bluestang2006 VK_EXT_graphics_pipeline_library is disabled for dxvk now because of a corruption with VK_EXT_graphics_pipeline_library enabled. This will be fixed in next release. The VKCTS 1.3.5.2 tests can pass in our testing. What version of vkcts are you using?

bluestang2006 commented 4 months ago

@bluestang2006 VK_EXT_graphics_pipeline_library is disabled for dxvk now because of a corruption with VK_EXT_graphics_pipeline_library enabled. This will be fixed in next release. The VKCTS 1.3.5.2 tests can pass in our testing. What version of vkcts are you using?

I'm using a much more recent version of VKCTS, off the main branch. I'll wait for the next release when it's enabled for DXVK. Any updates on the Feature Level (FL) and Shader Model (SM) requests for VKD3D?

jinjianrong commented 4 months ago

We reproduced failures in dEQP-VK.pipeline.fast_linked_library.bind_buffers_2.* with new version CTS. It's pre-existing and has to do with robustness 2 not GPL fast link. We are working on it.

Regarding the Feature Level (FL) and Shader Model (SM) support for VKD3D: • VK_NV_compute_shader_derivatives We implemented the support we care about and the extension is enabled via app detect for steam. Discussions will resume to ship the EXT version very soon.
• VK_EXT_conservative_rasterization (fullyCoveredFragmentShaderInputVariable) We do not plan on supporting this. • VK_EXT_fragment_shader_interlock We plan to expose it for select apps via app detect. We still do not want to enable widely because it's not preferred behavior. • VK_EXT_extended_dynamic_state2 (extendedDynamicState2PatchControlPoints) We do not plan on supporting this. • VkPhysicalDeviceLimits ( maxPushConstantsSize = 256) This is a HW limitation for us. We don’t have that many user data registers • VK_KHR_present_id Currently no plan to implement, but we are checking to put this into future plan • VK_KHR_present_wait Currently no plan to implement, but we are checking to put this into future plan • Task shaders We plan to support it in proprietary driver, but no plan to expose it in open source driver yet

Triang3l commented 4 months ago

We implemented the support we care about and the extension is enabled via app detect for steam.

We plan to expose it for select apps via app detect.

Adding workarounds for broken apps that are already in the wild is fine, but when AMDVLK just selectively chooses not to fully support all apps except for some specific ones, that only makes me as an app developer selectively not want to support AMDVLK at all — or support it by faking VkApplicationInfo and possibly detouring other detection mechanisms, which, I think, might actually be a good technical measure to counter this practice. Especially if this filtering is done to show strong sides of the hardware/driver in a few curated examples while sweeping the subpar aspects under the rug, then I don't think it would be respectful to use apps relying on certain features as word-of-mouth marketing demos when in reality you're actively setting up roadblocks for developers who want to use that functionality. This is not the responsibility of a driver, especially in Vulkan which is explicitly designed in a way that lets drivers and apps communicate as much information about each other as possible.

on a semi-unrelated note, I'm planning to expose 1000+ descriptor sets and around 64 KB of push constants (minus things like the workaround for missing cubemap array size queries in the hardware) in my Vulkan driver for ancient AMD GPUs (that exists because I started working on Mesa due to that fragment shader interlock drama)… but they have a completely different binding model of course 🙃

nhaehnle commented 4 months ago

• Task shaders We plan to support it in proprietary driver, but no plan to expose it in open source driver yet

Task shader support is open-source. It's part of VK_EXT_mesh_shader, but it's conditional on kernel and firmware support. I've added more info in #341.

jinjianrong commented 4 months ago

@Triang3l Thanks for your feedback! For VK_NV_compute_shader_derivatives, we are selectively enabling it temporarily. The extension is planned for removal when the EXT version of it is available. The EXT spec's release has been delayed because Roadmap releases took priority but should be back on track soon.

For VK_EXT_fragment_shader_interlock, we will consider the decision to expose it by default once we have an implementation.

oscarbg commented 3 months ago

We reproduced failures in dEQP-VK.pipeline.fast_linked_library.bind_buffers_2.* with new version CTS. It's pre-existing and has to do with robustness 2 not GPL fast link. We are working on it.

Regarding the Feature Level (FL) and Shader Model (SM) support for VKD3D: • VK_NV_compute_shader_derivatives We implemented the support we care about and the extension is enabled via app detect for steam. Discussions will resume to ship the EXT version very soon. • VK_EXT_conservative_rasterization (fullyCoveredFragmentShaderInputVariable) We do not plan on supporting this. • VK_EXT_fragment_shader_interlock We plan to expose it for select apps via app detect. We still do not want to enable widely because it's not preferred behavior. • VK_EXT_extended_dynamic_state2 (extendedDynamicState2PatchControlPoints) We do not plan on supporting this. • VkPhysicalDeviceLimits ( maxPushConstantsSize = 256) This is a HW limitation for us. We don’t have that many user data registers • VK_KHR_present_id Currently no plan to implement, but we are checking to put this into future plan • VK_KHR_present_wait Currently no plan to implement, but we are checking to put this into future plan • Task shaders We plan to support it in proprietary driver, but no plan to expose it in open source driver yet

@jinjianrong really, many thanks for sharing your plan/roadmap on AMDVLK VKD3D support!! "finally" expectations are clear!

oscarbg commented 3 months ago

@Triang3l Thanks for your feedback! For VK_NV_compute_shader_derivatives, we are selectively enabling it temporarily. The extension is planned for removal when the EXT version of it is available. The EXT spec's release has been delayed because Roadmap releases took priority but should be back on track soon.

For VK_EXT_fragment_shader_interlock, we will consider the decision to expose it by default once we have an implementation.

@jinjianrong @Triang3l a suggestion regarding VK_NV_compute_shader_derivatives and VK_EXT_fragment_shader_interlock exposure.. even if you have concerns enabling unconditionally, excepting selected/curated apps, you have already a mechanism in place via AMDVLK_ENABLE_DEVELOPING_EXT env variable to expose such extensions maybe.. remembered reading https://www.phoronix.com/news/AMDVLK-Developing-Ext-Var 5 years ago.. or maybe this AMDVLK_ENABLE_DEVELOPING_EXT env variable has been removed?

oscarbg commented 3 months ago

adding latest results of running latest AMDVLK around various VKD3D profiles:

basically primary problems the same but adding new:

Unsupported extension: VK_EXT_swapchain_maintenance1

Testing profile VP_D3D12_maximum_radv adds:

Unsupported extension: VK_KHR_shader_maximal_reconvergence

and older ones like:

Unsupported extension: VK_NV_device_generated_commands Unsupported extension: VK_NV_device_generated_commands_compute

Testing profile VP_D3D12_FL_11_0_baseline.
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_11_0_baseline, supported: yes
Testing profile VP_D3D12_FL_11_1_baseline.
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_11_1_baseline, supported: yes
Testing profile VP_D3D12_FL_12_0_baseline.
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_12_0_baseline, supported: yes
Testing profile VP_D3D12_FL_12_0_optimal.
Unsupported properties condition: VkPhysicalDeviceProperties2KHR::properties.limits.maxPushConstantsSize >= 256
Unsupported extension: VK_EXT_swapchain_maintenance1
Unsupported extension: VK_KHR_present_id
Unsupported extension: VK_KHR_present_wait
Unsupported feature condition: VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT::swapchainMaintenance1 == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceExtendedDynamicState2FeaturesEXT::extendedDynamicState2PatchControlPoints == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentWaitFeaturesKHR::presentWait == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentIdFeaturesKHR::presentId == VK_TRUE
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_12_0_optimal, supported: no
Testing profile VP_D3D12_FL_12_1_baseline.
Unsupported extension: VK_EXT_fragment_shader_interlock
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderPixelInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderSampleInterlock == VK_TRUE
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_12_1_baseline, supported: no
Testing profile VP_D3D12_FL_12_2_baseline.
Unsupported extension: VK_EXT_fragment_shader_interlock
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderPixelInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderSampleInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceMeshShaderFeaturesEXT::taskShader == VK_TRUE
Unsupported properties condition: VkPhysicalDeviceConservativeRasterizationPropertiesEXT::fullyCoveredFragmentShaderInputVariable contains VK_TRUE
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_12_2_baseline, supported: no
Testing profile VP_D3D12_FL_12_2_optimal.
Unsupported extension: VK_EXT_fragment_shader_interlock
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderPixelInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderSampleInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceMeshShaderFeaturesEXT::taskShader == VK_TRUE
Unsupported properties condition: VkPhysicalDeviceConservativeRasterizationPropertiesEXT::fullyCoveredFragmentShaderInputVariable contains VK_TRUE
Unsupported extension: VK_EXT_swapchain_maintenance1
Unsupported extension: VK_KHR_present_id
Unsupported extension: VK_KHR_present_wait
Unsupported feature condition: VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT::swapchainMaintenance1 == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceExtendedDynamicState2FeaturesEXT::extendedDynamicState2PatchControlPoints == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentWaitFeaturesKHR::presentWait == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentIdFeaturesKHR::presentId == VK_TRUE
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_FL_12_2_optimal, supported: no
Testing profile VP_D3D12_maximum_nv.
Unsupported extension: VK_EXT_fragment_shader_interlock
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderPixelInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderSampleInterlock == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceMeshShaderFeaturesEXT::taskShader == VK_TRUE
Unsupported properties condition: VkPhysicalDeviceConservativeRasterizationPropertiesEXT::fullyCoveredFragmentShaderInputVariable contains VK_TRUE
Unsupported extension: VK_KHR_shader_maximal_reconvergence
Unsupported extension: VK_EXT_swapchain_maintenance1
Unsupported extension: VK_KHR_present_id
Unsupported extension: VK_KHR_present_wait
Unsupported feature condition: VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT::swapchainMaintenance1 == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceExtendedDynamicState2FeaturesEXT::extendedDynamicState2PatchControlPoints == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentWaitFeaturesKHR::presentWait == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentIdFeaturesKHR::presentId == VK_TRUE
Unsupported extension: VK_NV_device_generated_commands
Unsupported extension: VK_NV_device_generated_commands_compute
Unsupported feature condition: VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::deviceGeneratedCompute == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV::deviceGeneratedCommands == VK_TRUE
Unsupported extension: VK_NVX_binary_import
Unsupported extension: VK_NVX_image_view_handle
Unsupported extension: VK_NV_device_diagnostic_checkpoints
Unsupported extension: VK_NV_raw_access_chains
Unsupported extension: VK_NV_shader_sm_builtins
Unsupported feature condition: VkPhysicalDeviceRawAccessChainsFeaturesNV::shaderRawAccessChains == VK_TRUE
Unsupported properties condition: VkPhysicalDeviceProperties2KHR::properties.vendorID == 4318
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_maximum_nv, supported: no
Testing profile VP_D3D12_maximum_radv.
Unsupported feature condition: VkPhysicalDeviceMeshShaderFeaturesEXT::taskShader == VK_TRUE
Unsupported properties condition: VkPhysicalDeviceConservativeRasterizationPropertiesEXT::fullyCoveredFragmentShaderInputVariable contains VK_TRUE
Unsupported extension: VK_KHR_shader_maximal_reconvergence
Unsupported extension: VK_EXT_swapchain_maintenance1
Unsupported extension: VK_KHR_present_id
Unsupported extension: VK_KHR_present_wait
Unsupported feature condition: VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT::swapchainMaintenance1 == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceExtendedDynamicState2FeaturesEXT::extendedDynamicState2PatchControlPoints == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentWaitFeaturesKHR::presentWait == VK_TRUE
Unsupported feature condition: VkPhysicalDevicePresentIdFeaturesKHR::presentId == VK_TRUE
Unsupported extension: VK_NV_device_generated_commands
Unsupported extension: VK_NV_device_generated_commands_compute
Unsupported feature condition: VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::deviceGeneratedCompute == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV::deviceGeneratedCommands == VK_TRUE
Unsupported feature condition: VkPhysicalDeviceImageCompressionControlFeaturesEXT::imageCompressionControl == VK_TRUE
[RESULT] GPU: AMD Radeon Graphics, Profile: VP_D3D12_maximum_radv, supported: no