HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.8k stars 185 forks source link

Support for D3D12CheckFeatureSupport (updated to report up to D3D12_FEATURE_DATA_D3D12_OPTIONS15) #1167

Open oscarbg opened 2 years ago

oscarbg commented 2 years ago

Hi, I attach my build of Beyond3D's D3D12CheckFeatureSupport program updated to report up to D3D12_FEATURE_DATA_D3D12_OPTIONS15 capabilities built using latest Agility SDK 1.706.3.. I built and used for checking& getting fine grained info on support for new features by new AMD Agility driver.. I also include a report of it: d3d12checkjul22.zip

seems VKD3D supports up to D3D12_FEATURE_DATA_D3D12_OPTIONS11.. of course not asking VKD3D to support any of this new features yet, just that they report correctly as :0 (not supported)..

running using latest VKD3D from master fails on D3D12_FEATURE_DATA_D3D12_OPTIONS12-15

fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x29
fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x2a
fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x2b
fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x2c

full log below..

thanks..

D3D12CheckFeatureSupport.exe
Direct3D 12 feature checker (April 2021) by DmitryKo (x64)
https://forum.beyond3d.com/posts/1840641/

Windows 10 version 2009 (build  rs_prerelease) x64

info:  Game: D3D12CheckFeatureSupport.exe
info:  DXVK: v1.10.2
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
info:    OpenXR
info:  OpenVR: could not open registry key, status 2
info:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_surface_capabilities2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  Radeon RX Vega:
info:    Driver: 2.0.226
info:    Vulkan: 1.3.212
info:    Memory Heap[0]:
info:      Size: 7920 MiB
info:      Flags: 0x3
info:      Memory Type[0]: Property Flags = 0x1
info:      Memory Type[4]: Property Flags = 0xc1
info:    Memory Heap[1]:
info:      Size: 16106 MiB
info:      Flags: 0x0
info:      Memory Type[1]: Property Flags = 0x6
info:      Memory Type[3]: Property Flags = 0xe
info:      Memory Type[5]: Property Flags = 0xc6
info:      Memory Type[7]: Property Flags = 0xce
info:    Memory Heap[2]:
info:      Size: 256 MiB
info:      Flags: 0x3
info:      Memory Type[2]: Property Flags = 0x7
info:      Memory Type[6]: Property Flags = 0xc7
info:  NVIDIA GeForce GTX 970:
info:    Driver: 516.63.0
info:    Vulkan: 1.3.217
info:    Memory Heap[0]:
info:      Size: 4043 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 16362 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:    Memory Heap[2]:
info:      Size: 214 MiB
info:      Flags: 0x1
info:      Memory Type[11]: Property Flags = 0x7
ADAPTER 0
"Radeon RX Vega"
VEN_1002, DEV_687F, SUBSYS_00000000, REV_00
Dedicated video memory : 8176.0 MB (8573157376 bytes)
Total video memory : 24282.0 MB (25461522432 bytes)
Video driver version : 30.0.21023.5005
WDDM version : KMT_DRIVERVERSION_WDDM_3_0 (3000)
Virtual memory model : GPUMMU
Hardware-accelerated scheduler : Disabled, DXGK_FEATURE_SUPPORT_ALWAYS_OFF (0)
GraphicsPreemptionGranularity : DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY (0)
ComputePreemptionGranularity : DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY (0)
3818:info:vkd3d_instance_deduce_config_flags_from_environment: shader_cache is used, global_pipeline_cache is enforced.
3818:info:vkd3d_config_flags_init_once: VKD3D_CONFIG=''.
3818:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.6.0.
3818:info:vkd3d_instance_init: vkd3d-proton - build: 5b73139f182d86c.
3818:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x0.
3818:info:vkd3d_bindless_state_get_bindless_flags: Device does not support VK_VALVE_mutable_descriptor_type.
3818:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 3584, may be inaccurate.
3818:info:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
3818:info:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
Maximum feature level : D3D_FEATURE_LEVEL_12_0 (0xc000)
DoublePrecisionFloatShaderOps : 1
OutputMergerLogicOp : 1
MinPrecisionSupport : D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE (0) (0b0000'0000)
4TiledResourcesTier : D3D12_TILED_RESOURCES_TIER_3 (3)
ResourceBindingTier : D3D12_RESOURCE_BINDING_TIER_3 (3)
PSSpecifiedStencilRefSupported : 1
fTypedUAVLoadAdditionalFormats : 1
ROVsSupported : 0
cConservativeRasterizationTier : D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 (2)
StandardSwizzle64KBSupported : 0
8CrossNodeSharingTier : D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED (0)
CrossAdapterRowMajorTextureSupported : 0
:VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation : 1
ResourceHeapTier : D3D12_RESOURCE_HEAP_TIER_2 (2)
iMaxGPUVirtualAddressBitsPerResource : 40
MaxGPUVirtualAddressBitsPerProcess : 40
nAdapter Node 0:        TileBasedRenderer: 0, UMA: 0, CacheCoherentUMA: 0, IsolatedMMU: 1, HeapSerializationTier: 0, ProtectedResourceSession.Support: 0
fHighestShaderModel : D3D12_SHADER_MODEL_6_5 (0x0065)
WaveOps : 1
oWaveLaneCountMin : 64
WaveLaneCountMax : 64
:TotalLaneCount : 3584
ExpandedComputeResourceStates : 1
vInt64ShaderOps : 1
kRootSignature.HighestVersion : D3D_ROOT_SIGNATURE_VERSION_1_1 (2)
DepthBoundsTestSupported : 1
dProgrammableSamplePositionsTier : D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED (0)
ShaderCache.SupportFlags : D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO | LIBRARY | AUTOMATIC_INPROC_CACHE | AUTOMATIC_DISK_CACHE (15) (0b0000'1111)
3CopyQueueTimestampQueriesSupported : 1
CastingFullyTypedFormatSupported : 1
WriteBufferImmediateSupportFlags : D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT | BUNDLE | COMPUTE | COPY (15) (0b0000'1111)
dViewInstancingTier : D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED (0)
BarycentricsSupported : 0
_ExistingHeaps.Supported : 0
MSAA64KBAlignedTextureSupported : 0
SharedResourceCompatibilityTier : D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0 (0)
pNative16BitShaderOpsSupported : 1
AtomicShaderInstructions : 0
SRVOnlyTiledResourceTier3 : 1
iRenderPassesTier : D3D12_RENDER_PASS_TIER_0 (0)
RaytracingTier : D3D12_RAYTRACING_TIER_NOT_SUPPORTED (0)
pAdditionalShadingRatesSupported : 0
PerPrimitiveShadingRateSupportedWithViewportIndexing : 0
eVariableShadingRateTier : D3D12_VARIABLE_SHADING_RATE_TIER_NOT_SUPPORTED (0)
ShadingRateImageTileSize : 0
lBackgroundProcessingSupported : 0
MeshShaderTier : D3D12_MESH_SHADER_TIER_NOT_SUPPORTED (0)
iSamplerFeedbackTier : D3D12_SAMPLER_FEEDBACK_TIER_NOT_SUPPORTED (0)
UnalignedBlockTexturesSupported : 1
nMeshShaderPipelineStatsSupported : 0
MeshShaderSupportsFullRangeRenderTargetArrayIndex : 0
eAtomicInt64OnTypedResourceSupported : 1
AtomicInt64OnGroupSharedSupported : 1
DerivativesInMeshAndAmplificationShadersSupported : 0
_WaveMMATier : D3D12_WAVE_MMA_TIER_NOT_SUPPORTED (0)
VariableRateShadingSumCombinerSupported : 0
lMeshShaderPerPrimitiveShadingRateSupported : 0
AtomicInt64OnDescriptorHeapResourceSupported : 1
ibrary_disk_thread_main: Performing async setup of stream archive ...
3818:fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x29.
Failed to query feature data 12
4fErcror 80X80:0040i01: nNo ifmpleome:ntvadko
d
d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
3818:fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x2a.
Failed to query feature data 13
4Erfrocr 0X88000:4001i: No nimplfemoen:tavdok
d
3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 24.888 ms.
3818:fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x2b.
Failed to query feature data 14
4Efrrcor 80X:80i00n40f01o: N:o vimkpldem3endta_dop
i
peline_library_disk_cache_initial_setup: Failed to map read-only cache: vkd3d-proton.cache.
3818:fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x2c.
Failed to query feature data 15
4Efrrorc 0X880004:001:i Nno fimopl:emvenktaddo3
d
_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
3818:fixme:d3d12_device_CheckFeatureSupport: Unhandled feature 0x1c.
Failed to query feature data displayable texture
Error 0X80004001: No implementado

DisplayableTexture.SharedResourceCompatibilityTier : D3D12_SHARED_RESOURCE_COMPATIBILITY_TIER_0 (0)
3818:fixme:d3d12_device_EnumerateMetaCommands: iface 000002f116616040, count 000000f39f1ffb20, descs 0000000000000000 stub!
3818:fixme:d3d12_device_EnumerateMetaCommands: iface 000002f116616040, count 000000f39f1ffb20, descs 000002f106938740 stub!
doitsujin commented 2 years ago

There doesn't seem to be any public documentation or header file yet so we cannot support this right now.

oscarbg commented 2 years ago

Yes headers are public.. at least in three places: 1)https://github.com/microsoft/DirectX-Headers/blob/main/include/directx/d3d12.h also a release: https://github.com/microsoft/DirectX-Headers/releases/tag/v1.606.3 2)latest Windows Insider SDKs.. 3)Agility SDK nupkg files: https://www.nuget.org/packages/Microsoft.Direct3D.D3D12/1.706.3-preview https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.706.3-preview

latest two also include new d3d12core.dll and lib files..

from d3d12 header options I used:

typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS12
    {
    _Out_  D3D12_TRI_STATE MSPrimitivesPipelineStatisticIncludesCulledPrimitives;
    _Out_  BOOL EnhancedBarriersSupported;
    _Out_  BOOL RelaxedFormatCastingSupported;
    }   D3D12_FEATURE_DATA_D3D12_OPTIONS12;

typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS13
    {
    _Out_  BOOL UnrestrictedBufferTextureCopyPitchSupported;
    _Out_  BOOL UnrestrictedVertexElementAlignmentSupported;
    _Out_  BOOL InvertedViewportHeightFlipsYSupported;
    _Out_  BOOL InvertedViewportDepthFlipsZSupported;
    _Out_  BOOL TextureCopyBetweenDimensionsSupported;
    _Out_  BOOL AlphaBlendFactorSupported;
    }   D3D12_FEATURE_DATA_D3D12_OPTIONS13;

typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS14
    {
    _Out_  BOOL AdvancedTextureOpsSupported;
    _Out_  BOOL WriteableMSAATexturesSupported;
    _Out_  BOOL IndependentFrontAndBackStencilRefMaskSupported;
    }   D3D12_FEATURE_DATA_D3D12_OPTIONS14;

typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS15
    {
    _Out_  BOOL TriangleFanSupported;
    _Out_  BOOL DynamicIndexBufferStripCutSupported;
    }   D3D12_FEATURE_DATA_D3D12_OPTIONS15;
doitsujin commented 2 years ago

There's still no documentation, and it's rather pointless to support these without also supporting the corresponding ID3D12Device15 etc. interfaces since this isn't how the native runtime works. As long as this isn't a hard requirement for any application I don't just want to waste time adding stubs.

oscarbg commented 2 years ago

it's understandable, no problem.. Prefer to leave it open anyway..

Samsagax commented 1 year ago

Hello. Doing some digging into WRC Generations it seems it needs DirectX Agile SDK to even launch. So maybe this one could have a second chance? I see more and more games will be using the shiny new thing in the near future, unfortunately.

Anything I can do to help, let me know.

mbriar commented 1 year ago

it needs DirectX Agile SDK to even launch

Games using that should ship a d3d12core.dll somewhere in their game files, there are some using the Agility SDK that do already work, like Monster Hunter Rise. Are you sure it's related to this bug?

Samsagax commented 1 year ago

the file is present under /D3D12/D3D12Core.dll All dll files are in camelcase/caps Does that influence the thing? How could I test that?

mbriar commented 1 year ago

No, that doesn't matter, I just meant that using the Agility SDK ifself shouldn't be a problem. You should be able to see in the log (with VKD3D_DEBUG=trace) if it queries D3D12_FEATURE_DATA_D3D12_OPTIONS12 or higher, or ID3D12Device10 or higher, which is what this bugreport is about.

Samsagax commented 1 year ago

Is unrelated then. I don´t see anything related to D3D12_FEATURE_DATA nor ID3D12 in the log. Seems to crash before that.