Consider a MTLTexture of type 2DArray having some number of slices. To calculate histogram of a specific slice of this texture, how to pass only the reference of a single slice of texture to MPSImageHistogram shader?
In general, How to slice a texture in swift environment? Texture.makeTextureview() is not the preferred way because it creates a new texture consuming more memory and time.
Hi, The Texture.makeTextureview() will only create a new Metal Texture object and it won't copy the underlying data. The additional memory usage is most likely to be in the order of hundred of bytes and time cost is also relatively cheap since it does not require anything expensive to setup. (It will just reference the same underlying HW resource).