diff options
author | Marek Olšák <[email protected]> | 2016-08-22 13:45:05 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-05 18:01:15 +0200 |
commit | 21de3be8e62b2b093569a99550e6356ed2f106b4 (patch) | |
tree | 90eca99db8834a44053c28ff34b68822823fbb03 /src/gallium/drivers/radeonsi/si_state.c | |
parent | 63da0c991d228b61ca36591314098620c511dbce (diff) |
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 <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 4 |
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 41ff3200294..f54b0bcc3a8 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, |