-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pixelFormat failed assertion ONLY when running on simulators #68
Comments
It looks like simulator doesn’t natively support 16 bits rgb format. I didn’t notice this before. |
Thanks! I am asking since I am not familiar enough with OpenGL/Metal code to do what you wrote. |
Yes, It would require some works. btw, if you change the type to |
Thank! Hope you will find the time for this one... Do you mean I should do the following conversion to my 16bit input pixels ? |
Yes, normally MetalANGLE should do the conversion for you if the format fallback is implemented. However, it is not implemented yet for simulator. As a workaround for now, you could do it yourself on application layer (before passing to MetalANGLE's GL function) |
MetalAngle is amazing work. Thank you so much Le Hoang Quyen!
We integrated MetalAngle and everything works great when running on devices. Tested on 15.1 of iOS, iPadOS, tvOS and macOS (using Mac Catalyst).
But when running on all corresponding simulators, we get the following error:
MTLDebugValidateMTLPixelFormat:1433: failed assertion `pixelFormat (40) is not a valid MTLPixelFormat.'
on the first run of the following line:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, _scalingTextureWidth, _scalingTextureHeight, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 0); printOpenGLError();
We get The following similar error:
MTLDebugValidateMTLPixelFormat:1433: failed assertion `pixelFormat (41) is not a valid MTLPixelFormat.
On the following line:
GLCALL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, GL_DYNAMIC_TEXTURE_WIDTH, GL_DYNAMIC_TEXTURE_WIDTH, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, dynamicTexturePixels));
As mentioned, these are ONLY when running on simulators.
The text was updated successfully, but these errors were encountered: