Blender V4.3
GPU_state.hh File Reference
#include "BLI_utildefines.h"

Go to the source code of this file.

Enumerations

enum  eGPUWriteMask {
  GPU_WRITE_NONE = 0 , GPU_WRITE_RED = (1 << 0) , GPU_WRITE_GREEN = (1 << 1) , GPU_WRITE_BLUE = (1 << 2) ,
  GPU_WRITE_ALPHA = (1 << 3) , GPU_WRITE_DEPTH = (1 << 4) , GPU_WRITE_STENCIL = (1 << 5) , GPU_WRITE_COLOR = (GPU_WRITE_RED | GPU_WRITE_GREEN | GPU_WRITE_BLUE | GPU_WRITE_ALPHA)
}
 
enum  eGPUBarrier {
  GPU_BARRIER_FRAMEBUFFER = (1 << 0) , GPU_BARRIER_SHADER_IMAGE_ACCESS = (1 << 1) , GPU_BARRIER_TEXTURE_FETCH = (1 << 2) , GPU_BARRIER_TEXTURE_UPDATE = (1 << 3) ,
  GPU_BARRIER_COMMAND = (1 << 10) , GPU_BARRIER_SHADER_STORAGE = (1 << 11) , GPU_BARRIER_VERTEX_ATTRIB_ARRAY = (1 << 12) , GPU_BARRIER_ELEMENT_ARRAY = (1 << 13) ,
  GPU_BARRIER_UNIFORM = (1 << 14) , GPU_BARRIER_BUFFER_UPDATE = (1 << 15)
}
 
enum  eGPUStageBarrierBits {
  GPU_BARRIER_STAGE_VERTEX = (1 << 0) , GPU_BARRIER_STAGE_FRAGMENT = (1 << 1) , GPU_BARRIER_STAGE_COMPUTE = (1 << 2) , GPU_BARRIER_STAGE_ANY_GRAPHICS = (GPU_BARRIER_STAGE_VERTEX | GPU_BARRIER_STAGE_FRAGMENT) ,
  GPU_BARRIER_STAGE_ANY
}
 
enum  eGPUBlend {
  GPU_BLEND_NONE = 0 , GPU_BLEND_ALPHA , GPU_BLEND_ALPHA_PREMULT , GPU_BLEND_ADDITIVE ,
  GPU_BLEND_ADDITIVE_PREMULT , GPU_BLEND_MULTIPLY , GPU_BLEND_SUBTRACT , GPU_BLEND_INVERT ,
  GPU_BLEND_OIT , GPU_BLEND_BACKGROUND , GPU_BLEND_CUSTOM , GPU_BLEND_ALPHA_UNDER_PREMUL
}
 
enum  eGPUDepthTest {
  GPU_DEPTH_NONE = 0 , GPU_DEPTH_ALWAYS , GPU_DEPTH_LESS , GPU_DEPTH_LESS_EQUAL ,
  GPU_DEPTH_EQUAL , GPU_DEPTH_GREATER , GPU_DEPTH_GREATER_EQUAL
}
 
enum  eGPUStencilTest { GPU_STENCIL_NONE = 0 , GPU_STENCIL_ALWAYS , GPU_STENCIL_EQUAL , GPU_STENCIL_NEQUAL }
 
enum  eGPUStencilOp { GPU_STENCIL_OP_NONE = 0 , GPU_STENCIL_OP_REPLACE , GPU_STENCIL_OP_COUNT_DEPTH_PASS , GPU_STENCIL_OP_COUNT_DEPTH_FAIL }
 
enum  eGPUFaceCullTest { GPU_CULL_NONE = 0 , GPU_CULL_FRONT , GPU_CULL_BACK }
 
enum  eGPUProvokingVertex { GPU_VERTEX_LAST = 0 , GPU_VERTEX_FIRST = 1 }
 

Functions

void GPU_blend (eGPUBlend blend)
 
void GPU_face_culling (eGPUFaceCullTest culling)
 
void GPU_depth_test (eGPUDepthTest test)
 
void GPU_stencil_test (eGPUStencilTest test)
 
void GPU_provoking_vertex (eGPUProvokingVertex vert)
 
void GPU_front_facing (bool invert)
 
void GPU_depth_range (float near, float far)
 
void GPU_scissor_test (bool enable)
 
void GPU_line_smooth (bool enable)
 
void GPU_line_width (float width)
 
void GPU_logic_op_xor_set (bool enable)
 
void GPU_point_size (float size)
 
void GPU_polygon_smooth (bool enable)
 
void GPU_program_point_size (bool enable)
 
void GPU_scissor (int x, int y, int width, int height)
 
void GPU_scissor_get (int coords[4])
 
void GPU_viewport (int x, int y, int width, int height)
 
void GPU_viewport_size_get_f (float coords[4])
 
void GPU_viewport_size_get_i (int coords[4])
 
void GPU_write_mask (eGPUWriteMask mask)
 
void GPU_color_mask (bool r, bool g, bool b, bool a)
 
void GPU_depth_mask (bool depth)
 
bool GPU_depth_mask_get ()
 
void GPU_shadow_offset (bool enable)
 
void GPU_clip_distances (int distances_enabled)
 
bool GPU_mipmap_enabled ()
 
void GPU_state_set (eGPUWriteMask write_mask, eGPUBlend blend, eGPUFaceCullTest culling_test, eGPUDepthTest depth_test, eGPUStencilTest stencil_test, eGPUStencilOp stencil_op, eGPUProvokingVertex provoking_vert)
 
void GPU_stencil_reference_set (uint reference)
 
void GPU_stencil_write_mask_set (uint write_mask)
 
void GPU_stencil_compare_mask_set (uint compare_mask)
 
eGPUFaceCullTest GPU_face_culling_get ()
 
eGPUBlend GPU_blend_get ()
 
eGPUDepthTest GPU_depth_test_get ()
 
eGPUWriteMask GPU_write_mask_get ()
 
uint GPU_stencil_mask_get ()
 
eGPUStencilTest GPU_stencil_test_get ()
 
float GPU_line_width_get ()
 
void GPU_flush ()
 
void GPU_finish ()
 
void GPU_apply_state ()
 
void GPU_bgl_start ()
 
void GPU_bgl_end ()
 
bool GPU_bgl_get ()
 
void GPU_memory_barrier (eGPUBarrier barrier)
 
GPUFenceGPU_fence_create ()
 
void GPU_fence_free (GPUFence *fence)
 
void GPU_fence_signal (GPUFence *fence)
 
void GPU_fence_wait (GPUFence *fence)
 

Enumeration Type Documentation

◆ eGPUBarrier

Enumerator
GPU_BARRIER_FRAMEBUFFER 

All written texture prior to this barrier can be bound as frame-buffer attachment.

GPU_BARRIER_SHADER_IMAGE_ACCESS 

All written texture prior to this barrier can be bound as image.

GPU_BARRIER_TEXTURE_FETCH 

All written texture prior to this barrier can be bound as sampler.

GPU_BARRIER_TEXTURE_UPDATE 

All written texture prior to this barrier can be read or updated with CPU memory.

GPU_BARRIER_COMMAND 

All written texture prior to this barrier can be read or updated with PBO. All written buffer prior to this barrier can be bound as indirect command buffer.

GPU_BARRIER_SHADER_STORAGE 

All written buffer prior to this barrier can be bound as SSBO.

GPU_BARRIER_VERTEX_ATTRIB_ARRAY 

All written buffer prior to this barrier can be bound as VBO.

GPU_BARRIER_ELEMENT_ARRAY 

All written buffer prior to this barrier can be bound as IBO.

GPU_BARRIER_UNIFORM 

All written buffer prior to this barrier can be bound as UBO.

GPU_BARRIER_BUFFER_UPDATE 

All written buffer prior to this barrier can be read or updated with CPU memory.

Definition at line 29 of file GPU_state.hh.

◆ eGPUBlend

enum eGPUBlend

Defines the fixed pipeline blending equation. SRC is the output color from the shader. DST is the color from the frame-buffer. The blending equation is: (SRC * A) + (DST * B). The blend mode will modify the A and B parameters.

