|
Blender V5.0
|
Namespaces | |
| namespace | metadata |
| namespace | parser |
Classes | |
| class | Preprocessor |
| struct | SpecializationConstant |
| struct | SpecializationConstants |
| struct | CompilationConstant |
| struct | GPUCodegenCreateInfo |
| class | GPUCodegen |
| struct | StageInterfaceInfo |
| struct | GeneratedSource |
| struct | ShaderCreateInfo |
| 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 blender::gpu::Shader. More... | |
| struct | PrintfFormat |
Typedefs | |
| using | CreateInfoDictionary = Map<StringRef, ShaderCreateInfo *> |
| using | InterfaceDictionary = Map<StringRef, StageInterfaceInfo *> |
| using | GeneratedSourceList = Vector<shader::GeneratedSource, 0> |
Variables | |
| static CreateInfoDictionary * | g_create_infos = nullptr |
| static InterfaceDictionary * | g_interfaces = nullptr |
Definition at line 35 of file gpu_shader_create_info.cc.
Definition at line 676 of file gpu_shader_create_info.hh.
Definition at line 36 of file gpu_shader_create_info.cc.
|
strong |
Definition at line 442 of file gpu_shader_create_info.hh.
|
strong |
Follow convention described in: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_conservative_depth.txt
| Enumerator | |
|---|---|
| UNCHANGED | |
| ANY | |
| GREATER | |
| LESS | |
Definition at line 494 of file gpu_shader_create_info.hh.
|
strong |
Dual Source Blending Index.
| Enumerator | |
|---|---|
| NONE | |
| SRC_0 | |
| SRC_1 | |
Definition at line 596 of file gpu_shader_create_info.hh.
|
strong |
Maps to different descriptor sets.
| Enumerator | |
|---|---|
| BATCH | |
| PASS | |
| GEOMETRY | Special frequency tag that will automatically source storage buffers from GPUBatch. |
Definition at line 588 of file gpu_shader_create_info.hh.
|
strong |
| Enumerator | |
|---|---|
| undefined | |
| TYPES_EXPAND | Color image. |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | Atomic texture type wrappers. For OpenGL, these map to the equivalent (U)INT_* types. NOTE: Atomic variants MUST be used if the texture bound to this resource has usage flag: GPU_TEXTURE_USAGE_ATOMIC, even if atomic texture operations are not used in the given shader. The shader source MUST also utilize the correct atomic sampler handle e.g. usampler2DAtomic in conjunction with these types, for passing texture/image resources into functions. |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
Definition at line 545 of file gpu_shader_create_info.hh.
|
strong |
| Enumerator | |
|---|---|
| undefined | |
| TYPES_EXPAND | Color samplers/image. |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | Depth samplers (not supported as image). |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
| TYPES_EXPAND | Atomic texture type wrappers. For OpenGL, these map to the equivalent (U)INT_* types. NOTE: Atomic variants MUST be used if the texture bound to this resource has usage flag: GPU_TEXTURE_USAGE_ATOMIC, even if atomic texture operations are not used in the given shader. The shader source MUST also utilize the correct atomic sampler handle e.g. usampler2DAtomic in conjunction with these types, for passing texture/image resources into functions. |
| TYPES_EXPAND | |
| TYPES_EXPAND | |
Definition at line 503 of file gpu_shader_create_info.hh.
|
strong |
Interpolation qualifiers.
| Enumerator | |
|---|---|
| SMOOTH | |
| FLAT | |
| NO_PERSPECTIVE | |
Definition at line 603 of file gpu_shader_create_info.hh.
|
strong |
Input layout for geometry shader.
| Enumerator | |
|---|---|
| POINTS | |
| LINES | |
| LINES_ADJACENCY | |
| TRIANGLES | |
| TRIANGLES_ADJACENCY | |
Definition at line 610 of file gpu_shader_create_info.hh.
|
strong |
Output layout for geometry shader.
| Enumerator | |
|---|---|
| POINTS | |
| LINE_STRIP | |
| TRIANGLE_STRIP | |
| LINES | |
| TRIANGLES | |
Definition at line 619 of file gpu_shader_create_info.hh.
|
strong |
| Enumerator | |
|---|---|
| no_restrict | Restrict flag is set by default. Unless specified otherwise. |
| read | |
| write | |
| read_write | Shorthand version of combined flags. |
| QUALIFIER_MAX | |
Definition at line 576 of file gpu_shader_create_info.hh.
|
strong |
Definition at line 79 of file GPU_common_types.hh.
| blender::gpu::shader::ENUM_OPERATORS | ( | BuiltinBits | , |
| BuiltinBits::USE_DEBUG_DRAW | ) |
References USE_DEBUG_DRAW.
| blender::gpu::shader::ENUM_OPERATORS | ( | Qualifier | , |
| Qualifier::QUALIFIER_MAX | ) |
References QUALIFIER_MAX.
| bool blender::gpu::shader::gpu_shader_dependency_force_gpu_print_injection | ( | ) |
Definition at line 563 of file gpu_shader_dependency.cc.
References force_printf_injection.
Referenced by gpu_shader_create_info_init().
| BuiltinBits blender::gpu::shader::gpu_shader_dependency_get_builtins | ( | const StringRefNull | shader_source_name | ) |
Definition at line 580 of file gpu_shader_dependency.cc.
References BLI_assert, blender::gpu::GPUSource::builtins_get(), g_sources, blender::StringRefBase::is_empty(), and NONE.
Referenced by gpu_shader_create_info_init().
| StringRefNull blender::gpu::shader::gpu_shader_dependency_get_filename_from_source_string | ( | StringRef | source_string | ) |
Find the name of the file from which the given string was generated.
Definition at line 625 of file gpu_shader_dependency.cc.
References g_sources.
Referenced by blender::gpu::GLSource::GLSource(), and blender::gpu::Shader::print_log().
| const PrintfFormat & blender::gpu::shader::gpu_shader_dependency_get_printf_format | ( | uint32_t | format_hash | ) |
Definition at line 575 of file gpu_shader_dependency.cc.
References g_formats.
Referenced by blender::gpu::printf_end().
| Vector< StringRefNull > blender::gpu::shader::gpu_shader_dependency_get_resolved_source | ( | const StringRefNull | shader_source_name, |
| const shader::GeneratedSourceList & | generated_sources, | ||
| const StringRefNull | shader_name ) |
Definition at line 595 of file gpu_shader_dependency.cc.
References blender::gpu::GPUSource::build(), blender::StringRefNull::c_str(), CLG_LEVEL_INFO, CLG_log_raw(), CLOG_CHECK, CLOG_INFO, g_sources, blender::gpu::LOG, and result.
Referenced by blender::gpu::ShaderCompiler::compile(), blender::gpu::MTLShader::finalize(), glsl_patch_compute_get(), glsl_patch_fragment_get(), glsl_patch_geometry_get(), and glsl_patch_vertex_get().
| StringRefNull blender::gpu::shader::gpu_shader_dependency_get_source | ( | const StringRefNull | shader_source_name | ) |
Definition at line 616 of file gpu_shader_dependency.cc.
References g_sources, and blender::gpu::GPUSource::source.
Referenced by blender::gpu::ShaderCompiler::compile(), and blender::gpu::tests::gpu_shader_lib_test().
| bool blender::gpu::shader::gpu_shader_dependency_has_printf | ( | ) |
Definition at line 570 of file gpu_shader_dependency.cc.
References g_formats.
Referenced by blender::gpu::printf_begin().
|
static |
Definition at line 46 of file gpu_shader_create_info.cc.
References FLAT, blender::gpu::shader::StageInterfaceInfo::inouts, blender::gpu::shader::StageInterfaceInfo::instance_name, blender::gpu::shader::StageInterfaceInfo::InOut::interp, blender::StringRefBase::is_empty(), blender::gpu::shader::StageInterfaceInfo::name, NO_PERSPECTIVE, and SMOOTH.
Referenced by blender::gpu::shader::ShaderCreateInfo::is_vulkan_compatible().
|
inlinestatic |
Definition at line 432 of file gpu_shader_create_info.hh.
References GPU_CLOSURE, and to_type().
|
inlinestatic |
Definition at line 359 of file gpu_shader_create_info.hh.
References BLI_assert, bool_t, char2_t, char3_t, char4_t, char_t, float2_t, float3_10_10_10_2_t, float3_t, float3x3_t, float4_t, float4x4_t, float_t, int2_t, int3_t, int4_t, int_t, short2_t, short3_t, short4_t, short_t, uchar2_t, uchar3_t, uchar4_t, uchar_t, uint2_t, uint3_t, uint4_t, uint_t, ushort2_t, ushort3_t, ushort4_t, and ushort_t.
| BLI_INLINE int blender::gpu::shader::to_component_count | ( | const Type & | type | ) |
Definition at line 121 of file GPU_common_types.hh.
References BLI_assert_unreachable, BLI_INLINE, bool_t, char2_t, char3_t, char4_t, char_t, float2_t, float3_10_10_10_2_t, float3_t, float3x3_t, float4_t, float4x4_t, float_t, int2_t, int3_t, int4_t, int_t, short2_t, short3_t, short4_t, short_t, uchar2_t, uchar3_t, uchar4_t, uchar_t, uint2_t, uint3_t, uint4_t, uint_t, ushort2_t, ushort3_t, ushort4_t, and ushort_t.
Referenced by blender::gpu::GLShader::fragment_interface_declare(), blender::gpu::VKShader::fragment_interface_declare(), and blender::gpu::MSLGeneratorInterface::generate_msl_fragment_tile_input_population().
Definition at line 338 of file gpu_shader_create_info.hh.
References BLI_assert_msg, float2_t, float3_t, float3x3_t, float4_t, float4x4_t, float_t, GPU_FLOAT, GPU_MAT3, GPU_MAT4, GPU_VEC2, GPU_VEC3, and GPU_VEC4.
Referenced by blender::nodes::build_implicit_conversion_lazy_function(), blender::nodes::materialx::NodeParser::compute(), blender::nodes::materialx::NodeItem::convert(), blender::nodes::evaluate_closure_eagerly(), blender::gpu::shader::GPUCodegen::generate_attribs(), blender::nodes::materialx::NodeParser::get_input_default(), blender::nodes::materialx::NodeParser::get_input_default(), blender::nodes::materialx::NodeParser::get_input_link(), blender::nodes::materialx::NodeParser::get_input_link(), blender::nodes::materialx::NodeParser::get_input_value(), blender::nodes::materialx::NodeParser::get_input_value(), blender::nodes::materialx::NodeParser::get_output_default(), blender::nodes::materialx::NodeParser::get_output_default(), blender::nodes::materialx::GroupNodeParser::GroupNodeParser(), blender::nodes::materialx::NodeItem::if_else(), blender::nodes::implicitly_convert_socket_value(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::compositor::is_conversion_supported(), blender::nodes::materialx::NodeItem::is_convertible(), blender::nodes::materialx::NodeItem::mix(), blender::nodes::materialx::NodeParser::node_name(), blender::nodes::materialx::NodeParser::NodeParser(), operator<<(), blender::nodes::materialx::NodeItem::operator==(), blender::nodes::materialx::NodeGraph::unique_node_name(), and blender::nodes::materialx::NodeItem::~NodeItem().
|
static |
Definition at line 38 of file gpu_shader_create_info.cc.
Referenced by gpu_shader_create_info_compile(), gpu_shader_create_info_exit(), gpu_shader_create_info_get(), and gpu_shader_create_info_init().
|
static |
Definition at line 39 of file gpu_shader_create_info.cc.
Referenced by gpu_shader_create_info_exit(), and gpu_shader_create_info_init().