Page MenuHome

Metal: Optimize shader local memory usage.
ClosedPublic

Authored by Jason Fielder (jason_apple) on Mon, Jan 23, 12:20 PM.

Details

Summary

Due to shader global scope emulation via class interface, global constant arrays in shaders are allocated in per-thread shader local memory. To reduce memory pressure, placing these constant arrays inside function scope will ensure they only reside within device constant memory. This results in a tangible 1.5-2x performance uplift for the specific shaders affected.

Authored by Apple: Michael Parkin-White

Ref T96261

Diff Detail

Repository
rB Blender
Branch
viewport_commits/OptimizeLocalShaderMemory
Build Status
Buildable 25516
Build 25516: arc lint + arc unit

Event Timeline

Jason Fielder (jason_apple) requested review of this revision.Mon, Jan 23, 12:20 PM
Jason Fielder (jason_apple) created this revision.
This revision is now accepted and ready to land.Mon, Jan 23, 12:39 PM