|
Blender V5.0
|
#include <mtl_context.hh>
Public Member Functions | |
| MTLComputeState (MTLContext &context, MTLCommandBufferManager &command_buffer_manager) | |
Render Pass State for active RenderCommandEncoder | |
| void | reset_state () |
| void | bind_pso (id< MTLComputePipelineState > pso) |
| void | bind_compute_texture (id< MTLTexture > tex, uint slot) |
| void | bind_compute_sampler (MTLSamplerBinding &sampler_binding, bool use_argument_buffer_for_samplers, uint slot) |
| void | bind_compute_buffer (id< MTLBuffer > buffer, uint64_t buffer_offset, uint index) |
| void | bind_compute_bytes (const void *bytes, uint64_t length, uint index) |
Public Attributes | |
| MTLContext & | ctx |
| MTLCommandBufferManager & | cmd |
| id< MTLComputePipelineState > | bound_pso = nil |
| BufferBindingCached | cached_compute_buffer_bindings [MTL_MAX_BUFFER_BINDINGS] |
| TextureBindingCached | cached_compute_texture_bindings [MTL_MAX_TEXTURE_SLOTS] |
| SamplerStateBindingCached | cached_compute_sampler_state_bindings [MTL_MAX_TEXTURE_SLOTS] |
Friends | |
| class | MTLContext |
Definition at line 151 of file mtl_context.hh.
|
inline |
Definition at line 155 of file mtl_context.hh.
References cmd, ctx, and MTLContext.
| void blender::gpu::MTLComputeState::bind_compute_buffer | ( | id< MTLBuffer > | buffer, |
| uint64_t | buffer_offset, | ||
| uint | index ) |
Definition at line 973 of file mtl_command_buffer.mm.
References BLI_assert, cached_compute_buffer_bindings, cmd, blender::gpu::BufferBindingCached::is_bytes, blender::gpu::BufferBindingCached::metal_buffer, MTL_MAX_BUFFER_BINDINGS, and blender::gpu::BufferBindingCached::offset.
Referenced by bind_compute_bytes(), blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLContext::ensure_buffer_bindings(), blender::gpu::MTLContext::ensure_texture_bindings(), and blender::gpu::MTLTexture::update_sub().
| void blender::gpu::MTLComputeState::bind_compute_bytes | ( | const void * | bytes, |
| uint64_t | length, | ||
| uint | index ) |
Definition at line 1053 of file mtl_command_buffer.mm.
References bind_compute_buffer(), BLI_assert, blender::gpu::MTLBufferRange::buffer_offset, cached_compute_buffer_bindings, cmd, ctx, blender::gpu::MTLBufferRange::data, length(), blender::gpu::MTLBufferRange::metal_buffer, MTL_MAX_BUFFER_BINDINGS, and MTL_MAX_SET_BYTES_SIZE.
Referenced by blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLTexture::clear(), blender::gpu::MTLContext::ensure_buffer_bindings(), and blender::gpu::MTLTexture::update_sub().
| void blender::gpu::MTLComputeState::bind_compute_sampler | ( | MTLSamplerBinding & | sampler_binding, |
| bool | use_argument_buffer_for_samplers, | ||
| uint | slot ) |
Definition at line 868 of file mtl_command_buffer.mm.
References BLI_assert, cached_compute_sampler_state_bindings, cmd, ctx, blender::gpu::DEFAULT_SAMPLER_STATE, MTL_MAX_TEXTURE_SLOTS, blender::gpu::sampler_binding(), and UNUSED_VARS_NDEBUG.
Referenced by blender::gpu::MTLContext::ensure_texture_bindings().
| void blender::gpu::MTLComputeState::bind_compute_texture | ( | id< MTLTexture > | tex, |
| uint | slot ) |
Definition at line 776 of file mtl_command_buffer.mm.
References BLI_assert, cached_compute_texture_bindings, and cmd.
Referenced by blender::gpu::MTLTexture::clear(), blender::gpu::MTLContext::ensure_texture_bindings(), and blender::gpu::MTLTexture::update_sub().
| void blender::gpu::MTLComputeState::bind_pso | ( | id< MTLComputePipelineState > | pso | ) |
Definition at line 1078 of file mtl_command_buffer.mm.
References bound_pso, and cmd.
Referenced by blender::gpu::MTLStorageBuf::clear(), blender::gpu::MTLTexture::clear(), blender::gpu::MTLContext::compute_dispatch(), blender::gpu::MTLContext::compute_dispatch_indirect(), and blender::gpu::MTLTexture::update_sub().
| void blender::gpu::MTLComputeState::reset_state | ( | ) |
Definition at line 735 of file mtl_command_buffer.mm.
References bound_pso, cached_compute_buffer_bindings, cached_compute_sampler_state_bindings, cached_compute_texture_bindings, MTL_MAX_BUFFER_BINDINGS, and MTL_MAX_TEXTURE_SLOTS.
|
friend |
Definition at line 152 of file mtl_context.hh.
References MTLContext.
Referenced by MTLComputeState(), and MTLContext.
| id<MTLComputePipelineState> blender::gpu::MTLComputeState::bound_pso = nil |
Definition at line 163 of file mtl_context.hh.
Referenced by bind_pso(), and reset_state().
| BufferBindingCached blender::gpu::MTLComputeState::cached_compute_buffer_bindings[MTL_MAX_BUFFER_BINDINGS] |
Definition at line 164 of file mtl_context.hh.
Referenced by bind_compute_buffer(), bind_compute_bytes(), and reset_state().
| SamplerStateBindingCached blender::gpu::MTLComputeState::cached_compute_sampler_state_bindings[MTL_MAX_TEXTURE_SLOTS] |
Definition at line 166 of file mtl_context.hh.
Referenced by bind_compute_sampler(), and reset_state().
| TextureBindingCached blender::gpu::MTLComputeState::cached_compute_texture_bindings[MTL_MAX_TEXTURE_SLOTS] |
Definition at line 165 of file mtl_context.hh.
Referenced by bind_compute_texture(), and reset_state().
| MTLCommandBufferManager& blender::gpu::MTLComputeState::cmd |
Definition at line 161 of file mtl_context.hh.
Referenced by bind_compute_buffer(), bind_compute_bytes(), bind_compute_sampler(), bind_compute_texture(), bind_pso(), and MTLComputeState().
| MTLContext& blender::gpu::MTLComputeState::ctx |
Definition at line 160 of file mtl_context.hh.
Referenced by bind_compute_bytes(), bind_compute_sampler(), and MTLComputeState().