Blender
V3.3
|
#include "BLI_string.h"
#include "GPU_framebuffer.h"
#include "GPU_texture.h"
#include "gpu_backend.hh"
#include "gpu_context_private.hh"
#include "gpu_framebuffer_private.hh"
#include "gpu_texture_private.hh"
Go to the source code of this file.
Namespaces | |
blender | |
blender::gpu | |
Update user defined sampler states.
Definition at line 702 of file gpu_texture.cc.
References blender::gpu::GPUBackend::get(), and blender::gpu::GPUBackend::samplers_update().
void GPU_texture_anisotropic_filter | ( | GPUTexture * | tex_, |
bool | use_aniso | ||
) |
Definition at line 537 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_INTEGER, blender::gpu::GPU_FORMAT_STENCIL, GPU_SAMPLER_ANISO, SET_FLAG_FROM_TEST, and tex.
Referenced by drw_texture_set_parameters(), IMB_create_gpu_texture(), and IMB_touch_gpu_texture().
bool GPU_texture_array | ( | const GPUTexture * | tex | ) |
Definition at line 664 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().
void GPU_texture_bind | ( | GPUTexture * | tex_, |
int | unit | ||
) |
Definition at line 466 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::gpu::GLVertBuf::bind_as_texture(), draw_display_buffer(), gpu_viewport_draw_colormanaged(), GPU_viewport_stereo_composite(), immBindTexture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), pygpu_shader_uniform_sampler(), sequencer_draw_display_buffer(), wm_draw_region_blend(), and wm_draw_window().
void GPU_texture_bind_ex | ( | GPUTexture * | tex_, |
eGPUSamplerState | state, | ||
int | unit, | ||
const bool | UNUSEDset_number | ||
) |
Definition at line 456 of file gpu_texture.cc.
References blender::gpu::Context::get(), GPU_SAMPLER_MAX, state, blender::gpu::Context::state_manager, tex, and blender::gpu::StateManager::texture_bind().
void GPU_texture_clear | ( | GPUTexture * | tex, |
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 438 of file gpu_texture.cc.
References BLI_assert, clear(), data, and tex.
Referenced by blender::draw::Texture::clear(), gpu_viewport_textures_create(), and pygpu_texture_clear().
void GPU_texture_compare_mode | ( | GPUTexture * | tex_, |
bool | use_compare | ||
) |
Definition at line 510 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_DEPTH, GPU_SAMPLER_COMPARE, SET_FLAG_FROM_TEST, and tex.
Referenced by drw_texture_set_parameters(), EEVEE_subsurface_compute(), and EEVEE_volumes_compute().
size_t GPU_texture_component_len | ( | eGPUTextureFormat | tex_format | ) |
Definition at line 717 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 texture content to a similar texture. Only MIP 0 is copied.
Definition at line 503 of file gpu_texture.cc.
References src.
Referenced by OVERLAY_xray_depth_copy(), OVERLAY_xray_depth_infront_copy(), and workbench_antialiasing_draw_pass().
|
inlinestatic |
Definition at line 235 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPUBackend::get(), 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, blender::gpu::GPU_TEXTURE_CUBE, blender::gpu::GPU_TEXTURE_CUBE_ARRAY, tex, blender::gpu::GPUBackend::texture_alloc(), type, and w().
Referenced by GPU_texture_create_1d(), GPU_texture_create_1d_array(), GPU_texture_create_2d(), GPU_texture_create_2d_array(), GPU_texture_create_3d(), GPU_texture_create_cube(), GPU_texture_create_cube_array(), and GPU_texture_create_error().
GPUTexture* GPU_texture_create_1d | ( | const char * | name, |
int | w, | ||
int | mip_len, | ||
eGPUTextureFormat | format, | ||
const float * | data | ||
) |
Definition at line 278 of file gpu_texture.cc.
References data, GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_1D, gpu_texture_create(), and w().
Referenced by addGPULut1D2D(), createGPUCurveMapping(), DRW_create_weight_colorramp_texture(), DRW_globals_update(), DRW_texture_create_1d(), GPU_material_sss_profile_get(), pygpu_texture__tp_new(), blender::gpu::tests::test_gpu_shader_compute_1d(), and workbench_volume_engine_init().
GPUTexture* GPU_texture_create_1d_array | ( | const char * | name, |
int | w, | ||
int | h, | ||
int | mip_len, | ||
eGPUTextureFormat | format, | ||
const float * | data | ||
) |
Definition at line 284 of file gpu_texture.cc.
References data, GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_1D_ARRAY, gpu_texture_create(), and w().
Referenced by gpu_material_ramp_texture_build(), gpu_texture_create_tile_mapping(), and pygpu_texture__tp_new().
GPUTexture* GPU_texture_create_2d | ( | const char * | name, |
int | w, | ||
int | h, | ||
int | mip_len, | ||
eGPUTextureFormat | format, | ||
const float * | data | ||
) |
Definition at line 291 of file gpu_texture.cc.
References data, GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_2D, gpu_texture_create(), and w().
Referenced by addGPULut1D2D(), blf_glyph_draw(), dof_reduce_pass_init(), draw_display_buffer(), draw_plane_marker_image(), draw_select_framebuffer_depth_only_setup(), DRW_texture_create_2d(), DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), edit_uv_mask_texture(), blender::draw::image_engine::SpaceImageAccessor::get_gpu_textures(), GPENCIL_antialiasing_init(), GPU_offscreen_create(), gpu_viewport_textures_create(), IMB_create_gpu_texture(), IMB_touch_gpu_texture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), load_tex(), load_tex_cursor(), pygpu_texture__tp_new(), radial_control_set_tex(), select_engine_framebuffer_setup(), sequencer_draw_display_buffer(), studiolight_create_equirect_irradiance_gputexture(), studiolight_create_equirect_radiance_gputexture(), studiolight_create_matcap_gputexture(), blender::gpu::tests::test_gpu_shader_compute_2d(), UI_icons_reload_internal_textures(), wm_software_cursor_draw_bitmap(), workbench_antialiasing_engine_init(), and workbench_render_framebuffers_init().
GPUTexture* GPU_texture_create_2d_array | ( | const char * | name, |
int | w, | ||
int | h, | ||
int | d, | ||
int | mip_len, | ||
eGPUTextureFormat | format, | ||
const float * | data | ||
) |
Definition at line 297 of file gpu_texture.cc.
References data, GPU_DATA_FLOAT, blender::gpu::GPU_TEXTURE_2D_ARRAY, gpu_texture_create(), and w().
Referenced by DRW_texture_create_2d_array(), eevee_lightcache_static_load(), IMB_touch_gpu_texture(), and pygpu_texture__tp_new().
GPUTexture* GPU_texture_create_3d | ( | const char * | name, |
int | w, | ||
int | h, | ||
int | d, | ||
int | mip_len, | ||
eGPUTextureFormat | texture_format, | ||
eGPUDataFormat | data_format, | ||
const void * | data | ||
) |
Definition at line 309 of file gpu_texture.cc.
References data, blender::gpu::GPU_TEXTURE_3D, gpu_texture_create(), and w().
Referenced by addGPULut3D(), DRW_smoke_ensure_velocity(), DRW_texture_create_3d(), drw_volume_globals_init(), pygpu_texture__tp_new(), volume_grid_cache_get(), and workbench_volume_engine_init().
GPUTexture* GPU_texture_create_compressed_2d | ( | const char * | name, |
int | w, | ||
int | h, | ||
int | miplen, | ||
eGPUTextureFormat | format, | ||
const void * | data | ||
) |
data should hold all the data for all mipmaps. DDS texture loading. Return NULL if support is not available.
Definition at line 336 of file gpu_texture.cc.
References data, blender::gpu::GPUBackend::get(), offset, 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 | w, | ||
int | mip_len, | ||
eGPUTextureFormat | format, | ||
const float * | data | ||
) |
Definition at line 322 of file gpu_texture.cc.
References data, GPU_DATA_FLOAT, gpu_texture_create(), blender::gpu::GPU_TEXTURE_CUBE, and w().
Referenced by DRW_texture_create_cube(), and pygpu_texture__tp_new().
GPUTexture* GPU_texture_create_cube_array | ( | const char * | name, |
int | w, | ||
int | d, | ||
int | mip_len, | ||
eGPUTextureFormat | format, | ||
const float * | data | ||
) |
Definition at line 329 of file gpu_texture.cc.
References data, GPU_DATA_FLOAT, gpu_texture_create(), blender::gpu::GPU_TEXTURE_CUBE_ARRAY, and w().
Referenced by DRW_texture_create_cube_array(), eevee_lightcache_static_load(), and pygpu_texture__tp_new().
GPUTexture* GPU_texture_create_error | ( | int | dimension, |
bool | array | ||
) |
Create an error texture that will bind an invalid texture (pink) at draw time.
Definition at line 374 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(), type, 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, |
GPUVertBuf * | vert | ||
) |
Definition at line 361 of file gpu_texture.cc.
References blender::gpu::GPUBackend::get(), GPU_vertbuf_get_format(), tex, blender::gpu::GPUBackend::texture_alloc(), and blender::gpu::to_texture_format().
Referenced by blender::gpu::GLVertBuf::bind_as_texture(), curves_batch_cache_ensure_procedural_final_attr(), curves_batch_cache_ensure_procedural_final_points(), curves_batch_cache_ensure_procedural_pos(), curves_batch_cache_ensure_procedural_strand_data(), curves_batch_ensure_attribute(), DRW_curves_init(), DRW_hair_init(), EEVEE_motion_blur_cache_finish(), particle_batch_cache_ensure_procedural_final_points(), particle_batch_cache_ensure_procedural_pos(), and particle_batch_cache_ensure_procedural_strand_data().
GPUTexture* GPU_texture_create_view | ( | const char * | name, |
const GPUTexture * | src, | ||
eGPUTextureFormat | format, | ||
int | mip_start, | ||
int | mip_len, | ||
int | layer_start, | ||
int | layer_len, | ||
bool | cube_as_array | ||
) |
Create an alias of the source texture data. If src is freed, the texture view will continue to be valid. If mip_start or mip_len is bigger than available mips they will be clamped. If cube_as_array is true, then the texture cube (array) becomes a 2D array texture. TODO(@fclem): Target conversion is not implemented yet.
Definition at line 388 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPUBackend::get(), src, blender::gpu::GPUBackend::texture_alloc(), view, and blender::gpu::wrap().
Referenced by blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), and blender::draw::Texture::stencil_view().
bool GPU_texture_cube | ( | const GPUTexture * | tex | ) |
Definition at line 659 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().
size_t GPU_texture_dataformat_size | ( | eGPUDataFormat | data_format | ) |
Definition at line 722 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().
bool GPU_texture_depth | ( | const GPUTexture * | tex | ) |
Definition at line 644 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_DEPTH, and tex.
Referenced by blender::gpu::FrameBuffer::attachment_set(), blender::draw::Texture::depth(), DRW_texture_pool_query(), GPU_framebuffer_blit(), and pygpu_framebuffer__tp_new().
int GPU_texture_dimensions | ( | const GPUTexture * | tex | ) |
Return the number of dimensions of the texture ignoring dimension of layers (1, 2 or 3). Cube textures are considered 2D.
Definition at line 583 of file gpu_texture.cc.
References blender::gpu::GPU_TEXTURE_1D, blender::gpu::GPU_TEXTURE_2D, blender::gpu::GPU_TEXTURE_3D, blender::gpu::GPU_TEXTURE_CUBE, and type.
Referenced by createGPUShader().
void GPU_texture_filter_mode | ( | GPUTexture * | tex_, |
bool | use_filter | ||
) |
Definition at line 518 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_INTEGER, blender::gpu::GPU_FORMAT_STENCIL, GPU_SAMPLER_FILTER, SET_FLAG_FROM_TEST, and tex.
Referenced by addGPULut1D2D(), addGPULut3D(), createGPUCurveMapping(), draw_display_buffer(), draw_plane_marker_image(), DRW_texture_pool_query(), drw_texture_set_parameters(), eevee_lightcache_static_load(), blender::draw::Texture::filter_mode(), GPENCIL_antialiasing_init(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), radial_control_set_tex(), sequencer_draw_display_buffer(), studiolight_create_equirect_irradiance_gputexture(), studiolight_create_equirect_radiance_gputexture(), wm_software_cursor_draw_bitmap(), and workbench_antialiasing_engine_init().
eGPUTextureFormat GPU_texture_format | ( | const GPUTexture * | tex | ) |
Definition at line 639 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::TextureFromPool::acquire(), DRW_texture_pool_query(), DRW_texture_pool_texture_acquire(), blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), GPU_framebuffer_blit(), pygpu_texture_format_get(), pygpu_texture_read(), blender::draw::Texture::stencil_view(), and blender::gpu::MTLFrameBuffer::update_attachments().
void GPU_texture_free | ( | GPUTexture * | tex_ | ) |
Definition at line 564 of file gpu_texture.cc.
References tex.
Referenced by BKE_image_add_tile(), BKE_image_reassign_tile(), BKE_movieclip_free_gputexture(), BKE_previewimg_clear_single(), BKE_previewimg_freefunc(), blf_glyph_cache_free(), blf_glyph_draw(), BPyGPUTexture__tp_dealloc(), draw_display_buffer(), draw_plane_marker_image(), draw_select_framebuffer_depth_only_setup(), draw_texture_release(), DRW_texture_free(), DRW_texture_pool_reset(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), free_buffers(), free_icons_textures(), gpu_free_unused_buffers(), gpu_material_free_single(), GPU_material_sss_profile_get(), GPU_offscreen_free(), icon_preview_endjob(), image_free_gpu(), image_free_tile(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), load_tex(), load_tex_cursor(), paint_cursor_delete_textures(), radial_control_cancel(), select_engine_framebuffer_setup(), sequencer_draw_display_buffer(), blender::gpu::tests::test_gpu_shader_compute_1d(), blender::gpu::tests::test_gpu_shader_compute_2d(), IMAGE_InstanceData::update_gpu_texture_allocations(), wm_software_cursor_draw_bitmap(), OCIO_GPUCurveMappping::~OCIO_GPUCurveMappping(), OCIO_GPUTextures::~OCIO_GPUTextures(), and TextureInfo::~TextureInfo().
void GPU_texture_generate_mipmap | ( | GPUTexture * | tex | ) |
Definition at line 498 of file gpu_texture.cc.
References tex.
Referenced by 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_get_mipmap_size | ( | GPUTexture * | tex, |
int | lvl, | ||
int * | r_size | ||
) |
Definition at line 688 of file gpu_texture.cc.
References tex.
Referenced by dof_gather_pass_init(), dof_scatter_pass_init(), downsample_radiance_cb(), eevee_lightbake_readback_reflections(), EEVEE_lightcache_create(), EEVEE_screen_raytrace_cache_init(), max_downsample_cb(), blender::draw::Texture::size(), and workbench_volume_object_cache_populate().
int GPU_texture_height | ( | const GPUTexture * | tex | ) |
Definition at line 607 of file gpu_texture.cc.
References tex.
Referenced by blender::eevee::Film::accumulate(), blender::draw::TextureFromPool::acquire(), 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(), eevee_lightbake_cache_create(), EEVEE_lightbake_filter_visibility(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_draw(), GPU_offscreen_height(), GPU_offscreen_read_pixels(), gpu_texture_create_tile_mapping(), gpu_texture_update_from_ibuf(), gpu_texture_update_scaled(), GPU_viewport_draw_to_screen_ex(), blender::draw::Texture::height(), planar_pool_ensure_alloc(), pygpu_texture_height_get(), pygpu_texture_read(), select_engine_framebuffer_setup(), and view3d_depths_create().
void GPU_texture_image_bind | ( | GPUTexture * | tex, |
int | unit | ||
) |
Definition at line 483 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 draw_update_uniforms(), blender::gpu::tests::test_gpu_shader_compute_1d(), and blender::gpu::tests::test_gpu_shader_compute_2d().
void GPU_texture_image_unbind | ( | GPUTexture * | tex | ) |
Definition at line 488 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().
Definition at line 493 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::StateManager::image_unbind_all(), and blender::gpu::Context::state_manager.
bool GPU_texture_integer | ( | const GPUTexture * | tex | ) |
Definition at line 654 of file gpu_texture.cc.
References blender::gpu::GPU_FORMAT_INTEGER, and tex.
Referenced by DRW_texture_pool_query(), and blender::draw::Texture::is_integer().
int GPU_texture_layer_count | ( | const GPUTexture * | tex | ) |
Definition at line 612 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Texture::ensure_layer_views().
Definition at line 227 of file gpu_texture.cc.
Referenced by DRW_stats_draw().
int GPU_texture_mip_count | ( | const GPUTexture * | tex | ) |
Definition at line 617 of file gpu_texture.cc.
References tex.
Referenced by blender::draw::Texture::ensure_mip_views().
void GPU_texture_mipmap_mode | ( | GPUTexture * | tex_, |
bool | use_mipmap, | ||
bool | use_filter | ||
) |
Definition at line 527 of file gpu_texture.cc.
References BLI_assert, blender::gpu::GPU_FORMAT_INTEGER, blender::gpu::GPU_FORMAT_STENCIL, GPU_SAMPLER_FILTER, GPU_SAMPLER_MIPMAP, SET_FLAG_FROM_TEST, and tex.
Referenced by BKE_image_paint_set_mipmap(), BKE_movieclip_get_gpu_texture(), drw_texture_set_parameters(), eevee_lightcache_static_load(), gpu_texture_create_tile_array(), gpu_texture_create_tile_mapping(), image_get_gpu_texture(), immDrawPixelsTexScaledFullSize(), and wm_draw_offscreen_texture_parameters().
int GPU_texture_opengl_bindcode | ( | const GPUTexture * | tex | ) |
Definition at line 683 of file gpu_texture.cc.
References tex.
Referenced by pygpu_offscreen_color_texture_get().
int GPU_texture_orig_height | ( | const GPUTexture * | tex | ) |
Definition at line 627 of file gpu_texture.cc.
References tex.
Referenced by OVERLAY_image_empty_cache_populate().
void GPU_texture_orig_size_set | ( | GPUTexture * | tex_, |
int | w, | ||
int | h | ||
) |
Definition at line 632 of file gpu_texture.cc.
Referenced by image_get_gpu_texture().
int GPU_texture_orig_width | ( | const GPUTexture * | tex | ) |
Definition at line 622 of file gpu_texture.cc.
References tex.
Referenced by OVERLAY_image_empty_cache_populate().
void** GPU_texture_py_reference_get | ( | GPUTexture * | tex | ) |
Definition at line 670 of file gpu_texture.cc.
References tex, and blender::gpu::unwrap().
Referenced by BPyGPUTexture_CreatePyObject().
void GPU_texture_py_reference_set | ( | GPUTexture * | tex, |
void ** | py_ref | ||
) |
Definition at line 675 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 * | tex_, |
eGPUDataFormat | data_format, | ||
int | miplvl | ||
) |
Definition at line 432 of file gpu_texture.cc.
References tex.
Referenced by eevee_cryptomatte_postprocess_weights(), eevee_lightbake_copy_irradiance(), eevee_lightbake_readback_irradiance(), eevee_lightbake_readback_reflections(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), pygpu_texture_read(), blender::draw::Texture::read(), blender::eevee::Film::read_aov(), blender::eevee::Film::read_pass(), blender::gpu::tests::test_gpu_shader_compute_1d(), blender::gpu::tests::test_gpu_shader_compute_2d(), and view3d_depths_create().
void GPU_texture_ref | ( | GPUTexture * | tex | ) |
Definition at line 578 of file gpu_texture.cc.
References tex.
Referenced by BPyGPUTexture_CreatePyObject(), and drw_shgroup_material_texture().
bool GPU_texture_stencil | ( | const GPUTexture * | tex | ) |
Definition at line 649 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(), GPU_texture_stencil_texture_mode_set(), and blender::draw::Texture::is_stencil().
void GPU_texture_stencil_texture_mode_set | ( | GPUTexture * | tex, |
bool | use_stencil | ||
) |
Set depth stencil texture sampling behavior. Can work on texture views. If stencil sampling is enabled, an unsigned integer sampler is required.
Definition at line 558 of file gpu_texture.cc.
References BLI_assert, GPU_texture_stencil(), and tex.
Referenced by blender::draw::Texture::stencil_view().
void GPU_texture_swizzle_set | ( | GPUTexture * | tex, |
const char | swizzle[4] | ||
) |
Definition at line 553 of file gpu_texture.cc.
References tex.
Referenced by load_tex(), load_tex_cursor(), radial_control_set_tex(), and volume_grid_cache_get().
void GPU_texture_unbind | ( | GPUTexture * | tex_ | ) |
Definition at line 472 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(), draw_display_buffer(), draw_plane_marker_image(), DRW_transform_none(), gpu_texture_update_from_ibuf(), gpu_viewport_draw_colormanaged(), GPU_viewport_stereo_composite(), icon_draw_cache_texture_flush_ex(), icon_draw_texture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), paint_draw_cursor_overlay(), paint_draw_tex_overlay(), radial_control_paint_tex(), sequencer_draw_display_buffer(), blender::gpu::tests::test_gpu_shader_compute_1d(), blender::gpu::tests::test_gpu_shader_compute_2d(), wm_draw_region_blend(), wm_draw_window(), and wm_software_cursor_draw_bitmap().
Definition at line 478 of file gpu_texture.cc.
References blender::gpu::Context::get(), blender::gpu::Context::state_manager, and blender::gpu::StateManager::texture_unbind_all().
Referenced by draw_shgroup(), and DRW_state_reset().
void GPU_texture_update | ( | GPUTexture * | tex, |
eGPUDataFormat | data_format, | ||
const void * | data | ||
) |
Definition at line 444 of file gpu_texture.cc.
References data, tex, and update().
Referenced by draw_display_buffer(), draw_plane_marker_image(), eevee_lightcache_static_load(), GPENCIL_antialiasing_init(), GPENCIL_render_init(), IMB_create_gpu_texture(), immDrawPixelsTexScaledFullSize(), load_tex(), load_tex_cursor(), sequencer_draw_display_buffer(), studiolight_create_matcap_gputexture(), wm_software_cursor_draw_bitmap(), and workbench_antialiasing_engine_init().
void GPU_texture_update_mipmap | ( | GPUTexture * | tex_, |
int | miplvl, | ||
eGPUDataFormat | data_format, | ||
const void * | pixels | ||
) |
Definition at line 406 of file gpu_texture.cc.
Referenced by eevee_lightcache_static_load(), UI_icons_reload_internal_textures(), and blender::eevee::UtilityTexture::UtilityTexture().
void GPU_texture_update_sub | ( | GPUTexture * | tex, |
eGPUDataFormat | data_format, | ||
const void * | pixels, | ||
int | offset_x, | ||
int | offset_y, | ||
int | offset_z, | ||
int | width, | ||
int | height, | ||
int | depth | ||
) |
Definition at line 417 of file gpu_texture.cc.
References height, offset, tex, and width.
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(), and updateGPUCurveMapping().
int GPU_texture_width | ( | const GPUTexture * | tex | ) |
Definition at line 602 of file gpu_texture.cc.
References tex.
Referenced by blender::eevee::Film::accumulate(), blender::draw::TextureFromPool::acquire(), blf_batch_cache_texture_load(), dof_reduce_pass_init(), 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(), eevee_lightbake_cache_create(), EEVEE_lightbake_filter_diffuse(), EEVEE_lightbake_filter_glossy(), EEVEE_lightbake_filter_visibility(), EEVEE_motion_blur_cache_init(), EEVEE_motion_blur_draw(), GPU_offscreen_read_pixels(), GPU_offscreen_width(), gpu_texture_create_tile_mapping(), gpu_texture_update_from_ibuf(), gpu_texture_update_scaled(), GPU_viewport_draw_to_screen_ex(), planar_pool_ensure_alloc(), pygpu_texture_read(), pygpu_texture_width_get(), select_engine_framebuffer_setup(), simple_downsample_cube_cb(), view3d_depths_create(), and blender::draw::Texture::width().
void GPU_texture_wrap_mode | ( | GPUTexture * | tex_, |
bool | use_repeat, | ||
bool | use_clamp | ||
) |
Definition at line 546 of file gpu_texture.cc.
References GPU_SAMPLER_CLAMP_BORDER, GPU_SAMPLER_REPEAT, SET_FLAG_FROM_TEST, and tex.
Referenced by addGPULut1D2D(), addGPULut3D(), createGPUCurveMapping(), drw_texture_set_parameters(), drw_volume_globals_init(), image_get_gpu_texture(), immDrawPixelsTexScaledFullSize(), immDrawPixelsTexTiled_scaling_clipping(), studiolight_create_equirect_irradiance_gputexture(), studiolight_create_equirect_radiance_gputexture(), and volume_grid_cache_get().
Makes data interpretation aware of the source layout. Skipping pixels correctly when changing rows when doing partial update.
Definition at line 449 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().