google / google/filament

Corrupted rendering results on MacOS 10.15 when using Metal Backend

Open
#6,649 3 comments 0 reactions 1 assignee Claimed by @bejado View on GitHub
gpu specific macos metal
Dominant language
C++
Stars
20.5k
Forks
2.3k
Avg merge
2d 14h
Merged PRs (30d)
83

Description

**Describe the bug**
Despite the minimum supported version of MacOS is 10.15, I found out the
Filament fails to render 3D scenes With Metal backend.

Failed 3D scenes are relatively complex lighting or blendings (e.g.:
gltf_instance, gltf_viewer, hellopbr..). Simple examples (e.g. animation,
depthtesting...) are fine on Metal Backend.

If I use OpenGL Backend, failed case rans successfuly with expected rendered
result.

**To reproduce**
1. Run 'filament/out/cmake-[debug|release]/samples/gltf_viewer'

**Expected behavior**
1. 'gltf_viewer' should render scenes without artifacts just like OpenGL backend

**Screenshots**
- Failed with Metal Backend
[Filament_gltf_viewer_MacOS_10_15.webm](https://user-images.githubusercontent.com/2108152/226255665-49d0a3c6-9a4d-4cbd-b908-340dd3d734cf.webm)

**Logs**
- Failed with Metal Backend
```
~/W/f/o/c/samples ❯❯❯ ./gltf_viewer
FEngine (64 bits) created at 0x7f896e836a00 (threading is enabled)
FEngine resolved backend: Metal
Selected physical device 'Intel(R) Iris(TM) Plus Graphics 650'
Supported GPU families:
MTLGPUFamilyCommon3
MTLGPUFamilyMac2
Features:
readWriteTextureSupport: true
FEngine feature level: 3
Requested linear format but KTX contains a sRGB format.
Requested linear format but KTX contains a sRGB format.
Texture Decoder has 2 background threads.
```

- Render properly with OpenGL Backend
```
~/W/f/o/c/samples ❯❯❯ ./gltf_viewer -a opengl
FEngine (64 bits) created at 0x7fc1ee8f8000 (threading is enabled)
FEngine resolved backend: OpenGL
[Intel Inc.], [Intel(R) Iris(TM) Plus Graphics 650], [4.1 INTEL-14.7.8], [4.10]
Feature level: 1
Active workarounds:
vao_doesnt_store_element_array_buffer_binding
allow_read_only_ancillary_feedback_loop
GL_MAX_DRAW_BUFFERS = 8
GL_MAX_RENDERBUFFER_SIZE = 16384
GL_MAX_SAMPLES = 16
GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 16.000000
GL_MAX_UNIFORM_BLOCK_SIZE = 65536
GL_MAX_TEXTURE_IMAGE_UNITS = 16
GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 256
OS version: 0
FEngine feature level: 1
Requested linear format but KTX contains a sRGB format.
Requested linear format but KTX contains a sRGB format.
Texture Decoder has 2 background threads.
```

**Desktop:**
- OS: MacOS 10.15.7
- GPU: Intel Iris Plus Graphics 650 1536 MB
- Backend: Metal
- Model: MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.