filament icon indicating copy to clipboard operation
filament copied to clipboard

Metal drawable size issue in readPixels

Open kpeeters opened this issue 3 years ago • 1 comments
trafficstars

Running the modified hello-pbr of issue #4077 with a debug build of filament under Catalyst and doing a drag to trigger a readPixels leads to

_validateGetBytes:65: failed assertion `GetBytes Validation origin.x + size.width)(3024) must be <= width(2050).

which is produced by the [readPixelsTexture ... in MetalDriver::readPixels (and leads to a SIGABRT). The image looks fine on the screen.

On an actual iPad, this demo produces an image with a garbled strip on the right-hand side, as in #4077.

kpeeters avatar Dec 13 '21 21:12 kpeeters

This might be fixed after recent changes that went in the Metal backend.

romainguy avatar Jun 01 '22 23:06 romainguy

@kpeeters How did you build Filament for Mac Catalyst? When I try to build it using build.sh, I keep getting an error:

/filament/lib/universal/libfilaflat.a(ChunkContainer.cpp.o), building for Mac Catalyst, but linking in object file built for macOS, file '/filament/lib/universal/libfilaflat.a' for architecture arm64

mseare avatar Dec 12 '22 20:12 mseare