[Mesa-dev] [PATCH 3/3] radeonsi: Mixed colorbuffer formats are unsupported
Marek Olšák
maraeo at gmail.com
Sun Apr 3 17:41:58 UTC 2016
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Sun, Apr 3, 2016 at 10:11 AM, Axel Davy <axel.davy at ens.fr> wrote:
> Besides depth/stencil, the hardware doesn't support
> mixed formats.
>
> The GL state tracker doesn't make use of them.
>
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
> src/gallium/drivers/radeonsi/si_state.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 10d691a..c79b985 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -1374,6 +1374,11 @@ static uint32_t si_translate_colorformat(enum pipe_format format)
> if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
> return V_028C70_COLOR_INVALID;
>
> + /* hw cannot support mixed formats (except depth/stencil, since
> + * stencil is not written to). */
> + if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
> + return V_028C70_COLOR_INVALID;
> +
> switch (desc->nr_channels) {
> case 1:
> switch (desc->channel[0].size) {
> @@ -1652,6 +1657,11 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen,
>
> /* R8G8Bx_SNORM - TODO CxV8U8 */
>
> + /* hw cannot support mixed formats (except depth/stencil, since only
> + * depth is read).*/
> + if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
> + goto out_unknown;
> +
> /* See whether the components are of the same size. */
> for (i = 1; i < desc->nr_channels; i++) {
> uniform = uniform && desc->channel[0].size == desc->channel[i].size;
> --
> 2.7.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list