Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable Acceleration Structures #1955

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
53575c0
Add utils handle->info-struct to AddressTracker, check build-sizes an…
fabian-lunarg Dec 10, 2024
8b70107
cleanup refactor, stubs for replacement AS
fabian-lunarg Dec 10, 2024
a3c76b7
shadow acceleration-structure creation
fabian-lunarg Dec 11, 2024
fa66582
work on shadow-AS cleanup and buffer-alignment
fabian-lunarg Dec 11, 2024
4f28b3f
work on AccelerationStructure replacement. portable replay starts wor…
fabian-lunarg Dec 17, 2024
15165fb
Add and integrate ProcessUpdateDescriptorSets
fabian-lunarg Dec 18, 2024
f661b0a
Process meta-commands (rebuild AS when trimming)
fabian-lunarg Dec 18, 2024
31c6b89
Implement ProcessBuildVulkanAccelerationStructuresMetaCommand.
fabian-lunarg Jan 6, 2025
52a48f6
Add missing tracking of AS scratch-buffers, needed for trimming
fabian-lunarg Jan 6, 2025
b8170af
Drop instance_buffers_data, cleanup, doc
fabian-lunarg Jan 7, 2025
3969f33
Seperate AS- and scratch shadow-objects, minor improvements
fabian-lunarg Jan 9, 2025
d967730
Add VulkanCaptureManager::OverrideCmdCopyAccelerationStructureKHR
fabian-lunarg Jan 13, 2025
ba3e802
work on ProcessVulkanAccelerationStructuresWritePropertiesMetaCommand
fabian-lunarg Jan 13, 2025
59300ac
Overall progress and cleanup. some open things, but slowly finalizing
fabian-lunarg Jan 14, 2025
ca92462
bring back opaque shadergroup-handles, you never know
fabian-lunarg Jan 14, 2025
16d5964
compute-shaders compiled against vulkan1.1 + optimized spirv
fabian-lunarg Jan 14, 2025
64843cc
Guard address_replacer.ProcessCmdTraceRays(), only for '-m rebind'
fabian-lunarg Jan 14, 2025
7dfe3e5
review comments, cleanup
fabian-lunarg Jan 14, 2025
414a0bc
Extend state-tracking for VkPhysicalDeviceAccelerationStructureProper…
fabian-lunarg Jan 15, 2025
a6d0117
Fetch VkPhysicalDeviceAccelerationStructurePropertiesKHR, in case nob…
fabian-lunarg Jan 16, 2025
86b6e1b
Consolidate alignment utils in dedicated header
fabian-lunarg Jan 16, 2025
8f9c77a
Repeat call to SetRaytracingProperties, if necessary. we might have m…
fabian-lunarg Jan 16, 2025
1778128
simpler API for SetRaytracingProperties
fabian-lunarg Jan 16, 2025
85bde2b
Minor fixes and corrections
fabian-lunarg Jan 20, 2025
bb7c379
Add missing vkCmdResetQueryPool before running internal queries
fabian-lunarg Jan 21, 2025
26d7ca3
remove a duplicated VkMemoryPropertyFlags, minor correction in doc-st…
fabian-lunarg Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/framework/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ add_library(gfxrecon_util STATIC "")

target_sources(gfxrecon_util
PRIVATE
${GFXRECON_SOURCE_DIR}/framework/util/alignment_utils.h
${GFXRECON_SOURCE_DIR}/framework/util/argument_parser.h
${GFXRECON_SOURCE_DIR}/framework/util/argument_parser.cpp
${GFXRECON_SOURCE_DIR}/framework/util/buffer_writer.h
Expand Down
3 changes: 1 addition & 2 deletions framework/decode/metadata_consumer_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ class MetadataConsumerBase
format::HandleId device_id,
uint32_t info_count,
StructPointerDecoder<Decoded_VkAccelerationStructureBuildGeometryInfoKHR>* geometry_infos,
StructPointerDecoder<Decoded_VkAccelerationStructureBuildRangeInfoKHR*>* range_infos,
std::vector<std::vector<VkAccelerationStructureInstanceKHR>>& instance_buffers_data)
StructPointerDecoder<Decoded_VkAccelerationStructureBuildRangeInfoKHR*>* range_infos)
{}

virtual void ProcessCopyVulkanAccelerationStructuresMetaCommand(
Expand Down
36 changes: 8 additions & 28 deletions framework/decode/screenshot_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,25 +539,6 @@ VkDeviceSize ScreenshotHandler::GetCopyBufferSize(VkDevice
return memory_requirements.size;
}

uint32_t ScreenshotHandler::GetMemoryTypeIndex(const VkPhysicalDeviceMemoryProperties& memory_properties,
uint32_t type_bits,
VkMemoryPropertyFlags property_flags) const
{
uint32_t memory_type_index = std::numeric_limits<uint32_t>::max();

for (uint32_t i = 0; i < memory_properties.memoryTypeCount; ++i)
{
if ((type_bits & (1 << i)) &&
((memory_properties.memoryTypes[i].propertyFlags & property_flags) == property_flags))
{
memory_type_index = i;
break;
}
}

return memory_type_index;
}

VkResult ScreenshotHandler::CreateCopyResource(VkDevice device,
const encode::VulkanDeviceTable* device_table,
const VkPhysicalDeviceMemoryProperties& memory_properties,
Expand Down Expand Up @@ -597,17 +578,17 @@ VkResult ScreenshotHandler::CreateCopyResource(VkDevice
device_table->GetBufferMemoryRequirements(device, copy_resource->buffer, &memory_requirements);

uint32_t memory_type_index =
GetMemoryTypeIndex(memory_properties,
memory_requirements.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
graphics::GetMemoryTypeIndex(memory_properties,
memory_requirements.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT);

if (memory_type_index == std::numeric_limits<uint32_t>::max())
{
/* fallback to coherent */
memory_type_index =
GetMemoryTypeIndex(memory_properties,
memory_requirements.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
memory_type_index = graphics::GetMemoryTypeIndex(memory_properties,
memory_requirements.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
}

assert(memory_type_index != std::numeric_limits<uint32_t>::max());
Expand Down Expand Up @@ -660,9 +641,8 @@ VkResult ScreenshotHandler::CreateCopyResource(VkDevice
VkMemoryRequirements memory_requirements;
device_table->GetImageMemoryRequirements(device, copy_resource->convert_image, &memory_requirements);

uint32_t memory_type_index = GetMemoryTypeIndex(
uint32_t memory_type_index = graphics::GetMemoryTypeIndex(
memory_properties, memory_requirements.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);

assert(memory_type_index != std::numeric_limits<uint32_t>::max());

VkMemoryAllocateInfo allocate_info = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
Expand Down
4 changes: 0 additions & 4 deletions framework/decode/screenshot_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ class ScreenshotHandler : public ScreenshotHandlerBase
uint32_t width,
uint32_t height) const;

uint32_t GetMemoryTypeIndex(const VkPhysicalDeviceMemoryProperties& memory_properties,
uint32_t type_bits,
VkMemoryPropertyFlags property_flags) const;

VkResult CreateCopyResource(VkDevice device,
const encode::VulkanDeviceTable* device_table,
const VkPhysicalDeviceMemoryProperties& memory_properties,
Expand Down
Loading
Loading