From: Marek Olšák Date: Sun, 20 Jun 2010 12:05:48 +0000 (+0200) Subject: r300g: fix assigning the texture cache region for 1 texture X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=646e9c2fd7b5974480fcbed0bef7281b4d4a0e65;p=mesa.git r300g: fix assigning the texture cache region for 1 texture --- 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,