Vulkan: fix stack use-after-free (#6639)
This commit is contained in:
committed by
Benjamin Doherty
parent
9fed30af55
commit
e1ebe97eb5
@@ -1016,10 +1016,10 @@ void VulkanDriver::beginRenderPass(Handle<HwRenderTarget> rth, const RenderPassP
|
||||
|
||||
rt->transformClientRectToPlatform(&renderPassInfo.renderArea);
|
||||
|
||||
VkClearValue clearValues[
|
||||
MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT + MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT +
|
||||
1] = {};
|
||||
if (params.flags.clear != TargetBufferFlags::NONE) {
|
||||
VkClearValue clearValues[
|
||||
MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT + MRT::MAX_SUPPORTED_RENDER_TARGET_COUNT +
|
||||
1] = {};
|
||||
|
||||
// NOTE: clearValues must be populated in the same order as the attachments array in
|
||||
// VulkanFboCache::getFramebuffer. Values must be provided regardless of whether Vulkan is
|
||||
|
||||
Reference in New Issue
Block a user