diff options
author | Marek Olšák <[email protected]> | 2017-11-16 00:32:22 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-08 16:14:11 +0100 |
commit | 08496c5d52ded21db7417a3f1b098250d2dd73e7 (patch) | |
tree | 8a1409d0afa7e3e7a668f0501d9d0e8671f82e2f /src/mesa/state_tracker/st_context.c | |
parent | e8436677339d65449bdabefd3ed8bb5a65f13d46 (diff) |
st/mesa: don't store non-fragment sampler states and views in st_context
those are unused.
st_context: 10120 -> 3704 bytes
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 8274b9e0a8b..7e721572e0a 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -254,7 +254,7 @@ st_invalidate_state(struct gl_context *ctx) static void st_destroy_context_priv(struct st_context *st, bool destroy_pipe) { - uint shader, i; + uint i; st_destroy_atoms(st); st_destroy_draw(st); @@ -267,11 +267,9 @@ st_destroy_context_priv(struct st_context *st, bool destroy_pipe) st_destroy_bound_texture_handles(st); st_destroy_bound_image_handles(st); - for (shader = 0; shader < ARRAY_SIZE(st->state.sampler_views); shader++) { - for (i = 0; i < ARRAY_SIZE(st->state.sampler_views[0]); i++) { - pipe_sampler_view_release(st->pipe, - &st->state.sampler_views[shader][i]); - } + for (i = 0; i < ARRAY_SIZE(st->state.frag_sampler_views); i++) { + pipe_sampler_view_release(st->pipe, + &st->state.frag_sampler_views[i]); } /* free glReadPixels cache data */ |