103b705cfSriastradh#ifndef GEN7_RENDER_H 203b705cfSriastradh#define GEN7_RENDER_H 303b705cfSriastradh 403b705cfSriastradh#define INTEL_MASK(high, low) (((1 << ((high) - (low) + 1)) - 1) << (low)) 503b705cfSriastradh 603b705cfSriastradh#define GEN7_3D(Pipeline,Opcode,Subopcode) ((3 << 29) | \ 703b705cfSriastradh ((Pipeline) << 27) | \ 803b705cfSriastradh ((Opcode) << 24) | \ 903b705cfSriastradh ((Subopcode) << 16)) 1003b705cfSriastradh 1103b705cfSriastradh#define GEN7_STATE_BASE_ADDRESS GEN7_3D(0, 1, 1) 1203b705cfSriastradh#define GEN7_STATE_SIP GEN7_3D(0, 1, 2) 1303b705cfSriastradh 1403b705cfSriastradh#define GEN7_PIPELINE_SELECT GEN7_3D(1, 1, 4) 1503b705cfSriastradh 1603b705cfSriastradh#define GEN7_MEDIA_STATE_POINTERS GEN7_3D(2, 0, 0) 1703b705cfSriastradh#define GEN7_MEDIA_OBJECT GEN7_3D(2, 1, 0) 1803b705cfSriastradh 1903b705cfSriastradh#define GEN7_3DSTATE_VERTEX_BUFFERS GEN7_3D(3, 0, 8) 2003b705cfSriastradh#define GEN7_3DSTATE_VERTEX_ELEMENTS GEN7_3D(3, 0, 9) 2103b705cfSriastradh#define GEN7_3DSTATE_INDEX_BUFFER GEN7_3D(3, 0, 0xa) 2203b705cfSriastradh#define GEN7_3DSTATE_VF_STATISTICS GEN7_3D(3, 0, 0xb) 2303b705cfSriastradh 2403b705cfSriastradh#define GEN7_3DSTATE_DRAWING_RECTANGLE GEN7_3D(3, 1, 0) 2503b705cfSriastradh#define GEN7_3DSTATE_CONSTANT_COLOR GEN7_3D(3, 1, 1) 2603b705cfSriastradh#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD GEN7_3D(3, 1, 2) 2703b705cfSriastradh#define GEN7_3DSTATE_CHROMA_KEY GEN7_3D(3, 1, 4) 2803b705cfSriastradh 2903b705cfSriastradh#define GEN7_3DSTATE_POLY_STIPPLE_OFFSET GEN7_3D(3, 1, 6) 3003b705cfSriastradh#define GEN7_3DSTATE_POLY_STIPPLE_PATTERN GEN7_3D(3, 1, 7) 3103b705cfSriastradh#define GEN7_3DSTATE_LINE_STIPPLE GEN7_3D(3, 1, 8) 3203b705cfSriastradh#define GEN7_3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP GEN7_3D(3, 1, 9) 3303b705cfSriastradh/* These two are BLC and CTG only, not BW or CL */ 3403b705cfSriastradh#define GEN7_3DSTATE_AA_LINE_PARAMS GEN7_3D(3, 1, 0xa) 3503b705cfSriastradh#define GEN7_3DSTATE_GS_SVB_INDEX GEN7_3D(3, 1, 0xb) 3603b705cfSriastradh 3703b705cfSriastradh#define GEN7_3DPRIMITIVE GEN7_3D(3, 3, 0) 3803b705cfSriastradh 3903b705cfSriastradh#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS GEN7_3D(3, 0, 0x02) 4003b705cfSriastradh# define GEN7_3DSTATE_SAMPLER_STATE_MODIFY_PS (1 << 12) 4103b705cfSriastradh# define GEN7_3DSTATE_SAMPLER_STATE_MODIFY_GS (1 << 9) 4203b705cfSriastradh# define GEN7_3DSTATE_SAMPLER_STATE_MODIFY_VS (1 << 8) 4303b705cfSriastradh 4403b705cfSriastradh#define GEN7_3DSTATE_URB GEN7_3D(3, 0, 0x05) 4503b705cfSriastradh/* DW1 */ 4603b705cfSriastradh# define GEN7_3DSTATE_URB_VS_SIZE_SHIFT 16 4703b705cfSriastradh# define GEN7_3DSTATE_URB_VS_ENTRIES_SHIFT 0 4803b705cfSriastradh/* DW2 */ 4903b705cfSriastradh# define GEN7_3DSTATE_URB_GS_ENTRIES_SHIFT 8 5003b705cfSriastradh# define GEN7_3DSTATE_URB_GS_SIZE_SHIFT 0 5103b705cfSriastradh 5203b705cfSriastradh#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS GEN7_3D(3, 0, 0x0d) 5303b705cfSriastradh# define GEN7_3DSTATE_VIEWPORT_STATE_MODIFY_CC (1 << 12) 5403b705cfSriastradh# define GEN7_3DSTATE_VIEWPORT_STATE_MODIFY_SF (1 << 11) 5503b705cfSriastradh# define GEN7_3DSTATE_VIEWPORT_STATE_MODIFY_CLIP (1 << 10) 5603b705cfSriastradh 5703b705cfSriastradh#define GEN7_3DSTATE_CC_STATE_POINTERS GEN7_3D(3, 0, 0x0e) 5803b705cfSriastradh 5903b705cfSriastradh#define GEN7_3DSTATE_VS GEN7_3D(3, 0, 0x10) 6003b705cfSriastradh 6103b705cfSriastradh#define GEN7_3DSTATE_GS GEN7_3D(3, 0, 0x11) 6203b705cfSriastradh/* DW4 */ 6303b705cfSriastradh# define GEN7_3DSTATE_GS_DISPATCH_START_GRF_SHIFT 0 6403b705cfSriastradh 6503b705cfSriastradh#define GEN7_3DSTATE_CLIP GEN7_3D(3, 0, 0x12) 6603b705cfSriastradh 6703b705cfSriastradh#define GEN7_3DSTATE_SF GEN7_3D(3, 0, 0x13) 6803b705cfSriastradh/* DW1 */ 6903b705cfSriastradh# define GEN7_3DSTATE_SF_NUM_OUTPUTS_SHIFT 22 7003b705cfSriastradh# define GEN7_3DSTATE_SF_URB_ENTRY_READ_LENGTH_SHIFT 11 7103b705cfSriastradh# define GEN7_3DSTATE_SF_URB_ENTRY_READ_OFFSET_SHIFT 4 7203b705cfSriastradh/* DW2 */ 7303b705cfSriastradh/* DW3 */ 7403b705cfSriastradh# define GEN7_3DSTATE_SF_CULL_BOTH (0 << 29) 7503b705cfSriastradh# define GEN7_3DSTATE_SF_CULL_NONE (1 << 29) 7603b705cfSriastradh# define GEN7_3DSTATE_SF_CULL_FRONT (2 << 29) 7703b705cfSriastradh# define GEN7_3DSTATE_SF_CULL_BACK (3 << 29) 7803b705cfSriastradh/* DW4 */ 7903b705cfSriastradh# define GEN7_3DSTATE_SF_TRI_PROVOKE_SHIFT 29 8003b705cfSriastradh# define GEN7_3DSTATE_SF_LINE_PROVOKE_SHIFT 27 8103b705cfSriastradh# define GEN7_3DSTATE_SF_TRIFAN_PROVOKE_SHIFT 25 8203b705cfSriastradh 8303b705cfSriastradh#define GEN7_3DSTATE_WM GEN7_3D(3, 0, 0x14) 8403b705cfSriastradh/* DW1 */ 8503b705cfSriastradh# define GEN7_WM_STATISTICS_ENABLE (1 << 31) 8603b705cfSriastradh# define GEN7_WM_DEPTH_CLEAR (1 << 30) 8703b705cfSriastradh# define GEN7_WM_DISPATCH_ENABLE (1 << 29) 8803b705cfSriastradh# define GEN7_WM_DEPTH_RESOLVE (1 << 28) 8903b705cfSriastradh# define GEN7_WM_HIERARCHICAL_DEPTH_RESOLVE (1 << 27) 9003b705cfSriastradh# define GEN7_WM_KILL_ENABLE (1 << 25) 9103b705cfSriastradh# define GEN7_WM_PSCDEPTH_OFF (0 << 23) 9203b705cfSriastradh# define GEN7_WM_PSCDEPTH_ON (1 << 23) 9303b705cfSriastradh# define GEN7_WM_PSCDEPTH_ON_GE (2 << 23) 9403b705cfSriastradh# define GEN7_WM_PSCDEPTH_ON_LE (3 << 23) 9503b705cfSriastradh# define GEN7_WM_USES_SOURCE_DEPTH (1 << 20) 9603b705cfSriastradh# define GEN7_WM_USES_SOURCE_W (1 << 19) 9703b705cfSriastradh# define GEN7_WM_POSITION_ZW_PIXEL (0 << 17) 9803b705cfSriastradh# define GEN7_WM_POSITION_ZW_CENTROID (2 << 17) 9903b705cfSriastradh# define GEN7_WM_POSITION_ZW_SAMPLE (3 << 17) 10003b705cfSriastradh# define GEN7_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 16) 10103b705cfSriastradh# define GEN7_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC (1 << 15) 10203b705cfSriastradh# define GEN7_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC (1 << 14) 10303b705cfSriastradh# define GEN7_WM_PERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 13) 10403b705cfSriastradh# define GEN7_WM_PERSPECTIVE_CENTROID_BARYCENTRIC (1 << 12) 10503b705cfSriastradh# define GEN7_WM_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 11) 10603b705cfSriastradh# define GEN7_WM_USES_INPUT_COVERAGE_MASK (1 << 10) 10703b705cfSriastradh# define GEN7_WM_LINE_END_CAP_AA_WIDTH_0_5 (0 << 8) 10803b705cfSriastradh# define GEN7_WM_LINE_END_CAP_AA_WIDTH_1_0 (1 << 8) 10903b705cfSriastradh# define GEN7_WM_LINE_END_CAP_AA_WIDTH_2_0 (2 << 8) 11003b705cfSriastradh# define GEN7_WM_LINE_END_CAP_AA_WIDTH_4_0 (3 << 8) 11103b705cfSriastradh# define GEN7_WM_LINE_AA_WIDTH_0_5 (0 << 6) 11203b705cfSriastradh# define GEN7_WM_LINE_AA_WIDTH_1_0 (1 << 6) 11303b705cfSriastradh# define GEN7_WM_LINE_AA_WIDTH_2_0 (2 << 6) 11403b705cfSriastradh# define GEN7_WM_LINE_AA_WIDTH_4_0 (3 << 6) 11503b705cfSriastradh# define GEN7_WM_POLYGON_STIPPLE_ENABLE (1 << 4) 11603b705cfSriastradh# define GEN7_WM_LINE_STIPPLE_ENABLE (1 << 3) 11703b705cfSriastradh# define GEN7_WM_POINT_RASTRULE_UPPER_RIGHT (1 << 2) 11803b705cfSriastradh# define GEN7_WM_MSRAST_OFF_PIXEL (0 << 0) 11903b705cfSriastradh# define GEN7_WM_MSRAST_OFF_PATTERN (1 << 0) 12003b705cfSriastradh# define GEN7_WM_MSRAST_ON_PIXEL (2 << 0) 12103b705cfSriastradh# define GEN7_WM_MSRAST_ON_PATTERN (3 << 0) 12203b705cfSriastradh/* DW2 */ 12303b705cfSriastradh# define GEN7_WM_MSDISPMODE_PERPIXEL (1 << 31) 12403b705cfSriastradh 12503b705cfSriastradh 12603b705cfSriastradh#define GEN7_3DSTATE_CONSTANT_VS GEN7_3D(3, 0, 0x15) 12703b705cfSriastradh#define GEN7_3DSTATE_CONSTANT_GS GEN7_3D(3, 0, 0x16) 12803b705cfSriastradh#define GEN7_3DSTATE_CONSTANT_PS GEN7_3D(3, 0, 0x17) 12903b705cfSriastradh 13003b705cfSriastradh#define GEN7_3DSTATE_SAMPLE_MASK GEN7_3D(3, 0, 0x18) 13103b705cfSriastradh 13203b705cfSriastradh#define GEN7_3DSTATE_MULTISAMPLE GEN7_3D(3, 1, 0x0d) 13303b705cfSriastradh/* DW1 */ 13403b705cfSriastradh# define GEN7_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_CENTER (0 << 4) 13503b705cfSriastradh# define GEN7_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_UPPER_LEFT (1 << 4) 13603b705cfSriastradh# define GEN7_3DSTATE_MULTISAMPLE_NUMSAMPLES_1 (0 << 1) 13703b705cfSriastradh# define GEN7_3DSTATE_MULTISAMPLE_NUMSAMPLES_4 (2 << 1) 13803b705cfSriastradh# define GEN7_3DSTATE_MULTISAMPLE_NUMSAMPLES_8 (3 << 1) 13903b705cfSriastradh 14003b705cfSriastradh#define PIPELINE_SELECT_3D 0 14103b705cfSriastradh#define PIPELINE_SELECT_MEDIA 1 14203b705cfSriastradh 14303b705cfSriastradh/* for GEN7_STATE_BASE_ADDRESS */ 14403b705cfSriastradh#define BASE_ADDRESS_MODIFY (1 << 0) 14503b705cfSriastradh 14603b705cfSriastradh/* for GEN7_PIPE_CONTROL */ 14703b705cfSriastradh#define GEN7_PIPE_CONTROL GEN7_3D(3, 2, 0) 14803b705cfSriastradh#define GEN7_PIPE_CONTROL_CS_STALL (1 << 20) 14903b705cfSriastradh#define GEN7_PIPE_CONTROL_NOWRITE (0 << 14) 15003b705cfSriastradh#define GEN7_PIPE_CONTROL_WRITE_QWORD (1 << 14) 15103b705cfSriastradh#define GEN7_PIPE_CONTROL_WRITE_DEPTH (2 << 14) 15203b705cfSriastradh#define GEN7_PIPE_CONTROL_WRITE_TIME (3 << 14) 15303b705cfSriastradh#define GEN7_PIPE_CONTROL_DEPTH_STALL (1 << 13) 15403b705cfSriastradh#define GEN7_PIPE_CONTROL_WC_FLUSH (1 << 12) 15503b705cfSriastradh#define GEN7_PIPE_CONTROL_IS_FLUSH (1 << 11) 15603b705cfSriastradh#define GEN7_PIPE_CONTROL_TC_FLUSH (1 << 10) 15703b705cfSriastradh#define GEN7_PIPE_CONTROL_NOTIFY_ENABLE (1 << 8) 15803b705cfSriastradh#define GEN7_PIPE_CONTROL_GLOBAL_GTT (1 << 2) 15903b705cfSriastradh#define GEN7_PIPE_CONTROL_LOCAL_PGTT (0 << 2) 16003b705cfSriastradh#define GEN7_PIPE_CONTROL_STALL_AT_SCOREBOARD (1 << 1) 16103b705cfSriastradh#define GEN7_PIPE_CONTROL_DEPTH_CACHE_FLUSH (1 << 0) 16203b705cfSriastradh 16303b705cfSriastradh/* VERTEX_BUFFER_STATE Structure */ 16403b705cfSriastradh#define GEN7_VB0_BUFFER_INDEX_SHIFT 26 16503b705cfSriastradh#define GEN7_VB0_VERTEXDATA (0 << 20) 16603b705cfSriastradh#define GEN7_VB0_INSTANCEDATA (1 << 20) 16703b705cfSriastradh#define GEN7_VB0_BUFFER_PITCH_SHIFT 0 16803b705cfSriastradh#define GEN7_VB0_ADDRESS_MODIFY_ENABLE (1 << 14) 16903b705cfSriastradh 17003b705cfSriastradh/* VERTEX_ELEMENT_STATE Structure */ 17103b705cfSriastradh#define GEN7_VE0_VERTEX_BUFFER_INDEX_SHIFT 26 17203b705cfSriastradh#define GEN7_VE0_VALID (1 << 25) 17303b705cfSriastradh#define GEN7_VE0_FORMAT_SHIFT 16 17403b705cfSriastradh#define GEN7_VE0_OFFSET_SHIFT 0 17503b705cfSriastradh#define GEN7_VE1_VFCOMPONENT_0_SHIFT 28 17603b705cfSriastradh#define GEN7_VE1_VFCOMPONENT_1_SHIFT 24 17703b705cfSriastradh#define GEN7_VE1_VFCOMPONENT_2_SHIFT 20 17803b705cfSriastradh#define GEN7_VE1_VFCOMPONENT_3_SHIFT 16 17903b705cfSriastradh#define GEN7_VE1_DESTINATION_ELEMENT_OFFSET_SHIFT 0 18003b705cfSriastradh 18103b705cfSriastradh/* 3DPRIMITIVE bits */ 18203b705cfSriastradh#define GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL (0 << 15) 18303b705cfSriastradh#define GEN7_3DPRIMITIVE_VERTEX_RANDOM (1 << 15) 18403b705cfSriastradh 18503b705cfSriastradh#define GEN7_SVG_CTL 0x7400 18603b705cfSriastradh 18703b705cfSriastradh#define GEN7_SVG_CTL_GS_BA (0 << 8) 18803b705cfSriastradh#define GEN7_SVG_CTL_SS_BA (1 << 8) 18903b705cfSriastradh#define GEN7_SVG_CTL_IO_BA (2 << 8) 19003b705cfSriastradh#define GEN7_SVG_CTL_GS_AUB (3 << 8) 19103b705cfSriastradh#define GEN7_SVG_CTL_IO_AUB (4 << 8) 19203b705cfSriastradh#define GEN7_SVG_CTL_SIP (5 << 8) 19303b705cfSriastradh 19403b705cfSriastradh#define GEN7_VF_CTL_SNAPSHOT_COMPLETE (1 << 31) 19503b705cfSriastradh#define GEN7_VF_CTL_SNAPSHOT_MUX_SELECT_THREADID (0 << 8) 19603b705cfSriastradh#define GEN7_VF_CTL_SNAPSHOT_MUX_SELECT_VF_DEBUG (1 << 8) 19703b705cfSriastradh#define GEN7_VF_CTL_SNAPSHOT_TYPE_VERTEX_SEQUENCE (0 << 4) 19803b705cfSriastradh#define GEN7_VF_CTL_SNAPSHOT_TYPE_VERTEX_INDEX (1 << 4) 19903b705cfSriastradh#define GEN7_VF_CTL_SKIP_INITIAL_PRIMITIVES (1 << 3) 20003b705cfSriastradh#define GEN7_VF_CTL_MAX_PRIMITIVES_LIMIT_ENABLE (1 << 2) 20103b705cfSriastradh#define GEN7_VF_CTL_VERTEX_RANGE_LIMIT_ENABLE (1 << 1) 20203b705cfSriastradh#define GEN7_VF_CTL_SNAPSHOT_ENABLE (1 << 0) 20303b705cfSriastradh 20403b705cfSriastradh#define GEN7_VF_STRG_VAL 0x7504 20503b705cfSriastradh#define GEN7_VF_STR_VL_OVR 0x7508 20603b705cfSriastradh#define GEN7_VF_VC_OVR 0x750c 20703b705cfSriastradh#define GEN7_VF_STR_PSKIP 0x7510 20803b705cfSriastradh#define GEN7_VF_MAX_PRIM 0x7514 20903b705cfSriastradh#define GEN7_VF_RDATA 0x7518 21003b705cfSriastradh 21103b705cfSriastradh#define GEN7_VS_CTL 0x7600 21203b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_COMPLETE (1 << 31) 21303b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_MUX_VERTEX_0 (0 << 8) 21403b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_MUX_VERTEX_1 (1 << 8) 21503b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_MUX_VALID_COUNT (2 << 8) 21603b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_MUX_VS_KERNEL_POINTER (3 << 8) 21703b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_ALL_THREADS (1 << 2) 21803b705cfSriastradh#define GEN7_VS_CTL_THREAD_SNAPSHOT_ENABLE (1 << 1) 21903b705cfSriastradh#define GEN7_VS_CTL_SNAPSHOT_ENABLE (1 << 0) 22003b705cfSriastradh 22103b705cfSriastradh#define GEN7_VS_STRG_VAL 0x7604 22203b705cfSriastradh#define GEN7_VS_RDATA 0x7608 22303b705cfSriastradh 22403b705cfSriastradh#define GEN7_SF_CTL 0x7b00 22503b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_COMPLETE (1 << 31) 22603b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_0_FF_ID (0 << 8) 22703b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_0_REL_COUNT (1 << 8) 22803b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_1_FF_ID (2 << 8) 22903b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_1_REL_COUNT (3 << 8) 23003b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_2_FF_ID (4 << 8) 23103b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_2_REL_COUNT (5 << 8) 23203b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_VERTEX_COUNT (6 << 8) 23303b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_MUX_SF_KERNEL_POINTER (7 << 8) 23403b705cfSriastradh#define GEN7_SF_CTL_MIN_MAX_PRIMITIVE_RANGE_ENABLE (1 << 4) 23503b705cfSriastradh#define GEN7_SF_CTL_DEBUG_CLIP_RECTANGLE_ENABLE (1 << 3) 23603b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_ALL_THREADS (1 << 2) 23703b705cfSriastradh#define GEN7_SF_CTL_THREAD_SNAPSHOT_ENABLE (1 << 1) 23803b705cfSriastradh#define GEN7_SF_CTL_SNAPSHOT_ENABLE (1 << 0) 23903b705cfSriastradh 24003b705cfSriastradh#define GEN7_SF_STRG_VAL 0x7b04 24103b705cfSriastradh#define GEN7_SF_RDATA 0x7b18 24203b705cfSriastradh 24303b705cfSriastradh#define GEN7_WIZ_CTL 0x7c00 24403b705cfSriastradh#define GEN7_WIZ_CTL_SNAPSHOT_COMPLETE (1 << 31) 24503b705cfSriastradh#define GEN7_WIZ_CTL_SUBSPAN_INSTANCE_SHIFT 16 24603b705cfSriastradh#define GEN7_WIZ_CTL_SNAPSHOT_MUX_WIZ_KERNEL_POINTER (0 << 8) 24703b705cfSriastradh#define GEN7_WIZ_CTL_SNAPSHOT_MUX_SUBSPAN_INSTANCE (1 << 8) 24803b705cfSriastradh#define GEN7_WIZ_CTL_SNAPSHOT_MUX_PRIMITIVE_SEQUENCE (2 << 8) 24903b705cfSriastradh#define GEN7_WIZ_CTL_SINGLE_SUBSPAN_DISPATCH (1 << 6) 25003b705cfSriastradh#define GEN7_WIZ_CTL_IGNORE_COLOR_SCOREBOARD_STALLS (1 << 5) 25103b705cfSriastradh#define GEN7_WIZ_CTL_ENABLE_SUBSPAN_INSTANCE_COMPARE (1 << 4) 25203b705cfSriastradh#define GEN7_WIZ_CTL_USE_UPSTREAM_SNAPSHOT_FLAG (1 << 3) 25303b705cfSriastradh#define GEN7_WIZ_CTL_SNAPSHOT_ALL_THREADS (1 << 2) 25403b705cfSriastradh#define GEN7_WIZ_CTL_THREAD_SNAPSHOT_ENABLE (1 << 1) 25503b705cfSriastradh#define GEN7_WIZ_CTL_SNAPSHOT_ENABLE (1 << 0) 25603b705cfSriastradh 25703b705cfSriastradh#define GEN7_WIZ_STRG_VAL 0x7c04 25803b705cfSriastradh#define GEN7_WIZ_RDATA 0x7c18 25903b705cfSriastradh 26003b705cfSriastradh#define GEN7_TS_CTL 0x7e00 26103b705cfSriastradh#define GEN7_TS_CTL_SNAPSHOT_COMPLETE (1 << 31) 26203b705cfSriastradh#define GEN7_TS_CTL_SNAPSHOT_MESSAGE_ERROR (0 << 8) 26303b705cfSriastradh#define GEN7_TS_CTL_SNAPSHOT_INTERFACE_DESCRIPTOR (3 << 8) 26403b705cfSriastradh#define GEN7_TS_CTL_SNAPSHOT_ALL_CHILD_THREADS (1 << 2) 26503b705cfSriastradh#define GEN7_TS_CTL_SNAPSHOT_ALL_ROOT_THREADS (1 << 1) 26603b705cfSriastradh#define GEN7_TS_CTL_SNAPSHOT_ENABLE (1 << 0) 26703b705cfSriastradh 26803b705cfSriastradh#define GEN7_TS_STRG_VAL 0x7e04 26903b705cfSriastradh#define GEN7_TS_RDATA 0x7e08 27003b705cfSriastradh 27103b705cfSriastradh#define GEN7_TD_CTL 0x8000 27203b705cfSriastradh#define GEN7_TD_CTL_MUX_SHIFT 8 27303b705cfSriastradh#define GEN7_TD_CTL_EXTERNAL_HALT_R0_DEBUG_MATCH (1 << 7) 27403b705cfSriastradh#define GEN7_TD_CTL_FORCE_EXTERNAL_HALT (1 << 6) 27503b705cfSriastradh#define GEN7_TD_CTL_EXCEPTION_MASK_OVERRIDE (1 << 5) 27603b705cfSriastradh#define GEN7_TD_CTL_FORCE_THREAD_BREAKPOINT_ENABLE (1 << 4) 27703b705cfSriastradh#define GEN7_TD_CTL_BREAKPOINT_ENABLE (1 << 2) 27803b705cfSriastradh#define GEN7_TD_CTL2 0x8004 27903b705cfSriastradh#define GEN7_TD_CTL2_ILLEGAL_OPCODE_EXCEPTION_OVERRIDE (1 << 28) 28003b705cfSriastradh#define GEN7_TD_CTL2_MASKSTACK_EXCEPTION_OVERRIDE (1 << 26) 28103b705cfSriastradh#define GEN7_TD_CTL2_SOFTWARE_EXCEPTION_OVERRIDE (1 << 25) 28203b705cfSriastradh#define GEN7_TD_CTL2_ACTIVE_THREAD_LIMIT_SHIFT 16 28303b705cfSriastradh#define GEN7_TD_CTL2_ACTIVE_THREAD_LIMIT_ENABLE (1 << 8) 28403b705cfSriastradh#define GEN7_TD_CTL2_THREAD_SPAWNER_EXECUTION_MASK_ENABLE (1 << 7) 28503b705cfSriastradh#define GEN7_TD_CTL2_WIZ_EXECUTION_MASK_ENABLE (1 << 6) 28603b705cfSriastradh#define GEN7_TD_CTL2_SF_EXECUTION_MASK_ENABLE (1 << 5) 28703b705cfSriastradh#define GEN7_TD_CTL2_CLIPPER_EXECUTION_MASK_ENABLE (1 << 4) 28803b705cfSriastradh#define GEN7_TD_CTL2_GS_EXECUTION_MASK_ENABLE (1 << 3) 28903b705cfSriastradh#define GEN7_TD_CTL2_VS_EXECUTION_MASK_ENABLE (1 << 0) 29003b705cfSriastradh#define GEN7_TD_VF_VS_EMSK 0x8008 29103b705cfSriastradh#define GEN7_TD_GS_EMSK 0x800c 29203b705cfSriastradh#define GEN7_TD_CLIP_EMSK 0x8010 29303b705cfSriastradh#define GEN7_TD_SF_EMSK 0x8014 29403b705cfSriastradh#define GEN7_TD_WIZ_EMSK 0x8018 29503b705cfSriastradh#define GEN7_TD_0_6_EHTRG_VAL 0x801c 29603b705cfSriastradh#define GEN7_TD_0_7_EHTRG_VAL 0x8020 29703b705cfSriastradh#define GEN7_TD_0_6_EHTRG_MSK 0x8024 29803b705cfSriastradh#define GEN7_TD_0_7_EHTRG_MSK 0x8028 29903b705cfSriastradh#define GEN7_TD_RDATA 0x802c 30003b705cfSriastradh#define GEN7_TD_TS_EMSK 0x8030 30103b705cfSriastradh 30203b705cfSriastradh#define GEN7_EU_CTL 0x8800 30303b705cfSriastradh#define GEN7_EU_CTL_SELECT_SHIFT 16 30403b705cfSriastradh#define GEN7_EU_CTL_DATA_MUX_SHIFT 8 30503b705cfSriastradh#define GEN7_EU_ATT_0 0x8810 30603b705cfSriastradh#define GEN7_EU_ATT_1 0x8814 30703b705cfSriastradh#define GEN7_EU_ATT_DATA_0 0x8820 30803b705cfSriastradh#define GEN7_EU_ATT_DATA_1 0x8824 30903b705cfSriastradh#define GEN7_EU_ATT_CLR_0 0x8830 31003b705cfSriastradh#define GEN7_EU_ATT_CLR_1 0x8834 31103b705cfSriastradh#define GEN7_EU_RDATA 0x8840 31203b705cfSriastradh 31303b705cfSriastradh#define _3DPRIM_POINTLIST 0x01 31403b705cfSriastradh#define _3DPRIM_LINELIST 0x02 31503b705cfSriastradh#define _3DPRIM_LINESTRIP 0x03 31603b705cfSriastradh#define _3DPRIM_TRILIST 0x04 31703b705cfSriastradh#define _3DPRIM_TRISTRIP 0x05 31803b705cfSriastradh#define _3DPRIM_TRIFAN 0x06 31903b705cfSriastradh#define _3DPRIM_QUADLIST 0x07 32003b705cfSriastradh#define _3DPRIM_QUADSTRIP 0x08 32103b705cfSriastradh#define _3DPRIM_LINELIST_ADJ 0x09 32203b705cfSriastradh#define _3DPRIM_LINESTRIP_ADJ 0x0A 32303b705cfSriastradh#define _3DPRIM_TRILIST_ADJ 0x0B 32403b705cfSriastradh#define _3DPRIM_TRISTRIP_ADJ 0x0C 32503b705cfSriastradh#define _3DPRIM_TRISTRIP_REVERSE 0x0D 32603b705cfSriastradh#define _3DPRIM_POLYGON 0x0E 32703b705cfSriastradh#define _3DPRIM_RECTLIST 0x0F 32803b705cfSriastradh#define _3DPRIM_LINELOOP 0x10 32903b705cfSriastradh#define _3DPRIM_POINTLIST_BF 0x11 33003b705cfSriastradh#define _3DPRIM_LINESTRIP_CONT 0x12 33103b705cfSriastradh#define _3DPRIM_LINESTRIP_BF 0x13 33203b705cfSriastradh#define _3DPRIM_LINESTRIP_CONT_BF 0x14 33303b705cfSriastradh#define _3DPRIM_TRIFAN_NOSTIPPLE 0x15 33403b705cfSriastradh 33503b705cfSriastradh#define _3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL 0 33603b705cfSriastradh#define _3DPRIM_VERTEXBUFFER_ACCESS_RANDOM 1 33703b705cfSriastradh 33803b705cfSriastradh#define GEN7_ANISORATIO_2 0 33903b705cfSriastradh#define GEN7_ANISORATIO_4 1 34003b705cfSriastradh#define GEN7_ANISORATIO_6 2 34103b705cfSriastradh#define GEN7_ANISORATIO_8 3 34203b705cfSriastradh#define GEN7_ANISORATIO_10 4 34303b705cfSriastradh#define GEN7_ANISORATIO_12 5 34403b705cfSriastradh#define GEN7_ANISORATIO_14 6 34503b705cfSriastradh#define GEN7_ANISORATIO_16 7 34603b705cfSriastradh 34703b705cfSriastradh#define GEN7_BLENDFACTOR_ONE 0x1 34803b705cfSriastradh#define GEN7_BLENDFACTOR_SRC_COLOR 0x2 34903b705cfSriastradh#define GEN7_BLENDFACTOR_SRC_ALPHA 0x3 35003b705cfSriastradh#define GEN7_BLENDFACTOR_DST_ALPHA 0x4 35103b705cfSriastradh#define GEN7_BLENDFACTOR_DST_COLOR 0x5 35203b705cfSriastradh#define GEN7_BLENDFACTOR_SRC_ALPHA_SATURATE 0x6 35303b705cfSriastradh#define GEN7_BLENDFACTOR_CONST_COLOR 0x7 35403b705cfSriastradh#define GEN7_BLENDFACTOR_CONST_ALPHA 0x8 35503b705cfSriastradh#define GEN7_BLENDFACTOR_SRC1_COLOR 0x9 35603b705cfSriastradh#define GEN7_BLENDFACTOR_SRC1_ALPHA 0x0A 35703b705cfSriastradh#define GEN7_BLENDFACTOR_ZERO 0x11 35803b705cfSriastradh#define GEN7_BLENDFACTOR_INV_SRC_COLOR 0x12 35903b705cfSriastradh#define GEN7_BLENDFACTOR_INV_SRC_ALPHA 0x13 36003b705cfSriastradh#define GEN7_BLENDFACTOR_INV_DST_ALPHA 0x14 36103b705cfSriastradh#define GEN7_BLENDFACTOR_INV_DST_COLOR 0x15 36203b705cfSriastradh#define GEN7_BLENDFACTOR_INV_CONST_COLOR 0x17 36303b705cfSriastradh#define GEN7_BLENDFACTOR_INV_CONST_ALPHA 0x18 36403b705cfSriastradh#define GEN7_BLENDFACTOR_INV_SRC1_COLOR 0x19 36503b705cfSriastradh#define GEN7_BLENDFACTOR_INV_SRC1_ALPHA 0x1A 36603b705cfSriastradh 36703b705cfSriastradh#define GEN7_BLENDFUNCTION_ADD 0 36803b705cfSriastradh#define GEN7_BLENDFUNCTION_SUBTRACT 1 36903b705cfSriastradh#define GEN7_BLENDFUNCTION_REVERSE_SUBTRACT 2 37003b705cfSriastradh#define GEN7_BLENDFUNCTION_MIN 3 37103b705cfSriastradh#define GEN7_BLENDFUNCTION_MAX 4 37203b705cfSriastradh 37303b705cfSriastradh#define GEN7_ALPHATEST_FORMAT_UNORM8 0 37403b705cfSriastradh#define GEN7_ALPHATEST_FORMAT_FLOAT32 1 37503b705cfSriastradh 37603b705cfSriastradh#define GEN7_CHROMAKEY_KILL_ON_ANY_MATCH 0 37703b705cfSriastradh#define GEN7_CHROMAKEY_REPLACE_BLACK 1 37803b705cfSriastradh 37903b705cfSriastradh#define GEN7_CLIP_API_OGL 0 38003b705cfSriastradh#define GEN7_CLIP_API_DX 1 38103b705cfSriastradh 38203b705cfSriastradh#define GEN7_CLIPMODE_NORMAL 0 38303b705cfSriastradh#define GEN7_CLIPMODE_CLIP_ALL 1 38403b705cfSriastradh#define GEN7_CLIPMODE_CLIP_NON_REJECTED 2 38503b705cfSriastradh#define GEN7_CLIPMODE_REJECT_ALL 3 38603b705cfSriastradh#define GEN7_CLIPMODE_ACCEPT_ALL 4 38703b705cfSriastradh 38803b705cfSriastradh#define GEN7_CLIP_NDCSPACE 0 38903b705cfSriastradh#define GEN7_CLIP_SCREENSPACE 1 39003b705cfSriastradh 39103b705cfSriastradh#define GEN7_COMPAREFUNCTION_ALWAYS 0 39203b705cfSriastradh#define GEN7_COMPAREFUNCTION_NEVER 1 39303b705cfSriastradh#define GEN7_COMPAREFUNCTION_LESS 2 39403b705cfSriastradh#define GEN7_COMPAREFUNCTION_EQUAL 3 39503b705cfSriastradh#define GEN7_COMPAREFUNCTION_LEQUAL 4 39603b705cfSriastradh#define GEN7_COMPAREFUNCTION_GREATER 5 39703b705cfSriastradh#define GEN7_COMPAREFUNCTION_NOTEQUAL 6 39803b705cfSriastradh#define GEN7_COMPAREFUNCTION_GEQUAL 7 39903b705cfSriastradh 40003b705cfSriastradh#define GEN7_COVERAGE_PIXELS_HALF 0 40103b705cfSriastradh#define GEN7_COVERAGE_PIXELS_1 1 40203b705cfSriastradh#define GEN7_COVERAGE_PIXELS_2 2 40303b705cfSriastradh#define GEN7_COVERAGE_PIXELS_4 3 40403b705cfSriastradh 40503b705cfSriastradh#define GEN7_CULLMODE_BOTH 0 40603b705cfSriastradh#define GEN7_CULLMODE_NONE 1 40703b705cfSriastradh#define GEN7_CULLMODE_FRONT 2 40803b705cfSriastradh#define GEN7_CULLMODE_BACK 3 40903b705cfSriastradh 41003b705cfSriastradh#define GEN7_DEFAULTCOLOR_R8G8B8A8_UNORM 0 41103b705cfSriastradh#define GEN7_DEFAULTCOLOR_R32G32B32A32_FLOAT 1 41203b705cfSriastradh 41303b705cfSriastradh#define GEN7_DEPTHFORMAT_D32_FLOAT_S8X24_UINT 0 41403b705cfSriastradh#define GEN7_DEPTHFORMAT_D32_FLOAT 1 41503b705cfSriastradh#define GEN7_DEPTHFORMAT_D24_UNORM_S8_UINT 2 41603b705cfSriastradh#define GEN7_DEPTHFORMAT_D16_UNORM 5 41703b705cfSriastradh 41803b705cfSriastradh#define GEN7_FLOATING_POINT_IEEE_754 0 41903b705cfSriastradh#define GEN7_FLOATING_POINT_NON_IEEE_754 1 42003b705cfSriastradh 42103b705cfSriastradh#define GEN7_FRONTWINDING_CW 0 42203b705cfSriastradh#define GEN7_FRONTWINDING_CCW 1 42303b705cfSriastradh 42403b705cfSriastradh#define GEN7_INDEX_BYTE 0 42503b705cfSriastradh#define GEN7_INDEX_WORD 1 42603b705cfSriastradh#define GEN7_INDEX_DWORD 2 42703b705cfSriastradh 42803b705cfSriastradh#define GEN7_LOGICOPFUNCTION_CLEAR 0 42903b705cfSriastradh#define GEN7_LOGICOPFUNCTION_NOR 1 43003b705cfSriastradh#define GEN7_LOGICOPFUNCTION_AND_INVERTED 2 43103b705cfSriastradh#define GEN7_LOGICOPFUNCTION_COPY_INVERTED 3 43203b705cfSriastradh#define GEN7_LOGICOPFUNCTION_AND_REVERSE 4 43303b705cfSriastradh#define GEN7_LOGICOPFUNCTION_INVERT 5 43403b705cfSriastradh#define GEN7_LOGICOPFUNCTION_XOR 6 43503b705cfSriastradh#define GEN7_LOGICOPFUNCTION_NAND 7 43603b705cfSriastradh#define GEN7_LOGICOPFUNCTION_AND 8 43703b705cfSriastradh#define GEN7_LOGICOPFUNCTION_EQUIV 9 43803b705cfSriastradh#define GEN7_LOGICOPFUNCTION_NOOP 10 43903b705cfSriastradh#define GEN7_LOGICOPFUNCTION_OR_INVERTED 11 44003b705cfSriastradh#define GEN7_LOGICOPFUNCTION_COPY 12 44103b705cfSriastradh#define GEN7_LOGICOPFUNCTION_OR_REVERSE 13 44203b705cfSriastradh#define GEN7_LOGICOPFUNCTION_OR 14 44303b705cfSriastradh#define GEN7_LOGICOPFUNCTION_SET 15 44403b705cfSriastradh 44503b705cfSriastradh#define GEN7_MAPFILTER_NEAREST 0x0 44603b705cfSriastradh#define GEN7_MAPFILTER_LINEAR 0x1 44703b705cfSriastradh#define GEN7_MAPFILTER_ANISOTROPIC 0x2 44803b705cfSriastradh 44903b705cfSriastradh#define GEN7_MIPFILTER_NONE 0 45003b705cfSriastradh#define GEN7_MIPFILTER_NEAREST 1 45103b705cfSriastradh#define GEN7_MIPFILTER_LINEAR 3 45203b705cfSriastradh 45303b705cfSriastradh#define GEN7_POLYGON_FRONT_FACING 0 45403b705cfSriastradh#define GEN7_POLYGON_BACK_FACING 1 45503b705cfSriastradh 45603b705cfSriastradh#define GEN7_PREFILTER_ALWAYS 0x0 45703b705cfSriastradh#define GEN7_PREFILTER_NEVER 0x1 45803b705cfSriastradh#define GEN7_PREFILTER_LESS 0x2 45903b705cfSriastradh#define GEN7_PREFILTER_EQUAL 0x3 46003b705cfSriastradh#define GEN7_PREFILTER_LEQUAL 0x4 46103b705cfSriastradh#define GEN7_PREFILTER_GREATER 0x5 46203b705cfSriastradh#define GEN7_PREFILTER_NOTEQUAL 0x6 46303b705cfSriastradh#define GEN7_PREFILTER_GEQUAL 0x7 46403b705cfSriastradh 46503b705cfSriastradh#define GEN7_PROVOKING_VERTEX_0 0 46603b705cfSriastradh#define GEN7_PROVOKING_VERTEX_1 1 46703b705cfSriastradh#define GEN7_PROVOKING_VERTEX_2 2 46803b705cfSriastradh 46903b705cfSriastradh#define GEN7_RASTRULE_UPPER_LEFT 0 47003b705cfSriastradh#define GEN7_RASTRULE_UPPER_RIGHT 1 47103b705cfSriastradh 47203b705cfSriastradh#define GEN7_RENDERTARGET_CLAMPRANGE_UNORM 0 47303b705cfSriastradh#define GEN7_RENDERTARGET_CLAMPRANGE_SNORM 1 47403b705cfSriastradh#define GEN7_RENDERTARGET_CLAMPRANGE_FORMAT 2 47503b705cfSriastradh 47603b705cfSriastradh#define GEN7_STENCILOP_KEEP 0 47703b705cfSriastradh#define GEN7_STENCILOP_ZERO 1 47803b705cfSriastradh#define GEN7_STENCILOP_REPLACE 2 47903b705cfSriastradh#define GEN7_STENCILOP_INCRSAT 3 48003b705cfSriastradh#define GEN7_STENCILOP_DECRSAT 4 48103b705cfSriastradh#define GEN7_STENCILOP_INCR 5 48203b705cfSriastradh#define GEN7_STENCILOP_DECR 6 48303b705cfSriastradh#define GEN7_STENCILOP_INVERT 7 48403b705cfSriastradh 48503b705cfSriastradh#define GEN7_SURFACE_MIPMAPLAYOUT_BELOW 0 48603b705cfSriastradh#define GEN7_SURFACE_MIPMAPLAYOUT_RIGHT 1 48703b705cfSriastradh 48803b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000 48903b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_SINT 0x001 49003b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_UINT 0x002 49103b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_UNORM 0x003 49203b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_SNORM 0x004 49303b705cfSriastradh#define GEN7_SURFACEFORMAT_R64G64_FLOAT 0x005 49403b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32X32_FLOAT 0x006 49503b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_SSCALED 0x007 49603b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32A32_USCALED 0x008 49703b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_FLOAT 0x040 49803b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_SINT 0x041 49903b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_UINT 0x042 50003b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_UNORM 0x043 50103b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_SNORM 0x044 50203b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_SSCALED 0x045 50303b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32B32_USCALED 0x046 50403b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_UNORM 0x080 50503b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_SNORM 0x081 50603b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_SINT 0x082 50703b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_UINT 0x083 50803b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_FLOAT 0x084 50903b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_FLOAT 0x085 51003b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_SINT 0x086 51103b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_UINT 0x087 51203b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS 0x088 51303b705cfSriastradh#define GEN7_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT 0x089 51403b705cfSriastradh#define GEN7_SURFACEFORMAT_L32A32_FLOAT 0x08A 51503b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_UNORM 0x08B 51603b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_SNORM 0x08C 51703b705cfSriastradh#define GEN7_SURFACEFORMAT_R64_FLOAT 0x08D 51803b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16X16_UNORM 0x08E 51903b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16X16_FLOAT 0x08F 52003b705cfSriastradh#define GEN7_SURFACEFORMAT_A32X32_FLOAT 0x090 52103b705cfSriastradh#define GEN7_SURFACEFORMAT_L32X32_FLOAT 0x091 52203b705cfSriastradh#define GEN7_SURFACEFORMAT_I32X32_FLOAT 0x092 52303b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_SSCALED 0x093 52403b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16A16_USCALED 0x094 52503b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_SSCALED 0x095 52603b705cfSriastradh#define GEN7_SURFACEFORMAT_R32G32_USCALED 0x096 52703b705cfSriastradh#define GEN7_SURFACEFORMAT_B8G8R8A8_UNORM 0x0C0 52803b705cfSriastradh#define GEN7_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB 0x0C1 52903b705cfSriastradh#define GEN7_SURFACEFORMAT_R10G10B10A2_UNORM 0x0C2 53003b705cfSriastradh#define GEN7_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB 0x0C3 53103b705cfSriastradh#define GEN7_SURFACEFORMAT_R10G10B10A2_UINT 0x0C4 53203b705cfSriastradh#define GEN7_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM 0x0C5 53303b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_UNORM 0x0C7 53403b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB 0x0C8 53503b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_SNORM 0x0C9 53603b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_SINT 0x0CA 53703b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_UINT 0x0CB 53803b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_UNORM 0x0CC 53903b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_SNORM 0x0CD 54003b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_SINT 0x0CE 54103b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_UINT 0x0CF 54203b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_FLOAT 0x0D0 54303b705cfSriastradh#define GEN7_SURFACEFORMAT_B10G10R10A2_UNORM 0x0D1 54403b705cfSriastradh#define GEN7_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB 0x0D2 54503b705cfSriastradh#define GEN7_SURFACEFORMAT_R11G11B10_FLOAT 0x0D3 54603b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_SINT 0x0D6 54703b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_UINT 0x0D7 54803b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_FLOAT 0x0D8 54903b705cfSriastradh#define GEN7_SURFACEFORMAT_R24_UNORM_X8_TYPELESS 0x0D9 55003b705cfSriastradh#define GEN7_SURFACEFORMAT_X24_TYPELESS_G8_UINT 0x0DA 55103b705cfSriastradh#define GEN7_SURFACEFORMAT_L16A16_UNORM 0x0DF 55203b705cfSriastradh#define GEN7_SURFACEFORMAT_I24X8_UNORM 0x0E0 55303b705cfSriastradh#define GEN7_SURFACEFORMAT_L24X8_UNORM 0x0E1 55403b705cfSriastradh#define GEN7_SURFACEFORMAT_A24X8_UNORM 0x0E2 55503b705cfSriastradh#define GEN7_SURFACEFORMAT_I32_FLOAT 0x0E3 55603b705cfSriastradh#define GEN7_SURFACEFORMAT_L32_FLOAT 0x0E4 55703b705cfSriastradh#define GEN7_SURFACEFORMAT_A32_FLOAT 0x0E5 55803b705cfSriastradh#define GEN7_SURFACEFORMAT_B8G8R8X8_UNORM 0x0E9 55903b705cfSriastradh#define GEN7_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB 0x0EA 56003b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8X8_UNORM 0x0EB 56103b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB 0x0EC 56203b705cfSriastradh#define GEN7_SURFACEFORMAT_R9G9B9E5_SHAREDEXP 0x0ED 56303b705cfSriastradh#define GEN7_SURFACEFORMAT_B10G10R10X2_UNORM 0x0EE 56403b705cfSriastradh#define GEN7_SURFACEFORMAT_L16A16_FLOAT 0x0F0 56503b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_UNORM 0x0F1 56603b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_SNORM 0x0F2 56703b705cfSriastradh#define GEN7_SURFACEFORMAT_R10G10B10X2_USCALED 0x0F3 56803b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_SSCALED 0x0F4 56903b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8A8_USCALED 0x0F5 57003b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_SSCALED 0x0F6 57103b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16_USCALED 0x0F7 57203b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_SSCALED 0x0F8 57303b705cfSriastradh#define GEN7_SURFACEFORMAT_R32_USCALED 0x0F9 57403b705cfSriastradh#define GEN7_SURFACEFORMAT_B5G6R5_UNORM 0x100 57503b705cfSriastradh#define GEN7_SURFACEFORMAT_B5G6R5_UNORM_SRGB 0x101 57603b705cfSriastradh#define GEN7_SURFACEFORMAT_B5G5R5A1_UNORM 0x102 57703b705cfSriastradh#define GEN7_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB 0x103 57803b705cfSriastradh#define GEN7_SURFACEFORMAT_B4G4R4A4_UNORM 0x104 57903b705cfSriastradh#define GEN7_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB 0x105 58003b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8_UNORM 0x106 58103b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8_SNORM 0x107 58203b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8_SINT 0x108 58303b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8_UINT 0x109 58403b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_UNORM 0x10A 58503b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_SNORM 0x10B 58603b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_SINT 0x10C 58703b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_UINT 0x10D 58803b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_FLOAT 0x10E 58903b705cfSriastradh#define GEN7_SURFACEFORMAT_I16_UNORM 0x111 59003b705cfSriastradh#define GEN7_SURFACEFORMAT_L16_UNORM 0x112 59103b705cfSriastradh#define GEN7_SURFACEFORMAT_A16_UNORM 0x113 59203b705cfSriastradh#define GEN7_SURFACEFORMAT_L8A8_UNORM 0x114 59303b705cfSriastradh#define GEN7_SURFACEFORMAT_I16_FLOAT 0x115 59403b705cfSriastradh#define GEN7_SURFACEFORMAT_L16_FLOAT 0x116 59503b705cfSriastradh#define GEN7_SURFACEFORMAT_A16_FLOAT 0x117 59603b705cfSriastradh#define GEN7_SURFACEFORMAT_R5G5_SNORM_B6_UNORM 0x119 59703b705cfSriastradh#define GEN7_SURFACEFORMAT_B5G5R5X1_UNORM 0x11A 59803b705cfSriastradh#define GEN7_SURFACEFORMAT_B5G5R5X1_UNORM_SRGB 0x11B 59903b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8_SSCALED 0x11C 60003b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8_USCALED 0x11D 60103b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_SSCALED 0x11E 60203b705cfSriastradh#define GEN7_SURFACEFORMAT_R16_USCALED 0x11F 60303b705cfSriastradh#define GEN7_SURFACEFORMAT_R8_UNORM 0x140 60403b705cfSriastradh#define GEN7_SURFACEFORMAT_R8_SNORM 0x141 60503b705cfSriastradh#define GEN7_SURFACEFORMAT_R8_SINT 0x142 60603b705cfSriastradh#define GEN7_SURFACEFORMAT_R8_UINT 0x143 60703b705cfSriastradh#define GEN7_SURFACEFORMAT_A8_UNORM 0x144 60803b705cfSriastradh#define GEN7_SURFACEFORMAT_I8_UNORM 0x145 60903b705cfSriastradh#define GEN7_SURFACEFORMAT_L8_UNORM 0x146 61003b705cfSriastradh#define GEN7_SURFACEFORMAT_P4A4_UNORM 0x147 61103b705cfSriastradh#define GEN7_SURFACEFORMAT_A4P4_UNORM 0x148 61203b705cfSriastradh#define GEN7_SURFACEFORMAT_R8_SSCALED 0x149 61303b705cfSriastradh#define GEN7_SURFACEFORMAT_R8_USCALED 0x14A 61403b705cfSriastradh#define GEN7_SURFACEFORMAT_R1_UINT 0x181 61503b705cfSriastradh#define GEN7_SURFACEFORMAT_YCRCB_NORMAL 0x182 61603b705cfSriastradh#define GEN7_SURFACEFORMAT_YCRCB_SWAPUVY 0x183 61703b705cfSriastradh#define GEN7_SURFACEFORMAT_BC1_UNORM 0x186 61803b705cfSriastradh#define GEN7_SURFACEFORMAT_BC2_UNORM 0x187 61903b705cfSriastradh#define GEN7_SURFACEFORMAT_BC3_UNORM 0x188 62003b705cfSriastradh#define GEN7_SURFACEFORMAT_BC4_UNORM 0x189 62103b705cfSriastradh#define GEN7_SURFACEFORMAT_BC5_UNORM 0x18A 62203b705cfSriastradh#define GEN7_SURFACEFORMAT_BC1_UNORM_SRGB 0x18B 62303b705cfSriastradh#define GEN7_SURFACEFORMAT_BC2_UNORM_SRGB 0x18C 62403b705cfSriastradh#define GEN7_SURFACEFORMAT_BC3_UNORM_SRGB 0x18D 62503b705cfSriastradh#define GEN7_SURFACEFORMAT_MONO8 0x18E 62603b705cfSriastradh#define GEN7_SURFACEFORMAT_YCRCB_SWAPUV 0x18F 62703b705cfSriastradh#define GEN7_SURFACEFORMAT_YCRCB_SWAPY 0x190 62803b705cfSriastradh#define GEN7_SURFACEFORMAT_DXT1_RGB 0x191 62903b705cfSriastradh#define GEN7_SURFACEFORMAT_FXT1 0x192 63003b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8_UNORM 0x193 63103b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8_SNORM 0x194 63203b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8_SSCALED 0x195 63303b705cfSriastradh#define GEN7_SURFACEFORMAT_R8G8B8_USCALED 0x196 63403b705cfSriastradh#define GEN7_SURFACEFORMAT_R64G64B64A64_FLOAT 0x197 63503b705cfSriastradh#define GEN7_SURFACEFORMAT_R64G64B64_FLOAT 0x198 63603b705cfSriastradh#define GEN7_SURFACEFORMAT_BC4_SNORM 0x199 63703b705cfSriastradh#define GEN7_SURFACEFORMAT_BC5_SNORM 0x19A 63803b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16_UNORM 0x19C 63903b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16_SNORM 0x19D 64003b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16_SSCALED 0x19E 64103b705cfSriastradh#define GEN7_SURFACEFORMAT_R16G16B16_USCALED 0x19F 64203b705cfSriastradh 64303b705cfSriastradh#define GEN7_SURFACERETURNFORMAT_FLOAT32 0 64403b705cfSriastradh#define GEN7_SURFACERETURNFORMAT_S1 1 64503b705cfSriastradh 64603b705cfSriastradh#define GEN7_SURFACE_1D 0 64703b705cfSriastradh#define GEN7_SURFACE_2D 1 64803b705cfSriastradh#define GEN7_SURFACE_3D 2 64903b705cfSriastradh#define GEN7_SURFACE_CUBE 3 65003b705cfSriastradh#define GEN7_SURFACE_BUFFER 4 65103b705cfSriastradh#define GEN7_SURFACE_NULL 7 65203b705cfSriastradh 65303b705cfSriastradh#define GEN7_BORDER_COLOR_MODE_DEFAULT 0 65403b705cfSriastradh#define GEN7_BORDER_COLOR_MODE_LEGACY 1 65503b705cfSriastradh 65603b705cfSriastradh#define GEN7_TEXCOORDMODE_WRAP 0 65703b705cfSriastradh#define GEN7_TEXCOORDMODE_MIRROR 1 65803b705cfSriastradh#define GEN7_TEXCOORDMODE_CLAMP 2 65903b705cfSriastradh#define GEN7_TEXCOORDMODE_CUBE 3 66003b705cfSriastradh#define GEN7_TEXCOORDMODE_CLAMP_BORDER 4 66103b705cfSriastradh#define GEN7_TEXCOORDMODE_MIRROR_ONCE 5 66203b705cfSriastradh 66303b705cfSriastradh#define GEN7_THREAD_PRIORITY_NORMAL 0 66403b705cfSriastradh#define GEN7_THREAD_PRIORITY_HIGH 1 66503b705cfSriastradh 66603b705cfSriastradh#define GEN7_TILEWALK_XMAJOR 0 66703b705cfSriastradh#define GEN7_TILEWALK_YMAJOR 1 66803b705cfSriastradh 66903b705cfSriastradh#define GEN7_VERTEX_SUBPIXEL_PRECISION_8BITS 0 67003b705cfSriastradh#define GEN7_VERTEX_SUBPIXEL_PRECISION_4BITS 1 67103b705cfSriastradh 67203b705cfSriastradh#define GEN7_VERTEXBUFFER_ACCESS_VERTEXDATA 0 67303b705cfSriastradh#define GEN7_VERTEXBUFFER_ACCESS_INSTANCEDATA 1 67403b705cfSriastradh 67503b705cfSriastradh#define GEN7_VFCOMPONENT_NOSTORE 0 67603b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_SRC 1 67703b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_0 2 67803b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_1_FLT 3 67903b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_1_INT 4 68003b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_VID 5 68103b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_IID 6 68203b705cfSriastradh#define GEN7_VFCOMPONENT_STORE_PID 7 68303b705cfSriastradh 68403b705cfSriastradh 68503b705cfSriastradh/* Execution Unit (EU) defines 68603b705cfSriastradh */ 68703b705cfSriastradh 68803b705cfSriastradh#define GEN7_ALIGN_1 0 68903b705cfSriastradh#define GEN7_ALIGN_16 1 69003b705cfSriastradh 69103b705cfSriastradh#define GEN7_ADDRESS_DIRECT 0 69203b705cfSriastradh#define GEN7_ADDRESS_REGISTER_INDIRECT_REGISTER 1 69303b705cfSriastradh 69403b705cfSriastradh#define GEN7_CHANNEL_X 0 69503b705cfSriastradh#define GEN7_CHANNEL_Y 1 69603b705cfSriastradh#define GEN7_CHANNEL_Z 2 69703b705cfSriastradh#define GEN7_CHANNEL_W 3 69803b705cfSriastradh 69903b705cfSriastradh#define GEN7_COMPRESSION_NONE 0 70003b705cfSriastradh#define GEN7_COMPRESSION_2NDHALF 1 70103b705cfSriastradh#define GEN7_COMPRESSION_COMPRESSED 2 70203b705cfSriastradh 70303b705cfSriastradh#define GEN7_CONDITIONAL_NONE 0 70403b705cfSriastradh#define GEN7_CONDITIONAL_Z 1 70503b705cfSriastradh#define GEN7_CONDITIONAL_NZ 2 70603b705cfSriastradh#define GEN7_CONDITIONAL_EQ 1 /* Z */ 70703b705cfSriastradh#define GEN7_CONDITIONAL_NEQ 2 /* NZ */ 70803b705cfSriastradh#define GEN7_CONDITIONAL_G 3 70903b705cfSriastradh#define GEN7_CONDITIONAL_GE 4 71003b705cfSriastradh#define GEN7_CONDITIONAL_L 5 71103b705cfSriastradh#define GEN7_CONDITIONAL_LE 6 71203b705cfSriastradh#define GEN7_CONDITIONAL_C 7 71303b705cfSriastradh#define GEN7_CONDITIONAL_O 8 71403b705cfSriastradh 71503b705cfSriastradh#define GEN7_DEBUG_NONE 0 71603b705cfSriastradh#define GEN7_DEBUG_BREAKPOINT 1 71703b705cfSriastradh 71803b705cfSriastradh#define GEN7_DEPENDENCY_NORMAL 0 71903b705cfSriastradh#define GEN7_DEPENDENCY_NOTCLEARED 1 72003b705cfSriastradh#define GEN7_DEPENDENCY_NOTCHECKED 2 72103b705cfSriastradh#define GEN7_DEPENDENCY_DISABLE 3 72203b705cfSriastradh 72303b705cfSriastradh#define GEN7_EXECUTE_1 0 72403b705cfSriastradh#define GEN7_EXECUTE_2 1 72503b705cfSriastradh#define GEN7_EXECUTE_4 2 72603b705cfSriastradh#define GEN7_EXECUTE_8 3 72703b705cfSriastradh#define GEN7_EXECUTE_16 4 72803b705cfSriastradh#define GEN7_EXECUTE_32 5 72903b705cfSriastradh 73003b705cfSriastradh#define GEN7_HORIZONTAL_STRIDE_0 0 73103b705cfSriastradh#define GEN7_HORIZONTAL_STRIDE_1 1 73203b705cfSriastradh#define GEN7_HORIZONTAL_STRIDE_2 2 73303b705cfSriastradh#define GEN7_HORIZONTAL_STRIDE_4 3 73403b705cfSriastradh 73503b705cfSriastradh#define GEN7_INSTRUCTION_NORMAL 0 73603b705cfSriastradh#define GEN7_INSTRUCTION_SATURATE 1 73703b705cfSriastradh 73803b705cfSriastradh#define INTEL_MASK_ENABLE 0 73903b705cfSriastradh#define INTEL_MASK_DISABLE 1 74003b705cfSriastradh 74103b705cfSriastradh#define GEN7_OPCODE_MOV 1 74203b705cfSriastradh#define GEN7_OPCODE_SEL 2 74303b705cfSriastradh#define GEN7_OPCODE_NOT 4 74403b705cfSriastradh#define GEN7_OPCODE_AND 5 74503b705cfSriastradh#define GEN7_OPCODE_OR 6 74603b705cfSriastradh#define GEN7_OPCODE_XOR 7 74703b705cfSriastradh#define GEN7_OPCODE_SHR 8 74803b705cfSriastradh#define GEN7_OPCODE_SHL 9 74903b705cfSriastradh#define GEN7_OPCODE_RSR 10 75003b705cfSriastradh#define GEN7_OPCODE_RSL 11 75103b705cfSriastradh#define GEN7_OPCODE_ASR 12 75203b705cfSriastradh#define GEN7_OPCODE_CMP 16 75303b705cfSriastradh#define GEN7_OPCODE_JMPI 32 75403b705cfSriastradh#define GEN7_OPCODE_IF 34 75503b705cfSriastradh#define GEN7_OPCODE_IFF 35 75603b705cfSriastradh#define GEN7_OPCODE_ELSE 36 75703b705cfSriastradh#define GEN7_OPCODE_ENDIF 37 75803b705cfSriastradh#define GEN7_OPCODE_DO 38 75903b705cfSriastradh#define GEN7_OPCODE_WHILE 39 76003b705cfSriastradh#define GEN7_OPCODE_BREAK 40 76103b705cfSriastradh#define GEN7_OPCODE_CONTINUE 41 76203b705cfSriastradh#define GEN7_OPCODE_HALT 42 76303b705cfSriastradh#define GEN7_OPCODE_MSAVE 44 76403b705cfSriastradh#define GEN7_OPCODE_MRESTORE 45 76503b705cfSriastradh#define GEN7_OPCODE_PUSH 46 76603b705cfSriastradh#define GEN7_OPCODE_POP 47 76703b705cfSriastradh#define GEN7_OPCODE_WAIT 48 76803b705cfSriastradh#define GEN7_OPCODE_SEND 49 76903b705cfSriastradh#define GEN7_OPCODE_ADD 64 77003b705cfSriastradh#define GEN7_OPCODE_MUL 65 77103b705cfSriastradh#define GEN7_OPCODE_AVG 66 77203b705cfSriastradh#define GEN7_OPCODE_FRC 67 77303b705cfSriastradh#define GEN7_OPCODE_RNDU 68 77403b705cfSriastradh#define GEN7_OPCODE_RNDD 69 77503b705cfSriastradh#define GEN7_OPCODE_RNDE 70 77603b705cfSriastradh#define GEN7_OPCODE_RNDZ 71 77703b705cfSriastradh#define GEN7_OPCODE_MAC 72 77803b705cfSriastradh#define GEN7_OPCODE_MACH 73 77903b705cfSriastradh#define GEN7_OPCODE_LZD 74 78003b705cfSriastradh#define GEN7_OPCODE_SAD2 80 78103b705cfSriastradh#define GEN7_OPCODE_SADA2 81 78203b705cfSriastradh#define GEN7_OPCODE_DP4 84 78303b705cfSriastradh#define GEN7_OPCODE_DPH 85 78403b705cfSriastradh#define GEN7_OPCODE_DP3 86 78503b705cfSriastradh#define GEN7_OPCODE_DP2 87 78603b705cfSriastradh#define GEN7_OPCODE_DPA2 88 78703b705cfSriastradh#define GEN7_OPCODE_LINE 89 78803b705cfSriastradh#define GEN7_OPCODE_NOP 126 78903b705cfSriastradh 79003b705cfSriastradh#define GEN7_PREDICATE_NONE 0 79103b705cfSriastradh#define GEN7_PREDICATE_NORMAL 1 79203b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ANYV 2 79303b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ALLV 3 79403b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ANY2H 4 79503b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ALL2H 5 79603b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ANY4H 6 79703b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ALL4H 7 79803b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ANY8H 8 79903b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ALL8H 9 80003b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ANY16H 10 80103b705cfSriastradh#define GEN7_PREDICATE_ALIGN1_ALL16H 11 80203b705cfSriastradh#define GEN7_PREDICATE_ALIGN16_REPLICATE_X 2 80303b705cfSriastradh#define GEN7_PREDICATE_ALIGN16_REPLICATE_Y 3 80403b705cfSriastradh#define GEN7_PREDICATE_ALIGN16_REPLICATE_Z 4 80503b705cfSriastradh#define GEN7_PREDICATE_ALIGN16_REPLICATE_W 5 80603b705cfSriastradh#define GEN7_PREDICATE_ALIGN16_ANY4H 6 80703b705cfSriastradh#define GEN7_PREDICATE_ALIGN16_ALL4H 7 80803b705cfSriastradh 80903b705cfSriastradh#define GEN7_ARCHITECTURE_REGISTER_FILE 0 81003b705cfSriastradh#define GEN7_GENERAL_REGISTER_FILE 1 81103b705cfSriastradh#define GEN7_MESSAGE_REGISTER_FILE 2 81203b705cfSriastradh#define GEN7_IMMEDIATE_VALUE 3 81303b705cfSriastradh 81403b705cfSriastradh#define GEN7_REGISTER_TYPE_UD 0 81503b705cfSriastradh#define GEN7_REGISTER_TYPE_D 1 81603b705cfSriastradh#define GEN7_REGISTER_TYPE_UW 2 81703b705cfSriastradh#define GEN7_REGISTER_TYPE_W 3 81803b705cfSriastradh#define GEN7_REGISTER_TYPE_UB 4 81903b705cfSriastradh#define GEN7_REGISTER_TYPE_B 5 82003b705cfSriastradh#define GEN7_REGISTER_TYPE_VF 5 /* packed float vector, immediates only? */ 82103b705cfSriastradh#define GEN7_REGISTER_TYPE_HF 6 82203b705cfSriastradh#define GEN7_REGISTER_TYPE_V 6 /* packed int vector, immediates only, uword dest only */ 82303b705cfSriastradh#define GEN7_REGISTER_TYPE_F 7 82403b705cfSriastradh 82503b705cfSriastradh#define GEN7_ARF_NULL 0x00 82603b705cfSriastradh#define GEN7_ARF_ADDRESS 0x10 82703b705cfSriastradh#define GEN7_ARF_ACCUMULATOR 0x20 82803b705cfSriastradh#define GEN7_ARF_FLAG 0x30 82903b705cfSriastradh#define GEN7_ARF_MASK 0x40 83003b705cfSriastradh#define GEN7_ARF_MASK_STACK 0x50 83103b705cfSriastradh#define GEN7_ARF_MASK_STACK_DEPTH 0x60 83203b705cfSriastradh#define GEN7_ARF_STATE 0x70 83303b705cfSriastradh#define GEN7_ARF_CONTROL 0x80 83403b705cfSriastradh#define GEN7_ARF_NOTIFICATION_COUNT 0x90 83503b705cfSriastradh#define GEN7_ARF_IP 0xA0 83603b705cfSriastradh 83703b705cfSriastradh#define GEN7_AMASK 0 83803b705cfSriastradh#define GEN7_IMASK 1 83903b705cfSriastradh#define GEN7_LMASK 2 84003b705cfSriastradh#define GEN7_CMASK 3 84103b705cfSriastradh 84203b705cfSriastradh#define GEN7_THREAD_NORMAL 0 84303b705cfSriastradh#define GEN7_THREAD_ATOMIC 1 84403b705cfSriastradh#define GEN7_THREAD_SWITCH 2 84503b705cfSriastradh 84603b705cfSriastradh#define GEN7_VERTICAL_STRIDE_0 0 84703b705cfSriastradh#define GEN7_VERTICAL_STRIDE_1 1 84803b705cfSriastradh#define GEN7_VERTICAL_STRIDE_2 2 84903b705cfSriastradh#define GEN7_VERTICAL_STRIDE_4 3 85003b705cfSriastradh#define GEN7_VERTICAL_STRIDE_8 4 85103b705cfSriastradh#define GEN7_VERTICAL_STRIDE_16 5 85203b705cfSriastradh#define GEN7_VERTICAL_STRIDE_32 6 85303b705cfSriastradh#define GEN7_VERTICAL_STRIDE_64 7 85403b705cfSriastradh#define GEN7_VERTICAL_STRIDE_128 8 85503b705cfSriastradh#define GEN7_VERTICAL_STRIDE_256 9 85603b705cfSriastradh#define GEN7_VERTICAL_STRIDE_ONE_DIMENSIONAL 0xF 85703b705cfSriastradh 85803b705cfSriastradh#define GEN7_WIDTH_1 0 85903b705cfSriastradh#define GEN7_WIDTH_2 1 86003b705cfSriastradh#define GEN7_WIDTH_4 2 86103b705cfSriastradh#define GEN7_WIDTH_8 3 86203b705cfSriastradh#define GEN7_WIDTH_16 4 86303b705cfSriastradh 86403b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_1K 0 86503b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_2K 1 86603b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_4K 2 86703b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_8K 3 86803b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_16K 4 86903b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_32K 5 87003b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_64K 6 87103b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_128K 7 87203b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_256K 8 87303b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_512K 9 87403b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_1M 10 87503b705cfSriastradh#define GEN7_STATELESS_BUFFER_BOUNDARY_2M 11 87603b705cfSriastradh 87703b705cfSriastradh#define GEN7_POLYGON_FACING_FRONT 0 87803b705cfSriastradh#define GEN7_POLYGON_FACING_BACK 1 87903b705cfSriastradh 88003b705cfSriastradh#define GEN7_MESSAGE_TARGET_NULL 0 88103b705cfSriastradh#define GEN7_MESSAGE_TARGET_MATH 1 88203b705cfSriastradh#define GEN7_MESSAGE_TARGET_SAMPLER 2 88303b705cfSriastradh#define GEN7_MESSAGE_TARGET_GATEWAY 3 88403b705cfSriastradh#define GEN7_MESSAGE_TARGET_DATAPORT_READ 4 88503b705cfSriastradh#define GEN7_MESSAGE_TARGET_DATAPORT_WRITE 5 88603b705cfSriastradh#define GEN7_MESSAGE_TARGET_URB 6 88703b705cfSriastradh#define GEN7_MESSAGE_TARGET_THREAD_SPAWNER 7 88803b705cfSriastradh 88903b705cfSriastradh#define GEN7_SAMPLER_RETURN_FORMAT_FLOAT32 0 89003b705cfSriastradh#define GEN7_SAMPLER_RETURN_FORMAT_UINT32 2 89103b705cfSriastradh#define GEN7_SAMPLER_RETURN_FORMAT_SINT32 3 89203b705cfSriastradh 89303b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD8_SAMPLE 0 89403b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD16_SAMPLE 0 89503b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS 0 89603b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD8_KILLPIX 1 89703b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_LOD 1 89803b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD 1 89903b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_GRADIENTS 2 90003b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD8_SAMPLE_GRADIENTS 2 90103b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE 0 90203b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE 2 90303b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD4X2_RESINFO 2 90403b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD8_RESINFO 2 90503b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD16_RESINFO 2 90603b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD4X2_LD 3 90703b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD8_LD 3 90803b705cfSriastradh#define GEN7_SAMPLER_MESSAGE_SIMD16_LD 3 90903b705cfSriastradh 91003b705cfSriastradh#define GEN7_DATAPORT_OWORD_BLOCK_1_OWORDLOW 0 91103b705cfSriastradh#define GEN7_DATAPORT_OWORD_BLOCK_1_OWORDHIGH 1 91203b705cfSriastradh#define GEN7_DATAPORT_OWORD_BLOCK_2_OWORDS 2 91303b705cfSriastradh#define GEN7_DATAPORT_OWORD_BLOCK_4_OWORDS 3 91403b705cfSriastradh#define GEN7_DATAPORT_OWORD_BLOCK_8_OWORDS 4 91503b705cfSriastradh 91603b705cfSriastradh#define GEN7_DATAPORT_OWORD_DUAL_BLOCK_1OWORD 0 91703b705cfSriastradh#define GEN7_DATAPORT_OWORD_DUAL_BLOCK_4OWORDS 2 91803b705cfSriastradh 91903b705cfSriastradh#define GEN7_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS 2 92003b705cfSriastradh#define GEN7_DATAPORT_DWORD_SCATTERED_BLOCK_16DWORDS 3 92103b705cfSriastradh 92203b705cfSriastradh#define GEN7_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ 0 92303b705cfSriastradh#define GEN7_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ 1 92403b705cfSriastradh#define GEN7_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ 2 92503b705cfSriastradh#define GEN7_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ 3 92603b705cfSriastradh 92703b705cfSriastradh#define GEN7_DATAPORT_READ_TARGET_DATA_CACHE 0 92803b705cfSriastradh#define GEN7_DATAPORT_READ_TARGET_RENDER_CACHE 1 92903b705cfSriastradh#define GEN7_DATAPORT_READ_TARGET_SAMPLER_CACHE 2 93003b705cfSriastradh 93103b705cfSriastradh#define GEN7_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE 0 93203b705cfSriastradh#define GEN7_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE_REPLICATED 1 93303b705cfSriastradh#define GEN7_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN01 2 93403b705cfSriastradh#define GEN7_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN23 3 93503b705cfSriastradh#define GEN7_DATAPORT_RENDER_TARGET_WRITE_SIMD8_SINGLE_SOURCE_SUBSPAN01 4 93603b705cfSriastradh 93703b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE 0 93803b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE 1 93903b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_DWORD_BLOCK_WRITE 2 94003b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_DWORD_SCATTERED_WRITE 3 94103b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE 4 94203b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_STREAMED_VERTEX_BUFFER_WRITE 5 94303b705cfSriastradh#define GEN7_DATAPORT_WRITE_MESSAGE_FLUSH_RENDER_CACHE 7 94403b705cfSriastradh 94503b705cfSriastradh#define GEN7_MATH_FUNCTION_INV 1 94603b705cfSriastradh#define GEN7_MATH_FUNCTION_LOG 2 94703b705cfSriastradh#define GEN7_MATH_FUNCTION_EXP 3 94803b705cfSriastradh#define GEN7_MATH_FUNCTION_SQRT 4 94903b705cfSriastradh#define GEN7_MATH_FUNCTION_RSQ 5 95003b705cfSriastradh#define GEN7_MATH_FUNCTION_SIN 6 /* was 7 */ 95103b705cfSriastradh#define GEN7_MATH_FUNCTION_COS 7 /* was 8 */ 95203b705cfSriastradh#define GEN7_MATH_FUNCTION_SINCOS 8 /* was 6 */ 95303b705cfSriastradh#define GEN7_MATH_FUNCTION_TAN 9 95403b705cfSriastradh#define GEN7_MATH_FUNCTION_POW 10 95503b705cfSriastradh#define GEN7_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER 11 95603b705cfSriastradh#define GEN7_MATH_FUNCTION_INT_DIV_QUOTIENT 12 95703b705cfSriastradh#define GEN7_MATH_FUNCTION_INT_DIV_REMAINDER 13 95803b705cfSriastradh 95903b705cfSriastradh#define GEN7_MATH_INTEGER_UNSIGNED 0 96003b705cfSriastradh#define GEN7_MATH_INTEGER_SIGNED 1 96103b705cfSriastradh 96203b705cfSriastradh#define GEN7_MATH_PRECISION_FULL 0 96303b705cfSriastradh#define GEN7_MATH_PRECISION_PARTIAL 1 96403b705cfSriastradh 96503b705cfSriastradh#define GEN7_MATH_SATURATE_NONE 0 96603b705cfSriastradh#define GEN7_MATH_SATURATE_SATURATE 1 96703b705cfSriastradh 96803b705cfSriastradh#define GEN7_MATH_DATA_VECTOR 0 96903b705cfSriastradh#define GEN7_MATH_DATA_SCALAR 1 97003b705cfSriastradh 97103b705cfSriastradh#define GEN7_URB_OPCODE_WRITE 0 97203b705cfSriastradh 97303b705cfSriastradh#define GEN7_URB_SWIZZLE_NONE 0 97403b705cfSriastradh#define GEN7_URB_SWIZZLE_INTERLEAVE 1 97503b705cfSriastradh#define GEN7_URB_SWIZZLE_TRANSPOSE 2 97603b705cfSriastradh 97703b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_1K 0 97803b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_2K 1 97903b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_4K 2 98003b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_8K 3 98103b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_16K 4 98203b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_32K 5 98303b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_64K 6 98403b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_128K 7 98503b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_256K 8 98603b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_512K 9 98703b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_1M 10 98803b705cfSriastradh#define GEN7_SCRATCH_SPACE_SIZE_2M 11 98903b705cfSriastradh 99003b705cfSriastradh/* The hardware supports two different modes for border color. The 99103b705cfSriastradh * default (OpenGL) mode uses floating-point color channels, while the 99203b705cfSriastradh * legacy mode uses 4 bytes. 99303b705cfSriastradh * 99403b705cfSriastradh * More significantly, the legacy mode respects the components of the 99503b705cfSriastradh * border color for channels not present in the source, (whereas the 99603b705cfSriastradh * default mode will ignore the border color's alpha channel and use 99703b705cfSriastradh * alpha==1 for an RGB source, for example). 99803b705cfSriastradh * 99903b705cfSriastradh * The legacy mode matches the semantics specified by the Render 100003b705cfSriastradh * extension. 100103b705cfSriastradh */ 100203b705cfSriastradhstruct gen7_sampler_default_border_color { 100303b705cfSriastradh float color[4]; 100403b705cfSriastradh}; 100503b705cfSriastradh 100603b705cfSriastradhstruct gen7_sampler_legacy_border_color { 100703b705cfSriastradh uint8_t color[4]; 100803b705cfSriastradh}; 100903b705cfSriastradh 101003b705cfSriastradhstruct gen7_blend_state { 101103b705cfSriastradh struct { 101203b705cfSriastradh uint32_t dest_blend_factor:5; 101303b705cfSriastradh uint32_t source_blend_factor:5; 101403b705cfSriastradh uint32_t pad3:1; 101503b705cfSriastradh uint32_t blend_func:3; 101603b705cfSriastradh uint32_t pad2:1; 101703b705cfSriastradh uint32_t ia_dest_blend_factor:5; 101803b705cfSriastradh uint32_t ia_source_blend_factor:5; 101903b705cfSriastradh uint32_t pad1:1; 102003b705cfSriastradh uint32_t ia_blend_func:3; 102103b705cfSriastradh uint32_t pad0:1; 102203b705cfSriastradh uint32_t ia_blend_enable:1; 102303b705cfSriastradh uint32_t blend_enable:1; 102403b705cfSriastradh } blend0; 102503b705cfSriastradh 102603b705cfSriastradh struct { 102703b705cfSriastradh uint32_t post_blend_clamp_enable:1; 102803b705cfSriastradh uint32_t pre_blend_clamp_enable:1; 102903b705cfSriastradh uint32_t clamp_range:2; 103003b705cfSriastradh uint32_t pad0:4; 103103b705cfSriastradh uint32_t x_dither_offset:2; 103203b705cfSriastradh uint32_t y_dither_offset:2; 103303b705cfSriastradh uint32_t dither_enable:1; 103403b705cfSriastradh uint32_t alpha_test_func:3; 103503b705cfSriastradh uint32_t alpha_test_enable:1; 103603b705cfSriastradh uint32_t pad1:1; 103703b705cfSriastradh uint32_t logic_op_func:4; 103803b705cfSriastradh uint32_t logic_op_enable:1; 103903b705cfSriastradh uint32_t pad2:1; 104003b705cfSriastradh uint32_t write_disable_b:1; 104103b705cfSriastradh uint32_t write_disable_g:1; 104203b705cfSriastradh uint32_t write_disable_r:1; 104303b705cfSriastradh uint32_t write_disable_a:1; 104403b705cfSriastradh uint32_t pad3:1; 104503b705cfSriastradh uint32_t alpha_to_coverage_dither:1; 104603b705cfSriastradh uint32_t alpha_to_one:1; 104703b705cfSriastradh uint32_t alpha_to_coverage:1; 104803b705cfSriastradh } blend1; 104903b705cfSriastradh}; 105003b705cfSriastradh 105103b705cfSriastradhstruct gen7_color_calc_state { 105203b705cfSriastradh struct { 105303b705cfSriastradh uint32_t alpha_test_format:1; 105403b705cfSriastradh uint32_t pad0:14; 105503b705cfSriastradh uint32_t round_disable:1; 105603b705cfSriastradh uint32_t bf_stencil_ref:8; 105703b705cfSriastradh uint32_t stencil_ref:8; 105803b705cfSriastradh } cc0; 105903b705cfSriastradh 106003b705cfSriastradh union { 106103b705cfSriastradh float alpha_ref_f; 106203b705cfSriastradh struct { 106303b705cfSriastradh uint32_t ui:8; 106403b705cfSriastradh uint32_t pad0:24; 106503b705cfSriastradh } alpha_ref_fi; 106603b705cfSriastradh } cc1; 106703b705cfSriastradh 106803b705cfSriastradh float constant_r; 106903b705cfSriastradh float constant_g; 107003b705cfSriastradh float constant_b; 107103b705cfSriastradh float constant_a; 107203b705cfSriastradh}; 107303b705cfSriastradh 107403b705cfSriastradhstruct gen7_depth_stencil_state { 107503b705cfSriastradh struct { 107603b705cfSriastradh uint32_t pad0:3; 107703b705cfSriastradh uint32_t bf_stencil_pass_depth_pass_op:3; 107803b705cfSriastradh uint32_t bf_stencil_pass_depth_fail_op:3; 107903b705cfSriastradh uint32_t bf_stencil_fail_op:3; 108003b705cfSriastradh uint32_t bf_stencil_func:3; 108103b705cfSriastradh uint32_t bf_stencil_enable:1; 108203b705cfSriastradh uint32_t pad1:2; 108303b705cfSriastradh uint32_t stencil_write_enable:1; 108403b705cfSriastradh uint32_t stencil_pass_depth_pass_op:3; 108503b705cfSriastradh uint32_t stencil_pass_depth_fail_op:3; 108603b705cfSriastradh uint32_t stencil_fail_op:3; 108703b705cfSriastradh uint32_t stencil_func:3; 108803b705cfSriastradh uint32_t stencil_enable:1; 108903b705cfSriastradh } ds0; 109003b705cfSriastradh 109103b705cfSriastradh struct { 109203b705cfSriastradh uint32_t bf_stencil_write_mask:8; 109303b705cfSriastradh uint32_t bf_stencil_test_mask:8; 109403b705cfSriastradh uint32_t stencil_write_mask:8; 109503b705cfSriastradh uint32_t stencil_test_mask:8; 109603b705cfSriastradh } ds1; 109703b705cfSriastradh 109803b705cfSriastradh struct { 109903b705cfSriastradh uint32_t pad0:26; 110003b705cfSriastradh uint32_t depth_write_enable:1; 110103b705cfSriastradh uint32_t depth_test_func:3; 110203b705cfSriastradh uint32_t pad1:1; 110303b705cfSriastradh uint32_t depth_test_enable:1; 110403b705cfSriastradh } ds2; 110503b705cfSriastradh}; 110603b705cfSriastradh 110703b705cfSriastradhstruct gen7_surface_state { 110803b705cfSriastradh struct { 110903b705cfSriastradh unsigned int cube_pos_z:1; 111003b705cfSriastradh unsigned int cube_neg_z:1; 111103b705cfSriastradh unsigned int cube_pos_y:1; 111203b705cfSriastradh unsigned int cube_neg_y:1; 111303b705cfSriastradh unsigned int cube_pos_x:1; 111403b705cfSriastradh unsigned int cube_neg_x:1; 111503b705cfSriastradh unsigned int pad2:2; 111603b705cfSriastradh unsigned int render_cache_read_write:1; 111703b705cfSriastradh unsigned int pad1:1; 111803b705cfSriastradh unsigned int surface_array_spacing:1; 111903b705cfSriastradh unsigned int vert_line_stride_ofs:1; 112003b705cfSriastradh unsigned int vert_line_stride:1; 112103b705cfSriastradh unsigned int tile_walk:1; 112203b705cfSriastradh unsigned int tiled_surface:1; 112303b705cfSriastradh unsigned int horizontal_alignment:1; 112403b705cfSriastradh unsigned int vertical_alignment:2; 112503b705cfSriastradh unsigned int surface_format:9; /**< BRW_SURFACEFORMAT_x */ 112603b705cfSriastradh unsigned int pad0:1; 112703b705cfSriastradh unsigned int is_array:1; 112803b705cfSriastradh unsigned int surface_type:3; /**< BRW_SURFACE_1D/2D/3D/CUBE */ 112903b705cfSriastradh } ss0; 113003b705cfSriastradh 113103b705cfSriastradh struct { 113203b705cfSriastradh unsigned int base_addr; 113303b705cfSriastradh } ss1; 113403b705cfSriastradh 113503b705cfSriastradh struct { 113603b705cfSriastradh unsigned int width:14; 113703b705cfSriastradh unsigned int pad1:2; 113803b705cfSriastradh unsigned int height:14; 113903b705cfSriastradh unsigned int pad0:2; 114003b705cfSriastradh } ss2; 114103b705cfSriastradh 114203b705cfSriastradh struct { 114303b705cfSriastradh unsigned int pitch:18; 114403b705cfSriastradh unsigned int pad:3; 114503b705cfSriastradh unsigned int depth:11; 114603b705cfSriastradh } ss3; 114703b705cfSriastradh 114803b705cfSriastradh struct { 114903b705cfSriastradh unsigned int multisample_position_palette_index:3; 115003b705cfSriastradh unsigned int num_multisamples:3; 115103b705cfSriastradh unsigned int multisampled_surface_storage_format:1; 115203b705cfSriastradh unsigned int render_target_view_extent:11; 115303b705cfSriastradh unsigned int min_array_elt:11; 115403b705cfSriastradh unsigned int rotation:2; 115503b705cfSriastradh unsigned int pad0:1; 115603b705cfSriastradh } ss4; 115703b705cfSriastradh 115803b705cfSriastradh struct { 115903b705cfSriastradh unsigned int mip_count:4; 116003b705cfSriastradh unsigned int min_lod:4; 116103b705cfSriastradh unsigned int pad1:12; 116203b705cfSriastradh unsigned int y_offset:4; 116303b705cfSriastradh unsigned int pad0:1; 116403b705cfSriastradh unsigned int x_offset:7; 116503b705cfSriastradh } ss5; 116603b705cfSriastradh 116703b705cfSriastradh struct { 116803b705cfSriastradh unsigned int pad; /* Multisample Control Surface stuff */ 116903b705cfSriastradh } ss6; 117003b705cfSriastradh 117103b705cfSriastradh struct { 117203b705cfSriastradh unsigned int resource_min_lod:12; 117303b705cfSriastradh unsigned int pad0:16; 117403b705cfSriastradh unsigned int alpha_clear_color:1; 117503b705cfSriastradh unsigned int blue_clear_color:1; 117603b705cfSriastradh unsigned int green_clear_color:1; 117703b705cfSriastradh unsigned int red_clear_color:1; 117803b705cfSriastradh } ss7; 117903b705cfSriastradh}; 118003b705cfSriastradh 118103b705cfSriastradhstruct gen7_sampler_state { 118203b705cfSriastradh struct { 118303b705cfSriastradh unsigned int aniso_algorithm:1; 118403b705cfSriastradh unsigned int lod_bias:13; 118503b705cfSriastradh unsigned int min_filter:3; 118603b705cfSriastradh unsigned int mag_filter:3; 118703b705cfSriastradh unsigned int mip_filter:2; 118803b705cfSriastradh unsigned int base_level:5; 118903b705cfSriastradh unsigned int pad1:1; 119003b705cfSriastradh unsigned int lod_preclamp:1; 119103b705cfSriastradh unsigned int default_color_mode:1; 119203b705cfSriastradh unsigned int pad0:1; 119303b705cfSriastradh unsigned int disable:1; 119403b705cfSriastradh } ss0; 119503b705cfSriastradh 119603b705cfSriastradh struct { 119703b705cfSriastradh unsigned int cube_control_mode:1; 119803b705cfSriastradh unsigned int shadow_function:3; 119903b705cfSriastradh unsigned int pad:4; 120003b705cfSriastradh unsigned int max_lod:12; 120103b705cfSriastradh unsigned int min_lod:12; 120203b705cfSriastradh } ss1; 120303b705cfSriastradh 120403b705cfSriastradh struct { 120503b705cfSriastradh unsigned int pad:5; 120603b705cfSriastradh unsigned int default_color_pointer:27; 120703b705cfSriastradh } ss2; 120803b705cfSriastradh 120903b705cfSriastradh struct { 121003b705cfSriastradh unsigned int r_wrap_mode:3; 121103b705cfSriastradh unsigned int t_wrap_mode:3; 121203b705cfSriastradh unsigned int s_wrap_mode:3; 121303b705cfSriastradh unsigned int pad:1; 121403b705cfSriastradh unsigned int non_normalized_coord:1; 121503b705cfSriastradh unsigned int trilinear_quality:2; 121603b705cfSriastradh unsigned int address_round:6; 121703b705cfSriastradh unsigned int max_aniso:3; 121803b705cfSriastradh unsigned int chroma_key_mode:1; 121903b705cfSriastradh unsigned int chroma_key_index:2; 122003b705cfSriastradh unsigned int chroma_key_enable:1; 122103b705cfSriastradh unsigned int pad0:6; 122203b705cfSriastradh } ss3; 122303b705cfSriastradh}; 122403b705cfSriastradh 122503b705cfSriastradh/* Surface state DW0 */ 122603b705cfSriastradh#define GEN7_SURFACE_RC_READ_WRITE (1 << 8) 122703b705cfSriastradh#define GEN7_SURFACE_VALIGN_4 (1 << 16) 122803b705cfSriastradh#define GEN7_SURFACE_HALIGN_8 (1 << 15) 122903b705cfSriastradh#define GEN7_SURFACE_TILED (1 << 14) 123003b705cfSriastradh#define GEN7_SURFACE_TILED_Y (1 << 13) 123103b705cfSriastradh#define GEN7_SURFACE_FORMAT_SHIFT 18 123203b705cfSriastradh#define GEN7_SURFACE_TYPE_SHIFT 29 123303b705cfSriastradh 123403b705cfSriastradh/* Surface state DW2 */ 123503b705cfSriastradh#define GEN7_SURFACE_HEIGHT_SHIFT 16 123603b705cfSriastradh#define GEN7_SURFACE_WIDTH_SHIFT 0 123703b705cfSriastradh 123803b705cfSriastradh/* Surface state DW3 */ 123903b705cfSriastradh#define GEN7_SURFACE_DEPTH_SHIFT 21 124003b705cfSriastradh#define GEN7_SURFACE_PITCH_SHIFT 0 124103b705cfSriastradh 124203b705cfSriastradh#define HSW_SWIZZLE_ZERO 0 124303b705cfSriastradh#define HSW_SWIZZLE_ONE 1 124403b705cfSriastradh#define HSW_SWIZZLE_RED 4 124503b705cfSriastradh#define HSW_SWIZZLE_GREEN 5 124603b705cfSriastradh#define HSW_SWIZZLE_BLUE 6 124703b705cfSriastradh#define HSW_SWIZZLE_ALPHA 7 124803b705cfSriastradh#define __HSW_SURFACE_SWIZZLE(r,g,b,a) \ 124903b705cfSriastradh ((a) << 16 | (b) << 19 | (g) << 22 | (r) << 25) 125003b705cfSriastradh#define HSW_SURFACE_SWIZZLE(r,g,b,a) \ 125103b705cfSriastradh __HSW_SURFACE_SWIZZLE(HSW_SWIZZLE_##r, HSW_SWIZZLE_##g, HSW_SWIZZLE_##b, HSW_SWIZZLE_##a) 125203b705cfSriastradh 125303b705cfSriastradh/* _3DSTATE_VERTEX_BUFFERS on GEN7*/ 125403b705cfSriastradh/* DW1 */ 125503b705cfSriastradh#define GEN7_VB0_ADDRESS_MODIFYENABLE (1 << 14) 125603b705cfSriastradh 125703b705cfSriastradh/* _3DPRIMITIVE on GEN7 */ 125803b705cfSriastradh/* DW1 */ 125903b705cfSriastradh# define GEN7_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL (0 << 8) 126003b705cfSriastradh# define GEN7_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM (1 << 8) 126103b705cfSriastradh 126203b705cfSriastradh#define GEN7_3DSTATE_CLEAR_PARAMS GEN7_3D(3, 0, 0x04) 126303b705cfSriastradh#define GEN7_3DSTATE_DEPTH_BUFFER GEN7_3D(3, 0, 0x05) 126403b705cfSriastradh# define GEN7_3DSTATE_DEPTH_BUFFER_TYPE_SHIFT 29 126503b705cfSriastradh# define GEN7_3DSTATE_DEPTH_BUFFER_FORMAT_SHIFT 18 126603b705cfSriastradh/* DW1 */ 126703b705cfSriastradh# define GEN7_3DSTATE_DEPTH_CLEAR_VALID (1 << 15) 126803b705cfSriastradh 126903b705cfSriastradh#define GEN7_3DSTATE_CONSTANT_HS GEN7_3D(3, 0, 0x19) 127003b705cfSriastradh#define GEN7_3DSTATE_CONSTANT_DS GEN7_3D(3, 0, 0x1a) 127103b705cfSriastradh 127203b705cfSriastradh#define GEN7_3DSTATE_HS GEN7_3D(3, 0, 0x1b) 127303b705cfSriastradh#define GEN7_3DSTATE_TE GEN7_3D(3, 0, 0x1c) 127403b705cfSriastradh#define GEN7_3DSTATE_DS GEN7_3D(3, 0, 0x1d) 127503b705cfSriastradh#define GEN7_3DSTATE_STREAMOUT GEN7_3D(3, 0, 0x1e) 127603b705cfSriastradh#define GEN7_3DSTATE_SBE GEN7_3D(3, 0, 0x1f) 127703b705cfSriastradh 127803b705cfSriastradh/* DW1 */ 127903b705cfSriastradh# define GEN7_SBE_SWIZZLE_CONTROL_MODE (1 << 28) 128003b705cfSriastradh# define GEN7_SBE_NUM_OUTPUTS_SHIFT 22 128103b705cfSriastradh# define GEN7_SBE_SWIZZLE_ENABLE (1 << 21) 128203b705cfSriastradh# define GEN7_SBE_POINT_SPRITE_LOWERLEFT (1 << 20) 128303b705cfSriastradh# define GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT 11 128403b705cfSriastradh# define GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT 4 128503b705cfSriastradh 128603b705cfSriastradh#define GEN7_3DSTATE_PS GEN7_3D(3, 0, 0x20) 128703b705cfSriastradh/* DW1: kernel pointer */ 128803b705cfSriastradh/* DW2 */ 128903b705cfSriastradh# define GEN7_PS_SPF_MODE (1 << 31) 129003b705cfSriastradh# define GEN7_PS_VECTOR_MASK_ENABLE (1 << 30) 129103b705cfSriastradh# define GEN7_PS_SAMPLER_COUNT_SHIFT 27 129203b705cfSriastradh# define GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18 129303b705cfSriastradh# define GEN7_PS_FLOATING_POINT_MODE_IEEE_754 (0 << 16) 129403b705cfSriastradh# define GEN7_PS_FLOATING_POINT_MODE_ALT (1 << 16) 129503b705cfSriastradh/* DW3: scratch space */ 129603b705cfSriastradh/* DW4 */ 129703b705cfSriastradh# define IVB_PS_MAX_THREADS_SHIFT 24 129803b705cfSriastradh# define HSW_PS_MAX_THREADS_SHIFT 23 129903b705cfSriastradh# define HSW_PS_SAMPLE_MASK_SHIFT 12 130003b705cfSriastradh# define GEN7_PS_PUSH_CONSTANT_ENABLE (1 << 11) 130103b705cfSriastradh# define GEN7_PS_ATTRIBUTE_ENABLE (1 << 10) 130203b705cfSriastradh# define GEN7_PS_OMASK_TO_RENDER_TARGET (1 << 9) 130303b705cfSriastradh# define GEN7_PS_DUAL_SOURCE_BLEND_ENABLE (1 << 7) 130403b705cfSriastradh# define GEN7_PS_POSOFFSET_NONE (0 << 3) 130503b705cfSriastradh# define GEN7_PS_POSOFFSET_CENTROID (2 << 3) 130603b705cfSriastradh# define GEN7_PS_POSOFFSET_SAMPLE (3 << 3) 130703b705cfSriastradh# define GEN7_PS_32_DISPATCH_ENABLE (1 << 2) 130803b705cfSriastradh# define GEN7_PS_16_DISPATCH_ENABLE (1 << 1) 130903b705cfSriastradh# define GEN7_PS_8_DISPATCH_ENABLE (1 << 0) 131003b705cfSriastradh/* DW5 */ 131103b705cfSriastradh# define GEN7_PS_DISPATCH_START_GRF_SHIFT_0 16 131203b705cfSriastradh# define GEN7_PS_DISPATCH_START_GRF_SHIFT_1 8 131303b705cfSriastradh# define GEN7_PS_DISPATCH_START_GRF_SHIFT_2 0 131403b705cfSriastradh/* DW6: kernel 1 pointer */ 131503b705cfSriastradh/* DW7: kernel 2 pointer */ 131603b705cfSriastradh 131703b705cfSriastradh#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL GEN7_3D(3, 0, 0x21) 131803b705cfSriastradh#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC GEN7_3D(3, 0, 0x23) 131903b705cfSriastradh 132003b705cfSriastradh#define GEN7_3DSTATE_BLEND_STATE_POINTERS GEN7_3D(3, 0, 0x24) 132103b705cfSriastradh#define GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS GEN7_3D(3, 0, 0x25) 132203b705cfSriastradh 132303b705cfSriastradh#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS GEN7_3D(3, 0, 0x26) 132403b705cfSriastradh#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS GEN7_3D(3, 0, 0x27) 132503b705cfSriastradh#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS GEN7_3D(3, 0, 0x28) 132603b705cfSriastradh#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS GEN7_3D(3, 0, 0x29) 132703b705cfSriastradh#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS GEN7_3D(3, 0, 0x2a) 132803b705cfSriastradh 132903b705cfSriastradh#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS GEN7_3D(3, 0, 0x2b) 133003b705cfSriastradh#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS GEN7_3D(3, 0, 0x2e) 133103b705cfSriastradh#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS GEN7_3D(3, 0, 0x2f) 133203b705cfSriastradh 133303b705cfSriastradh#define GEN7_3DSTATE_URB_VS GEN7_3D(3, 0, 0x30) 133403b705cfSriastradh#define GEN7_3DSTATE_URB_HS GEN7_3D(3, 0, 0x31) 133503b705cfSriastradh#define GEN7_3DSTATE_URB_DS GEN7_3D(3, 0, 0x32) 133603b705cfSriastradh#define GEN7_3DSTATE_URB_GS GEN7_3D(3, 0, 0x33) 133703b705cfSriastradh/* DW1 */ 133803b705cfSriastradh# define GEN7_URB_ENTRY_NUMBER_SHIFT 0 133903b705cfSriastradh# define GEN7_URB_ENTRY_SIZE_SHIFT 16 134003b705cfSriastradh# define GEN7_URB_STARTING_ADDRESS_SHIFT 25 134103b705cfSriastradh 134203b705cfSriastradh#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS GEN7_3D(3, 1, 0x12) 134303b705cfSriastradh#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS GEN7_3D(3, 1, 0x16) 134403b705cfSriastradh/* DW1 */ 134503b705cfSriastradh# define GEN7_PUSH_CONSTANT_BUFFER_OFFSET_SHIFT 16 134603b705cfSriastradh 134703b705cfSriastradhstruct gen7_cc_viewport { 134803b705cfSriastradh float min_depth; 134903b705cfSriastradh float max_depth; 135003b705cfSriastradh}; 135103b705cfSriastradh 135203b705cfSriastradhtypedef enum { 135303b705cfSriastradh SAMPLER_FILTER_NEAREST = 0, 135403b705cfSriastradh SAMPLER_FILTER_BILINEAR, 135503b705cfSriastradh FILTER_COUNT 135603b705cfSriastradh} sampler_filter_t; 135703b705cfSriastradh 135803b705cfSriastradhtypedef enum { 135903b705cfSriastradh SAMPLER_EXTEND_NONE = 0, 136003b705cfSriastradh SAMPLER_EXTEND_REPEAT, 136103b705cfSriastradh SAMPLER_EXTEND_PAD, 136203b705cfSriastradh SAMPLER_EXTEND_REFLECT, 136303b705cfSriastradh EXTEND_COUNT 136403b705cfSriastradh} sampler_extend_t; 136503b705cfSriastradh 136603b705cfSriastradh#endif 1367