Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_command_buffer.mm
| Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | if (@available(macOS 10.14, *)) { | ||||
| /* Resolve scope. */ | /* Resolve scope. */ | ||||
| MTLBarrierScope scope = 0; | MTLBarrierScope scope = 0; | ||||
| if (barrier_bits & GPU_BARRIER_SHADER_IMAGE_ACCESS || | if (barrier_bits & GPU_BARRIER_SHADER_IMAGE_ACCESS || | ||||
| barrier_bits & GPU_BARRIER_TEXTURE_FETCH) { | barrier_bits & GPU_BARRIER_TEXTURE_FETCH) { | ||||
| scope = scope | MTLBarrierScopeTextures | MTLBarrierScopeRenderTargets; | scope = scope | MTLBarrierScopeTextures | MTLBarrierScopeRenderTargets; | ||||
| } | } | ||||
| if (barrier_bits & GPU_BARRIER_SHADER_STORAGE || | if (barrier_bits & GPU_BARRIER_SHADER_STORAGE || | ||||
| barrier_bits & GPU_BARRIER_VERTEX_ATTRIB_ARRAY || | barrier_bits & GPU_BARRIER_VERTEX_ATTRIB_ARRAY || | ||||
| barrier_bits & GPU_BARRIER_ELEMENT_ARRAY) { | barrier_bits & GPU_BARRIER_ELEMENT_ARRAY || barrier_bits & GPU_BARRIER_UNIFORM) { | ||||
| scope = scope | MTLBarrierScopeBuffers; | scope = scope | MTLBarrierScopeBuffers; | ||||
| } | } | ||||
| if (scope != 0) { | if (scope != 0) { | ||||
| /* Issue barrier based on encoder. */ | /* Issue barrier based on encoder. */ | ||||
| switch (active_command_encoder_type_) { | switch (active_command_encoder_type_) { | ||||
| case MTL_NO_COMMAND_ENCODER: | case MTL_NO_COMMAND_ENCODER: | ||||
| case MTL_BLIT_COMMAND_ENCODER: { | case MTL_BLIT_COMMAND_ENCODER: { | ||||
| ▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines | |||||