Blender
V3.3
|
#include <mtl_context.hh>
Classes | |
struct | BufferBindingCached |
struct | MTLBoundShaderState |
struct | SamplerStateBindingCached |
struct | TextureBindingCached |
Public Member Functions | |
MTLRenderPassState (MTLContext &context, MTLCommandBufferManager &command_buffer_manager) | |
Render Pass State for active RenderCommandEncoder | |
void | reset_state () |
void | bind_vertex_texture (id< MTLTexture > tex, uint slot) |
void | bind_fragment_texture (id< MTLTexture > tex, uint slot) |
void | bind_vertex_sampler (MTLSamplerBinding &sampler_binding, bool use_argument_buffer_for_samplers, uint slot) |
void | bind_fragment_sampler (MTLSamplerBinding &sampler_binding, bool use_argument_buffer_for_samplers, uint slot) |
void | bind_vertex_buffer (id< MTLBuffer > buffer, uint buffer_offset, uint index) |
void | bind_fragment_buffer (id< MTLBuffer > buffer, uint buffer_offset, uint index) |
void | bind_vertex_bytes (void *bytes, uint length, uint index) |
void | bind_fragment_bytes (void *bytes, uint length, uint index) |
Friends | |
class | MTLContext |
Definition at line 60 of file mtl_context.hh.
|
inline |
Definition at line 63 of file mtl_context.hh.
void blender::gpu::MTLRenderPassState::bind_fragment_buffer | ( | id< MTLBuffer > | buffer, |
uint | buffer_offset, | ||
uint | index | ||
) |
Definition at line 632 of file mtl_command_buffer.mm.
void blender::gpu::MTLRenderPassState::bind_fragment_bytes | ( | void * | bytes, |
uint | length, | ||
uint | index | ||
) |
Definition at line 644 of file mtl_command_buffer.mm.
void blender::gpu::MTLRenderPassState::bind_fragment_sampler | ( | MTLSamplerBinding & | sampler_binding, |
bool | use_argument_buffer_for_samplers, | ||
uint | slot | ||
) |
Definition at line 618 of file mtl_command_buffer.mm.
void blender::gpu::MTLRenderPassState::bind_fragment_texture | ( | id< MTLTexture > | tex, |
uint | slot | ||
) |
Definition at line 600 of file mtl_command_buffer.mm.
References BLI_assert, cached_fragment_texture_bindings, cmd, blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder(), blender::gpu::MTLRenderPassState::TextureBindingCached::metal_texture, and tex.
void blender::gpu::MTLRenderPassState::bind_vertex_buffer | ( | id< MTLBuffer > | buffer, |
uint | buffer_offset, | ||
uint | index | ||
) |
Definition at line 626 of file mtl_command_buffer.mm.
Definition at line 638 of file mtl_command_buffer.mm.
void blender::gpu::MTLRenderPassState::bind_vertex_sampler | ( | MTLSamplerBinding & | sampler_binding, |
bool | use_argument_buffer_for_samplers, | ||
uint | slot | ||
) |
Definition at line 610 of file mtl_command_buffer.mm.
void blender::gpu::MTLRenderPassState::bind_vertex_texture | ( | id< MTLTexture > | tex, |
uint | slot | ||
) |
Definition at line 590 of file mtl_command_buffer.mm.
References BLI_assert, cached_vertex_texture_bindings, cmd, blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder(), blender::gpu::MTLRenderPassState::TextureBindingCached::metal_texture, and tex.
void blender::gpu::MTLRenderPassState::reset_state | ( | ) |
Definition at line 549 of file mtl_command_buffer.mm.
References bound_ds_state, bound_pso, cached_fragment_buffer_bindings, cached_fragment_sampler_state_bindings, cached_fragment_texture_bindings, cached_vertex_buffer_bindings, cached_vertex_sampler_state_bindings, cached_vertex_texture_bindings, cmd, fb(), blender::gpu::MTLCommandBufferManager::get_active_framebuffer(), blender::gpu::MTLRenderPassState::SamplerStateBindingCached::is_arg_buffer_binding, blender::gpu::MTLRenderPassState::BufferBindingCached::is_bytes, last_bound_shader_state, last_scissor_rect, last_used_stencil_ref_value, blender::gpu::MTLRenderPassState::BufferBindingCached::metal_buffer, blender::gpu::MTLRenderPassState::TextureBindingCached::metal_texture, MTL_MAX_TEXTURE_SLOTS, MTL_MAX_UNIFORM_BUFFER_BINDINGS, blender::gpu::MTLRenderPassState::BufferBindingCached::offset, blender::gpu::MTLRenderPassState::SamplerStateBindingCached::sampler_state, blender::gpu::MTLRenderPassState::MTLBoundShaderState::set(), and tex.
Referenced by blender::gpu::MTLCommandBufferManager::ensure_begin_render_command_encoder(), and blender::gpu::MTLCommandBufferManager::prepare().
|
friend |
Definition at line 61 of file mtl_context.hh.
id<MTLDepthStencilState> blender::gpu::MTLRenderPassState::bound_ds_state = nil |
Definition at line 86 of file mtl_context.hh.
Referenced by reset_state().
id<MTLRenderPipelineState> blender::gpu::MTLRenderPassState::bound_pso = nil |
Definition at line 85 of file mtl_context.hh.
Referenced by reset_state().
BufferBindingCached blender::gpu::MTLRenderPassState::cached_fragment_buffer_bindings[MTL_MAX_UNIFORM_BUFFER_BINDINGS] |
Definition at line 100 of file mtl_context.hh.
Referenced by reset_state().
SamplerStateBindingCached blender::gpu::MTLRenderPassState::cached_fragment_sampler_state_bindings[MTL_MAX_TEXTURE_SLOTS] |
Definition at line 118 of file mtl_context.hh.
Referenced by reset_state().
TextureBindingCached blender::gpu::MTLRenderPassState::cached_fragment_texture_bindings[MTL_MAX_TEXTURE_SLOTS] |
Definition at line 108 of file mtl_context.hh.
Referenced by bind_fragment_texture(), and reset_state().
BufferBindingCached blender::gpu::MTLRenderPassState::cached_vertex_buffer_bindings[MTL_MAX_UNIFORM_BUFFER_BINDINGS] |
Definition at line 99 of file mtl_context.hh.
Referenced by reset_state().
SamplerStateBindingCached blender::gpu::MTLRenderPassState::cached_vertex_sampler_state_bindings[MTL_MAX_TEXTURE_SLOTS] |
Definition at line 117 of file mtl_context.hh.
Referenced by reset_state().
TextureBindingCached blender::gpu::MTLRenderPassState::cached_vertex_texture_bindings[MTL_MAX_TEXTURE_SLOTS] |
Definition at line 107 of file mtl_context.hh.
Referenced by bind_vertex_texture(), and reset_state().
MTLCommandBufferManager& blender::gpu::MTLRenderPassState::cmd |
Definition at line 69 of file mtl_context.hh.
Referenced by bind_fragment_texture(), bind_vertex_texture(), and reset_state().
MTLContext& blender::gpu::MTLRenderPassState::ctx |
Definition at line 68 of file mtl_context.hh.
MTLBoundShaderState blender::gpu::MTLRenderPassState::last_bound_shader_state |
Definition at line 84 of file mtl_context.hh.
Referenced by reset_state().
MTLScissorRect blender::gpu::MTLRenderPassState::last_scissor_rect |
Definition at line 88 of file mtl_context.hh.
Referenced by reset_state().
uint blender::gpu::MTLRenderPassState::last_used_stencil_ref_value = 0 |
Definition at line 87 of file mtl_context.hh.
Referenced by reset_state().