Check for Typed UAV Load Additional Formats capability when creating D3D12 device.#112989
Conversation
clayjohn
left a comment
There was a problem hiding this comment.
I guess the idea here is that the engine simply can't run if TypedUAVLoadAdditionalFormats is false? I'm a little bit surprised since we were only using it for half float detection before.
Is there some place where we are implicitly relying on half floats being available? Or does TypedUAVLoadAdditionalFormats just cover more functionality than half floats?
|
Yes, a lot of storage textures in Godot use half floats and load them using imageLoad in compute shaders without any prior checks to see if that's actually supported. Making this value in the shader translator true might help, but I found some shaders that use both |
|
I see. I think the intention here was to check if loading half floats directly from SSBOs is supported to match the check in Vulkan. But it looks like this covers texture loads as well. We definitely use RG16 widely, so we need to ensure that it is available. Anything old enough to not support it likely shouldn't be using the RD renderera anyway |
|
Thanks! |
|
Cherry-picked for 4.5.2. |
Tested on GT 740M. This device has no support for the capability, so a ton of compute pipelines just fail to create. Better to redirect to Vulkan.
Relevant: https://d3d12infodb.boolka.dev/CanIUse.html?q=D3D12_FEATURE_DATA_D3D12_OPTIONS.TypedUAVLoadAdditionalFormats