[Mesa-dev] [PATCH 1/4] intel/decoder: tools: gen_engine enum location
Toni Lönnberg
toni.lonnberg at intel.com
Tue Oct 30 14:32:30 UTC 2018
Moved the engine enum from aub_read.h to gen_decoder.h and changed it into a
bitmask. The enumeration needs to be defined in a single place that can be used
by the decoder and tools.
---
src/intel/common/gen_decoder.h | 6 ++++++
src/intel/tools/aub_read.c | 1 +
src/intel/tools/aub_read.h | 6 ------
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h
index 4beed22d729..c2666d07e07 100644
--- a/src/intel/common/gen_decoder.h
+++ b/src/intel/common/gen_decoder.h
@@ -35,6 +35,12 @@
extern "C" {
#endif
+enum gen_engine {
+ GEN_ENGINE_RENDER = (1 << 0),
+ GEN_ENGINE_VIDEO = (1 << 1),
+ GEN_ENGINE_BLITTER = (1 << 2),
+};
+
struct gen_spec;
struct gen_group;
struct gen_field;
diff --git a/src/intel/tools/aub_read.c b/src/intel/tools/aub_read.c
index d83e88ddced..7b951713b5b 100644
--- a/src/intel/tools/aub_read.c
+++ b/src/intel/tools/aub_read.c
@@ -28,6 +28,7 @@
#include <stdarg.h>
#include "common/gen_gem.h"
+#include "common/gen_decoder.h"
#include "util/macros.h"
#include "aub_read.h"
diff --git a/src/intel/tools/aub_read.h b/src/intel/tools/aub_read.h
index e48ac3164bc..7f2f6f8105c 100644
--- a/src/intel/tools/aub_read.h
+++ b/src/intel/tools/aub_read.h
@@ -33,12 +33,6 @@
extern "C" {
#endif
-enum gen_engine {
- GEN_ENGINE_RENDER = 1,
- GEN_ENGINE_VIDEO = 2,
- GEN_ENGINE_BLITTER = 3,
-};
-
struct aub_read {
/* Caller's data */
void *user_data;
--
2.17.1
More information about the mesa-dev
mailing list