diff --git a/configs/filament.json b/configs/filament.json index 09534e8..89dea74 100644 --- a/configs/filament.json +++ b/configs/filament.json @@ -67,7 +67,8 @@ "git apply ${PATCH_FOLDER}/filament/0001-disable-backend-tests.patch", "git apply ${PATCH_FOLDER}/filament/0002-install-required-files.patch", "git apply ${PATCH_FOLDER}/filament/0003-move-include-contents-to-include-filament.patch", - "git apply ${PATCH_FOLDER}/filament/0004-move-libraries-so-they-install.patch" + "git apply ${PATCH_FOLDER}/filament/0004-move-libraries-so-they-install.patch", + "git apply ${PATCH_FOLDER}/filament/0001-descset-fix-lights-UBO-size-on-setBuffer.patch" ] }, { diff --git a/patches/filament/0001-descset-fix-lights-UBO-size-on-setBuffer.patch b/patches/filament/0001-descset-fix-lights-UBO-size-on-setBuffer.patch new file mode 100644 index 0000000..3ee308f --- /dev/null +++ b/patches/filament/0001-descset-fix-lights-UBO-size-on-setBuffer.patch @@ -0,0 +1,28 @@ +From cad3b12c5bee7e6962307510b59df37ed0fcf810 Mon Sep 17 00:00:00 2001 +From: Joel Winarske +Date: Wed, 12 Feb 2025 08:29:16 -0800 +Subject: [PATCH] descset: fix lights UBO size on setBuffer + +Fixes #8296 + +Signed-off-by: Joel Winarske +--- + filament/src/ds/ColorPassDescriptorSet.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/filament/src/ds/ColorPassDescriptorSet.cpp b/filament/src/ds/ColorPassDescriptorSet.cpp +index e5234dd15..29bb4b6eb 100644 +--- a/filament/src/ds/ColorPassDescriptorSet.cpp ++++ b/filament/src/ds/ColorPassDescriptorSet.cpp +@@ -131,7 +131,7 @@ void ColorPassDescriptorSet::init( + BufferObjectHandle froxelBuffer) noexcept { + for (auto&& descriptorSet: mDescriptorSet) { + descriptorSet.setBuffer(+PerViewBindingPoints::LIGHTS, +- lights, 0, sizeof(LightsUib)); ++ lights, 0, CONFIG_MAX_LIGHT_COUNT * sizeof(LightsUib)); + descriptorSet.setBuffer(+PerViewBindingPoints::RECORD_BUFFER, + recordBuffer, 0, sizeof(FroxelRecordUib)); + descriptorSet.setBuffer(+PerViewBindingPoints::FROXEL_BUFFER, +-- +2.48.1 +