}
ctx->dirty = ~0L;
+ ctx->dirty_sampler_views = ~0L;
/* go through all the used resources and clear their status flag */
LIST_FOR_EACH_ENTRY_SAFE(rsc, rsc_tmp, &ctx->used_resources, list)
struct compiled_viewport_state viewport;
unsigned num_fragment_sampler_views;
uint32_t active_sampler_views;
+ uint32_t dirty_sampler_views;
struct pipe_sampler_view *sampler_view[PIPE_MAX_SAMPLERS];
struct pipe_constant_buffer constant_buffer[PIPE_SHADER_TYPES];
struct etna_vertexbuf_state vertex_buffer;
{
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;
}
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