Blender  V3.3
Classes | Macros | Typedefs | Functions
draw_manager_exec.c File Reference
#include "draw_manager.h"
#include "BLI_alloca.h"
#include "BLI_math.h"
#include "BLI_math_bits.h"
#include "BLI_memblock.h"
#include "BKE_global.h"
#include "GPU_compute.h"
#include "GPU_platform.h"
#include "GPU_shader.h"
#include "GPU_state.h"
#include "GPU_select.h"

Go to the source code of this file.

Classes

struct  DRWCommandsState
 
struct  DRWCommandIterator
 

Macros

#define DEBUG_UBO_BINDING
 
#define MAX_UNIFORM_STACK_SIZE   64
 

Typedefs

typedef struct DRWCommandsState DRWCommandsState
 

Functions

void DRW_select_load_id (uint id)
 
Draw State (DRW_state)
void drw_state_set (DRWState state)
 
static void drw_stencil_state_set (uint write_mask, uint reference, uint compare_mask)
 
void DRW_state_reset_ex (DRWState state)
 
static void drw_state_validate (void)
 
void DRW_state_lock (DRWState state)
 
void DRW_state_reset (void)
 
Culling (DRW_culling)
static bool draw_call_is_culled (const DRWResourceHandle *handle, DRWView *view)
 
void DRW_view_set_active (const DRWView *view)
 
const DRWViewDRW_view_get_active (void)
 
static bool draw_culling_sphere_test (const BoundSphere *frustum_bsphere, const float(*frustum_planes)[4], const BoundSphere *bsphere)
 
static bool draw_culling_box_test (const float(*frustum_planes)[4], const BoundBox *bbox)
 
static bool draw_culling_plane_test (const BoundBox *corners, const float plane[4])
 
bool DRW_culling_sphere_test (const DRWView *view, const BoundSphere *bsphere)
 
bool DRW_culling_box_test (const DRWView *view, const BoundBox *bbox)
 
bool DRW_culling_plane_test (const DRWView *view, const float plane[4])
 
bool DRW_culling_min_max_test (const DRWView *view, float obmat[4][4], float min[3], float max[3])
 
void DRW_culling_frustum_corners_get (const DRWView *view, BoundBox *corners)
 
void DRW_culling_frustum_planes_get (const DRWView *view, float planes[6][4])
 
static void draw_compute_culling (DRWView *view)
 

Draw (DRW_draw)

typedef struct DRWCommandIterator DRWCommandIterator
 
BLI_INLINE void draw_legacy_matrix_update (DRWShadingGroup *shgroup, DRWResourceHandle *handle, float obmat_loc, float obinv_loc)
 
BLI_INLINE void draw_geometry_bind (DRWShadingGroup *shgroup, GPUBatch *geom)
 
BLI_INLINE void draw_geometry_execute (DRWShadingGroup *shgroup, GPUBatch *geom, int vert_first, int vert_count, int inst_first, int inst_count, int baseinst_loc)
 
BLI_INLINE void draw_indirect_call (DRWShadingGroup *shgroup, DRWCommandsState *state)
 
static void draw_update_uniforms (DRWShadingGroup *shgroup, DRWCommandsState *state, bool *use_tfeedback)
 
BLI_INLINE void draw_select_buffer (DRWShadingGroup *shgroup, DRWCommandsState *state, GPUBatch *batch, const DRWResourceHandle *handle)
 
static void draw_command_iter_begin (DRWCommandIterator *iter, DRWShadingGroup *shgroup)
 
static DRWCommanddraw_command_iter_step (DRWCommandIterator *iter, eDRWCommandType *cmd_type)
 
static void draw_call_resource_bind (DRWCommandsState *state, const DRWResourceHandle *handle)
 
static void draw_call_batching_flush (DRWShadingGroup *shgroup, DRWCommandsState *state)
 
static void draw_call_single_do (DRWShadingGroup *shgroup, DRWCommandsState *state, GPUBatch *batch, DRWResourceHandle handle, int vert_first, int vert_count, int inst_first, int inst_count, bool do_base_instance)
 
static void draw_call_batching_start (DRWCommandsState *state)
 
static void draw_call_batching_do (DRWShadingGroup *shgroup, DRWCommandsState *state, DRWCommandDraw *call)
 
static void draw_call_batching_finish (DRWShadingGroup *shgroup, DRWCommandsState *state)
 
static void draw_shgroup (DRWShadingGroup *shgroup, DRWState pass_state)
 
static void drw_update_view (const float viewport_size[2])
 
static void drw_draw_pass_ex (DRWPass *pass, DRWShadingGroup *start_group, DRWShadingGroup *end_group)
 
void DRW_draw_pass (DRWPass *pass)
 
void DRW_draw_pass_subset (DRWPass *pass, DRWShadingGroup *start_group, DRWShadingGroup *end_group)
 

Macro Definition Documentation

◆ DEBUG_UBO_BINDING

#define DEBUG_UBO_BINDING

Definition at line 34 of file draw_manager_exec.c.

◆ MAX_UNIFORM_STACK_SIZE

#define MAX_UNIFORM_STACK_SIZE   64

Typedef Documentation

◆ DRWCommandIterator

◆ DRWCommandsState

Function Documentation

◆ draw_call_batching_do()

static void draw_call_batching_do ( DRWShadingGroup shgroup,
DRWCommandsState state,
DRWCommandDraw call 
)
static

◆ draw_call_batching_finish()

static void draw_call_batching_finish ( DRWShadingGroup shgroup,
DRWCommandsState state 
)
static

◆ draw_call_batching_flush()

static void draw_call_batching_flush ( DRWShadingGroup shgroup,
DRWCommandsState state 
)
static

◆ draw_call_batching_start()

static void draw_call_batching_start ( DRWCommandsState state)
static

Definition at line 877 of file draw_manager_exec.c.

References NULL, and state.

Referenced by draw_shgroup().

◆ draw_call_is_culled()

static bool draw_call_is_culled ( const DRWResourceHandle handle,
DRWView view 
)
static

◆ draw_call_resource_bind()

static void draw_call_resource_bind ( DRWCommandsState state,
const DRWResourceHandle handle 
)
static

◆ draw_call_single_do()

static void draw_call_single_do ( DRWShadingGroup shgroup,
DRWCommandsState state,
GPUBatch batch,
DRWResourceHandle  handle,
int  vert_first,
int  vert_count,
int  inst_first,
int  inst_count,
bool  do_base_instance 
)
static

◆ draw_command_iter_begin()

static void draw_command_iter_begin ( DRWCommandIterator iter,
DRWShadingGroup shgroup 
)
static

◆ draw_command_iter_step()

static DRWCommand* draw_command_iter_step ( DRWCommandIterator iter,
eDRWCommandType cmd_type 
)
static

◆ draw_compute_culling()

static void draw_compute_culling ( DRWView view)
static

◆ draw_culling_box_test()

static bool draw_culling_box_test ( const float(*)  frustum_planes[4],
const BoundBox bbox 
)
static

Definition at line 383 of file draw_manager_exec.c.

References plane_point_side_v3(), v, and BoundBox::vec.

Referenced by DRW_culling_box_test().

◆ draw_culling_plane_test()

static bool draw_culling_plane_test ( const BoundBox corners,
const float  plane[4] 
)
static

Definition at line 404 of file draw_manager_exec.c.

References Freestyle::c, plane_point_side_v3(), and BoundBox::vec.

Referenced by DRW_culling_plane_test().

◆ draw_culling_sphere_test()

static bool draw_culling_sphere_test ( const BoundSphere frustum_bsphere,
const float(*)  frustum_planes[4],
const BoundSphere bsphere 
)
static

◆ draw_geometry_bind()

BLI_INLINE void draw_geometry_bind ( DRWShadingGroup shgroup,
GPUBatch geom 
)

◆ draw_geometry_execute()

BLI_INLINE void draw_geometry_execute ( DRWShadingGroup shgroup,
GPUBatch geom,
int  vert_first,
int  vert_count,
int  inst_first,
int  inst_count,
int  baseinst_loc 
)

◆ draw_indirect_call()

BLI_INLINE void draw_indirect_call ( DRWShadingGroup shgroup,
DRWCommandsState state 
)

◆ draw_legacy_matrix_update()

BLI_INLINE void draw_legacy_matrix_update ( DRWShadingGroup shgroup,
DRWResourceHandle handle,
float  obmat_loc,
float  obinv_loc 
)

◆ draw_select_buffer()

BLI_INLINE void draw_select_buffer ( DRWShadingGroup shgroup,
DRWCommandsState state,
GPUBatch batch,
const DRWResourceHandle handle 
)

◆ draw_shgroup()

static void draw_shgroup ( DRWShadingGroup shgroup,
DRWState  pass_state 
)
static

Definition at line 945 of file draw_manager_exec.c.

References DRWCommand::barrier, DRWCommandDraw::batch, DRWCommandDrawRange::batch, DRWCommandDrawInstance::batch, DRWCommandDrawInstanceRange::batch, DRWCommandDrawProcedural::batch, DRWManager::batch, BLI_assert, DRWCommand::clear, DRWCommandClear::clear_channels, DRWCommandSetStencil::comp_mask, DRWCommand::compute, DRWCommand::compute_indirect, DRWCommand::compute_ref, DRWCommandClear::depth, DRWCommandSetMutableState::disable, DRWCommand::draw, draw_call_batching_do(), draw_call_batching_finish(), draw_call_batching_flush(), draw_call_batching_start(), draw_call_is_culled(), draw_call_single_do(), draw_command_iter_begin(), draw_command_iter_step(), draw_update_uniforms(), DRW_CMD_BARRIER, DRW_CMD_CLEAR, DRW_CMD_COMPUTE, DRW_CMD_COMPUTE_INDIRECT, DRW_CMD_COMPUTE_REF, DRW_CMD_DRAW, DRW_CMD_DRAW_INSTANCE, DRW_CMD_DRAW_INSTANCE_RANGE, DRW_CMD_DRAW_PROCEDURAL, DRW_CMD_DRAW_RANGE, DRW_CMD_DRWSTATE, DRW_CMD_SELECTID, DRW_CMD_STENCIL, drw_state_set(), drw_stencil_state_set(), DST, DRWCommandSetMutableState::enable, G, G_DEBUG_GPU, G_FLAG_PICKSEL, GPU_compute_dispatch(), GPU_compute_dispatch_indirect(), GPU_framebuffer_active_get(), GPU_framebuffer_clear(), GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_transform_feedback_disable(), GPU_shader_unbind(), GPU_storagebuf_unbind_all(), GPU_texture_unbind_all(), GPU_uniformbuf_unbind_all(), DRWCommandComputeRef::groups_ref, DRWCommandCompute::groups_x_len, DRWCommandCompute::groups_y_len, DRWCommandCompute::groups_z_len, DRWCommandDraw::handle, DRWCommandDrawRange::handle, DRWCommandDrawInstance::handle, DRWCommandDrawInstanceRange::handle, DRWCommandDrawProcedural::handle, DRWCommandComputeIndirect::indirect_buf, DRWCommandDrawInstance::inst_count, DRWCommandDrawInstanceRange::inst_count, DRWCommandDrawInstanceRange::inst_first, DRWCommand::instance, DRWCommand::instance_range, NULL, DRWCommand::procedural, DRWCommand::range, DRWCommandSetStencil::ref, DRWCommandSetSelectID::select_buf, DRWCommandSetSelectID::select_id, DRWCommand::select_id, DRWShadingGroup::shader, DRWManager::shader, state, DRWCommand::state, DRWCommandClear::stencil, DRWCommand::stencil, DRWCommandBarrier::type, DRWCommandDrawInstance::use_attrs, USE_BATCHING, DRWCommandDrawRange::vert_count, DRWCommandDrawProcedural::vert_count, DRWCommandDrawRange::vert_first, DRWManager::view_active, and DRWCommandSetStencil::write_mask.

Referenced by drw_draw_pass_ex().

◆ draw_update_uniforms()

static void draw_update_uniforms ( DRWShadingGroup shgroup,
DRWCommandsState state,
bool use_tfeedback 
)
static

Definition at line 583 of file draw_manager_exec.c.

References DRWUniform::arraysize, BLI_assert, DRWUniform::block, DRWUniform::block_ref, DRW_sparse_uniform_buffer_bind(), DRW_uniform_attrs_pool_find_ubo(), DRW_UNIFORM_BASE_INSTANCE, DRW_UNIFORM_BLOCK, DRW_UNIFORM_BLOCK_OBATTRS, DRW_UNIFORM_BLOCK_OBINFOS, DRW_UNIFORM_BLOCK_OBMATS, DRW_UNIFORM_BLOCK_REF, DRW_UNIFORM_FLOAT, DRW_UNIFORM_FLOAT_COPY, DRW_UNIFORM_IMAGE, DRW_UNIFORM_IMAGE_REF, DRW_UNIFORM_INT, DRW_UNIFORM_INT_COPY, DRW_UNIFORM_MODEL_MATRIX, DRW_UNIFORM_MODEL_MATRIX_INVERSE, DRW_UNIFORM_RESOURCE_CHUNK, DRW_UNIFORM_RESOURCE_ID, DRW_UNIFORM_STORAGE_BLOCK, DRW_UNIFORM_STORAGE_BLOCK_REF, DRW_UNIFORM_TEXTURE, DRW_UNIFORM_TEXTURE_REF, DRW_UNIFORM_TFEEDBACK_TARGET, DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE, DRW_UNIFORM_VERTEX_BUFFER_AS_STORAGE_REF, DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE, DRW_UNIFORM_VERTEX_BUFFER_AS_TEXTURE_REF, DST, DRWUniform::fvalue, GPU_shader_transform_feedback_enable(), GPU_shader_uniform_int(), GPU_shader_uniform_vector(), GPU_shader_uniform_vector_int(), GPU_storagebuf_bind(), GPU_texture_bind_ex(), GPU_texture_image_bind(), GPU_uniformbuf_bind(), GPU_vertbuf_bind_as_ssbo(), GPU_vertbuf_bind_as_texture(), DRWUniform::ivalue, DRWUniform::length, DRWUniform::location, DRWData::matrices_ubo, DRWUniformChunk::next, DRWData::obattrs_ubo_pool, DRWData::obinfos_ubo, DRWUniform::pvalue, DRWUniform::sampler_state, DRWShadingGroup::shader, DRWUniform::ssbo, DRWUniform::ssbo_ref, state, DRWUniform::texture, DRWUniform::texture_ref, DRWUniform::type, DRWUniform::uniform_attrs, DRWShadingGroup::uniforms, UNUSED_VARS_NDEBUG, DRWUniform::vertbuf, DRWUniform::vertbuf_ref, and DRWManager::vmempool.

Referenced by draw_shgroup().

◆ DRW_culling_box_test()

bool DRW_culling_box_test ( const DRWView view,
const BoundBox bbox 
)
Returns
True if the given BoundBox intersect the current view frustum. bbox must be in world space.

Definition at line 422 of file draw_manager_exec.c.

References draw_culling_box_test(), DST, view, and DRWManager::view_default.

Referenced by eevee_lightprobes_culling_test(), and workbench_shadow_object_cast_visible_shadow().

◆ DRW_culling_frustum_corners_get()

void DRW_culling_frustum_corners_get ( const DRWView view,
BoundBox corners 
)

Definition at line 452 of file draw_manager_exec.c.

References DST, view, and DRWManager::view_default.

