intel/perf: move perf-related constants to common location
authorMark Janes <mark.a.janes@intel.com>
Wed, 29 May 2019 15:43:34 +0000 (08:43 -0700)
committerMark Janes <mark.a.janes@intel.com>
Thu, 8 Aug 2019 04:33:55 +0000 (21:33 -0700)
The perf subsystem needs several macro definitions that were
duplicated in Iris and i965 headers.  Place these macros within perf,
if the perf implementation contains the only references to the values.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_query.c
src/intel/perf/gen_perf.h
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_performance_query.h
src/mesa/drivers/dri/i965/gen6_queryobj.c

index 0d2403cfa5923ee3c52f396a10951683d1d186e8..6d4a04f20b93e59b3fe954a80d681a15fea1a212 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <stdio.h>
 #include <errno.h>
+#include "perf/gen_perf.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
 #include "pipe/p_context.h"
index e9b6913ad21e5636b8a39c7941940f17f38ee3f2..2c34a37a08f4eedb794e9e02f99e59b556dc8660 100644 (file)
@@ -70,6 +70,27 @@ struct gen_pipeline_stat {
  */
 #define MAX_OA_REPORT_COUNTERS 62
 
+#define IA_VERTICES_COUNT          0x2310
+#define IA_PRIMITIVES_COUNT        0x2318
+#define VS_INVOCATION_COUNT        0x2320
+#define HS_INVOCATION_COUNT        0x2300
+#define DS_INVOCATION_COUNT        0x2308
+#define GS_INVOCATION_COUNT        0x2328
+#define GS_PRIMITIVES_COUNT        0x2330
+#define CL_INVOCATION_COUNT        0x2338
+#define CL_PRIMITIVES_COUNT        0x2340
+#define PS_INVOCATION_COUNT        0x2348
+#define CS_INVOCATION_COUNT        0x2290
+#define PS_DEPTH_COUNT             0x2350
+
+/*
+ * When currently allocate only one page for pipeline statistics queries. Here
+ * we derived the maximum number of counters for that amount.
+ */
+#define STATS_BO_SIZE               4096
+#define STATS_BO_END_OFFSET_BYTES   (STATS_BO_SIZE / 2)
+#define MAX_STAT_COUNTERS           (STATS_BO_END_OFFSET_BYTES / 8)
+
 struct gen_perf_query_result {
    /**
     * Storage for the final accumulated OA counters.
index 60052ee6f5f1dc2c83ce4216f7c880f73aa5578e..a4ecc68ec0f856e32583628543a1ea7b1d6515ae 100644 (file)
@@ -1523,20 +1523,6 @@ enum brw_pixel_shader_coverage_mask_mode {
 #define BR13_16161616          (0x4 << 24)
 #define BR13_32323232          (0x5 << 24)
 
-/* Pipeline Statistics Counter Registers */
-#define IA_VERTICES_COUNT               0x2310
-#define IA_PRIMITIVES_COUNT             0x2318
-#define VS_INVOCATION_COUNT             0x2320
-#define HS_INVOCATION_COUNT             0x2300
-#define DS_INVOCATION_COUNT             0x2308
-#define GS_INVOCATION_COUNT             0x2328
-#define GS_PRIMITIVES_COUNT             0x2330
-#define CL_INVOCATION_COUNT             0x2338
-#define CL_PRIMITIVES_COUNT             0x2340
-#define PS_INVOCATION_COUNT             0x2348
-#define CS_INVOCATION_COUNT             0x2290
-#define PS_DEPTH_COUNT                  0x2350
-
 #define GEN6_SO_PRIM_STORAGE_NEEDED     0x2280
 #define GEN7_SO_PRIM_STORAGE_NEEDED(n)  (0x5240 + (n) * 8)
 
index b0bf60cc4fffd547659e661153fa7b142d7afc3e..16ba49d6a3b160d0d005701db089148fbd879433 100644 (file)
 
 struct gen_perf_query_info;
 
-/*
- * When currently allocate only one page for pipeline statistics queries. Here
- * we derived the maximum number of counters for that amount.
- */
-#define STATS_BO_SIZE               4096
-#define STATS_BO_END_OFFSET_BYTES   (STATS_BO_SIZE / 2)
-#define MAX_STAT_COUNTERS           (STATS_BO_END_OFFSET_BYTES / 8)
-
 /**
  * i965 representation of a performance query object.
  *
index ada28a4a8241bf672c094472f2b78f55564726a2..a77ac823f7addf0f0f1987456973e728692f9615 100644 (file)
@@ -36,6 +36,7 @@
 #include "brw_context.h"
 #include "brw_defines.h"
 #include "brw_state.h"
+#include "perf/gen_perf.h"
 #include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"