[igt-dev] [PATCH i-g-t v4 1/3] lib/gen6_render: Removal of duplicated definitions

Lukasz Kalamarz lukasz.kalamarz at intel.com
Tue Apr 17 11:48:41 UTC 2018


Remove duplicated registers, shifts and values from lib.

Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
Cc: Katarzyna Dec <katarzyna.dec at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
---
 lib/gen6_render.h | 242 ------------------------------------------------------
 1 file changed, 242 deletions(-)

diff --git a/lib/gen6_render.h b/lib/gen6_render.h
index 8a4ec53..9e3e169 100644
--- a/lib/gen6_render.h
+++ b/lib/gen6_render.h
@@ -306,96 +306,7 @@
 
 #define GEN6_PIPE_CONTROL			GEN6_3D(3, 2, 0)
 
-#define GEN6_3DPRIMITIVE				GEN6_3D(3, 3, 0)
-
-#define GEN6_3DSTATE_CLEAR_PARAMS		GEN6_3D(3, 1, 0x10)
-/* DW1 */
-# define GEN6_3DSTATE_DEPTH_CLEAR_VALID		(1 << 15)
-
 /* for GEN6+ */
-#define GEN6_3DSTATE_SAMPLER_STATE_POINTERS	GEN6_3D(3, 0, 0x02)
-# define GEN6_3DSTATE_SAMPLER_STATE_MODIFY_PS	(1 << 12)
-# define GEN6_3DSTATE_SAMPLER_STATE_MODIFY_GS	(1 << 9)
-# define GEN6_3DSTATE_SAMPLER_STATE_MODIFY_VS	(1 << 8)
-
-#define GEN6_3DSTATE_URB			GEN6_3D(3, 0, 0x05)
-/* DW1 */
-# define GEN6_3DSTATE_URB_VS_SIZE_SHIFT		16
-# define GEN6_3DSTATE_URB_VS_ENTRIES_SHIFT	0
-/* DW2 */
-# define GEN6_3DSTATE_URB_GS_ENTRIES_SHIFT	8
-# define GEN6_3DSTATE_URB_GS_SIZE_SHIFT		0
-
-#define GEN6_3DSTATE_VIEWPORT_STATE_POINTERS	GEN6_3D(3, 0, 0x0d)
-# define GEN6_3DSTATE_VIEWPORT_STATE_MODIFY_CC		(1 << 12)
-# define GEN6_3DSTATE_VIEWPORT_STATE_MODIFY_SF		(1 << 11)
-# define GEN6_3DSTATE_VIEWPORT_STATE_MODIFY_CLIP	(1 << 10)
-
-#define GEN6_3DSTATE_CC_STATE_POINTERS		GEN6_3D(3, 0, 0x0e)
-
-#define GEN6_3DSTATE_VS				GEN6_3D(3, 0, 0x10)
-
-#define GEN6_3DSTATE_GS				GEN6_3D(3, 0, 0x11)
-/* DW4 */
-# define GEN6_3DSTATE_GS_DISPATCH_START_GRF_SHIFT	0
-
-#define GEN6_3DSTATE_CLIP			GEN6_3D(3, 0, 0x12)
-
-#define GEN6_3DSTATE_SF				GEN6_3D(3, 0, 0x13)
-/* DW1 */
-# define GEN6_3DSTATE_SF_NUM_OUTPUTS_SHIFT		22
-# define GEN6_3DSTATE_SF_URB_ENTRY_READ_LENGTH_SHIFT	11
-# define GEN6_3DSTATE_SF_URB_ENTRY_READ_OFFSET_SHIFT	4
-/* DW2 */
-/* DW3 */
-# define GEN6_3DSTATE_SF_CULL_BOTH			(0 << 29)
-# define GEN6_3DSTATE_SF_CULL_NONE			(1 << 29)
-# define GEN6_3DSTATE_SF_CULL_FRONT			(2 << 29)
-# define GEN6_3DSTATE_SF_CULL_BACK			(3 << 29)
-/* DW4 */
-# define GEN6_3DSTATE_SF_TRI_PROVOKE_SHIFT		29
-# define GEN6_3DSTATE_SF_LINE_PROVOKE_SHIFT		27
-# define GEN6_3DSTATE_SF_TRIFAN_PROVOKE_SHIFT		25
-
-
-#define GEN6_3DSTATE_WM				GEN6_3D(3, 0, 0x14)
-/* DW2 */
-# define GEN6_3DSTATE_WM_SAMPLER_COUNT_SHIFT			27
-# define GEN6_3DSTATE_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT	18
-/* DW4 */
-# define GEN6_3DSTATE_WM_DISPATCH_START_GRF_0_SHIFT		16
-/* DW5 */
-# define GEN6_3DSTATE_WM_MAX_THREADS_SHIFT			25
-# define GEN6_3DSTATE_WM_DISPATCH_ENABLE			(1 << 19)
-# define GEN6_3DSTATE_WM_16_DISPATCH_ENABLE			(1 << 1)
-# define GEN6_3DSTATE_WM_8_DISPATCH_ENABLE			(1 << 0)
-/* DW6 */
-# define GEN6_3DSTATE_WM_NUM_SF_OUTPUTS_SHIFT			20
-# define GEN6_3DSTATE_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC	(1 << 15)
-# define GEN6_3DSTATE_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC	(1 << 14)
-# define GEN6_3DSTATE_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC	(1 << 13)
-# define GEN6_3DSTATE_WM_PERSPECTIVE_SAMPLE_BARYCENTRIC		(1 << 12)
-# define GEN6_3DSTATE_WM_PERSPECTIVE_CENTROID_BARYCENTRIC	(1 << 11)
-# define GEN6_3DSTATE_WM_PERSPECTIVE_PIXEL_BARYCENTRIC		(1 << 10)
-
-
-#define GEN6_3DSTATE_CONSTANT_VS		GEN6_3D(3, 0, 0x15)
-#define GEN6_3DSTATE_CONSTANT_GS          	GEN6_3D(3, 0, 0x16)
-#define GEN6_3DSTATE_CONSTANT_PS          	GEN6_3D(3, 0, 0x17)
-
-#define GEN6_3DSTATE_SAMPLE_MASK		GEN6_3D(3, 0, 0x18)
-
-#define GEN6_3DSTATE_MULTISAMPLE		GEN6_3D(3, 1, 0x0d)
-/* DW1 */
-# define GEN6_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_CENTER		(0 << 4)
-# define GEN6_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_UPPER_LEFT	(1 << 4)
-# define GEN6_3DSTATE_MULTISAMPLE_NUMSAMPLES_1			(0 << 1)
-# define GEN6_3DSTATE_MULTISAMPLE_NUMSAMPLES_4			(2 << 1)
-# define GEN6_3DSTATE_MULTISAMPLE_NUMSAMPLES_8			(3 << 1)
-
-#define PIPELINE_SELECT_3D		0
-#define PIPELINE_SELECT_MEDIA		1
-
 #define UF0_CS_REALLOC			(1 << 13)
 #define UF0_VFE_REALLOC			(1 << 12)
 #define UF0_SF_REALLOC			(1 << 11)
@@ -410,7 +321,6 @@
 #define UF2_SF_FENCE_SHIFT		0
 
 /* for GEN6_STATE_BASE_ADDRESS */
-#define BASE_ADDRESS_MODIFY		(1 << 0)
 #define BUFFER_SIZE_MODIFY		(1 << 0)
 
 /* for GEN6_3DSTATE_PIPELINED_POINTERS */
@@ -419,158 +329,6 @@
 #define GEN6_CLIP_DISABLE	       0
 #define GEN6_CLIP_ENABLE		       1
 
-/* for GEN6_PIPE_CONTROL */
-#define GEN6_PIPE_CONTROL_NOWRITE       (0 << 14)
-#define GEN6_PIPE_CONTROL_WRITE_QWORD   (1 << 14)
-#define GEN6_PIPE_CONTROL_WRITE_DEPTH   (2 << 14)
-#define GEN6_PIPE_CONTROL_WRITE_TIME    (3 << 14)
-#define GEN6_PIPE_CONTROL_DEPTH_STALL   (1 << 13)
-#define GEN6_PIPE_CONTROL_WC_FLUSH      (1 << 12)
-#define GEN6_PIPE_CONTROL_IS_FLUSH      (1 << 11)
-#define GEN6_PIPE_CONTROL_TC_FLUSH      (1 << 10)
-#define GEN6_PIPE_CONTROL_NOTIFY_ENABLE (1 << 8)
-#define GEN6_PIPE_CONTROL_GLOBAL_GTT    (1 << 2)
-#define GEN6_PIPE_CONTROL_LOCAL_PGTT    (0 << 2)
-#define GEN6_PIPE_CONTROL_DEPTH_CACHE_FLUSH	(1 << 0)
-
-/* 3DPRIMITIVE bits */
-#define GEN6_3DPRIMITIVE_VERTEX_SEQUENTIAL (0 << 15)
-#define GEN6_3DPRIMITIVE_VERTEX_RANDOM	  (1 << 15)
-/* Primitive types are in gen6_defines.h */
-#define GEN6_3DPRIMITIVE_TOPOLOGY_SHIFT	  10
-
-#define GEN6_SVG_CTL		       0x7400
-
-#define GEN6_SVG_CTL_GS_BA	       (0 << 8)
-#define GEN6_SVG_CTL_SS_BA	       (1 << 8)
-#define GEN6_SVG_CTL_IO_BA	       (2 << 8)
-#define GEN6_SVG_CTL_GS_AUB	       (3 << 8)
-#define GEN6_SVG_CTL_IO_AUB	       (4 << 8)
-#define GEN6_SVG_CTL_SIP		       (5 << 8)
-
-#define GEN6_SVG_RDATA		       0x7404
-#define GEN6_SVG_WORK_CTL	       0x7408
-
-#define GEN6_VF_CTL		       0x7500
-
-#define GEN6_VF_CTL_SNAPSHOT_COMPLETE		   (1 << 31)
-#define GEN6_VF_CTL_SNAPSHOT_MUX_SELECT_THREADID	   (0 << 8)
-#define GEN6_VF_CTL_SNAPSHOT_MUX_SELECT_VF_DEBUG	   (1 << 8)
-#define GEN6_VF_CTL_SNAPSHOT_TYPE_VERTEX_SEQUENCE   (0 << 4)
-#define GEN6_VF_CTL_SNAPSHOT_TYPE_VERTEX_INDEX	   (1 << 4)
-#define GEN6_VF_CTL_SKIP_INITIAL_PRIMITIVES	   (1 << 3)
-#define GEN6_VF_CTL_MAX_PRIMITIVES_LIMIT_ENABLE	   (1 << 2)
-#define GEN6_VF_CTL_VERTEX_RANGE_LIMIT_ENABLE	   (1 << 1)
-#define GEN6_VF_CTL_SNAPSHOT_ENABLE	     	   (1 << 0)
-
-#define GEN6_VF_STRG_VAL		       0x7504
-#define GEN6_VF_STR_VL_OVR	       0x7508
-#define GEN6_VF_VC_OVR		       0x750c
-#define GEN6_VF_STR_PSKIP	       0x7510
-#define GEN6_VF_MAX_PRIM		       0x7514
-#define GEN6_VF_RDATA		       0x7518
-
-#define GEN6_VS_CTL		       0x7600
-#define GEN6_VS_CTL_SNAPSHOT_COMPLETE		   (1 << 31)
-#define GEN6_VS_CTL_SNAPSHOT_MUX_VERTEX_0	   (0 << 8)
-#define GEN6_VS_CTL_SNAPSHOT_MUX_VERTEX_1	   (1 << 8)
-#define GEN6_VS_CTL_SNAPSHOT_MUX_VALID_COUNT	   (2 << 8)
-#define GEN6_VS_CTL_SNAPSHOT_MUX_VS_KERNEL_POINTER  (3 << 8)
-#define GEN6_VS_CTL_SNAPSHOT_ALL_THREADS		   (1 << 2)
-#define GEN6_VS_CTL_THREAD_SNAPSHOT_ENABLE	   (1 << 1)
-#define GEN6_VS_CTL_SNAPSHOT_ENABLE		   (1 << 0)
-
-#define GEN6_VS_STRG_VAL		       0x7604
-#define GEN6_VS_RDATA		       0x7608
-
-#define GEN6_SF_CTL		       0x7b00
-#define GEN6_SF_CTL_SNAPSHOT_COMPLETE		   (1 << 31)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_0_FF_ID	   (0 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_0_REL_COUNT (1 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_1_FF_ID	   (2 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_1_REL_COUNT (3 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_2_FF_ID	   (4 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_2_REL_COUNT (5 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_VERTEX_COUNT	   (6 << 8)
-#define GEN6_SF_CTL_SNAPSHOT_MUX_SF_KERNEL_POINTER  (7 << 8)
-#define GEN6_SF_CTL_MIN_MAX_PRIMITIVE_RANGE_ENABLE  (1 << 4)
-#define GEN6_SF_CTL_DEBUG_CLIP_RECTANGLE_ENABLE	   (1 << 3)
-#define GEN6_SF_CTL_SNAPSHOT_ALL_THREADS		   (1 << 2)
-#define GEN6_SF_CTL_THREAD_SNAPSHOT_ENABLE	   (1 << 1)
-#define GEN6_SF_CTL_SNAPSHOT_ENABLE		   (1 << 0)
-
-#define GEN6_SF_STRG_VAL		       0x7b04
-#define GEN6_SF_RDATA		       0x7b18
-
-#define GEN6_WIZ_CTL		       0x7c00
-#define GEN6_WIZ_CTL_SNAPSHOT_COMPLETE		   (1 << 31)
-#define GEN6_WIZ_CTL_SUBSPAN_INSTANCE_SHIFT	   16
-#define GEN6_WIZ_CTL_SNAPSHOT_MUX_WIZ_KERNEL_POINTER   (0 << 8)
-#define GEN6_WIZ_CTL_SNAPSHOT_MUX_SUBSPAN_INSTANCE     (1 << 8)
-#define GEN6_WIZ_CTL_SNAPSHOT_MUX_PRIMITIVE_SEQUENCE   (2 << 8)
-#define GEN6_WIZ_CTL_SINGLE_SUBSPAN_DISPATCH	      (1 << 6)
-#define GEN6_WIZ_CTL_IGNORE_COLOR_SCOREBOARD_STALLS    (1 << 5)
-#define GEN6_WIZ_CTL_ENABLE_SUBSPAN_INSTANCE_COMPARE   (1 << 4)
-#define GEN6_WIZ_CTL_USE_UPSTREAM_SNAPSHOT_FLAG	      (1 << 3)
-#define GEN6_WIZ_CTL_SNAPSHOT_ALL_THREADS	      (1 << 2)
-#define GEN6_WIZ_CTL_THREAD_SNAPSHOT_ENABLE	      (1 << 1)
-#define GEN6_WIZ_CTL_SNAPSHOT_ENABLE		      (1 << 0)
-
-#define GEN6_WIZ_STRG_VAL			      0x7c04
-#define GEN6_WIZ_RDATA				      0x7c18
-
-#define GEN6_TS_CTL		       0x7e00
-#define GEN6_TS_CTL_SNAPSHOT_COMPLETE		   (1 << 31)
-#define GEN6_TS_CTL_SNAPSHOT_MESSAGE_ERROR	   (0 << 8)
-#define GEN6_TS_CTL_SNAPSHOT_INTERFACE_DESCRIPTOR   (3 << 8)
-#define GEN6_TS_CTL_SNAPSHOT_ALL_CHILD_THREADS	   (1 << 2)
-#define GEN6_TS_CTL_SNAPSHOT_ALL_ROOT_THREADS  	   (1 << 1)
-#define GEN6_TS_CTL_SNAPSHOT_ENABLE		   (1 << 0)
-
-#define GEN6_TS_STRG_VAL		       0x7e04
-#define GEN6_TS_RDATA		       0x7e08
-
-#define GEN6_TD_CTL_MUX_SHIFT	       8
-#define GEN6_TD_CTL_EXTERNAL_HALT_R0_DEBUG_MATCH	   (1 << 7)
-#define GEN6_TD_CTL_FORCE_EXTERNAL_HALT		   (1 << 6)
-#define GEN6_TD_CTL_EXCEPTION_MASK_OVERRIDE	   (1 << 5)
-#define GEN6_TD_CTL_FORCE_THREAD_BREAKPOINT_ENABLE  (1 << 4)
-#define GEN6_TD_CTL_BREAKPOINT_ENABLE		   (1 << 2)
-#define GEN6_TD_CTL2		       0x8004
-#define GEN6_TD_CTL2_ILLEGAL_OPCODE_EXCEPTION_OVERRIDE (1 << 28)
-#define GEN6_TD_CTL2_MASKSTACK_EXCEPTION_OVERRIDE      (1 << 26)
-#define GEN6_TD_CTL2_SOFTWARE_EXCEPTION_OVERRIDE	      (1 << 25)
-#define GEN6_TD_CTL2_ACTIVE_THREAD_LIMIT_SHIFT	      16
-#define GEN6_TD_CTL2_ACTIVE_THREAD_LIMIT_ENABLE	      (1 << 8)
-#define GEN6_TD_CTL2_THREAD_SPAWNER_EXECUTION_MASK_ENABLE (1 << 7)
-#define GEN6_TD_CTL2_WIZ_EXECUTION_MASK_ENABLE	      (1 << 6)
-#define GEN6_TD_CTL2_SF_EXECUTION_MASK_ENABLE	      (1 << 5)
-#define GEN6_TD_CTL2_CLIPPER_EXECUTION_MASK_ENABLE     (1 << 4)
-#define GEN6_TD_CTL2_GS_EXECUTION_MASK_ENABLE	      (1 << 3)
-#define GEN6_TD_CTL2_VS_EXECUTION_MASK_ENABLE	      (1 << 0)
-#define GEN6_TD_VF_VS_EMSK	       0x8008
-#define GEN6_TD_GS_EMSK		       0x800c
-#define GEN6_TD_CLIP_EMSK	       0x8010
-#define GEN6_TD_SF_EMSK		       0x8014
-#define GEN6_TD_WIZ_EMSK		       0x8018
-#define GEN6_TD_0_6_EHTRG_VAL	       0x801c
-#define GEN6_TD_0_7_EHTRG_VAL	       0x8020
-#define GEN6_TD_0_6_EHTRG_MSK           0x8024
-#define GEN6_TD_0_7_EHTRG_MSK	       0x8028
-#define GEN6_TD_RDATA		       0x802c
-#define GEN6_TD_TS_EMSK		       0x8030
-
-#define GEN6_EU_CTL		       0x8800
-#define GEN6_EU_CTL_SELECT_SHIFT	       16
-#define GEN6_EU_CTL_DATA_MUX_SHIFT      8
-#define GEN6_EU_ATT_0		       0x8810
-#define GEN6_EU_ATT_1		       0x8814
-#define GEN6_EU_ATT_DATA_0	       0x8820
-#define GEN6_EU_ATT_DATA_1	       0x8824
-#define GEN6_EU_ATT_CLR_0	       0x8830
-#define GEN6_EU_ATT_CLR_1	       0x8834
-#define GEN6_EU_RDATA		       0x8840
-
 /* 3D state:
  */
 #define _3DOP_3DSTATE_PIPELINED       0x0
-- 
2.9.5



More information about the igt-dev mailing list