[igt-dev] [PATCH i-g-t v2 4/5] lib/gen8_render: Cleanup of libs

Lukasz Kalamarz lukasz.kalamarz at intel.com
Tue Jun 12 12:10:02 UTC 2018


This patch implements some changes in gen8_render header and
all files that include it. Renamed all definition that were
introduced in that file with prefix GEN8_* instead of
previous GEN's one if they were not impleneted there,
otherwise dropped duplicates. Modified include to use
gen7_render header instead of gen6.

v2: Fixed commit message

Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
Cc: Katarzyna Dec <katarzyna.dec at intel.com>
Cc: Antonio Argenziano <antonio.argenziano at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Ewelina Musial <ewelina.musial at intel.com>
---
 lib/gen8_render.h                             | 74 ++++++---------------------
 lib/rendercopy_gen8.c                         | 22 ++++----
 lib/rendercopy_gen9.c                         | 22 ++++----
 tools/null_state_gen/intel_renderstate_gen8.c | 26 +++++-----
 tools/null_state_gen/intel_renderstate_gen9.c | 26 +++++-----
 5 files changed, 65 insertions(+), 105 deletions(-)

diff --git a/lib/gen8_render.h b/lib/gen8_render.h
index ba3f9f27..79f2f388 100644
--- a/lib/gen8_render.h
+++ b/lib/gen8_render.h
@@ -1,59 +1,33 @@
 #ifndef GEN8_RENDER_H
 #define GEN8_RENDER_H
 
-#include "gen6_render.h"
+#include "gen7_render.h"
 
-#define GEN7_3DSTATE_URB_VS (0x7830 << 16)
-#define GEN7_3DSTATE_URB_HS (0x7831 << 16)
-#define GEN7_3DSTATE_URB_DS (0x7832 << 16)
-#define GEN7_3DSTATE_URB_GS (0x7833 << 16)
+# define GEN8_WM_LEGACY_DIAMOND_LINE_RASTERIZATION	(1 << 26)
 
-# define GEN7_WM_LEGACY_DIAMOND_LINE_RASTERIZATION	(1 << 26)
-
-#define GEN6_3DSTATE_SCISSOR_STATE_POINTERS	GEN6_3D(3, 0, 0xf)
-#define GEN7_3DSTATE_CLEAR_PARAMS		GEN6_3D(3, 0, 0x04)
-#define GEN7_3DSTATE_DEPTH_BUFFER		GEN6_3D(3, 0, 0x05)
-#define GEN7_3DSTATE_STENCIL_BUFFER		GEN6_3D(3, 0, 0x06)
-#define GEN7_3DSTATE_HIER_DEPTH_BUFFER		GEN6_3D(3, 0, 0x07)
+#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS	GEN6_3D(3, 0, 0xf)
+#define GEN8_3DSTATE_STENCIL_BUFFER		GEN6_3D(3, 0, 0x06)
+#define GEN8_3DSTATE_HIER_DEPTH_BUFFER		GEN6_3D(3, 0, 0x07)
 #define GEN8_3DSTATE_MULTISAMPLE		GEN6_3D(3, 0, 0x0d)
-# define GEN8_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_CENTER		(0 << 4)
-# define GEN8_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_UPPER_LEFT	(1 << 4)
-# define GEN8_3DSTATE_MULTISAMPLE_NUMSAMPLES_1			(0 << 1)
 # define GEN8_3DSTATE_MULTISAMPLE_NUMSAMPLES_2			(1 << 1)
-# define GEN8_3DSTATE_MULTISAMPLE_NUMSAMPLES_4			(2 << 1)
-# define GEN8_3DSTATE_MULTISAMPLE_NUMSAMPLES_8			(3 << 1)
 # define GEN9_3DSTATE_MULTISAMPLE_NUMSAMPLES_16			(4 << 1)
 
 #define GEN8_3DSTATE_WM_HZ_OP			GEN6_3D(3, 0, 0x52)
 
 #define GEN8_3DSTATE_VF_INSTANCING		GEN6_3D(3, 0, 0x49)
-#define GEN7_3DSTATE_GS				GEN6_3D(3, 0, 0x11)
-#define GEN7_3DSTATE_CONSTANT_GS		GEN6_3D(3, 0, 0x16)
-#define GEN7_3DSTATE_CONSTANT_HS		GEN6_3D(3, 0, 0x19)
-#define GEN7_3DSTATE_CONSTANT_DS		GEN6_3D(3, 0, 0x1a)
-#define GEN7_3DSTATE_CONSTANT_PS		GEN6_3D(3, 0, 0x17)
-#define GEN7_3DSTATE_HS				GEN6_3D(3, 0, 0x1b)
-#define GEN7_3DSTATE_TE				GEN6_3D(3, 0, 0x1c)
-#define GEN7_3DSTATE_DS				GEN6_3D(3, 0, 0x1d)
-#define GEN7_3DSTATE_STREAMOUT			GEN6_3D(3, 0, 0x1e)
-#define GEN7_3DSTATE_SBE			GEN6_3D(3, 0, 0x1f)
 # define GEN8_SBE_FORCE_URB_ENTRY_READ_LENGTH	(1 << 29)
 # define GEN8_SBE_FORCE_URB_ENTRY_READ_OFFSET	(1 << 28)
-# define GEN7_SBE_NUM_OUTPUTS_SHIFT             22
-# define GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT   11
 # define GEN8_SBE_URB_ENTRY_READ_OFFSET_SHIFT   5
 #define GEN8_3DSTATE_SBE_SWIZ			GEN6_3D(3, 0, 0x51)
 #define GEN8_3DSTATE_RASTER			GEN6_3D(3, 0, 0x50)
 # define GEN8_RASTER_FRONT_WINDING_CCW			(1 << 21)
 # define GEN8_RASTER_CULL_NONE                          (1 << 16)
-#define GEN7_3DSTATE_PS				GEN6_3D(3, 0, 0x20)
-# define GEN7_PS_SPF_MODE                               (1 << 31)
 
-# define GEN7_SF_POINT_WIDTH_FROM_SOURCE                (1 << 11)
+# define GEN8_SF_POINT_WIDTH_FROM_SOURCE                (1 << 11)
 
-# define GEN7_VS_FLOATING_POINT_MODE_ALTERNATE          (1 << 16)
+# define GEN8_VS_FLOATING_POINT_MODE_ALTERNATE          (1 << 16)
 
-#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP	\
+#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP	\
 						GEN6_3D(3, 0, 0x21)
 #define GEN8_3DSTATE_PS_BLEND			GEN6_3D(3, 0, 0x4d)
 # define GEN8_PS_BLEND_HAS_WRITEABLE_RT			(1 << 30)
@@ -62,20 +36,10 @@
 # define GEN8_PSX_PIXEL_SHADER_VALID			(1 << 31)
 # define GEN8_PSX_ATTRIBUTE_ENABLE			(1 << 8)
 
-#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC	GEN6_3D(3, 0, 0x23)
-#define GEN7_3DSTATE_BLEND_STATE_POINTERS	GEN6_3D(3, 0, 0x24)
-#define GEN7_3DSTATE_DS_STATE_POINTERS		GEN6_3D(3, 0, 0x25)
-#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS	GEN6_3D(3, 0, 0x26)
-#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS	GEN6_3D(3, 0, 0x27)
-#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS	GEN6_3D(3, 0, 0x28)
-#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS	GEN6_3D(3, 0, 0x29)
-#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS	GEN6_3D(3, 0, 0x2a)
+#define GEN8_3DSTATE_DS_STATE_POINTERS		GEN6_3D(3, 0, 0x25)
 
-#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS	GEN6_3D(3, 0, 0x2b)
-#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS	GEN6_3D(3, 0, 0x2c)
-#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS	GEN6_3D(3, 0, 0x2d)
-#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS	GEN6_3D(3, 0, 0x2e)
-#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS	GEN6_3D(3, 0, 0x2f)
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS	GEN6_3D(3, 0, 0x2c)
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS	GEN6_3D(3, 0, 0x2d)
 
 #define GEN8_3DSTATE_VF				GEN6_3D(3, 0, 0x0c)
 #define GEN8_3DSTATE_VF_TOPOLOGY		GEN6_3D(3, 0, 0x4b)
@@ -83,24 +47,20 @@
 #define GEN8_3DSTATE_BIND_TABLE_POOL_ALLOC	GEN6_3D(3, 1, 0x19)
 #define GEN8_3DSTATE_GATHER_POOL_ALLOC		GEN6_3D(3, 1, 0x1a)
 #define GEN8_3DSTATE_DX9_CONSTANT_BUFFER_POOL_ALLOC 	GEN6_3D(3, 1, 0x1b)
-#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS	GEN6_3D(3, 1, 0x12)
-#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS	GEN6_3D(3, 1, 0x13)
-#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS	GEN6_3D(3, 1, 0x14)
-#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS	GEN6_3D(3, 1, 0x15)
-#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS	GEN6_3D(3, 1, 0x16)
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS	GEN6_3D(3, 1, 0x13)
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS	GEN6_3D(3, 1, 0x14)
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS	GEN6_3D(3, 1, 0x15)
 
 #define GEN8_3DSTATE_VF_SGVS			GEN6_3D(3, 0, 0x4a)
 #define GEN8_3DSTATE_SO_DECL_LIST		GEN6_3D(3, 1, 0x17)
 #define GEN8_3DSTATE_SO_BUFFER			GEN6_3D(3, 1, 0x18)
-#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET	GEN6_3D(3, 1, 0x06)
-#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN	GEN6_3D(3, 1, 0x07)
 #define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0	GEN6_3D(3, 1, 0x02)
 #define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1	GEN6_3D(3, 1, 0x0c)
 
 /* Some random bits that we care about */
-#define GEN7_VB0_BUFFER_ADDR_MOD_EN		(1 << 14)
-#define GEN7_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 11)
-#define GEN7_3DSTATE_PS_ATTRIBUTE_ENABLED	 (1 << 10)
+#define GEN8_VB0_BUFFER_ADDR_MOD_EN		(1 << 14)
+#define GEN8_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 11)
+#define GEN8_3DSTATE_PS_ATTRIBUTE_ENABLED	 (1 << 10)
 
 /* Random shifts */
 #define GEN8_3DSTATE_PS_MAX_THREADS_SHIFT 23
diff --git a/lib/rendercopy_gen8.c b/lib/rendercopy_gen8.c
index a328e2bd..2b5d9b52 100644
--- a/lib/rendercopy_gen8.c
+++ b/lib/rendercopy_gen8.c
@@ -365,7 +365,7 @@ static void gen8_emit_vertex_buffer(struct intel_batchbuffer *batch,
 				    uint32_t offset) {
 	OUT_BATCH(GEN6_3DSTATE_VERTEX_BUFFERS | (1 + (4 * 1) - 2));
 	OUT_BATCH(0 << VB0_BUFFER_INDEX_SHIFT | /* VB 0th index */
-		  GEN7_VB0_BUFFER_ADDR_MOD_EN | /* Address Modify Enable */
+		  GEN8_VB0_BUFFER_ADDR_MOD_EN | /* Address Modify Enable */
 		  VERTEX_SIZE << VB0_BUFFER_PITCH_SHIFT);
 	OUT_RELOC(batch->bo, I915_GEM_DOMAIN_VERTEX, 0, offset);
 	OUT_BATCH(3 * VERTEX_SIZE);
@@ -478,11 +478,11 @@ static void
 gen7_emit_push_constants(struct intel_batchbuffer *batch) {
 	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS);
+	OUT_BATCH(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS);
+	OUT_BATCH(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS);
+	OUT_BATCH(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS);
 	OUT_BATCH(0);
 	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS);
 	OUT_BATCH(0);
@@ -616,7 +616,7 @@ gen8_emit_hs(struct intel_batchbuffer *batch) {
 	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS);
+	OUT_BATCH(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS);
 	OUT_BATCH(0);
 }
 
@@ -679,7 +679,7 @@ gen8_emit_ds(struct intel_batchbuffer *batch) {
 	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS);
+	OUT_BATCH(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS);
 	OUT_BATCH(0);
 }
 
@@ -753,7 +753,7 @@ gen8_emit_ps(struct intel_batchbuffer *batch, uint32_t kernel) {
 	OUT_BATCH(/* XXX: I don't understand the BARYCENTRIC stuff, but it
 		   * appears we need it to put our setup data in the place we
 		   * expect (g6, see below) */
-		  GEN7_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC);
+		  GEN8_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC);
 
 	OUT_BATCH(GEN6_3DSTATE_CONSTANT_PS | (11-2));
 	OUT_BATCH(0);
@@ -804,13 +804,13 @@ gen8_emit_depth(struct intel_batchbuffer *batch) {
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_HIER_DEPTH_BUFFER | (5 - 2));
+	OUT_BATCH(GEN8_3DSTATE_HIER_DEPTH_BUFFER | (5 - 2));
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_STENCIL_BUFFER | (5 - 2));
+	OUT_BATCH(GEN8_3DSTATE_STENCIL_BUFFER | (5 - 2));
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -940,7 +940,7 @@ void gen8_render_copyfunc(struct intel_batchbuffer *batch,
 
 	OUT_BATCH(GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC);
 	OUT_BATCH(viewport.cc_state);
-	OUT_BATCH(GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP);
+	OUT_BATCH(GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP);
 	OUT_BATCH(viewport.sf_clip_state);
 
 	gen7_emit_urb(batch);
@@ -969,7 +969,7 @@ void gen8_render_copyfunc(struct intel_batchbuffer *batch,
 
 	gen8_emit_ps(batch, ps_kernel_off);
 
-	OUT_BATCH(GEN6_3DSTATE_SCISSOR_STATE_POINTERS);
+	OUT_BATCH(GEN8_3DSTATE_SCISSOR_STATE_POINTERS);
 	OUT_BATCH(scissor_state);
 
 	gen8_emit_depth(batch);
diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
index d1d72594..eaf7f17e 100644
--- a/lib/rendercopy_gen9.c
+++ b/lib/rendercopy_gen9.c
@@ -359,7 +359,7 @@ static void gen7_emit_vertex_buffer(struct intel_batchbuffer *batch,
 				    uint32_t offset) {
 	OUT_BATCH(GEN6_3DSTATE_VERTEX_BUFFERS | (1 + (4 * 1) - 2));
 	OUT_BATCH(0 << VB0_BUFFER_INDEX_SHIFT | /* VB 0th index */
-		  GEN7_VB0_BUFFER_ADDR_MOD_EN | /* Address Modify Enable */
+		  GEN8_VB0_BUFFER_ADDR_MOD_EN | /* Address Modify Enable */
 		  VERTEX_SIZE << VB0_BUFFER_PITCH_SHIFT);
 	OUT_RELOC(batch->bo, I915_GEM_DOMAIN_VERTEX, 0, offset);
 	OUT_BATCH(3 * VERTEX_SIZE);
@@ -466,11 +466,11 @@ static void
 gen7_emit_push_constants(struct intel_batchbuffer *batch) {
 	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS);
+	OUT_BATCH(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS);
+	OUT_BATCH(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS);
+	OUT_BATCH(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS);
 	OUT_BATCH(0);
 	OUT_BATCH(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS);
 	OUT_BATCH(0);
@@ -613,7 +613,7 @@ gen8_emit_hs(struct intel_batchbuffer *batch) {
 	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS);
+	OUT_BATCH(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS);
 	OUT_BATCH(0);
 }
 
@@ -678,7 +678,7 @@ gen9_emit_ds(struct intel_batchbuffer *batch) {
 	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS);
+	OUT_BATCH(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS);
 	OUT_BATCH(0);
 }
 
@@ -755,7 +755,7 @@ gen8_emit_ps(struct intel_batchbuffer *batch, uint32_t kernel) {
 	OUT_BATCH(/* XXX: I don't understand the BARYCENTRIC stuff, but it
 		   * appears we need it to put our setup data in the place we
 		   * expect (g6, see below) */
-		  GEN7_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC);
+		  GEN8_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC);
 
 	OUT_BATCH(GEN6_3DSTATE_CONSTANT_PS | (11-2));
 	OUT_BATCH(0);
@@ -808,13 +808,13 @@ gen9_emit_depth(struct intel_batchbuffer *batch)
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_HIER_DEPTH_BUFFER | (5-2));
+	OUT_BATCH(GEN8_3DSTATE_HIER_DEPTH_BUFFER | (5-2));
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 
-	OUT_BATCH(GEN7_3DSTATE_STENCIL_BUFFER | (5-2));
+	OUT_BATCH(GEN8_3DSTATE_STENCIL_BUFFER | (5-2));
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -944,7 +944,7 @@ void gen9_render_copyfunc(struct intel_batchbuffer *batch,
 
 	OUT_BATCH(GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC);
 	OUT_BATCH(viewport.cc_state);
-	OUT_BATCH(GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP);
+	OUT_BATCH(GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP);
 	OUT_BATCH(viewport.sf_clip_state);
 
 	gen7_emit_urb(batch);
@@ -973,7 +973,7 @@ void gen9_render_copyfunc(struct intel_batchbuffer *batch,
 	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS);
 	OUT_BATCH(ps_sampler_state);
 
-	OUT_BATCH(GEN6_3DSTATE_SCISSOR_STATE_POINTERS);
+	OUT_BATCH(GEN8_3DSTATE_SCISSOR_STATE_POINTERS);
 	OUT_BATCH(scissor_state);
 
 	gen9_emit_depth(batch);
diff --git a/tools/null_state_gen/intel_renderstate_gen8.c b/tools/null_state_gen/intel_renderstate_gen8.c
index 08def120..c6973e0e 100644
--- a/tools/null_state_gen/intel_renderstate_gen8.c
+++ b/tools/null_state_gen/intel_renderstate_gen8.c
@@ -33,7 +33,7 @@
 static void gen8_emit_wm(struct intel_batchbuffer *batch)
 {
 	OUT_BATCH(GEN6_3DSTATE_WM | (2 - 2));
-	OUT_BATCH(GEN7_WM_LEGACY_DIAMOND_LINE_RASTERIZATION);
+	OUT_BATCH(GEN8_WM_LEGACY_DIAMOND_LINE_RASTERIZATION);
 }
 
 static void gen8_emit_ps(struct intel_batchbuffer *batch)
@@ -59,7 +59,7 @@ static void gen8_emit_sf(struct intel_batchbuffer *batch)
 	OUT_BATCH(0);
 	OUT_BATCH(1 << GEN6_3DSTATE_SF_TRIFAN_PROVOKE_SHIFT |
 		  1 << GEN6_3DSTATE_SF_VERTEX_SUB_PIXEL_PRECISION_SHIFT |
-		  GEN7_SF_POINT_WIDTH_FROM_SOURCE |
+		  GEN8_SF_POINT_WIDTH_FROM_SOURCE |
 		  8);
 }
 
