-
Notifications
You must be signed in to change notification settings - Fork 337
Closed
Labels
Milestone
Description
Ran into this undocumented restriction when running with Metal validation layers:
-[MTLDebugBlitCommandEncoder validateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:532: failed assertion `sourceBytesPerImage(448) must be >= (512).'
Process 31489 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00007fff5e1df2c2 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
-> 0x7fff5e1df2c2 <+10>: jae 0x7fff5e1df2cc ; <+20>
0x7fff5e1df2c4 <+12>: movq %rax, %rdi
0x7fff5e1df2c7 <+15>: jmp 0x7fff5e1d9453 ; cerror_nocancel
0x7fff5e1df2cc <+20>: retq
Also, sourceBytesPerRow must be >= 64, but that's fine because WebGPU has rowPitch be a multiple of 256.
This has some validation implications on permissible values for imageHeight
or (zPitch
in #519), and it also means that imageHeight == 0
cannot truly mean "tightly packed" in #517.
kvark