bigwheels
bigwheels copied to clipboard
ClearRenderTarget/ClearDepthStencil don't work with dynamic render passes
This is a follow up from https://github.com/google/bigwheels/pull/356
ClearRenderTarget/ClearDepthStencil (https://github.com/google/bigwheels/blob/b0bded04e4fc17048443ee4ef74507a2e6a942f2/src/ppx/grfx/vk/vk_command.cpp#L289) accept an image and clear an image while inside a render pass. The functions use current render pass variable to figure out the attachment index and and render area. When we have a dynamic render pass we can look up the attachment index by the image instead of the image view and save the render area on BeginRendering and BeginRenderpass. We would also have to check that there is an active render pass here https://github.com/google/bigwheels/blob/b0bded04e4fc17048443ee4ef74507a2e6a942f2/src/ppx/grfx/vk/vk_command.cpp#L294 with HasActiveRenderPass
pull #414 does not address DX12
As a follow up - before this issue can be closed, changes also need to be made for DX12 - https://github.com/google/bigwheels/blob/main/src/ppx/grfx/dx12/dx12_command.cpp#L416