Blender V4.5
gpu_shader_create_info.hh File Reference
#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.

Classes

struct  blender::gpu::shader::StageInterfaceInfo
 
struct  blender::gpu::shader::StageInterfaceInfo::InOut
 
struct  blender::gpu::shader::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  blender::gpu::shader::ShaderCreateInfo::VertIn
 
struct  blender::gpu::shader::ShaderCreateInfo::GeometryStageLayout
 
struct  blender::gpu::shader::ShaderCreateInfo::ComputeStageLayout
 
struct  blender::gpu::shader::ShaderCreateInfo::FragOut
 
struct  blender::gpu::shader::ShaderCreateInfo::SubpassIn
 
struct  blender::gpu::shader::ShaderCreateInfo::Sampler
 
struct  blender::gpu::shader::ShaderCreateInfo::Image
 
struct  blender::gpu::shader::ShaderCreateInfo::UniformBuf
 
struct  blender::gpu::shader::ShaderCreateInfo::StorageBuf
 
struct  blender::gpu::shader::ShaderCreateInfo::Resource
 
struct  blender::gpu::shader::ShaderCreateInfo::PushConst
 
struct  blender::DefaultHash< Vector< blender::gpu::shader::SpecializationConstant::Value > >
 

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)
 

Enumerations

enum class  blender::gpu::shader::BuiltinBits {
  blender::gpu::shader::NONE = 0 , blender::gpu::shader::BARYCENTRIC_COORD = (1 << 0) , blender::gpu::shader::FRAG_COORD = (1 << 2) , blender::gpu::shader::FRONT_FACING = (1 << 4) ,
  blender::gpu::shader::GLOBAL_INVOCATION_ID = (1 << 5) , blender::gpu::shader::INSTANCE_ID = (1 << 6) , blender::gpu::shader::LAYER = (1 << 7) , blender::gpu::shader::LOCAL_INVOCATION_ID = (1 << 8) ,
  blender::gpu::shader::LOCAL_INVOCATION_INDEX = (1 << 9) , blender::gpu::shader::NUM_WORK_GROUP = (1 << 10) , blender::gpu::shader::POINT_COORD = (1 << 11) , blender::gpu::shader::POINT_SIZE = (1 << 12) ,
  blender::gpu::shader::PRIMITIVE_ID = (1 << 13) , blender::gpu::shader::VERTEX_ID = (1 << 14) , blender::gpu::shader::WORK_GROUP_ID = (1 << 15) , blender::gpu::shader::WORK_GROUP_SIZE = (1 << 16) ,
  blender::gpu::shader::VIEWPORT_INDEX = (1 << 17) , blender::gpu::shader::TEXTURE_ATOMIC = (1 << 18) , blender::gpu::shader::CLIP_CONTROL = (1 << 19) , blender::gpu::shader::USE_PRINTF = (1 << 28) ,
  blender::gpu::shader::USE_DEBUG_DRAW = (1 << 29)
}
 
enum class  blender::gpu::shader::DepthWrite { blender::gpu::shader::UNCHANGED = 0 , blender::gpu::shader::ANY , blender::gpu::shader::GREATER , blender::gpu::shader::LESS }
 
enum class  blender::gpu::shader::ImageType {
  blender::gpu::shader::undefined = 0 , blender::gpu::shader::TYPES_EXPAND , blender::gpu::shader::TYPES_EXPAND =(1D) , blender::gpu::shader::TYPES_EXPAND =(1DArray) ,
  blender::gpu::shader::TYPES_EXPAND =(2D) , blender::gpu::shader::TYPES_EXPAND =(2DArray) , blender::gpu::shader::TYPES_EXPAND =(3D) , blender::gpu::shader::TYPES_EXPAND =(Cube) ,
  blender::gpu::shader::TYPES_EXPAND =(CubeArray) , blender::gpu::shader::TYPES_EXPAND =(Buffer) , blender::gpu::shader::TYPES_EXPAND , blender::gpu::shader::TYPES_EXPAND =(2D) ,
  blender::gpu::shader::TYPES_EXPAND =(2DArray) , blender::gpu::shader::TYPES_EXPAND =(Cube) , blender::gpu::shader::TYPES_EXPAND =(CubeArray) , blender::gpu::shader::TYPES_EXPAND ,
  blender::gpu::shader::TYPES_EXPAND =(2D) , blender::gpu::shader::TYPES_EXPAND =(2DArray) , blender::gpu::shader::TYPES_EXPAND =(3D)
}
 
enum class  blender::gpu::shader::ImageReadWriteType {
  blender::gpu::shader::undefined = 0 , blender::gpu::shader::TYPES_EXPAND , blender::gpu::shader::TYPES_EXPAND =(1D) , blender::gpu::shader::TYPES_EXPAND =(1DArray) ,
  blender::gpu::shader::TYPES_EXPAND =(2D) , blender::gpu::shader::TYPES_EXPAND =(2DArray) , blender::gpu::shader::TYPES_EXPAND =(3D) , blender::gpu::shader::TYPES_EXPAND ,
  blender::gpu::shader::TYPES_EXPAND =(2D) , blender::gpu::shader::TYPES_EXPAND =(2DArray) , blender::gpu::shader::TYPES_EXPAND =(3D)
}
 
enum class  blender::gpu::shader::Qualifier {
  blender::gpu::shader::no_restrict = (1 << 0) , blender::gpu::shader::read = (1 << 1) , blender::gpu::shader::write = (1 << 2) , blender::gpu::shader::read_write = read | write ,
  blender::gpu::shader::QUALIFIER_MAX = (write << 1) - 1
}
 
enum class  blender::gpu::shader::Frequency { blender::gpu::shader::BATCH = 0 , blender::gpu::shader::PASS , blender::gpu::shader::GEOMETRY }
 
enum class  blender::gpu::shader::DualBlend { blender::gpu::shader::NONE = 0 , blender::gpu::shader::SRC_0 , blender::gpu::shader::SRC_1 }
 
enum class  blender::gpu::shader::Interpolation { blender::gpu::shader::SMOOTH = 0 , blender::gpu::shader::FLAT , blender::gpu::shader::NO_PERSPECTIVE }
 
enum class  blender::gpu::shader::PrimitiveIn {
  blender::gpu::shader::POINTS = 0 , blender::gpu::shader::LINES , blender::gpu::shader::LINES_ADJACENCY , blender::gpu::shader::TRIANGLES ,
  blender::gpu::shader::TRIANGLES_ADJACENCY
}
 
enum class  blender::gpu::shader::PrimitiveOut {
  blender::gpu::shader::POINTS = 0 , blender::gpu::shader::LINE_STRIP , blender::gpu::shader::TRIANGLE_STRIP , blender::gpu::shader::LINES ,
  blender::gpu::shader::TRIANGLES
}
 

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)
 

Detailed Description

Descriptor type used to define shader structure, resources and interfaces.

Some rule of thumb:

  • Do not include anything else than this file in each info file.

Definition in file gpu_shader_create_info.hh.

Macro Definition Documentation

◆ _INFO_EXPAND2

#define _INFO_EXPAND2 ( a,
b )   ADDITIONAL_INFO(a) ADDITIONAL_INFO(b)

Definition at line 273 of file gpu_shader_create_info.hh.

◆ _INFO_EXPAND3

#define _INFO_EXPAND3 ( a,
b,
c )   _INFO_EXPAND2(a, b) ADDITIONAL_INFO(c)

Definition at line 274 of file gpu_shader_create_info.hh.

◆ _INFO_EXPAND4

#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.

◆ _INFO_EXPAND5

#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.

◆ _INFO_EXPAND6

#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.

◆ ADDITIONAL_INFO

#define ADDITIONAL_INFO ( info_name)    .additional_info(#info_name)

Definition at line 180 of file gpu_shader_create_info.hh.

◆ ADDITIONAL_INFO_EXPAND

#define ADDITIONAL_INFO_EXPAND ( ...)    VA_NARGS_CALL_OVERLOAD(_INFO_EXPAND, __VA_ARGS__)

Definition at line 279 of file gpu_shader_create_info.hh.

◆ AUTO_RESOURCE_LOCATION

#define AUTO_RESOURCE_LOCATION ( )    .auto_resource_location(true)

Definition at line 175 of file gpu_shader_create_info.hh.

◆ BUILTINS

#define BUILTINS ( builtin)    .builtins(builtin)

Definition at line 165 of file gpu_shader_create_info.hh.

◆ COMPILATION_CONSTANT

#define COMPILATION_CONSTANT ( type,
name,
value )    .compilation_constant(Type::type##_t, #name, value)

Definition at line 140 of file gpu_shader_create_info.hh.

◆ COMPUTE_SOURCE

#define COMPUTE_SOURCE ( filename)    .compute_source(filename)

Definition at line 169 of file gpu_shader_create_info.hh.

◆ CREATE_INFO_VARIANT

#define CREATE_INFO_VARIANT ( name,
... )
Value:
DO_STATIC_COMPILATION() \
ADDITIONAL_INFO_EXPAND(__VA_ARGS__) \
GPU_SHADER_CREATE_END()
StringRefNull name
#define GPU_SHADER_CREATE_INFO(_info)

Definition at line 281 of file gpu_shader_create_info.hh.

◆ DEFINE

#define DEFINE ( name)    .define(name)

Definition at line 171 of file gpu_shader_create_info.hh.

◆ DEFINE_VALUE

#define DEFINE_VALUE ( name,
value )   .define(name, value)

Definition at line 172 of file gpu_shader_create_info.hh.

◆ DEPTH_WRITE

#define DEPTH_WRITE ( value)    .depth_write(value)

Definition at line 135 of file gpu_shader_create_info.hh.

◆ DO_STATIC_COMPILATION

#define DO_STATIC_COMPILATION ( )    .do_static_compilation(true)

Definition at line 174 of file gpu_shader_create_info.hh.

◆ EARLY_FRAGMENT_TEST

#define EARLY_FRAGMENT_TEST ( enable)    .early_fragment_test(enable)

Definition at line 134 of file gpu_shader_create_info.hh.

◆ FLAT

#define FLAT ( type,
name )   .flat(Type::type##_t, #name)

Definition at line 113 of file gpu_shader_create_info.hh.

◆ FRAGMENT_OUT

#define FRAGMENT_OUT ( slot,
type,
name )   .fragment_out(slot, Type::type##_t, #name)

Definition at line 128 of file gpu_shader_create_info.hh.

◆ FRAGMENT_OUT_DUAL

#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.

◆ FRAGMENT_OUT_ROG

#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.

◆ FRAGMENT_SOURCE

#define FRAGMENT_SOURCE ( filename)    .fragment_source(filename)

Definition at line 168 of file gpu_shader_create_info.hh.

◆ GEOMETRY_LAYOUT

#define GEOMETRY_LAYOUT ( ...)    .geometry_layout(__VA_ARGS__)

Definition at line 122 of file gpu_shader_create_info.hh.

◆ GEOMETRY_OUT

#define GEOMETRY_OUT ( stage_interface)    .geometry_out(stage_interface)

Definition at line 123 of file gpu_shader_create_info.hh.

◆ GPU_FORCE_ENABLE_SHADER_PRINTF

#define GPU_FORCE_ENABLE_SHADER_PRINTF   0

Definition at line 29 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_CREATE_END

#define GPU_SHADER_CREATE_END ( )
Value:
; \
}

Definition at line 105 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_CREATE_INFO

#define GPU_SHADER_CREATE_INFO ( _info)
Value:
static inline void autocomplete_helper_info_##_info() \
{ \
ShaderCreateInfo _info(#_info); \
_info

Definition at line 93 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_INTERFACE_END

#define GPU_SHADER_INTERFACE_END ( )
Value:
; \
}

Definition at line 102 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_INTERFACE_INFO

#define GPU_SHADER_INTERFACE_INFO ( _interface)
Value:
static inline void autocomplete_helper_interface_##_interface() \
{ \
StageInterfaceInfo _interface(#_interface); \
_interface

Definition at line 88 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_NAMED_INTERFACE_END

#define GPU_SHADER_NAMED_INTERFACE_END ( _inst_name)
Value:
; \
}

Definition at line 99 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_NAMED_INTERFACE_INFO

#define GPU_SHADER_NAMED_INTERFACE_INFO ( _interface,
_inst_name )
Value:
static inline void autocomplete_helper_interface_##_interface() \
{ \
StageInterfaceInfo _interface(#_interface, _inst_name); \
_interface

Definition at line 83 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_PRINTF_ENABLE

#define GPU_SHADER_PRINTF_ENABLE   1

Definition at line 32 of file gpu_shader_create_info.hh.

◆ GPU_SHADER_PRINTF_MAX_CAPACITY

#define GPU_SHADER_PRINTF_MAX_CAPACITY   (1024 * 4)

◆ GPU_SHADER_PRINTF_SLOT

#define GPU_SHADER_PRINTF_SLOT   13

Definition at line 36 of file gpu_shader_create_info.hh.

Referenced by GPU_shader_bind().

◆ GPU_SSBO_INDEX_BUF_SLOT

◆ GPU_SSBO_POLYLINE_COL_BUF_SLOT

◆ GPU_SSBO_POLYLINE_POS_BUF_SLOT

◆ IMAGE

#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.

◆ IMAGE_FREQ

#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.

◆ LOCAL_GROUP_SIZE

#define LOCAL_GROUP_SIZE ( ...)    .local_group_size(__VA_ARGS__)

Definition at line 117 of file gpu_shader_create_info.hh.

◆ METAL_BACKEND_ONLY

#define METAL_BACKEND_ONLY ( )    .metal_backend_only(true)

Definition at line 178 of file gpu_shader_create_info.hh.

◆ MTL_MAX_TOTAL_THREADS_PER_THREADGROUP

#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.

◆ NO_PERSPECTIVE

#define NO_PERSPECTIVE ( type,
name )   .no_perspective(Type::type##_t, #name)

Definition at line 114 of file gpu_shader_create_info.hh.

◆ PUSH_CONSTANT

#define PUSH_CONSTANT ( type,
name )   .push_constant(Type::type##_t, #name)

Definition at line 143 of file gpu_shader_create_info.hh.

◆ PUSH_CONSTANT_ARRAY

#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.

◆ SAMPLER

#define SAMPLER ( slot,
type,
name )   .sampler(slot, ImageType::type, #name)

Definition at line 156 of file gpu_shader_create_info.hh.

◆ SAMPLER_FREQ

#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.

◆ SMOOTH

#define SMOOTH ( type,
name )   .smooth(Type::type##_t, #name)

Definition at line 112 of file gpu_shader_create_info.hh.

◆ SPECIALIZATION_CONSTANT

#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.

◆ STORAGE_BUF

#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.

◆ STORAGE_BUF_FREQ

#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.

◆ SUBPASS_IN

#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.

◆ TEST_EQUAL

◆ TEST_VECTOR_EQUAL

#define TEST_VECTOR_EQUAL ( a,
b,
_vector )
Value:
TEST_EQUAL(a, b, _vector.size()); \
for (auto i : _vector.index_range()) { \
TEST_EQUAL(a, b, _vector[i]); \
}
#define TEST_EQUAL(a, b, _member)

Definition at line 663 of file gpu_shader_create_info.hh.

Referenced by blender::gpu::shader::ShaderCreateInfo::operator==().

◆ TYPEDEF_SOURCE

#define TYPEDEF_SOURCE ( filename)    .typedef_source(filename)

Definition at line 181 of file gpu_shader_create_info.hh.

◆ TYPES_EXPAND [1/5]

#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.

◆ TYPES_EXPAND [2/5]

#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.

◆ TYPES_EXPAND [3/5]

#define TYPES_EXPAND ( s)
Value:
AtomicUint##s, AtomicInt##s, usampler##s##Atomic = AtomicUint##s, \
isampler##s##Atomic = AtomicInt##s

Definition at line 455 of file gpu_shader_create_info.hh.

◆ TYPES_EXPAND [4/5]

#define TYPES_EXPAND ( s)
Value:
Float##s = int(ImageType::Float##s), Uint##s = int(ImageType::Uint##s), \
Int##s = int(ImageType::Int##s), image##s = Float##s, uimage##s = Uint##s, iimage##s = Int##s

Definition at line 455 of file gpu_shader_create_info.hh.

◆ TYPES_EXPAND [5/5]

#define TYPES_EXPAND ( s)
Value:
AtomicUint##s = int(ImageType::AtomicUint##s), AtomicInt##s = int(ImageType::AtomicInt##s), \
uimage##s##Atomic = AtomicUint##s, iimage##s##Atomic = AtomicInt##s

Definition at line 455 of file gpu_shader_create_info.hh.

◆ UNIFORM_BUF

#define UNIFORM_BUF ( slot,
type_name,
name )   .uniform_buf(slot, #type_name, #name)

Definition at line 147 of file gpu_shader_create_info.hh.

◆ UNIFORM_BUF_FREQ

#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.

◆ VERTEX_IN

#define VERTEX_IN ( slot,
type,
name )   .vertex_in(slot, Type::type##_t, #name)

Definition at line 119 of file gpu_shader_create_info.hh.

◆ VERTEX_OUT

#define VERTEX_OUT ( stage_interface)    .vertex_out(stage_interface)

Definition at line 120 of file gpu_shader_create_info.hh.

◆ VERTEX_SOURCE

#define VERTEX_SOURCE ( filename)    .vertex_source(filename)

Definition at line 167 of file gpu_shader_create_info.hh.