|
Blender V5.3
|
#include <DRW_gpu_wrapper.hh>
Inherits blender::blender::NonCopyable.
Inherited by blender::draw::TextureFromPool, blender::draw::TextureRef, and blender::eevee::UtilityTexture.
Public Member Functions | |
| Texture (const char *name="gpu::Texture") | |
| Texture (const char *name, gpu::TextureFormat format, eGPUTextureUsage usage, int extent, const float *data=nullptr, bool cubemap=false, int mip_len=1) | |
| Texture (const char *name, gpu::TextureFormat format, eGPUTextureUsage usage, int extent, int layers, const float *data=nullptr, bool cubemap=false, int mip_len=1) | |
| Texture (const char *name, gpu::TextureFormat format, eGPUTextureUsage usage, int2 extent, const float *data=nullptr, int mip_len=1) | |
| Texture (const char *name, gpu::TextureFormat format, eGPUTextureUsage usage, int2 extent, int layers, const float *data=nullptr, int mip_len=1) | |
| Texture (const char *name, gpu::TextureFormat format, eGPUTextureUsage usage, int3 extent, const float *data=nullptr, int mip_len=1) | |
| Texture (Texture &&other)=default | |
| ~Texture () | |
| gpu::Texture * | gpu_texture () |
| operator gpu::Texture * () const | |
| gpu::Texture ** | operator& () |
| Texture * | ptr () |
| Texture & | operator= (Texture &&a) |
| bool | ensure_1d (gpu::TextureFormat format, int extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1) |
| bool | ensure_1d_array (gpu::TextureFormat format, int extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1) |
| bool | ensure_2d (gpu::TextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1) |
| bool | ensure_2d_array (gpu::TextureFormat format, int2 extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1) |
| bool | ensure_3d (gpu::TextureFormat format, int3 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1) |
| bool | ensure_cube (gpu::TextureFormat format, int extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, float *data=nullptr, int mip_len=1) |
| bool | ensure_cube_array (gpu::TextureFormat format, int extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1) |
| bool | ensure_mip_views (bool cube_as_array=false) |
| gpu::Texture * | mip_view (int miplvl) |
| int | mip_count () const |
| bool | ensure_layer_views (bool cube_as_array=false) |
| gpu::Texture * | layer_view (int layer) |
| gpu::Texture * | stencil_view (bool cube_as_array=false) |
| gpu::Texture * | layer_range_view (int layer_start, int layer_len, bool cube_as_array=false) |
| bool | is_valid () const |
| int | width () const |
| int | height () const |
| int | depth () const |
| int | pixel_count () const |
| bool | is_depth () const |
| bool | is_stencil () const |
| bool | is_integer () const |
| bool | is_cube () const |
| bool | is_array () const |
| int3 | size (int miplvl=0) const |
| void | clear (float4 values) |
| void | clear (uint4 values) |
| void | clear (int4 values) |
| void | debug_clear () |
| template<typename T> | |
| T * | read (eGPUDataFormat format, int miplvl=0) |
| void | filter_mode (bool do_filter) |
| void | free () |
Static Public Member Functions | |
| static void | swap (Texture &a, Texture &b) |
Protected Member Functions | |
| void | free_texture_views () |
Protected Attributes | |
| gpu::Texture * | tx_ = nullptr |
| gpu::Texture * | stencil_view_ = nullptr |
| Vector< gpu::Texture *, 0 > | mip_views_ |
| Vector< gpu::Texture *, 0 > | layer_views_ |
| gpu::Texture * | layer_range_view_ = nullptr |
| const char * | name_ |
Definition at line 528 of file DRW_gpu_wrapper.hh.
|
inline |
Definition at line 538 of file DRW_gpu_wrapper.hh.
References name_.
Referenced by blender::workbench::get_matcap_tx(), operator=(), ptr(), swap(), Texture(), blender::draw::TextureFromPool::TextureFromPool(), and blender::eevee::UtilityTexture::UtilityTexture().
|
inline |
Definition at line 540 of file DRW_gpu_wrapper.hh.
References blender::data, name_, and tx_.
|
inline |
Definition at line 552 of file DRW_gpu_wrapper.hh.
References blender::data, name_, and tx_.
|
inline |
Definition at line 565 of file DRW_gpu_wrapper.hh.
References blender::data, name_, tx_, and UNPACK2.
|
inline |
Definition at line 576 of file DRW_gpu_wrapper.hh.
References blender::data, name_, tx_, and UNPACK2.
|
inline |
Definition at line 588 of file DRW_gpu_wrapper.hh.
References blender::data, name_, tx_, and UNPACK3.
|
default |
References Texture().
|
inline |
Definition at line 600 of file DRW_gpu_wrapper.hh.
References free().
|
inline |
Clear the entirety of the texture using one pixel worth of data.
Definition at line 908 of file DRW_gpu_wrapper.hh.
References blender::GPU_DATA_FLOAT, blender::GPU_texture_clear(), and tx_.
Referenced by blender::eevee::GBuffer::bind(), debug_clear(), blender::eevee::RayTraceBuffer::feedback_ensure(), blender::eevee::DepthOfField::render(), blender::eevee::ShadingView::render(), blender::eevee::VolumeLayer::render(), blender::eevee::PlanarProbeModule::set_view(), blender::eevee::VolumeProbeModule::set_view(), blender::eevee::ShadowTileMapPool::ShadowTileMapPool(), and blender::draw::test_eevee_shadow_finalize().
|
inline |
Clear the entirety of the texture using one pixel worth of data.
Definition at line 924 of file DRW_gpu_wrapper.hh.
References blender::GPU_DATA_INT, blender::GPU_texture_clear(), and tx_.
|
inline |
Clear the entirety of the texture using one pixel worth of data.
Definition at line 916 of file DRW_gpu_wrapper.hh.
References blender::GPU_DATA_UINT, blender::GPU_texture_clear(), and tx_.
|
inline |
Clear the texture to NaN for floats, or a to debug value for integers. (For debugging uninitialized data issues)
Definition at line 933 of file DRW_gpu_wrapper.hh.
References clear(), blender::GPU_texture_dimensions(), blender::GPU_texture_has_float_format(), blender::GPU_texture_has_integer_format(), blender::GPU_texture_has_normalized_format(), blender::GPU_texture_has_signed_format(), and NAN_FLT.
Referenced by blender::draw::TextureFromPool::free().
|
inline |
Definition at line 863 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_depth(), and tx_.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 655 of file DRW_gpu_wrapper.hh.
References blender::data, and blender::GPU_TEXTURE_USAGE_GENERAL.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 668 of file DRW_gpu_wrapper.hh.
References blender::BLI_assert(), blender::data, and blender::GPU_TEXTURE_USAGE_GENERAL.
Referenced by blender::workbench::SceneResources::init().
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 683 of file DRW_gpu_wrapper.hh.
References blender::data, blender::GPU_TEXTURE_USAGE_GENERAL, and UNPACK2.
Referenced by blender::draw::gpencil::Instance::antialiasing_accumulate(), blender::workbench::OpaquePass::draw(), blender::eevee::RayTraceBuffer::feedback_ensure(), blender::draw::gpencil::Instance::init(), blender::draw::overlay::Instance::init(), blender::workbench::SceneResources::init(), blender::workbench::SceneResources::load_jitter_tx(), blender::draw::gpencil::render_init_buffers(), blender::eevee::ShadowTileMapPool::ShadowTileMapPool(), blender::draw::test_draw_pass_all_commands(), blender::draw::test_draw_resource_id_gen(), blender::draw::test_draw_submit_only(), blender::draw::test_draw_visibility(), blender::draw::test_eevee_shadow_finalize(), and blender::draw::test_eevee_shadow_tilemap_amend().
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 696 of file DRW_gpu_wrapper.hh.
References blender::BLI_assert(), blender::data, blender::GPU_TEXTURE_USAGE_GENERAL, and UNPACK2.
Referenced by blender::eevee::PlanarProbeModule::init(), and blender::workbench::SceneResources::init().
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 711 of file DRW_gpu_wrapper.hh.
References blender::data, blender::GPU_TEXTURE_USAGE_GENERAL, and UNPACK3.
Referenced by blender::eevee::Precompute::Precompute(), blender::eevee::VolumeProbeModule::set_view(), and blender::draw::VolumeModule::VolumeModule().
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 724 of file DRW_gpu_wrapper.hh.
References blender::data, and blender::GPU_TEXTURE_USAGE_GENERAL.
|
inline |
Ensure the texture has the correct properties. Recreating it if needed. Return true if a texture has been created.
Definition at line 737 of file DRW_gpu_wrapper.hh.
References blender::data, and blender::GPU_TEXTURE_USAGE_GENERAL.
|
inline |
Ensure the availability of layer views. Layer views covers all layers of array textures. Returns true if the views were (re)created.
Definition at line 786 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_create_view(), blender::GPU_texture_format(), GPU_TEXTURE_FREE_SAFE, blender::GPU_texture_layer_count(), blender::IndexRange::IndexRange(), layer_views_, name_, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and tx_.
Referenced by blender::eevee::GBuffer::acquire(), blender::eevee::Film::get_aov_texture(), and blender::eevee::Film::get_pass_texture().
|
inline |
Ensure the availability of mipmap views. MIP view covers all layers of array textures.
Definition at line 751 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_create_view(), blender::GPU_texture_format(), GPU_TEXTURE_FREE_SAFE, blender::GPU_texture_mip_count(), blender::IndexRange::IndexRange(), mip_views_, name_, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and tx_.
|
inline |
Definition at line 962 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_filter_mode(), and tx_.
|
inline |
Free the internal texture but not the #draw::Texture itself.
Definition at line 970 of file DRW_gpu_wrapper.hh.
References free_texture_views(), GPU_TEXTURE_FREE_SAFE, and tx_.
Referenced by blender::draw::gpencil::Instance::begin_sync(), blender::workbench::OpaquePass::draw(), blender::workbench::SceneResources::load_jitter_tx(), operator=(), blender::eevee::VolumeProbeModule::set_view(), and ~Texture().
|
inlineprotected |
Definition at line 990 of file DRW_gpu_wrapper.hh.
References GPU_TEXTURE_FREE_SAFE, layer_range_view_, layer_views_, mip_views_, and stencil_view_.
Referenced by free(), blender::draw::TextureFromPool::release(), and blender::draw::TextureRef::wrap().
|
inline |
Definition at line 605 of file DRW_gpu_wrapper.hh.
References tx_.
Referenced by blender::draw::gpencil::Instance::acquire_resources(), blender::draw::gpencil::Instance::antialiasing_accumulate(), blender::workbench::OpaquePass::draw(), and blender::draw::compositor_engine::Context::get_pass_result().
|
inline |
Definition at line 858 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_height(), and tx_.
Referenced by blender::eevee::MotionBlurModule::render().
|
inline |
Definition at line 893 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_is_array(), and tx_.
|
inline |
Definition at line 888 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_is_cube(), and tx_.
|
inline |
Definition at line 873 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_has_depth_format(), and tx_.
|
inline |
Definition at line 883 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_has_integer_format(), and tx_.
|
inline |
Definition at line 878 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_has_stencil_format(), and tx_.
|
inline |
Returns true if the texture has been allocated or acquired from the pool.
Definition at line 848 of file DRW_gpu_wrapper.hh.
References tx_.
Referenced by blender::draw::overlay::Resources::acquire(), blender::draw::gpencil::Instance::draw(), blender::workbench::AntiAliasingPass::draw(), blender::workbench::OpaquePass::draw(), blender::workbench::TransparentDepthPass::draw(), blender::draw::overlay::MeshUVs::end_sync(), blender::draw::gpencil::Instance::init(), blender::workbench::SceneResources::init(), layer_range_view(), blender::eevee::RayTraceModule::render(), blender::draw::gpencil::render_init_buffers(), and blender::eevee::VolumeProbeModule::set_view().
|
inline |
Layer range view cover only the given range. This can only be called to create one range. View is recreated if:
Definition at line 827 of file DRW_gpu_wrapper.hh.
References blender::BLI_assert(), BLI_assert_msg, blender::GPU_texture_create_view(), blender::GPU_texture_format(), GPU_TEXTURE_FREE_SAFE, blender::GPU_texture_layer_count(), is_valid(), layer_range_view_, name_, and tx_.
|
inline |
Definition at line 803 of file DRW_gpu_wrapper.hh.
References layer, and layer_views_.
Referenced by blender::eevee::Film::get_aov_texture(), blender::eevee::Film::get_pass_texture(), blender::eevee::ShadingView::render(), and blender::eevee::PlanarProbeModule::set_view().
|
inline |
Definition at line 776 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_mip_count(), and tx_.
Referenced by blender::texture_update_mipmap_chain().
|
inline |
Definition at line 768 of file DRW_gpu_wrapper.hh.
References BLI_assert_msg, mip_views_, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::eevee::LookdevModule::rotate_world_probe_data().
|
inline |
Definition at line 611 of file DRW_gpu_wrapper.hh.
References blender::BLI_assert(), and tx_.
|
inline |
Definition at line 618 of file DRW_gpu_wrapper.hh.
References tx_.
Definition at line 629 of file DRW_gpu_wrapper.hh.
References free(), blender::gpu::Texture::name_, and Texture().
|
inline |
Definition at line 868 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_height(), blender::GPU_texture_width(), and tx_.
|
inline |
WORKAROUND: used when needing a ref to the Texture and not the gpu::Texture.
Definition at line 624 of file DRW_gpu_wrapper.hh.
References Texture().
Referenced by blender::workbench::VolumePass::draw().
|
inline |
Returns a buffer containing the texture data for the specified miplvl. The memory block needs to be manually freed by MEM_delete().
Definition at line 957 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_read(), T, and tx_.
Referenced by blender::eevee::Precompute::Precompute(), blender::draw::test_eevee_shadow_finalize(), and blender::draw::test_eevee_shadow_tilemap_amend().
|
inline |
Definition at line 898 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_get_mipmap_size(), size(), and tx_.
Referenced by blender::draw::overlay::Resources::acquire(), blender::draw::gpencil::Instance::antialiasing_accumulate(), blender::draw::overlay::Wireframe::copy_depth(), blender::draw::overlay::Outline::draw_line_only_ex(), blender::draw::overlay::MeshUVs::end_sync(), blender::gpu::Texture::read_size_get(), blender::draw::gpencil::render_frame(), size(), and blender::eevee::LookdevModule::store_world_probe_data().
|
inline |
Definition at line 808 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_create_view(), blender::GPU_texture_format(), name_, stencil_view_, and tx_.
Referenced by blender::workbench::OpaquePass::draw(), and blender::workbench::VolumePass::draw().
Swap the content of the two textures.
Definition at line 979 of file DRW_gpu_wrapper.hh.
References b, layer_range_view_, layer_views_, mip_views_, name_, stencil_view_, Texture(), and tx_.
Referenced by blender::draw::TextureFromPool::swap().
|
inline |
Definition at line 853 of file DRW_gpu_wrapper.hh.
References blender::GPU_texture_width(), and tx_.
Referenced by blender::eevee::MotionBlurModule::render().
|
protected |
Definition at line 534 of file DRW_gpu_wrapper.hh.
Referenced by free_texture_views(), layer_range_view(), and swap().
|
protected |
Definition at line 533 of file DRW_gpu_wrapper.hh.
Referenced by ensure_layer_views(), free_texture_views(), layer_view(), and swap().
|
protected |
Definition at line 532 of file DRW_gpu_wrapper.hh.
Referenced by ensure_mip_views(), free_texture_views(), mip_view(), and swap().
|
protected |
Definition at line 535 of file DRW_gpu_wrapper.hh.
Referenced by ensure_layer_views(), ensure_mip_views(), blender::draw::TextureFromPool::free(), layer_range_view(), stencil_view(), swap(), Texture(), Texture(), Texture(), Texture(), Texture(), and Texture().
|
protected |
Definition at line 531 of file DRW_gpu_wrapper.hh.
Referenced by free_texture_views(), stencil_view(), and swap().
|
protected |
Definition at line 530 of file DRW_gpu_wrapper.hh.
Referenced by clear(), clear(), clear(), depth(), ensure_layer_views(), ensure_mip_views(), filter_mode(), free(), blender::draw::TextureFromPool::free(), gpu_texture(), height(), is_array(), is_cube(), is_depth(), is_integer(), is_stencil(), is_valid(), layer_range_view(), mip_count(), operator gpu::Texture *(), operator&(), pixel_count(), read(), blender::draw::TextureFromPool::release(), blender::draw::TextureFromPool::retain(), size(), stencil_view(), swap(), Texture(), Texture(), Texture(), Texture(), Texture(), and width().