Referenced by workbench_shadow_update().

◆ DRW_culling_frustum_planes_get()

void DRW_culling_frustum_planes_get ( const DRWView view,
float  planes[6][4] 
)

Definition at line 458 of file draw_manager_exec.c.

References DST, view, and DRWManager::view_default.

Referenced by workbench_shadow_update().

◆ DRW_culling_min_max_test()

bool DRW_culling_min_max_test ( const DRWView view,
float  obmat[4][4],
float  min[3],
float  max[3] 
)

Return True if the given box intersect the current view frustum. This function will have to be replaced when world space bb per objects is implemented.

Definition at line 434 of file draw_manager_exec.c.

References aabb_get_near_far_from_plane(), DST, max, min, mul_v4_m4v4(), plane_point_side_v3(), transpose_m4_m4(), view, and DRWManager::view_default.

Referenced by select_cache_populate().

◆ DRW_culling_plane_test()

bool DRW_culling_plane_test ( const DRWView view,
const float  plane[4] 
)
Returns
True if the view frustum is inside or intersect the given plane. plane must be in world space.

Definition at line 428 of file draw_manager_exec.c.

References draw_culling_plane_test(), DST, view, and DRWManager::view_default.

◆ DRW_culling_sphere_test()

bool DRW_culling_sphere_test ( const DRWView view,
const BoundSphere bsphere 
)
Returns
True if the given BoundSphere intersect the current view frustum. bsphere must be in world space.

Definition at line 416 of file draw_manager_exec.c.

References draw_culling_sphere_test(), DST, view, and DRWManager::view_default.

Referenced by EEVEE_shadows_draw(), pchan_culling_test_bbone(), pchan_culling_test_envelope(), pchan_culling_test_simple(), and pchan_culling_test_with_radius_scale().

◆ DRW_draw_pass()

void DRW_draw_pass ( DRWPass pass)

Definition at line 1214 of file draw_manager_exec.c.

References drw_draw_pass_ex(), DRWPass::first, DRWPass::last, DRWPass::next, and DRWPass::shgroups.

