Open 3D Engine Atom Gem API Reference 25.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::DeviceRayTracingCompactionQuery Class Referenceabstract

#include <DeviceRayTracingCompactionQueryPool.h>

Inherits AZ::RHI::DeviceObject.

Inherited by AZ::DX12::RayTracingCompactionQuery, AZ::Null::RayTracingCompactionQuery, and AZ::Vulkan::RayTracingCompactionQuery.

Public Member Functions

 AZ_CLASS_ALLOCATOR (DeviceRayTracingCompactionQuery, AZ::SystemAllocator, 0)
 
 AZ_RTTI (DeviceRayTracingCompactionQuery, "{9f01df87-c773-4e9c-bdfd-93331ddbfdaf}", DeviceObject)
 
ResultCode Init (Device &device, DeviceRayTracingCompactionQueryPool *pool)
 
DeviceRayTracingCompactionQueryPoolGetPool ()
 
virtual uint64_t GetResult ()=0
 
- Public Member Functions inherited from AZ::RHI::DeviceObject
 AZ_RTTI (DeviceObject, "{17D34F71-944C-4AF5-9823-627474C4C0A6}", Object)
 
bool IsInitialized () const
 Returns whether the device object is initialized.
 
DeviceGetDevice () const
 
- Public Member Functions inherited from AZ::RHI::Object
 AZ_RTTI (Object, "{E43378F1-2331-4173-94B8-990ED20E6003}")
 
void SetName (const Name &name)
 Sets the name of the object.
 
const Name & GetName () const
 Returns the name set on the object by SetName.
 
uint32_t use_count ()
 Returns the current use count of the object.
 

Protected Attributes

DeviceRayTracingCompactionQueryPoolm_pool = nullptr
 
- Protected Attributes inherited from AZ::RHI::Object
AZStd::atomic_int m_useCount = 0
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::RHI::DeviceObject
void Init (Device &device)
 The derived class should call this method to assign the device.
 
void Shutdown () override
 Clears the current bound device to null.
 
- Protected Member Functions inherited from AZ::RHI::Object
void add_ref () const
 
void release () const
 

Detailed Description

Class for querying the compacted size of a Raytracing Acceleration Structure

It can be used to compact acceleration structures to save memory in the raytracing scene Acceleration structure compaction is done by performing these steps:

  1. Created and build the uncompacted acceleration structure
  2. Query the compacted size using DeviceRayTracingCompactionQuery and wait for it to be available on the CPU
  3. Create a new compacted acceleration structure with a buffer size returned by DeviceRayTracingCompactionQuery
  4. Copy the uncompacted acceleration structure to the compacted acceleration structure
  5. Delete the uncompacted acceleration structure to save memory

This process takes multiple frames to complete as the compact size must be available on the CPU

See https://developer.nvidia.com/blog/tips-acceleration-structure-compaction/ for a more detailed description


The documentation for this class was generated from the following file: