|
Blender V4.5
|
#include "BLI_hash.hh"#include "BLI_string_ref.hh"#include "BLI_utildefines_variadic.h"#include "BLI_vector.hh"#include "GPU_common_types.hh"#include "GPU_material.hh"#include "GPU_texture.hh"#include <iostream>Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
| namespace | blender::gpu::shader |
Macros | |
| #define | GPU_FORCE_ENABLE_SHADER_PRINTF 0 |
| #define | GPU_SHADER_PRINTF_ENABLE 1 |
| #define | GPU_SHADER_PRINTF_SLOT 13 |
| #define | GPU_SHADER_PRINTF_MAX_CAPACITY (1024 * 4) |
| #define | GPU_SSBO_INDEX_BUF_SLOT 7 |
| #define | GPU_SSBO_POLYLINE_POS_BUF_SLOT 0 |
| #define | GPU_SSBO_POLYLINE_COL_BUF_SLOT 1 |
| #define | GPU_SHADER_NAMED_INTERFACE_INFO(_interface, _inst_name) |
| #define | GPU_SHADER_INTERFACE_INFO(_interface) |
| #define | GPU_SHADER_CREATE_INFO(_info) |
| #define | GPU_SHADER_NAMED_INTERFACE_END(_inst_name) |
| #define | GPU_SHADER_INTERFACE_END() |
| #define | GPU_SHADER_CREATE_END() |
| #define | SMOOTH(type, name) .smooth(Type::type##_t, #name) |
| #define | FLAT(type, name) .flat(Type::type##_t, #name) |
| #define | NO_PERSPECTIVE(type, name) .no_perspective(Type::type##_t, #name) |
| #define | LOCAL_GROUP_SIZE(...) .local_group_size(__VA_ARGS__) |
| #define | VERTEX_IN(slot, type, name) .vertex_in(slot, Type::type##_t, #name) |
| #define | VERTEX_OUT(stage_interface) .vertex_out(stage_interface) |
| #define | GEOMETRY_LAYOUT(...) .geometry_layout(__VA_ARGS__) |
| #define | GEOMETRY_OUT(stage_interface) .geometry_out(stage_interface) |
| #define | SUBPASS_IN(slot, type, img_type, name, rog) .subpass_in(slot, Type::type##_t, ImageType::img_type, #name, rog) |
| #define | FRAGMENT_OUT(slot, type, name) .fragment_out(slot, Type::type##_t, #name) |
| #define | FRAGMENT_OUT_DUAL(slot, type, name, blend) .fragment_out(slot, Type::type##_t, #name, DualBlend::blend) |
| #define | FRAGMENT_OUT_ROG(slot, type, name, rog) .fragment_out(slot, Type::type##_t, #name, DualBlend::NONE, rog) |
| #define | EARLY_FRAGMENT_TEST(enable) .early_fragment_test(enable) |
| #define | DEPTH_WRITE(value) .depth_write(value) |
| #define | SPECIALIZATION_CONSTANT(type, name, default_value) .specialization_constant(Type::type##_t, #name, default_value) |
| #define | COMPILATION_CONSTANT(type, name, value) .compilation_constant(Type::type##_t, #name, value) |
| #define | PUSH_CONSTANT(type, name) .push_constant(Type::type##_t, #name) |
| #define | PUSH_CONSTANT_ARRAY(type, name, array_size) .push_constant(Type::type##_t, #name, array_size) |
| #define | UNIFORM_BUF(slot, type_name, name) .uniform_buf(slot, #type_name, #name) |
| #define | UNIFORM_BUF_FREQ(slot, type_name, name, freq) .uniform_buf(slot, #type_name, #name, Frequency::freq) |
| #define | STORAGE_BUF(slot, qualifiers, type_name, name) .storage_buf(slot, Qualifier::qualifiers, STRINGIFY(type_name), #name) |
| #define | STORAGE_BUF_FREQ(slot, qualifiers, type_name, name, freq) .storage_buf(slot, Qualifier::qualifiers, STRINGIFY(type_name), #name, Frequency::freq) |
| #define | SAMPLER(slot, type, name) .sampler(slot, ImageType::type, #name) |
| #define | SAMPLER_FREQ(slot, type, name, freq) .sampler(slot, ImageType::type, #name, Frequency::freq) |
| #define | IMAGE(slot, format, qualifiers, type, name) .image(slot, format, Qualifier::qualifiers, ImageReadWriteType::type, #name) |
| #define | IMAGE_FREQ(slot, format, qualifiers, type, name, freq) .image(slot, format, Qualifier::qualifiers, ImageReadWriteType::type, #name, Frequency::freq) |
| #define | BUILTINS(builtin) .builtins(builtin) |
| #define | VERTEX_SOURCE(filename) .vertex_source(filename) |
| #define | FRAGMENT_SOURCE(filename) .fragment_source(filename) |
| #define | COMPUTE_SOURCE(filename) .compute_source(filename) |
| #define | DEFINE(name) .define(name) |
| #define | DEFINE_VALUE(name, value) .define(name, value) |
| #define | DO_STATIC_COMPILATION() .do_static_compilation(true) |
| #define | AUTO_RESOURCE_LOCATION() .auto_resource_location(true) |
| #define | METAL_BACKEND_ONLY() .metal_backend_only(true) |
| #define | ADDITIONAL_INFO(info_name) .additional_info(#info_name) |
| #define | TYPEDEF_SOURCE(filename) .typedef_source(filename) |
| #define | MTL_MAX_TOTAL_THREADS_PER_THREADGROUP(value) .mtl_max_total_threads_per_threadgroup(value) |
| #define | _INFO_EXPAND2(a, b) ADDITIONAL_INFO(a) ADDITIONAL_INFO(b) |
| #define | _INFO_EXPAND3(a, b, c) _INFO_EXPAND2(a, b) ADDITIONAL_INFO(c) |
| #define | _INFO_EXPAND4(a, b, c, d) _INFO_EXPAND3(a, b, c) ADDITIONAL_INFO(d) |
| #define | _INFO_EXPAND5(a, b, c, d, e) _INFO_EXPAND4(a, b, c, d) ADDITIONAL_INFO(e) |
| #define | _INFO_EXPAND6(a, b, c, d, e, f) _INFO_EXPAND5(a, b, c, d, e) ADDITIONAL_INFO(f) |
| #define | ADDITIONAL_INFO_EXPAND(...) VA_NARGS_CALL_OVERLOAD(_INFO_EXPAND, __VA_ARGS__) |
| #define | CREATE_INFO_VARIANT(name, ...) |
| #define | TYPES_EXPAND(s) Float##s, Uint##s, Int##s, sampler##s = Float##s, usampler##s = Uint##s, isampler##s = Int##s |
| #define | TYPES_EXPAND(s) Shadow##s, Depth##s, sampler##s##Shadow = Shadow##s, sampler##s##Depth = Depth##s |
| #define | TYPES_EXPAND(s) |
| #define | TYPES_EXPAND(s) |
| #define | TYPES_EXPAND(s) |
| #define | TEST_EQUAL(a, b, _member) |
| #define | TEST_VECTOR_EQUAL(a, b, _vector) |
Functions | |
| static Type | blender::gpu::shader::to_type (const eGPUType type) |
| static std::ostream & | blender::gpu::shader::operator<< (std::ostream &stream, const Type type) |
| static std::ostream & | blender::gpu::shader::operator<< (std::ostream &stream, const eGPUType type) |
| blender::gpu::shader::ENUM_OPERATORS (BuiltinBits, BuiltinBits::USE_DEBUG_DRAW) | |
| blender::gpu::shader::ENUM_OPERATORS (Qualifier, Qualifier::QUALIFIER_MAX) | |
Descriptor type used to define shader structure, resources and interfaces.
Some rule of thumb:
Definition in file gpu_shader_create_info.hh.
| #define _INFO_EXPAND2 | ( | a, | |
| b ) ADDITIONAL_INFO(a) ADDITIONAL_INFO(b) |
Definition at line 273 of file gpu_shader_create_info.hh.
| #define _INFO_EXPAND3 | ( | a, | |
| b, | |||
| c ) _INFO_EXPAND2(a, b) ADDITIONAL_INFO(c) |
Definition at line 274 of file gpu_shader_create_info.hh.
| #define _INFO_EXPAND4 | ( | a, | |
| b, | |||
| c, | |||
| d ) _INFO_EXPAND3(a, b, c) ADDITIONAL_INFO(d) |
Definition at line 275 of file gpu_shader_create_info.hh.
| #define _INFO_EXPAND5 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e ) _INFO_EXPAND4(a, b, c, d) ADDITIONAL_INFO(e) |
Definition at line 276 of file gpu_shader_create_info.hh.
| #define _INFO_EXPAND6 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f ) _INFO_EXPAND5(a, b, c, d, e) ADDITIONAL_INFO(f) |
Definition at line 277 of file gpu_shader_create_info.hh.
| #define ADDITIONAL_INFO | ( | info_name | ) | .additional_info(#info_name) |
Definition at line 180 of file gpu_shader_create_info.hh.
| #define ADDITIONAL_INFO_EXPAND | ( | ... | ) | VA_NARGS_CALL_OVERLOAD(_INFO_EXPAND, __VA_ARGS__) |
Definition at line 279 of file gpu_shader_create_info.hh.
| #define AUTO_RESOURCE_LOCATION | ( | ) | .auto_resource_location(true) |
Definition at line 175 of file gpu_shader_create_info.hh.
| #define BUILTINS | ( | builtin | ) | .builtins(builtin) |
Definition at line 165 of file gpu_shader_create_info.hh.
| #define COMPILATION_CONSTANT | ( | type, | |
| name, | |||
| value ) .compilation_constant(Type::type##_t, #name, value) |
Definition at line 140 of file gpu_shader_create_info.hh.
| #define COMPUTE_SOURCE | ( | filename | ) | .compute_source(filename) |
Definition at line 169 of file gpu_shader_create_info.hh.
| #define CREATE_INFO_VARIANT | ( | name, | |
| ... ) |
Definition at line 281 of file gpu_shader_create_info.hh.
Definition at line 171 of file gpu_shader_create_info.hh.
Definition at line 172 of file gpu_shader_create_info.hh.
Definition at line 135 of file gpu_shader_create_info.hh.
| #define DO_STATIC_COMPILATION | ( | ) | .do_static_compilation(true) |
Definition at line 174 of file gpu_shader_create_info.hh.
| #define EARLY_FRAGMENT_TEST | ( | enable | ) | .early_fragment_test(enable) |
Definition at line 134 of file gpu_shader_create_info.hh.
Definition at line 113 of file gpu_shader_create_info.hh.
Definition at line 128 of file gpu_shader_create_info.hh.
| #define FRAGMENT_OUT_DUAL | ( | slot, | |
| type, | |||
| name, | |||
| blend ) .fragment_out(slot, Type::type##_t, #name, DualBlend::blend) |
Definition at line 129 of file gpu_shader_create_info.hh.
| #define FRAGMENT_OUT_ROG | ( | slot, | |
| type, | |||
| name, | |||
| rog ) .fragment_out(slot, Type::type##_t, #name, DualBlend::NONE, rog) |
Definition at line 131 of file gpu_shader_create_info.hh.
| #define FRAGMENT_SOURCE | ( | filename | ) | .fragment_source(filename) |
Definition at line 168 of file gpu_shader_create_info.hh.
| #define GEOMETRY_LAYOUT | ( | ... | ) | .geometry_layout(__VA_ARGS__) |
Definition at line 122 of file gpu_shader_create_info.hh.
| #define GEOMETRY_OUT | ( | stage_interface | ) | .geometry_out(stage_interface) |
Definition at line 123 of file gpu_shader_create_info.hh.
| #define GPU_FORCE_ENABLE_SHADER_PRINTF 0 |
Definition at line 29 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_CREATE_END | ( | ) |
Definition at line 105 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_CREATE_INFO | ( | _info | ) |
Definition at line 93 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_INTERFACE_END | ( | ) |
Definition at line 102 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_INTERFACE_INFO | ( | _interface | ) |
Definition at line 88 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_NAMED_INTERFACE_END | ( | _inst_name | ) |
Definition at line 99 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_NAMED_INTERFACE_INFO | ( | _interface, | |
| _inst_name ) |
Definition at line 83 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_PRINTF_ENABLE 1 |
Definition at line 32 of file gpu_shader_create_info.hh.
| #define GPU_SHADER_PRINTF_MAX_CAPACITY (1024 * 4) |
Definition at line 37 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::printf_begin(), and blender::gpu::printf_end().
| #define GPU_SHADER_PRINTF_SLOT 13 |
Definition at line 36 of file gpu_shader_create_info.hh.
Referenced by GPU_shader_bind().
| #define GPU_SSBO_INDEX_BUF_SLOT 7 |
Definition at line 40 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::GLImmediate::begin(), blender::gpu::GLImmediate::end(), blender::gpu::MTLImmediate::end(), blender::gpu::VKImmediate::end(), and GPU_batch_bind_as_resources().
| #define GPU_SSBO_POLYLINE_COL_BUF_SLOT 1 |
Definition at line 43 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::GLImmediate::begin(), blender::gpu::GLImmediate::end(), blender::gpu::MTLImmediate::end(), and blender::gpu::VKImmediate::end().
| #define GPU_SSBO_POLYLINE_POS_BUF_SLOT 0 |
Definition at line 42 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::GLImmediate::begin(), blender::gpu::GLImmediate::end(), blender::gpu::MTLImmediate::end(), and blender::gpu::VKImmediate::end().
| #define IMAGE | ( | slot, | |
| format, | |||
| qualifiers, | |||
| type, | |||
| name ) .image(slot, format, Qualifier::qualifiers, ImageReadWriteType::type, #name) |
Definition at line 160 of file gpu_shader_create_info.hh.
| #define IMAGE_FREQ | ( | slot, | |
| format, | |||
| qualifiers, | |||
| type, | |||
| name, | |||
| freq ) .image(slot, format, Qualifier::qualifiers, ImageReadWriteType::type, #name, Frequency::freq) |
Definition at line 162 of file gpu_shader_create_info.hh.
| #define LOCAL_GROUP_SIZE | ( | ... | ) | .local_group_size(__VA_ARGS__) |
Definition at line 117 of file gpu_shader_create_info.hh.
| #define METAL_BACKEND_ONLY | ( | ) | .metal_backend_only(true) |
Definition at line 178 of file gpu_shader_create_info.hh.
| #define MTL_MAX_TOTAL_THREADS_PER_THREADGROUP | ( | value | ) | .mtl_max_total_threads_per_threadgroup(value) |
Definition at line 183 of file gpu_shader_create_info.hh.
Definition at line 114 of file gpu_shader_create_info.hh.
Definition at line 143 of file gpu_shader_create_info.hh.
| #define PUSH_CONSTANT_ARRAY | ( | type, | |
| name, | |||
| array_size ) .push_constant(Type::type##_t, #name, array_size) |
Definition at line 144 of file gpu_shader_create_info.hh.
Definition at line 156 of file gpu_shader_create_info.hh.
| #define SAMPLER_FREQ | ( | slot, | |
| type, | |||
| name, | |||
| freq ) .sampler(slot, ImageType::type, #name, Frequency::freq) |
Definition at line 157 of file gpu_shader_create_info.hh.
Definition at line 112 of file gpu_shader_create_info.hh.
| #define SPECIALIZATION_CONSTANT | ( | type, | |
| name, | |||
| default_value ) .specialization_constant(Type::type##_t, #name, default_value) |
Definition at line 137 of file gpu_shader_create_info.hh.
| #define STORAGE_BUF | ( | slot, | |
| qualifiers, | |||
| type_name, | |||
| name ) .storage_buf(slot, Qualifier::qualifiers, STRINGIFY(type_name), #name) |
Definition at line 151 of file gpu_shader_create_info.hh.
| #define STORAGE_BUF_FREQ | ( | slot, | |
| qualifiers, | |||
| type_name, | |||
| name, | |||
| freq ) .storage_buf(slot, Qualifier::qualifiers, STRINGIFY(type_name), #name, Frequency::freq) |
Definition at line 153 of file gpu_shader_create_info.hh.
| #define SUBPASS_IN | ( | slot, | |
| type, | |||
| img_type, | |||
| name, | |||
| rog ) .subpass_in(slot, Type::type##_t, ImageType::img_type, #name, rog) |
Definition at line 125 of file gpu_shader_create_info.hh.
| #define TEST_EQUAL | ( | a, | |
| b, | |||
| _member ) |
Definition at line 658 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::shader::ShaderCreateInfo::ComputeStageLayout::operator==(), blender::gpu::shader::ShaderCreateInfo::FragOut::operator==(), blender::gpu::shader::ShaderCreateInfo::GeometryStageLayout::operator==(), blender::gpu::shader::ShaderCreateInfo::operator==(), blender::gpu::shader::ShaderCreateInfo::PushConst::operator==(), blender::gpu::shader::ShaderCreateInfo::Resource::operator==(), blender::gpu::shader::ShaderCreateInfo::SubpassIn::operator==(), and blender::gpu::shader::ShaderCreateInfo::VertIn::operator==().
| #define TEST_VECTOR_EQUAL | ( | a, | |
| b, | |||
| _vector ) |
Definition at line 663 of file gpu_shader_create_info.hh.
Referenced by blender::gpu::shader::ShaderCreateInfo::operator==().
| #define TYPEDEF_SOURCE | ( | filename | ) | .typedef_source(filename) |
Definition at line 181 of file gpu_shader_create_info.hh.
| #define TYPES_EXPAND | ( | s | ) | Float##s, Uint##s, Int##s, sampler##s = Float##s, usampler##s = Uint##s, isampler##s = Int##s |
Definition at line 455 of file gpu_shader_create_info.hh.
| #define TYPES_EXPAND | ( | s | ) | Shadow##s, Depth##s, sampler##s##Shadow = Shadow##s, sampler##s##Depth = Depth##s |
Definition at line 455 of file gpu_shader_create_info.hh.
| #define TYPES_EXPAND | ( | s | ) |
Definition at line 455 of file gpu_shader_create_info.hh.
| #define TYPES_EXPAND | ( | s | ) |
Definition at line 455 of file gpu_shader_create_info.hh.
| #define TYPES_EXPAND | ( | s | ) |
Definition at line 455 of file gpu_shader_create_info.hh.
Definition at line 147 of file gpu_shader_create_info.hh.
| #define UNIFORM_BUF_FREQ | ( | slot, | |
| type_name, | |||
| name, | |||
| freq ) .uniform_buf(slot, #type_name, #name, Frequency::freq) |
Definition at line 148 of file gpu_shader_create_info.hh.
Definition at line 119 of file gpu_shader_create_info.hh.
| #define VERTEX_OUT | ( | stage_interface | ) | .vertex_out(stage_interface) |
Definition at line 120 of file gpu_shader_create_info.hh.
| #define VERTEX_SOURCE | ( | filename | ) | .vertex_source(filename) |
Definition at line 167 of file gpu_shader_create_info.hh.