Blender
V3.3
|
#include <memory.h>
Public Member Functions | |
device_texture (Device *device, const char *name, const uint slot, ImageDataType image_data_type, InterpolationType interpolation, ExtensionType extension) | |
~device_texture () | |
void * | alloc (const size_t width, const size_t height, const size_t depth=0) |
void | copy_to_device () |
![]() | |
size_t | memory_size () |
size_t | memory_elements_size (int elements) |
virtual | ~device_memory () |
void | swap_device (Device *new_device, size_t new_device_size, device_ptr new_device_ptr) |
void | restore_device () |
bool | is_resident (Device *sub_device) const |
Public Attributes | |
uint | slot |
TextureInfo | info |
![]() | |
DataType | data_type |
int | data_elements |
size_t | data_size |
size_t | device_size |
size_t | data_width |
size_t | data_height |
size_t | data_depth |
MemoryType | type |
const char * | name |
Device * | device |
device_ptr | device_pointer |
void * | host_pointer |
void * | shared_pointer |
int | shared_counter |
Protected Member Functions | |
size_t | size (const size_t width, const size_t height, const size_t depth) |
![]() | |
device_memory (Device *device, const char *name, MemoryType type) | |
device_memory (const device_memory &)=delete | |
device_memory (device_memory &&other) noexcept=delete | |
device_memory & | operator= (const device_memory &)=delete |
device_memory & | operator= (device_memory &&)=delete |
void * | host_alloc (size_t size) |
void | host_free () |
void | device_alloc () |
void | device_free () |
void | device_copy_to () |
void | device_copy_from (size_t y, size_t w, size_t h, size_t elem) |
void | device_zero () |
bool | device_is_cpu () |
Additional Inherited Members | |
![]() | |
device_ptr | original_device_ptr |
size_t | original_device_size |
Device * | original_device |
bool | need_realloc_ |
bool | modified |
Definition at line 597 of file cycles/device/memory.h.
device_texture::device_texture | ( | Device * | device, |
const char * | name, | ||
const uint | slot, | ||
ImageDataType | image_data_type, | ||
InterpolationType | interpolation, | ||
ExtensionType | extension | ||
) |
Definition at line 144 of file memory.cpp.
References device_memory::data_elements, device_memory::data_type, TextureInfo::data_type, TextureInfo::extension, IMAGE_DATA_NUM_TYPES, IMAGE_DATA_TYPE_BYTE, IMAGE_DATA_TYPE_BYTE4, IMAGE_DATA_TYPE_FLOAT, IMAGE_DATA_TYPE_FLOAT4, IMAGE_DATA_TYPE_HALF, IMAGE_DATA_TYPE_HALF4, IMAGE_DATA_TYPE_NANOVDB_FLOAT, IMAGE_DATA_TYPE_NANOVDB_FLOAT3, IMAGE_DATA_TYPE_NANOVDB_FP16, IMAGE_DATA_TYPE_NANOVDB_FPN, IMAGE_DATA_TYPE_USHORT, IMAGE_DATA_TYPE_USHORT4, info, TextureInfo::interpolation, TYPE_FLOAT, TYPE_HALF, TYPE_UCHAR, and TYPE_UINT16.
device_texture::~device_texture | ( | ) |
Definition at line 200 of file memory.cpp.
References device_memory::device_free(), and device_memory::host_free().
void * device_texture::alloc | ( | const size_t | width, |
const size_t | height, | ||
const size_t | depth = 0 |
||
) |
Definition at line 207 of file memory.cpp.
References device_memory::data_depth, device_memory::data_elements, device_memory::data_height, device_memory::data_size, device_memory::data_type, device_memory::data_width, datatype_size(), TextureInfo::depth, device_memory::device_free(), device_memory::device_pointer, TextureInfo::height, height, device_memory::host_alloc(), device_memory::host_free(), device_memory::host_pointer, info, size(), TextureInfo::width, and width.
void device_texture::copy_to_device | ( | ) |
Definition at line 230 of file memory.cpp.
References device_memory::device_copy_to().
|
inlineprotected |
Definition at line 614 of file cycles/device/memory.h.
Referenced by alloc().
TextureInfo device_texture::info |
Definition at line 611 of file cycles/device/memory.h.
Referenced by alloc(), device_texture(), and CPUDevice::tex_alloc().
uint device_texture::slot |
Definition at line 610 of file cycles/device/memory.h.
Referenced by CPUDevice::tex_alloc().