libcg / grvk

Vulkan-based Mantle API implementation
https://en.wikipedia.org/wiki/Mantle_(API)
zlib License
221 stars 14 forks source link

Clear images through BeginRendering #33

Open Cherser-s opened 2 years ago

Cherser-s commented 2 years ago

Added clearing image through vkCmdBeginRenderingKHR if an application performs placing clear barriers, clear and subsequent grCmdBindTargets call in the same command buffer. Only works in the case if the application uses levelCount = 1 and layerCount = 1 both in barriers and clear calls.

Works for BF4, although the game does separate image clears between different command buffers, so it doesn't work for each image in the game.