From bc2d87410169c0f0eee19070ea8167d481861eb4 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Tue, 3 Oct 2017 15:02:22 +0200 Subject: radeonsi: add support for PIPE_FORMAT_{X1,A1}R5G5B5_UNORM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8 Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_state.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gallium') 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 && -- cgit v1.2.3