summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-08-22 13:45:05 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-09-05 18:01:15 +0200
commit21de3be8e62b2b093569a99550e6356ed2f106b4 (patch)
tree90eca99db8834a44053c28ff34b68822823fbb03 /src/gallium/drivers/radeonsi/si_state.c
parent63da0c991d228b61ca36591314098620c511dbce (diff)
downloadexternal_mesa3d-21de3be8e62b2b093569a99550e6356ed2f106b4.zip
external_mesa3d-21de3be8e62b2b093569a99550e6356ed2f106b4.tar.gz
external_mesa3d-21de3be8e62b2b093569a99550e6356ed2f106b4.tar.bz2
radeonsi: fix texture format reinterpretation with DCC
DCC is limited in how texture formats can be reinterpreted using texture views. If we get a view format that is incompatible with the initial texture format with respect to DCC, disable DCC. There is a new piglit which tests all format combinations. What works and what doesn't was deduced by looking at the piglit failures. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 41ff320..f54b0bc 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3051,6 +3051,10 @@ si_create_sampler_view_custom(struct pipe_context *ctx,
}
}
+ vi_dcc_disable_if_incompatible_format(&sctx->b, texture,
+ state->u.tex.first_level,
+ state->format);
+
si_make_texture_descriptor(sctx->screen, tmp, true,
state->target, pipe_format, state_swizzle,
first_level, last_level,