-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Split off from #128919
Continuation of #128963
Unlike Metal, constructing new PSO variants in vulkan is incredibly expensive - on the order of milliseconds. Current the content_context.cc setup will attempt to construct a default PSO for every shader we have. Unfortunately some of the defaults don't match what the application will end up using, so aside from wasting time at startup we're guaranteeing that we'll need to compile a PSO in a frame workload.
In no particular order:
All PSOs are generated with sample count of 1, whereas 4 is the default MSAA config
Several PSOs appear to have an unknown pixel format, meaning they're not actually valid. Perhaps a race between knowing which pixel format to use and the offscreen format.
The primitive type defaults to kTriangle but some shaders only use kTriangleStrip like clips. This should be configured.
SrcOver is the default blend mode, but SrcOver to Src cooercsion will commonly apply to several variants and should be pre-cached.
Stencil operations frequently mismatch. The default is kEqual, but textures use kAlways and strokes use kLess