Enumerator
GPU_BLEND_NONE 
GPU_BLEND_ALPHA 

Pre-multiply variants will NOT multiply rgb output by alpha.

GPU_BLEND_ALPHA_PREMULT 
GPU_BLEND_ADDITIVE 
GPU_BLEND_ADDITIVE_PREMULT 
GPU_BLEND_MULTIPLY 
GPU_BLEND_SUBTRACT 
GPU_BLEND_INVERT 

Replace logic op: SRC * (1 - DST) NOTE: Does not modify alpha.

GPU_BLEND_OIT 

Order independent transparency. NOTE: Cannot be used as is. Needs special setup (frame-buffer, shader ...).

GPU_BLEND_BACKGROUND 

Special blend to add color under and multiply DST color by SRC alpha.

GPU_BLEND_CUSTOM 

Custom blend parameters using dual source blending : SRC0 + SRC1 * DST NOTE: Can only be used with ONE Draw Buffer and shader needs to be specialized.

GPU_BLEND_ALPHA_UNDER_PREMUL 

Definition at line 84 of file GPU_state.hh.

◆ eGPUDepthTest

Enumerator
GPU_DEPTH_NONE 
GPU_DEPTH_ALWAYS 
GPU_DEPTH_LESS 
GPU_DEPTH_LESS_EQUAL 
GPU_DEPTH_EQUAL 
GPU_DEPTH_GREATER 
GPU_DEPTH_GREATER_EQUAL 

Definition at line 107 of file GPU_state.hh.

◆ eGPUFaceCullTest

Enumerator
GPU_CULL_NONE 
GPU_CULL_FRONT 
GPU_CULL_BACK 

Definition at line 132 of file GPU_state.hh.

◆ eGPUProvokingVertex

Enumerator
GPU_VERTEX_LAST 
GPU_VERTEX_FIRST 

Definition at line 138 of file GPU_state.hh.

◆ eGPUStageBarrierBits

Enumerator
GPU_BARRIER_STAGE_VERTEX 
GPU_BARRIER_STAGE_FRAGMENT 
GPU_BARRIER_STAGE_COMPUTE 
GPU_BARRIER_STAGE_ANY_GRAPHICS 
GPU_BARRIER_STAGE_ANY 

Definition at line 65 of file GPU_state.hh.

◆ eGPUStencilOp

Enumerator
GPU_STENCIL_OP_NONE 
GPU_STENCIL_OP_REPLACE 
GPU_STENCIL_OP_COUNT_DEPTH_PASS 

Special values for stencil shadows.

GPU_STENCIL_OP_COUNT_DEPTH_FAIL 

Definition at line 124 of file GPU_state.hh.

◆ eGPUStencilTest

Enumerator
GPU_STENCIL_NONE 
GPU_STENCIL_ALWAYS 
GPU_STENCIL_EQUAL 
GPU_STENCIL_NEQUAL 

Definition at line 117 of file GPU_state.hh.

◆ eGPUWriteMask

Enumerator
GPU_WRITE_NONE 
GPU_WRITE_RED 
GPU_WRITE_GREEN 
GPU_WRITE_BLUE 
GPU_WRITE_ALPHA 
GPU_WRITE_DEPTH 
GPU_WRITE_STENCIL 
GPU_WRITE_COLOR 

Definition at line 16 of file GPU_state.hh.

Function Documentation

◆ GPU_apply_state()

◆ GPU_bgl_end()

◆ GPU_bgl_get()

◆ GPU_bgl_start()

◆ GPU_blend()

void GPU_blend ( eGPUBlend blend)

Definition at line 42 of file gpu_state.cc.

References blend, and SET_IMMUTABLE_STATE.

