Blender V5.3
mtl_shader_generate.cc File Reference
#include <fmt/format.h>
#include <sstream>
#include <string>
#include "BLI_math_bits.hh"
#include "mtl_backend.hh"
#include "mtl_shader_generate.hh"

Go to the source code of this file.

Classes

struct  blender::gpu::Separator
struct  blender::gpu::ArgumentStream
struct  blender::gpu::GeneratedStreams

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::gpu

Macros

#define LINE   "\n#line " STRINGIFY(__LINE__) "\n"

Typedefs

using blender::gpu::Sep = Separator

Functions

static bool blender::gpu::is_builtin_type (StringRefNull type)
static StringRefNull blender::gpu::to_raw_type (ImageType type)
StringRefNull blender::gpu::to_wrapper_type (ImageType type)
static StringRefNull blender::gpu::to_component_type (ImageType type)
static const char * blender::gpu::get_stage_class_name (ShaderStage stage)
static const char * blender::gpu::get_stage_out_class_name (ShaderStage stage, const ShaderCreateInfo &info)
static const char * blender::gpu::get_stage_in_class_name (ShaderStage stage)
static const char * blender::gpu::get_stage_out_instance_name (ShaderStage stage)
static const char * blender::gpu::get_stage_in_instance_name (ShaderStage stage)
static const char * blender::gpu::get_stage_instance_name (ShaderStage stage)
static const char * blender::gpu::get_stage_type (ShaderStage stage)
static std::string blender::gpu::to_string (shader::Type type, SpecializationConstant::Value value)
static const char * blender::gpu::to_string (const Interpolation &interp)
std::string blender::gpu::wrap_type (StringRefNull type_name, const ShaderStage stage)
std::string blender::gpu::ref_type (const ResourceString &str, const std::string &attribute="")
std::string blender::gpu::ptr_type (const ResourceString &str)
static void blender::gpu::generate_uniforms (GeneratedStreams &generated, Span< ShaderCreateInfo::PushConst > uniforms, const ShaderStage stage)
static void blender::gpu::generate_buffer (GeneratedStreams &generated, const bool writeable, std::string type, ResourceString name, int slot, const ShaderStage stage)
StringRefNull blender::gpu::to_access (const bool is_sampler, const shader::Qualifier qualifier)
static void blender::gpu::generate_texture (GeneratedStreams &generated, bool is_sampler, shader::Qualifier qualifier, const shader::ImageType type, ResourceString name, int slot, const ShaderStage stage, const bool use_sampler_argument_buffer=false)
static void blender::gpu::generate_acceleration_structure (GeneratedStreams &generated, StringRefNull name, int slot)
static void blender::gpu::generate_resource (GeneratedStreams &generated, const ShaderCreateInfo::Resource &res, const ShaderStage stage, const ShaderCreateInfo &, const bool use_sampler_argument_buffer)
static void blender::gpu::generate_compilation_constant (GeneratedStreams &generated, const CompilationConstant &constant)
static void blender::gpu::generate_specialization_constant (GeneratedStreams &generated, const SpecializationConstant &constant, int index)
static void blender::gpu::generate_shared_variable (GeneratedStreams &generated, const ShaderCreateInfo::SharedVariable &sv)
static void blender::gpu::generate_sampler_argument_buffer (GeneratedStreams &generated, int sampler_count)
void blender::gpu::generate_resources (GeneratedStreams &generated, const ShaderStage stage, const ShaderCreateInfo &info)
static void blender::gpu::generate_vertex_attributes (GeneratedStreams &generated, const ShaderCreateInfo &info)
static void blender::gpu::generate_raster_builtin (GeneratedStreams &ss, std::stringstream &declaration, const StringRefNull type, const StringRefNull var, const StringRefNull attribute, const StringRefNull array="", const bool is_const=false)
static std::string blender::gpu::generate_raster_builtins (GeneratedStreams &ss, const ShaderCreateInfo &info, const ShaderStage stage)
static void blender::gpu::generate_inout (std::stringstream &out, StringRefNull iface_name, const StageInterfaceInfo::InOut &inout)
static void blender::gpu::generate_vertex_out (GeneratedStreams &generated, const ShaderCreateInfo &info, const ShaderStage stage)
static void blender::gpu::generate_fragment_builtin (GeneratedStreams &ss, std::stringstream &declaration, const StringRefNull type, const StringRefNull var, const StringRefNull native_type, const StringRefNull attribute, const bool is_const=false)
static std::string blender::gpu::generate_fragment_builtins (GeneratedStreams &ss, const ShaderCreateInfo &info)
static void blender::gpu::generate_subpass_inputs (GeneratedStreams &generated, const ShaderCreateInfo &info)
static void blender::gpu::generate_fragment_out (GeneratedStreams &generated, const ShaderCreateInfo &info)
static void blender::gpu::generate_vertex_interface (GeneratedStreams &generated, const ShaderCreateInfo &info)
static void blender::gpu::generate_fragment_interface (GeneratedStreams &generated, const ShaderCreateInfo &info)
static void blender::gpu::generate_stage_interfaces (GeneratedStreams &generated, const ShaderStage stage, const ShaderCreateInfo &info)
static void blender::gpu::generate_builtin (GeneratedStreams &ss, const StringRefNull wrapper_type, const StringRefNull wrapper_var, const StringRefNull native_type, const StringRefNull native_var)
static void blender::gpu::generate_builtin (GeneratedStreams &generated, const StringRefNull wrapper_type, const StringRefNull wrapper_var, const StringRefNull native_var)
static void blender::gpu::generate_instance_id (GeneratedStreams &ss)
static void blender::gpu::generate_builtins (GeneratedStreams &ss, const ShaderStage stage, const ShaderCreateInfo &info)
std::pair< std::string, std::string > blender::gpu::generate_entry_point (const ShaderCreateInfo &info, const ShaderStage stage, const StringRefNull entry_point_name)
uint32_t blender::gpu::available_buffer_slots (const ShaderCreateInfo &info)
void blender::gpu::patch_create_info_atomic_workaround (std::unique_ptr< PatchedShaderCreateInfo > &patched_info, const shader::ShaderCreateInfo &original_info)

Macro Definition Documentation

◆ LINE

#define LINE   "\n#line " STRINGIFY(__LINE__) "\n"

Definition at line 464 of file mtl_shader_generate.cc.

Referenced by blender::gpu::generate_entry_point().