Skip to content

Commit ebddd2c

Browse files
committed
Merge branch 'master' into sampler-concepts
# Conflicts: # examples_tests
2 parents 2f5f692 + 598fa91 commit ebddd2c

File tree

5 files changed

+26
-14
lines changed

5 files changed

+26
-14
lines changed

CMakePresets.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
"NBL_CPACK_CI": "ON",
2525
"GIT_FAIL_IF_NONZERO_EXIT": "OFF",
2626
"NBL_DOCKER_DIND_BUILD": "ON",
27-
"NBL_CE_PUBLISH_PORT": "10240"
27+
"NBL_CE_PUBLISH_PORT": "10240",
28+
"NSC_DEBUG_EDIF_FILE_BIT": "ON",
29+
"NSC_DEBUG_EDIF_SOURCE_BIT": "OFF",
30+
"NSC_DEBUG_EDIF_LINE_BIT": "OFF",
31+
"NSC_DEBUG_EDIF_TOOL_BIT": "ON",
32+
"NSC_DEBUG_EDIF_NON_SEMANTIC_BIT": "OFF"
2833
}
2934
},
3035
{

cmake/common.cmake

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,9 +1185,9 @@ define_property(TARGET PROPERTY NBL_MOUNT_POINT_DEFINES
11851185
BRIEF_DOCS "List of preprocessor defines with mount points"
11861186
)
11871187

1188+
option(NSC_DEBUG_EDIF_SOURCE_BIT "Add \"-fspv-debug=source\" to NSC Debug CLI" ON)
11881189
option(NSC_DEBUG_EDIF_FILE_BIT "Add \"-fspv-debug=file\" to NSC Debug CLI" ON)
1189-
option(NSC_DEBUG_EDIF_SOURCE_BIT "Add \"-fspv-debug=source\" to NSC Debug CLI" OFF)
1190-
option(NSC_DEBUG_EDIF_LINE_BIT "Add \"-fspv-debug=line\" to NSC Debug CLI" OFF)
1190+
option(NSC_DEBUG_EDIF_LINE_BIT "Add \"-fspv-debug=line\" to NSC Debug CLI" ON)
11911191
option(NSC_DEBUG_EDIF_TOOL_BIT "Add \"-fspv-debug=tool\" to NSC Debug CLI" ON)
11921192
option(NSC_DEBUG_EDIF_NON_SEMANTIC_BIT "Add \"-fspv-debug=vulkan-with-source\" to NSC Debug CLI" OFF)
11931193
option(NSC_USE_DEPFILE "Generate depfiles for NSC custom commands" ON)
@@ -1235,23 +1235,23 @@ struct DeviceConfigCaps
12351235
)
12361236

12371237
if(NSC_DEBUG_EDIF_FILE_BIT)
1238-
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug>:-fspv-debug=file>)
1238+
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug,RelWithDebInfo>:-fspv-debug=file>)
12391239
endif()
1240-
1240+
12411241
if(NSC_DEBUG_EDIF_SOURCE_BIT)
1242-
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug>:-fspv-debug=source>)
1242+
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug,RelWithDebInfo>:-fspv-debug=source>)
12431243
endif()
1244-
1244+
12451245
if(NSC_DEBUG_EDIF_LINE_BIT)
1246-
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug>:-fspv-debug=line>)
1246+
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug,RelWithDebInfo>:-fspv-debug=line>)
12471247
endif()
1248-
1248+
12491249
if(NSC_DEBUG_EDIF_TOOL_BIT)
1250-
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug>:-fspv-debug=tool>)
1250+
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug,RelWithDebInfo>:-fspv-debug=tool>)
12511251
endif()
1252-
1252+
12531253
if(NSC_DEBUG_EDIF_NON_SEMANTIC_BIT)
1254-
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug>:-fspv-debug=vulkan-with-source>)
1254+
list(APPEND REQUIRED_OPTIONS $<$<CONFIG:Debug,RelWithDebInfo>:-fspv-debug=vulkan-with-source>)
12551255
endif()
12561256

12571257
if(NOT NBL_EMBED_BUILTIN_RESOURCES)

include/nbl/video/IGPUAccelerationStructure.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,13 @@ class IGPUTopLevelAccelerationStructure : public asset::ITopLevelAccelerationStr
503503
return oit;
504504
}
505505

506+
// to get the section that `trackedBLASes` get written into
507+
template<typename ForwardIterator> // TODO: requires
508+
inline ForwardIterator getBLASTrackingOffset(ForwardIterator begin) const
509+
{
510+
return begin+(Base::isUpdate ? 4:3);
511+
}
512+
506513

507514
core::bitflag<BUILD_FLAGS> buildFlags = BUILD_FLAGS::PREFER_FAST_BUILD_BIT;
508515
// What we use to indicate `VkAccelerationStructureGeometryInstancesDataKHR::arrayOfPointers`

src/nbl/video/IGPUCommandBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ uint32_t IGPUCommandBuffer::buildAccelerationStructures_common(const std::span<c
812812
{
813813
// we still need to clear the BLAS tracking list if the TLAS has nothing to track, so add even if trackedBLASes.empty()
814814
if constexpr (std::is_same_v<DeviceBuildInfo,IGPUTopLevelAccelerationStructure::DeviceBuildInfo>)
815-
m_TLASTrackingOps.emplace_back(TLASTrackingWrite{.srcBegin=oit,.count=static_cast<uint32_t>(info.trackedBLASes.size()),.dst=info.dstAS});
815+
m_TLASTrackingOps.emplace_back(TLASTrackingWrite{.srcBegin=info.getBLASTrackingOffset(oit),.count=static_cast<uint32_t>(info.trackedBLASes.size()),.dst=info.dstAS});
816816
oit = info.fillTracking(oit);
817817
}
818818

0 commit comments

Comments
 (0)