mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fix model chasecam crash
This commit is contained in:
parent
29c6782aa1
commit
f2e37d506e
2 changed files with 6 additions and 3 deletions
|
@ -248,6 +248,11 @@ void VkRenderState::ApplyRenderPass(int dt)
|
||||||
if (changingRenderPass)
|
if (changingRenderPass)
|
||||||
{
|
{
|
||||||
passKey.ClearTargets = mClearTargets;
|
passKey.ClearTargets = mClearTargets;
|
||||||
|
|
||||||
|
// Only clear depth+stencil if the render target actually has that
|
||||||
|
if (!mRenderTarget.DepthStencil)
|
||||||
|
passKey.ClearTargets &= ~(CT_Depth | CT_Stencil);
|
||||||
|
|
||||||
BeginRenderPass(passKey, mCommandBuffer);
|
BeginRenderPass(passKey, mCommandBuffer);
|
||||||
mRenderPassKey = passKey;
|
mRenderPassKey = passKey;
|
||||||
mClearTargets = 0;
|
mClearTargets = 0;
|
||||||
|
|
|
@ -766,7 +766,7 @@ inline GraphicsPipelineBuilder::GraphicsPipelineBuilder()
|
||||||
pipelineInfo.pViewportState = &viewportState;
|
pipelineInfo.pViewportState = &viewportState;
|
||||||
pipelineInfo.pRasterizationState = &rasterizer;
|
pipelineInfo.pRasterizationState = &rasterizer;
|
||||||
pipelineInfo.pMultisampleState = &multisampling;
|
pipelineInfo.pMultisampleState = &multisampling;
|
||||||
pipelineInfo.pDepthStencilState = nullptr;
|
pipelineInfo.pDepthStencilState = &depthStencil;
|
||||||
pipelineInfo.pColorBlendState = &colorBlending;
|
pipelineInfo.pColorBlendState = &colorBlending;
|
||||||
pipelineInfo.pDynamicState = &dynamicState;
|
pipelineInfo.pDynamicState = &dynamicState;
|
||||||
pipelineInfo.subpass = 0;
|
pipelineInfo.subpass = 0;
|
||||||
|
@ -896,8 +896,6 @@ inline void GraphicsPipelineBuilder::setDepthStencilEnable(bool test, bool write
|
||||||
depthStencil.depthTestEnable = test ? VK_TRUE : VK_FALSE;
|
depthStencil.depthTestEnable = test ? VK_TRUE : VK_FALSE;
|
||||||
depthStencil.depthWriteEnable = write ? VK_TRUE : VK_FALSE;
|
depthStencil.depthWriteEnable = write ? VK_TRUE : VK_FALSE;
|
||||||
depthStencil.stencilTestEnable = stencil ? VK_TRUE : VK_FALSE;
|
depthStencil.stencilTestEnable = stencil ? VK_TRUE : VK_FALSE;
|
||||||
|
|
||||||
pipelineInfo.pDepthStencilState = (test || write || stencil) ? &depthStencil : nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void GraphicsPipelineBuilder::setStencil(VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, uint32_t compareMask, uint32_t writeMask, uint32_t reference)
|
inline void GraphicsPipelineBuilder::setStencil(VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, uint32_t compareMask, uint32_t writeMask, uint32_t reference)
|
||||||
|
|
Loading…
Reference in a new issue