|
Blender V4.5
|
Namespaces | |
| namespace | metadata |
Classes | |
| struct | CompilationConstant |
| class | GPUCodegen |
| struct | GPUCodegenCreateInfo |
| class | Preprocessor |
| struct | PrintfFormat |
| 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 #GPUShader. More... | |
| struct | SpecializationConstant |
| struct | SpecializationConstants |
| struct | StageInterfaceInfo |
Typedefs | |
| using | CreateInfoDictionnary = Map<StringRef, ShaderCreateInfo *> |
| using | InterfaceDictionnary = Map<StringRef, StageInterfaceInfo *> |
Variables | |
| static CreateInfoDictionnary * | g_create_infos = nullptr |
| static InterfaceDictionnary * | g_interfaces = nullptr |
Definition at line 35 of file gpu_shader_create_info.cc.
Definition at line 36 of file gpu_shader_create_info.cc.
|
strong |
Definition at line 396 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 444 of file gpu_shader_create_info.hh.
|
strong |
Dual Source Blending Index.
| Enumerator | |
|---|---|
| NONE | |
| SRC_0 | |
| SRC_1 | |
Definition at line 546 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 538 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 495 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 453 of file gpu_shader_create_info.hh.
|
strong |
Interpolation qualifiers.
| Enumerator | |
|---|---|
| SMOOTH | |
| FLAT | |
| NO_PERSPECTIVE | |
Definition at line 553 of file gpu_shader_create_info.hh.
|
strong |
Input layout for geometry shader.
| Enumerator | |
|---|---|
| POINTS | |
| LINES | |
| LINES_ADJACENCY | |
| TRIANGLES | |
| TRIANGLES_ADJACENCY | |
Definition at line 560 of file gpu_shader_create_info.hh.
|
strong |
Output layout for geometry shader.
| Enumerator | |
|---|---|
| POINTS | |
| LINE_STRIP | |
| TRIANGLE_STRIP | |
| LINES | |
| TRIANGLES | |
Definition at line 569 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 526 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 ENUM_OPERATORS(), and USE_DEBUG_DRAW.
Referenced by ENUM_OPERATORS(), and ENUM_OPERATORS().
| blender::gpu::shader::ENUM_OPERATORS | ( | Qualifier | , |
| Qualifier::QUALIFIER_MAX | ) |
References ENUM_OPERATORS(), and QUALIFIER_MAX.
| bool blender::gpu::shader::gpu_shader_dependency_force_gpu_print_injection | ( | ) |
Definition at line 485 of file gpu_shader_dependency.cc.
References force_printf_injection, and gpu_shader_dependency_force_gpu_print_injection().
Referenced by gpu_shader_dependency_force_gpu_print_injection().
| BuiltinBits blender::gpu::shader::gpu_shader_dependency_get_builtins | ( | const StringRefNull | shader_source_name | ) |
Definition at line 502 of file gpu_shader_dependency.cc.
References BLI_assert, blender::gpu::GPUSource::builtins_get(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), g_sources, gpu_shader_dependency_get_builtins(), blender::StringRefBase::is_empty(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), and NONE.
Referenced by gpu_shader_dependency_get_builtins().
| 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 538 of file gpu_shader_dependency.cc.
References g_sources, gpu_shader_dependency_get_filename_from_source_string(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by blender::gpu::GLSource::GLSource(), gpu_shader_dependency_get_filename_from_source_string(), and blender::gpu::Shader::print_log().
| const PrintfFormat & blender::gpu::shader::gpu_shader_dependency_get_printf_format | ( | uint32_t | format_hash | ) |
Definition at line 497 of file gpu_shader_dependency.cc.
References g_formats, gpu_shader_dependency_get_printf_format(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup().
Referenced by gpu_shader_dependency_get_printf_format(), and blender::gpu::printf_end().
| Vector< StringRefNull > blender::gpu::shader::gpu_shader_dependency_get_resolved_source | ( | const StringRefNull | shader_source_name | ) |
Definition at line 517 of file gpu_shader_dependency.cc.
References blender::gpu::GPUSource::build(), g_sources, gpu_shader_dependency_get_resolved_source(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), and result.
Referenced by blender::gpu::ShaderCompiler::compile(), blender::gpu::shader::GPUCodegen::generate_library(), and gpu_shader_dependency_get_resolved_source().
| StringRefNull blender::gpu::shader::gpu_shader_dependency_get_source | ( | const StringRefNull | shader_source_name | ) |
Definition at line 529 of file gpu_shader_dependency.cc.
References g_sources, gpu_shader_dependency_get_source(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), and blender::gpu::GPUSource::source.
Referenced by blender::gpu::ShaderCompiler::compile(), gpu_shader_dependency_get_source(), and blender::gpu::tests::gpu_shader_lib_test().
| bool blender::gpu::shader::gpu_shader_dependency_has_printf | ( | ) |
Definition at line 492 of file gpu_shader_dependency.cc.
References g_formats, gpu_shader_dependency_has_printf(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty().
Referenced by gpu_shader_dependency_has_printf(), and 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(), is_vulkan_compatible_interface(), blender::gpu::shader::StageInterfaceInfo::name, NO_PERSPECTIVE, and SMOOTH.
Referenced by blender::gpu::shader::ShaderCreateInfo::is_vulkan_compatible(), and is_vulkan_compatible_interface().
|
inlinestatic |
Definition at line 386 of file gpu_shader_create_info.hh.
References GPU_CLOSURE, operator<<(), and to_type().
|
inlinestatic |
Definition at line 313 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, operator<<(), 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 operator<<(), and operator<<().
| 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, to_component_count(), 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(), blender::gpu::MSLGeneratorInterface::generate_msl_fragment_tile_input_population(), and to_component_count().
Definition at line 292 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, GPU_VEC4, and to_type().
Referenced by operator<<(), and to_type().
|
static |
Definition at line 38 of file gpu_shader_create_info.cc.
Referenced by gpu_shader_create_info_compile(), gpu_shader_create_info_exit(), and gpu_shader_create_info_get().
|
static |
Definition at line 39 of file gpu_shader_create_info.cc.
Referenced by gpu_shader_create_info_exit().