DustinHLand / vkDOOM3

Vulkan DOOM 3 port based on DOOM 3 BFG Edition
GNU General Public License v3.0
854 stars 91 forks source link

Add a renderpass object to avoid corrupting in GL_CopyFrameBuffer #26

Closed scygan closed 3 years ago

scygan commented 3 years ago

Add a renderpass object to avoid corrupting in GL_CopyFrameBuffer …

This fixes the undefined behavior, where renderpass with loadOp == DONT_CARE and initialLayout == UNDEFINED was re-started in GL_CopyFrameBuffer. As the framebuffer already was filled with data from before GL_CopyFrameBuffer, this data was corrupted in vkCmdBeginRenderpass.

To avoid that, another renderpass object is created with loadOp == LOAD and proper initialLayout is created and used in and after GL_CopyFrameBuffer.

Fixes #24

Authored-by: Lesniewska, Anna Anna.Lesniewska@intel.com

DustinHLand commented 3 years ago

Thanks for the PR!