Validation layer wants layout specified during linking (is it right? nobody knows! the vulkan spec is unreadable in this part, thanks khronos!)

Fix light probe pass using depth stencil format selection before it was set
This commit is contained in:
Magnus Norddahl 2025-04-20 18:15:38 +02:00
commit 26b10dbdda
12 changed files with 108 additions and 71 deletions

View file

@ -826,8 +826,6 @@ void VkRenderState::SetRenderTarget(VkTextureImage *image, VulkanImageView *dept
mRenderTarget.Height = height;
mRenderTarget.Format = format;
mRenderTarget.Samples = samples;
mRenderTarget.NormalFormat = buffers->SceneNormalFormat;
mRenderTarget.DepthStencilFormat = buffers->SceneDepthStencilFormat;
}
void VkRenderState::BeginRenderPass(VulkanCommandBuffer *cmdbuffer)
@ -837,8 +835,6 @@ void VkRenderState::BeginRenderPass(VulkanCommandBuffer *cmdbuffer)
key.Samples = mRenderTarget.Samples;
key.DrawBuffers = mRenderTarget.DrawBuffers;
key.DepthStencil = !!mRenderTarget.DepthStencil;
key.NormalFormat = mRenderTarget.NormalFormat;
key.DepthStencilFormat = mRenderTarget.DepthStencilFormat;
mPassSetup = fb->GetRenderPassManager()->GetRenderPass(key);
@ -895,8 +891,6 @@ void VkRenderState::RaytraceScene(const FVector3& cameraPos, const VSMatrix& vie
key.Samples = mRenderTarget.Samples;
key.DrawBuffers = mRenderTarget.DrawBuffers;
key.DepthStencil = !!mRenderTarget.DepthStencil;
key.NormalFormat = mRenderTarget.NormalFormat;
key.DepthStencilFormat = mRenderTarget.DepthStencilFormat;
fb->GetLevelMesh()->RaytraceScene(key, mCommandBuffer, cameraPos, viewToWorld, fovy, aspect);
}