Blender V4.3
blender::gpu::MTLShader Class Reference

#include <mtl_shader.hh>

Inherits blender::gpu::Shader.

Public Member Functions

bool finalize_compute (const shader::ShaderCreateInfo *info)
 
bool is_valid ()
 
bool has_compute_shader_lib ()
 
bool has_parent_shader ()
 
MTLRenderPipelineStateDescriptorget_current_pipeline_state ()
 
MTLShaderInterfaceget_interface ()
 
void * get_push_constant_data ()
 
std::string geometry_interface_declare (const shader::ShaderCreateInfo &info) const override
 
bool get_uses_ssbo_vertex_fetch () const override
 
int get_ssbo_vertex_fetch_output_num_verts () const override
 
int program_handle_get () const override
 
MTLPrimitiveType get_ssbo_vertex_fetch_output_prim_type ()
 
const MTLComputePipelineStateCommonget_compute_common_state ()
 
Creation / Destruction.
 MTLShader (MTLContext *ctx, const char *name)
 
 MTLShader (MTLContext *ctx, MTLShaderInterface *interface, const char *name, NSString *input_vertex_source, NSString *input_fragment_source, NSString *vertex_function_name_, NSString *fragment_function_name_)
 
 ~MTLShader ()
 
void init (const shader::ShaderCreateInfo &, bool is_batch_compilation) override
 
Shader stage creation.
void vertex_shader_from_glsl (MutableSpan< const char * > sources) override
 
void geometry_shader_from_glsl (MutableSpan< const char * > sources) override
 
void fragment_shader_from_glsl (MutableSpan< const char * > sources) override
 
void compute_shader_from_glsl (MutableSpan< const char * > sources) override
 
bool finalize (const shader::ShaderCreateInfo *info=nullptr) override
 
void transform_feedback_names_set (Span< const char * > name_list, const eGPUShaderTFBType geom_type) override
 
bool transform_feedback_enable (VertBuf *buf) override
 
void transform_feedback_disable () override
 
Shader Binding.
void warm_cache (int limit) override
 
void bind () override
 
void unbind () override
 
void uniform_float (int location, int comp_len, int array_size, const float *data) override
 
void uniform_int (int location, int comp_len, int array_size, const int *data) override
 
bool get_push_constant_is_dirty ()
 
void push_constant_bindstate_mark_dirty (bool is_dirty)
 
MTLShader builtin shader generation utilities.
std::string resources_declare (const shader::ShaderCreateInfo &info) const override
 
std::string vertex_interface_declare (const shader::ShaderCreateInfo &info) const override
 
std::string fragment_interface_declare (const shader::ShaderCreateInfo &info) const override
 
std::string geometry_layout_declare (const shader::ShaderCreateInfo &info) const override
 
std::string compute_layout_declare (const shader::ShaderCreateInfo &info) const override
 
METAL Custom Behavior
void set_vertex_function_name (NSString *vetex_function_name)
 
void set_fragment_function_name (NSString *fragment_function_name)
 
void set_compute_function_name (NSString *compute_function_name)
 
void shader_source_from_msl (NSString *input_vertex_source, NSString *input_fragment_source)
 
void shader_compute_source_from_msl (NSString *input_compute_source)
 
void set_interface (MTLShaderInterface *interface)
 
Bake Pipeline State Objects
MTLRenderPipelineStateInstancebake_current_pipeline_state (MTLContext *ctx, MTLPrimitiveTopologyClass prim_type)
 
MTLRenderPipelineStateInstancebake_pipeline_state (MTLContext *ctx, MTLPrimitiveTopologyClass prim_type, const MTLRenderPipelineStateDescriptor &pipeline_descriptor)
 
MTLComputePipelineStateInstancebake_compute_pipeline_state (MTLContext *ctx, MTLComputePipelineStateDescriptor &compute_pipeline_descriptor)
 
- Public Member Functions inherited from blender::gpu::Shader
std::string defines_declare (const shader::ShaderCreateInfo &info) const
 
const char *const name_get () const
 
void parent_set (Shader *parent)
 
Shaderparent_get () const
 
 Shader (const char *name)
 
virtual ~Shader ()
 
void specialization_constants_init (const shader::ShaderCreateInfo &info)
 

Public Attributes

int uni_ssbo_input_prim_type_loc = -1
 
int uni_ssbo_input_vert_count_loc = -1
 
int uni_ssbo_uses_indexed_rendering = -1
 
int uni_ssbo_uses_index_mode_u16 = -1
 
int uni_ssbo_index_base_loc = -1
 
- Public Attributes inherited from blender::gpu::Shader
ShaderInterfaceinterface = nullptr
 
struct blender::gpu::Shader::Constants constants
 

Shader Translation.

void prepare_ssbo_vertex_fetch_metadata ()
 

SSBO-vertex-fetch-mode attribute control.

void ssbo_vertex_fetch_bind_attributes_begin ()
 
void ssbo_vertex_fetch_bind_attribute (const MTLSSBOAttribute &ssbo_attr)
 
void ssbo_vertex_fetch_bind_attributes_end (id< MTLRenderCommandEncoder > active_encoder)
 
VertBufget_transform_feedback_active_buffer ()
 
bool has_transform_feedback_varying (std::string str)
 
static int ssbo_vertex_type_to_attr_type (MTLVertexFormat attribute_type)
 

Additional Inherited Members

- Static Public Member Functions inherited from blender::gpu::Shader
static bool srgb_uniform_dirty_get ()
 
static void set_srgb_uniform (GPUShader *shader)
 
static void set_framebuffer_srgb_target (int use_srgb_to_linear)
 
- Protected Member Functions inherited from blender::gpu::Shader
void print_log (Span< const char * > sources, const char *log, const char *stage, bool error, GPULogParser *parser)
 
- Protected Attributes inherited from blender::gpu::Shader
char name [64]
 
Shaderparent_shader_ = nullptr
 

Detailed Description

MTLShader implements shader compilation, Pipeline State Object (PSO) creation for rendering and uniform data binding. Shaders can either be created from native MSL, or generated from a GLSL source shader using #GPUShaderCreateInfo.

Shader creation process:

  • Create MTLShader:
    • Convert GLSL to MSL source if required.
  • set MSL source.
  • set Vertex/Fragment function names.
  • Create and populate #MTLShaderInterface.

Definition at line 168 of file mtl_shader.hh.

Constructor & Destructor Documentation

◆ MTLShader() [1/2]

blender::gpu::MTLShader::MTLShader ( MTLContext * ctx,
const char * name )

Definition at line 72 of file mtl_shader.mm.

◆ MTLShader() [2/2]

blender::gpu::MTLShader::MTLShader ( MTLContext * ctx,
MTLShaderInterface * interface,
const char * name,
NSString * input_vertex_source,
NSString * input_fragment_source,
NSString * vertex_function_name_,
NSString * fragment_function_name_ )

◆ ~MTLShader()

blender::gpu::MTLShader::~MTLShader ( )

Definition at line 112 of file mtl_shader.mm.

References is_valid(), and MEM_freeN().

Member Function Documentation

◆ bake_compute_pipeline_state()

MTLComputePipelineStateInstance * blender::gpu::MTLShader::bake_compute_pipeline_state ( MTLContext * ctx,
MTLComputePipelineStateDescriptor & compute_pipeline_descriptor )

If Max Total threads per threadgroup tuning parameters are specified, compile with these. This enables the compiler to make informed decisions based on the upper bound of threads issued for a given compute call. This per-shader tuning can reduce the static register memory allocation by reducing the worst-case allocation and increasing thread occupancy.

NOTE: This is only enabled on Apple M1 and M2 GPUs. Apple M3 GPUs feature dynamic caching which controls register allocation dynamically based on the runtime state.

Definition at line 1474 of file mtl_shader.mm.

References blender::gpu::APPLE_GPU_M1, blender::gpu::APPLE_GPU_M2, blender::gpu::MTLComputePipelineStateInstance::base_storage_buffer_index, blender::gpu::MTLComputePipelineStateInstance::base_uniform_buffer_index, BLI_assert, blender::gpu::MTLComputePipelineStateInstance::compute, blender::gpu::Shader::constants, blender::gpu::MTLContext::device, ELEM, error(), blender::gpu::MTLBackend::get_capabilities(), get_interface(), blender::gpu::MTLShaderInterface::get_total_uniform_blocks(), blender::gpu::MTLCapabilities::gpu, init(), is_valid(), MTL_LOG_INFO, MTL_LOG_WARNING, blender::gpu::Shader::name, options, blender::gpu::populate_specialization_constant_values(), blender::gpu::MTLComputePipelineStateInstance::pso, blender::gpu::MTLComputePipelineStateInstance::shader_pso_index, blender::gpu::MTLComputePipelineStateDescriptor::specialization_state, blender::gpu::MTLComputePipelineStateCommon::threadgroup_x_len, blender::gpu::MTLComputePipelineStateCommon::threadgroup_y_len, and blender::gpu::MTLComputePipelineStateCommon::threadgroup_z_len.

