[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.
>
> v2: s/PIPE_MAX_SAMPLERS/PIPE_MAX_SHADER_SAMPLER_VIEWS/, per Ilia.
I removed this not so long ago:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3639d66a473591e21aa2ec7692c95c827b479632
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.
Marek
More information about the mesa-dev
mailing list