mesa: translate into pipe_sampler_state in GL functions
authorMarek Olšák <marek.olsak@amd.com>
Sun, 6 Jun 2021 17:37:38 +0000 (13:37 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 27 Jun 2021 14:28:39 +0000 (10:28 -0400)
commit0c70a63f5fb6713b5c1e35c96bdc7411c41386d6
tree9509d4935dd7df6db9fb0adb365eed1683fc0dba
parent553588194e4d6b3faa87a2746db210102062ff09
mesa: translate into pipe_sampler_state in GL functions

- pipe_sampler_state is added into gl_sampler_attrib.
- The border color field is redundant, so the non-gallium field is removed.
- Other GL fields are still tracked because of glGet.
- Some fields are not set by GL functions because they are always derived
  from multiple states.
- The behavior in GL functions is the same as st_convert_sampler.

This reduces overhead by 2% for drawoverhead/8 textures, and more is going
to be done.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11339>
19 files changed:
src/mesa/drivers/dri/i915/i830_texstate.c
src/mesa/drivers/dri/i915/i915_texstate.c
src/mesa/drivers/dri/i965/genX_state_upload.c
src/mesa/drivers/dri/nouveau/nv20_state_tex.c
src/mesa/drivers/dri/r200/r200_tex.c
src/mesa/drivers/dri/radeon/radeon_tex.c
src/mesa/main/dlist.c
src/mesa/main/mtypes.h
src/mesa/main/samplerobj.c
src/mesa/main/samplerobj.h
src/mesa/main/texobj.c
src/mesa/main/texparam.c
src/mesa/main/texturebindless.c
src/mesa/state_tracker/st_atom.h
src/mesa/state_tracker/st_atom_depth.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_format.h
src/mesa/swrast/s_texfilter.c