@@ -68,7 +68,7 @@ static void gen8_emit_vs(struct intel_batchbuffer *batch)
 	OUT_BATCH(GEN6_3DSTATE_VS | (9 - 2));
 	OUT_BATCH(0);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_VS_FLOATING_POINT_MODE_ALTERNATE);
+	OUT_BATCH(GEN8_VS_FLOATING_POINT_MODE_ALTERNATE);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -204,7 +204,7 @@ static void gen8_emit_vertex_buffers(struct intel_batchbuffer *batch)
 
 	for (i = 0; i < buffers; i++) {
 		OUT_BATCH(i << VB0_BUFFER_INDEX_SHIFT |
-			  GEN7_VB0_BUFFER_ADDR_MOD_EN);
+			  GEN8_VB0_BUFFER_ADDR_MOD_EN);
 		OUT_BATCH(0); /* Addr */
 		OUT_BATCH(0);
 		OUT_BATCH(0);
@@ -308,7 +308,7 @@ static void gen8_emit_viewport_state_pointers_sf_clip(struct intel_batchbuffer *
 	for (i = 0; i < 16; i++)
 		OUT_STATE(0);
 
-	OUT_BATCH(GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP | (2 - 2));
+	OUT_BATCH(GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP | (2 - 2));
 	OUT_BATCH_STATE_OFFSET(offset);
 }
 
@@ -361,9 +361,9 @@ void gen8_setup_null_render_state(struct intel_batchbuffer *batch)
 	OUT_CMD(GEN8_3DSTATE_GATHER_POOL_ALLOC, 4);
 	OUT_CMD(GEN8_3DSTATE_DX9_CONSTANT_BUFFER_POOL_ALLOC, 4);
 	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS, 2);
-	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS, 2);
-	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS, 2);
-	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS, 2);
+	OUT_CMD(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS, 2);
+	OUT_CMD(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS, 2);
+	OUT_CMD(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS, 2);
 	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS, 2);
 	OUT_CMD(GEN6_3DSTATE_CONSTANT_VS, 11);
 	OUT_CMD(GEN7_3DSTATE_CONSTANT_HS, 11);
@@ -394,8 +394,8 @@ void gen8_setup_null_render_state(struct intel_batchbuffer *batch)
 
 	OUT_CMD(GEN6_3DSTATE_LINE_STIPPLE, 3);
 	OUT_CMD(GEN6_3DSTATE_AA_LINE_PARAMS, 3);
-	OUT_CMD(GEN7_3DSTATE_STENCIL_BUFFER, 5);
-	OUT_CMD(GEN7_3DSTATE_HIER_DEPTH_BUFFER, 5);
+	OUT_CMD(GEN8_3DSTATE_STENCIL_BUFFER, 5);
+	OUT_CMD(GEN8_3DSTATE_HIER_DEPTH_BUFFER, 5);
 	OUT_CMD(GEN7_3DSTATE_CLEAR_PARAMS, 3);
 	OUT_CMD(GEN6_3DSTATE_MONOFILTER_SIZE, 2);
 	OUT_CMD(GEN8_3DSTATE_MULTISAMPLE, 2);
@@ -423,12 +423,12 @@ void gen8_setup_null_render_state(struct intel_batchbuffer *batch)
 	gen8_emit_ps_blend(batch);
 
 	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS, 2);
-	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS, 2);
-	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS, 2);
+	OUT_CMD(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS, 2);
+	OUT_CMD(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS, 2);
 	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS, 2);
 	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS, 2);
 
-	OUT_CMD(GEN6_3DSTATE_SCISSOR_STATE_POINTERS, 2);
+	OUT_CMD(GEN8_3DSTATE_SCISSOR_STATE_POINTERS, 2);
 
 	gen8_emit_viewport_state_pointers_cc(batch);
 	gen8_emit_viewport_state_pointers_sf_clip(batch);
diff --git a/tools/null_state_gen/intel_renderstate_gen9.c b/tools/null_state_gen/intel_renderstate_gen9.c
index 1b77e552..9f338bbf 100644
--- a/tools/null_state_gen/intel_renderstate_gen9.c
+++ b/tools/null_state_gen/intel_renderstate_gen9.c
@@ -32,7 +32,7 @@
 static void gen8_emit_wm(struct intel_batchbuffer *batch)
 {
 	OUT_BATCH(GEN6_3DSTATE_WM | (2 - 2));
-	OUT_BATCH(GEN7_WM_LEGACY_DIAMOND_LINE_RASTERIZATION);
+	OUT_BATCH(GEN8_WM_LEGACY_DIAMOND_LINE_RASTERIZATION);
 }
 
 static void gen8_emit_ps(struct intel_batchbuffer *batch)
@@ -58,7 +58,7 @@ static void gen8_emit_sf(struct intel_batchbuffer *batch)
 	OUT_BATCH(0);
 	OUT_BATCH(1 << GEN6_3DSTATE_SF_TRIFAN_PROVOKE_SHIFT |
 		  1 << GEN6_3DSTATE_SF_VERTEX_SUB_PIXEL_PRECISION_SHIFT |
-		  GEN7_SF_POINT_WIDTH_FROM_SOURCE |
+		  GEN8_SF_POINT_WIDTH_FROM_SOURCE |
 		  8);
 }
 
@@ -67,7 +67,7 @@ static void gen8_emit_vs(struct intel_batchbuffer *batch)
 	OUT_BATCH(GEN6_3DSTATE_VS | (9 - 2));
 	OUT_BATCH(0);
 	OUT_BATCH(0);
-	OUT_BATCH(GEN7_VS_FLOATING_POINT_MODE_ALTERNATE);
+	OUT_BATCH(GEN8_VS_FLOATING_POINT_MODE_ALTERNATE);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
 	OUT_BATCH(0);
@@ -168,7 +168,7 @@ static void gen8_emit_vertex_buffers(struct intel_batchbuffer *batch)
 
 	for (i = 0; i < buffers; i++) {
 		OUT_BATCH(i << VB0_BUFFER_INDEX_SHIFT |
-			  GEN7_VB0_BUFFER_ADDR_MOD_EN);
+			  GEN8_VB0_BUFFER_ADDR_MOD_EN);
 		OUT_BATCH(0); /* Address */
 		OUT_BATCH(0);
 		OUT_BATCH(0);
@@ -271,7 +271,7 @@ static void gen8_emit_viewport_state_pointers_sf_clip(struct intel_batchbuffer *
 	for (i = 0; i < 16; i++)
 		OUT_STATE(0);
 
-	OUT_BATCH(GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP | (2 - 2));
+	OUT_BATCH(GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP | (2 - 2));
 	OUT_BATCH_STATE_OFFSET(offset);
 }
 
@@ -387,9 +387,9 @@ void gen9_setup_null_render_state(struct intel_batchbuffer *batch)
 
 	/* Push Constants */
 	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS, 2);
-	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS, 2);
-	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS, 2);
-	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS, 2);
+	OUT_CMD(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS, 2);
+	OUT_CMD(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS, 2);
+	OUT_CMD(GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS, 2);
 	OUT_CMD(GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS, 2);
 
 	/* Constants */
@@ -425,8 +425,8 @@ void gen9_setup_null_render_state(struct intel_batchbuffer *batch)
 
 	OUT_CMD(GEN6_3DSTATE_LINE_STIPPLE, 3);
 	OUT_CMD(GEN6_3DSTATE_AA_LINE_PARAMS, 3);
-	OUT_CMD(GEN7_3DSTATE_STENCIL_BUFFER, 5);
-	OUT_CMD(GEN7_3DSTATE_HIER_DEPTH_BUFFER, 5);
+	OUT_CMD(GEN8_3DSTATE_STENCIL_BUFFER, 5);
+	OUT_CMD(GEN8_3DSTATE_HIER_DEPTH_BUFFER, 5);
 	OUT_CMD(GEN7_3DSTATE_CLEAR_PARAMS, 3);
 	OUT_CMD(GEN6_3DSTATE_MONOFILTER_SIZE, 2);
 	OUT_CMD(GEN8_3DSTATE_MULTISAMPLE, 2);
@@ -455,12 +455,12 @@ void gen9_setup_null_render_state(struct intel_batchbuffer *batch)
 
 	/* 3D state sampler state pointers */
 	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS, 2);
-	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS, 2);
-	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS, 2);
+	OUT_CMD(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS, 2);
+	OUT_CMD(GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS, 2);
 	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS, 2);
 	OUT_CMD(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS, 2);
 
-	OUT_CMD(GEN6_3DSTATE_SCISSOR_STATE_POINTERS, 2);
+	OUT_CMD(GEN8_3DSTATE_SCISSOR_STATE_POINTERS, 2);
 
 	gen8_emit_viewport_state_pointers_cc(batch);
 	gen8_emit_viewport_state_pointers_sf_clip(batch);
-- 
2.14.3



More information about the igt-dev mailing list