Skip to content

Commit c4f0798

Browse files
committed
Merge branch 'rc/1.59.2' into release
2 parents 43860b6 + fac324d commit c4f0798

File tree

9,397 files changed

+353327
-2042476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,397 files changed

+353327
-2042476
lines changed

.github/workflows/presubmit.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919

2020
steps:
2121
- uses: actions/[email protected]
22+
with:
23+
fetch-depth: 0
2224
- name: Run build script
2325
run: |
2426
WORKFLOW_OS=`echo \`uname\` | sed "s/Darwin/mac/" | tr [:upper:] [:lower:]`
@@ -44,6 +46,8 @@ jobs:
4446

4547
steps:
4648
- uses: actions/[email protected]
49+
with:
50+
fetch-depth: 0
4751
- uses: actions/setup-java@v3
4852
with:
4953
distribution: 'temurin'
@@ -60,6 +64,8 @@ jobs:
6064

6165
steps:
6266
- uses: actions/[email protected]
67+
with:
68+
fetch-depth: 0
6369
- name: Run build script
6470
run: |
6571
cd build/ios && printf "y" | ./build.sh presubmit
@@ -122,3 +128,31 @@ jobs:
122128
run: source ./build/linux/ci-common.sh && ./build.sh -W debug test_filamat filament
123129
- name: Run test
124130
run: ./out/cmake-debug/libs/filamat/test_filamat --gtest_filter=MaterialCompiler.Wgsl*
131+
132+
code-correcteness:
133+
name: code-correctness
134+
runs-on: 'macos-14-xlarge'
135+
steps:
136+
- uses: actions/[email protected]
137+
with:
138+
fetch-depth: 0
139+
- name: Set up Homebrew
140+
id: set-up-homebrew
141+
uses: Homebrew/actions/setup-homebrew@master
142+
- name: Set up Python
143+
uses: actions/setup-python@v5
144+
with:
145+
python-version: '3.x'
146+
- name: Install prerequisites
147+
run: |
148+
pip install pyyaml
149+
brew install llvm
150+
sudo ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
151+
- name: Run build script
152+
# We need to build before clang-tidy can run analysis
153+
run: |
154+
# This will build for all three desktop backends on mac
155+
./build.sh -p desktop debug gltf_viewer
156+
- name: Run test
157+
run: |
158+
bash test/code-correctness/test.sh

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ if (MSVC)
334334
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /W0 /Zc:__cplusplus")
335335
else()
336336
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations")
337+
if (APPLE)
338+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-extension")
339+
endif()
337340
endif()
338341

339342
if (FILAMENT_USE_EXTERNAL_GLES3)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repositories {
3131
}
3232
3333
dependencies {
34-
implementation 'com.google.android.filament:filament-android:1.59.1'
34+
implementation 'com.google.android.filament:filament-android:1.59.2'
3535
}
3636
```
3737

@@ -51,7 +51,7 @@ Here are all the libraries available in the group `com.google.android.filament`:
5151
iOS projects can use CocoaPods to install the latest release:
5252

5353
```shell
54-
pod 'Filament', '~> 1.59.1'
54+
pod 'Filament', '~> 1.59.2'
5555
```
5656

5757
## Documentation

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ A new header is inserted each time a *tag* is created.
77
Instead, if you are authoring a PR for the main branch, add your release note to
88
[NEW_RELEASE_NOTES.md](./NEW_RELEASE_NOTES.md).
99

10+
## v1.59.2
11+
12+
- Fix build/compile errors when upgrading to MacOS 15.4
13+
1014
## v1.59.1
1115

1216

android/buildSrc/src/main/groovy/FilamentPlugin.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ abstract class MaterialCompiler extends TaskWithBinary {
142142
if (!exclude_vulkan) {
143143
matcArgs += ['-a', 'vulkan']
144144
}
145+
def include_webgpu = providers
146+
.gradleProperty("com.google.android.filament.include-webgpu")
147+
.forUseAtConfigurationTime().present
148+
if (include_webgpu) {
149+
matcArgs += ['-a', 'webgpu', '--variant-filter=skinning,stereo']
150+
}
145151

146152
def mat_no_opt = providers
147153
.gradleProperty("com.google.android.filament.matnopt")

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.google.android.filament
2-
VERSION_NAME=1.59.1
2+
VERSION_NAME=1.59.2
33

44
POM_DESCRIPTION=Real-time physically based rendering engine for Android.
55

filament/backend/CMakeLists.txt

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -177,29 +177,6 @@ endif()
177177
if (FILAMENT_SUPPORTS_VULKAN)
178178
list(APPEND SRCS
179179
include/backend/platforms/VulkanPlatform.h
180-
src/vulkan/VulkanDescriptorSetCache.cpp
181-
src/vulkan/VulkanDescriptorSetCache.h
182-
src/vulkan/VulkanDescriptorSetLayoutCache.cpp
183-
src/vulkan/VulkanDescriptorSetLayoutCache.h
184-
src/vulkan/VulkanPipelineLayoutCache.cpp
185-
src/vulkan/VulkanPipelineLayoutCache.h
186-
src/vulkan/memory/ResourceManager.cpp
187-
src/vulkan/memory/ResourceManager.h
188-
src/vulkan/memory/ResourcePointer.h
189-
src/vulkan/memory/Resource.cpp
190-
src/vulkan/memory/Resource.h
191-
src/vulkan/platform/VulkanPlatform.cpp
192-
src/vulkan/platform/VulkanPlatformSwapChainImpl.cpp
193-
src/vulkan/platform/VulkanPlatformSwapChainImpl.h
194-
src/vulkan/utils/Conversion.cpp
195-
src/vulkan/utils/Conversion.h
196-
src/vulkan/utils/Definitions.h
197-
src/vulkan/utils/Helper.h
198-
src/vulkan/utils/Image.h
199-
src/vulkan/utils/Image.cpp
200-
src/vulkan/utils/Spirv.h
201-
src/vulkan/utils/Spirv.cpp
202-
src/vulkan/utils/StaticVector.h
203180
src/vulkan/VulkanAsyncHandles.h
204181
src/vulkan/VulkanBlitter.cpp
205182
src/vulkan/VulkanBlitter.h
@@ -210,29 +187,54 @@ if (FILAMENT_SUPPORTS_VULKAN)
210187
src/vulkan/VulkanConstants.h
211188
src/vulkan/VulkanContext.cpp
212189
src/vulkan/VulkanContext.h
190+
src/vulkan/VulkanDescriptorSetCache.cpp
191+
src/vulkan/VulkanDescriptorSetCache.h
192+
src/vulkan/VulkanDescriptorSetLayoutCache.cpp
193+
src/vulkan/VulkanDescriptorSetLayoutCache.h
213194
src/vulkan/VulkanDriver.cpp
214195
src/vulkan/VulkanDriver.h
215196
src/vulkan/VulkanDriverFactory.h
216197
src/vulkan/VulkanFboCache.cpp
217198
src/vulkan/VulkanFboCache.h
218199
src/vulkan/VulkanHandles.cpp
219200
src/vulkan/VulkanHandles.h
220-
src/vulkan/VulkanMemory.h
221201
src/vulkan/VulkanMemory.cpp
202+
src/vulkan/VulkanMemory.h
222203
src/vulkan/VulkanPipelineCache.cpp
223204
src/vulkan/VulkanPipelineCache.h
205+
src/vulkan/VulkanPipelineLayoutCache.cpp
206+
src/vulkan/VulkanPipelineLayoutCache.h
224207
src/vulkan/VulkanQueryManager.cpp
225208
src/vulkan/VulkanQueryManager.h
209+
src/vulkan/VulkanReadPixels.cpp
210+
src/vulkan/VulkanReadPixels.h
226211
src/vulkan/VulkanSamplerCache.cpp
227212
src/vulkan/VulkanSamplerCache.h
228213
src/vulkan/VulkanStagePool.cpp
229214
src/vulkan/VulkanStagePool.h
230215
src/vulkan/VulkanSwapChain.cpp
231216
src/vulkan/VulkanSwapChain.h
232-
src/vulkan/VulkanReadPixels.cpp
233-
src/vulkan/VulkanReadPixels.h
234217
src/vulkan/VulkanTexture.cpp
235218
src/vulkan/VulkanTexture.h
219+
src/vulkan/VulkanYcbcrConversionCache.cpp
220+
src/vulkan/VulkanYcbcrConversionCache.h
221+
src/vulkan/memory/Resource.cpp
222+
src/vulkan/memory/Resource.h
223+
src/vulkan/memory/ResourceManager.cpp
224+
src/vulkan/memory/ResourceManager.h
225+
src/vulkan/memory/ResourcePointer.h
226+
src/vulkan/platform/VulkanPlatform.cpp
227+
src/vulkan/platform/VulkanPlatformSwapChainImpl.cpp
228+
src/vulkan/platform/VulkanPlatformSwapChainImpl.h
229+
src/vulkan/utils/Conversion.cpp
230+
src/vulkan/utils/Conversion.h
231+
src/vulkan/utils/Definitions.h
232+
src/vulkan/utils/Helper.h
233+
src/vulkan/utils/Image.cpp
234+
src/vulkan/utils/Image.h
235+
src/vulkan/utils/Spirv.cpp
236+
src/vulkan/utils/Spirv.h
237+
src/vulkan/utils/StaticVector.h
236238
)
237239
if (LINUX OR WIN32)
238240
list(APPEND SRCS src/vulkan/platform/VulkanPlatformLinuxWindows.cpp)
@@ -253,6 +255,10 @@ if (FILAMENT_SUPPORTS_WEBGPU)
253255
src/webgpu/WebGPUConstants.h
254256
src/webgpu/WebGPUDriver.cpp
255257
src/webgpu/WebGPUDriver.h
258+
src/webgpu/WebGPUHandles.cpp
259+
src/webgpu/WebGPUHandles.h
260+
src/webgpu/WebGPUSwapChain.cpp
261+
src/webgpu/WebGPUSwapChain.h
256262
)
257263
if (WIN32)
258264
list(APPEND SRCS src/webgpu/platform/WebGPUPlatformWindows.cpp)
@@ -302,6 +308,11 @@ target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
302308
# add this subproject to the Filament folder
303309
set_target_properties(${TARGET} PROPERTIES FOLDER Filament)
304310

311+
# we need to export the headers properly for backend.lib on windows
312+
if (WIN32 AND FILAMENT_SUPPORTS_WEBGPU)
313+
target_compile_definitions(${TARGET} PRIVATE "WGPU_IMPLEMENTATION")
314+
endif()
315+
305316
# ==================================================================================================
306317
# Expose a header-only target to minimize dependencies.
307318
# ==================================================================================================
@@ -497,6 +508,7 @@ if (APPLE OR LINUX)
497508
test/ImageExpectations.cpp
498509
test/Lifetimes.cpp
499510
test/Shader.cpp
511+
test/SharedShaders.cpp
500512
test/test_FeedbackLoops.cpp
501513
test/test_Blit.cpp
502514
test/test_MissingRequiredAttributes.cpp

filament/backend/include/backend/Platform.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ class UTILS_PUBLIC Platform {
149149
* - PlatformEGLAndroid
150150
*/
151151
bool assertNativeWindowIsValid = false;
152+
153+
/**
154+
* The action to take if a Drawable cannot be acquired. If true, the
155+
* frame is aborted instead of panic. This is only supported for:
156+
* - PlatformMetal
157+
*/
158+
bool metalDisablePanicOnDrawableFailure = false;
152159
};
153160

154161
Platform() noexcept;

filament/backend/include/backend/platforms/VulkanPlatform.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ class VulkanPlatform : public Platform, utils::PrivateImplementation<VulkanPlatf
104104

105105
// Semaphore to be signaled once the image is available.
106106
VkSemaphore imageReadySemaphore = VK_NULL_HANDLE;
107-
108-
// A function called right before vkQueueSubmit. After this call, the image must be
109-
// available. This pointer can be null if imageReadySemaphore is not VK_NULL_HANDLE.
110-
std::function<void(SwapChainPtr handle)> explicitImageReadyWait = nullptr;
111107
};
112108

113109
VulkanPlatform();
@@ -361,8 +357,7 @@ class VulkanPlatform : public Platform, utils::PrivateImplementation<VulkanPlatf
361357
VkImageUsageFlags usage);
362358

363359
virtual VkSampler createExternalSampler(SamplerYcbcrConversion chroma,
364-
SamplerParams sampler,
365-
uint32_t internalFormat);
360+
SamplerParams sampler, uint32_t internalFormat);
366361

367362
virtual VkImageView createExternalImageView(SamplerYcbcrConversion chroma,
368363
uint32_t internalFormat, VkImage image, VkImageSubresourceRange range,

filament/backend/src/metal/PlatformMetal.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
}
4646

4747
Driver* PlatformMetal::createDriver(void* /*sharedContext*/, const Platform::DriverConfig& driverConfig) noexcept {
48+
pImpl->mDrawableFailureBehavior = driverConfig.metalDisablePanicOnDrawableFailure
49+
? DrawableFailureBehavior::ABORT_FRAME
50+
: DrawableFailureBehavior::PANIC;
4851
return MetalDriverFactory::create(this, driverConfig);
4952
}
5053

filament/backend/src/vulkan/VulkanBlitter.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
#include "VulkanBlitter.h"
1818
#include "VulkanCommands.h"
1919
#include "VulkanContext.h"
20-
#include "VulkanFboCache.h"
21-
#include "VulkanHandles.h"
22-
#include "VulkanSamplerCache.h"
2320
#include "VulkanTexture.h"
2421
#include "vulkan/utils/Image.h"
2522

filament/backend/src/vulkan/VulkanBlitter.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424

2525
namespace filament::backend {
2626

27-
class VulkanBuffer;
28-
class VulkanFboCache;
29-
class VulkanPipelineCache;
30-
class VulkanSamplerCache;
31-
32-
struct VulkanProgram;
33-
3427
class VulkanBlitter {
3528
public:
3629
VulkanBlitter(VkPhysicalDevice physicalDevice, VulkanCommands* commands) noexcept;

filament/backend/src/vulkan/VulkanContext.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ VkImageView VulkanAttachment::getImageView() {
5656
assert_invariant(texture);
5757
VkImageSubresourceRange range = getSubresourceRange();
5858
if (range.layerCount > 1) {
59-
return texture->getMultiviewAttachmentView(range);
59+
return texture->getAttachmentView(range, VK_IMAGE_VIEW_TYPE_2D_ARRAY);
6060
}
61-
return texture->getAttachmentView(range);
61+
return texture->getAttachmentView(range, VK_IMAGE_VIEW_TYPE_2D);
6262
}
6363

6464
bool VulkanAttachment::isDepth() const {
@@ -68,11 +68,11 @@ bool VulkanAttachment::isDepth() const {
6868
VkImageSubresourceRange VulkanAttachment::getSubresourceRange() const {
6969
assert_invariant(texture);
7070
return {
71-
.aspectMask = texture->getImageAspect(),
72-
.baseMipLevel = uint32_t(level),
73-
.levelCount = 1,
74-
.baseArrayLayer = uint32_t(layer),
75-
.layerCount = layerCount,
71+
.aspectMask = texture->getImageAspect(),
72+
.baseMipLevel = uint32_t(level),
73+
.levelCount = 1,
74+
.baseArrayLayer = uint32_t(layer),
75+
.layerCount = layerCount,
7676
};
7777
}
7878

0 commit comments

Comments
 (0)