From 5e7e3f43a5965d5757952f3798769111a2a21bc7 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 18 Jan 2013 11:04:37 +0000 Subject: assembler: Adopt enum brw_message_target from mesa Signed-off-by: Damien Lespiau --- assembler/brw_defines.h | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'assembler/brw_defines.h') diff --git a/assembler/brw_defines.h b/assembler/brw_defines.h index 2ec8050c..bd72abb9 100644 --- a/assembler/brw_defines.h +++ b/assembler/brw_defines.h @@ -717,20 +717,36 @@ #define BRW_POLYGON_FACING_FRONT 0 #define BRW_POLYGON_FACING_BACK 1 -#define BRW_MESSAGE_TARGET_NULL 0 -#define BRW_MESSAGE_TARGET_MATH 1 -#define BRW_MESSAGE_TARGET_SAMPLER 2 -#define BRW_MESSAGE_TARGET_GATEWAY 3 -#define BRW_MESSAGE_TARGET_DATAPORT_READ 4 -#define BRW_MESSAGE_TARGET_DP_SC 4 /* data port sampler cache */ -#define BRW_MESSAGE_TARGET_DATAPORT_WRITE 5 -#define BRW_MESSAGE_TARGET_DP_RC 5 /* data port render cache */ -#define BRW_MESSAGE_TARGET_URB 6 -#define BRW_MESSAGE_TARGET_THREAD_SPAWNER 7 -#define BRW_MESSAGE_TARGET_VME 8 -#define BRW_MESSAGE_TARGET_DP_CC 9 /* data port constant cache */ -#define BRW_MESSAGE_TARGET_DP_DC 10 /* data port data cache */ -#define BRW_MESSAGE_TARGET_CRE 0x0d /* check & refinement enginee */ + +/** + * Message target: Shared Function ID for where to SEND a message. + * + * These are enumerated in the ISA reference under "send - Send Message". + * In particular, see the following tables: + * - G45 PRM, Volume 4, Table 14-15 "Message Descriptor Definition" + * - Sandybridge PRM, Volume 4 Part 2, Table 8-16 "Extended Message Descriptor" + * - BSpec, Volume 1a (GPU Overview) / Graphics Processing Engine (GPE) / + * Overview / GPE Function IDs + */ +enum brw_message_target { + BRW_SFID_NULL = 0, + BRW_SFID_MATH = 1, /* Only valid on Gen4-5 */ + BRW_SFID_SAMPLER = 2, + BRW_SFID_MESSAGE_GATEWAY = 3, + BRW_SFID_DATAPORT_READ = 4, + BRW_SFID_DATAPORT_WRITE = 5, + BRW_SFID_URB = 6, + BRW_SFID_THREAD_SPAWNER = 7, + + GEN6_SFID_DATAPORT_SAMPLER_CACHE = 4, + GEN6_SFID_DATAPORT_RENDER_CACHE = 5, + GEN6_SFID_VME = 8, + GEN6_SFID_DATAPORT_CONSTANT_CACHE = 9, + + GEN7_SFID_DATAPORT_DATA_CACHE = 10, + + HSW_SFID_CRE = 0x0d, +}; #define BRW_SAMPLER_RETURN_FORMAT_FLOAT32 0 #define BRW_SAMPLER_RETURN_FORMAT_UINT32 2 -- cgit v1.2.3