radeonsi: also do VS_PARTIAL_FLUSH before updating VGT ring pointers
authorMarek Olšák <marek.olsak@amd.com>
Tue, 23 Aug 2016 13:26:01 +0000 (15:26 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 5 Sep 2016 16:01:15 +0000 (18:01 +0200)
ported from Vulkan

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 394afaa972598f017e7aa25ddcc6af405009fa86..b4f19fea2d52de73752d826fc7339fafcb03d25c 100644 (file)
@@ -1609,6 +1609,12 @@ static void si_init_config_add_vgt_flush(struct si_context *sctx)
        if (sctx->init_config_has_vgt_flush)
                return;
 
+       /* Done by Vulkan before VGT_FLUSH. */
+       si_pm4_cmd_begin(sctx->init_config, PKT3_EVENT_WRITE);
+       si_pm4_cmd_add(sctx->init_config,
+                      EVENT_TYPE(V_028A90_VS_PARTIAL_FLUSH) | EVENT_INDEX(4));
+       si_pm4_cmd_end(sctx->init_config, false);
+
        /* VGT_FLUSH is required even if VGT is idle. It resets VGT pointers. */
        si_pm4_cmd_begin(sctx->init_config, PKT3_EVENT_WRITE);
        si_pm4_cmd_add(sctx->init_config, EVENT_TYPE(V_028A90_VGT_FLUSH) | EVENT_INDEX(0));