used in Non-Gaming Apps? • Understanding the Components of the Metal Pipeline and their Behavior • Building Efficient Pipelines with the Latest in Metal 4
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
the GPU state needed to execute a graphics draw call. • De fi nes the entire rendering pipeline con fi guration, including shader features, pixel format, blending, and other fi xed-function settings • MTLRenderPipelineState → MTL4RenderPipelineState Updated
the state of a Metal render pipeline • Con fi guration objects that contain settings necessary for GPU rendering, such as shader, render target format, blending, vertex layout, etc • MTLRenderPipelineDescriptor → MTL4RenderPipelineDescriptor Updated
stencil) are con fi gured and used in a render pass • To render directly to the current frame bu ff er (drawable), the currentMTL4RenderPassDescriptor provided by MTKView could be used • MTLRenderPassDescriptor → MTL4RenderPassDescriptor Updated
• Encodes rendering commands in the command bu ff er for a single rendering pass (MTL4RenderPassDescriptor) • MTLRenderCommandEncoder → MTL4RenderCommandEncoder Updated
Metal • Encode all compute operations, including kernel dispatches, blits, and acceleration structure builds, within a single compute encoder • MTLComputeCommandEncoder → MTL4ComputeCommandEncoder Updated
a drawable as late as possible • If possible, just before encoding the render path on the screen • Always release a drawable as soon as possible • If possible, immediately after completing the CPU operation of the frame.
content on the render target .dontCare • The previous content is discarded. The GPU does not preserve the existing data .clear • The render target is cleared to a speci fi ed clear color or value .load • The previous content is preserved and loaded for use in the render pass
do with the rendered content after the render pass .dontCare • The rendered content is discarded. Use this if the output is not needed afterward .store • The rendered content is preserved and stored in memory for later use .storeAndMultisampleResolve • Resolves a multisample render target and stores the result .multisampleResolve • Resolves a multisample render target, but does not store the result