Skip to content

Commit 37dee33

Browse files
authored
Merge branch 'main' into shader_quad_control
2 parents bd06d1b + e6ada08 commit 37dee33

File tree

91 files changed

+4554
-619
lines changed

Some content is hidden

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

91 files changed

+4554
-619
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
5757
5858
build_v2:
59-
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
59+
name: "Build v2 Components ${{ matrix.platform }} in ${{ matrix.build_type }}"
6060
strategy:
6161
matrix:
6262
platform: [windows, ubuntu]

antora/modules/ROOT/nav.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
////
2-
- Copyright (c) 2023-2025, Holochip Inc
3-
- Copyright (c) 2023-2025, Sascha Willems
2+
- Copyright (c) 2023-2026, Holochip Inc
3+
- Copyright (c) 2023-2026, Sascha Willems
44
- Copyright (c) 2025, Arm Limited and Contributors
55
-
66
- SPDX-License-Identifier: Apache-2.0
@@ -84,6 +84,7 @@
8484
*** xref:samples/extensions/hpp_push_descriptors/README.adoc[Push descriptors (Vulkan-Hpp)]
8585
** xref:samples/extensions/ray_tracing_basic/README.adoc[Raytracing basic]
8686
** xref:samples/extensions/ray_tracing_extended/README.adoc[Raytracing extended]
87+
** xref:samples/extensions/ray_tracing_invocation_reorder/README.adoc[Ray tracing invocation reorder (SER)]
8788
** xref:samples/extensions/ray_queries/README.adoc[Ray queries]
8889
** xref:samples/extensions/ray_tracing_reflection/README.adoc[Ray tracing reflection]
8990
** xref:samples/extensions/ray_tracing_position_fetch/README.adoc[Ray tracing position fetch]

app/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2024, Arm Limited and Contributors
1+
# Copyright (c) 2019-2025, Arm Limited and Contributors
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -135,7 +135,7 @@ if(IOS)
135135
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY "YES"
136136
)
137137
endif ()
138-
# No need to search for Vulkan package or MoltenVK library, Vulkan cache variables already defined on Apple platforms by global_options.cmake
138+
# Vulkan cache variables already defined by main project CMakeLists and updated on Apple platforms by global_options.cmake
139139
if(Vulkan_LIBRARY AND ${Vulkan_VERSION} VERSION_GREATER_EQUAL 1.3.278)
140140
target_sources(${PROJECT_NAME} PRIVATE
141141
${Vulkan_Target_SDK}/iOS/share/vulkan
@@ -163,17 +163,24 @@ if(IOS)
163163
set(FRAMEWORKS_TO_EMBED)
164164
if(Vulkan_MoltenVK_LIBRARY)
165165
list(APPEND FRAMEWORKS_TO_EMBED "${Vulkan_MoltenVK_LIBRARY};")
166+
message(STATUS "Embedding Vulkan driver: ${Vulkan_MoltenVK_LIBRARY}")
167+
# add support for potentially other iOS Vulkan drivers here...
168+
#elseif(OTHER_IOS_VULKAN_DRIVER)
169+
#list(APPEND FRAMEWORKS_TO_EMBED "${OTHER_IOS_VULKAN_DRIVER};")
170+
#message(STATUS "Embedding Vulkan driver: ${OTHER_IOS_VULKAN_DRIVER}")
166171
else()
167-
message(FATAL_ERROR "Can't find MoltenVK library. Please install the Vulkan SDK or MoltenVK project and set VULKAN_SDK.")
172+
message(FATAL_ERROR "Can't find Vulkan driver for iOS. Please install the Vulkan SDK and run: 'source <MY_SDK_PATH>/iOS/setup-env.sh'")
168173
endif()
169174
if(Vulkan_LIBRARY)
170175
list(APPEND FRAMEWORKS_TO_EMBED "${Vulkan_LIBRARY};")
176+
message(STATUS "Embedding Vulkan loader: ${Vulkan_LIBRARY}")
171177
endif()
172178
if(Vulkan_Layer_VALIDATION)
173179
# trouble is can't turn this on/off if XCode decides to build debug and we're configured for release. Need to revist
174180
# note the Vulkan validation layer must be present and enabled even in release mode for the shader_debugprintf sample
175181
#if(("${VKB_DEBUG}" STREQUAL "ON") OR ("${VKB_VALIDATION_LAYERS}" STREQUAL "ON"))
176182
list(APPEND FRAMEWORKS_TO_EMBED "${Vulkan_Layer_VALIDATION}")
183+
message(STATUS "Embedding Vulkan Validation Layer: ${Vulkan_Layer_VALIDATION}")
177184
#endif()
178185
endif()
179186
set_target_properties(${PROJECT_NAME} PROPERTIES

bldsys/cmake/global_options.cmake

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ endif()
3333

3434
if(APPLE)
3535
cmake_minimum_required(VERSION 3.24)
36-
set(VKB_ENABLE_PORTABILITY ON CACHE BOOL "Enable portability enumeration and subset features in the framework. This is required to be set when running on Apple platforms." FORCE)
36+
option(VKB_ENABLE_PORTABILITY "Enable portability enumeration and subset features in the framework. This is default ON for Apple platforms." ON)
3737

38+
# the following assumes MoltenVK is used for these cases: a) standalone deployment on macOS (i.e. set USE_MoltenVK=ON), and b) for iOS deployment
39+
# if this assumption changes (e.g. KosmicKrisp adds standalone or iOS support), then this section will require modification to handle optionality
3840
find_package(Vulkan QUIET OPTIONAL_COMPONENTS MoltenVK)
3941
if(USE_MoltenVK OR (IOS AND (NOT Vulkan_MoltenVK_FOUND OR ${CMAKE_OSX_SYSROOT} STREQUAL "iphonesimulator")))
40-
# if using MoltenVK, or MoltenVK for iOS was not found, or using iOS Simulator, look for MoltenVK in the Vulkan SDK and MoltenVK project locations
42+
# if using MoltenVK standalone, or MoltenVK for iOS not found or using iOS Simulator, look for MoltenVK in Vulkan SDK and MoltenVK project paths
4143
if(NOT Vulkan_MoltenVK_LIBRARY)
4244
# since both are available in the Vulkan SDK and MoltenVK github project, make sure we look for MoltenVK framework on iOS and dylib on macOS
4345
set(_saved_cmake_find_framework ${CMAKE_FIND_FRAMEWORK})
@@ -58,7 +60,8 @@ if(APPLE)
5860
# on iOS we can control Vulkan library loading priority by selecting which libraries are embedded in the iOS application bundle
5961
if(IOS)
6062
add_compile_definitions(_HPP_VULKAN_LIBRARY="MoltenVK.framework/MoltenVK")
61-
# unset FindVulkan.cmake cache variables so Vulkan loader, Validation Layer, and icd/layer json files are not embedded on iOS
63+
# unset FindVulkan.cmake cache variables so Vulkan loader and Validation Layer libraries are not embedded on iOS Simulator
64+
# the iOS Simulator supports arm64 & x86_64 hosts, but the Vulkan loader and Validation Layer are compiled for arm64 only
6265
unset(Vulkan_LIBRARY CACHE)
6366
unset(Vulkan_Layer_VALIDATION CACHE)
6467

@@ -69,15 +72,18 @@ if(APPLE)
6972
add_compile_definitions(_GLFW_VULKAN_LIBRARY="libMoltenVK.dylib")
7073
set(ENV{DYLD_LIBRARY_PATH} "${MoltenVK_LIBRARY_PATH}:$ENV{DYLD_LIBRARY_PATH}")
7174
else()
72-
message(FATAL_ERROR "Vulkan library found in MoltenVK search path. Please set VULKAN_SDK to the MoltenVK project install location.")
75+
message(FATAL_ERROR "Vulkan loader found in MoltenVK search path. Please set VULKAN_SDK to the MoltenVK project install location.")
7376
endif()
74-
message(STATUS "Using MoltenVK: ${Vulkan_MoltenVK_LIBRARY}")
77+
message(STATUS "Using MoltenVK standalone: ${Vulkan_MoltenVK_LIBRARY}")
7578
else()
7679
message(FATAL_ERROR "Can't find MoltenVK library. Please install the Vulkan SDK or MoltenVK project and set VULKAN_SDK.")
7780
endif()
78-
elseif(IOS)
79-
# if not using MoltenVK on iOS, set up global Vulkan Library define for iOS Vulkan loader
80-
add_compile_definitions(_HPP_VULKAN_LIBRARY="vulkan.framework/vulkan")
81+
#elseif(OTHER_VULKAN_DRIVER)
82+
# handle any special processing here for other Vulkan driver (e.g. KosmicKrisp) for standalone usage on macOS or deployment to iOS
83+
# would likely require extensions to CMake find_package() OPTIONAL_COMPONENTS and library variables to identify & use other driver
84+
#else()
85+
# if not using standalone driver, retain find_package() results for Vulkan driver, Vulkan loader, and Validation Layer library variables
86+
# no need to override with _HPP_VULKAN_LIBRARY in this case since Vulkan DynamicLoader will find/load Vulkan library on macOS & iOS
8187
endif()
8288

8389
if(CMAKE_GENERATOR MATCHES "Xcode")
@@ -103,6 +109,8 @@ if(APPLE)
103109
set(CMAKE_SUPPRESS_REGENERATION ON)
104110
endif()
105111
endif()
112+
else()
113+
option(VKB_ENABLE_PORTABILITY "Enable portability enumeration and subset features in the framework. This is default OFF for non-Apple platforms." OFF)
106114
endif()
107115

108116
set(VKB_WARNINGS_AS_ERRORS ON CACHE BOOL "Enable Warnings as Errors")

framework/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ set(RENDERING_SUBPASSES_FILES
130130
rendering/subpasses/hpp_forward_subpass.h
131131
# Source files
132132
rendering/subpasses/forward_subpass.cpp
133-
rendering/subpasses/lighting_subpass.cpp
134-
rendering/subpasses/geometry_subpass.cpp)
133+
rendering/subpasses/lighting_subpass.cpp)
135134

136135
set(SCENE_GRAPH_FILES
137136
# Header Files

framework/core/hpp_descriptor_set_layout.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ class HPPDescriptorSetLayout : private vkb::DescriptorSetLayout
6464
reinterpret_cast<vk::DescriptorSetLayoutBinding *>(vkb::DescriptorSetLayout::get_layout_binding(binding_index).release()));
6565
}
6666

