diff options
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_flush.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_flush.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index 4651e8bb56b..9b8d492cde1 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -52,14 +52,12 @@ softpipe_flush( struct pipe_context *pipe, draw_flush(softpipe->draw); if (flags & SP_FLUSH_TEXTURE_CACHE) { - for (i = 0; i < softpipe->num_fragment_sampler_views; i++) { - sp_flush_tex_tile_cache(softpipe->tex_cache[PIPE_SHADER_FRAGMENT][i]); - } - for (i = 0; i < softpipe->num_vertex_sampler_views; i++) { - sp_flush_tex_tile_cache(softpipe->tex_cache[PIPE_SHADER_VERTEX][i]); - } - for (i = 0; i < softpipe->num_geometry_sampler_views; i++) { - sp_flush_tex_tile_cache(softpipe->tex_cache[PIPE_SHADER_GEOMETRY][i]); + unsigned sh; + + for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) { + for (i = 0; i < softpipe->num_sampler_views[sh]; i++) { + sp_flush_tex_tile_cache(softpipe->tex_cache[sh][i]); + } } } |