Referenced by blender::gpu::MTLContext::ensure_compute_pipeline_state(), and finalize().

◆ bake_current_pipeline_state()

MTLRenderPipelineStateInstance * blender::gpu::MTLShader::bake_current_pipeline_state ( MTLContext * ctx,
MTLPrimitiveTopologyClass prim_type )

Bakes or fetches a pipeline state using the current #MTLRenderPipelineStateDescriptor state.

This state contains information on shader inputs/outputs, such as the vertex descriptor, used to control vertex assembly for current vertex data, and active render target information, describing the output attachment pixel formats.

Other rendering parameters such as global point-size, blend state, color mask etc; are also used. See mtl_shader.h for full #MLRenderPipelineStateDescriptor.

Populate global pipeline descriptor and use this to prepare new PSO.

Definition at line 866 of file mtl_shader.mm.

References blender::gpu::MTLContextGlobalShaderPipelineState::alpha_blend_op, blender::gpu::MTLRenderPipelineStateDescriptor::alpha_blend_op, bake_pipeline_state(), blender::gpu::MTLContextGlobalShaderPipelineState::blending_enabled, blender::gpu::MTLRenderPipelineStateDescriptor::blending_enabled, BLI_assert, blender::gpu::MTLContextGlobalShaderPipelineState::clip_distance_enabled, blender::gpu::MTLRenderPipelineStateDescriptor::clipping_plane_enable_mask, blender::gpu::MTLRenderPipelineStateDescriptor::color_attachment_format, blender::gpu::MTLContextGlobalShaderPipelineState::color_write_mask, blender::gpu::MTLRenderPipelineStateDescriptor::color_write_mask, blender::gpu::Shader::constants, blender::gpu::MTLRenderPipelineStateDescriptor::depth_attachment_format, blender::gpu::MTLContextGlobalShaderPipelineState::dest_alpha_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::dest_alpha_blend_factor, blender::gpu::MTLContextGlobalShaderPipelineState::dest_rgb_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::dest_rgb_blend_factor, blender::gpu::Texture::format_get(), blender::gpu::MTLContext::get(), blender::gpu::MTLFrameBuffer::get_color_attachment(), blender::gpu::MTLContext::get_current_framebuffer(), blender::gpu::MTLFrameBuffer::get_depth_attachment(), blender::gpu::MTLFrameBuffer::get_is_srgb(), blender::gpu::MTLStateManager::get_pipeline_descriptor(), blender::gpu::MTLFrameBuffer::get_srgb_enabled(), blender::gpu::MTLFrameBuffer::get_stencil_attachment(), GPU_FB_MAX_COLOR_ATTACHMENT, blender::gpu::gpu_texture_format_to_metal(), is_valid(), blender::gpu::MTLRenderPipelineStateDescriptor::num_color_attachments, blender::gpu::MTLContext::pipeline_state, blender::gpu::MTLContextGlobalShaderPipelineState::point_size, blender::gpu::MTLRenderPipelineStateDescriptor::point_size, blender::gpu::MTLVertexDescriptor::prim_topology_class, blender::gpu::MTLContextGlobalShaderPipelineState::rgb_blend_op, blender::gpu::MTLRenderPipelineStateDescriptor::rgb_blend_op, blender::gpu::MTLRenderPipelineStateDescriptor::specialization_state, blender::gpu::MTLContextGlobalShaderPipelineState::src_alpha_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::src_alpha_blend_factor, blender::gpu::MTLContextGlobalShaderPipelineState::src_rgb_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::src_rgb_blend_factor, blender::gpu::Context::state_manager, blender::gpu::MTLRenderPipelineStateDescriptor::stencil_attachment_format, blender::gpu::MTLAttachment::texture, blender::gpu::MTLAttachment::used, blender::gpu::Shader::Constants::values, and blender::gpu::MTLRenderPipelineStateDescriptor::vertex_descriptor.

