I'm a bit confused on the timing here, we're not clearing it on access we're clearing it at the end of access?
OnCurrentTextureProduced();Maybe `OnTextureAccessed()` ? And maybe it should happen outside of the if? Otherwise, I think we aren't always clearing it?
// clear the old buffer.Can you elaborate? Or maybe just indicate that it's because it'll handle the clearing? Even if it does, any harm in storing it?
if (descriptor().clear_on_access) {Doesn't seem right? It may not have been accessed here?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
OnCurrentTextureProduced();Maybe `OnTextureAccessed()` ? And maybe it should happen outside of the if? Otherwise, I think we aren't always clearing it?
This is for the shared image swapchain. In that case the texture is reset after each frame. Moving it out of the if will make it called too frequently
// clear the old buffer.Can you elaborate? Or maybe just indicate that it's because it'll handle the clearing? Even if it does, any harm in storing it?
The texture array wrapper will clear the buffer. The original swap chain will always be fully rewritten from the wrapper. This is only about performance.
if (descriptor().clear_on_access) {Doesn't seem right? It may not have been accessed here?
Yeah, I do see the currently solution is confusing. Basically this CL uses different strategy for shared image swapchain and others.
I will try to unify the 2 solutions.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Yong Li (xWF)Maybe `OnTextureAccessed()` ? And maybe it should happen outside of the if? Otherwise, I think we aren't always clearing it?
This is for the shared image swapchain. In that case the texture is reset after each frame. Moving it out of the if will make it called too frequently
Got a new solution
Yong Li (xWF)Doesn't seem right? It may not have been accessed here?
Yeah, I do see the currently solution is confusing. Basically this CL uses different strategy for shared image swapchain and others.
I will try to unify the 2 solutions.
Done
| Code-Review | +1 |
// clear the old buffer.Yong Li (xWF)Can you elaborate? Or maybe just indicate that it's because it'll handle the clearing? Even if it does, any harm in storing it?
The texture array wrapper will clear the buffer. The original swap chain will always be fully rewritten from the wrapper. This is only about performance.
Will this boolean be used if the texture type is texture array? If not, maybe worth just setting it anyway.
// Copy the wrapped swap chain's descriptor and divide its width by the
// number of requested layers.outdated comment
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// clear the old buffer.Yong Li (xWF)Can you elaborate? Or maybe just indicate that it's because it'll handle the clearing? Even if it does, any harm in storing it?
Alexander CooperThe texture array wrapper will clear the buffer. The original swap chain will always be fully rewritten from the wrapper. This is only about performance.
Will this boolean be used if the texture type is texture array? If not, maybe worth just setting it anyway.
the texture array swapchain will set the clear_on_access to init->clearOnAccess(). I will update the comments to make it more clear.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
// clear the old buffer.Yong Li (xWF)Can you elaborate? Or maybe just indicate that it's because it'll handle the clearing? Even if it does, any harm in storing it?
Alexander CooperThe texture array wrapper will clear the buffer. The original swap chain will always be fully rewritten from the wrapper. This is only about performance.
Yong Li (xWF)Will this boolean be used if the texture type is texture array? If not, maybe worth just setting it anyway.
the texture array swapchain will set the clear_on_access to init->clearOnAccess(). I will update the comments to make it more clear.
Done
// Copy the wrapped swap chain's descriptor and divide its width by the
// number of requested layers.| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
WebXR Layers: Fix clearOnAccess
Clear buffers only when clearOnAccess is true.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |