radeonsi: remove the DRAW_PREAMBLE packet
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 14 Jul 2016 14:21:52 +0000 (16:21 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Sat, 16 Jul 2016 11:02:37 +0000 (13:02 +0200)
According to firmware guys, the new sequence that we added for Polaris should
work on all CIK parts, and should actually be faster on some parts.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_debug.c
src/gallium/drivers/radeonsi/si_state_draw.c
src/gallium/drivers/radeonsi/sid.h

index 57a930f4fe1081260ae4a50700e8950e3fb6979a..73e0bfeb34479fd6cc7c0b3fe703c9e482215534 100644 (file)
@@ -286,11 +286,6 @@ static uint32_t *si_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
        case PKT3_SET_SH_REG:
                si_parse_set_reg_packet(f, ib, count, SI_SH_REG_OFFSET);
                break;
-       case PKT3_DRAW_PREAMBLE:
-               si_dump_reg(f, R_030908_VGT_PRIMITIVE_TYPE, ib[1], ~0);
-               si_dump_reg(f, R_028AA8_IA_MULTI_VGT_PARAM, ib[2], ~0);
-               si_dump_reg(f, R_028B58_VGT_LS_HS_CONFIG, ib[3], ~0);
-               break;
        case PKT3_ACQUIRE_MEM:
                si_dump_reg(f, R_0301F0_CP_COHER_CNTL, ib[1], ~0);
                si_dump_reg(f, R_0301F4_CP_COHER_SIZE, ib[2], ~0);
index a596bd813818ddd80ff6ef1611b2b8e126b77678..24fa682926c64e54b9029618175ff51bdad96f3c 100644 (file)
@@ -478,15 +478,10 @@ static void si_emit_draw_registers(struct si_context *sctx,
        if (prim != sctx->last_prim ||
            ia_multi_vgt_param != sctx->last_multi_vgt_param ||
            ls_hs_config != sctx->last_ls_hs_config) {
-               if (sctx->b.family >= CHIP_POLARIS10) {
+               if (sctx->b.chip_class >= CIK) {
                        radeon_set_context_reg_idx(cs, R_028AA8_IA_MULTI_VGT_PARAM, 1, ia_multi_vgt_param);
                        radeon_set_context_reg_idx(cs, R_028B58_VGT_LS_HS_CONFIG, 2, ls_hs_config);
                        radeon_set_uconfig_reg_idx(cs, R_030908_VGT_PRIMITIVE_TYPE, 1, prim);
-               } else if (sctx->b.chip_class >= CIK) {
-                       radeon_emit(cs, PKT3(PKT3_DRAW_PREAMBLE, 2, 0));
-                       radeon_emit(cs, prim); /* VGT_PRIMITIVE_TYPE */
-                       radeon_emit(cs, ia_multi_vgt_param); /* IA_MULTI_VGT_PARAM */
-                       radeon_emit(cs, ls_hs_config); /* VGT_LS_HS_CONFIG */
                } else {
                        radeon_set_config_reg(cs, R_008958_VGT_PRIMITIVE_TYPE, prim);
                        radeon_set_context_reg(cs, R_028AA8_IA_MULTI_VGT_PARAM, ia_multi_vgt_param);
index b9734898217aa4ba306acc45d71ee9ae7943a9cc..f6a05c544aede1196e558ba2dfd092c6633e6d99 100644 (file)
 #define PKT3_INDIRECT_BUFFER_CONST             0x33
 #define PKT3_STRMOUT_BUFFER_UPDATE             0x34
 #define PKT3_DRAW_INDEX_OFFSET_2               0x35
-#define PKT3_DRAW_PREAMBLE                     0x36 /* new on CIK, required on GFX7.2 and later */
 #define PKT3_WRITE_DATA                        0x37
 #define   R_370_CONTROL                                0x370 /* 0x[packet number][word index] */
 #define     S_370_ENGINE_SEL(x)                        (((unsigned)(x) & 0x3) << 30)