From 5a289681e511ec419829291c7281cdd3c7918b7f Mon Sep 17 00:00:00 2001 From: skallweitNV <64953474+skallweitNV@users.noreply.github.com> Date: Tue, 11 Jun 2024 17:21:45 +0200 Subject: [gfx] Metal texture fixes (#4331) --- tools/gfx/metal/metal-command-encoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/gfx/metal/metal-command-encoder.cpp') diff --git a/tools/gfx/metal/metal-command-encoder.cpp b/tools/gfx/metal/metal-command-encoder.cpp index 3e0fbd1f6..fa1df263e 100644 --- a/tools/gfx/metal/metal-command-encoder.cpp +++ b/tools/gfx/metal/metal-command-encoder.cpp @@ -227,7 +227,7 @@ void RenderCommandEncoder::beginPass(IRenderPassLayout* renderPass, IFramebuffer { TextureResourceViewImpl* renderTargetView = m_framebuffer->m_renderTargetViews[i]; MTL::RenderPassColorAttachmentDescriptor* colorAttachment = m_renderPassDesc->colorAttachments()->object(i); - colorAttachment->setTexture(renderTargetView->m_texture->m_texture.get()); + colorAttachment->setTexture(renderTargetView->m_textureView.get()); colorAttachment->setLevel(renderTargetView->m_desc.subresourceRange.mipLevel); colorAttachment->setSlice(renderTargetView->m_desc.subresourceRange.baseArrayLayer); } @@ -239,14 +239,14 @@ void RenderCommandEncoder::beginPass(IRenderPassLayout* renderPass, IFramebuffer if (MetalUtil::isDepthFormat(pixelFormat)) { MTL::RenderPassDepthAttachmentDescriptor* depthAttachment = m_renderPassDesc->depthAttachment(); - depthAttachment->setTexture(depthStencilView->m_texture->m_texture.get()); + depthAttachment->setTexture(depthStencilView->m_textureView.get()); depthAttachment->setLevel(depthStencilView->m_desc.subresourceRange.mipLevel); depthAttachment->setSlice(depthStencilView->m_desc.subresourceRange.baseArrayLayer); } if (MetalUtil::isStencilFormat(pixelFormat)) { MTL::RenderPassStencilAttachmentDescriptor* stencilAttachment = m_renderPassDesc->stencilAttachment(); - stencilAttachment->setTexture(depthStencilView->m_texture->m_texture.get()); + stencilAttachment->setTexture(depthStencilView->m_textureView.get()); stencilAttachment->setLevel(depthStencilView->m_desc.subresourceRange.mipLevel); stencilAttachment->setSlice(depthStencilView->m_desc.subresourceRange.baseArrayLayer); } -- cgit v1.2.3