Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laszlo Agocs
qtrhi
Commits
23915b58
Commit
23915b58
authored
Mar 14, 2019
by
Laszlo Agocs
Browse files
mtl: Track attachment usage for tex.rt.
parent
2038c979
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rhi/qrhimetal.mm
View file @
23915b58
...
...
@@ -1519,6 +1519,17 @@ void QRhiMetal::beginPass(QRhiCommandBuffer *cb,
cbD
->
d
->
currentPassRpDesc
.
depthAttachment
.
loadAction
=
MTLLoadActionLoad
;
cbD
->
d
->
currentPassRpDesc
.
stencilAttachment
.
loadAction
=
MTLLoadActionLoad
;
}
const
QVector
<
QRhiColorAttachment
>
colorAttachments
=
rtTex
->
m_desc
.
colorAttachments
();
for
(
const
QRhiColorAttachment
&
colorAttachment
:
colorAttachments
)
{
if
(
colorAttachment
.
texture
())
QRHI_RES
(
QMetalTexture
,
colorAttachment
.
texture
())
->
lastActiveFrameSlot
=
currentFrameSlot
;
else
if
(
colorAttachment
.
renderBuffer
())
QRHI_RES
(
QMetalRenderBuffer
,
colorAttachment
.
renderBuffer
())
->
lastActiveFrameSlot
=
currentFrameSlot
;
}
if
(
rtTex
->
m_desc
.
depthStencilBuffer
())
QRHI_RES
(
QMetalRenderBuffer
,
rtTex
->
m_desc
.
depthStencilBuffer
())
->
lastActiveFrameSlot
=
currentFrameSlot
;
if
(
rtTex
->
m_desc
.
depthTexture
())
QRHI_RES
(
QMetalTexture
,
rtTex
->
m_desc
.
depthTexture
())
->
lastActiveFrameSlot
=
currentFrameSlot
;
}
break
;
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment