Mesa (master): r300g: fix assigning the texture cache region for 1 texture

Marek Olšák mareko at kemper.freedesktop.org
Sun Jun 20 12:08:09 UTC 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jun 20 14:05:48 2010 +0200

r300g: fix assigning the texture cache region for 1 texture

---

 src/gallium/drivers/r300/r300_state.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 9c5a2a0..3f0acd9 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1126,7 +1126,10 @@ static uint32_t r300_assign_texture_cache_region(unsigned index, unsigned num)
      *
      * This simple trick works for all "num" <= 16.
      */
-    return R300_TX_CACHE(num + index);
+    if (num <= 1)
+        return R300_TX_CACHE(R300_TX_CACHE_WHOLE);
+    else
+        return R300_TX_CACHE(num + index);
 }
 
 static void r300_set_fragment_sampler_views(struct pipe_context* pipe,




More information about the mesa-commit mailing list