Skip to content

Commit

Permalink
layers: Remove accel struct maps
Browse files Browse the repository at this point in the history
  • Loading branch information
arno-lunarg committed Feb 26, 2024
1 parent 13deb08 commit 164554d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 311 deletions.
4 changes: 2 additions & 2 deletions layers/layer_chassis_dispatch_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ VkResult DispatchBuildAccelerationStructuresKHR(
if (pInfos) {
local_pInfos = new safe_VkAccelerationStructureBuildGeometryInfoKHR[infoCount];
for (uint32_t index0 = 0; index0 < infoCount; ++index0) {
local_pInfos[index0].initialize(&pInfos[index0], true, ppBuildRangeInfos[index0]);
local_pInfos[index0].initialize(&pInfos[index0]);
if (pInfos[index0].srcAccelerationStructure) {
local_pInfos[index0].srcAccelerationStructure = layer_data->Unwrap(pInfos[index0].srcAccelerationStructure);
}
Expand Down Expand Up @@ -1506,7 +1506,7 @@ void DispatchGetAccelerationStructureBuildSizesKHR(
{
if (pBuildInfo) {
local_pBuildInfo = &var_local_pBuildInfo;
local_pBuildInfo->initialize(pBuildInfo, false, nullptr);
local_pBuildInfo->initialize(pBuildInfo);
if (pBuildInfo->srcAccelerationStructure) {
local_pBuildInfo->srcAccelerationStructure = layer_data->Unwrap(pBuildInfo->srcAccelerationStructure);
}
Expand Down
6 changes: 3 additions & 3 deletions layers/state_tracker/ray_tracing_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ class AccelerationStructureKHR : public StateObject {
StateObject::Destroy();
}

void Build(const VkAccelerationStructureBuildGeometryInfoKHR *pInfo, const bool is_host,
const VkAccelerationStructureBuildRangeInfoKHR *build_range_info) {
void Build(const VkAccelerationStructureBuildGeometryInfoKHR *pInfo, const bool,
const VkAccelerationStructureBuildRangeInfoKHR *) {
built = true;
build_info_khr.initialize(pInfo, is_host, build_range_info);
build_info_khr.initialize(pInfo);
};

void UpdateBuildRangeInfos(const VkAccelerationStructureBuildRangeInfoKHR *p_build_range_infos, uint32_t geometry_count) {
Expand Down
4 changes: 2 additions & 2 deletions layers/vulkan/generated/layer_chassis_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8800,7 +8800,7 @@ void DispatchCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, ui
if (pInfos) {
local_pInfos = new safe_VkAccelerationStructureBuildGeometryInfoKHR[infoCount];
for (uint32_t index0 = 0; index0 < infoCount; ++index0) {
local_pInfos[index0].initialize(&pInfos[index0], false, nullptr);
local_pInfos[index0].initialize(&pInfos[index0]);

if (pInfos[index0].srcAccelerationStructure) {
local_pInfos[index0].srcAccelerationStructure = layer_data->Unwrap(pInfos[index0].srcAccelerationStructure);
Expand Down Expand Up @@ -8832,7 +8832,7 @@ void DispatchCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBu
if (pInfos) {
local_pInfos = new safe_VkAccelerationStructureBuildGeometryInfoKHR[infoCount];
for (uint32_t index0 = 0; index0 < infoCount; ++index0) {
local_pInfos[index0].initialize(&pInfos[index0], false, nullptr);
local_pInfos[index0].initialize(&pInfos[index0]);

if (pInfos[index0].srcAccelerationStructure) {
local_pInfos[index0].srcAccelerationStructure = layer_data->Unwrap(pInfos[index0].srcAccelerationStructure);
Expand Down
13 changes: 4 additions & 9 deletions layers/vulkan/generated/vk_safe_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -18105,15 +18105,13 @@ struct safe_VkAccelerationStructureGeometryKHR {
VkAccelerationStructureGeometryDataKHR geometry;
VkGeometryFlagsKHR flags;

safe_VkAccelerationStructureGeometryKHR(const VkAccelerationStructureGeometryKHR* in_struct, const bool is_host,
const VkAccelerationStructureBuildRangeInfoKHR* build_range_info,
PNextCopyState* copy_state = {}, bool copy_pnext = true);
safe_VkAccelerationStructureGeometryKHR(const VkAccelerationStructureGeometryKHR* in_struct, PNextCopyState* copy_state = {},
bool copy_pnext = true);
safe_VkAccelerationStructureGeometryKHR(const safe_VkAccelerationStructureGeometryKHR& copy_src);
safe_VkAccelerationStructureGeometryKHR& operator=(const safe_VkAccelerationStructureGeometryKHR& copy_src);
safe_VkAccelerationStructureGeometryKHR();
~safe_VkAccelerationStructureGeometryKHR();
void initialize(const VkAccelerationStructureGeometryKHR* in_struct, const bool is_host,
const VkAccelerationStructureBuildRangeInfoKHR* build_range_info, PNextCopyState* copy_state = {});
void initialize(const VkAccelerationStructureGeometryKHR* in_struct, PNextCopyState* copy_state = {});
void initialize(const safe_VkAccelerationStructureGeometryKHR* copy_src, PNextCopyState* copy_state = {});
VkAccelerationStructureGeometryKHR* ptr() { return reinterpret_cast<VkAccelerationStructureGeometryKHR*>(this); }
VkAccelerationStructureGeometryKHR const* ptr() const {
Expand All @@ -18134,15 +18132,12 @@ struct safe_VkAccelerationStructureBuildGeometryInfoKHR {
safe_VkDeviceOrHostAddressKHR scratchData;

safe_VkAccelerationStructureBuildGeometryInfoKHR(const VkAccelerationStructureBuildGeometryInfoKHR* in_struct,
const bool is_host,
const VkAccelerationStructureBuildRangeInfoKHR* build_range_infos,
PNextCopyState* copy_state = {}, bool copy_pnext = true);
safe_VkAccelerationStructureBuildGeometryInfoKHR(const safe_VkAccelerationStructureBuildGeometryInfoKHR& copy_src);
safe_VkAccelerationStructureBuildGeometryInfoKHR& operator=(const safe_VkAccelerationStructureBuildGeometryInfoKHR& copy_src);
safe_VkAccelerationStructureBuildGeometryInfoKHR();
~safe_VkAccelerationStructureBuildGeometryInfoKHR();
void initialize(const VkAccelerationStructureBuildGeometryInfoKHR* in_struct, const bool is_host,
const VkAccelerationStructureBuildRangeInfoKHR* build_range_infos, PNextCopyState* copy_state = {});
void initialize(const VkAccelerationStructureBuildGeometryInfoKHR* in_struct, PNextCopyState* copy_state = {});
void initialize(const safe_VkAccelerationStructureBuildGeometryInfoKHR* copy_src, PNextCopyState* copy_state = {});
VkAccelerationStructureBuildGeometryInfoKHR* ptr() {
return reinterpret_cast<VkAccelerationStructureBuildGeometryInfoKHR*>(this);
Expand Down
Loading

0 comments on commit 164554d

Please sign in to comment.