|
Blender V5.0
|
#include <GPU_platform.hh>
Inherits Device.
Classes | |
| struct | Mem |
Public Member Functions | |
| ~GPUDevice () noexcept(false) override | |
| 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 (const uint kernel_features) const =0 |
| virtual void | const_copy_to (const char *name, void *host, const 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< ThreadKernelGlobalsCPU > &) |
| virtual OSLGlobals * | get_cpu_osl_memory () |
| virtual void | build_bvh (BVH *bvh, Progress &progress, bool refit) |
| virtual void | release_bvh (BVH *) |
| virtual bool | set_bvh_limits (size_t, size_t) |
| 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 (const GraphicsInteropDevice &, const bool=false) |
| virtual void * | get_native_buffer (device_ptr) |
| virtual void * | get_guiding_device () const |
| virtual void | foreach_device (const std::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 |
| thread_mutex | texture_info_mutex |
| bool | need_texture_info = false |
| Public Attributes inherited from Device | |
| DeviceInfo | info |
| Stats & | stats |
| Profiler & | profiler |
| bool | headless = true |
Protected Types | |
| using | texMemObject = unsigned long long |
| using | arrayMemObject = unsigned long long |
| using | MemMap = map<device_memory *, Mem> |
Protected Member Functions | |
| GPUDevice (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_, bool headless_) | |
| virtual void | init_host_memory (const size_t preferred_texture_headroom=0, const size_t preferred_working_headroom=0) |
| virtual void | move_textures_to_host (const size_t size, const size_t headroom, const bool for_texture) |
| virtual GPUDevice::Mem * | generic_alloc (device_memory &mem, const 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, const size_t size)=0 |
| virtual void | free_device (void *device_pointer)=0 |
| virtual bool | shared_alloc (void *&shared_pointer, const size_t size)=0 |
| virtual void | shared_free (void *shared_pointer)=0 |
| bool | is_shared (const void *shared_pointer, const device_ptr device_pointer, Device *sub_device) override |
| virtual void * | shared_to_device_pointer (const void *shared_pointer)=0 |
| virtual void | copy_host_to_device (void *device_pointer, void *host_pointer, const 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 * | host_alloc (const MemoryType type, const size_t size) |
| virtual void | host_free (const MemoryType type, void *host_pointer, const size_t size) |
| virtual void | mem_alloc (device_memory &mem)=0 |
| virtual void | mem_copy_to (device_memory &mem)=0 |
| virtual void | mem_move_to_host (device_memory &mem)=0 |
| virtual void | mem_copy_from (device_memory &mem, const size_t y, size_t w, const 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 = false |
| size_t | map_host_used = 0 |
| size_t | map_host_limit = 0 |
| size_t | device_texture_headroom = 0 |
| size_t | device_working_headroom = 0 |
| MemMap | device_mem_map |
| thread_mutex | device_mem_map_mutex |
| size_t | device_mem_in_use = 0 |
| 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 unique_ptr< 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 (const uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | dummy_device (const string &error_msg="") |
| static string | device_capabilities (const uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | get_multi_device (const vector< DeviceInfo > &subdevices, const int threads, bool background) |
| static void | tag_update () |
| static void | free_memory () |
Definition at line 70 of file GPU_platform.hh.
|
protected |
Definition at line 361 of file device/device.h.
|
protected |
Definition at line 368 of file device/device.h.
|
protected |
Definition at line 360 of file device/device.h.
|
inlineprotected |
Definition at line 335 of file device/device.h.
References Device::Device(), MEM_GLOBAL, and texture_info.
Referenced by load_texture_info().
|
protectedpure virtual |
References size().
Referenced by generic_alloc().
|
protectedpure virtual |
References size().
Referenced by generic_copy_to().
|
protectedpure virtual |
Referenced by generic_free().
|
protectedvirtual |
Definition at line 654 of file device/device.cpp.
References alloc_device(), assert, can_map_host, device_memory::data_height, device_mem_in_use, device_mem_map, device_mem_map_mutex, device_memory, device_memory::device_pointer, device_memory::device_size, device_texture_headroom, device_working_headroom, free(), get_device_memory_info(), Device::host_free(), device_memory::host_pointer, lock, LOG_DEBUG, map_host_limit, map_host_used, MEM_DEVICE_ONLY, MEM_GLOBAL, MEM_TEXTURE, device_memory::memory_size(), move_textures_to_host(), device_memory::move_to_host, device_memory::name, Device::set_error(), shared_alloc(), device_memory::shared_counter, device_memory::shared_pointer, shared_to_device_pointer(), size(), Device::stats, status, string_human_readable_number(), string_human_readable_size(), texture_info, and device_memory::type.
|
protectedvirtual |
Definition at line 810 of file device/device.cpp.
References copy_host_to_device(), device_memory, device_memory::device_pointer, device_memory::host_pointer, device_memory::is_shared(), device_memory::memory_size(), and device_memory::shared_pointer.
|
protectedvirtual |
Definition at line 766 of file device/device.cpp.
References assert, DCHECK, device_mem_in_use, device_mem_map, device_mem_map_mutex, device_memory, device_memory::device_pointer, device_memory::device_size, free_device(), device_memory::host_alloc(), device_memory::host_pointer, device_memory::is_resident(), device_memory::is_shared(), lock, map_host_used, device_memory::memory_size(), device_memory::move_to_host, device_memory::shared_counter, shared_free(), device_memory::shared_pointer, size(), and Device::stats.
|
protectedpure virtual |
References free().
Referenced by generic_alloc(), and move_textures_to_host().
|
protectedvirtual |
Definition at line 538 of file device/device.cpp.
References device_texture_headroom, device_working_headroom, LOG_INFO, LOG_WARNING, map_host_limit, string_human_readable_number(), string_human_readable_size(), and system_physical_ram().
|
overrideprotectedvirtual |
Reimplemented from Device.
Definition at line 824 of file device/device.cpp.
References Device::Device(), and shared_to_device_pointer().
|
virtual |
Definition at line 526 of file device/device.cpp.
References GPUDevice(), load_texture_info(), need_texture_info, and texture_info.
Referenced by load_texture_info().
|
protectedvirtual |
Definition at line 573 of file device/device.cpp.
References GPUDevice::Mem::array, device_memory::data_height, device_mem_map, device_mem_map_mutex, device_memory, device_memory::device_move_to_host(), device_memory::device_size, free(), get_device_memory_info(), device_memory::is_resident(), device_memory::is_shared(), lock, LOG_DEBUG, MEM_GLOBAL, MEM_TEXTURE, device_memory::move_to_host, device_memory::name, need_texture_info, size(), texture_info, and device_memory::type.
Referenced by generic_alloc().
|
protectedpure virtual |
References size().
Referenced by generic_alloc().
|
protectedpure virtual |
References Device::Device().
Referenced by generic_free().
|
protectedpure virtual |
Referenced by generic_alloc(), and is_shared().
|
friend |
Definition at line 353 of file device/device.h.
References device_memory.
Referenced by device_memory, generic_alloc(), generic_copy_to(), generic_free(), and move_textures_to_host().
|
protected |
Definition at line 355 of file device/device.h.
Referenced by generic_alloc().
| uint32_t GPUDevice::device_id |
Definition at line 74 of file GPU_platform.hh.
|
protected |
Definition at line 372 of file device/device.h.
Referenced by generic_alloc(), and generic_free().
|
protected |
Definition at line 369 of file device/device.h.
Referenced by generic_alloc(), generic_free(), and move_textures_to_host().
|
protected |
Definition at line 370 of file device/device.h.
Referenced by generic_alloc(), generic_free(), and move_textures_to_host().
|
protected |
Definition at line 358 of file device/device.h.
Referenced by generic_alloc(), and init_host_memory().
|
protected |
Definition at line 359 of file device/device.h.
Referenced by generic_alloc(), and init_host_memory().
| std::string GPUDevice::identifier |
Definition at line 71 of file GPU_platform.hh.
| int GPUDevice::index |
Definition at line 72 of file GPU_platform.hh.
|
protected |
Definition at line 357 of file device/device.h.
Referenced by generic_alloc(), and init_host_memory().
|
protected |
Definition at line 356 of file device/device.h.
Referenced by generic_alloc(), and generic_free().
| std::string GPUDevice::name |
Definition at line 75 of file GPU_platform.hh.
Referenced by blender::gpu::init_device_list().
| bool GPUDevice::need_texture_info = false |
Definition at line 346 of file device/device.h.
Referenced by load_texture_info(), and move_textures_to_host().
| device_vector<TextureInfo> GPUDevice::texture_info |
Definition at line 344 of file device/device.h.
Referenced by generic_alloc(), GPUDevice(), load_texture_info(), and move_textures_to_host().
| thread_mutex GPUDevice::texture_info_mutex |
Definition at line 345 of file device/device.h.
| uint32_t GPUDevice::vendor_id |
Definition at line 73 of file GPU_platform.hh.