note: 3DMark also includes a DXR feature test.. but this test requires DXR 1.1 (uses ray queries?) and not sure if DXR 1.1 supported by VKD3D yet..
DXR 1.1 is not yet supported.
@SveSop yep I know..
just pointing that tested with latest VKD3D to see if:
1036:err:vkd3d_dxil_log_callback: dxil-spirv: Invalid type ID in cast<T>.
had been fixed by latest cast fixes but seems I updated to latest 3DMark and now the failing is different it fails before showing loading screen (i.e. earlier) and the culprit seems to be d3d12_device_CreateSharedHandle being a stub:
19820:fixme:d3d12_device_CreateSharedHandle: iface 000000001392c040, object 000000001d1ad4a0, attributes 0000000000000000, access 0x10000000, name "Intermediate copy texture 0", handle 000000000014d9b0 stub!
19820:fixme:d3d12_device_CreateSharedHandle: iface 000000001392c040, object 000000001d1ad4a0, attributes 0000000000000000, access 0x10000000, name "Intermediate copy texture 0", handle 000000000014d9b0 stub!
full log:
vkd3dlog.txt
This will not be implemented any time soon, it needs Wine work for shared resource shite.
seeing now 3DMark night raid and time spy render OK with VKD3D, next seems Port Royal..
@HansKristian-Work @Joshua-Ashton @Guy1524 curious how difficult is to support shared resources in VKD3D seeing up to date wine forks with support for shared resources (https://github.com/Guy1524/wine/commits/shared-resources)
thanks..
Does it work now with the latest proton ge or proton experimental?
@oscarbg Friendly ping. Would you be able to retest this?
@oscarbg
19820:fixme:d3d12_device_CreateSharedHandle: iface 000000001392c040, object 000000001d1ad4a0, attributes 0000000000000000, access 0x10000000, name "Intermediate copy texture 0", handle 000000000014d9b0 stub! 19820:fixme:d3d12_device_CreateSharedHandle: iface 000000001392c040, object 000000001d1ad4a0, attributes 0000000000000000, access 0x10000000, name "Intermediate copy texture 0", handle 000000000014d9b0 stub!
Make sure you only have one vulkan driver reported (llvmpipe doesn't count, but having both RADV and AMDVLK installed count as 2 drivers). It looks like 3DMark's DX12 demos will use shared resources in the case they think there is more than 1 device. I use the 'DXVK_FILTER_DEVICE_NAME' environment variable to do this.
As for Port Royal, for some reason, I'm unable to start the benchmark on Linux. It may be a Wine/Proton issue as I'm able to get to the loading screen on Windows. However, it crashes at the end of the loading. The log shows the same issue as the first post: ending with 1036:err:vkd3d_dxil_log_callback: dxil-spirv: Invalid type ID in cast<T>.
For the 3DMark DXR test, I can't start the bench on Proton too. However, this one works fine on Windows, with lower performance (~12 FPS on VKD3D instead of ~16)
Tested on Proton Experimental, VKD3D 2.8, mesa 23.0, RX 6700, with VKD3D_CONFIG=dxr11 and VKD3D_FEATURE_LEVEL=12_2
Yep will try to test that soon.. my RTX GPU died some months ago and using a Maxwell since then..
@oscarbg
19820:fixme:d3d12_device_CreateSharedHandle: iface 000000001392c040, object 000000001d1ad4a0, attributes 0000000000000000, access 0x10000000, name "Intermediate copy texture 0", handle 000000000014d9b0 stub! 19820:fixme:d3d12_device_CreateSharedHandle: iface 000000001392c040, object 000000001d1ad4a0, attributes 0000000000000000, access 0x10000000, name "Intermediate copy texture 0", handle 000000000014d9b0 stub!Make sure you only have one vulkan driver reported (llvmpipe doesn't count, but having both RADV and AMDVLK installed count as 2 drivers). It looks like 3DMark's DX12 demos will use shared resources in the case they think there is more than 1 device. I use the 'DXVK_FILTER_DEVICE_NAME' environment variable to do this.
As for Port Royal, for some reason, I'm unable to start the benchmark on Linux. It may be a Wine/Proton issue as I'm able to get to the loading screen on Windows. However, it crashes at the end of the loading. The log shows the same issue as the first post: ending with
1036:err:vkd3d_dxil_log_callback: dxil-spirv: Invalid type ID in cast<T>.For the 3DMark DXR test, I can't start the bench on Proton too. However, this one works fine on Windows, with lower performance (~12 FPS on VKD3D instead of ~16)
Tested on Proton Experimental, VKD3D 2.8, mesa 23.0, RX 6700, with VKD3D_CONFIG=dxr11 and VKD3D_FEATURE_LEVEL=12_2
you also have to do VKD3D_FILTER_DEVICE_NAME for dx12 benchmarks to work and also install native d3dcompiler_43 and d3dcompiler_47 in your prefix
with this port royal performance is better than native I think (I haven't compared)
time spy will also run, but due to some vkd3d or maybe driver bug it has some graphical glitches and can cause GPU hangs
make sure to use vkd3d-git as well, it has faster descriptor copies -> more berf (you can get it using proton experimental bleeding edge beta)
just testing from Windows and seems the bug
err:vkd3d_dxil_log_callback: dxil-spirv: Invalid type ID in cast.
is still present..
@oscarbg Could i get you to give this one another spin?
Hey, not sure if it's a good idea to post this in an existing issue for an existing game (from before DXR 1.1 was implemented) or if this should go to https://github.com/HansKristian-Work/dxil-spirv, but it's the only issue that mentions
dxil-spirv: Invalid type ID in cast<T>.. We're hitting it now on one of our HLSL shaders with a ray query, when testing latestmaster@ 298eaf00036f8f1cb4410c9e21b5208ed9a66c67.Using "the latest"
v1.8.2505.1DXC with a simple-T cs_6_6 -E main, creating a conditionalRAY_FLAGvariable forRayQuery::TraceRayInline()based on two short-circuiting||or&&results indxil-spirv: Invalid type ID in cast<T>.. Replacing one of those ops with a binary variant (|or&), or making at least one of the expression sources a properconst(where the RHS is actually a compiel time constant) for example solves this issue.The full shader source and comparison is available on GodBolt, with this being the most important code snippet:
uint bounce = g_bindingsOffset.userData0; bool alphaOnPrimary = (bnd.randomConstant & (1 << 1)); bool shouldAlphaTest = (bnd.randomConstant & (1 << 0)); // Broken // bool alphaTest = (alphaOnPrimary && (bounce == 0)) || shouldAlphaTest; // Works bool alphaTest = (alphaOnPrimary && (bounce == 0)) | shouldAlphaTest; // Also works // bool alphaTest = (alphaOnPrimary & (bounce == 0)) || shouldAlphaTest; RAY_FLAG flags = 0; if (!alphaTest) flags |= RAY_FLAG_FORCE_OPAQUE; q.TraceRayInline(tlas, flags, 0xff, ray);
Additionally, as mentioned, here is an example changing between
uint bounce = 0;andconst uint bounce = 0;to also trigger this issue.
If convenient, let me know and I can provide the compiled DXIL for these sources; though I assume being able to live tweak and recompile it is also useful?
I would recommend making a new issue
Hey, not sure if it's a good idea to post this in an existing issue for an existing game (from before DXR 1.1 was implemented) or if this should go to https://github.com/HansKristian-Work/dxil-spirv, but it's the only issue that mentions
dxil-spirv: Invalid type ID in cast<T>.. We're hitting it now on one of our HLSL shaders with a ray query, when testing latestmaster@ 298eaf00036f8f1cb4410c9e21b5208ed9a66c67.Using "the latest"
v1.8.2505.1DXC with a simple-T cs_6_6 -E main, creating a conditionalRAY_FLAGvariable forRayQuery::TraceRayInline()based on two short-circuiting||or&&results indxil-spirv: Invalid type ID in cast<T>.. Replacing one of those ops with a binary variant (|or&), or making at least one of the expression sources a properconst(where the RHS is actually a compiel time constant) for example solves this issue.The full shader source and comparison is available on GodBolt, with this being the most important code snippet:
uint bounce = g_bindingsOffset.userData0; bool alphaOnPrimary = (bnd.randomConstant & (1 << 1)); bool shouldAlphaTest = (bnd.randomConstant & (1 << 0)); // Broken // bool alphaTest = (alphaOnPrimary && (bounce == 0)) || shouldAlphaTest; // Works bool alphaTest = (alphaOnPrimary && (bounce == 0)) | shouldAlphaTest; // Also works // bool alphaTest = (alphaOnPrimary & (bounce == 0)) || shouldAlphaTest; RAY_FLAG flags = 0; if (!alphaTest) flags |= RAY_FLAG_FORCE_OPAQUE; q.TraceRayInline(tlas, flags, 0xff, ray);
Additionally, as mentioned, here is an example changing between
uint bounce = 0;andconst uint bounce = 0;to also trigger this issue.
If convenient, let me know and I can provide the compiled DXIL for these sources; though I assume being able to live tweak and recompile it is also useful?
I would recommend making a new issue
Moved to https://github.com/HansKristian-Work/vkd3d-proton/issues/2809. @Etaash-mathamsetty I would recommend only quoting the relevant part of my rather large comment, and removing the accidental duplicate reply 😉
proton experimentalx3 2023-03DXVK_FILTER_DEVICE_NAMEx2 2023-03VKD3D_CONFIG=dxr11x2 2023-03VKD3D_FEATURE_LEVEL=12_2x2 2023-03VKD3D_FILTER_DEVICE_NAMEx1 2023-03VKD3D_DEBUG=tracex1 2021-03
Hi,
just running 3DMark Port Royal DXR from Windows..
fails upon loading and closes..
log using VKD3D_DEBUG=trace but still not using a VKD3D debug build (will post later) points to:
1036:err:vkd3d_dxil_log_callback: dxil-spirv: Invalid type ID in cast.
full log:
portroyalvkd3dlog.txt
note: 3DMark also includes a DXR feature test.. but this test requires DXR 1.1 (uses ray queries?) and not sure if DXR 1.1 supported by VKD3D yet..