|
Blender V4.3
|
Go to the source code of this file.
Classes | |
| struct | GPUSamplerState |
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
Functions | |
Creation | |
| GPUTexture * | GPU_texture_create_1d (const char *name, int width, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data) |
| GPUTexture * | GPU_texture_create_1d_array (const char *name, int width, int layer_len, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data) |
| GPUTexture * | GPU_texture_create_2d (const char *name, int width, int height, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data) |
| GPUTexture * | GPU_texture_create_2d_array (const char *name, int width, int height, int layer_len, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data) |
| GPUTexture * | GPU_texture_create_3d (const char *name, int width, int height, int depth, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const void *data) |
| GPUTexture * | GPU_texture_create_cube (const char *name, int width, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data) |
| GPUTexture * | GPU_texture_create_cube_array (const char *name, int width, int layer_len, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data) |
| GPUTexture * | GPU_texture_create_compressed_2d (const char *name, int width, int height, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const void *data) |
| GPUTexture * | GPU_texture_create_from_vertbuf (const char *name, blender::gpu::VertBuf *vertex_buf) |
| GPUTexture * | GPU_texture_create_error (int dimension, bool array) |
Texture Views | |
| GPUTexture * | GPU_texture_create_view (const char *name, GPUTexture *source_texture, eGPUTextureFormat view_format, int mip_start, int mip_len, int layer_start, int layer_len, bool cube_as_array, bool use_stencil) |
Modify & Update | |
| void | GPU_unpack_row_length_set (uint len) |
| void | GPU_texture_update (GPUTexture *texture, eGPUDataFormat data_format, const void *data) |
| void | GPU_texture_update_sub (GPUTexture *texture, eGPUDataFormat data_format, const void *pixels, int offset_x, int offset_y, int offset_z, int width, int height, int depth) |
| void | GPU_texture_update_mipmap (GPUTexture *texture, int mip_level, eGPUDataFormat data_format, const void *pixels) |
| void | GPU_texture_clear (GPUTexture *texture, eGPUDataFormat data_format, const void *data) |
| void | GPU_texture_copy (GPUTexture *dst, GPUTexture *src) |
| void | GPU_texture_update_mipmap_chain (GPUTexture *texture) |
| void * | GPU_texture_read (GPUTexture *texture, eGPUDataFormat data_format, int mip_level) |
Binding | |
| void | GPU_texture_bind (GPUTexture *texture, int unit) |
| void | GPU_texture_bind_ex (GPUTexture *texture, GPUSamplerState state, int unit) |
| void | GPU_texture_unbind (GPUTexture *texture) |
| void | GPU_texture_unbind_all () |
| void | GPU_texture_image_bind (GPUTexture *texture, int unit) |
| void | GPU_texture_image_unbind (GPUTexture *texture) |
| void | GPU_texture_image_unbind_all () |
State API | |
| void | GPU_texture_compare_mode (GPUTexture *texture, bool use_compare) |
| void | GPU_texture_filter_mode (GPUTexture *texture, bool use_filter) |
| void | GPU_texture_mipmap_mode (GPUTexture *texture, bool use_mipmap, bool use_filter) |
| void | GPU_texture_anisotropic_filter (GPUTexture *texture, bool use_aniso) |
| void | GPU_texture_extend_mode_x (GPUTexture *texture, GPUSamplerExtendMode extend_mode) |
| void | GPU_texture_extend_mode_y (GPUTexture *texture, GPUSamplerExtendMode extend_mode) |
| void | GPU_texture_extend_mode (GPUTexture *texture, GPUSamplerExtendMode extend_mode) |
| void | GPU_texture_swizzle_set (GPUTexture *texture, const char swizzle[4]) |
Introspection API | |
| int | GPU_texture_dimensions (const GPUTexture *texture) |
| int | GPU_texture_width (const GPUTexture *texture) |
| int | GPU_texture_height (const GPUTexture *texture) |
| int | GPU_texture_depth (const GPUTexture *texture) |
| int | GPU_texture_layer_count (const GPUTexture *texture) |
| int | GPU_texture_mip_count (const GPUTexture *texture) |
| eGPUTextureFormat | GPU_texture_format (const GPUTexture *texture) |
| eGPUTextureUsage | GPU_texture_usage (const GPUTexture *texture) |
| bool | GPU_texture_is_array (const GPUTexture *texture) |
| bool | GPU_texture_is_cube (const GPUTexture *texture) |
| bool | GPU_texture_has_depth_format (const GPUTexture *texture) |
| bool | GPU_texture_has_stencil_format (const GPUTexture *texture) |
| bool | GPU_texture_has_integer_format (const GPUTexture *texture) |
| bool | GPU_texture_has_float_format (const GPUTexture *tex) |
| bool | GPU_texture_has_normalized_format (const GPUTexture *tex) |
| bool | GPU_texture_has_signed_format (const GPUTexture *tex) |
| void | GPU_texture_get_mipmap_size (GPUTexture *texture, int mip_level, int *r_size) |
Python API & meta-data | |
These are not intrinsic properties of a texture but they are stored inside the gpu::Texture structure for tracking purpose. | |
| int | GPU_texture_original_width (const GPUTexture *texture) |
| int | GPU_texture_original_height (const GPUTexture *texture) |
| void | GPU_texture_original_size_set (GPUTexture *texture, int width, int height) |
| void ** | GPU_texture_py_reference_get (GPUTexture *texture) |
| void | GPU_texture_py_reference_set (GPUTexture *texture, void **py_ref) |
| int | GPU_texture_opengl_bindcode (const GPUTexture *texture) |
Utilities | |
| size_t | GPU_texture_component_len (eGPUTextureFormat format) |
| size_t | GPU_texture_dataformat_size (eGPUDataFormat data_format) |
| const char * | GPU_texture_format_name (eGPUTextureFormat format) |
| unsigned int | GPU_texture_memory_usage_get () |
| void | GPU_samplers_update () |
Pixel Buffer | |
Used for interfacing with other graphic APIs using graphic interoperability. It can also be used for more efficient partial update from CPU side. | |
| GPUPixelBuffer * | GPU_pixel_buffer_create (size_t byte_size) |
| void | GPU_pixel_buffer_free (GPUPixelBuffer *pixel_buf) |
| void * | GPU_pixel_buffer_map (GPUPixelBuffer *pixel_buf) |
| void | GPU_pixel_buffer_unmap (GPUPixelBuffer *pixel_buf) |
| size_t | GPU_pixel_buffer_size (GPUPixelBuffer *pixel_buf) |
| int64_t | GPU_pixel_buffer_get_native_handle (GPUPixelBuffer *pixel_buf) |
| void | GPU_texture_update_sub_from_pixel_buffer (GPUTexture *texture, eGPUDataFormat data_format, GPUPixelBuffer *pixel_buf, int offset_x, int offset_y, int offset_z, int width, int height, int depth) |
Sampler State | |
| #define | GPU_SAMPLER_EXTEND_MODES_COUNT (GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER + 1) |
| #define | GPU_SAMPLER_CUSTOM_TYPES_COUNT (GPU_SAMPLER_CUSTOM_ICON + 1) |
| enum | GPUSamplerFiltering { GPU_SAMPLER_FILTERING_DEFAULT = 0 , GPU_SAMPLER_FILTERING_LINEAR = (1 << 0) , GPU_SAMPLER_FILTERING_MIPMAP = (1 << 1) , GPU_SAMPLER_FILTERING_ANISOTROPIC = (1 << 2) } |
| enum | GPUSamplerExtendMode { GPU_SAMPLER_EXTEND_MODE_EXTEND = 0 , GPU_SAMPLER_EXTEND_MODE_REPEAT , GPU_SAMPLER_EXTEND_MODE_MIRRORED_REPEAT , GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER } |
| enum | GPUSamplerCustomType { GPU_SAMPLER_CUSTOM_COMPARE = 0 , GPU_SAMPLER_CUSTOM_ICON } |
| enum | GPUSamplerStateType { GPU_SAMPLER_STATE_TYPE_PARAMETERS = 0 , GPU_SAMPLER_STATE_TYPE_CUSTOM , GPU_SAMPLER_STATE_TYPE_INTERNAL } |
| static const int | GPU_SAMPLER_FILTERING_TYPES_COUNT |
Freeing | |
| #define | GPU_TEXTURE_FREE_SAFE(texture) |
| void | GPU_texture_ref (GPUTexture *texture) |
| void | GPU_texture_free (GPUTexture *texture) |
A GPUTexture is a wrapper around backend specific texture objects. It allows, creation of diverse texture format and types, update, read, reference counting, internal sampler state tracking and texture binding.
Definition in file GPU_texture.hh.
| #define GPU_SAMPLER_CUSTOM_TYPES_COUNT (GPU_SAMPLER_CUSTOM_ICON + 1) |
Definition at line 132 of file GPU_texture.hh.
Referenced by blender::gpu::GLTexture::samplers_free(), blender::gpu::GLTexture::samplers_init(), and blender::gpu::MTLContext::~MTLContext().
| #define GPU_SAMPLER_EXTEND_MODES_COUNT (GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER + 1) |
Definition at line 95 of file GPU_texture.hh.
Referenced by blender::gpu::VKSamplers::free(), blender::gpu::VKSamplers::init(), blender::gpu::MTLContext::sampler_state_cache_init(), blender::gpu::GLTexture::samplers_init(), blender::gpu::GLTexture::samplers_update(), and blender::gpu::MTLContext::~MTLContext().
| #define GPU_TEXTURE_FREE_SAFE | ( | texture | ) |
Definition at line 659 of file GPU_texture.hh.
Referenced by blender::gpu::MTLVertBuf::bind_as_texture(), draw_view_data_clear(), draw_viewport_engines_data_clear(), DRW_smoke_exit(), DRW_texture_pool_free(), DRW_volume_free(), blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), blender::draw::Texture::free(), DisplayGPUTexture::gpu_resources_destroy(), gpu_viewport_textures_free(), blender::draw::Texture::layer_range_view(), blender::gpu::GLVertBuf::release_data(), blender::gpu::MTLVertBuf::release_data(), blender::eevee::LookdevWorld::sync(), and blender::realtime_compositor::CachedImage::~CachedImage().
| enum eGPUDataFormat |
Types of data for data specification. Used for formatting upload and download of data. When used with textures, they need to match or be compatible with the eGPUTextureFormat used. Check validate_data_format for compatibility list.
Definition at line 496 of file GPU_texture.hh.
| enum eGPUTextureFormat |
Types of texture internal storage. Defines how the data is stored inside the video memory. Be aware that some formats are not supported by render-buffers.
Definition at line 399 of file GPU_texture.hh.
| enum eGPUTextureUsage |
Texture usage flags allow backend implementations to contextually optimize texture resources. Any texture with an explicit flag should not perform operations which are not explicitly specified in the usage flags. If usage is unknown upfront, then GPU_TEXTURE_USAGE_GENERAL can be used.
NOTE: These usage flags act as hints for the backend implementations. There may be no benefit in some circumstances, and certain resource types may insert additional usage as required. However, explicit usage can ensure that hardware features such as render target/texture compression can be used. For explicit APIs such as Metal/Vulkan, texture usage needs to be specified up-front.
Definition at line 520 of file GPU_texture.hh.
| enum GPUSamplerCustomType |
The GPUSamplerCustomType specifies pre-defined sampler configurations with parameters that are not controllable using the GPUSamplerFiltering and GPUSamplerExtendMode options. Hence, the use of a custom sampler type is mutually exclusive with the use of the aforementioned enums.
The parameters that needs to be set for those custom samplers are not added as yet another option inside the GPUSamplerState structure because every possible configuration of sampler states are generated, setup, and cached at startup, so adding yet another axis of variation will multiply the number of configurations that needs to be cached, which is not worth it due to the limited use of the parameters needed to setup those custom samplers.
Definition at line 108 of file GPU_texture.hh.
| enum GPUSamplerExtendMode |
The GPUSamplerExtendMode specifies how the texture will be extrapolated for out-of-bound texture sampling.
Definition at line 78 of file GPU_texture.hh.
| enum GPUSamplerFiltering |
The GPUSamplerFiltering bit flag specifies the enabled filtering options of a texture sampler.
Definition at line 34 of file GPU_texture.hh.
| enum GPUSamplerStateType |
The GPUSamplerStateType specifies how the GPUSamplerState structure should be interpreted when passed around due to it being an overloaded type, see the documentation of each of the types for more information.
| Enumerator | |
|---|---|
| GPU_SAMPLER_STATE_TYPE_PARAMETERS | The filtering, extend_x, and extend_yz members of the GPUSamplerState structure will be used in setting up the sampler state for the texture. The custom_type member will be ignored in that case. |
| GPU_SAMPLER_STATE_TYPE_CUSTOM | The filtering, extend_x, and extend_yz members of the GPUSamplerState structure will be ignored, and the predefined custom parameters outlined in the documentation of GPUSamplerCustomType will be used in setting up the sampler state for the texture. |
| GPU_SAMPLER_STATE_TYPE_INTERNAL | The members of the GPUSamplerState structure will be ignored and the internal sampler state of the texture will be used. In other words, this is a signal value and stores no useful or actual data. |
Definition at line 139 of file GPU_texture.hh.
| ENUM_OPERATORS | ( | eGPUTextureUsage | , |
| GPU_TEXTURE_USAGE_GENERAL | ) |
| GPUPixelBuffer * GPU_pixel_buffer_create | ( | size_t | byte_size | ) |
Creates a #GPUPixelBuffer object with byte_size worth of storage.
Definition at line 985 of file gpu_texture.cc.
References ceil_to_multiple_ul(), blender::gpu::GPUBackend::get(), blender::gpu::GPUBackend::pixelbuf_alloc(), and blender::gpu::wrap().
Referenced by DisplayGPUPixelBuffer::gpu_resources_ensure().
| void GPU_pixel_buffer_free | ( | GPUPixelBuffer * | pixel_buf | ) |
Free a #GPUPixelBuffer object. The object should be unmapped before being freed.
Definition at line 998 of file gpu_texture.cc.
References blender::gpu::unwrap().
Referenced by DisplayGPUPixelBuffer::gpu_resources_destroy().
| int64_t GPU_pixel_buffer_get_native_handle | ( | GPUPixelBuffer * | pixel_buf | ) |
Return the native handle of the pix_buf to use for graphic interoperability registration.
Definition at line 1019 of file gpu_texture.cc.
Referenced by BlenderDisplayDriver::graphics_interop_get(), and blender::gpu::GLTexture::update_sub().
| void * GPU_pixel_buffer_map | ( | GPUPixelBuffer * | pixel_buf | ) |
Maps a pixel buffer to RAM, giving back access rights to CPU. The returned pointer is only valid until GPU_pixel_buffer_unmap is called. A #GPUPixelBuffer needs to be unmapped before being used for GPU side operation (like texture update through GPU_texture_update_sub_from_pixel_buffer).
Definition at line 1004 of file gpu_texture.cc.
Referenced by BlenderDisplayDriver::map_texture_buffer().
| size_t GPU_pixel_buffer_size | ( | GPUPixelBuffer * | pixel_buf | ) |
Return size in bytes of the pix_buf.
Definition at line 1014 of file gpu_texture.cc.
Referenced by DisplayGPUPixelBuffer::gpu_resources_ensure().
| void GPU_pixel_buffer_unmap | ( | GPUPixelBuffer * | pixel_buf | ) |
Unmap a pixel buffer from RAM, giving back access rights to GPU. Any pointer previously acquired by GPU_pixel_buffer_map becomes invalid.
Definition at line 1009 of file gpu_texture.cc.
Referenced by BlenderDisplayDriver::unmap_texture_buffer().
| void GPU_samplers_update | ( | ) |
Update sampler states depending on user settings.
Definition at line 1033 of file gpu_texture.cc.
References blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::samplers_update().
| void GPU_texture_anisotropic_filter | ( | GPUTexture * | texture, |
| bool | use_aniso ) |
Set anisotropic filter usage. Filter sample count is determined globally by U.anisotropic_filter and updated when GPU_samplers_update is called.
Definition at line 651 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_INTEGER, blender::gpu::GPU_FORMAT_STENCIL, GPU_SAMPLER_FILTERING_ANISOTROPIC, and tex.
Referenced by blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane(), drw_texture_set_parameters(), blender::nodes::node_composite_displace_cc::DisplaceOperation::execute(), blender::nodes::node_composite_map_uv_cc::MapUVOperation::execute(), IMB_create_gpu_texture(), and IMB_touch_gpu_texture().
| void GPU_texture_bind | ( | GPUTexture * | texture, |
| int | unit ) |
Bind a texture to a texture sampling image units using the texture internal sampler state.
Definition at line 577 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::Context::state_manager, tex, and blender::gpu::StateManager::texture_bind().
Referenced by blender::realtime_compositor::SMAAPrecomputedTextures::bind_area_texture(), blender::gpu::GLVertBuf::bind_as_texture(), blender::gpu::MTLVertBuf::bind_as_texture(), blender::realtime_compositor::DistortionGrid::bind_as_texture(), blender::realtime_compositor::KeyingScreen::bind_as_texture(), blender::realtime_compositor::Result::bind_as_texture(), blender::realtime_compositor::SymmetricBlurWeights::bind_as_texture(), blender::realtime_compositor::SymmetricSeparableBlurWeights::bind_as_texture(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::bind_distance_falloffs_as_texture(), blender::realtime_compositor::SMAAPrecomputedTextures::bind_search_texture(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::bind_weights_as_texture(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_alpha(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_image(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_pick(), blender::render::hydra::DrawTexture::draw(), draw_display_buffer(), blender::nodes::node_composite_render_layer_cc::RenderLayerOperation::execute_pass(), ThumbsDrawBatch::flush_batch(), gpu_viewport_draw_colormanaged(), GPU_viewport_stereo_composite(), immBindTexture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), blender::realtime_compositor::parallel_reduction_dispatch(), pygpu_shader_uniform_sampler(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), wm_draw_region_blend(), and wm_draw_window().
| void GPU_texture_bind_ex | ( | GPUTexture * | texture, |
| GPUSamplerState | state, | ||
| int | unit ) |
Bind a texture to a texture sampling image units using the explicit sampler state.
Definition at line 570 of file gpu_texture.cc.
References blender::gpu::Context::get(), GPU_SAMPLER_STATE_TYPE_INTERNAL, state, blender::gpu::Context::state_manager, tex, and blender::gpu::StateManager::texture_bind().
Referenced by draw_tile(), draw_update_uniforms(), blender::draw::command::ResourceBind::execute(), immBindTextureSampler(), and blender::gpu::GLFrameBuffer::subpass_transition_impl().
| void GPU_texture_clear | ( | GPUTexture * | texture, |
| eGPUDataFormat | data_format, | ||
| const void * | data ) |
Fills the whole texture with the same data for all pixels.
| data_format | data format of the pixel data. |
| data | 1 pixel worth of data to fill the texture with. |
Definition at line 552 of file gpu_texture.cc.
References BLI_assert, clear(), and tex.
Referenced by blender::gpu::tests::blend_test(), blender::draw::Texture::clear(), blender::draw::Texture::clear(), blender::draw::Texture::clear(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte(), blender::nodes::node_composite_composite_cc::CompositeOperation::execute_clear(), blender::nodes::node_composite_viewer_cc::ViewerOperation::execute_clear(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_ghost(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_streaks(), gpu_viewport_textures_create(), pygpu_texture_clear(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_texture_1d(), blender::gpu::tests::test_texture_1d_array(), blender::gpu::tests::test_texture_2d_array(), blender::gpu::tests::test_texture_3d(), blender::gpu::tests::test_texture_copy(), blender::gpu::tests::test_texture_cube(), blender::gpu::tests::test_texture_cube_array(), blender::gpu::tests::test_texture_read(), and blender::gpu::tests::vertex_buffer_fetch_mode().
| void GPU_texture_compare_mode | ( | GPUTexture * | texture, |
| bool | use_compare ) |
Set tex texture depth comparison mode. Only works on depth format.
Definition at line 621 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_DEPTH, GPU_SAMPLER_CUSTOM_COMPARE, GPU_SAMPLER_STATE_TYPE_CUSTOM, GPU_SAMPLER_STATE_TYPE_PARAMETERS, tex, and Tex::type.
Referenced by drw_texture_set_parameters().
| size_t GPU_texture_component_len | ( | eGPUTextureFormat | format | ) |
Returns the number of components in a texture format.
Definition at line 1048 of file gpu_texture.cc.
References blender::gpu::to_component_len().
Referenced by pygpu_texture__tp_new(), and pygpu_texture_read().
| void GPU_texture_copy | ( | GPUTexture * | dst, |
| GPUTexture * | src ) |
Copy a src texture content to a similar dst texture. Only MIP 0 is copied. Textures needs to match in size and format.
Definition at line 614 of file gpu_texture.cc.
References blender::gpu::Texture::copy_to().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter(), blender::workbench::AntiAliasingPass::draw(), blender::workbench::OpaquePass::draw(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_bloom(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_ghost(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_horizontal_pass(), ViewportColorSampleSession::init(), OVERLAY_xray_depth_copy(), OVERLAY_xray_depth_infront_copy(), blender::eevee::DeferredLayer::render(), and blender::gpu::tests::test_texture_copy().
| GPUTexture * GPU_texture_create_1d | ( | const char * | name, |
| int | width, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const float * | data ) |
Textures created via other means will either inherit usage from the source resource, or also be initialized with GPU_TEXTURE_USAGE_GENERAL.
flag. mips is the number of mip level to allocate. It must be >= 1.
Definition at line 302 of file gpu_texture.cc.
References GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_1D, gpu_texture_create(), and w().
Referenced by addGPULut1D2D(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::compute_distance_falloffs(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::compute_weights(), createGPUCurveMapping(), DRW_create_weight_colorramp_texture(), DRW_globals_update(), DRW_texture_create_1d_ex(), blender::gpu::MTLContext::get_dummy_texture(), pygpu_texture__tp_new(), blender::realtime_compositor::SymmetricSeparableBlurWeights::SymmetricSeparableBlurWeights(), blender::gpu::tests::test_shader_compute_1d(), and blender::gpu::tests::test_texture_1d().
| GPUTexture * GPU_texture_create_1d_array | ( | const char * | name, |
| int | width, | ||
| int | layer_len, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const float * | data ) |
Definition at line 313 of file gpu_texture.cc.
References GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_1D_ARRAY, gpu_texture_create(), and w().
Referenced by blender::gpu::MTLContext::get_dummy_texture(), gpu_material_ramp_texture_build(), gpu_texture_create_tile_mapping(), pygpu_texture__tp_new(), blender::gpu::tests::test_texture_1d_array(), and blender::gpu::tests::test_texture_1d_array_upload().
| GPUTexture * GPU_texture_create_2d | ( | const char * | name, |
| int | width, | ||
| int | height, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const float * | data ) |
Definition at line 325 of file gpu_texture.cc.
References GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_2D, gpu_texture_create(), and w().
Referenced by blender::render::hydra::GPURenderTaskDelegate::add_aov(), addGPULut1D2D(), blender::render::TexturePool::allocate_texture(), blf_glyph_draw(), draw_display_buffer(), draw_plane_marker_image(), draw_select_framebuffer_depth_only_setup(), draw_strip_thumbnails(), DRW_texture_create_2d_ex(), DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), edit_uv_mask_texture(), blender::gpu::MTLContext::get_dummy_texture(), GPENCIL_antialiasing_init(), GPU_offscreen_create(), DisplayGPUTexture::gpu_resources_ensure(), blender::gpu::tests::gpu_shader_lib_test(), gpu_viewport_textures_create(), IMB_create_gpu_texture(), IMB_touch_gpu_texture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), ViewportColorSampleSession::init(), blender::realtime_compositor::KeyingScreen::KeyingScreen(), blender::ed::sculpt_paint::load_tex(), blender::ed::sculpt_paint::load_tex_cursor(), pygpu_texture__tp_new(), radial_control_set_tex(), RE_pass_ensure_gpu_texture_cache(), select_engine_framebuffer_setup(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), blender::realtime_compositor::SMAAPrecomputedTextures::SMAAPrecomputedTextures(), studiolight_create_equirect_radiance_gputexture(), studiolight_create_matcap_gputexture(), blender::realtime_compositor::SymmetricBlurWeights::SymmetricBlurWeights(), blender::gpu::VKContext::sync_backbuffer(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_framebuffer_clear_color_multiple_attachments(), blender::gpu::tests::test_framebuffer_clear_color_single_attachment(), blender::gpu::tests::test_framebuffer_clear_depth(), blender::gpu::tests::test_framebuffer_clear_multiple_color_multiple_attachments(), blender::gpu::tests::test_framebuffer_scissor_test(), blender::gpu::tests::test_framebuffer_subpass_input(), blender::gpu::tests::test_shader_compute_2d(), blender::gpu::tests::test_texture_copy(), blender::gpu::tests::test_texture_read(), blender::gpu::tests::texture_create_upload_read(), blender::gpu::tests::texture_create_upload_read_pixel(), blender::gpu::tests::texture_create_upload_read_with_bias(), wm_software_cursor_draw_bitmap(), workbench_render_framebuffers_init(), and blender::render::hydra::DrawTexture::write_data().
| GPUTexture * GPU_texture_create_2d_array | ( | const char * | name, |
| int | width, | ||
| int | height, | ||
| int | layer_len, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const float * | data ) |
Definition at line 337 of file gpu_texture.cc.
References GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_2D_ARRAY, gpu_texture_create(), and w().
Referenced by DRW_texture_create_2d_array_ex(), blender::gpu::MTLContext::get_dummy_texture(), gpu_material_sky_texture_build(), IMB_touch_gpu_texture(), pygpu_texture__tp_new(), blender::gpu::tests::test_framebuffer_multi_viewport(), blender::gpu::tests::test_texture_2d_array(), and blender::gpu::tests::test_texture_2d_array_upload().
| GPUTexture * GPU_texture_create_3d | ( | const char * | name, |
| int | width, | ||
| int | height, | ||
| int | depth, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const void * | data ) |
Definition at line 350 of file gpu_texture.cc.
References GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_3D, gpu_texture_create(), and w().
Referenced by addGPULut3D(), DRW_smoke_ensure_velocity(), DRW_texture_create_3d_ex(), drw_volume_globals_init(), blender::gpu::MTLContext::get_dummy_texture(), pygpu_texture__tp_new(), blender::gpu::tests::test_texture_3d(), and blender::draw::volume_grid_cache_get().
| GPUTexture * GPU_texture_create_compressed_2d | ( | const char * | name, |
| int | width, | ||
| int | height, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const void * | data ) |
DDS texture loading. Return nullptr if compressed texture support is not available. data should hold all the data for mip_len mipmaps. The data is expected to be in compressed form. This isn't going to compress un-compress data.
Definition at line 386 of file gpu_texture.cc.
References blender::gpu::GPUBackend::get(), size(), tex, blender::gpu::GPUBackend::texture_alloc(), blender::gpu::to_block_size(), blender::gpu::to_data_format(), and w().
Referenced by IMB_create_gpu_texture().
| GPUTexture * GPU_texture_create_cube | ( | const char * | name, |
| int | width, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const float * | data ) |
Definition at line 363 of file gpu_texture.cc.
References GPU_DATA_FLOAT, gpu_texture_create(), blender::gpu::GPU_TEXTURE_CUBE, and w().
Referenced by DRW_texture_create_cube_ex(), blender::gpu::MTLContext::get_dummy_texture(), pygpu_texture__tp_new(), blender::gpu::tests::test_framebuffer_cube(), and blender::gpu::tests::test_texture_cube().
| GPUTexture * GPU_texture_create_cube_array | ( | const char * | name, |
| int | width, | ||
| int | layer_len, | ||
| int | mip_len, | ||
| eGPUTextureFormat | format, | ||
| eGPUTextureUsage | usage, | ||
| const float * | data ) |
Definition at line 374 of file gpu_texture.cc.
References GPU_DATA_FLOAT, gpu_texture_create(), blender::gpu::GPU_TEXTURE_CUBE_ARRAY, and w().
Referenced by DRW_texture_create_cube_array_ex(), blender::gpu::MTLContext::get_dummy_texture(), pygpu_texture__tp_new(), and blender::gpu::tests::test_texture_cube_array().
| GPUTexture * GPU_texture_create_error | ( | int | dimension, |
| bool | array ) |
Create an error texture that will bind an pink texture at draw time. dimension is the number of number of dimension of the texture (1, 2, or 3). array if set to true, will make the texture be an array (layered).
Definition at line 437 of file gpu_texture.cc.
References GPU_DATA_FLOAT, GPU_RGBA8, blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_1D_ARRAY, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_2D_ARRAY, blender::gpu::GPU_TEXTURE_3D, gpu_texture_create(), GPU_TEXTURE_USAGE_GENERAL, and w().
Referenced by BKE_movieclip_get_gpu_texture(), createGPUTextures(), and image_gpu_texture_error_create().
| GPUTexture * GPU_texture_create_from_vertbuf | ( | const char * | name, |
| blender::gpu::VertBuf * | vertex_buf ) |
Create a buffer texture that allow access to a buffer vertex_buf through a sampler of type (FLOAT/INT/UINT)_BUFFER.
Definition at line 417 of file gpu_texture.cc.
References BLI_assert_msg, blender::gpu::VertBuf::extended_usage_, blender::gpu::GPUBackend::get(), GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY, GPU_vertbuf_get_format(), tex, blender::gpu::GPUBackend::texture_alloc(), and blender::gpu::to_texture_format().
Referenced by blender::gpu::GLVertBuf::bind_as_texture(), blender::gpu::MTLVertBuf::bind_as_texture(), blender::gpu::MTLContext::get_dummy_texture(), and blender::draw::particle_batch_cache_ensure_procedural_strand_data().
| GPUTexture * GPU_texture_create_view | ( | const char * | name, |
| GPUTexture * | source_texture, | ||
| eGPUTextureFormat | view_format, | ||
| int | mip_start, | ||
| int | mip_len, | ||
| int | layer_start, | ||
| int | layer_len, | ||
| bool | cube_as_array, | ||
| bool | use_stencil ) |
Create an alias of the source texture data. A view can cover the whole texture or only a range of mip levels and/or array layer range.
view_format is the format in which the view will interpret the data of source_texture. It must match the format of source_texture in size (ex: RGBA8 can be reinterpreted as R32UI). See https://www.khronos.org/opengl/wiki/Texture_Storage#View_texture_aliases for an exhaustive list.
For Depth-Stencil texture view formats:
TODO(fclem): Target conversion (ex: Texture 2D as Texture 2D Array) is not implemented yet.
Definition at line 460 of file gpu_texture.cc.
References BLI_assert, BLI_assert_msg, blender::gpu::GPUBackend::get(), GPU_texture_format(), GPU_texture_usage(), GPU_TEXTURE_USAGE_FORMAT_VIEW, blender::gpu::Texture::init_view(), blender::gpu::GPUBackend::texture_alloc(), blender::gpu::unwrap(), and blender::gpu::wrap().
Referenced by blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), blender::draw::Texture::layer_range_view(), and blender::draw::Texture::stencil_view().
| size_t GPU_texture_dataformat_size | ( | eGPUDataFormat | data_format | ) |
Return the expected number of bytes for one pixel of data_format data.
Definition at line 1053 of file gpu_texture.cc.
References blender::gpu::to_bytesize().
Referenced by pygpu_buffer__bf_getbuffer(), pygpu_buffer__sq_item(), pygpu_buffer_calc_size(), pygpu_buffer_strides_calc(), pygpu_framebuffer_read_color(), and pygpu_framebuffer_read_depth().
| int GPU_texture_depth | ( | const GPUTexture * | texture | ) |
Return the depth of tex . Correspond to number of layers for 2D array texture. NOTE: return 0 for 1D & 2D textures.
Definition at line 732 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Texture::depth().
| int GPU_texture_dimensions | ( | const GPUTexture * | texture | ) |
Return the number of dimensions of the texture ignoring dimension of layers (1, 2 or 3). Cube textures are considered 2D.
Definition at line 703 of file gpu_texture.cc.
References blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_3D, and blender::gpu::GPU_TEXTURE_CUBE.
Referenced by createGPUShader().
| void GPU_texture_extend_mode | ( | GPUTexture * | texture, |
| GPUSamplerExtendMode | extend_mode ) |
Set tex texture sampling method for coordinates outside of the [0..1] uv range along both the x and y axis. See GPUSamplerExtendMode for the available and meaning of different extend modes.
Definition at line 672 of file gpu_texture.cc.
References tex.
Referenced by addGPULut1D2D(), addGPULut3D(), blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane(), createGPUCurveMapping(), draw_strip_thumbnails(), drw_texture_set_parameters(), drw_volume_globals_init(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute(), blender::nodes::node_composite_displace_cc::DisplaceOperation::execute(), blender::nodes::node_composite_map_uv_cc::MapUVOperation::execute(), blender::nodes::node_composite_moviedistortion_cc::MovieDistortionOperation::execute(), blender::nodes::node_composite_sunbeams_cc::SunBeamsOperation::execute(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_projector_distortion(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_screen_distortion(), blender::nodes::node_composite_scale_cc::ScaleOperation::execute_variable_size(), DisplayGPUTexture::gpu_resources_ensure(), image_get_gpu_texture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), sequencer_draw_scopes(), studiolight_create_equirect_radiance_gputexture(), blender::realtime_compositor::SymmetricSeparableBlurWeights::SymmetricSeparableBlurWeights(), and blender::draw::volume_grid_cache_get().
| void GPU_texture_extend_mode_x | ( | GPUTexture * | texture, |
| GPUSamplerExtendMode | extend_mode ) |
Set tex texture sampling method for coordinates outside of the [0..1] uv range along the x axis. See GPUSamplerExtendMode for the available and meaning of different extend modes.
Definition at line 660 of file gpu_texture.cc.
References tex.
Referenced by blender::realtime_compositor::realize_on_domain().
| void GPU_texture_extend_mode_y | ( | GPUTexture * | texture, |
| GPUSamplerExtendMode | extend_mode ) |
Set tex texture sampling method for coordinates outside of the [0..1] uv range along the y axis. See GPUSamplerExtendMode for the available and meaning of different extend modes.
Definition at line 666 of file gpu_texture.cc.
References tex.
Referenced by blender::realtime_compositor::realize_on_domain().
| void GPU_texture_filter_mode | ( | GPUTexture * | texture, |
| bool | use_filter ) |
Set tex texture filter usage. If use_filter is true, the texture will use linear interpolation between neighboring texels.
Definition at line 632 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_INTEGER, blender::gpu::GPU_FORMAT_STENCIL, GPU_SAMPLER_FILTERING_LINEAR, and tex.
Referenced by addGPULut1D2D(), addGPULut3D(), blender::workbench::AntiAliasingPass::AntiAliasingPass(), blender::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter(), blender::realtime_compositor::blend_neighborhood(), blender::realtime_compositor::calculate_blending_weights(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_downsample_chain(), createGPUCurveMapping(), blender::realtime_compositor::detect_edges(), draw_display_buffer(), draw_plane_marker_image(), draw_strip_thumbnails(), DRW_texture_pool_query(), drw_texture_set_parameters(), blender::nodes::node_composite_defocus_cc::DefocusOperation::execute(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute(), blender::nodes::node_composite_moviedistortion_cc::MovieDistortionOperation::execute(), blender::nodes::node_composite_sunbeams_cc::SunBeamsOperation::execute(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_bloom(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_highlights(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_mix(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_projector_distortion(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_screen_distortion(), blender::nodes::node_composite_scale_cc::ScaleOperation::execute_variable_size(), blender::draw::Texture::filter_mode(), GPENCIL_antialiasing_init(), DisplayGPUTexture::gpu_resources_ensure(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), radial_control_set_tex(), blender::realtime_compositor::realize_on_domain(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), blender::realtime_compositor::SMAAPrecomputedTextures::SMAAPrecomputedTextures(), studiolight_create_equirect_radiance_gputexture(), blender::realtime_compositor::SymmetricSeparableBlurWeights::SymmetricSeparableBlurWeights(), and wm_software_cursor_draw_bitmap().
| eGPUTextureFormat GPU_texture_format | ( | const GPUTexture * | texture | ) |
Return the texture format of tex.
Definition at line 764 of file gpu_texture.cc.
References tex.
Referenced by DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), blender::nodes::node_composite_render_layer_cc::RenderLayerOperation::execute_pass(), GPU_framebuffer_blit(), GPU_offscreen_format(), GPU_texture_create_view(), blender::draw::Texture::layer_range_view(), pygpu_texture_format_get(), pygpu_texture_read(), blender::draw::Texture::stencil_view(), blender::realtime_compositor::TexturePoolKey::TexturePoolKey(), blender::gpu::MTLFrameBuffer::update_attachments(), blender::realtime_compositor::Result::wrap_external(), and blender::eevee::Film::write_viewport_compositor_passes().
| const char * GPU_texture_format_name | ( | eGPUTextureFormat | format | ) |
Return the texture format as a string for display purpose. Example: GPU_RGBA8 returns as "RGBA8".
Definition at line 769 of file gpu_texture.cc.
References BLI_assert_unreachable, GPU_DEPTH24_STENCIL8, GPU_DEPTH32F_STENCIL8, GPU_DEPTH_COMPONENT16, GPU_DEPTH_COMPONENT24, GPU_DEPTH_COMPONENT32F, GPU_R11F_G11F_B10F, GPU_R16, GPU_R16_SNORM, GPU_R16F, GPU_R16I, GPU_R16UI, GPU_R32F, GPU_R32I, GPU_R32UI, GPU_R8, GPU_R8_SNORM, GPU_R8I, GPU_R8UI, GPU_RG16, GPU_RG16_SNORM, GPU_RG16F, GPU_RG16I, GPU_RG16UI, GPU_RG32F, GPU_RG32I, GPU_RG32UI, GPU_RG8, GPU_RG8_SNORM, GPU_RG8I, GPU_RG8UI, GPU_RGB10_A2, GPU_RGB10_A2UI, GPU_RGB16, GPU_RGB16_SNORM, GPU_RGB16F, GPU_RGB16I, GPU_RGB16UI, GPU_RGB32F, GPU_RGB32I, GPU_RGB32UI, GPU_RGB8, GPU_RGB8_SNORM, GPU_RGB8I, GPU_RGB8UI, GPU_RGB9_E5, GPU_RGBA16, GPU_RGBA16_SNORM, GPU_RGBA16F, GPU_RGBA16I, GPU_RGBA16UI, GPU_RGBA32F, GPU_RGBA32I, GPU_RGBA32UI, GPU_RGBA8, GPU_RGBA8_DXT1, GPU_RGBA8_DXT3, GPU_RGBA8_DXT5, GPU_RGBA8_SNORM, GPU_RGBA8I, GPU_RGBA8UI, GPU_SRGB8, GPU_SRGB8_A8, GPU_SRGB8_A8_DXT1, GPU_SRGB8_A8_DXT3, and GPU_SRGB8_A8_DXT5.
Referenced by uiTemplateImageInfo().
| void GPU_texture_free | ( | GPUTexture * | texture | ) |
This internally decrement the reference counter. If the reference counter is 1 when calling this function the #GPUTexture will be freed.
Definition at line 684 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Manager::begin_sync(), BKE_image_add_tile(), BKE_image_reassign_tile(), BKE_movieclip_free_gputexture(), BKE_previewimg_clear_single(), BKE_previewimg_free(), blf_glyph_draw(), BPyGPUTexture__tp_dealloc(), draw_display_buffer(), draw_plane_marker_image(), draw_select_framebuffer_depth_only_setup(), draw_strip_thumbnails(), draw_texture_release(), DRW_texture_free(), DRW_texture_pool_free(), DRW_texture_pool_reset(), blender::draw::image_engine::TextureInfo::ensure_gpu_texture(), free_buffers(), blender::gpu::MTLContext::free_dummy_resources(), blender::render::TexturePool::free_unused_and_reset(), gpu_free_unused_buffers(), GPU_material_free_single(), GPU_offscreen_free(), blender::gpu::tests::gpu_shader_lib_test(), icon_preview_endjob(), image_free_gpu(), image_free_tile(), IMB_free_gpu_textures(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), blender::ed::sculpt_paint::load_tex(), blender::ed::sculpt_paint::load_tex_cursor(), paint_cursor_delete_textures(), radial_control_cancel(), blender::realtime_compositor::Result::release(), select_engine_framebuffer_setup(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), blender::render::hydra::GPURenderTaskDelegate::set_viewport(), blender::gpu::VKContext::sync_backbuffer(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_framebuffer_clear_color_multiple_attachments(), blender::gpu::tests::test_framebuffer_clear_color_single_attachment(), blender::gpu::tests::test_framebuffer_clear_depth(), blender::gpu::tests::test_framebuffer_clear_multiple_color_multiple_attachments(), blender::gpu::tests::test_framebuffer_cube(), blender::gpu::tests::test_framebuffer_multi_viewport(), blender::gpu::tests::test_framebuffer_scissor_test(), blender::gpu::tests::test_framebuffer_subpass_input(), blender::gpu::tests::test_shader_compute_1d(), blender::gpu::tests::test_shader_compute_2d(), blender::gpu::tests::test_texture_1d(), blender::gpu::tests::test_texture_1d_array(), blender::gpu::tests::test_texture_1d_array_upload(), blender::gpu::tests::test_texture_2d_array(), blender::gpu::tests::test_texture_2d_array_upload(), blender::gpu::tests::test_texture_3d(), blender::gpu::tests::test_texture_copy(), blender::gpu::tests::test_texture_cube(), blender::gpu::tests::test_texture_cube_array(), blender::gpu::tests::test_texture_read(), blender::gpu::tests::texture_create_upload_read(), blender::gpu::tests::texture_create_upload_read_pixel(), blender::gpu::tests::texture_create_upload_read_with_bias(), wm_software_cursor_draw_bitmap(), blender::render::hydra::DrawTexture::write_data(), blender::realtime_compositor::CachedMask::~CachedMask(), blender::realtime_compositor::CachedTexture::~CachedTexture(), blender::render::Context::~Context(), blender::realtime_compositor::DistortionGrid::~DistortionGrid(), blender::render::hydra::DrawTexture::~DrawTexture(), GlyphCacheBLF::~GlyphCacheBLF(), blender::render::hydra::GPURenderTaskDelegate::~GPURenderTaskDelegate(), blender::realtime_compositor::KeyingScreen::~KeyingScreen(), blender::draw::Manager::~Manager(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::~MorphologicalDistanceFeatherWeights(), blender::gpu::MTLContext::~MTLContext(), OCIO_GPUCurveMappping::~OCIO_GPUCurveMappping(), OCIO_GPUTextures::~OCIO_GPUTextures(), blender::realtime_compositor::SMAAPrecomputedTextures::~SMAAPrecomputedTextures(), blender::realtime_compositor::SymmetricBlurWeights::~SymmetricBlurWeights(), blender::realtime_compositor::SymmetricSeparableBlurWeights::~SymmetricSeparableBlurWeights(), blender::draw::image_engine::TextureInfo::~TextureInfo(), blender::render::TexturePool::~TexturePool(), ViewportColorSampleSession::~ViewportColorSampleSession(), and blender::gpu::VKContext::~VKContext().
Returns the pixel dimensions of a texture's mip-map level. size is expected to be a pointer to a vector of dimension matching the texture's dimension (including the array dimension).
Definition at line 972 of file gpu_texture.cc.
References tex.
Referenced by blender::workbench::VolumePass::object_sync_volume(), blender::draw::Texture::size(), blender::gpu::MTLFrameBuffer::update_attachments(), and blender::gpu::VKFrameBuffer::update_size().
| bool GPU_texture_has_depth_format | ( | const GPUTexture * | texture | ) |
Return true if the texture format has a depth component.
Definition at line 912 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_DEPTH, and tex.
Referenced by blender::gpu::FrameBuffer::attachment_set(), DRW_texture_pool_query(), GPU_framebuffer_blit(), blender::draw::Texture::is_depth(), and pygpu_framebuffer__tp_new().
| bool GPU_texture_has_float_format | ( | const GPUTexture * | tex | ) |
Return true if the texture format is a float type.
Definition at line 927 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_FLOAT, and tex.
Referenced by blender::draw::Texture::debug_clear().
| bool GPU_texture_has_integer_format | ( | const GPUTexture * | texture | ) |
Return true if the texture format is an integer type (non-normalized integers).
Definition at line 922 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_INTEGER, and tex.
Referenced by blender::draw::Texture::debug_clear(), DRW_texture_pool_query(), and blender::draw::Texture::is_integer().
| bool GPU_texture_has_normalized_format | ( | const GPUTexture * | tex | ) |
Return true if the texture format is an integer normalized type.
Definition at line 932 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_NORMALIZED_INTEGER, and tex.
Referenced by blender::draw::Texture::debug_clear().
| bool GPU_texture_has_signed_format | ( | const GPUTexture * | tex | ) |
Return true if the texture format is a signed type.
Definition at line 938 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_SIGNED, and tex.
Referenced by blender::draw::Texture::debug_clear().
| bool GPU_texture_has_stencil_format | ( | const GPUTexture * | texture | ) |
Return true if the texture format has a stencil component.
Definition at line 917 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_STENCIL, and tex.
Referenced by blender::gpu::FrameBuffer::attachment_set(), GPU_framebuffer_blit(), GPU_framebuffer_config_array(), and blender::draw::Texture::is_stencil().
| int GPU_texture_height | ( | const GPUTexture * | texture | ) |
Return the height of tex. Correspond to number of layers for 1D array texture.
Definition at line 727 of file gpu_texture.cc.
References tex.
Referenced by blender::eevee::Film::accumulate(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_alpha(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_image(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_stabilization_data(), draw_select_framebuffer_depth_only_setup(), drw_manager_init(), DRW_select_buffer_read(), DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), eevee_engine_init(), GPU_offscreen_height(), GPU_offscreen_read_color(), GPU_offscreen_read_color_region(), gpu_texture_create_tile_mapping(), gpu_texture_update_from_ibuf(), gpu_texture_update_scaled(), GPU_viewport_draw_to_screen_ex(), blender::draw::Texture::height(), ViewportColorSampleSession::init(), blender::realtime_compositor::parallel_reduction_dispatch(), blender::draw::Texture::pixel_count(), pygpu_texture_height_get(), pygpu_texture_read(), blender::render::hydra::GPURenderTaskDelegate::read_aov(), blender::eevee::Film::read_pass(), blender::eevee::DepthOfField::render(), select_engine_framebuffer_setup(), blender::realtime_compositor::TexturePoolKey::TexturePoolKey(), view3d_depths_create(), blender::realtime_compositor::Result::wrap_external(), and blender::render::hydra::DrawTexture::write_data().
| void GPU_texture_image_bind | ( | GPUTexture * | texture, |
| int | unit ) |
Bind tex to an arbitrary load/store image unit. It correspond to a gpu::shader::ShaderCreateInfo::image() declaration.
Definition at line 594 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::StateManager::image_bind(), blender::gpu::Context::state_manager, tex, and blender::gpu::unwrap().
Referenced by blender::realtime_compositor::Result::bind_as_image(), draw_update_uniforms(), blender::draw::command::ResourceBind::execute(), blender::realtime_compositor::KeyingScreen::KeyingScreen(), blender::realtime_compositor::parallel_reduction_dispatch(), pygpu_shader_image(), blender::gpu::MTLFrameBuffer::subpass_transition_impl(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_shader_compute_1d(), and blender::gpu::tests::test_shader_compute_2d().
| void GPU_texture_image_unbind | ( | GPUTexture * | texture | ) |
Unbind tex from an arbitrary load/store image unit.
Definition at line 599 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::StateManager::image_unbind(), blender::gpu::Context::state_manager, tex, and blender::gpu::unwrap().
Referenced by blender::realtime_compositor::KeyingScreen::KeyingScreen(), blender::realtime_compositor::parallel_reduction_dispatch(), and blender::realtime_compositor::Result::unbind_as_image().
| void GPU_texture_image_unbind_all | ( | ) |
Unbind all texture from all arbitrary load/store image units.
Definition at line 604 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::StateManager::image_unbind_all(), and blender::gpu::Context::state_manager.
Referenced by blender::draw::command::RecordingState::cleanup(), draw_shgroup(), DRW_state_reset(), and blender::realtime_compositor::ShaderOperation::execute().
| bool GPU_texture_is_array | ( | const GPUTexture * | texture | ) |
Return true if the texture is an array texture type (has layers).
Definition at line 948 of file gpu_texture.cc.
References blender::gpu::GPU_TEXTURE_ARRAY, and tex.
Referenced by blender::gpu::FrameBuffer::attachment_set(), and blender::draw::Texture::is_array().
| bool GPU_texture_is_cube | ( | const GPUTexture * | texture | ) |
Return true if the texture is an cube-map texture type.
Definition at line 943 of file gpu_texture.cc.
References blender::gpu::GPU_TEXTURE_CUBE, and tex.
Referenced by blender::gpu::FrameBuffer::attachment_set(), and blender::draw::Texture::is_cube().
| int GPU_texture_layer_count | ( | const GPUTexture * | texture | ) |
Return the number of layers of tex. Return 1 if the texture is not layered.
Definition at line 737 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Texture::ensure_layer_views(), and blender::draw::Texture::layer_range_view().
| unsigned int GPU_texture_memory_usage_get | ( | ) |
Returns the memory usage of all currently allocated textures in bytes.
Definition at line 248 of file gpu_texture.cc.
Referenced by DRW_stats_draw().
| int GPU_texture_mip_count | ( | const GPUTexture * | texture | ) |
Return the number of mip-map level inside this texture.
Definition at line 742 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Texture::ensure_mip_views(), and blender::draw::Texture::mip_count().
| void GPU_texture_mipmap_mode | ( | GPUTexture * | texture, |
| bool | use_mipmap, | ||
| bool | use_filter ) |
Set tex texture filter and mip-map usage. If use_filter is true, the texture will use linear interpolation between neighboring texels. If use_mipmap is true, the texture will use mip-mapping as anti-aliasing method. If both are set to true, the texture will use linear interpolation between mip-map levels.
Definition at line 641 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_INTEGER, blender::gpu::GPU_FORMAT_STENCIL, GPU_SAMPLER_FILTERING_LINEAR, GPU_SAMPLER_FILTERING_MIPMAP, and tex.
Referenced by BKE_image_paint_set_mipmap(), BKE_movieclip_get_gpu_texture(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_plane(), drw_texture_set_parameters(), blender::nodes::node_composite_displace_cc::DisplaceOperation::execute(), blender::nodes::node_composite_map_uv_cc::MapUVOperation::execute(), gpu_texture_create_tile_array(), gpu_texture_create_tile_mapping(), image_get_gpu_texture(), immDrawPixelsTexScaledFullSize(), blender::eevee::HiZBuffer::sync(), and wm_draw_offscreen_texture_parameters().
| int GPU_texture_opengl_bindcode | ( | const GPUTexture * | texture | ) |
Return the backend handle of the texture.
Definition at line 967 of file gpu_texture.cc.
References tex.
Referenced by pygpu_offscreen_color_texture_get().
| int GPU_texture_original_height | ( | const GPUTexture * | texture | ) |
Definition at line 752 of file gpu_texture.cc.
References tex.
Referenced by image_camera_background_texture_get(), OVERLAY_edit_uv_cache_init(), and OVERLAY_image_empty_cache_populate().
Definition at line 757 of file gpu_texture.cc.
Referenced by image_get_gpu_texture().
| int GPU_texture_original_width | ( | const GPUTexture * | texture | ) |
Width & Height (of source data), optional. WORKAROUND: Calling 'BKE_image_get_size' may free the texture. Store the source image size (before down-scaling) inside the #GPUTexture to retrieve the original size later (Ref #59347).
Definition at line 747 of file gpu_texture.cc.
References tex.
Referenced by image_camera_background_texture_get(), OVERLAY_edit_uv_cache_init(), and OVERLAY_image_empty_cache_populate().
| void ** GPU_texture_py_reference_get | ( | GPUTexture * | texture | ) |
Reference of a pointer that needs to be cleaned when deallocating the texture. Points to BPyGPUTexture.tex
Definition at line 954 of file gpu_texture.cc.
References tex, and blender::gpu::unwrap().
Referenced by BPyGPUTexture_CreatePyObject().
| void GPU_texture_py_reference_set | ( | GPUTexture * | texture, |
| void ** | py_ref ) |
Definition at line 959 of file gpu_texture.cc.
References BLI_assert, tex, and blender::gpu::unwrap().
Referenced by BPyGPUTexture__tp_dealloc(), and BPyGPUTexture_CreatePyObject().
| void * GPU_texture_read | ( | GPUTexture * | texture, |
| eGPUDataFormat | data_format, | ||
| int | mip_level ) |
Read the content of a mip_level from a tex and returns a copy of its data.
imageStore() needs to be explicitly done using GPU_memory_barrier(GPU_BARRIER_TEXTURE_FETCH). Definition at line 542 of file gpu_texture.cc.
References BLI_assert_msg, GPU_texture_usage(), GPU_TEXTURE_USAGE_HOST_READ, and tex.
Referenced by blender::nodes::node_composite_file_output_cc::FileOutputOperation::add_pass_for_result(), blender::nodes::node_composite_file_output_cc::FileOutputOperation::add_view_for_result(), blender::realtime_compositor::compute_preview_from_result(), blender::nodes::node_composite_denoise_cc::DenoiseOperation::execute(), blender::realtime_compositor::ReduceToSingleValueOperation::execute(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), blender::gpu::tests::gpu_shader_lib_test(), ViewportColorSampleSession::init(), blender::render::Context::output_to_render_result(), blender::realtime_compositor::parallel_reduction_dispatch(), pygpu_texture_read(), blender::draw::Texture::read(), blender::eevee::Film::read_aov(), blender::render::hydra::GPURenderTaskDelegate::read_aov(), blender::render::hydra::GPURenderTaskDelegate::read_aov(), blender::eevee::Film::read_pass(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_framebuffer_clear_color_multiple_attachments(), blender::gpu::tests::test_framebuffer_clear_color_single_attachment(), blender::gpu::tests::test_framebuffer_clear_depth(), blender::gpu::tests::test_framebuffer_clear_multiple_color_multiple_attachments(), blender::gpu::tests::test_framebuffer_cube(), blender::gpu::tests::test_framebuffer_multi_viewport(), blender::gpu::tests::test_framebuffer_scissor_test(), blender::gpu::tests::test_framebuffer_subpass_input(), blender::gpu::tests::test_shader_compute_1d(), blender::gpu::tests::test_shader_compute_2d(), blender::gpu::tests::test_texture_1d(), blender::gpu::tests::test_texture_1d_array(), blender::gpu::tests::test_texture_1d_array_upload(), blender::gpu::tests::test_texture_2d_array(), blender::gpu::tests::test_texture_2d_array_upload(), blender::gpu::tests::test_texture_3d(), blender::gpu::tests::test_texture_copy(), blender::gpu::tests::test_texture_cube(), blender::gpu::tests::test_texture_cube_array(), blender::gpu::tests::test_texture_read(), blender::gpu::tests::texture_create_upload_read(), blender::gpu::tests::texture_create_upload_read_pixel(), blender::gpu::tests::texture_create_upload_read_with_bias(), view3d_depths_create(), and blender::render::Context::viewer_output_to_viewer_image().
| void GPU_texture_ref | ( | GPUTexture * | texture | ) |
Add a reference to this texture for usage. This internally increment the reference counter. This avoids the texture being free between the time it is referenced by the drawing logic and the time it is actually dereferenced.
Definition at line 698 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Manager::acquire_texture(), BPyGPUTexture_CreatePyObject(), drw_shgroup_material_texture(), blender::render::Context::get_input_texture(), and blender::eevee::LookdevWorld::sync().
| void GPU_texture_swizzle_set | ( | GPUTexture * | texture, |
| const char | swizzle[4] ) |
Set tex texture swizzle state for swizzling sample components.
A texture sample always return 4 components in the shader. If the texture has less than 4 components, the missing ones are replaced by the matching values in the following vector (0, 0, 0, 1).
swizzle contains 1 char per component representing the source of the data for each of the component of a sample value. The possible values for each of these 4 characters are:
Definition at line 679 of file gpu_texture.cc.
References tex.
Referenced by blender::realtime_compositor::compute_preview_from_result(), IMB_create_gpu_texture(), IMB_touch_gpu_texture(), blender::ed::sculpt_paint::load_tex(), blender::ed::sculpt_paint::load_tex_cursor(), radial_control_set_tex(), blender::eevee::MotionBlurModule::render(), and blender::draw::volume_grid_cache_get().
| void GPU_texture_unbind | ( | GPUTexture * | texture | ) |
Unbind tex from a texture sampling image unit.
Definition at line 583 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::Context::state_manager, tex, and blender::gpu::StateManager::texture_unbind().
Referenced by blf_batch_draw(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_alpha(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_image(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_matte(), blender::nodes::node_composite_base_cryptomatte_cc::BaseCryptoMatteOperation::compute_pick(), draw_display_buffer(), draw_plane_marker_image(), draw_strip_thumbnails(), DRW_transform_none(), blender::nodes::node_composite_render_layer_cc::RenderLayerOperation::execute_pass(), gpu_texture_update_from_ibuf(), gpu_viewport_draw_colormanaged(), GPU_viewport_stereo_composite(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), blender::realtime_compositor::parallel_reduction_dispatch(), radial_control_paint_tex(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::gpu::tests::test_shader_compute_1d(), blender::gpu::tests::test_shader_compute_2d(), blender::realtime_compositor::SMAAPrecomputedTextures::unbind_area_texture(), blender::realtime_compositor::DistortionGrid::unbind_as_texture(), blender::realtime_compositor::KeyingScreen::unbind_as_texture(), blender::realtime_compositor::Result::unbind_as_texture(), blender::realtime_compositor::SymmetricBlurWeights::unbind_as_texture(), blender::realtime_compositor::SymmetricSeparableBlurWeights::unbind_as_texture(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::unbind_distance_falloffs_as_texture(), blender::realtime_compositor::SMAAPrecomputedTextures::unbind_search_texture(), blender::realtime_compositor::MorphologicalDistanceFeatherWeights::unbind_weights_as_texture(), wm_draw_region_blend(), wm_draw_window(), and wm_software_cursor_draw_bitmap().
| void GPU_texture_unbind_all | ( | ) |
Unbind all texture from all texture sampling image units.
Definition at line 589 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::Context::state_manager, and blender::gpu::StateManager::texture_unbind_all().
Referenced by blender::draw::command::RecordingState::cleanup(), draw_shgroup(), DRW_state_reset(), blender::realtime_compositor::ShaderOperation::execute(), and blender::gpu::MTLContext::~MTLContext().
| void GPU_texture_update | ( | GPUTexture * | texture, |
| eGPUDataFormat | data_format, | ||
| const void * | data ) |
Update the content of a texture's base mip-map level (mip 0). data_format is the format of the data . It needs to be compatible with the internal texture storage. The data should be the size of the entire mip 0 level.
GPU_texture_update_mipmap_chain to generate them if needed. Definition at line 558 of file gpu_texture.cc.
Referenced by blender::workbench::AntiAliasingPass::AntiAliasingPass(), draw_display_buffer(), draw_plane_marker_image(), draw_strip_thumbnails(), blender::nodes::node_composite_denoise_cc::DenoiseOperation::execute(), GPENCIL_antialiasing_init(), GPENCIL_render_init(), IMB_create_gpu_texture(), immDrawPixelsTexScaledFullSize(), blender::ed::sculpt_paint::load_tex(), blender::ed::sculpt_paint::load_tex_cursor(), RE_pass_ensure_gpu_texture_cache(), blender::render::hydra::GPURenderTaskDelegate::read_aov(), blender::render::hydra::RenderTaskDelegate::read_aov(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), blender::realtime_compositor::Result::set_color_value(), blender::realtime_compositor::Result::set_float2_value(), blender::realtime_compositor::Result::set_float3_value(), blender::realtime_compositor::Result::set_float_value(), blender::realtime_compositor::Result::set_int2_value(), blender::realtime_compositor::Result::set_vector_value(), blender::realtime_compositor::SMAAPrecomputedTextures::SMAAPrecomputedTextures(), studiolight_create_matcap_gputexture(), blender::gpu::tests::texture_create_upload_read(), blender::gpu::tests::texture_create_upload_read_pixel(), blender::gpu::tests::texture_create_upload_read_with_bias(), wm_software_cursor_draw_bitmap(), and blender::render::hydra::DrawTexture::write_data().
| void GPU_texture_update_mipmap | ( | GPUTexture * | texture, |
| int | mip_level, | ||
| eGPUDataFormat | data_format, | ||
| const void * | pixels ) |
Update the content of a texture's specific mip-map level. data_format is the format of the pixels . It needs to be compatible with the internal texture storage. The data should be the size of the entire mip_level.
Definition at line 501 of file gpu_texture.cc.
References tex.
Referenced by blender::eevee::UtilityTexture::UtilityTexture().
| void GPU_texture_update_mipmap_chain | ( | GPUTexture * | texture | ) |
Update the mip-map levels using the mip 0 data.
Definition at line 609 of file gpu_texture.cc.
References tex.
Referenced by blender::realtime_compositor::CachedImage::CachedImage(), DRW_texture_generate_mipmaps(), drw_texture_set_parameters(), gpu_texture_create_tile_array(), gpu_texture_update_from_ibuf(), image_get_gpu_texture(), and immDrawPixelsTexScaledFullSize().
| void GPU_texture_update_sub | ( | GPUTexture * | texture, |
| eGPUDataFormat | data_format, | ||
| const void * | pixels, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| int | offset_z, | ||
| int | width, | ||
| int | height, | ||
| int | depth ) |
Update the content of a region of a texture's base mip-map level (mip 0). data_format is the format of the data . It needs to be compatible with the internal texture storage. The data should be the size of the mip 0 level region.
GPU_texture_update_mipmap_chain to generate them if needed.offset_x , offset_y , offset_z specify the bottom left corner of the updated region. width , height , depth specify the extent of the updated region.
Definition at line 512 of file gpu_texture.cc.
References tex.
Referenced by blf_batch_cache_texture_load(), GPENCIL_render_init(), gpu_texture_update_scaled(), gpu_texture_update_unscaled(), IMB_update_gpu_texture_sub(), immDrawPixelsTexTiled_scaling_clipping(), blender::draw::overlay::Instance::init(), blender::draw::test_eevee_shadow_tilemap_amend(), and updateGPUCurveMapping().
| void GPU_texture_update_sub_from_pixel_buffer | ( | GPUTexture * | texture, |
| eGPUDataFormat | data_format, | ||
| GPUPixelBuffer * | pixel_buf, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| int | offset_z, | ||
| int | width, | ||
| int | height, | ||
| int | depth ) |
Update a sub-region of a texture using the data from a #GPUPixelBuffer as source data. The pix_buf data is expected to be contiguous and big enough to fill the described sub-region.
Definition at line 527 of file gpu_texture.cc.
References tex.
Referenced by update_tile_texture_pixels().
| eGPUTextureUsage GPU_texture_usage | ( | const GPUTexture * | texture | ) |
Return the usage flags of tex.
Definition at line 493 of file gpu_texture.cc.
References tex.
Referenced by DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), GPU_texture_create_view(), GPU_texture_read(), and blender::gpu::MTLTexture::init_internal().
| int GPU_texture_width | ( | const GPUTexture * | texture | ) |
Return the width of tex.
Definition at line 722 of file gpu_texture.cc.
References tex.
Referenced by blender::eevee::Film::accumulate(), blf_batch_cache_texture_load(), blf_batch_draw(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_alpha(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_image(), blender::nodes::node_composite_movieclip_cc::MovieClipOperation::compute_stabilization_data(), draw_select_framebuffer_depth_only_setup(), drw_manager_init(), DRW_select_buffer_read(), DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), eevee_engine_init(), GPU_offscreen_read_color(), GPU_offscreen_read_color_region(), GPU_offscreen_width(), gpu_texture_create_tile_mapping(), gpu_texture_update_from_ibuf(), gpu_texture_update_scaled(), GPU_viewport_draw_to_screen_ex(), ViewportColorSampleSession::init(), blender::realtime_compositor::parallel_reduction_dispatch(), blender::draw::Texture::pixel_count(), pygpu_texture_read(), pygpu_texture_width_get(), blender::render::hydra::GPURenderTaskDelegate::read_aov(), blender::eevee::Film::read_pass(), blender::eevee::DepthOfField::render(), select_engine_framebuffer_setup(), blender::realtime_compositor::TexturePoolKey::TexturePoolKey(), view3d_depths_create(), blender::draw::Texture::width(), blender::realtime_compositor::Result::wrap_external(), and blender::render::hydra::DrawTexture::write_data().
| void GPU_unpack_row_length_set | ( | uint | len | ) |
Makes data interpretation aware of the source layout. Skipping pixels correctly when changing rows when doing partial update. This affects GPU_texture_update, GPU_texture_update_sub, GPU_texture_update_mipmap. TODO(fclem): replace this by pixel buffer updates using a custom utility to do the line shifting like Cycles does.
Definition at line 563 of file gpu_texture.cc.
References blender::gpu::Context::get(), len, blender::gpu::Context::state_manager, and blender::gpu::StateManager::texture_unpack_row_length_set().
Referenced by gpu_texture_update_unscaled(), and immDrawPixelsTexTiled_scaling_clipping().
|
static |
The number of every possible filtering configuration.
Definition at line 69 of file GPU_texture.hh.
Referenced by blender::gpu::VKSamplers::free(), blender::gpu::VKSamplers::init(), blender::gpu::MTLContext::sampler_state_cache_init(), blender::gpu::GLTexture::samplers_init(), blender::gpu::GLTexture::samplers_update(), and blender::gpu::MTLContext::~MTLContext().