Mesa (7.9): cso: fix loop bound in cso_set_vertex_samplers()

Brian Paul brianp at kemper.freedesktop.org
Tue Feb 22 01:20:22 UTC 2011


Module: Mesa
Branch: 7.9
Commit: 652ceece0e01be9e481b468359c32b8a4506b661
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=652ceece0e01be9e481b468359c32b8a4506b661

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Feb  2 18:11:27 2011 -0700

cso: fix loop bound in cso_set_vertex_samplers()

Before we were looping to nr_samplers, which is the number of fragment
samplers, not vertex samplers.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit d087cfaabf386c462329fb62f54311523a89f106)

---

 src/gallium/auxiliary/cso_cache/cso_context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 58b022d..b983fa6 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -595,7 +595,7 @@ enum pipe_error cso_set_vertex_samplers(struct cso_context *ctx,
          error = temp;
    }
 
-   for ( ; i < ctx->nr_samplers; i++) {
+   for ( ; i < ctx->nr_vertex_samplers; i++) {
       temp = cso_single_vertex_sampler( ctx, i, NULL );
       if (temp != PIPE_OK)
          error = temp;




More information about the mesa-commit mailing list