16.06.2016 Views

Advanced Metal Shader Optimization

606_advanced_metal_shader_optimization

606_advanced_metal_shader_optimization

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Latency/Occupancy<br />

The more latency, the more threads you need to hide it<br />

The more registers you use, the fewer threads you have<br />

• The number of threads you can have is called the ‘occupancy’<br />

• Threadgroup memory usage can also bound the occupancy<br />

‘Latency-limited’: too few threads to hide latency of a shader<br />

Measure occupancy in <strong>Metal</strong> compute shaders using MTLComputePipelineState<br />

maxTotalThreadsPerThreadgroup()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!