From: Nicolai Hähnle Date: Tue, 3 Oct 2017 13:02:22 +0000 (+0200) Subject: radeonsi: add support for PIPE_FORMAT_{X1,A1}R5G5B5_UNORM X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc2d87410169c0f0eee19070ea8167d481861eb4;p=mesa.git radeonsi: add support for PIPE_FORMAT_{X1,A1}R5G5B5_UNORM Fixes dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8 Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 4bfd5272db0..ae45e1a6b26 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1506,6 +1506,8 @@ static uint32_t si_translate_colorformat(enum pipe_format format) } } else if (HAS_SIZE(5,5,5,1)) { return V_028C70_COLOR_1_5_5_5; + } else if (HAS_SIZE(1,5,5,5)) { + return V_028C70_COLOR_5_5_5_1; } else if (HAS_SIZE(10,10,10,2)) { return V_028C70_COLOR_2_10_10_10; } @@ -1764,6 +1766,12 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen, desc->channel[3].size == 1) { return V_008F14_IMG_DATA_FORMAT_1_5_5_5; } + if (desc->channel[0].size == 1 && + desc->channel[1].size == 5 && + desc->channel[2].size == 5 && + desc->channel[3].size == 5) { + return V_008F14_IMG_DATA_FORMAT_5_5_5_1; + } if (desc->channel[0].size == 10 && desc->channel[1].size == 10 && desc->channel[2].size == 10 &&