Referenced by blender::gpu::MTLContext::ensure_render_pipeline_state().

◆ bake_pipeline_state()

MTLRenderPipelineStateInstance * blender::gpu::MTLShader::bake_pipeline_state ( MTLContext * ctx,
MTLPrimitiveTopologyClass prim_type,
const MTLRenderPipelineStateDescriptor & pipeline_descriptor )

Definition at line 951 of file mtl_shader.mm.

References blender::gpu::MTLRenderPipelineStateDescriptor::alpha_blend_op, blender::gpu::MTLVertexDescriptor::attributes, blender::gpu::MTLRenderPipelineStateInstance::base_storage_buffer_index, blender::gpu::MTLRenderPipelineStateInstance::base_uniform_buffer_index, blender::gpu::MTLRenderPipelineStateDescriptor::blending_enabled, BLI_assert, BLI_assert_msg, blender::gpu::MTLRenderPipelineStateInstance::buffer_bindings_reflection_data_frag, blender::gpu::MTLRenderPipelineStateInstance::buffer_bindings_reflection_data_vert, blender::gpu::MTLVertexAttributeDescriptorPSO::buffer_index, blender::gpu::MTLVertexDescriptor::buffer_layouts, blender::gpu::MTLContextGlobalShaderPipelineState::clip_distance_enabled, blender::gpu::MTLRenderPipelineStateDescriptor::clipping_plane_enable_mask, blender::gpu::MTLRenderPipelineStateDescriptor::color_attachment_format, blender::gpu::MTLRenderPipelineStateDescriptor::color_write_mask, blender::gpu::Shader::constants, count, blender::gpu::MTLRenderPipelineStateDescriptor::depth_attachment_format, blender::gpu::MTLRenderPipelineStateDescriptor::dest_alpha_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::dest_rgb_blend_factor, blender::gpu::MTLContext::device, error(), fabsf, blender::gpu::MTLVertexAttributeDescriptorPSO::format, blender::gpu::MTLVertexAttributeDescriptorPSO::format_conversion_mode, blender::gpu::MTLRenderPipelineStateInstance::frag, blender::gpu::MTLShaderInterface::get_argument_buffer_bind_index(), blender::gpu::MTLShaderInterface::get_attribute(), get_interface(), blender::gpu::MTLShaderInterface::get_max_buffer_index(), blender::gpu::MTLShaderInterface::get_name(), blender::gpu::MTLShaderInterface::get_name_at_offset(), blender::gpu::MTLShaderInterface::get_total_attributes(), blender::gpu::MTLShaderInterface::get_total_uniform_blocks(), get_uses_ssbo_vertex_fetch(), blender::gpu::MTLShaderBuilder::glsl_fragment_source_, GPU_FB_MAX_COLOR_ATTACHMENT, GPU_FETCH_INT_TO_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_SHADER_TFB_NONE, GPU_VERT_ATTR_MAX_LEN, blender::gpu::MTLRenderPipelineStateDescriptor::hash(), int, is_valid(), isActive(), blender::gpu::MTLVertexDescriptor::max_attribute_value, max_ii(), blender::gpu::mtl_format_supports_blending(), MTL_LOG_INFO, MTL_LOG_WARNING, MTL_MAX_BUFFER_BINDINGS, MTL_SSBO_VERTEX_FETCH_IBO_INDEX, blender::gpu::Shader::name, blender::gpu::MTLRenderPipelineStateInstance::null_attribute_buffer_index, blender::gpu::MTLVertexDescriptor::num_vert_buffers, blender::gpu::MTLVertexAttributeDescriptorPSO::offset, options, blender::gpu::MTLContext::pipeline_state, blender::gpu::MTLRenderPipelineStateDescriptor::point_size, blender::gpu::populate_specialization_constant_values(), blender::gpu::MTLVertexDescriptor::prim_topology_class, blender::gpu::MTLRenderPipelineStateInstance::prim_type, blender::gpu::Shader::print_log(), printf, blender::gpu::MTLRenderPipelineStateInstance::pso, blender::gpu::MTLRenderPipelineStateInstance::reflection_data_available, reset(), blender::gpu::MTLRenderPipelineStateDescriptor::rgb_blend_op, shader_debug_printf, blender::gpu::MTLRenderPipelineStateInstance::shader_pso_index, blender::gpu::MTLRenderPipelineStateDescriptor::specialization_state, blender::gpu::MTLRenderPipelineStateDescriptor::src_alpha_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::src_rgb_blend_factor, blender::gpu::MTLRenderPipelineStateDescriptor::stencil_attachment_format, blender::gpu::MTLVertexBufferLayoutDescriptorPSO::step_function, blender::gpu::MTLVertexBufferLayoutDescriptorPSO::step_rate, blender::gpu::MTLVertexBufferLayoutDescriptorPSO::stride, blender::gpu::MTLRenderPipelineStateInstance::transform_feedback_buffer_index, blender::gpu::MTLShaderInterface::uses_argument_buffer_for_samplers(), blender::gpu::MTLRenderPipelineStateInstance::vert, blender::gpu::VERTEX, and blender::gpu::MTLRenderPipelineStateDescriptor::vertex_descriptor.

