|
Blender V4.3
|
#include <draw_pass.hh>
Inherited by blender::draw::detail::Pass< DrawCommandBufType >.
Public Member Functions | |
| PassBase (const char *name, DrawCommandBufType &draw_command_buf, SubPassVector< PassBase< DrawCommandBufType > > &sub_passes, GPUShader *shader=nullptr) | |
| void | init () |
| template<class U > | |
| void | bind_resources (U &resources) |
State Implementation | |
| void | state_set (DRWState state, int clip_plane_count=0) |
| void | state_stencil (uint8_t write_mask, uint8_t reference, uint8_t compare_mask) |
| void | shader_set (GPUShader *shader) |
| void | framebuffer_set (GPUFrameBuffer **framebuffer) |
| void | subpass_transition (GPUAttachmentState depth_attachment, Span< GPUAttachmentState > color_attachments) |
| void | material_set (Manager &manager, GPUMaterial *material) |
Clear Implementation | |
| void | clear_color (float4 color) |
| void | clear_depth (float depth) |
| void | clear_stencil (uint8_t stencil) |
| void | clear_depth_stencil (float depth, uint8_t stencil) |
| void | clear_color_depth_stencil (float4 color, float depth, uint8_t stencil) |
Draw calls | |
| void | draw (gpu::Batch *batch, uint instance_len=-1, uint vertex_len=-1, uint vertex_first=-1, ResourceHandle handle={0}, uint custom_id=0) |
| void | draw (gpu::Batch *batch, ResourceHandle handle, uint custom_id=0) |
| void | draw_procedural (GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceHandle handle={0}, uint custom_id=0) |
| void | draw_expand (gpu::Batch *batch, GPUPrimType primitive_type, uint primitive_len, uint instance_len, uint vertex_len=-1, uint vertex_first=-1, ResourceHandle handle={0}, uint custom_id=0) |
| void | draw_expand (gpu::Batch *batch, GPUPrimType primitive_type, uint primitive_len, uint instance_len, ResourceHandle handle={0}, uint custom_id=0) |
Indirect draw calls | |
| void | draw_indirect (gpu::Batch *batch, StorageBuffer< DrawCommand, true > &indirect_buffer, ResourceHandle handle={0}) |
| void | draw_procedural_indirect (GPUPrimType primitive, StorageBuffer< DrawCommand, true > &indirect_buffer, ResourceHandle handle={0}) |
Compute Dispatch Implementation | |
| void | dispatch (int group_len) |
| void | dispatch (int2 group_len) |
| void | dispatch (int3 group_len) |
| void | dispatch (int3 *group_len) |
| void | dispatch (StorageBuffer< DispatchCommand > &indirect_buffer) |
Barrier Implementation | |
| void | barrier (eGPUBarrier type) |
Push Constant Implementation | |
| void | push_constant (const char *name, const float &data) |
| void | push_constant (const char *name, const float2 &data) |
| void | push_constant (const char *name, const float3 &data) |
| void | push_constant (const char *name, const float4 &data) |
| void | push_constant (const char *name, const int &data) |
| void | push_constant (const char *name, const int2 &data) |
| void | push_constant (const char *name, const int3 &data) |
| void | push_constant (const char *name, const int4 &data) |
| void | push_constant (const char *name, const bool &data) |
| void | push_constant (const char *name, const float4x4 &data) |
| void | push_constant (const char *name, const float *data, int array_len=1) |
| void | push_constant (const char *name, const float2 *data, int array_len=1) |
| void | push_constant (const char *name, const float3 *data, int array_len=1) |
| void | push_constant (const char *name, const float4 *data, int array_len=1) |
| void | push_constant (const char *name, const int *data, int array_len=1) |
| void | push_constant (const char *name, const int2 *data, int array_len=1) |
| void | push_constant (const char *name, const int3 *data, int array_len=1) |
| void | push_constant (const char *name, const int4 *data, int array_len=1) |
| void | push_constant (const char *name, const float4x4 *data) |
Public Attributes | |
| const char * | debug_name |
| bool | use_custom_ids |
Protected Attributes | |
| Vector< command::Header, 0 > | headers_ |
| Vector< command::Undetermined, 0 > | commands_ |
| DrawCommandBufType & | draw_commands_buf_ |
| SubPassVector< PassBase< DrawCommandBufType > > & | sub_passes_ |
| GPUShader * | shader_ |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const PassBase &pass) |
PassBase Implementation | |
| PassBase< DrawCommandBufType > & | sub (const char *name) |
| void | clear_multi (Span< float4 > colors) |
| std::string | serialize (std::string line_prefix="") const |
| void | clear (eGPUFrameBufferBits planes, float4 color, float depth, uint8_t stencil) |
| gpu::Batch * | procedural_batch_get (GPUPrimType primitive) |
| command::Undetermined & | create_command (command::Type type) |
| void | submit (command::RecordingState &state) const |
Resource bind Implementation | |
| void | bind_image (const char *name, GPUTexture *image) |
| void | bind_image (const char *name, GPUTexture **image) |
| void | bind_image (int slot, GPUTexture *image) |
| void | bind_image (int slot, GPUTexture **image) |
| void | bind_texture (const char *name, GPUTexture *texture, GPUSamplerState state=sampler_auto) |
| void | bind_texture (const char *name, GPUTexture **texture, GPUSamplerState state=sampler_auto) |
| void | bind_texture (const char *name, gpu::VertBuf *buffer) |
| void | bind_texture (const char *name, gpu::VertBuf **buffer) |
| void | bind_texture (int slot, GPUTexture *texture, GPUSamplerState state=sampler_auto) |
| void | bind_texture (int slot, GPUTexture **texture, GPUSamplerState state=sampler_auto) |
| void | bind_texture (int slot, gpu::VertBuf *buffer) |
| void | bind_texture (int slot, gpu::VertBuf **buffer) |
| void | bind_ssbo (const char *name, GPUStorageBuf *buffer) |
| void | bind_ssbo (const char *name, GPUStorageBuf **buffer) |
| void | bind_ssbo (int slot, GPUStorageBuf *buffer) |
| void | bind_ssbo (int slot, GPUStorageBuf **buffer) |
| void | bind_ssbo (const char *name, GPUUniformBuf *buffer) |
| void | bind_ssbo (const char *name, GPUUniformBuf **buffer) |
| void | bind_ssbo (int slot, GPUUniformBuf *buffer) |
| void | bind_ssbo (int slot, GPUUniformBuf **buffer) |
| void | bind_ssbo (const char *name, gpu::VertBuf *buffer) |
| void | bind_ssbo (const char *name, gpu::VertBuf **buffer) |
| void | bind_ssbo (int slot, gpu::VertBuf *buffer) |
| void | bind_ssbo (int slot, gpu::VertBuf **buffer) |
| void | bind_ssbo (const char *name, gpu::IndexBuf *buffer) |
| void | bind_ssbo (const char *name, gpu::IndexBuf **buffer) |
| void | bind_ssbo (int slot, gpu::IndexBuf *buffer) |
| void | bind_ssbo (int slot, gpu::IndexBuf **buffer) |
| void | bind_ubo (const char *name, GPUUniformBuf *buffer) |
| void | bind_ubo (const char *name, GPUUniformBuf **buffer) |
| void | bind_ubo (int slot, GPUUniformBuf *buffer) |
| void | bind_ubo (int slot, GPUUniformBuf **buffer) |
| void | specialize_constant (GPUShader *shader, const char *name, const float &data) |
| void | specialize_constant (GPUShader *shader, const char *name, const int &data) |
| void | specialize_constant (GPUShader *shader, const char *name, const uint &data) |
| void | specialize_constant (GPUShader *shader, const char *name, const bool &data) |
| void | specialize_constant (GPUShader *shader, const char *name, const float *data) |
| void | specialize_constant (GPUShader *shader, const char *name, const int *data) |
| void | specialize_constant (GPUShader *shader, const char *name, const uint *data) |
| void | specialize_constant (GPUShader *shader, const char *name, const bool *data) |
| int | push_constant_offset (const char *name) |
Public API of a draw pass.
Definition at line 123 of file draw_pass.hh.
|
inline |
Definition at line 147 of file draw_pass.hh.
|
inline |
Record a barrier call to synchronize arbitrary load/store operation between draw calls.
Definition at line 943 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::barrier().
Referenced by blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::eevee::Precompute::Precompute(), blender::eevee::VolumeLayer::render(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::Film::sync(), blender::eevee::IrradianceBake::sync(), blender::eevee::MotionBlurModule::sync(), blender::eevee::WorldVolumePipeline::sync(), and blender::eevee::Film::write_viewport_compositor_passes().
|
inline |
Definition at line 1224 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_sampler_binding().
|
inline |
Bind a shader resource.
Reference versions are to be used when the resource might be resize / realloc or even change between the time it is referenced and the time it is dereferenced for drawing.
IMPORTANT: Will keep a reference to the data and dereference it upon drawing. Make sure data still alive until pass submission.
Definition at line 1118 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_sampler_binding().
Referenced by blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), blender::eevee::Precompute::Precompute(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::Film::sync(), blender::eevee::MotionBlurModule::sync(), and blender::eevee::Film::write_viewport_compositor_passes().
|
inline |
Definition at line 1250 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1197 of file draw_pass.hh.
References BLI_assert.
|
inline |
Custom resource binding. Syntactic sugar to avoid calling resources.bind_resources(pass) which is semantically less pleasing. U type must have a bind_resources<Pass<T> &pass>() method.
Definition at line 426 of file draw_pass.hh.
Referenced by blender::eevee::DeferredLayer::begin_sync(), blender::eevee::PlanarProbePipeline::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::eevee::ShadowModule::debug_end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::CapturePipeline::sync(), blender::eevee::Film::sync(), blender::eevee::ForwardPipeline::sync(), blender::eevee::HiZBuffer::sync(), blender::eevee::IrradianceBake::sync(), blender::eevee::MotionBlurModule::sync(), blender::eevee::WorldVolumePipeline::sync(), and blender::eevee::PlanarProbeModule::viewport_draw().
|
inline |
Definition at line 1087 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1081 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1075 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1069 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1203 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1051 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
Referenced by blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_cache_get(), blender::eevee::ShadowModule::debug_end_sync(), blender::draw::overlay::Origins::end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::draw::hair_particle_cache_get(), blender::draw::select::SelectMap::select_bind(), blender::eevee::CapturePipeline::sync(), blender::eevee::IrradianceBake::sync(), blender::eevee::MotionBlurModule::sync(), and blender::eevee::PlanarProbeModule::viewport_draw().
|
inline |
Definition at line 1063 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1057 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ssbo_binding().
|
inline |
Definition at line 1165 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1158 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1151 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1144 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1230 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1124 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1137 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1130 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1112 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_sampler_binding().
|
inline |
Definition at line 1106 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_sampler_binding().
|
inline |
Definition at line 1216 of file draw_pass.hh.
References BLI_assert, GPU_shader_get_sampler_binding(), and state.
|
inline |
Definition at line 1100 of file draw_pass.hh.
References BLI_assert, GPU_shader_get_sampler_binding(), and state.
Referenced by blender::draw::overlay::Background::begin_sync(), blender::draw::overlay::Lattices::begin_sync(), blender::draw::overlay::LightProbes::begin_sync(), blender::eevee::DeferredLayer::begin_sync(), blender::eevee::PlanarProbePipeline::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_cache_get(), blender::draw::overlay::Sculpts::curves_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), blender::workbench::MeshPass::get_subpass(), blender::draw::hair_particle_cache_get(), blender::draw::overlay::Fluids::object_sync(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::CapturePipeline::sync(), blender::eevee::ForwardPipeline::sync(), blender::eevee::MotionBlurModule::sync(), blender::eevee::WorldVolumePipeline::sync(), blender::workbench::AntiAliasingPass::sync(), blender::workbench::DofPass::sync(), blender::workbench::OpaquePass::sync(), blender::workbench::OutlinePass::sync(), blender::workbench::TransparentDepthPass::sync(), blender::workbench::TransparentPass::sync(), and blender::eevee::Film::write_viewport_compositor_passes().
|
inline |
Definition at line 1191 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1185 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1244 of file draw_pass.hh.
References BLI_assert, state, and texture.
|
inline |
Definition at line 1179 of file draw_pass.hh.
References BLI_assert, state, and texture.
|
inline |
Definition at line 1209 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ubo_binding().
|
inline |
Definition at line 1093 of file draw_pass.hh.
References BLI_assert, and GPU_shader_get_ubo_binding().
Referenced by blender::draw::overlay::Background::begin_sync(), blender::draw::overlay::Facing::begin_sync(), blender::draw::overlay::Lattices::begin_sync(), blender::draw::overlay::LightProbes::begin_sync(), blender::draw::overlay::ModeTransfer::begin_sync(), blender::draw::overlay::MotionPath::begin_sync(), blender::eevee::PlanarProbePipeline::begin_sync(), blender::draw::overlay::Bounds::end_sync(), blender::draw::overlay::Cameras::end_sync(), blender::draw::overlay::Empties::end_sync(), blender::draw::overlay::Fluids::end_sync(), blender::draw::overlay::ForceFields::end_sync(), blender::draw::overlay::LightProbes::end_sync(), blender::draw::overlay::Lights::end_sync(), blender::draw::overlay::Metaballs::end_sync(), blender::draw::overlay::Origins::end_sync(), blender::draw::overlay::Relations::end_sync(), blender::draw::overlay::Speakers::end_sync(), blender::draw::select::SelectMap::select_bind(), blender::eevee::MotionBlurModule::sync(), blender::workbench::DofPass::sync(), blender::workbench::OpaquePass::sync(), blender::workbench::OutlinePass::sync(), blender::workbench::ShadowPass::sync(), and blender::workbench::VolumePass::sync().
|
inline |
Definition at line 1237 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 1172 of file draw_pass.hh.
References BLI_assert.
|
inlineprotected |
Definition at line 584 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::clear().
Referenced by blender::draw::overlay::Armatures::begin_sync(), and blender::draw::detail::PassBase< DrawCommandBufType >::clear().
|
inline |
Clear the current frame-buffer.
Definition at line 911 of file draw_pass.hh.
References clear(), and GPU_COLOR_BIT.
Referenced by blender::draw::overlay::Background::begin_sync(), blender::workbench::StencilViewWorkaround::extract(), blender::workbench::AntiAliasingPass::sync(), and blender::workbench::TransparentPass::sync().
|
inline |
Definition at line 932 of file draw_pass.hh.
References clear(), GPU_COLOR_BIT, GPU_DEPTH_BIT, and GPU_STENCIL_BIT.
|
inline |
Definition at line 916 of file draw_pass.hh.
References clear(), and GPU_DEPTH_BIT.
|
inline |
Definition at line 926 of file draw_pass.hh.
References clear(), GPU_DEPTH_BIT, and GPU_STENCIL_BIT.
|
inline |
Clear each color attachment with different values. Span needs to be appropriately sized. IMPORTANT: The source is dereference on pass submission.
Definition at line 592 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::clear_multi().
Referenced by blender::draw::detail::PassBase< DrawCommandBufType >::clear_multi().
|
inline |
Definition at line 921 of file draw_pass.hh.
References clear(), and GPU_STENCIL_BIT.
Referenced by blender::eevee::VolumeLayer::sync().
|
inlineprotected |
Return a new command recorded with the given type.
Definition at line 576 of file draw_pass.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index().
|
inline |
Record a compute dispatch call.
Definition at line 874 of file draw_pass.hh.
References BLI_assert.
Referenced by blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_cache_get(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::draw::hair_particle_cache_get(), blender::eevee::Precompute::Precompute(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::Film::sync(), blender::eevee::IrradianceBake::sync(), blender::eevee::MotionBlurModule::sync(), and blender::eevee::Film::write_viewport_compositor_passes().
|
inline |
Definition at line 880 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 892 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 886 of file draw_pass.hh.
References BLI_assert.
|
inline |
Definition at line 899 of file draw_pass.hh.
References BLI_assert.
|
inline |
Shorter version for the common case.
Definition at line 787 of file draw_pass.hh.
References batch.
|
inline |
Record a draw call.
Definition at line 760 of file draw_pass.hh.
References batch, BLI_assert, GPU_PRIM_NONE, and GPU_shader_uses_ssbo_vertex_fetch().
Referenced by blender::draw::overlay::Background::begin_sync(), blender::draw::overlay::Sculpts::curves_sync(), blender::draw::overlay::Curves::edit_object_sync(), blender::draw::overlay::GreasePencil::edit_object_sync(), blender::draw::overlay::Lattices::edit_object_sync(), blender::draw::overlay::Meshes::edit_object_sync(), blender::draw::overlay::MeshUVs::edit_object_sync(), blender::draw::overlay::Particles::edit_object_sync(), blender::draw::overlay::Curves::edit_object_sync_legacy(), blender::eevee::geometry_call(), blender::draw::overlay::Sculpts::mesh_sync(), blender::draw::overlay::Facing::object_sync(), blender::draw::overlay::Lattices::object_sync(), blender::draw::overlay::ModeTransfer::object_sync(), blender::draw::overlay::Outline::object_sync(), blender::draw::overlay::Paints::object_sync(), blender::draw::overlay::Particles::object_sync(), blender::draw::overlay::Wireframe::object_sync(), blender::draw::overlay::Prepass::particle_sync(), blender::draw::overlay::Prepass::sculpt_sync(), blender::eevee::SyncModule::sync_curves(), blender::eevee::ShadowModule::sync_object(), blender::eevee::SyncModule::sync_point_cloud(), blender::eevee::SyncModule::sync_volume(), and blender::eevee::volume_call().
|
inline |
Shorter version for the common case.
Definition at line 822 of file draw_pass.hh.
References batch.
|
inline |
Record a regular draw call but replaces each original primitive by a set of the given primitive. Geometry attributes are still sourced from a gpu::Batch, however, the attributes indexing needs to be done manually inside the shader.
Definition at line 793 of file draw_pass.hh.
References batch, BLI_assert, and GPU_shader_uses_ssbo_vertex_fetch().
Referenced by blender::draw::overlay::Curves::edit_object_sync(), blender::draw::overlay::Meshes::edit_object_sync(), blender::draw::overlay::MeshUVs::edit_object_sync(), blender::draw::overlay::Curves::edit_object_sync_legacy(), blender::draw::overlay::Outline::object_sync(), blender::draw::overlay::Particles::object_sync(), and blender::workbench::ShadowPass::object_sync().
|
inline |
Indirect variants.
Definition at line 851 of file draw_pass.hh.
References batch, and BLI_assert.
|
inline |
Record a procedural draw call. Geometry is NOT source from a gpu::Batch.
Definition at line 833 of file draw_pass.hh.
Referenced by blender::draw::overlay::Background::begin_sync(), blender::eevee::ShadowModule::debug_end_sync(), blender::draw::overlay::Origins::end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::workbench::StencilViewWorkaround::extract(), blender::draw::overlay::Fluids::object_sync(), blender::draw::overlay::GreasePencil::object_sync(), blender::draw::overlay::LightProbes::object_sync(), blender::eevee::VolumeLayer::render(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::Film::sync(), blender::eevee::HiZBuffer::sync(), blender::eevee::WorldVolumePipeline::sync(), blender::workbench::AntiAliasingPass::sync(), blender::workbench::DofPass::sync(), blender::workbench::OpaquePass::sync(), blender::workbench::OutlinePass::sync(), blender::workbench::TransparentDepthPass::sync(), blender::workbench::TransparentPass::sync(), blender::draw::test_draw_pass_simple_draw(), and blender::eevee::PlanarProbeModule::viewport_draw().
|
inline |
Definition at line 860 of file draw_pass.hh.
|
inline |
Bind a framebuffer. This is equivalent to a deferred GPU_framebuffer_bind() call.
Definition at line 977 of file draw_pass.hh.
Referenced by blender::draw::overlay::Background::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::CapturePipeline::sync(), and blender::eevee::PlanarProbeModule::viewport_draw().
| void blender::draw::detail::PassBase< DrawCommandBufType >::init | ( | ) |
Reset the pass command pool.
|
inline |
Bind a material shader along with its associated resources. Any following bind() or push_constant() call will use its interface. IMPORTANT: Assumes material is compiled and can be used (no compilation error).
Definition at line 1001 of file draw_pass.hh.
References blender::draw::Manager::acquire_texture(), BKE_image_get_gpu_material_texture(), GPU_material_get_pass(), GPU_material_textures(), GPU_material_uniform_buffer_get(), GPU_NODE_TREE_UBO_SLOT, GPU_pass_shader_get(), Tex::ima, Tex::iuser, tex, ImageGPUTextures::texture, and ImageGPUTextures::tile_mapping.
Referenced by blender::eevee::VolumeLayer::material_add(), blender::eevee::VolumeLayer::occupancy_add(), blender::eevee::BackgroundPipeline::sync(), and blender::eevee::WorldVolumePipeline::sync().
|
inlineprotected |
Definition at line 598 of file draw_pass.hh.
References BLI_assert_unreachable, drw_cache_procedural_lines_get(), drw_cache_procedural_points_get(), drw_cache_procedural_triangle_strips_get(), drw_cache_procedural_triangles_get(), GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRI_STRIP, and GPU_PRIM_TRIS.
|
inline |
Definition at line 1302 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Update a shader constant.
Reference versions are to be used when the resource might change between the time it is referenced and the time it is dereferenced for drawing.
IMPORTANT: Will keep a reference to the data and dereference it upon drawing. Make sure data still alive until pass submission.
Definition at line 1262 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
Referenced by blender::draw::overlay::Background::begin_sync(), blender::draw::overlay::Fade::begin_sync(), blender::draw::overlay::LightProbes::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_cache_get(), blender::draw::overlay::Sculpts::curves_sync(), blender::eevee::ShadowModule::debug_end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::workbench::MeshPass::get_subpass(), blender::draw::hair_particle_cache_get(), blender::draw::overlay::Fluids::object_sync(), blender::draw::overlay::GreasePencil::object_sync(), blender::draw::overlay::LightProbes::object_sync(), blender::draw::overlay::ModeTransfer::object_sync(), blender::draw::overlay::Paints::object_sync(), blender::draw::overlay::Particles::object_sync(), blender::eevee::Precompute::Precompute(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::eevee::CapturePipeline::surface_material_add(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::Film::sync(), blender::eevee::IrradianceBake::sync(), blender::workbench::AntiAliasingPass::sync(), blender::workbench::DofPass::sync(), blender::workbench::OpaquePass::sync(), blender::draw::test_draw_pass_sub_ordering(), blender::eevee::PlanarProbeModule::viewport_draw(), and blender::eevee::Film::write_viewport_compositor_passes().
|
inline |
Definition at line 1308 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1267 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1314 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1272 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1320 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1277 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1326 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1360 of file draw_pass.hh.
References blender::draw::command::PushConstant::array_len, blender::draw::command::PushConstant::comp_len, blender::draw::command::PushConstant::float4_value, blender::draw::command::PushConstant::location, blender::draw::command::Undetermined::push_constant, and blender::draw::command::PushConstant::type.
|
inline |
Definition at line 1355 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1282 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1332 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1287 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1338 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1292 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1344 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1297 of file draw_pass.hh.
References blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inline |
Definition at line 1350 of file draw_pass.hh.
References data, and blender::draw::detail::PassBase< DrawCommandBufType >::push_constant().
|
inlineprotected |
| std::string blender::draw::detail::PassBase< T >::serialize | ( | std::string | line_prefix = "" | ) | const |
Turn the pass into a string for inspection.
Definition at line 690 of file draw_pass.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear().
|
inline |
Bind a shader. Any following bind() or push_constant() call will use its interface.
Definition at line 971 of file draw_pass.hh.
Referenced by blender::draw::overlay::Armatures::begin_sync(), blender::draw::overlay::AttributeViewer::begin_sync(), blender::draw::overlay::Background::begin_sync(), blender::draw::overlay::Facing::begin_sync(), blender::draw::overlay::Fade::begin_sync(), blender::draw::overlay::Fluids::begin_sync(), blender::draw::overlay::GreasePencil::begin_sync(), blender::draw::overlay::Grid::begin_sync(), blender::draw::overlay::Lattices::begin_sync(), blender::draw::overlay::LightProbes::begin_sync(), blender::draw::overlay::ModeTransfer::begin_sync(), blender::draw::overlay::MotionPath::begin_sync(), blender::draw::overlay::Outline::begin_sync(), blender::draw::overlay::Particles::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), blender::draw::overlay::Sculpts::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_cache_get(), blender::eevee::ShadowModule::debug_end_sync(), blender::draw::overlay::Bounds::end_sync(), blender::draw::overlay::Cameras::end_sync(), blender::draw::overlay::Empties::end_sync(), blender::draw::overlay::Fluids::end_sync(), blender::draw::overlay::ForceFields::end_sync(), blender::draw::overlay::LightProbes::end_sync(), blender::draw::overlay::Lights::end_sync(), blender::draw::overlay::Metaballs::end_sync(), blender::draw::overlay::Origins::end_sync(), blender::draw::overlay::Relations::end_sync(), blender::draw::overlay::Speakers::end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::workbench::StencilViewWorkaround::extract(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::draw::hair_particle_cache_get(), blender::workbench::VolumePass::object_sync_modifier(), blender::workbench::VolumePass::object_sync_volume(), blender::eevee::Precompute::Precompute(), blender::eevee::VolumeLayer::render(), blender::eevee::CapturePipeline::surface_material_add(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::Film::sync(), blender::eevee::HiZBuffer::sync(), blender::eevee::IrradianceBake::sync(), blender::eevee::MotionBlurModule::sync(), blender::eevee::ShadowPipeline::sync(), blender::workbench::AntiAliasingPass::sync(), blender::workbench::DofPass::sync(), blender::workbench::OpaquePass::sync(), blender::workbench::OutlinePass::sync(), blender::workbench::ShadowPass::sync(), blender::workbench::TransparentDepthPass::sync(), blender::workbench::TransparentPass::sync(), blender::eevee::PlanarProbeModule::viewport_draw(), and blender::eevee::Film::write_viewport_compositor_passes().
|
inline |
Definition at line 1413 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Definition at line 1449 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Update a shader specialization constant.
IMPORTANT: Non-specialized constants can have undefined values. Specialize every constant before binding a shader.
Reference versions are to be used when the resource might change between the time it is referenced and the time it is dereferenced for drawing.
IMPORTANT: Will keep a reference to the data and dereference it upon drawing. Make sure data still alive until pass submission.
Definition at line 1404 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
Referenced by blender::eevee::DeferredLayer::end_sync(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant(), and blender::eevee::AmbientOcclusion::sync().
|
inline |
Definition at line 1440 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Definition at line 1386 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Definition at line 1422 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Definition at line 1395 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Definition at line 1431 of file draw_pass.hh.
References GPU_shader_get_constant(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
|
inline |
Changes the fixed function pipeline state. Starts as DRW_STATE_NO_DRAW at the start of a Pass submission. SubPass inherit previous pass state.
IMPORTANT: This does not set the stencil mask/reference values. Add a call to state_stencil() to ensure correct behavior of stencil aware draws.
TODO(fclem): clip_plane_count should be part of shader state.
Definition at line 954 of file draw_pass.hh.
References DRW_STATE_CLIP_PLANES, DRW_STATE_PROGRAM_POINT_SIZE, state, and blender::draw::detail::PassBase< DrawCommandBufType >::state_set().
Referenced by blender::draw::overlay::Armatures::begin_sync(), blender::draw::overlay::AttributeViewer::begin_sync(), blender::draw::overlay::Background::begin_sync(), blender::draw::overlay::Curves::begin_sync(), blender::draw::overlay::Empties::begin_sync(), blender::draw::overlay::Facing::begin_sync(), blender::draw::overlay::Fade::begin_sync(), blender::draw::overlay::Grid::begin_sync(), blender::draw::overlay::Lattices::begin_sync(), blender::draw::overlay::LightProbes::begin_sync(), blender::draw::overlay::ModeTransfer::begin_sync(), blender::draw::overlay::Paints::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), blender::draw::overlay::Sculpts::begin_sync(), blender::eevee::DeferredLayer::begin_sync(), blender::eevee::DeferredProbePipeline::begin_sync(), blender::eevee::PlanarProbePipeline::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_init(), blender::eevee::ShadowModule::debug_end_sync(), blender::draw::overlay::Bounds::end_sync(), blender::draw::overlay::Cameras::end_sync(), blender::draw::overlay::EditText::end_sync(), blender::draw::overlay::Empties::end_sync(), blender::draw::overlay::ForceFields::end_sync(), blender::draw::overlay::LightProbes::end_sync(), blender::draw::overlay::Lights::end_sync(), blender::draw::overlay::Metaballs::end_sync(), blender::draw::overlay::Origins::end_sync(), blender::draw::overlay::Relations::end_sync(), blender::draw::overlay::Speakers::end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::workbench::StencilViewWorkaround::extract(), blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), blender::eevee::VelocityModule::geometry_steps_fill(), blender::draw::hair_init(), blender::eevee::ForwardPipeline::material_transparent_add(), blender::eevee::ForwardPipeline::prepass_transparent_add(), blender::draw::select::SelectMap::select_bind(), blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), blender::eevee::BackgroundPipeline::sync(), blender::eevee::CapturePipeline::sync(), blender::eevee::Film::sync(), blender::eevee::ForwardPipeline::sync(), blender::eevee::HiZBuffer::sync(), blender::eevee::ShadowPipeline::sync(), blender::eevee::VolumeLayer::sync(), blender::eevee::WorldVolumePipeline::sync(), blender::workbench::AntiAliasingPass::sync(), blender::workbench::DofPass::sync(), blender::workbench::OpaquePass::sync(), blender::workbench::OutlinePass::sync(), blender::workbench::ShadowPass::sync(), blender::workbench::TransparentDepthPass::sync(), blender::workbench::TransparentPass::sync(), and blender::eevee::PlanarProbeModule::viewport_draw().
|
inline |
Reminders:
compare_mask & reference is what is tested against compare_mask & stencil_value stencil_value being the value stored in the stencil buffer.write-mask & reference is what gets written if the test condition is fulfilled.This will modify the stencil state until another call to this function. If not specified before any draw-call, these states will be undefined.
For more information see: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkStencilOpState.html
Definition at line 966 of file draw_pass.hh.
Referenced by blender::eevee::ShadowModule::begin_sync(), blender::eevee::DeferredLayer::end_sync(), blender::workbench::StencilViewWorkaround::extract(), blender::eevee::DeferredLayer::material_add(), blender::workbench::AntiAliasingPass::sync(), blender::workbench::OpaquePass::sync(), blender::workbench::ShadowPass::sync(), blender::workbench::TransparentDepthPass::sync(), and blender::workbench::TransparentPass::sync().
|
inline |
Create a sub-pass inside this pass.
Definition at line 616 of file draw_pass.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and blender::draw::detail::SubPassVector< T, block_size >::append_and_get_index().
Referenced by blender::draw::overlay::Armatures::begin_sync(), blender::draw::overlay::AttributeViewer::begin_sync(), blender::draw::overlay::Curves::begin_sync(), blender::draw::overlay::Empties::begin_sync(), blender::draw::overlay::Fade::begin_sync(), blender::draw::overlay::Fluids::begin_sync(), blender::draw::overlay::GreasePencil::begin_sync(), blender::draw::overlay::Grid::begin_sync(), blender::draw::overlay::Lattices::begin_sync(), blender::draw::overlay::MotionPath::begin_sync(), blender::draw::overlay::Outline::begin_sync(), blender::draw::overlay::Paints::begin_sync(), blender::draw::overlay::Particles::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), blender::draw::overlay::Sculpts::begin_sync(), blender::eevee::DeferredLayer::begin_sync(), blender::eevee::DeferredProbePipeline::begin_sync(), blender::eevee::PlanarProbePipeline::begin_sync(), blender::eevee::ShadowModule::begin_sync(), blender::draw::curves_cache_get(), blender::draw::overlay::Cameras::end_sync(), blender::draw::overlay::EditText::end_sync(), blender::draw::overlay::LightProbes::end_sync(), blender::draw::overlay::Lights::end_sync(), blender::draw::overlay::Relations::end_sync(), blender::eevee::DeferredLayer::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), blender::workbench::MeshPass::get_subpass(), blender::draw::hair_particle_cache_get(), blender::eevee::DeferredLayer::material_add(), blender::eevee::VolumeLayer::material_add(), blender::workbench::VolumePass::object_sync_modifier(), blender::workbench::VolumePass::object_sync_volume(), blender::eevee::VolumeLayer::occupancy_add(), blender::eevee::DeferredProbePipeline::prepass_add(), blender::eevee::PlanarProbePipeline::prepass_add(), blender::eevee::CapturePipeline::surface_material_add(), blender::eevee::ShadowPipeline::surface_material_add(), blender::eevee::ForwardPipeline::sync(), blender::eevee::IrradianceBake::sync(), blender::eevee::MotionBlurModule::sync(), blender::eevee::ShadowPipeline::sync(), blender::eevee::VolumeLayer::sync(), blender::workbench::ShadowPass::sync(), blender::eevee::SyncModule::sync_curves(), blender::eevee::SyncModule::sync_point_cloud(), blender::draw::test_draw_pass_simple_draw(), and blender::draw::test_draw_pass_sub_ordering().
|
protected |
Definition at line 624 of file draw_pass.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), GPU_debug_group_begin(), GPU_debug_group_end(), and state.
|
inline |
Start a new sub-pass and change framebuffer attachments status.
Definition at line 983 of file draw_pass.hh.
References GPU_ATTACHMENT_IGNORE, and blender::Span< T >::index_range().
Referenced by blender::eevee::DeferredLayer::end_sync(), blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), and blender::eevee::ShadowPipeline::sync().
|
friend |
Definition at line 436 of file draw_pass.hh.
|
protected |
Commands referenced by headers (which contains their types).
Definition at line 134 of file draw_pass.hh.
| const char* blender::draw::detail::PassBase< DrawCommandBufType >::debug_name |
Definition at line 143 of file draw_pass.hh.
|
protected |
Definition at line 136 of file draw_pass.hh.
|
protected |
Highest level of the command stream. Split command stream in different command types.
Definition at line 132 of file draw_pass.hh.
|
protected |
Currently bound shader. Used for interface queries.
Definition at line 140 of file draw_pass.hh.
|
protected |
Definition at line 138 of file draw_pass.hh.
| bool blender::draw::detail::PassBase< DrawCommandBufType >::use_custom_ids |
Definition at line 145 of file draw_pass.hh.