Closed zakorgy closed 4 years ago
The DX12 backend is depending on https://github.com/gfx-rs/gfx/issues/3009
assuming no validation errors
With Vulkan everything is fine. I will check the DX12 backend again after https://github.com/gfx-rs/gfx/pull/3014#issuecomment-531694250 is figured out.
Change the transition logic to be more transparent, and don't rely on the previous image state to pick the source pipeline stage. Changed the default layot to
ShaderReadonlyOptiomal (SRO)
for new images instead ofColorAttachmentOptimal (CAO)
. If a texture is bound as draw target it's corresponding image is transitioned to theCAO
layout. If a new texture with a new images is bound as draw target we transit back the old image toSRO
. If an image is transitioned for some purpose (copy, blit, clear) we always transit back to the previous state which could be onlySRO
orCAO
. There are two exceptions frame and depth images:CAO
layout (noSRO
).DepthStencilAttachmentOptimal (DSAO)
layout, since there is only one operation which requires a layout transition for these but after that we return toDSAO
.Benefit: To rework our render pass logic it's good to know that our render target is in the proper state.
Things left: