From 646e9c2fd7b5974480fcbed0bef7281b4d4a0e65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 20 Jun 2010 14:05:48 +0200 Subject: [PATCH] r300g: fix assigning the texture cache region for 1 texture --- src/gallium/drivers/r300/r300_state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 9c5a2a05bd4..3f0acd99489 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, -- 2.30.2