You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By creating and enqueueing another buffer, and waiting for it to complete, we can essentially ensure that all previous buffers have also completed, in turn ensuring that any textures that were involved in the rendered frame would also be ready to read from.
Ideally, we should have something similar exposed to allow safe reading of pixels from external textures.
There is currently no way to wait for the underlying texture to synchronise and be ready for reading.
I've implemented a workaround that effectively allows us to wait for the internal command buffer to complete with the following:
By creating and enqueueing another buffer, and waiting for it to complete, we can essentially ensure that all previous buffers have also completed, in turn ensuring that any textures that were involved in the rendered frame would also be ready to read from.
Ideally, we should have something similar exposed to allow safe reading of pixels from external textures.
Relevant docs for reading pixels from MTLTexture (note the reference of needing synchronise prior to reading):
https://developer.apple.com/documentation/metal/mtltexture/1516318-getbytes
The text was updated successfully, but these errors were encountered: