i965: Mostly fix glsl-max-varyings.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_defines.h
index f26a13fc3c37aaaf19c21a2f23a35411b4f9851d..dba500c56217c6d7d5e13b425b06a466797c7849 100644 (file)
 #define BRW_MASK_ENABLE   0
 #define BRW_MASK_DISABLE  1
 
+/* Sandybridge is WECtrl (Write enable control) */
+#define BRW_WE_NORMAL          0
+#define BRW_WE_KILL_PRED       1
+
 #define BRW_OPCODE_MOV        1
 #define BRW_OPCODE_SEL        2
 #define BRW_OPCODE_NOT        4
 #define BRW_POLYGON_FACING_BACK       1
 
 #define BRW_MESSAGE_TARGET_NULL               0
-#define BRW_MESSAGE_TARGET_MATH               1
+#define BRW_MESSAGE_TARGET_MATH               1 /* reserved on GEN6 */
 #define BRW_MESSAGE_TARGET_SAMPLER            2
 #define BRW_MESSAGE_TARGET_GATEWAY            3
-#define BRW_MESSAGE_TARGET_DATAPORT_READ      4
-#define BRW_MESSAGE_TARGET_DATAPORT_WRITE     5
+#define BRW_MESSAGE_TARGET_DATAPORT_READ      4 /* sampler cache on GEN6 */
+#define BRW_MESSAGE_TARGET_DATAPORT_WRITE     5 /* render cache on Gen6 */
 #define BRW_MESSAGE_TARGET_URB                6
 #define BRW_MESSAGE_TARGET_THREAD_SPAWNER     7
+#define BRW_MESSAGE_TARGET_CONST_CACHE       9 /* GEN6 */
 
 #define BRW_SAMPLER_RETURN_FORMAT_FLOAT32     0
 #define BRW_SAMPLER_RETURN_FORMAT_UINT32      2
 #define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_16DWORDS  3
 
 #define BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ          0
-#define BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ     1
-#define BRW_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ          2
-#define BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ      3
+/* GEN6 */
+#define BRW_DATAPORT_READ_MESSAGE_RENDER_UNORM_READ        1
+#define BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ     2
+#define BRW_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ          4
+/* GEN6 */
+#define BRW_DATAPORT_READ_MESSAGE_OWORD_UNALIGN_BLOCK_READ  5
+#define BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ      6
 
 #define BRW_DATAPORT_READ_TARGET_DATA_CACHE      0
 #define BRW_DATAPORT_READ_TARGET_RENDER_CACHE    1
 #define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VERTEX_BUFFER_WRITE     5
 #define BRW_DATAPORT_WRITE_MESSAGE_FLUSH_RENDER_CACHE               7
 
+/* GEN6 */
+#define BRW_DATAPORT_WRITE_MESSAGE_DWORD_ATOMIC_WRITE_GEN6             7
+#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE_GEN6              8
+#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE_GEN6         9
+#define BRW_DATAPORT_WRITE_MESSAGE_MEDIA_BLOCK_WRITE_GEN6              10
+#define BRW_DATAPORT_WRITE_MESSAGE_DWORLD_SCATTERED_WRITE_GEN6         11
+#define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE_GEN6            12
+#define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VB_WRITE_GEN6              13
+#define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_UNORM_WRITE_GEN6      14
+
 #define BRW_MATH_FUNCTION_INV                              1
 #define BRW_MATH_FUNCTION_LOG                              2
 #define BRW_MATH_FUNCTION_EXP                              3
 #define CMD_BINDING_TABLE_PTRS        0x7801
 # define GEN6_BINDING_TABLE_MODIFY_VS  (1 << 8)
 # define GEN6_BINDING_TABLE_MODIFY_GS  (1 << 9)
-# define GEN6_BINDING_TABLE_MODIFY_PS  (1 << 10)
+# define GEN6_BINDING_TABLE_MODIFY_PS  (1 << 12)
 
 #define CMD_3D_SAMPLER_STATE_POINTERS                  0x7802 /* SNB+ */
 # define PS_SAMPLER_STATE_CHANGE                               (1 << 12)
 # define GEN6_WM_LINE_AA_WIDTH_2_0                     (2 << 14)
 # define GEN6_WM_LINE_AA_WIDTH_4_0                     (3 << 14)
 # define GEN6_WM_POLYGON_STIPPLE_ENABLE                        (1 << 13)
-# define GEN6_WM_LINE_STIPPLE_ENABLE                   (1 << 12)
+# define GEN6_WM_LINE_STIPPLE_ENABLE                   (1 << 11)
 # define GEN6_WM_OMASK_TO_RENDER_TARGET                        (1 << 9)
 # define GEN6_WM_USES_SOURCE_W                         (1 << 8)
 # define GEN6_WM_DUAL_SOURCE_BLEND_ENABLE              (1 << 7)