|
Blender V5.0
|
#include <memory.h>
Inherits device_memory.
Public Member Functions | |
| device_texture (Device *device, const char *name, const uint slot, ImageDataType image_data_type, InterpolationType interpolation, ExtensionType extension) | |
| ~device_texture () override | |
| void * | alloc (const size_t width, const size_t height) |
| void | copy_to_device () |
| Public Member Functions inherited from device_memory | |
| size_t | memory_size () |
| size_t | memory_elements_size (const int elements) |
| virtual | ~device_memory () |
| void | swap_device (Device *new_device, const size_t new_device_size, device_ptr new_device_ptr) |
| void | restore_device () |
| bool | is_resident (Device *sub_device) const |
| bool | is_shared (Device *sub_device) const |
| 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 |
Public Attributes | |
| uint | slot = 0 |
| TextureInfo | info |
| Public Attributes inherited from device_memory | |
| DataType | data_type |
| int | data_elements |
| size_t | data_size |
| size_t | device_size |
| size_t | data_width |
| size_t | data_height |
| MemoryType | type |
| const char * | name |
| string | name_storage |
| Device * | device |
| device_ptr | device_pointer |
| void * | host_pointer |
| void * | shared_pointer |
| int | shared_counter |
| bool | move_to_host = false |
Protected Member Functions | |
| size_t | size (const size_t width, const size_t height) |
| Protected Member Functions inherited from device_memory | |
| device_memory (Device *device, const char *name, MemoryType type) | |
| void * | host_alloc (const size_t size) |
| void | device_alloc () |
| void | device_copy_to () |
| void | device_move_to_host () |
| void | device_copy_from (const size_t y, const size_t w, size_t h, const size_t elem) |
| void | device_zero () |
| void | host_and_device_free () |
| bool | device_is_cpu () |
Additional Inherited Members | |
| Protected Attributes inherited from device_memory | |
| device_ptr | original_device_ptr |
| size_t | original_device_size |
| Device * | original_device |
| bool | need_realloc_ |
| bool | modified |
Definition at line 588 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 157 of file memory.cpp.
References assert, device_memory::data_elements, device_memory::data_type, device_memory::Device, device_memory::device, device_memory::device_memory(), 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_EMPTY, IMAGE_DATA_TYPE_NANOVDB_FLOAT, IMAGE_DATA_TYPE_NANOVDB_FLOAT3, IMAGE_DATA_TYPE_NANOVDB_FLOAT4, IMAGE_DATA_TYPE_NANOVDB_FP16, IMAGE_DATA_TYPE_NANOVDB_FPN, IMAGE_DATA_TYPE_USHORT, IMAGE_DATA_TYPE_USHORT4, info, MEM_TEXTURE, device_memory::name, slot, TYPE_FLOAT, TYPE_HALF, TYPE_UCHAR, and TYPE_UINT16.
|
override |
Definition at line 214 of file memory.cpp.
References device_memory::host_and_device_free().
| void * device_texture::alloc | ( | const size_t | width, |
| const size_t | height ) |
Definition at line 220 of file memory.cpp.
References assert, device_memory::data_elements, device_memory::data_height, device_memory::data_size, device_memory::data_type, device_memory::data_width, datatype_size(), device_memory::device_pointer, device_memory::host_alloc(), device_memory::host_and_device_free(), device_memory::host_pointer, info, and size().
| void device_texture::copy_to_device | ( | ) |
Definition at line 240 of file memory.cpp.
References device_memory::device_copy_to().
|
inlineprotected |
Definition at line 605 of file cycles/device/memory.h.
Referenced by alloc().
| TextureInfo device_texture::info |
Definition at line 602 of file cycles/device/memory.h.
Referenced by alloc(), device_texture(), and CPUDevice::tex_alloc().
| uint device_texture::slot = 0 |
Definition at line 601 of file cycles/device/memory.h.
Referenced by device_texture(), and CPUDevice::tex_alloc().