Skip to content

Commit

Permalink
Filament patch to resolve lighting
Browse files Browse the repository at this point in the history
-resolves google/filament#8296

Signed-off-by: Joel Winarske <[email protected]>
  • Loading branch information
jwinarske committed Feb 12, 2025
1 parent 918671c commit 63b866a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configs/filament.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From cad3b12c5bee7e6962307510b59df37ed0fcf810 Mon Sep 17 00:00:00 2001
From: Joel Winarske <[email protected]>
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 <[email protected]>
---
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

0 comments on commit 63b866a

Please sign in to comment.