Open st0rmbtw opened 3 months ago
This is a known issue and needs a larger refactor in the D3D12 backend for resource state transitioning. Unfortunately, this type of resource transitioning for Mip generation is implemented this way even in Microsoft's MiniEngine example: https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/MiniEngine/Core/ColorBuffer.cpp#L172
What we can do in the short term is to silence this validation notification until the resource state transitioning is more precise, i.e. works on a per-subresource level rather than a per-resource level. I assume that would be D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE
which we can add here at D3D12Device.cpp:192.
I get this validation error after the
CreateTexture
method call when the texture has theGenerateMips
flag.The error occurs after the
Dispatch
method call here: https://github.com/LukasBanana/LLGL/blob/2232eb6eb37b08097ef147d68ae2baf9f120668e/sources/Renderer/Direct3D12/Texture/D3D12MipGenerator.cpp#L282-L286P.S. Here's the texture descriptor: