[Mesa-dev] [PATCH 1/4] intel/decoder: tools: gen_engine enum location

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Oct 30 14:58:28 UTC 2018


I think we should switch to use drm_i915_gem_engine_class from 
include/drm-uapi/i915_drm.h and just have macro for class id -> mask.

On 30/10/2018 14:32, Toni Lönnberg wrote:
> 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;




More information about the mesa-dev mailing list