Referenced by blender::eevee::Film::accumulate(), basic_draw_scene(), blender::eevee::Film::display(), dof_dilate_tiles_pass_draw(), dof_recursive_reduce(), downsample_planar(), downsample_radiance_cb(), blender::draw::image_engine::ScreenSpaceDrawingMode< TextureMethod >::draw_scene(), DRW_curves_update(), DRW_hair_update(), EEVEE_bloom_draw(), EEVEE_bloom_output_accumulate(), EEVEE_create_minmax_buffer(), EEVEE_cryptomatte_output_accumulate(), EEVEE_depth_of_field_draw(), eevee_draw_scene(), EEVEE_effects_downsample_radiance_buffer(), EEVEE_lightbake_filter_diffuse(), EEVEE_lightbake_filter_glossy(), EEVEE_lightbake_filter_visibility(), eevee_lightbake_render_world_sample(), EEVEE_lookdev_draw(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), EEVEE_mist_output_accumulate(), EEVEE_motion_blur_draw(), EEVEE_occlusion_compute(), EEVEE_occlusion_draw_debug(), EEVEE_occlusion_output_accumulate(), EEVEE_reflection_compute(), EEVEE_reflection_output_accumulate(), EEVEE_render_draw(), eevee_render_draw_background(), EEVEE_renderpasses_postprocess(), EEVEE_shadow_output_accumulate(), EEVEE_shadows_draw_cascades(), EEVEE_shadows_draw_cubemap(), EEVEE_subsurface_compute(), EEVEE_subsurface_data_render(), EEVEE_subsurface_output_accumulate(), EEVEE_temporal_sampling_draw(), EEVEE_update_noise(), EEVEE_velocity_resolve(), EEVEE_volumes_compute(), EEVEE_volumes_output_accumulate(), EEVEE_volumes_resolve(), external_draw_scene(), GPENCIL_antialiasing_draw(), gpencil_draw_mask(), GPENCIL_draw_object(), GPENCIL_draw_scene_depth_only(), lightbake_render_scene_face(), lightbake_render_scene_reflected(), lightbake_render_world_face(), material_renderpass_accumulate(), max_downsample_cb(), OVERLAY_antialiasing_end(), OVERLAY_armature_draw(), OVERLAY_armature_in_front_draw(), OVERLAY_background_draw(), OVERLAY_edit_curve_draw(), OVERLAY_edit_curves_draw(), OVERLAY_edit_gpencil_draw(), OVERLAY_edit_lattice_draw(), OVERLAY_edit_mesh_draw(), overlay_edit_mesh_draw_components(), OVERLAY_edit_particle_draw(), OVERLAY_edit_text_draw(), OVERLAY_edit_uv_draw(), OVERLAY_extra_blend_draw(), OVERLAY_extra_centers_draw(), OVERLAY_extra_draw(), OVERLAY_extra_in_front_draw(), OVERLAY_facing_draw(), OVERLAY_facing_infront_draw(), OVERLAY_fade_draw(), OVERLAY_fade_infront_draw(), OVERLAY_gpencil_draw(), OVERLAY_grid_draw(), OVERLAY_image_background_draw(), OVERLAY_image_draw(), OVERLAY_image_in_front_draw(), OVERLAY_image_scene_background_draw(), OVERLAY_metaball_draw(), OVERLAY_metaball_in_front_draw(), OVERLAY_mode_transfer_draw(), OVERLAY_mode_transfer_infront_draw(), OVERLAY_motion_path_draw(), OVERLAY_outline_draw(), OVERLAY_paint_draw(), OVERLAY_particle_draw(), OVERLAY_pose_draw(), OVERLAY_sculpt_curves_draw(), OVERLAY_sculpt_draw(), OVERLAY_volume_draw(), OVERLAY_wireframe_draw(), OVERLAY_wireframe_in_front_draw(), OVERLAY_xray_fade_draw(), blender::eevee::WorldPipeline::render(), blender::eevee::ForwardPipeline::render(), select_debug_draw_scene(), select_draw_scene(), simple_downsample_cube_cb(), workbench_antialiasing_draw_pass(), workbench_dof_downsample_level(), workbench_dof_draw_pass(), workbench_draw_sample(), workbench_transparent_draw_depth_pass(), and workbench_volume_draw_pass().

◆ drw_draw_pass_ex()

static void drw_draw_pass_ex ( DRWPass pass,
DRWShadingGroup start_group,
DRWShadingGroup end_group 
)
static

◆ DRW_draw_pass_subset()

void DRW_draw_pass_subset ( DRWPass pass,
DRWShadingGroup start_group,
DRWShadingGroup end_group 
)

Draw only a subset of shgroups. Used in special situations as grease pencil strokes.

Definition at line 1221 of file draw_manager_exec.c.

References drw_draw_pass_ex().

Referenced by DRW_curves_update(), and DRW_hair_update().

◆ DRW_select_load_id()

void DRW_select_load_id ( uint  id)

◆ DRW_state_lock()

void DRW_state_lock ( DRWState  state)

◆ DRW_state_reset()

void DRW_state_reset ( void  )

◆ DRW_state_reset_ex()

void DRW_state_reset_ex ( DRWState  state)

Reset state to not interfere with other UI draw-call.

Definition at line 261 of file draw_manager_exec.c.

References drw_state_set(), DST, state, and DRWManager::state.

Referenced by DRW_state_reset(), and external_draw_scene_do_v3d().

◆ drw_state_set()

void drw_state_set ( DRWState  state)

Definition at line 67 of file draw_manager_exec.c.

