From 70042400fd95f613b9547d0a72d6288abcc2357d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 18 Nov 2011 23:41:33 +0000 Subject: sna/gen7: minor tidy of redundant defines Signed-off-by: Chris Wilson --- src/sna/gen7_render.h | 257 ++++---------------------------------------------- 1 file changed, 17 insertions(+), 240 deletions(-) (limited to 'src/sna/gen7_render.h') diff --git a/src/sna/gen7_render.h b/src/sna/gen7_render.h index 01482ec5..db784029 100644 --- a/src/sna/gen7_render.h +++ b/src/sna/gen7_render.h @@ -16,11 +16,6 @@ #define GEN7_MEDIA_STATE_POINTERS GEN7_3D(2, 0, 0) #define GEN7_MEDIA_OBJECT GEN7_3D(2, 1, 0) -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS GEN7_3D(3, 0, 1) -# define GEN7_3DSTATE_BINDING_TABLE_MODIFY_PS (1 << 12)/* for GEN7 */ -# define GEN7_3DSTATE_BINDING_TABLE_MODIFY_GS (1 << 9) /* for GEN7 */ -# define GEN7_3DSTATE_BINDING_TABLE_MODIFY_VS (1 << 8) /* for GEN7 */ - #define GEN7_3DSTATE_VERTEX_BUFFERS GEN7_3D(3, 0, 8) #define GEN7_3DSTATE_VERTEX_ELEMENTS GEN7_3D(3, 0, 9) #define GEN7_3DSTATE_INDEX_BUFFER GEN7_3D(3, 0, 0xa) @@ -127,6 +122,7 @@ #define BASE_ADDRESS_MODIFY (1 << 0) /* for GEN7_PIPE_CONTROL */ +#define GEN7_PIPE_CONTROL GEN7_3D(3, 2, 0) #define GEN7_PIPE_CONTROL_NOWRITE (0 << 14) #define GEN7_PIPE_CONTROL_WRITE_QWORD (1 << 14) #define GEN7_PIPE_CONTROL_WRITE_DEPTH (2 << 14) @@ -171,11 +167,6 @@ #define GEN7_SVG_CTL_IO_AUB (4 << 8) #define GEN7_SVG_CTL_SIP (5 << 8) -#define GEN7_SVG_RDATA 0x7404 -#define GEN7_SVG_WORK_CTL 0x7408 - -#define GEN7_VF_CTL 0x7500 - #define GEN7_VF_CTL_SNAPSHOT_COMPLETE (1 << 31) #define GEN7_VF_CTL_SNAPSHOT_MUX_SELECT_THREADID (0 << 8) #define GEN7_VF_CTL_SNAPSHOT_MUX_SELECT_VF_DEBUG (1 << 8) @@ -295,44 +286,6 @@ #define GEN7_EU_ATT_CLR_1 0x8834 #define GEN7_EU_RDATA 0x8840 -#define GEN7_3D(Pipeline,Opcode,Subopcode) ((3 << 29) | \ - ((Pipeline) << 27) | \ - ((Opcode) << 24) | \ - ((Subopcode) << 16)) - -#define GEN7_STATE_BASE_ADDRESS GEN7_3D(0, 1, 1) -#define GEN7_STATE_SIP GEN7_3D(0, 1, 2) - -#define GEN7_PIPELINE_SELECT GEN7_3D(1, 1, 4) - -#define GEN7_MEDIA_STATE_POINTERS GEN7_3D(2, 0, 0) -#define GEN7_MEDIA_OBJECT GEN7_3D(2, 1, 0) - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS GEN7_3D(3, 0, 1) -# define GEN7_3DSTATE_BINDING_TABLE_MODIFY_PS (1 << 12)/* for GEN7 */ -# define GEN7_3DSTATE_BINDING_TABLE_MODIFY_GS (1 << 9) /* for GEN7 */ -# define GEN7_3DSTATE_BINDING_TABLE_MODIFY_VS (1 << 8) /* for GEN7 */ - -#define GEN7_3DSTATE_VERTEX_BUFFERS GEN7_3D(3, 0, 8) -#define GEN7_3DSTATE_VERTEX_ELEMENTS GEN7_3D(3, 0, 9) -#define GEN7_3DSTATE_INDEX_BUFFER GEN7_3D(3, 0, 0xa) -#define GEN7_3DSTATE_VF_STATISTICS GEN7_3D(3, 0, 0xb) - -#define GEN7_3DSTATE_DRAWING_RECTANGLE GEN7_3D(3, 1, 0) -#define GEN7_3DSTATE_CONSTANT_COLOR GEN7_3D(3, 1, 1) -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD GEN7_3D(3, 1, 2) -#define GEN7_3DSTATE_CHROMA_KEY GEN7_3D(3, 1, 4) - -#define GEN7_3DSTATE_POLY_STIPPLE_OFFSET GEN7_3D(3, 1, 6) -#define GEN7_3DSTATE_POLY_STIPPLE_PATTERN GEN7_3D(3, 1, 7) -#define GEN7_3DSTATE_LINE_STIPPLE GEN7_3D(3, 1, 8) -#define GEN7_3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP GEN7_3D(3, 1, 9) -/* These two are BLC and CTG only, not BW or CL */ -#define GEN7_3DSTATE_AA_LINE_PARAMS GEN7_3D(3, 1, 0xa) -#define GEN7_3DSTATE_GS_SVB_INDEX GEN7_3D(3, 1, 0xb) - -#define GEN7_PIPE_CONTROL GEN7_3D(3, 2, 0) - #define GEN7_3DPRIMITIVE GEN7_3D(3, 3, 0) /* for GEN7+ */ @@ -441,184 +394,11 @@ #define GEN7_CLIP_DISABLE 0 #define GEN7_CLIP_ENABLE 1 -/* for GEN7_PIPE_CONTROL */ -#define GEN7_PIPE_CONTROL_NOWRITE (0 << 14) -#define GEN7_PIPE_CONTROL_WRITE_QWORD (1 << 14) -#define GEN7_PIPE_CONTROL_WRITE_DEPTH (2 << 14) -#define GEN7_PIPE_CONTROL_WRITE_TIME (3 << 14) -#define GEN7_PIPE_CONTROL_DEPTH_STALL (1 << 13) -#define GEN7_PIPE_CONTROL_WC_FLUSH (1 << 12) -#define GEN7_PIPE_CONTROL_IS_FLUSH (1 << 11) -#define GEN7_PIPE_CONTROL_TC_FLUSH (1 << 10) -#define GEN7_PIPE_CONTROL_NOTIFY_ENABLE (1 << 8) -#define GEN7_PIPE_CONTROL_GLOBAL_GTT (1 << 2) -#define GEN7_PIPE_CONTROL_LOCAL_PGTT (0 << 2) -#define GEN7_PIPE_CONTROL_DEPTH_CACHE_FLUSH (1 << 0) - -/* 3DPRIMITIVE bits */ -#define GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL (0 << 15) -#define GEN7_3DPRIMITIVE_VERTEX_RANDOM (1 << 15) -/* Primitive types are in gen7_defines.h */ -#define GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT 10 - -#define GEN7_SVG_CTL 0x7400 - -#define GEN7_SVG_CTL_GS_BA (0 << 8) -#define GEN7_SVG_CTL_SS_BA (1 << 8) -#define GEN7_SVG_CTL_IO_BA (2 << 8) -#define GEN7_SVG_CTL_GS_AUB (3 << 8) -#define GEN7_SVG_CTL_IO_AUB (4 << 8) -#define GEN7_SVG_CTL_SIP (5 << 8) - #define GEN7_SVG_RDATA 0x7404 #define GEN7_SVG_WORK_CTL 0x7408 #define GEN7_VF_CTL 0x7500 -#define GEN7_VF_CTL_SNAPSHOT_COMPLETE (1 << 31) -#define GEN7_VF_CTL_SNAPSHOT_MUX_SELECT_THREADID (0 << 8) -#define GEN7_VF_CTL_SNAPSHOT_MUX_SELECT_VF_DEBUG (1 << 8) -#define GEN7_VF_CTL_SNAPSHOT_TYPE_VERTEX_SEQUENCE (0 << 4) -#define GEN7_VF_CTL_SNAPSHOT_TYPE_VERTEX_INDEX (1 << 4) -#define GEN7_VF_CTL_SKIP_INITIAL_PRIMITIVES (1 << 3) -#define GEN7_VF_CTL_MAX_PRIMITIVES_LIMIT_ENABLE (1 << 2) -#define GEN7_VF_CTL_VERTEX_RANGE_LIMIT_ENABLE (1 << 1) -#define GEN7_VF_CTL_SNAPSHOT_ENABLE (1 << 0) - -#define GEN7_VF_STRG_VAL 0x7504 -#define GEN7_VF_STR_VL_OVR 0x7508 -#define GEN7_VF_VC_OVR 0x750c -#define GEN7_VF_STR_PSKIP 0x7510 -#define GEN7_VF_MAX_PRIM 0x7514 -#define GEN7_VF_RDATA 0x7518 - -#define GEN7_VS_CTL 0x7600 -#define GEN7_VS_CTL_SNAPSHOT_COMPLETE (1 << 31) -#define GEN7_VS_CTL_SNAPSHOT_MUX_VERTEX_0 (0 << 8) -#define GEN7_VS_CTL_SNAPSHOT_MUX_VERTEX_1 (1 << 8) -#define GEN7_VS_CTL_SNAPSHOT_MUX_VALID_COUNT (2 << 8) -#define GEN7_VS_CTL_SNAPSHOT_MUX_VS_KERNEL_POINTER (3 << 8) -#define GEN7_VS_CTL_SNAPSHOT_ALL_THREADS (1 << 2) -#define GEN7_VS_CTL_THREAD_SNAPSHOT_ENABLE (1 << 1) -#define GEN7_VS_CTL_SNAPSHOT_ENABLE (1 << 0) - -#define GEN7_VS_STRG_VAL 0x7604 -#define GEN7_VS_RDATA 0x7608 - -#define GEN7_SF_CTL 0x7b00 -#define GEN7_SF_CTL_SNAPSHOT_COMPLETE (1 << 31) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_0_FF_ID (0 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_0_REL_COUNT (1 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_1_FF_ID (2 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_1_REL_COUNT (3 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_2_FF_ID (4 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_2_REL_COUNT (5 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_COUNT (6 << 8) -#define GEN7_SF_CTL_SNAPSHOT_MUX_SF_KERNEL_POINTER (7 << 8) -#define GEN7_SF_CTL_MIN_MAX_PRIMITIVE_RANGE_ENABLE (1 << 4) -#define GEN7_SF_CTL_DEBUG_CLIP_RECTANGLE_ENABLE (1 << 3) -#define GEN7_SF_CTL_SNAPSHOT_ALL_THREADS (1 << 2) -#define GEN7_SF_CTL_THREAD_SNAPSHOT_ENABLE (1 << 1) -#define GEN7_SF_CTL_SNAPSHOT_ENABLE (1 << 0) - -#define GEN7_SF_STRG_VAL 0x7b04 -#define GEN7_SF_RDATA 0x7b18 - -#define GEN7_WIZ_CTL 0x7c00 -#define GEN7_WIZ_CTL_SNAPSHOT_COMPLETE (1 << 31) -#define GEN7_WIZ_CTL_SUBSPAN_INSTANCE_SHIFT 16 -#define GEN7_WIZ_CTL_SNAPSHOT_MUX_WIZ_KERNEL_POINTER (0 << 8) -#define GEN7_WIZ_CTL_SNAPSHOT_MUX_SUBSPAN_INSTANCE (1 << 8) -#define GEN7_WIZ_CTL_SNAPSHOT_MUX_PRIMITIVE_SEQUENCE (2 << 8) -#define GEN7_WIZ_CTL_SINGLE_SUBSPAN_DISPATCH (1 << 6) -#define GEN7_WIZ_CTL_IGNORE_COLOR_SCOREBOARD_STALLS (1 << 5) -#define GEN7_WIZ_CTL_ENABLE_SUBSPAN_INSTANCE_COMPARE (1 << 4) -#define GEN7_WIZ_CTL_USE_UPSTREAM_SNAPSHOT_FLAG (1 << 3) -#define GEN7_WIZ_CTL_SNAPSHOT_ALL_THREADS (1 << 2) -#define GEN7_WIZ_CTL_THREAD_SNAPSHOT_ENABLE (1 << 1) -#define GEN7_WIZ_CTL_SNAPSHOT_ENABLE (1 << 0) - -#define GEN7_WIZ_STRG_VAL 0x7c04 -#define GEN7_WIZ_RDATA 0x7c18 - -#define GEN7_TS_CTL 0x7e00 -#define GEN7_TS_CTL_SNAPSHOT_COMPLETE (1 << 31) -#define GEN7_TS_CTL_SNAPSHOT_MESSAGE_ERROR (0 << 8) -#define GEN7_TS_CTL_SNAPSHOT_INTERFACE_DESCRIPTOR (3 << 8) -#define GEN7_TS_CTL_SNAPSHOT_ALL_CHILD_THREADS (1 << 2) -#define GEN7_TS_CTL_SNAPSHOT_ALL_ROOT_THREADS (1 << 1) -#define GEN7_TS_CTL_SNAPSHOT_ENABLE (1 << 0) - -#define GEN7_TS_STRG_VAL 0x7e04 -#define GEN7_TS_RDATA 0x7e08 - -#define GEN7_TD_CTL 0x8000 -#define GEN7_TD_CTL_MUX_SHIFT 8 -#define GEN7_TD_CTL_EXTERNAL_HALT_R0_DEBUG_MATCH (1 << 7) -#define GEN7_TD_CTL_FORCE_EXTERNAL_HALT (1 << 6) -#define GEN7_TD_CTL_EXCEPTION_MASK_OVERRIDE (1 << 5) -#define GEN7_TD_CTL_FORCE_THREAD_BREAKPOINT_ENABLE (1 << 4) -#define GEN7_TD_CTL_BREAKPOINT_ENABLE (1 << 2) -#define GEN7_TD_CTL2 0x8004 -#define GEN7_TD_CTL2_ILLEGAL_OPCODE_EXCEPTION_OVERRIDE (1 << 28) -#define GEN7_TD_CTL2_MASKSTACK_EXCEPTION_OVERRIDE (1 << 26) -#define GEN7_TD_CTL2_SOFTWARE_EXCEPTION_OVERRIDE (1 << 25) -#define GEN7_TD_CTL2_ACTIVE_THREAD_LIMIT_SHIFT 16 -#define GEN7_TD_CTL2_ACTIVE_THREAD_LIMIT_ENABLE (1 << 8) -#define GEN7_TD_CTL2_THREAD_SPAWNER_EXECUTION_MASK_ENABLE (1 << 7) -#define GEN7_TD_CTL2_WIZ_EXECUTION_MASK_ENABLE (1 << 6) -#define GEN7_TD_CTL2_SF_EXECUTION_MASK_ENABLE (1 << 5) -#define GEN7_TD_CTL2_CLIPPER_EXECUTION_MASK_ENABLE (1 << 4) -#define GEN7_TD_CTL2_GS_EXECUTION_MASK_ENABLE (1 << 3) -#define GEN7_TD_CTL2_VS_EXECUTION_MASK_ENABLE (1 << 0) -#define GEN7_TD_VF_VS_EMSK 0x8008 -#define GEN7_TD_GS_EMSK 0x800c -#define GEN7_TD_CLIP_EMSK 0x8010 -#define GEN7_TD_SF_EMSK 0x8014 -#define GEN7_TD_WIZ_EMSK 0x8018 -#define GEN7_TD_0_6_EHTRG_VAL 0x801c -#define GEN7_TD_0_7_EHTRG_VAL 0x8020 -#define GEN7_TD_0_6_EHTRG_MSK 0x8024 -#define GEN7_TD_0_7_EHTRG_MSK 0x8028 -#define GEN7_TD_RDATA 0x802c -#define GEN7_TD_TS_EMSK 0x8030 - -#define GEN7_EU_CTL 0x8800 -#define GEN7_EU_CTL_SELECT_SHIFT 16 -#define GEN7_EU_CTL_DATA_MUX_SHIFT 8 -#define GEN7_EU_ATT_0 0x8810 -#define GEN7_EU_ATT_1 0x8814 -#define GEN7_EU_ATT_DATA_0 0x8820 -#define GEN7_EU_ATT_DATA_1 0x8824 -#define GEN7_EU_ATT_CLR_0 0x8830 -#define GEN7_EU_ATT_CLR_1 0x8834 -#define GEN7_EU_RDATA 0x8840 - -/* 3D state: - */ -#define _3DOP_3DSTATE_PIPELINED 0x0 -#define _3DOP_3DSTATE_NONPIPELINED 0x1 -#define _3DOP_3DCONTROL 0x2 -#define _3DOP_3DPRIMITIVE 0x3 - -#define _3DSTATE_PIPELINED_POINTERS 0x00 -#define _3DSTATE_BINDING_TABLE_POINTERS 0x01 -#define _3DSTATE_VERTEX_BUFFERS 0x08 -#define _3DSTATE_VERTEX_ELEMENTS 0x09 -#define _3DSTATE_INDEX_BUFFER 0x0A -#define _3DSTATE_VF_STATISTICS 0x0B -#define _3DSTATE_DRAWING_RECTANGLE 0x00 -#define _3DSTATE_CONSTANT_COLOR 0x01 -#define _3DSTATE_SAMPLER_PALETTE_LOAD 0x02 -#define _3DSTATE_CHROMA_KEY 0x04 -#define _3DSTATE_DEPTH_BUFFER 0x05 -#define _3DSTATE_POLY_STIPPLE_OFFSET 0x06 -#define _3DSTATE_POLY_STIPPLE_PATTERN 0x07 -#define _3DSTATE_LINE_STIPPLE 0x08 -#define _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP 0x09 -#define _3DCONTROL 0x00 -#define _3DPRIMITIVE 0x00 - #define _3DPRIM_POINTLIST 0x01 #define _3DPRIM_LINELIST 0x02 #define _3DPRIM_LINESTRIP 0x03 @@ -644,13 +424,13 @@ #define _3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL 0 #define _3DPRIM_VERTEXBUFFER_ACCESS_RANDOM 1 -#define GEN7_ANISORATIO_2 0 -#define GEN7_ANISORATIO_4 1 -#define GEN7_ANISORATIO_6 2 -#define GEN7_ANISORATIO_8 3 -#define GEN7_ANISORATIO_10 4 -#define GEN7_ANISORATIO_12 5 -#define GEN7_ANISORATIO_14 6 +#define GEN7_ANISORATIO_2 0 +#define GEN7_ANISORATIO_4 1 +#define GEN7_ANISORATIO_6 2 +#define GEN7_ANISORATIO_8 3 +#define GEN7_ANISORATIO_10 4 +#define GEN7_ANISORATIO_12 5 +#define GEN7_ANISORATIO_14 6 #define GEN7_ANISORATIO_16 7 #define GEN7_BLENDFACTOR_ONE 0x1 @@ -749,20 +529,20 @@ #define GEN7_LOGICOPFUNCTION_COPY 12 #define GEN7_LOGICOPFUNCTION_OR_REVERSE 13 #define GEN7_LOGICOPFUNCTION_OR 14 -#define GEN7_LOGICOPFUNCTION_SET 15 +#define GEN7_LOGICOPFUNCTION_SET 15 -#define GEN7_MAPFILTER_NEAREST 0x0 -#define GEN7_MAPFILTER_LINEAR 0x1 +#define GEN7_MAPFILTER_NEAREST 0x0 +#define GEN7_MAPFILTER_LINEAR 0x1 #define GEN7_MAPFILTER_ANISOTROPIC 0x2 -#define GEN7_MIPFILTER_NONE 0 -#define GEN7_MIPFILTER_NEAREST 1 +#define GEN7_MIPFILTER_NONE 0 +#define GEN7_MIPFILTER_NEAREST 1 #define GEN7_MIPFILTER_LINEAR 3 #define GEN7_POLYGON_FRONT_FACING 0 #define GEN7_POLYGON_BACK_FACING 1 -#define GEN7_PREFILTER_ALWAYS 0x0 +#define GEN7_PREFILTER_ALWAYS 0x0 #define GEN7_PREFILTER_NEVER 0x1 #define GEN7_PREFILTER_LESS 0x2 #define GEN7_PREFILTER_EQUAL 0x3 @@ -772,10 +552,10 @@ #define GEN7_PREFILTER_GEQUAL 0x7 #define GEN7_PROVOKING_VERTEX_0 0 -#define GEN7_PROVOKING_VERTEX_1 1 +#define GEN7_PROVOKING_VERTEX_1 1 #define GEN7_PROVOKING_VERTEX_2 2 -#define GEN7_RASTRULE_UPPER_LEFT 0 +#define GEN7_RASTRULE_UPPER_LEFT 0 #define GEN7_RASTRULE_UPPER_RIGHT 1 #define GEN7_RENDERTARGET_CLAMPRANGE_UNORM 0 @@ -991,7 +771,6 @@ #define GEN7_VFCOMPONENT_STORE_PID 7 - /* Execution Unit (EU) defines */ @@ -1134,7 +913,7 @@ #define GEN7_ARF_NULL 0x00 #define GEN7_ARF_ADDRESS 0x10 -#define GEN7_ARF_ACCUMULATOR 0x20 +#define GEN7_ARF_ACCUMULATOR 0x20 #define GEN7_ARF_FLAG 0x30 #define GEN7_ARF_MASK 0x40 #define GEN7_ARF_MASK_STACK 0x50 @@ -1149,8 +928,6 @@ #define GEN7_LMASK 2 #define GEN7_CMASK 3 - - #define GEN7_THREAD_NORMAL 0 #define GEN7_THREAD_ATOMIC 1 #define GEN7_THREAD_SWITCH 2 -- cgit v1.2.3