|
Blender V4.3
|
Describe inputs & outputs, stage interfaces, resources and sources of a shader. If all data is correctly provided, this is all that is needed to create and compile a GPUShader. More...
#include <gpu_shader_create_info.hh>
Inherited by GPUCodegenCreateInfo.
Classes | |
| struct | ComputeStageLayout |
| struct | FragOut |
| struct | GeometryStageLayout |
| struct | Image |
| struct | PushConst |
| struct | Resource |
| struct | Sampler |
| struct | StorageBuf |
| struct | UniformBuf |
| struct | VertIn |
Public Types | |
| using | SubpassIn = FragOut |
| using | Self = ShaderCreateInfo |
Public Member Functions | |
| Vector< Resource > & | resources_get_ (Frequency freq) |
| Vector< Resource > | resources_get_all_ () const |
| ShaderCreateInfo (const char *name) | |
| ~ShaderCreateInfo () | |
Shaders in/outs (fixed function pipeline config) | |
| Self & | vertex_in (int slot, Type type, StringRefNull name) |
| Self & | vertex_out (StageInterfaceInfo &interface) |
| Self & | geometry_layout (PrimitiveIn prim_in, PrimitiveOut prim_out, int max_vertices, int invocations=-1) |
| Self & | local_group_size (int local_size_x=-1, int local_size_y=-1, int local_size_z=-1) |
| Self & | early_fragment_test (bool enable) |
| Self & | geometry_out (StageInterfaceInfo &interface) |
| Self & | fragment_out (int slot, Type type, StringRefNull name, DualBlend blend=DualBlend::NONE, int raster_order_group=-1) |
| Self & | subpass_in (int slot, Type type, StringRefNull name, int raster_order_group=-1) |
Shader specialization constants | |
| Self & | specialization_constant (Type type, StringRefNull name, double default_value) |
Resources bindings points | |
| Self & | uniform_buf (int slot, StringRefNull type_name, StringRefNull name, Frequency freq=Frequency::PASS) |
| Self & | storage_buf (int slot, Qualifier qualifiers, StringRefNull type_name, StringRefNull name, Frequency freq=Frequency::PASS) |
| Self & | image (int slot, eGPUTextureFormat format, Qualifier qualifiers, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS) |
| Self & | sampler (int slot, ImageType type, StringRefNull name, Frequency freq=Frequency::PASS, GPUSamplerState sampler=GPUSamplerState::internal_sampler()) |
Shader Source | |
| Self & | vertex_source (StringRefNull filename) |
| Self & | geometry_source (StringRefNull filename) |
| Self & | fragment_source (StringRefNull filename) |
| Self & | compute_source (StringRefNull filename) |
Push constants | |
Data managed by GPUShader. Can be set through uniform functions. Must be less than 128bytes. | |
| Self & | push_constant (Type type, StringRefNull name, int array_size=0) |
Defines | |
| Self & | define (StringRefNull name, StringRefNull value="") |
| Self & | do_static_compilation (bool value) |
| Self & | builtins (BuiltinBits builtin) |
| Self & | depth_write (DepthWrite value) |
| Self & | auto_resource_location (bool value) |
| Self & | legacy_resource_location (bool value) |
| Self & | metal_backend_only (bool flag) |
Additional Create Info | |
Used to share parts of the infos that are common to many shaders. | |
| Self & | additional_info (StringRefNull info_name) |
| template<typename... Args> | |
| Self & | additional_info (StringRefNull info_name, Args... args) |
Typedef Sources | |
Some resource declarations might need some special structure defined. Adding a file using typedef_source will include it before the resource and interface definitions. | |
| Self & | typedef_source (StringRefNull filename) |
Transform feedback properties | |
Transform feedback enablement and output binding assignment. | |
| Self & | transform_feedback_mode (eGPUShaderTFBType tf_mode) |
| Self & | transform_feedback_output_name (const char *name) |
API-Specific Parameters | |
Optional parameters exposed by specific back-ends to enable additional features and performance tuning. NOTE: These functions can be exposed as a pass-through on unsupported configurations. | |
| Self & | mtl_max_total_threads_per_threadgroup (ushort max_total_threads_per_threadgroup) |
Recursive evaluation. | |
Flatten all dependency so that this descriptor contains all the data from the additional descriptors. This avoids tedious traversal in shader source creation. | |
| void | finalize (const bool recursive=false) |
| std::string | check_error () const |
| bool | is_vulkan_compatible () const |
| void | validate_merge (const ShaderCreateInfo &other_info) |
| void | validate_vertex_attributes (const ShaderCreateInfo *other_info=nullptr) |
Operators. | |
| bool | operator== (const ShaderCreateInfo &b) const |
| bool | has_resource_type (Resource::BindType bind_type) const |
| bool | has_resource_image () const |
| std::ostream & | operator<< (std::ostream &stream, const ShaderCreateInfo &info) |
Describe inputs & outputs, stage interfaces, resources and sources of a shader. If all data is correctly provided, this is all that is needed to create and compile a GPUShader.
IMPORTANT: All strings are references only. Make sure all the strings used by a ShaderCreateInfo are not freed until it is consumed or deleted.
Definition at line 362 of file gpu_shader_create_info.hh.
Definition at line 629 of file gpu_shader_create_info.hh.
Definition at line 475 of file gpu_shader_create_info.hh.
|
inline |
Definition at line 626 of file gpu_shader_create_info.hh.
|
inline |
Definition at line 627 of file gpu_shader_create_info.hh.
|
inline |
Definition at line 958 of file gpu_shader_create_info.hh.
References additional_infos_.
Referenced by additional_info(), GPUCodegen::generate_resources(), blender::gpu::tests::gpu_shader_lib_test(), blender::eevee::ShaderModule::material_create_info_amend(), blender::draw::overlay::shader_patch_common(), blender::draw::overlay::shader_patch_edit_mesh_normal_common(), and blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Definition at line 964 of file gpu_shader_create_info.hh.
References additional_info().
|
inline |
Definition at line 932 of file gpu_shader_create_info.hh.
References auto_resource_location_.
|
inline |
Definition at line 919 of file gpu_shader_create_info.hh.
References builtins_.
Referenced by blender::eevee::ShaderModule::material_create_info_amend(), and blender::gpu::tests::test_framebuffer_multi_viewport().
| std::string blender::gpu::shader::ShaderCreateInfo::check_error | ( | ) | const |
Definition at line 243 of file gpu_shader_create_info.cc.
References blender::gpu::shader::BARYCENTRIC_COORD, builtins_, compute_source_, error(), fragment_source_, G, G_DEBUG_GPU, geometry_source_, GPU_SHADER_TFB_NONE, blender::StringRefBase::is_empty(), is_vulkan_compatible(), blender::gpu::shader::LAYER, name_, specialization_constants_, tf_type_, vertex_out_interfaces_, vertex_source_, and blender::gpu::shader::VIEWPORT_INDEX.
Referenced by blender::gpu::ShaderCompiler::compile(), and GPU_shader_create_info_check_error().
|
inline |
Definition at line 869 of file gpu_shader_create_info.hh.
References compute_source_.
Referenced by pygpu_shader_info_compute_source().
|
inline |
Definition at line 901 of file gpu_shader_create_info.hh.
References defines_.
Referenced by createGPUShader(), blender::eevee::ShaderModule::material_create_info_amend(), pygpu_shader_info_define(), blender::draw::overlay::ShaderModule::ShaderModule(), and blender::gpu::tests::test_framebuffer_subpass_input().
|
inline |
Definition at line 926 of file gpu_shader_create_info.hh.
References depth_write_.
|
inline |
Definition at line 913 of file gpu_shader_create_info.hh.
References do_static_compilation_.
|
inline |
Force fragment tests before fragment shader invocation. IMPORTANT: This is incompatible with using the gl_FragDepth output.
Definition at line 672 of file gpu_shader_create_info.hh.
References early_fragment_test_.
| void blender::gpu::shader::ShaderCreateInfo::finalize | ( | const bool | recursive = false | ) |
Definition at line 99 of file gpu_shader_create_info.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), additional_infos_, auto_resource_location_, batch_resources_, BLI_assert, builtins_, compute_layout_, compute_source_, defines_, depth_write_, early_fragment_test_, error(), finalize(), finalized_, fragment_outputs_, fragment_source_, geometry_layout_, geometry_out_interfaces_, geometry_resources_, geometry_source_, gpu_shader_create_info_get(), blender::gpu::shader::ShaderCreateInfo::Resource::IMAGE, interface_names_size_, blender::StringRefBase::is_empty(), blender::gpu::shader::LAYER, blender::gpu::shader::ShaderCreateInfo::ComputeStageLayout::local_size_x, name_, pass_resources_, push_constants_, blender::gpu::shader::ShaderCreateInfo::Resource::SAMPLER, specialization_constants_, blender::gpu::shader::ShaderCreateInfo::Resource::STORAGE_BUFFER, subpass_inputs_, typedef_sources_, blender::gpu::shader::UNCHANGED, blender::gpu::shader::ShaderCreateInfo::Resource::UNIFORM_BUFFER, validate_merge(), validate_vertex_attributes(), vertex_inputs_, vertex_out_interfaces_, and vertex_source_.
Referenced by blender::realtime_compositor::CachedShader::CachedShader(), finalize(), and GPU_generate_pass().
|
inline |
Definition at line 690 of file gpu_shader_create_info.hh.
References blend, and fragment_outputs_.
Referenced by createGPUShader(), pygpu_shader_info_fragment_out(), blender::gpu::tests::test_framebuffer_multi_viewport(), and blender::gpu::tests::test_framebuffer_subpass_input().
|
inline |
Definition at line 863 of file gpu_shader_create_info.hh.
References fragment_source_.
Referenced by createGPUShader(), blender::gpu::tests::gpu_shader_lib_test(), pygpu_shader_info_fragment_source(), blender::gpu::tests::test_framebuffer_multi_viewport(), and blender::gpu::tests::test_framebuffer_subpass_input().
|
inline |
Definition at line 648 of file gpu_shader_create_info.hh.
References geometry_layout_, blender::gpu::shader::ShaderCreateInfo::GeometryStageLayout::invocations, blender::gpu::shader::ShaderCreateInfo::GeometryStageLayout::max_vertices, blender::gpu::shader::ShaderCreateInfo::GeometryStageLayout::primitive_in, and blender::gpu::shader::ShaderCreateInfo::GeometryStageLayout::primitive_out.
|
inline |
Only needed if geometry shader is enabled. IMPORTANT: Input and output instance name will have respectively "_in" and "_out" suffix appended in the geometry shader IF AND ONLY IF the vertex_out interface instance name matches the geometry_out interface instance name.
Definition at line 684 of file gpu_shader_create_info.hh.
References geometry_out_interfaces_.
|
inline |
Definition at line 857 of file gpu_shader_create_info.hh.
References geometry_source_.
|
inline |
Definition at line 1146 of file gpu_shader_create_info.hh.
References has_resource_type(), and blender::gpu::shader::ShaderCreateInfo::Resource::IMAGE.
|
inline |
Definition at line 1126 of file gpu_shader_create_info.hh.
References batch_resources_, geometry_resources_, and pass_resources_.
Referenced by has_resource_image().
|
inline |
Definition at line 811 of file gpu_shader_create_info.hh.
References blender::gpu::shader::ShaderCreateInfo::Image::format, blender::gpu::shader::ShaderCreateInfo::Resource::IMAGE, blender::gpu::shader::ShaderCreateInfo::Resource::image, interface_names_size_, blender::gpu::shader::ShaderCreateInfo::Image::name, blender::gpu::shader::ShaderCreateInfo::Image::qualifiers, resources_get_(), blender::StringRefBase::size(), and blender::gpu::shader::ShaderCreateInfo::Image::type.
Referenced by pygpu_shader_info_image().
| bool blender::gpu::shader::ShaderCreateInfo::is_vulkan_compatible | ( | ) | const |
Definition at line 80 of file gpu_shader_create_info.cc.
References geometry_out_interfaces_, blender::gpu::shader::is_vulkan_compatible_interface(), and vertex_out_interfaces_.
Referenced by check_error().
|
inline |
Definition at line 938 of file gpu_shader_create_info.hh.
References legacy_resource_location_.
|
inline |
Definition at line 660 of file gpu_shader_create_info.hh.
References compute_layout_, blender::gpu::shader::ShaderCreateInfo::ComputeStageLayout::local_size_x, blender::gpu::shader::ShaderCreateInfo::ComputeStageLayout::local_size_y, and blender::gpu::shader::ShaderCreateInfo::ComputeStageLayout::local_size_z.
Referenced by pygpu_shader_info_local_group_size().
|
inline |
Definition at line 944 of file gpu_shader_create_info.hh.
References flag, and metal_backend_only_.
|
inline |
Definition at line 1021 of file gpu_shader_create_info.hh.
References UNUSED_VARS.
|
inline |
Definition at line 1061 of file gpu_shader_create_info.hh.
References additional_infos_, b, batch_resources_, builtins_, compute_layout_, compute_source_, compute_source_generated, defines_, fragment_outputs_, fragment_source_, fragment_source_generated, geometry_layout_, geometry_out_interfaces_, geometry_resources_, geometry_source_, pass_resources_, push_constants_, subpass_inputs_, TEST_EQUAL, TEST_VECTOR_EQUAL, typedef_source_generated, typedef_sources_, vertex_inputs_, vertex_out_interfaces_, vertex_source_, and vertex_source_generated.
|
inline |
Definition at line 883 of file gpu_shader_create_info.hh.
References BLI_assert, BLI_assert_msg, interface_names_size_, push_constants_, and blender::gpu::shader::UINT.
Referenced by createGPUShader(), pygpu_shader_info_push_constant(), and blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Definition at line 561 of file gpu_shader_create_info.hh.
References blender::gpu::shader::BATCH, batch_resources_, BLI_assert_unreachable, blender::gpu::shader::GEOMETRY, geometry_resources_, blender::gpu::shader::PASS, and pass_resources_.
Referenced by image(), sampler(), storage_buf(), and uniform_buf().
Definition at line 576 of file gpu_shader_create_info.hh.
References batch_resources_, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), geometry_resources_, and pass_resources_.
Referenced by blender::gpu::GLShaderInterface::GLShaderInterface(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), and validate_merge().
|
inline |
Definition at line 828 of file gpu_shader_create_info.hh.
References interface_names_size_, blender::gpu::shader::ShaderCreateInfo::Sampler::name, resources_get_(), blender::gpu::shader::ShaderCreateInfo::Resource::SAMPLER, blender::gpu::shader::ShaderCreateInfo::Resource::sampler, sampler(), blender::gpu::shader::ShaderCreateInfo::Sampler::type, and UNUSED_VARS.
Referenced by createGPUShader(), GPUCodegen::generate_resources(), blender::eevee::ShaderModule::material_create_info_amend(), pygpu_shader_info_sampler(), sampler(), and blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Definition at line 748 of file gpu_shader_create_info.hh.
References BLI_assert_msg, blender::gpu::shader::BOOL, blender::gpu::shader::SpecializationConstant::Value::f, blender::gpu::shader::FLOAT, blender::gpu::shader::SpecializationConstant::Value::i, blender::gpu::shader::INT, interface_names_size_, blender::gpu::shader::SpecializationConstant::name, specialization_constants_, blender::gpu::shader::SpecializationConstant::type, blender::gpu::shader::SpecializationConstant::Value::u, blender::gpu::shader::UINT, and blender::gpu::shader::SpecializationConstant::value.
Referenced by blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Definition at line 796 of file gpu_shader_create_info.hh.
References interface_names_size_, blender::gpu::shader::ShaderCreateInfo::StorageBuf::name, blender::gpu::shader::ShaderCreateInfo::StorageBuf::qualifiers, resources_get_(), blender::StringRefBase::size(), blender::gpu::shader::ShaderCreateInfo::Resource::STORAGE_BUFFER, blender::gpu::shader::ShaderCreateInfo::Resource::storagebuf, and blender::gpu::shader::ShaderCreateInfo::StorageBuf::type_name.
Referenced by blender::draw::overlay::shader_patch_edit_mesh_normal_common(), and blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Allows to fetch frame-buffer values from previous render sub-pass.
On Apple Silicon, the additional raster_order_group is there to set the sub-pass dependencies. Any sub-pass input need to have the same raster_order_group defined in the shader writing them.
IMPORTANT: Currently emulated on all backend except Metal. This is only for debugging purpose as it is too slow to be viable.
TODO(fclem): Vulkan can implement that using subpassInput. However sub-pass boundaries might be difficult to inject implicitly and will require more high level changes. TODO(fclem): OpenGL can emulate that using GL_EXT_shader_framebuffer_fetch.
Definition at line 714 of file gpu_shader_create_info.hh.
References blender::gpu::shader::NONE, and subpass_inputs_.
Referenced by blender::gpu::tests::test_framebuffer_subpass_input().
|
inline |
Definition at line 995 of file gpu_shader_create_info.hh.
References BLI_assert, GPU_SHADER_TFB_NONE, and tf_type_.
|
inline |
Definition at line 1002 of file gpu_shader_create_info.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, GPU_SHADER_TFB_NONE, tf_names_, and tf_type_.
|
inline |
Definition at line 981 of file gpu_shader_create_info.hh.
References typedef_sources_.
Referenced by createGPUShader(), pygpu_shader_info_typedef_source(), and blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Definition at line 783 of file gpu_shader_create_info.hh.
References interface_names_size_, blender::gpu::shader::ShaderCreateInfo::UniformBuf::name, resources_get_(), blender::StringRefBase::size(), blender::gpu::shader::ShaderCreateInfo::UniformBuf::type_name, blender::gpu::shader::ShaderCreateInfo::Resource::UNIFORM_BUFFER, and blender::gpu::shader::ShaderCreateInfo::Resource::uniformbuf.
Referenced by createGPUShader(), GPUCodegen::generate_resources(), and pygpu_shader_info_uniform_buf().
| void blender::gpu::shader::ShaderCreateInfo::validate_merge | ( | const ShaderCreateInfo & | other_info | ) |
Error detection that some backend compilers do not complain about.
Definition at line 328 of file gpu_shader_create_info.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), auto_resource_location_, batch_resources_, blender::gpu::shader::ShaderCreateInfo::Resource::bind_type, geometry_resources_, blender::gpu::shader::ShaderCreateInfo::Resource::IMAGE, blender::gpu::shader::ShaderCreateInfo::Resource::image, blender::gpu::shader::ShaderCreateInfo::Image::name, blender::gpu::shader::ShaderCreateInfo::Sampler::name, blender::gpu::shader::ShaderCreateInfo::StorageBuf::name, blender::gpu::shader::ShaderCreateInfo::UniformBuf::name, name_, pass_resources_, resources_get_all_(), blender::gpu::shader::ShaderCreateInfo::Resource::SAMPLER, blender::gpu::shader::ShaderCreateInfo::Resource::sampler, blender::gpu::shader::ShaderCreateInfo::Resource::slot, blender::gpu::shader::ShaderCreateInfo::Resource::STORAGE_BUFFER, blender::gpu::shader::ShaderCreateInfo::Resource::storagebuf, blender::gpu::shader::ShaderCreateInfo::Resource::UNIFORM_BUFFER, and blender::gpu::shader::ShaderCreateInfo::Resource::uniformbuf.
Referenced by finalize().
| void blender::gpu::shader::ShaderCreateInfo::validate_vertex_attributes | ( | const ShaderCreateInfo * | other_info = nullptr | ) |
Definition at line 401 of file gpu_shader_create_info.cc.
References BLI_assert, blender::gpu::shader::MAT4, name_, and vertex_inputs_.
Referenced by finalize().
|
inline |
Definition at line 635 of file gpu_shader_create_info.hh.
References interface_names_size_, and vertex_inputs_.
Referenced by createGPUShader(), GPUCodegen::generate_attribs(), pygpu_shader_info_vertex_in(), and blender::draw::overlay::ShaderModule::ShaderModule().
|
inline |
Definition at line 642 of file gpu_shader_create_info.hh.
References vertex_out_interfaces_.
Referenced by createGPUShader(), GPUCodegen::generate_attribs(), and pygpu_shader_info_vertex_out().
|
inline |
Definition at line 851 of file gpu_shader_create_info.hh.
References vertex_source_.
Referenced by createGPUShader(), pygpu_shader_info_vertex_source(), blender::gpu::tests::test_framebuffer_multi_viewport(), and blender::gpu::tests::test_framebuffer_subpass_input().
|
friend |
Debug print
Definition at line 1090 of file gpu_shader_create_info.hh.
| Vector<StringRefNull> blender::gpu::shader::ShaderCreateInfo::additional_infos_ |
Name of other infos to recursively merge with this one. No data slot must overlap otherwise we throw an error.
Definition at line 614 of file gpu_shader_create_info.hh.
Referenced by additional_info(), finalize(), blender::eevee::ShaderModule::material_create_info_amend(), operator==(), blender::draw::overlay::shader_patch_common(), and blender::draw::overlay::ShaderModule::ShaderModule().
| bool blender::gpu::shader::ShaderCreateInfo::auto_resource_location_ = false |
If true, all resources will have an automatic location assigned.
Definition at line 370 of file gpu_shader_create_info.hh.
Referenced by auto_resource_location(), finalize(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), blender::gpu::GLShader::resources_declare(), and validate_merge().
Definition at line 559 of file gpu_shader_create_info.hh.
Referenced by finalize(), has_resource_type(), blender::gpu::VKShaderInterface::init(), blender::eevee::ShaderModule::material_create_info_amend(), operator==(), blender::gpu::GLShader::resources_declare(), blender::gpu::MTLShader::resources_declare(), blender::gpu::VKShader::resources_declare(), resources_get_(), resources_get_all_(), and validate_merge().
| BuiltinBits blender::gpu::shader::ShaderCreateInfo::builtins_ = BuiltinBits::NONE |
Manually set builtins.
Definition at line 386 of file gpu_shader_create_info.hh.
Referenced by builtins(), check_error(), blender::gpu::MTLShader::finalize(), finalize(), blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::MSLGeneratorInterface::generate_msl_fragment_tile_input_population(), blender::gpu::VKShaderInterface::init(), operator==(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), blender::gpu::GLShader::vertex_interface_declare(), and blender::gpu::VKShader::vertex_interface_declare().
| ComputeStageLayout blender::gpu::shader::ShaderCreateInfo::compute_layout_ |
Definition at line 453 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::GLShader::compute_layout_declare(), blender::gpu::VKShader::compute_layout_declare(), finalize(), local_group_size(), and operator==().
| StringRefNull blender::gpu::shader::ShaderCreateInfo::compute_source_ |
Definition at line 607 of file gpu_shader_create_info.hh.
Referenced by check_error(), blender::gpu::ShaderCompiler::compile(), compute_source(), finalize(), blender::gpu::VKShader::init(), blender::gpu::tests::ShaderSpecializationConst::init_shader(), and operator==().
| std::string blender::gpu::shader::ShaderCreateInfo::compute_source_generated = "" |
Definition at line 390 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::ShaderCompiler::compile(), blender::gpu::VKShader::init(), operator==(), and pygpu_shader_info_compute_source().
| Vector<std::array<StringRefNull, 2> > blender::gpu::shader::ShaderCreateInfo::defines_ |
Definition at line 609 of file gpu_shader_create_info.hh.
Referenced by define(), blender::gpu::Shader::defines_declare(), finalize(), operator==(), and blender::draw::overlay::shader_patch_edit_mesh_normal_common().
| Vector<const char *, 0> blender::gpu::shader::ShaderCreateInfo::dependencies_generated |
Manually set generated dependencies.
Definition at line 394 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::ShaderCompiler::compile(), and GPUCodegen::generate_library().
| DepthWrite blender::gpu::shader::ShaderCreateInfo::depth_write_ = DepthWrite::UNCHANGED |
Allow optimization when fragment shader writes to gl_FragDepth.
Definition at line 376 of file gpu_shader_create_info.hh.
Referenced by depth_write(), finalize(), blender::gpu::GLShader::fragment_interface_declare(), and blender::gpu::VKShader::fragment_interface_declare().
| bool blender::gpu::shader::ShaderCreateInfo::do_static_compilation_ = false |
True if the shader is static and can be pre-compiled at compile time.
Definition at line 366 of file gpu_shader_create_info.hh.
Referenced by do_static_compilation(), GPU_shader_create_from_info_name(), and blender::gpu::VKShader::init().
| bool blender::gpu::shader::ShaderCreateInfo::early_fragment_test_ = false |
If true, force depth and stencil tests to always happen before fragment shader invocation.
Definition at line 372 of file gpu_shader_create_info.hh.
Referenced by early_fragment_test(), finalize(), blender::gpu::GLShader::fragment_interface_declare(), and blender::gpu::VKShader::fragment_interface_declare().
| bool blender::gpu::shader::ShaderCreateInfo::finalized_ = false |
If true, all additionally linked create info will be merged into this one.
Definition at line 368 of file gpu_shader_create_info.hh.
Referenced by finalize(), and gpu_shader_create_info_get_unfinalized_copy().
Definition at line 473 of file gpu_shader_create_info.hh.
Referenced by finalize(), blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::MTLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), fragment_out(), operator==(), and blender::gpu::MSLGeneratorInterface::prepare_from_createinfo().
| StringRefNull blender::gpu::shader::ShaderCreateInfo::fragment_source_ |
Definition at line 607 of file gpu_shader_create_info.hh.
Referenced by check_error(), blender::gpu::ShaderCompiler::compile(), finalize(), blender::gpu::VKShader::fragment_interface_declare(), fragment_source(), and operator==().
| std::string blender::gpu::shader::ShaderCreateInfo::fragment_source_generated = "" |
Definition at line 389 of file gpu_shader_create_info.hh.
Referenced by createGPUShader(), blender::eevee::ShaderModule::material_create_info_amend(), operator==(), and pygpu_shader_info_fragment_source().
| GeometryStageLayout blender::gpu::shader::ShaderCreateInfo::geometry_layout_ |
Definition at line 438 of file gpu_shader_create_info.hh.
Referenced by finalize(), blender::gpu::VKShader::geometry_interface_declare(), geometry_layout(), blender::gpu::GLShader::geometry_layout_declare(), and operator==().
| Vector<StageInterfaceInfo *> blender::gpu::shader::ShaderCreateInfo::geometry_out_interfaces_ |
Definition at line 586 of file gpu_shader_create_info.hh.
Referenced by finalize(), blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::GLShader::geometry_interface_declare(), blender::gpu::VKShader::geometry_layout_declare(), geometry_out(), is_vulkan_compatible(), and operator==().
Definition at line 559 of file gpu_shader_create_info.hh.
Referenced by finalize(), blender::gpu::GLShaderInterface::GLShaderInterface(), has_resource_type(), blender::gpu::VKShaderInterface::init(), operator==(), blender::gpu::MTLShaderInterface::prepare_common_shader_inputs(), blender::gpu::GLShader::resources_declare(), blender::gpu::MTLShader::resources_declare(), blender::gpu::VKShader::resources_declare(), resources_get_(), resources_get_all_(), and validate_merge().
| StringRefNull blender::gpu::shader::ShaderCreateInfo::geometry_source_ |
Definition at line 607 of file gpu_shader_create_info.hh.
Referenced by check_error(), blender::gpu::ShaderCompiler::compile(), finalize(), blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), geometry_source(), operator==(), and blender::gpu::VKShader::vertex_interface_declare().
| std::string blender::gpu::shader::ShaderCreateInfo::geometry_source_generated = "" |
Definition at line 391 of file gpu_shader_create_info.hh.
| size_t blender::gpu::shader::ShaderCreateInfo::interface_names_size_ = 0 |
Maximum length of all the resource names including each null terminator. Only for names used by #gpu::ShaderInterface.
Definition at line 384 of file gpu_shader_create_info.hh.
Referenced by finalize(), blender::gpu::GLShaderInterface::GLShaderInterface(), image(), blender::gpu::VKShaderInterface::init(), push_constant(), sampler(), specialization_constant(), storage_buf(), uniform_buf(), and vertex_in().
| bool blender::gpu::shader::ShaderCreateInfo::legacy_resource_location_ = false |
If true, force the use of the GL shader introspection for resource location.
Definition at line 374 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::ShaderCompiler::compile(), legacy_resource_location(), and blender::gpu::GLShader::post_finalize().
| bool blender::gpu::shader::ShaderCreateInfo::metal_backend_only_ = false |
GPU Backend compatibility flag. Temporary requirement until Metal enablement is fully complete.
Definition at line 379 of file gpu_shader_create_info.hh.
Referenced by metal_backend_only().
| StringRefNull blender::gpu::shader::ShaderCreateInfo::name_ |
Shader name for debugging.
Definition at line 364 of file gpu_shader_create_info.hh.
Referenced by check_error(), blender::gpu::ShaderCompiler::compile(), finalize(), GPU_shader_create_from_info_name(), validate_merge(), and validate_vertex_attributes().
Resources are grouped by frequency of change. Pass resources are meant to be valid for the whole pass. Batch resources can be changed in a more granular manner (per object/material). Geometry resources can be changed in a very granular manner (per draw-call). Misuse will only produce suboptimal performance.
Definition at line 559 of file gpu_shader_create_info.hh.
Referenced by blender::realtime_compositor::CachedShader::CachedShader(), finalize(), has_resource_type(), blender::gpu::VKShaderInterface::init(), operator==(), blender::gpu::GLShader::resources_declare(), blender::gpu::MTLShader::resources_declare(), blender::gpu::VKShader::resources_declare(), resources_get_(), resources_get_all_(), and validate_merge().
Definition at line 602 of file gpu_shader_create_info.hh.
Referenced by constants_calc_size(), blender::gpu::VKPushConstants::Layout::determine_storage_type(), finalize(), blender::gpu::GLShaderInterface::GLShaderInterface(), blender::gpu::VKShaderInterface::init(), blender::gpu::init_struct(), operator==(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), push_constant(), blender::gpu::GLShader::resources_declare(), blender::gpu::VKShader::resources_declare(), and blender::draw::overlay::ShaderModule::ShaderModule().
| Vector<SpecializationConstant> blender::gpu::shader::ShaderCreateInfo::specialization_constants_ |
Definition at line 478 of file gpu_shader_create_info.hh.
Referenced by check_error(), finalize(), blender::gpu::generate_specialization_constant_declarations(), blender::gpu::GLShaderInterface::GLShaderInterface(), blender::gpu::GLShader::init(), blender::gpu::VKShaderInterface::init(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), blender::gpu::VKShader::resources_declare(), specialization_constant(), and blender::gpu::Shader::specialization_constants_init().
Definition at line 476 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::MTLShader::finalize(), finalize(), blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::MTLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::VKShaderInterface::init(), operator==(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), and subpass_in().
| Vector<const char *> blender::gpu::shader::ShaderCreateInfo::tf_names_ |
Definition at line 618 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::ShaderCompiler::compile(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), and transform_feedback_output_name().
| eGPUShaderTFBType blender::gpu::shader::ShaderCreateInfo::tf_type_ = GPU_SHADER_TFB_NONE |
Definition at line 617 of file gpu_shader_create_info.hh.
Referenced by check_error(), blender::gpu::ShaderCompiler::compile(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), transform_feedback_mode(), and transform_feedback_output_name().
| std::string blender::gpu::shader::ShaderCreateInfo::typedef_source_generated = "" |
Definition at line 392 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::ShaderCompiler::compile(), createGPUShader(), GPUCodegen::generate_resources(), operator==(), and pygpu_shader_info_typedef_source().
| Vector<StringRefNull> blender::gpu::shader::ShaderCreateInfo::typedef_sources_ |
Definition at line 605 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::ShaderCompiler::compile(), finalize(), operator==(), pygpu_shader_info_typedef_source(), and typedef_source().
Definition at line 420 of file gpu_shader_create_info.hh.
Referenced by finalize(), blender::gpu::GLShaderInterface::GLShaderInterface(), blender::gpu::VKShaderInterface::init(), blender::eevee::ShaderModule::material_create_info_amend(), operator==(), blender::gpu::MSLGeneratorInterface::prepare_from_createinfo(), blender::draw::overlay::shader_patch_edit_mesh_normal_common(), blender::draw::overlay::ShaderModule::ShaderModule(), validate_vertex_attributes(), vertex_in(), blender::gpu::GLShader::vertex_interface_declare(), blender::gpu::MTLShader::vertex_interface_declare(), and blender::gpu::VKShader::vertex_interface_declare().
| Vector<StageInterfaceInfo *> blender::gpu::shader::ShaderCreateInfo::vertex_out_interfaces_ |
Definition at line 585 of file gpu_shader_create_info.hh.
Referenced by check_error(), finalize(), blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), blender::gpu::GLShader::geometry_interface_declare(), blender::gpu::VKShader::geometry_layout_declare(), is_vulkan_compatible(), blender::eevee::ShaderModule::material_create_info_amend(), operator==(), blender::gpu::GLShader::vertex_interface_declare(), blender::gpu::VKShader::vertex_interface_declare(), and vertex_out().
| StringRefNull blender::gpu::shader::ShaderCreateInfo::vertex_source_ |
Definition at line 607 of file gpu_shader_create_info.hh.
Referenced by check_error(), blender::gpu::ShaderCompiler::compile(), finalize(), operator==(), and vertex_source().
| std::string blender::gpu::shader::ShaderCreateInfo::vertex_source_generated = "" |
Manually set generated code.
Definition at line 388 of file gpu_shader_create_info.hh.
Referenced by blender::eevee::ShaderModule::material_create_info_amend(), operator==(), and pygpu_shader_info_vertex_source().