Mesa (master): softpipe: fix loop limit for tex_cache[] array

Brian Paul brianp at kemper.freedesktop.org
Tue Aug 7 14:01:00 UTC 2012


Module: Mesa
Branch: master
Commit: 99695f58fde6d364f2310d97303768782a1e537d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=99695f58fde6d364f2310d97303768782a1e537d

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Aug  7 08:00:09 2012 -0600

softpipe: fix loop limit for tex_cache[] array

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=53199

---

 src/gallium/drivers/softpipe/sp_flush.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c
index 9b8d492..2866085 100644
--- a/src/gallium/drivers/softpipe/sp_flush.c
+++ b/src/gallium/drivers/softpipe/sp_flush.c
@@ -54,7 +54,7 @@ softpipe_flush( struct pipe_context *pipe,
    if (flags & SP_FLUSH_TEXTURE_CACHE) {
       unsigned sh;
 
-      for (sh = 0; sh < PIPE_SHADER_TYPES; 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]);
          }




More information about the mesa-commit mailing list