References blend(), DRWView::clip_planes_len, DRW_STATE_BLEND_ADD, DRW_STATE_BLEND_ADD_FULL, DRW_STATE_BLEND_ALPHA, DRW_STATE_BLEND_ALPHA_PREMUL, DRW_STATE_BLEND_ALPHA_UNDER_PREMUL, DRW_STATE_BLEND_BACKGROUND, DRW_STATE_BLEND_CUSTOM, DRW_STATE_BLEND_ENABLED, DRW_STATE_BLEND_MUL, DRW_STATE_BLEND_OIT, DRW_STATE_BLEND_SUB, DRW_STATE_CLIP_PLANES, DRW_STATE_CULL_BACK, DRW_STATE_CULL_FRONT, DRW_STATE_DEPTH_ALWAYS, DRW_STATE_DEPTH_EQUAL, DRW_STATE_DEPTH_GREATER, DRW_STATE_DEPTH_GREATER_EQUAL, DRW_STATE_DEPTH_LESS, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_DEPTH_TEST_ENABLED, DRW_STATE_FIRST_VERTEX_CONVENTION, DRW_STATE_IN_FRONT_SELECT, DRW_STATE_LOGIC_INVERT, DRW_STATE_PROGRAM_POINT_SIZE, DRW_STATE_SHADOW_OFFSET, DRW_STATE_STENCIL_ALWAYS, DRW_STATE_STENCIL_EQUAL, DRW_STATE_STENCIL_NEQUAL, DRW_STATE_STENCIL_TEST_ENABLED, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, DRW_STATE_WRITE_STENCIL, DRW_STATE_WRITE_STENCIL_ENABLED, DRW_STATE_WRITE_STENCIL_SHADOW_FAIL, DRW_STATE_WRITE_STENCIL_SHADOW_PASS, DST, GPU_BLEND_ADDITIVE, GPU_BLEND_ADDITIVE_PREMULT, GPU_BLEND_ALPHA, GPU_BLEND_ALPHA_PREMULT, GPU_BLEND_ALPHA_UNDER_PREMUL, GPU_BLEND_BACKGROUND, GPU_BLEND_CUSTOM, GPU_BLEND_INVERT, GPU_BLEND_MULTIPLY, GPU_BLEND_NONE, GPU_BLEND_OIT, GPU_BLEND_SUBTRACT, GPU_clip_distances(), GPU_CULL_BACK, GPU_CULL_FRONT, GPU_CULL_NONE, GPU_DEPTH_ALWAYS, GPU_DEPTH_EQUAL, GPU_DEPTH_GREATER, GPU_DEPTH_GREATER_EQUAL, GPU_DEPTH_LESS, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_range(), GPU_program_point_size(), GPU_provoking_vertex(), GPU_shadow_offset(), GPU_state_set(), GPU_STENCIL_ALWAYS, GPU_STENCIL_EQUAL, GPU_STENCIL_NEQUAL, GPU_STENCIL_NONE, GPU_STENCIL_OP_COUNT_DEPTH_FAIL, GPU_STENCIL_OP_COUNT_DEPTH_PASS, GPU_STENCIL_OP_NONE, GPU_STENCIL_OP_REPLACE, GPU_stencil_write_mask_set(), GPU_VERTEX_FIRST, GPU_VERTEX_LAST, GPU_WRITE_COLOR, GPU_WRITE_DEPTH, GPU_WRITE_STENCIL, state, DRWManager::state, DRWManager::state_lock, and DRWManager::view_active.

Referenced by draw_shgroup(), drw_draw_pass_ex(), DRW_state_reset_ex(), and DRW_transform_none().

◆ drw_state_validate()

static void drw_state_validate ( void  )
static

◆ drw_stencil_state_set()

static void drw_stencil_state_set ( uint  write_mask,
uint  reference,
uint  compare_mask 
)
static

◆ drw_update_view()

static void drw_update_view ( const float  viewport_size[2])
static

◆ DRW_view_get_active()

const DRWView* DRW_view_get_active ( void  )

Definition at line 348 of file draw_manager_exec.c.

References DST, and DRWManager::view_active.

Referenced by external_image_space_matrix_set().

◆ DRW_view_set_active()

void DRW_view_set_active ( const DRWView view)