|
Blender V4.3
|
#include <GPU_platform.hh>
Inherits Device.
Classes | |
| struct | Mem |
Public Member Functions | |
| virtual | ~GPUDevice () noexcept(false) |
| virtual bool | load_texture_info () |
Public Member Functions inherited from Device | |
| virtual | ~Device () noexcept(false) |
| virtual const string & | error_message () |
| bool | have_error () |
| virtual void | set_error (const string &error) |
| virtual BVHLayoutMask | get_bvh_layout_mask (uint kernel_features) const =0 |
| virtual void | const_copy_to (const char *name, void *host, size_t size)=0 |
| virtual bool | load_kernels (uint) |
| virtual bool | load_osl_kernels () |
| virtual void | cancel () |
| virtual bool | is_ready (string &) const |
| virtual unique_ptr< DeviceQueue > | gpu_queue_create () |
| virtual void | get_cpu_kernel_thread_globals (vector< CPUKernelThreadGlobals > &) |
| virtual void * | get_cpu_osl_memory () |
| virtual void | build_bvh (BVH *bvh, Progress &progress, bool refit) |
| virtual void | release_bvh (BVH *) |
| virtual int | device_number (Device *) |
| virtual void | optimize_for_scene (Scene *) |
| virtual bool | is_resident (device_ptr, Device *sub_device) |
| virtual bool | check_peer_access (Device *) |
| virtual bool | should_use_graphics_interop () |
| virtual void * | get_native_buffer (device_ptr) |
| virtual void * | get_guiding_device () const |
| virtual void | foreach_device (const function< void(Device *)> &callback) |
Public Attributes | |
| std::string | identifier |
| int | index |
| uint32_t | vendor_id |
| uint32_t | device_id |
| std::string | name |
| device_vector< TextureInfo > | texture_info |
| bool | need_texture_info |
Public Attributes inherited from Device | |
| DeviceInfo | info |
| Stats & | stats |
| Profiler & | profiler |
| bool | headless = true |
Protected Types | |
| typedef unsigned long long | texMemObject |
| typedef unsigned long long | arrayMemObject |
| typedef map< device_memory *, Mem > | MemMap |
Protected Member Functions | |
| GPUDevice (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_, bool headless_) | |
| virtual void | init_host_memory (size_t preferred_texture_headroom=0, size_t preferred_working_headroom=0) |
| virtual void | move_textures_to_host (size_t size, bool for_texture) |
| virtual GPUDevice::Mem * | generic_alloc (device_memory &mem, size_t pitch_padding=0) |
| virtual void | generic_free (device_memory &mem) |
| virtual void | generic_copy_to (device_memory &mem) |
| virtual void | get_device_memory_info (size_t &total, size_t &free)=0 |
| virtual bool | alloc_device (void *&device_pointer, size_t size)=0 |
| virtual void | free_device (void *device_pointer)=0 |
| virtual bool | alloc_host (void *&shared_pointer, size_t size)=0 |
| virtual void | free_host (void *shared_pointer)=0 |
| virtual void | transform_host_pointer (void *&device_pointer, void *&shared_pointer)=0 |
| virtual void | copy_host_to_device (void *device_pointer, void *host_pointer, size_t size)=0 |
Protected Member Functions inherited from Device | |
| Device (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_, bool headless_) | |
| virtual device_ptr | mem_alloc_sub_ptr (device_memory &, size_t, size_t) |
| virtual void | mem_free_sub_ptr (device_ptr) |
| virtual void | mem_alloc (device_memory &mem)=0 |
| virtual void | mem_copy_to (device_memory &mem)=0 |
| virtual void | mem_copy_from (device_memory &mem, size_t y, size_t w, size_t h, size_t elem)=0 |
| virtual void | mem_zero (device_memory &mem)=0 |
| virtual void | mem_free (device_memory &mem)=0 |
Protected Attributes | |
| bool | can_map_host |
| size_t | map_host_used |
| size_t | map_host_limit |
| size_t | device_texture_headroom |
| size_t | device_working_headroom |
| MemMap | device_mem_map |
| thread_mutex | device_mem_map_mutex |
| bool | move_texture_to_host |
| size_t | device_mem_in_use |
Protected Attributes inherited from Device | |
| string | error_msg |
Friends | |
| class | device_memory |
Additional Inherited Members | |
Static Public Member Functions inherited from Device | |
| static const CPUKernels & | get_cpu_kernels () |
| static Device * | create (const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless) |
| static DeviceType | type_from_string (const char *name) |
| static string | string_from_type (DeviceType type) |
| static vector< DeviceType > | available_types () |
| static vector< DeviceInfo > | available_devices (uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | dummy_device (const string &error_msg="") |
| static string | device_capabilities (uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | get_multi_device (const vector< DeviceInfo > &subdevices, int threads, bool background) |
| static void | tag_update () |
| static void | free_memory () |
Definition at line 69 of file GPU_platform.hh.
|
protected |
Definition at line 370 of file device/device.h.
|
protected |
Definition at line 380 of file device/device.h.
|
protected |
Definition at line 369 of file device/device.h.
|
inlineprotected |
Definition at line 334 of file device/device.h.
|
virtual |
Definition at line 492 of file device/device.cpp.
|
protectedpure virtual |
Referenced by generic_alloc().
|
protectedpure virtual |
Referenced by generic_alloc().
|
protectedpure virtual |
Referenced by generic_copy_to().
|
protectedpure virtual |
Referenced by generic_free().
|
protectedpure virtual |
Referenced by generic_free().
|
protectedvirtual |
Definition at line 629 of file device/device.cpp.
References alloc_device(), alloc_host(), can_map_host, device_memory::data_height, device_mem_in_use, device_mem_map, device_mem_map_mutex, device_memory::device_pointer, device_memory::device_size, device_texture_headroom, device_working_headroom, free(), get_device_memory_info(), device_memory::host_free(), device_memory::host_pointer, lock, map_host_limit, map_host_used, Stats::mem_alloc(), MEM_DEVICE_ONLY, MEM_GLOBAL, MEM_TEXTURE, device_memory::memory_size(), move_texture_to_host, move_textures_to_host(), device_memory::name, NULL, Device::set_error(), device_memory::shared_counter, device_memory::shared_pointer, size(), Device::stats, string_human_readable_number(), string_human_readable_size(), texture_info, transform_host_pointer(), device_memory::type, GPUDevice::Mem::use_mapped_host, and VLOG_WORK.
|
protectedvirtual |
Definition at line 790 of file device/device.cpp.
References copy_host_to_device(), device_mem_map, device_mem_map_mutex, device_memory::device_pointer, device_memory::host_pointer, lock, device_memory::memory_size(), and device_memory::shared_pointer.
|
protectedvirtual |
Definition at line 752 of file device/device.cpp.
References DCHECK, device_mem_in_use, device_mem_map, device_mem_map_mutex, device_memory::device_pointer, device_memory::device_size, free_device(), free_host(), device_memory::host_pointer, lock, map_host_used, Stats::mem_free(), device_memory::shared_counter, device_memory::shared_pointer, Device::stats, and GPUDevice::Mem::use_mapped_host.
|
protectedpure virtual |
Referenced by generic_alloc().
|
protectedvirtual |
Definition at line 508 of file device/device.cpp.
References device_texture_headroom, device_working_headroom, map_host_limit, string_human_readable_number(), string_human_readable_size(), system_physical_ram(), VLOG_INFO, and VLOG_WARNING.
|
virtual |
Definition at line 494 of file device/device.cpp.
References device_vector< T >::copy_to_device(), need_texture_info, and texture_info.
Referenced by move_textures_to_host().
|
protectedvirtual |
Definition at line 543 of file device/device.cpp.
References GPUDevice::Mem::array, device_memory::data_height, device_memory::device_copy_to(), device_mem_map, device_mem_map_mutex, device_memory::device_size, device_memory::is_resident(), load_texture_info(), lock, MEM_GLOBAL, MEM_TEXTURE, move_texture_to_host, device_memory::name, NULL, size(), texture_info, thread_mutex, device_memory::type, GPUDevice::Mem::use_mapped_host, and VLOG_WORK.
Referenced by generic_alloc().
|
protectedpure virtual |
Referenced by generic_alloc().
|
friend |
Definition at line 362 of file device/device.h.
|
protected |
Definition at line 364 of file device/device.h.
Referenced by generic_alloc().
| uint32_t GPUDevice::device_id |
Definition at line 73 of file GPU_platform.hh.
|
protected |
Definition at line 385 of file device/device.h.
Referenced by generic_alloc(), and generic_free().
|
protected |
Definition at line 381 of file device/device.h.
Referenced by generic_alloc(), generic_copy_to(), generic_free(), and move_textures_to_host().
|
protected |
Definition at line 382 of file device/device.h.
Referenced by generic_alloc(), generic_copy_to(), generic_free(), and move_textures_to_host().
|
protected |
Definition at line 367 of file device/device.h.
Referenced by generic_alloc(), and init_host_memory().
|
protected |
Definition at line 368 of file device/device.h.
Referenced by generic_alloc(), and init_host_memory().
| std::string GPUDevice::identifier |
Definition at line 70 of file GPU_platform.hh.
| int GPUDevice::index |
Definition at line 71 of file GPU_platform.hh.
|
protected |
Definition at line 366 of file device/device.h.
Referenced by generic_alloc(), and init_host_memory().
|
protected |
Definition at line 365 of file device/device.h.
Referenced by generic_alloc(), and generic_free().
|
protected |
Definition at line 383 of file device/device.h.
Referenced by generic_alloc(), and move_textures_to_host().
| std::string GPUDevice::name |
Definition at line 74 of file GPU_platform.hh.
| bool GPUDevice::need_texture_info |
Definition at line 355 of file device/device.h.
Referenced by load_texture_info().
| device_vector<TextureInfo> GPUDevice::texture_info |
Definition at line 354 of file device/device.h.
Referenced by generic_alloc(), load_texture_info(), and move_textures_to_host().
| uint32_t GPUDevice::vendor_id |
Definition at line 72 of file GPU_platform.hh.