- for (i = 0; i < softpipe->num_fragment_sampler_views; i++) {
- sp_flush_tex_tile_cache(softpipe->fragment_tex_cache[i]);
- }
- for (i = 0; i < softpipe->num_vertex_sampler_views; i++) {
- sp_flush_tex_tile_cache(softpipe->vertex_tex_cache[i]);
- }
- for (i = 0; i < softpipe->num_geometry_sampler_views; i++) {
- sp_flush_tex_tile_cache(softpipe->geometry_tex_cache[i]);
+ unsigned sh;
+
+ for (sh = 0; sh < Elements(softpipe->tex_cache); sh++) {
+ for (i = 0; i < softpipe->num_sampler_views[sh]; i++) {
+ sp_flush_tex_tile_cache(softpipe->tex_cache[sh][i]);
+ }