Referenced by ANIM_channel_draw(), ANIM_draw_action_framerange(), ANIM_draw_framerange(), ANIM_draw_previewrange(), annotation_draw_data(), annotation_draw_eraser(), annotation_draw_stabilizer(), arrow_draw_intern(), blender::gpu::tests::blend_test(), blf_batch_draw(), brush_drawcursor(), button2d_draw_intern(), channel_list_draw_keys(), clip_draw_dopesheet_channels(), clip_draw_dopesheet_main(), clip_draw_sfra_efra(), cursor_box_draw(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), BlenderDisplayDriver::draw(), blender::ed::spreadsheet::draw_alternating_row_overlay(), draw_anti_tria(), draw_azone_arrow(), draw_background(), draw_cache_view(), draw_channel_strips(), draw_current_frame(), draw_fcurve(), draw_fcurve_handles(), draw_fcurve_samples(), draw_fcurve_vertices(), draw_filled_lasso(), draw_histogram(), draw_image_cache(), draw_lasso_smooth_stroke_indicator(), draw_line_bounds(), draw_line_loop(), draw_line_pairs(), draw_marker(), draw_markers_background(), draw_mask_layers(), draw_movieclip_buffer(), draw_movieclip_cache(), draw_nla_main_data(), draw_nla_track_list(), draw_normalization_borders(), draw_overshoot_triangle(), draw_plane_marker_image(), draw_scope_end(), draw_seq_in_view(), draw_seq_strips(), draw_seq_timeline_channels(), draw_strips_background(), draw_strips_foreground(), draw_timeline_sfra_efra(), draw_tracks_motion_and_error_curves(), draw_vectorscope_graticule(), draw_view_axis(), drawAutoKeyWarning(), drawEdgeSlide(), drawLine(), drawPropCircle(), drawPropRange(), drawSnapping(), drawVertSlide(), drawviewborder(), DRW_draw_cursor(), DRW_draw_cursor_2d_ex(), DRW_draw_render_loop_offscreen(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_draw(), ED_image_draw_info(), ED_mask_draw_region(), ED_region_do_draw(), ED_region_image_metadata_draw(), ED_region_info_draw_multiline(), ED_screen_draw_edges(), ED_view3d_cursor_snap_draw_util(), EDBM_preselect_edgering_draw(), file_draw_preview(), blender::ed::greasepencil::fill_strokes(), gizmo_axis_draw(), gizmo_button2d_draw(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_dial_draw(), gizmo_move_draw(), gizmo_primitive_draw_intern(), gizmo_ruler_draw(), GPU_bgl_start(), blender::ed::sculpt_paint::image::ops::paint::gradient_draw_line(), graph_draw_channel_names(), graph_draw_ghost_curves(), graph_main_region_draw(), histogram_draw_one(), icon_draw_size(), knifetool_draw(), knifetool_draw_angle(), knifetool_draw_visible_distances(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), move3d_draw_intern(), nla_draw_strip(), nla_draw_strip_curves(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_link_end_marker(), blender::ed::space_node::node_draw_mute_line(), blender::ed::space_node::node_draw_nodetree(), blender::ed::space_node::node_draw_preview(), blender::ed::space_node::node_draw_sockets(), blender::ed::space_node::node_draw_space(), blender::ed::space_node::node_draw_zones_and_frames(), blender::ed::space_node::node_socket_draw(), blender::ed::space_node::nodelink_batch_draw(), blender::ed::outliner::outliner_draw_active_indicator(), blender::ed::outliner::outliner_draw_hierarchy_lines(), blender::ed::outliner::outliner_draw_highlights(), blender::ed::outliner::outliner_draw_tree(), blender::ed::outliner::outliner_draw_tree_element(), blender::ed::sculpt_paint::paint_cursor_restore_drawing_state(), blender::ed::sculpt_paint::paint_cursor_setup_2D_drawing(), blender::ed::sculpt_paint::paint_cursor_setup_3D_drawing(), blender::ed::sculpt_paint::paint_draw_alpha_overlay(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), panel_draw_aligned_backdrop(), panel_draw_aligned_widgets(), playanim_toscreen_ex(), pygpu_state_blend_set(), radial_control_paint_cursor(), region_draw_azone_tab_arrow(), region_draw_azones(), region_draw_emboss(), region_draw_status_text(), seq_draw_image_origin_and_outline(), sequencer_draw_display_buffer(), sequencer_draw_scopes(), stitch_draw(), textview_draw_sel(), textview_draw_string(), timeline_draw_cache(), transform_draw_cursor_draw(), UI_block_draw(), ui_draw_but(), ui_draw_but_COLORBAND(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), ui_draw_but_HISTOGRAM(), ui_draw_but_HSVCIRCLE(), ui_draw_but_IMAGE(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_button_sections_alignment_separator(), ui_draw_colorband_handle(), ui_draw_dropshadow(), ui_draw_menu_item(), ui_draw_pie_center(), ui_draw_popover_back_impl(), ui_draw_preview_item_stateless(), UI_draw_roundbox_4fv_ex(), ui_draw_separator(), ui_hsv_cursor(), UI_panel_category_draw_all(), ui_searchbox_region_draw_cb__operator(), ui_searchbox_region_draw_fn(), ui_tooltip_region_draw_cb(), UI_widgetbase_draw_cache_end(), v3d_cursor_plane_draw_grid(), blender::ed::object::voxel_size_edit_draw(), widget_draw_icon(), widget_draw_node_link_socket(), widget_draw_submenu_tria(), widget_draw_text(), widget_draw_text_icon(), widget_menu_back(), widget_progress_type_ring(), widget_swatch(), widget_tab(), widgetbase_draw_ex(), wm_drags_draw(), wm_draw_region_blend(), wm_gesture_draw_circle(), wm_gesture_draw_line_active_side(), wm_gesture_draw_rect(), wm_software_cursor_draw_bitmap(), wm_xr_controller_aim_draw(), and wm_xr_controller_model_draw().

◆ GPU_blend_get()

◆ GPU_clip_distances()

void GPU_clip_distances ( int distances_enabled)

◆ GPU_color_mask()

◆ GPU_depth_mask()

◆ GPU_depth_mask_get()

◆ GPU_depth_range()

◆ GPU_depth_test()

◆ GPU_depth_test_get()

◆ GPU_face_culling()

void GPU_face_culling ( eGPUFaceCullTest culling)

◆ GPU_face_culling_get()

◆ GPU_fence_create()

◆ GPU_fence_free()

void GPU_fence_free ( GPUFence * fence)

Definition at line 385 of file gpu_state.cc.

References blender::gpu::unwrap().

Referenced by BlenderDisplayDriver::gpu_resources_destroy().

◆ GPU_fence_signal()

void GPU_fence_signal ( GPUFence * fence)

Definition at line 390 of file gpu_state.cc.

References blender::gpu::unwrap().

Referenced by BlenderDisplayDriver::draw(), and BlenderDisplayDriver::update_end().

◆ GPU_fence_wait()

void GPU_fence_wait ( GPUFence * fence)

◆ GPU_finish()

◆ GPU_flush()

◆ GPU_front_facing()

◆ GPU_line_smooth()

void GPU_line_smooth ( bool enable)

Definition at line 78 of file gpu_state.cc.

References SET_IMMUTABLE_STATE.

Referenced by annotation_draw_data(), annotation_draw_eraser(), annotation_draw_stabilizer(), brush_drawcursor(), button2d_draw_intern(), cursor_box_draw(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), draw_fcurve(), draw_fcurve_handles(), draw_fcurve_samples(), draw_lasso_smooth_stroke_indicator(), draw_spline_curve(), draw_spline_points(), draw_view_axis(), DRW_draw_cursor(), DRW_draw_cursor_2d_ex(), DRW_state_reset(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_draw(), ED_view3d_cursor_snap_draw_util(), gizmo_ruler_draw(), gizmos_draw_list(), blender::ed::sculpt_paint::image::ops::paint::gradient_draw_line(), graph_draw_ghost_curves(), histogram_draw_one(), nla_draw_strip_curves(), blender::ed::space_node::node_draw_space(), blender::ed::sculpt_paint::paint_cursor_restore_drawing_state(), blender::ed::sculpt_paint::paint_cursor_setup_2D_drawing(), blender::ed::sculpt_paint::paint_cursor_setup_3D_drawing(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_draw_line_cursor(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), radial_control_paint_cursor(), seq_draw_image_origin_and_outline(), transform_draw_cursor_draw(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), ui_draw_but_HSVCIRCLE(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), UI_panel_category_draw_all(), v3d_cursor_plane_draw_grid(), and blender::ed::object::voxel_size_edit_draw().

◆ GPU_line_width()

void GPU_line_width ( float width)
Note
By convention, this is set as needed and not reset back to 1.0. This means code that draws lines must always set the line width beforehand, but is not expected to restore its previous value.

Definition at line 161 of file gpu_state.cc.

References max_ff(), PIXELSIZE, and SET_MUTABLE_STATE.

Referenced by ANIM_channel_draw(), ANIM_draw_action_framerange(), ANIM_draw_cfra(), annotation_draw_stabilizer(), clip_draw_sfra_efra(), cursor_box_draw(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), blender::ed::sculpt_paint::draw_bezier_handle_lines(), draw_distortion(), draw_fcurve(), draw_fcurve_modifier_controls_envelope(), draw_lasso_smooth_stroke_indicator(), blender::ed::greasepencil::image_render::draw_lines(), draw_marker_areas(), draw_marker_outline(), draw_marker_slide_zones(), draw_plane_marker_ex(), blender::ed::greasepencil::image_render::draw_polyline(), blender::ed::sculpt_paint::draw_rect_point(), draw_render_info(), draw_single_handle(), draw_track_path(), blender::ed::sculpt_paint::draw_tri_point(), draw_view_axis(), drawEdgeSlide(), drawrenderborder(), drawTransformView(), drawVertSlide(), drawviewborder(), DRW_draw_cursor(), DRW_draw_cursor_2d_ex(), DRW_state_reset(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_draw(), ED_image_draw_cursor(), ED_imbuf_sample_draw(), ED_markers_draw(), ED_region_do_draw(), ED_region_draw_mouse_line_cb(), ED_region_panels_draw(), ED_view3d_cursor_snap_draw_util(), EDBM_preselect_elem_draw(), blender::ed::sculpt_paint::boundary::edges_preview_draw(), gizmo_ruler_draw(), blender::ed::sculpt_paint::image::ops::paint::gradient_draw_line(), graph_draw_driver_debug(), graph_draw_ghost_curves(), graph_main_region_draw(), blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw(), histogram_draw_one(), knifetool_draw(), knifetool_draw_angle(), knifetool_draw_angle_snapping(), knifetool_draw_orientation_locking(), mask_draw_curve_type(), nla_draw_use_dashed_outlines(), nla_strip_draw_markers(), blender::ed::space_node::node_draw_basis(), blender::ed::outliner::outliner_draw_hierarchy_lines(), blender::ed::outliner::outliner_draw_separator(), blender::ed::sculpt_paint::paint_cursor_draw_main_inactive_cursor(), blender::ed::sculpt_paint::paint_cursor_pose_brush_segments_draw(), blender::ed::sculpt_paint::paint_cursor_setup_2D_drawing(), blender::ed::sculpt_paint::paint_cursor_setup_3D_drawing(), blender::ed::sculpt_paint::paint_draw_2D_view_brush_cursor_default(), blender::ed::sculpt_paint::paint_draw_3D_view_inactive_brush_cursor(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_draw_legacy_3D_view_brush_cursor(), blender::ed::sculpt_paint::boundary::pivot_line_preview_draw(), blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw(), pygpu_state_line_width_set(), radial_control_paint_cursor(), radial_control_paint_curve(), region_draw_azones(), blender::ed::sculpt_paint::sculpt_geometry_preview_lines_draw(), blender::ed::sculpt_paint::SCULPT_layer_brush_height_preview_draw(), seq_draw_image_origin_and_outline(), sequencer_draw_borders_overlay(), blender::ed::sculpt_paint::cloth::simulation_limits_draw(), tracking_segment_start_cb(), transform_draw_cursor_draw(), ui_draw_but_CURVE(), ui_draw_but_CURVEPROFILE(), ui_draw_but_VECTORSCOPE(), ui_draw_separator(), UI_view2d_multi_grid_draw(), v3d_cursor_plane_draw_grid(), blender::ed::object::voxel_size_edit_draw(), and wm_gesture_draw().

◆ GPU_line_width_get()

◆ GPU_logic_op_xor_set()

void GPU_logic_op_xor_set ( bool enable)

Definition at line 88 of file gpu_state.cc.

References SET_IMMUTABLE_STATE.

Referenced by draw_marker_areas(), draw_stabilization_border(), and ED_imbuf_sample_draw().

◆ GPU_memory_barrier()

void GPU_memory_barrier ( eGPUBarrier barrier)

A barrier must be issued after a shader arbitrary write to a buffer or a texture (i.e: using imageStore, imageAtomics, or SSBO). Otherwise, the written value may not appear updated to the next user of this resource.

The type of barrier must be chosen depending on the future use of the memory that was written by the shader.

Definition at line 374 of file gpu_state.cc.

References blender::gpu::Context::get(), blender::gpu::StateManager::issue_barrier(), and blender::gpu::Context::state_manager.

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::nodes::node_composite_glare_cc::GlareOperation::apply_streak_filter(), blender::gpu::VKStorageBuffer::async_flush_to_host(), blender::draw::command::DrawMultiBuf::bind(), blender::realtime_compositor::Result::bind_as_image(), blender::realtime_compositor::Result::bind_as_texture(), blender::gpu::tests::blend_test(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_motion_blur(), blender::realtime_compositor::compute_preview_from_result(), blender::draw::View::compute_procedural_bounds(), blender::draw::View::compute_visibility(), blender::draw::curves_update(), blender::draw::Manager::debug_bind(), draw_shgroup(), blender::draw::draw_subdiv_accumulate_normals(), blender::draw::draw_subdiv_build_edge_fac_buffer(), blender::draw::draw_subdiv_build_edituv_stretch_angle_buffer(), blender::draw::draw_subdiv_build_edituv_stretch_area_buffer(), blender::draw::draw_subdiv_build_fdots_buffers(), blender::draw::draw_subdiv_build_lines_buffer(), blender::draw::draw_subdiv_build_lines_loose_buffer(), blender::draw::draw_subdiv_build_lnor_buffer(), blender::draw::draw_subdiv_build_sculpt_data_buffer(), blender::draw::draw_subdiv_build_tris_buffer(), blender::draw::draw_subdiv_extract_pos_nor(), blender::draw::draw_subdiv_extract_uvs(), blender::draw::draw_subdiv_finalize_custom_normals(), blender::draw::draw_subdiv_finalize_normals(), blender::draw::draw_subdiv_interp_custom_data(), blender::draw::DRW_curves_update(), DRW_hair_update(), blender::draw::Manager::end_sync(), blender::draw::command::Barrier::execute(), blender::nodes::node_composite_denoise_cc::DenoiseOperation::execute(), blender::realtime_compositor::ReduceToSingleValueOperation::execute(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), 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(), GPU_indexbuf_build_curves_on_device(), blender::draw::hair_update(), ViewportColorSampleSession::init(), blender::render::Context::output_to_render_result(), blender::realtime_compositor::parallel_reduction_dispatch(), pygpu_compute_dispatch(), blender::eevee::Film::read_aov(), blender::gpu::tests::CallData::read_back(), blender::eevee::Film::read_pass(), blender::draw::select::SelectMap::read_result(), blender::eevee::IrradianceBake::read_result_packed(), blender::eevee::IrradianceBake::read_result_unpacked(), blender::eevee::DepthOfField::render(), blender::eevee::ShadowModule::set_view(), blender::draw::Manager::submit_debug(), blender::eevee::IrradianceBake::surfels_create(), blender::gpu::tests::test_buffer_texture(), blender::gpu::tests::test_compute_direct(), blender::gpu::tests::test_compute_indirect(), blender::draw::test_eevee_shadow_page_mask_ex(), blender::gpu::tests::test_shader_compute_1d(), blender::gpu::tests::test_shader_compute_2d(), blender::gpu::tests::test_shader_compute_ibo(), blender::gpu::tests::test_shader_compute_ssbo(), blender::gpu::tests::test_shader_compute_vbo(), 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_read(), blender::gpu::tests::ShaderSpecializationConst::validate(), and blender::render::Context::viewer_output_to_viewer_image().

◆ GPU_mipmap_enabled()

bool GPU_mipmap_enabled ( )

◆ GPU_point_size()

◆ GPU_polygon_smooth()

◆ GPU_program_point_size()

◆ GPU_provoking_vertex()

void GPU_provoking_vertex ( eGPUProvokingVertex vert)

Definition at line 63 of file gpu_state.cc.

References SET_IMMUTABLE_STATE.

Referenced by drw_state_set().

◆ GPU_scissor()

◆ GPU_scissor_get()

◆ GPU_scissor_test()

◆ GPU_shadow_offset()

void GPU_shadow_offset ( bool enable)

Definition at line 119 of file gpu_state.cc.

References SET_IMMUTABLE_STATE.

Referenced by drw_state_set(), and blender::draw::command::StateSet::execute().

◆ GPU_state_set()

◆ GPU_stencil_compare_mask_set()

void GPU_stencil_compare_mask_set ( uint compare_mask)

◆ GPU_stencil_mask_get()

◆ GPU_stencil_reference_set()

void GPU_stencil_reference_set ( uint reference)

◆ GPU_stencil_test()

void GPU_stencil_test ( eGPUStencilTest test)

Definition at line 73 of file gpu_state.cc.

References SET_IMMUTABLE_STATE.

Referenced by blender::gpu::GLFrameBuffer::clear().

◆ GPU_stencil_test_get()

◆ GPU_stencil_write_mask_set()

void GPU_stencil_write_mask_set ( uint write_mask)

◆ GPU_viewport()

◆ GPU_viewport_size_get_f()

void GPU_viewport_size_get_f ( float coords[4])

Definition at line 262 of file gpu_state.cc.

References blender::gpu::Context::active_fb, blender::gpu::Context::get(), and blender::gpu::FrameBuffer::viewport_get().

Referenced by annotation_draw_eraser(), annotation_draw_stroke_2d(), annotation_draw_stroke_3d(), annotation_draw_stroke_buffer(), arrow_draw_geom(), button2d_draw_intern(), button2d_geom_draw_backdrop(), cage2d_draw_box_corners(), cage2d_draw_box_interaction(), cage2d_draw_circle_wire(), cage2d_draw_rect_wire(), cage3d_draw_box_corners(), cage3d_draw_circle_wire(), dial_geom_draw(), dial_ghostarc_draw_helpline(), dial_ghostarc_draw_incremental_angle(), draw_fcurve(), draw_fcurve_modifier_controls_envelope(), draw_image_sample_line(), draw_line_bounds(), draw_line_loop(), draw_line_pairs(), draw_marker_areas(), draw_marker_line(), draw_overlap_frame_indicator(), draw_parallel_lines(), draw_plane_marker_ex(), draw_stabilization_border(), drawConstraint(), drawLine(), drawPropCircle(), drawPropRange(), drawrenderborder(), drawVertSlide(), drawviewborder(), ED_image_draw_cursor(), ED_region_draw_mouse_line_cb(), ED_view3d_cursor_snap_draw_util(), EDBM_preselect_edgering_draw(), gizmo_axis_draw(), gizmo_primitive_draw_geom(), gizmo_ruler_draw(), gpu_select_pick_begin(), graph_draw_driver_debug(), graph_draw_ghost_curves(), blender::ed::sculpt_paint::grease_pencil_eraser_draw(), mask_draw_curve_type(), move_geom_draw(), nla_actionclip_draw_markers(), nla_draw_use_dashed_outlines(), blender::ed::space_node::node_draw_zones_and_frames(), blender::ed::outliner::outliner_draw_hierarchy_lines(), blender::ed::sculpt_paint::paint_draw_line_cursor(), sequencer_draw_borders_overlay(), transform_draw_cursor_draw(), ui_draw_colorband_handle(), wide_line_workaround_start(), wm_gesture_draw_circle(), wm_gesture_draw_cross(), wm_gesture_draw_lasso(), wm_gesture_draw_line(), wm_gesture_draw_polyline(), wm_gesture_draw_rect(), wm_xr_controller_aim_draw(), and wm_xr_raycast_draw().

◆ GPU_viewport_size_get_i()

◆ GPU_write_mask()

◆ GPU_write_mask_get()