google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.84k stars 1.9k forks source link

View Pick: GL_RG32F Not supported on iOS when using OpenGL backend #7520

Open iRusher opened 10 months ago

iRusher commented 10 months ago

⚠️ Issues not using this template will be systematically closed.

Describe the bug

In iOS hello-triangle sample , I want to use view pick. It works fine when I use Metal backend. But it occurs error when using OpenGL backend.

Screenshots image

Xcode break point is hear. image

Logs

OpenGL error 0x500 (GL_INVALID_ENUM) in "renderBufferStorage" at line 1206
OpenGL framebuffer error 0x8cd6 (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) in "framebufferTexture" at line 1179
OpenGL framebuffer error 0x8cd6 (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) in "framebufferTexture" at line 1179
OpenGL framebuffer error 0x8cd6 (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) in "beginRenderPass" at line 2667
OpenGL error 0x506 (GL_INVALID_FRAMEBUFFER_OPERATION) in "beginRenderPass" at line 2676

Smartphone (please complete the following information):

FEngine (64 bits) created at 0x132833200 (threading is enabled)
FEngine resolved backend: OpenGL
2024-01-25 11:18:00.777050+0800 hello-triangle[90887:38602579] Metal GPU Frame Capture Enabled
2024-01-25 11:18:00.777850+0800 hello-triangle[90887:38602579] Metal API Validation Enabled
[Apple Inc.], [Apple A15 GPU], [OpenGL ES 3.0 Metal - 99], [OpenGL ES GLSL ES 3.00]
Feature level: 1
Active workarounds: 
GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 32
GL_MAX_DRAW_BUFFERS = 4
GL_MAX_RENDERBUFFER_SIZE = 16384
GL_MAX_SAMPLES = 4
GL_MAX_TEXTURE_IMAGE_UNITS = 16
GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 4
GL_MAX_UNIFORM_BLOCK_SIZE = 16384
GL_MAX_UNIFORM_BUFFER_BINDINGS = 24
GL_NUM_PROGRAM_BINARY_FORMATS = 0
GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 64
OS version: 0
Backend feature level: 1
FEngine feature level: 1
pixelflinger commented 10 months ago

Note that iOS GLES backend is considered low-priority and is on life support. iOS should use Metal.

lwky commented 7 months ago

We experience the same issue in Firefox on Mac. No problem in chrome, safari or edge.

WebGL warning: readPixels: Format and type RG/FLOAT incompatible with this RG32F attachment. This framebuffer requires either RGBA/FLOAT or getParameter(IMPLEMENTATION_COLOR_READ_FORMAT/_TYPE) RGBA/FLOAT.
WebGL warning: getBufferSubData: Reading from a buffer with usage other than *_READ causes pipeline stalls. Copy through a STREAM_READ buffer.

Mac mini (M1, 2020) MacOS 12.4 Firefox 125.0.2 (64-bit)

[Mozilla], [Apple M1, or similar], [OpenGL ES 3.0 (WebGL 2.0)], [OpenGL ES GLSL ES 3.00 (WebGL GLSL ES 3.00)]
GL_MAX_TEXTURE_SIZE = 16384
GL_MAX_VERTEX_ATTRIBS = 16
GL_MAX_ELEMENTS_INDICES = 150000
GL_MAX_ELEMENTS_VERTICES = 1048575