This patch enables the correct detection of PIPE_FORMAT_R10G10B10A2_UINT and PIPE_FORMAT_B10G10R10A2_UINT formats in r600g in big-endian mode, by adjusting the order of channels in various functions.
This enables support for ARB_texture_rgb10_a2ui, which otherwise is not detected as supported. Signed-off-by: Oded Gabbay <oded.gab...@gmail.com> --- src/gallium/drivers/r600/r600_state_common.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index b231d1e..b02b6a9 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -2468,10 +2468,13 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, result = FMT_1_5_5_5; goto out_word4; } - if (desc->channel[0].size == 10 && - desc->channel[1].size == 10 && - desc->channel[2].size == 10 && - desc->channel[3].size == 2) { + if ((desc->channel[1].size == 10 && + desc->channel[2].size == 10) && + ((desc->channel[0].size == 10 && + desc->channel[3].size == 2) || + (R600_BIG_ENDIAN && + desc->channel[0].size == 2 && + desc->channel[3].size == 10))) { result = FMT_2_10_10_10; goto out_word4; } @@ -2694,9 +2697,11 @@ uint32_t r600_translate_colorformat(enum chip_class chip, enum pipe_format forma } } else if (HAS_SIZE(5,5,5,1)) { return V_0280A0_COLOR_1_5_5_5; - } else if (HAS_SIZE(10,10,10,2)) { + } else if (HAS_SIZE(10,10,10,2) || + (R600_BIG_ENDIAN && HAS_SIZE(2,10,10,10))) { return V_0280A0_COLOR_2_10_10_10; } + break; } return ~0U; -- 2.5.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev