From 4a774ba893b460ab375d60a7479e5b6affdf32f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 7 May 2019 22:38:20 +0200 Subject: [PATCH] radeonsi: various si_translate_*format functions only apply to pre-gfx10 Acked-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeonsi/si_state.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 96eb46c00b6..77ecf08565d 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1620,6 +1620,8 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen, bool uniform = true; int i; + assert(sscreen->info.chip_class <= GFX9); + /* Colorspace (return non-RGB formats directly). */ switch (desc->colorspace) { /* Depth stencil formats */ @@ -1996,6 +1998,8 @@ static uint32_t si_translate_buffer_dataformat(struct pipe_screen *screen, { int i; + assert(((struct si_screen *)screen)->info.chip_class <= GFX9); + if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT) return V_008F0C_BUF_DATA_FORMAT_10_11_11; @@ -2071,6 +2075,8 @@ static uint32_t si_translate_buffer_numformat(struct pipe_screen *screen, const struct util_format_description *desc, int first_non_void) { + assert(((struct si_screen *)screen)->info.chip_class <= GFX9); + if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT) return V_008F0C_BUF_NUM_FORMAT_FLOAT; -- 2.30.2