include debug information

This commit is contained in:
Samuliak 2024-07-07 12:12:34 +02:00
parent 1353af5af4
commit 3431f6d192
8 changed files with 37 additions and 1 deletions

View file

@ -72,6 +72,9 @@ class RendererMTL final : public Renderer {
MTL::Texture* lastColorTexture = nullptr;
MTL::Texture* lastDepthTexture = nullptr;
// Debug
std::string nextRenderPassName;
void createCommandBufferIfNeeded() {
if (!commandBuffer) {
commandBuffer = commandQueue->commandBuffer();
@ -92,6 +95,7 @@ class RendererMTL final : public Renderer {
endRenderPass();
renderCommandEncoder = commandBuffer->renderCommandEncoder(renderPassDescriptor);
renderCommandEncoder->setLabel(toNSString(nextRenderPassName));
lastColorTexture = colorTexture;
lastDepthTexture = depthTexture;