Page MenuHome

Metal: Optimise shader texture cache usage and branch reduction via point sampling.
ClosedPublic

Authored by Jason Fielder (jason_apple) on Tue, Jan 17, 5:56 PM.

Details

Summary

Replace texelFetch calls with a texture point-sample rather than a textureRead call. This increases texture cache utilisation when mixing between sampled calls and reads. Bounds checking can also be removed from these functions, reducing instruction count and branch divergence, as the sampler routine handles range clamping.

Authored by Apple: Michael Parkin-White
Ref T96261

Depends on D16923

Diff Detail

Repository
rB Blender

Event Timeline

Jason Fielder (jason_apple) requested review of this revision.Tue, Jan 17, 5:56 PM
Jason Fielder (jason_apple) created this revision.
This revision is now accepted and ready to land.Mon, Jan 23, 10:49 AM
NOTE: Overlaps with (https://developer.blender.org/D16923) - fixing EEVEE shader compilations, with changes to 1D texture sampling. Best to first land the other patch. I will re-base this afterwards.

Rebased against latest master.