summaryrefslogtreecommitdiff
path: root/lib/gen8_render.h
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@intel.com>2014-09-08 10:49:59 +0300
committerMika Kuoppala <mika.kuoppala@intel.com>2014-10-09 19:47:51 +0300
commit0e8ac72d5d608d82a91bb5232badfb872589ac14 (patch)
treed4a515e7787b51fb5e691508bbda2a9cba00f273 /lib/gen8_render.h
parentb69659c3f5ed285bd218350deeff52761aec3d10 (diff)
tools/null_state_gen: Add Gen8 golden state
Previously we didn't have a clear understanding what is necessary for a pipeline state to be properly initialized. So we had to improvise and use a stripped out render copy. Now we have a more clear understanding so switch out render copy based frankenstate to state we can call golden state. v2: - export intel_batch_state_offset - add 3DSTATE_RASTER (Bradley Volkin) Cc: Volkin, Bradley D <bradley.d.volkin@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'lib/gen8_render.h')
-rw-r--r--lib/gen8_render.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/gen8_render.h b/lib/gen8_render.h
index 0eec80c4..ba3f9f27 100644
--- a/lib/gen8_render.h
+++ b/lib/gen8_render.h
@@ -8,6 +8,8 @@
#define GEN7_3DSTATE_URB_DS (0x7832 << 16)
#define GEN7_3DSTATE_URB_GS (0x7833 << 16)
+# 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)
@@ -29,6 +31,7 @@
#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)
@@ -44,6 +47,12 @@
# 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 GEN7_VS_FLOATING_POINT_MODE_ALTERNATE (1 << 16)
+
#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP \
GEN6_3D(3, 0, 0x21)
#define GEN8_3DSTATE_PS_BLEND GEN6_3D(3, 0, 0x4d)
@@ -68,14 +77,26 @@
#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_VF GEN6_3D(3, 0, 0x0c)
#define GEN8_3DSTATE_VF_TOPOLOGY GEN6_3D(3, 0, 0x4b)
+#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_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)
@@ -84,6 +105,9 @@
/* Random shifts */
#define GEN8_3DSTATE_PS_MAX_THREADS_SHIFT 23
+/* STATE_BASE_ADDRESS state size in pages*/
+#define GEN8_STATE_SIZE_PAGES(x) ((x) << 12)
+
/* Shamelessly ripped from mesa */
struct gen8_surface_state
{