mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
fix: incorrect render pass end logic
This commit is contained in:
parent
d435b38018
commit
7ca08004af
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ class RendererMTL final : public Renderer {
|
||||||
void beginRenderPassIfNeeded(MTL::RenderPassDescriptor* renderPassDescriptor, bool doesClears, MTL::Texture* colorTexture, MTL::Texture* depthTexture = nullptr) {
|
void beginRenderPassIfNeeded(MTL::RenderPassDescriptor* renderPassDescriptor, bool doesClears, MTL::Texture* colorTexture, MTL::Texture* depthTexture = nullptr) {
|
||||||
createCommandBufferIfNeeded();
|
createCommandBufferIfNeeded();
|
||||||
|
|
||||||
if (doesClears || !renderCommandEncoder || colorTexture != lastColorTexture || (depthTexture != lastDepthTexture || depthTexture == nullptr)) {
|
if (doesClears || !renderCommandEncoder || colorTexture != lastColorTexture || (depthTexture != lastDepthTexture && !(lastDepthTexture && !depthTexture))) {
|
||||||
endRenderPass();
|
endRenderPass();
|
||||||
|
|
||||||
renderCommandEncoder = commandBuffer->renderCommandEncoder(renderPassDescriptor);
|
renderCommandEncoder = commandBuffer->renderCommandEncoder(renderPassDescriptor);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue