gallium/radeon: move pipeline stat context flags to common code
authorMarek Olšák <marek.olsak@amd.com>
Fri, 8 Apr 2016 18:29:08 +0000 (20:29 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 12 Apr 2016 12:29:47 +0000 (14:29 +0200)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_draw.c

index 7da773686073e60c3f441b7223a895871d3ee14c..57af0ff963dda65d46f0814d2a38e9d8c30f31d5 100644 (file)
 #define R600_RESOURCE_FLAG_FORCE_TILING                (PIPE_RESOURCE_FLAG_DRV_PRIV << 2)
 
 #define R600_CONTEXT_STREAMOUT_FLUSH           (1u << 0)
-#define R600_CONTEXT_PRIVATE_FLAG              (1u << 1)
+/* Pipeline & streamout query controls. */
+#define R600_CONTEXT_START_PIPELINE_STATS      (1u << 1)
+#define R600_CONTEXT_STOP_PIPELINE_STATS       (1u << 2)
+#define R600_CONTEXT_PRIVATE_FLAG              (1u << 3)
 
 /* special primitive types */
 #define R600_PRIM_RECTANGLE_LIST       PIPE_PRIM_MAX
index 8fcfcd2f5d13073b0bc154407548faf32a344b9e..f665c8160e04fcd7af1ccd6b09b8d0795e0a3a83 100644 (file)
@@ -66,9 +66,6 @@
 /* Compute only. */
 #define SI_CONTEXT_FLUSH_WITH_INV_L2   (R600_CONTEXT_PRIVATE_FLAG << 13) /* TODO: merge with TC? */
 #define SI_CONTEXT_FLAG_COMPUTE                (R600_CONTEXT_PRIVATE_FLAG << 14)
-/* Pipeline & streamout query controls. */
-#define SI_CONTEXT_START_PIPELINE_STATS        (R600_CONTEXT_PRIVATE_FLAG << 15)
-#define SI_CONTEXT_STOP_PIPELINE_STATS (R600_CONTEXT_PRIVATE_FLAG << 16)
 
 #define SI_CONTEXT_FLUSH_AND_INV_FRAMEBUFFER (SI_CONTEXT_FLUSH_AND_INV_CB | \
                                              SI_CONTEXT_FLUSH_AND_INV_CB_META | \
index 0c46425be9b4a12050e9e7be088b5d23c5889cf4..94130a99b1bafd6cbd00d276f8115ec21cdd02ea 100644 (file)
@@ -1358,11 +1358,11 @@ static void si_set_active_query_state(struct pipe_context *ctx, boolean enable)
 
        /* Pipeline stat & streamout queries. */
        if (enable) {
-               sctx->b.flags &= ~SI_CONTEXT_STOP_PIPELINE_STATS;
-               sctx->b.flags |= SI_CONTEXT_START_PIPELINE_STATS;
+               sctx->b.flags &= ~R600_CONTEXT_STOP_PIPELINE_STATS;
+               sctx->b.flags |= R600_CONTEXT_START_PIPELINE_STATS;
        } else {
-               sctx->b.flags &= ~SI_CONTEXT_START_PIPELINE_STATS;
-               sctx->b.flags |= SI_CONTEXT_STOP_PIPELINE_STATS;
+               sctx->b.flags &= ~R600_CONTEXT_START_PIPELINE_STATS;
+               sctx->b.flags |= R600_CONTEXT_STOP_PIPELINE_STATS;
        }
 
        /* Occlusion queries. */
index 105c5fb9850d6ea1192f2f1daefa0268cf837581..40cad504e09f31025fcab477f726b6558c1699e7 100644 (file)
@@ -722,11 +722,11 @@ void si_emit_cache_flush(struct si_context *si_ctx, struct r600_atom *atom)
                }
        }
 
-       if (sctx->flags & SI_CONTEXT_START_PIPELINE_STATS) {
+       if (sctx->flags & R600_CONTEXT_START_PIPELINE_STATS) {
                radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
                radeon_emit(cs, EVENT_TYPE(V_028A90_PIPELINESTAT_START) |
                                EVENT_INDEX(0));
-       } else if (sctx->flags & SI_CONTEXT_STOP_PIPELINE_STATS) {
+       } else if (sctx->flags & R600_CONTEXT_STOP_PIPELINE_STATS) {
                radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
                radeon_emit(cs, EVENT_TYPE(V_028A90_PIPELINESTAT_STOP) |
                                EVENT_INDEX(0));