summaryrefslogtreecommitdiffstats
path: root/src/mesa/Makefile.sources
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-09-30 16:41:46 -0600
committerBrian Paul <[email protected]>2016-10-06 11:29:32 -0600
commite5cc84dd43be066c1dd418e32f5ad258e31a150a (patch)
treefc693054ebad7517d3c63f1796e3bbc9b68e63b9 /src/mesa/Makefile.sources
parent0f3aee888efa820cb9875cfebc83cf8cc855f599 (diff)
st/mesa: optimize pipe_sampler_view validation
Before, st_get_texture_sampler_view_from_stobj() did a lot of work to check if the texture parameters matched the sampler view (format, swizzle, min/max lod, first/last layer, etc). We did this every time we validated the texture state. Now, we use a ctx->Driver.TexParameter() callback and a couple other checks to proactively release texture views when we know that view-related parameters have changed. Then, the validation step is simplified: - Search the texture's list of sampler views (just match the context). - If found, we're done. - Else, create a new sampler view. There will never be old, out-of-date sampler views attached to texture objects that we have to test. Most apps create textures and set the texture parameters once. This make sampler view validation much cheaper for that case. Note that the old texture/sampler comparison code has been converted into a set of assertions to verify that the sampler view is in fact consistent with the texture parameters. This should help to spot any potential regressions. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/Makefile.sources')
0 files changed, 0 insertions, 0 deletions