diff options
author | Marek Olšák <maraeo@gmail.com> | 2011-04-08 03:11:22 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-04-08 04:38:36 +0200 |
commit | 10ea8567f49f4daaa654b6e4c365a816f855073b (patch) | |
tree | e6ac3732ad74783a716bde291211bb79e6b4bedd /src/gallium/drivers/r300/r300_state_derived.c | |
parent | 9d5de0fcb6ced7a4da85a09ad25dcbc2b21bfdf9 (diff) | |
download | external_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.c | 5 |
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; } } |