radeonsi: various si_translate_*format functions only apply to pre-gfx10
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 7 May 2019 20:38:20 +0000 (22:38 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jul 2019 19:51:12 +0000 (15:51 -0400)
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/gallium/drivers/radeonsi/si_state.c

index 96eb46c00b6476c730c31e2b03b9a430c252fd04..77ecf08565dee0679688155c8d848818b5b2e50b 100644 (file)
@@ -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;