Referenced by bake_current_pipeline_state(), and warm_cache().

◆ bind()

◆ compute_layout_declare()

std::string blender::gpu::MTLShader::compute_layout_declare ( const shader::ShaderCreateInfo & info) const
overridevirtual

Implements blender::gpu::Shader.

Definition at line 848 of file mtl_shader_generator.mm.

◆ compute_shader_from_glsl()

◆ finalize()

◆ finalize_compute()

bool blender::gpu::MTLShader::finalize_compute ( const shader::ShaderCreateInfo * info)

◆ fragment_interface_declare()

std::string blender::gpu::MTLShader::fragment_interface_declare ( const shader::ShaderCreateInfo & info) const
overridevirtual

◆ fragment_shader_from_glsl()

◆ geometry_interface_declare()

std::string blender::gpu::MTLShader::geometry_interface_declare ( const shader::ShaderCreateInfo & info) const
overridevirtual

Implements blender::gpu::Shader.

◆ geometry_layout_declare()

std::string blender::gpu::MTLShader::geometry_layout_declare ( const shader::ShaderCreateInfo & info) const
overridevirtual

Implements blender::gpu::Shader.

Definition at line 842 of file mtl_shader_generator.mm.

References BLI_assert_msg.

◆ geometry_shader_from_glsl()

void blender::gpu::MTLShader::geometry_shader_from_glsl ( MutableSpan< const char * > sources)
overridevirtual

Implements blender::gpu::Shader.

Definition at line 218 of file mtl_shader.mm.

References MTL_LOG_ERROR.

◆ get_compute_common_state()

const MTLComputePipelineStateCommon & blender::gpu::MTLShader::get_compute_common_state ( )
inline

◆ get_current_pipeline_state()

MTLRenderPipelineStateDescriptor & blender::gpu::MTLShader::get_current_pipeline_state ( )
inline

Definition at line 313 of file mtl_shader.hh.

◆ get_interface()

◆ get_push_constant_data()

void * blender::gpu::MTLShader::get_push_constant_data ( )
inline

◆ get_push_constant_is_dirty()

bool blender::gpu::MTLShader::get_push_constant_is_dirty ( )

Definition at line 724 of file mtl_shader.mm.

Referenced by blender::gpu::MTLContext::ensure_buffer_bindings().

◆ get_ssbo_vertex_fetch_output_num_verts()

int blender::gpu::MTLShader::get_ssbo_vertex_fetch_output_num_verts ( ) const
inlineoverridevirtual

Implements blender::gpu::Shader.

Definition at line 354 of file mtl_shader.hh.

Referenced by blender::gpu::MTLImmediate::end().

◆ get_ssbo_vertex_fetch_output_prim_type()

MTLPrimitiveType blender::gpu::MTLShader::get_ssbo_vertex_fetch_output_prim_type ( )
inline

Definition at line 365 of file mtl_shader.hh.

Referenced by blender::gpu::MTLImmediate::end().

◆ get_transform_feedback_active_buffer()

blender::gpu::VertBuf * blender::gpu::MTLShader::get_transform_feedback_active_buffer ( )

◆ get_uses_ssbo_vertex_fetch()

bool blender::gpu::MTLShader::get_uses_ssbo_vertex_fetch ( ) const
inlineoverridevirtual

◆ has_compute_shader_lib()

bool blender::gpu::MTLShader::has_compute_shader_lib ( )
inline

◆ has_parent_shader()

bool blender::gpu::MTLShader::has_parent_shader ( )
inline

Definition at line 309 of file mtl_shader.hh.

References blender::gpu::Shader::parent_shader_.

◆ has_transform_feedback_varying()

◆ init()

void blender::gpu::MTLShader::init ( const shader::ShaderCreateInfo & ,
bool is_batch_compilation )
overridevirtual

Implements blender::gpu::Shader.

Definition at line 190 of file mtl_shader.mm.

◆ is_valid()

◆ prepare_ssbo_vertex_fetch_metadata()

◆ program_handle_get()

int blender::gpu::MTLShader::program_handle_get ( ) const
inlineoverridevirtual

Implements blender::gpu::Shader.

Definition at line 360 of file mtl_shader.hh.

◆ push_constant_bindstate_mark_dirty()

void blender::gpu::MTLShader::push_constant_bindstate_mark_dirty ( bool is_dirty)

◆ resources_declare()

◆ set_compute_function_name()

void blender::gpu::MTLShader::set_compute_function_name ( NSString * compute_function_name)

Definition at line 782 of file mtl_shader.mm.

◆ set_fragment_function_name()

void blender::gpu::MTLShader::set_fragment_function_name ( NSString * fragment_function_name)

Definition at line 777 of file mtl_shader.mm.

Referenced by MTLShader().

◆ set_interface()

void blender::gpu::MTLShader::set_interface ( MTLShaderInterface * interface)

Definition at line 803 of file mtl_shader.mm.

References BLI_assert, and blender::gpu::Shader::interface.

Referenced by finalize(), and MTLShader().

◆ set_vertex_function_name()

void blender::gpu::MTLShader::set_vertex_function_name ( NSString * vetex_function_name)

Definition at line 772 of file mtl_shader.mm.

Referenced by MTLShader().

◆ shader_compute_source_from_msl()

void blender::gpu::MTLShader::shader_compute_source_from_msl ( NSString * input_compute_source)

◆ shader_source_from_msl()

void blender::gpu::MTLShader::shader_source_from_msl ( NSString * input_vertex_source,
NSString * input_fragment_source )

◆ ssbo_vertex_fetch_bind_attribute()

◆ ssbo_vertex_fetch_bind_attributes_begin()

void blender::gpu::MTLShader::ssbo_vertex_fetch_bind_attributes_begin ( )

◆ ssbo_vertex_fetch_bind_attributes_end()

◆ ssbo_vertex_type_to_attr_type()

◆ transform_feedback_disable()

void blender::gpu::MTLShader::transform_feedback_disable ( )
overridevirtual

Implements blender::gpu::Shader.

Definition at line 519 of file mtl_shader.mm.

◆ transform_feedback_enable()

bool blender::gpu::MTLShader::transform_feedback_enable ( VertBuf * buf)
overridevirtual

Implements blender::gpu::Shader.

Definition at line 508 of file mtl_shader.mm.

References BLI_assert, GPU_SHADER_TFB_NONE, and GPU_USAGE_DEVICE_ONLY.

◆ transform_feedback_names_set()

void blender::gpu::MTLShader::transform_feedback_names_set ( Span< const char * > name_list,
const eGPUShaderTFBType geom_type )
overridevirtual

◆ unbind()

void blender::gpu::MTLShader::unbind ( )
overridevirtual

◆ uniform_float()

◆ uniform_int()

◆ vertex_interface_declare()

std::string blender::gpu::MTLShader::vertex_interface_declare ( const shader::ShaderCreateInfo & info) const
overridevirtual

◆ vertex_shader_from_glsl()

void blender::gpu::MTLShader::vertex_shader_from_glsl ( MutableSpan< const char * > sources)
overridevirtual

◆ warm_cache()

Member Data Documentation

◆ uni_ssbo_index_base_loc

int blender::gpu::MTLShader::uni_ssbo_index_base_loc = -1

◆ uni_ssbo_input_prim_type_loc

int blender::gpu::MTLShader::uni_ssbo_input_prim_type_loc = -1

◆ uni_ssbo_input_vert_count_loc

int blender::gpu::MTLShader::uni_ssbo_input_vert_count_loc = -1

◆ uni_ssbo_uses_index_mode_u16

int blender::gpu::MTLShader::uni_ssbo_uses_index_mode_u16 = -1

◆ uni_ssbo_uses_indexed_rendering

int blender::gpu::MTLShader::uni_ssbo_uses_indexed_rendering = -1

The documentation for this class was generated from the following files: