summaryrefslogtreecommitdiffstats
path: root/tools/gfx/metal/metal-command-encoder.cpp
diff options
context:
space:
mode:
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);
}