67+
std::unique_ptr<vk::DescriptorSetLayoutBinding> get_layout_binding(std::string const &name) const
68+
{
69+
return std::unique_ptr<vk::DescriptorSetLayoutBinding>(
70+
reinterpret_cast<vk::DescriptorSetLayoutBinding *>(vkb::DescriptorSetLayout::get_layout_binding(name).release()));
71+
}
72+
6773
vk::DescriptorBindingFlagsEXT get_layout_binding_flag(const uint32_t binding_index) const
6874
{
6975
return static_cast<vk::DescriptorBindingFlagsEXT>(vkb::DescriptorSetLayout::get_layout_binding_flag(binding_index));

framework/core/hpp_shader_module.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ struct HPPShaderResource
8484
class HPPShaderSource : private vkb::ShaderSource
8585
{
8686
public:
87+
HPPShaderSource() = default;
8788
HPPShaderSource(const std::string &filename) :
8889
vkb::ShaderSource(filename)
8990
{}
@@ -96,6 +97,7 @@ class HPPShaderModule : private vkb::ShaderModule
9697
{
9798
public:
9899
using vkb::ShaderModule::get_id;
100+
using vkb::ShaderModule::set_resource_mode;
99101

100102
public:
101103
HPPShaderModule(vkb::core::DeviceCpp &device,

framework/core/instance.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,19 @@ inline bool enable_layer_setting(vk::LayerSettingEXT const &requested_lay
251251
// Vulkan does not provide a reflection API for layer settings. Layer settings are described in each layer JSON manifest.
252252
bool is_available = std::ranges::any_of(
253253
enabled_layers, [&requested_layer_setting](auto const &available_layer) { return strcmp(available_layer, requested_layer_setting.pLayerName) == 0; });
254+
254255
#if defined(PLATFORM__MACOS)
255-
// On Apple platforms the MoltenVK layer is implicitly enabled and available, and cannot be explicitly added or checked via enabled_layers.
256-
is_available = is_available || strcmp(requested_layer_setting.pLayerName, "MoltenVK") == 0;
256+
// On Apple the MoltenVK driver configuration layer is implicitly enabled and available, and cannot be explicitly added or checked via enabled_layers.
257+
if (!is_available && strcmp(requested_layer_setting.pLayerName, "MoltenVK") == 0)
258+
{
259+
// Check for VK_EXT_layer_settings extension in the driver which indicates MoltenVK vs. KosmicKrisp (note: VK_MVK_moltenvk extension is deprecated).
260+
std::vector<vk::ExtensionProperties> available_instance_extensions = vk::enumerateInstanceExtensionProperties();
261+
if (std::ranges::any_of(available_instance_extensions,
262+
[](vk::ExtensionProperties const &extension) { return strcmp(extension.extensionName, VK_EXT_LAYER_SETTINGS_EXTENSION_NAME) == 0; }))
263+
{
264+
is_available = true;
265+
}
266+
}
257267
#endif
258268

259269
if (!is_available)

framework/rendering/subpass.h

Lines changed: 87 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
namespace vkb
3131
{
3232
class RenderTarget;
33-
class ShaderSource;
3433

3534
namespace core
3635
{
@@ -83,12 +82,12 @@ class Subpass
8382
using ResolveModeFlagBitsType = typename std::conditional<bindingType == vkb::BindingType::Cpp, vk::ResolveModeFlagBits, VkResolveModeFlagBits>::type;
8483
using SampleCountflagBitsType = typename std::conditional<bindingType == vkb::BindingType::Cpp, vk::SampleCountFlagBits, VkSampleCountFlagBits>::type;
8584

86-
using DepthStencilStateType =
87-
typename std::conditional<bindingType == vkb::BindingType::Cpp, vkb::rendering::HPPDepthStencilState, vkb::DepthStencilState>::type;
88-
using RenderTargetType = typename std::conditional<bindingType == vkb::BindingType::Cpp, vkb::rendering::HPPRenderTarget, vkb::RenderTarget>::type;
85+
using DepthStencilStateType = typename std::conditional<bindingType == vkb::BindingType::Cpp, vkb::rendering::HPPDepthStencilState, vkb::DepthStencilState>::type;
86+
using RenderTargetType = typename std::conditional<bindingType == vkb::BindingType::Cpp, vkb::rendering::HPPRenderTarget, vkb::RenderTarget>::type;
87+
using ShaderSourceType = typename std::conditional<bindingType == BindingType::Cpp, vkb::core::HPPShaderSource, vkb::ShaderSource>::type;
8988

9089
public:
91-
Subpass(vkb::rendering::RenderContext<bindingType> &render_context, ShaderSource &&vertex_shader, ShaderSource &&fragment_shader);
90+
Subpass(vkb::rendering::RenderContext<bindingType> &render_context, ShaderSourceType &&vertex_shader, ShaderSourceType &&fragment_shader);
9291

9392
Subpass(const Subpass &) = delete;
9493
Subpass(Subpass &&) = default;
@@ -124,14 +123,14 @@ class Subpass
124123
ResolveModeFlagBitsType get_depth_stencil_resolve_mode() const;
125124
DepthStencilStateType &get_depth_stencil_state();
126125
const bool &get_disable_depth_stencil_attachment() const;
127-
const ShaderSource &get_fragment_shader() const;
126+
const ShaderSourceType &get_fragment_shader() const;
128127
const std::vector<uint32_t> &get_input_attachments() const;
129128
LightingState<bindingType> &get_lighting_state();
130129
const std::vector<uint32_t> &get_output_attachments() const;
131130
RenderContext<bindingType> &get_render_context();
132131
std::unordered_map<std::string, ShaderResourceMode> const &get_resource_mode_map() const;
133132
SampleCountflagBitsType get_sample_count() const;
134-
const ShaderSource &get_vertex_shader() const;
133+
const ShaderSourceType &get_vertex_shader() const;
135134
void set_color_resolve_attachments(std::vector<uint32_t> const &color_resolve);
136135
void set_debug_name(const std::string &name);
137136
void set_disable_depth_stencil_attachment(bool disable_depth_stencil);
@@ -148,6 +147,14 @@ class Subpass
148147
*/
149148
void update_render_target_attachments(RenderTargetType &render_target);
150149

150+
protected:
151+
vkb::rendering::HPPDepthStencilState get_depth_stencil_state_impl() const;
152+
vkb::core::HPPShaderSource const &get_fragment_shader_impl() const;
153+
LightingStateCpp &get_lighting_state_impl();
154+
vk::SampleCountFlagBits get_sample_count_impl() const;
155+
vkb::rendering::RenderContextCpp &get_render_context_impl();
156+
vkb::core::HPPShaderSource const &get_vertex_shader_impl() const;
157+
151158
private:
152159
/// Default to no color resolve attachments
153160
std::vector<uint32_t> color_resolve_attachments = {};
@@ -175,7 +182,7 @@ class Subpass
175182
/// The structure containing all the requested render-ready lights for the scene
176183
LightingStateCpp lighting_state{};
177184

178-
ShaderSource fragment_shader;
185+
vkb::core::HPPShaderSource fragment_shader;
179186

180187
/// Default to no input attachments
181188
std::vector<uint32_t> input_attachments = {};
@@ -188,8 +195,8 @@ class Subpass
188195
// A map of shader resource names and the mode of constant data
189196
std::unordered_map<std::string, ShaderResourceMode> resource_mode_map;
190197

191-
vk::SampleCountFlagBits sample_count{vk::SampleCountFlagBits::e1};
192-
ShaderSource vertex_shader;
198+
vk::SampleCountFlagBits sample_count{vk::SampleCountFlagBits::e1};
199+
vkb::core::HPPShaderSource vertex_shader;
193200
};
194201

195202
using SubpassC = Subpass<vkb::BindingType::C>;
@@ -206,12 +213,20 @@ inline glm::mat4 vulkan_style_projection(const glm::mat4 &proj)
206213

207214
template <vkb::BindingType bindingType>
208215
inline Subpass<bindingType>::Subpass(vkb::rendering::RenderContext<bindingType> &render_context,
209-
ShaderSource &&vertex_source,
210-
ShaderSource &&fragment_source) :
211-
render_context{reinterpret_cast<vkb::rendering::RenderContextCpp &>(render_context)},
212-
vertex_shader{std::move(vertex_source)},
213-
fragment_shader{std::move(fragment_source)}
216+
ShaderSourceType &&vertex_source,
217+
ShaderSourceType &&fragment_source) :
218+
render_context{reinterpret_cast<vkb::rendering::RenderContextCpp &>(render_context)}
214219
{
220+
if constexpr (bindingType == vkb::BindingType::Cpp)
221+
{
222+
vertex_shader = std::move(vertex_source);
223+
fragment_shader = std::move(fragment_source);
224+
}
225+
else
226+
{
227+
vertex_shader = std::move(reinterpret_cast<vkb::core::HPPShaderSource &&>(vertex_source));
228+
fragment_shader = std::move(reinterpret_cast<vkb::core::HPPShaderSource &&>(fragment_source));
229+
}
215230
}
216231

217232
template <vkb::BindingType bindingType>
@@ -263,18 +278,25 @@ inline typename Subpass<bindingType>::SampleCountflagBitsType Subpass<bindingTyp
263278
{
264279
if constexpr (bindingType == vkb::BindingType::Cpp)
265280
{
266-
return sample_count;
281+
return get_sample_count_impl();
267282
}
268283
else
269284
{
270-
return static_cast<VkSampleCountFlagBits>(sample_count);
285+
return static_cast<VkSampleCountFlagBits>(get_sample_count_impl());
271286
}
272287
}
273288

274289
template <vkb::BindingType bindingType>
275-
inline const ShaderSource &Subpass<bindingType>::get_vertex_shader() const
290+
inline const typename Subpass<bindingType>::ShaderSourceType &Subpass<bindingType>::get_vertex_shader() const
276291
{
277-
return vertex_shader;
292+
if constexpr (bindingType == vkb::BindingType::Cpp)
293+
{
294+
return get_vertex_shader_impl();
295+
}
296+
else
297+
{
298+
return reinterpret_cast<vkb::ShaderSource const &>(get_vertex_shader_impl());
299+
}
278300
}
279301

280302
template <vkb::BindingType bindingType>
@@ -402,9 +424,16 @@ inline const bool &Subpass<bindingType>::get_disable_depth_stencil_attachment()
402424
}
403425

404426
template <vkb::BindingType bindingType>
405-
inline const ShaderSource &Subpass<bindingType>::get_fragment_shader() const
427+
inline const typename Subpass<bindingType>::ShaderSourceType &Subpass<bindingType>::get_fragment_shader() const
406428
{
407-
return fragment_shader;
429+
if constexpr (bindingType == vkb::BindingType::Cpp)
430+
{
431+
return get_fragment_shader_impl();
432+
}
433+
else
434+
{
435+
return reinterpret_cast<vkb::ShaderSource const &>(get_fragment_shader_impl());
436+
}
408437
}
409438

410439
template <vkb::BindingType bindingType>
@@ -475,5 +504,42 @@ inline void Subpass<bindingType>::update_render_target_attachments(RenderTargetT
475504
render_target.set_input_attachments(input_attachments);
476505
render_target.set_output_attachments(output_attachments);
477506
}
507+
508+
template <vkb::BindingType bindingType>
509+
inline vkb::core::HPPShaderSource const &Subpass<bindingType>::get_fragment_shader_impl() const
510+
{
511+
return fragment_shader;
512+
}
513+
514+
template <vkb::BindingType bindingType>
515+
inline vk::SampleCountFlagBits Subpass<bindingType>::get_sample_count_impl() const
516+
{
517+
return sample_count;
518+
}
519+
520+
template <vkb::BindingType bindingType>
521+
inline vkb::rendering::HPPDepthStencilState Subpass<bindingType>::get_depth_stencil_state_impl() const
522+
{
523+
return depth_stencil_state;
524+
}
525+
526+
template <vkb::BindingType bindingType>
527+
inline LightingStateCpp &Subpass<bindingType>::get_lighting_state_impl()
528+
{
529+
return lighting_state;
530+
}
531+
532+
template <vkb::BindingType bindingType>
533+
inline vkb::rendering::RenderContextCpp &Subpass<bindingType>::get_render_context_impl()
534+
{
535+
return render_context;
536+
}
537+
538+
template <vkb::BindingType bindingType>
539+
inline vkb::core::HPPShaderSource const &Subpass<bindingType>::get_vertex_shader_impl() const
540+
{
541+
return vertex_shader;
542+
}
543+
478544
} // namespace rendering
479545
} // namespace vkb

framework/rendering/subpasses/forward_subpass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ForwardSubpass::ForwardSubpass(
4343
void ForwardSubpass::prepare()
4444
{
4545
auto &device = get_render_context().get_device();
46-
for (auto &mesh : meshes)
46+
for (auto &mesh : get_meshes())
4747
{
4848
for (auto &sub_mesh : mesh->get_submeshes())
4949
{
@@ -56,7 +56,7 @@ void ForwardSubpass::prepare()
5656

5757
void ForwardSubpass::draw(vkb::core::CommandBufferC &command_buffer)
5858
{
59-
allocate_lights<ForwardLights>(scene.get_components<sg::Light>(), MAX_FORWARD_LIGHT_COUNT);
59+
allocate_lights<ForwardLights>(get_scene().get_components<sg::Light>(), MAX_FORWARD_LIGHT_COUNT);
6060
command_buffer.bind_lighting(get_lighting_state(), 0, 4);
6161

6262
GeometrySubpass::draw(command_buffer);

0 commit comments

Comments
 (0)