I am attempting to use MTLBlitCommandEncoder to copy data from a MTLBuffer into a MTLTexture under Mac OSX 10.12.5.
I am fully aware of a 16384-pixel wide limit on MTLTexture objects. This limit is apparently extended to 32768 only for NVIDIA Pascal-architecture GPU's.
However, according to the docs, there is a limit on the sourceBytesPerRow of a MTLBuffer (ie. not a MTLTexture) which "must be less than or equal to 32,767 multiplied by the destination texture’s pixel size."... so 32767*4 = 131068 bytes or less.
In my case, I am well within this limit. I am trying to copy buffer data that is 24576 pixels wide (in RGBA32 format) -- so 98304 bytes per row.
I get a console message:
ValidateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:504: failed assertion `sourceBytesPerRow(98304) must be <= (65536).'
What gives with that?