summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state_derived.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-04-08 03:11:22 +0200
committerMarek Olšák <maraeo@gmail.com>2011-04-08 04:38:36 +0200
commit10ea8567f49f4daaa654b6e4c365a816f855073b (patch)
treee6ac3732ad74783a716bde291211bb79e6b4bedd /src/gallium/drivers/r300/r300_state_derived.c
parent9d5de0fcb6ced7a4da85a09ad25dcbc2b21bfdf9 (diff)
downloadexternal_mesa3d-10ea8567f49f4daaa654b6e4c365a816f855073b.zip
external_mesa3d-10ea8567f49f4daaa654b6e4c365a816f855073b.tar.gz
external_mesa3d-10ea8567f49f4daaa654b6e4c365a816f855073b.tar.bz2
r300g: fix texturing with sizes > 2048 on r500
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_derived.c')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index e943f1a..c80cf78 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -771,6 +771,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
unsigned min_level, max_level, i, j, size;
unsigned count = MIN2(state->sampler_view_count,
state->sampler_state_count);
+ boolean has_us_format = r300->screen->caps.has_us_format;
/* The KIL opcode fix, see below. */
if (!count && !r300->screen->caps.is_r500)
@@ -923,7 +924,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
texstate->filter0 |= i << 28;
- size += 16;
+ size += 16 + (has_us_format ? 2 : 0);
state->count = i+1;
} else {
/* For the KIL opcode to work on r3xx-r4xx, the texture unit
@@ -952,7 +953,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
texstate->border_color = 0;
texstate->filter0 |= i << 28;
- size += 16;
+ size += 16 + (has_us_format ? 2 : 0);
state->count = i+1;
}
}