[Mesa-dev] [PATCH] cso: handle sampler view changes the same way for all shader types

Marek Olšák maraeo at gmail.com
Thu Dec 10 14:56:22 PST 2015

On Thu, Dec 10, 2015 at 10:14 PM, Brian Paul <brianp at vmware.com> wrote:
> Previously, we were tracking sampler views for fragment shaders and
> suppressing redundant state changes, but not for other types of shaders.
> Now sampler views for all shader types are handled the same way.

I removed this not so long ago:

The reasons were:
1) Meta ops didn't save/restore samplers for non-fragment shaders.
2) Drivers can avoid redundant state updates at per-slot granularity,
unlike cso_context. Therefore, cso_context can never be faster than
drivers, but it can be slower if drivers do the same thing (or do
it better).
3) Drivers have to keep a copy of all sampler views too. There is no
reason to keep another copy of all views elsewhere.

My belief was that doing unnecessary work in cso_context was hurting
us, but I didn't have any performance numbers.

The same applies to sampler states.


More information about the mesa-dev mailing list