summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_texture.c
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-11-18 10:44:37 +0100
committerChristian Gmeiner <[email protected]>2017-11-30 07:33:07 +0100
commit9d1f8805b02bd15bc596de77f56837d83144689f (patch)
tree48a49edbd8b2fa69f7829857aeff14f6838879c2 /src/gallium/drivers/etnaviv/etnaviv_texture.c
parent5cc36f9f2183ce17c38b19eea865ed742478e767 (diff)
etnaviv: GC7000: Track dirty sampler views
Need this to efficiently emit texture descriptor invalidations. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_texture.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c
index 6a33f787a1b..295f7eb676c 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c
@@ -345,12 +345,14 @@ set_sampler_views(struct etna_context *ctx, unsigned start, unsigned end,
{
unsigned i, j;
uint32_t mask = 1 << start;
+ uint32_t prev_active_sampler_views = ctx->active_sampler_views;
for (i = start, j = 0; j < nr; i++, j++, mask <<= 1) {
pipe_sampler_view_reference(&ctx->sampler_view[i], views[j]);
- if (views[j])
+ if (views[j]) {
ctx->active_sampler_views |= mask;
- else
+ ctx->dirty_sampler_views |= mask;
+ } else
ctx->active_sampler_views &= ~mask;
}
@@ -358,6 +360,9 @@ set_sampler_views(struct etna_context *ctx, unsigned start, unsigned end,
pipe_sampler_view_reference(&ctx->sampler_view[i], NULL);
ctx->active_sampler_views &= ~mask;
}
+
+ /* sampler views that changed state (even to inactive) are also dirty */
+ ctx->dirty_sampler_views |= ctx->active_sampler_views ^ prev_active_sampler_views;
}
static inline void