summaryrefslogtreecommitdiffstats
path: root/tools/gfx/metal/metal-command-encoder.cpp
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2024-06-11 17:21:45 +0200
committerGitHub <noreply@github.com>2024-06-11 08:21:45 -0700
commit5a289681e511ec419829291c7281cdd3c7918b7f (patch)
treea1dd2c5d6fb3eaff5f17f9c0033326c1fd52dbd5 /tools/gfx/metal/metal-command-encoder.cpp
parentdf0a201d85eac4c55c1abf15ed0bf9baea0ae971 (diff)
[gfx] Metal texture fixes (#4331)
Diffstat (limited to 'tools/gfx/metal/metal-command-encoder.cpp')
-rw-r--r--tools/gfx/metal/metal-command-encoder.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}