summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state_derived.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-11-30 23:28:43 +0100
committerMarek Olšák <maraeo@gmail.com>2010-12-01 22:29:09 +0100
commit6478a4de14d368bf85ba3477d73fd1bd91067e86 (patch)
treeb02d269ab0ad750013b8704511083e6f2aa8de4a /src/gallium/drivers/r300/r300_state_derived.c
parentc92550be64abd454560556599cd95b237f4375b1 (diff)
r300g: fix texture swizzling with compressed textures on r400-r500
This fixes all S3TC piglit/texwrap tests. NOTE: This is a candidate for the 7.9 branch.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_derived.c')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index c4cd291d75..dc2d9ec66d 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -764,13 +764,18 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
if (sampler->state.compare_mode == PIPE_TEX_COMPARE_NONE) {
texstate->format.format1 |=
r300_get_swizzle_combined(depth_swizzle,
- view->swizzle);
+ view->swizzle, FALSE);
} else {
texstate->format.format1 |=
- r300_get_swizzle_combined(depth_swizzle, 0);
+ r300_get_swizzle_combined(depth_swizzle, 0, FALSE);
}
}
+ if (r300->screen->caps.dxtc_swizzle &&
+ util_format_is_compressed(tex->desc.b.b.format)) {
+ texstate->filter1 |= R400_DXTC_SWIZZLE_ENABLE;
+ }
+
/* to emulate 1D textures through 2D ones correctly */
if (tex->desc.b.b.target == PIPE_TEXTURE_1D) {
texstate->filter0 &= ~R300_TX_WRAP_T_MASK;