bevy_render: Do not remove VALIDATION_INDIRECT_CALL if Backends contains DX12#24129
Conversation
…to accomodate dx-12
alice-i-cecile
left a comment
There was a problem hiding this comment.
Terrible stuff. Good fix though! Thanks for the clear comment and sleuthing.
|
This is unfortunate in that even if you use Vulkan and not DirectX, it still does the validation :/. Oh well though. |
|
Please add a flag to remove the validation. I'd gladly lose any feature over having that nonsense. I've argued countless times with the wgpu team, they ignored or closed my issues. Please let the user access the flags and let them disable that validation layer, it absolutely destroys any attempt at optimizing compute workloads. I know it breaks some DX12 feature and again I'd gladly lose that feature (which can be worked around) rather than have wgpu inject useless compute dispatches which mess with bound resources, not even in a clever way (they let you bind your resources, they overwrite the bindings, inject the dispatch, and rebind your resources a second time). |
|
Can DX12 only be used on Windows? If so we can always remove the validation on non-windows platforms. |
The feature lost here is... transforms |
I was not sure about this, but since the problem is specific to DX-12, I don’t want to encode that assumption unless we are in general OK with tying those two together. |
It's relatively easy to work around the limitations of firstInstance with push constants (immediate constants) on DX12. And you don't need it on other backends. Unless there's another limitation? |
|
Good enough for now. |
IceSentry
left a comment
There was a problem hiding this comment.
I'm not a fan of the unwrap in the if. Also, please use DX12 not dx-12 in the comments.
Objective
Solution
VALIDATION_INDIRECT_CALL, and add a comment about it.Testing
VALIDATION_INDIRECT_CALLif Backends contains DX-12 #24122 by itself fixes the issue in Pixel Eagle. It was also confirmed to fix the issue by @meepleek — Thank you for testing locally!(Just decided to remake the PR after main was force pushed)