OWL
OptiX7 Wrapper Library
owl::DeviceBuffer::DeviceDataForTextures Struct Reference

#include <Buffer.h>

Inheritance diagram for owl::DeviceBuffer::DeviceDataForTextures:
owl::DeviceBuffer::DeviceData owl::Buffer::DeviceData

Public Member Functions

 DeviceDataForTextures (DeviceBuffer *parent, const DeviceContext::SP &device)
 
void executeResize () override
 
void uploadAsync (const void *hostDataPtr) override
 
- Public Member Functions inherited from owl::DeviceBuffer::DeviceData
 DeviceData (DeviceBuffer *parent, const DeviceContext::SP &device)
 
virtual ~DeviceData ()
 
- Public Member Functions inherited from owl::Buffer::DeviceData
 DeviceData (const DeviceContext::SP &device)
 

Public Attributes

std::vector< Texture::SPhostHandles
 
- Public Attributes inherited from owl::DeviceBuffer::DeviceData
DeviceBuffer *const parent
 
- Public Attributes inherited from owl::Buffer::DeviceData
void * d_pointer { 0 }
 

Additional Inherited Members

- Public Types inherited from owl::DeviceBuffer::DeviceData
typedef std::shared_ptr< DeviceDataSP
 
- Public Types inherited from owl::Buffer::DeviceData
typedef std::shared_ptr< DeviceDataSP
 

Detailed Description

device-data for a device buffer like other device buffers, but containing texture objects - ie, these are Texture::SP on the host, but get translated to cudaTextureObject_t's upon upload

Constructor & Destructor Documentation

◆ DeviceDataForTextures()

owl::DeviceBuffer::DeviceDataForTextures::DeviceDataForTextures ( DeviceBuffer parent,
const DeviceContext::SP device 
)
inline

Member Function Documentation

◆ executeResize()

void owl::DeviceBuffer::DeviceDataForTextures::executeResize ( )
overridevirtual

executes the resize on the given device, including freeing old memory, and allocating required elemnts in device format, as required

Implements owl::DeviceBuffer::DeviceData.

◆ uploadAsync()

void owl::DeviceBuffer::DeviceDataForTextures::uploadAsync ( const void *  hostDataPtr)
overridevirtual

create an async upload for data from the given host data pointer, using the given device's cuda stream, and doing any required translation from host-side data (eg, a texture object handle) to device-side data (ie, the cudaTextreObject_t for that device). this will not wait for the upload to complete, so an explicit cuda sync has to be done to ensure no race conditiosn will occur

Implements owl::DeviceBuffer::DeviceData.

Member Data Documentation

◆ hostHandles

std::vector<Texture::SP> owl::DeviceBuffer::DeviceDataForTextures::hostHandles

this is used only for buffers over object types (bufers of textures, or buffers of buffers). For those buffers, we use this vector to store host-side handles of the objects in this buffer, to ensure proper recounting


The documentation for this struct was generated from the following files: