Page MenuHome

GPU: Shader Interface: Set sampler fixed indices to avoid driver slowdown
AbandonedPublic

Authored by Clément Foucault (fclem) on May 26 2020, 10:30 PM.

Details

Reviewers
None
Summary

This is related to T70445 (Very slow Eevee performance on Mac with AMD Radeon)

This patch assign fixed indices to each texture uniform which are then used
by draw manager to avoid binding textures to different sampler units, and
thus avoiding shader recompilation.

DRW logic is also revisited to be simpler. Note that we unbind all textures
if we change shader. This could be costly on some driver so this need some
profiling. In doubt we could only do that on OSX.

This is a minimal patch. A better implementation would necessitate a rewrite
of the GPUShaderInterface.

Diff Detail

Repository
rB Blender
Branch
tmp-T70445 (branched from master)
Build Status
Buildable 8229
Build 8229: arc lint + arc unit

Event Timeline

Clément Foucault (fclem) requested review of this revision.May 26 2020, 10:30 PM

This has been replaced by a better rewrite of the shader interface D7879.