summaryrefslogtreecommitdiff
path: root/lib/gen8_render.h
diff options
context:
space:
mode:
authorLukasz Kalamarz <lukasz.kalamarz@intel.com>2018-06-12 14:10:02 +0200
committerKatarzyna Dec <katarzyna.dec@intel.com>2018-06-14 14:59:38 +0200
commit5be86f2f25639b1e01b617a01da16bd58222bf45 (patch)
tree0b43a2f67aca65d01972379e15b6c347ad1ab610 /lib/gen8_render.h
parente4665818021e4b5842bdef4ba48f8b9d387405b1 (diff)
lib/gen8_render: Cleanup of libs
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 implemented there, otherwise dropped duplicates. Modified include to use gen7_render header instead of gen6. v2: Fixed commit message v3: fixed typo in commit msg Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
Diffstat (limited to 'lib/gen8_render.h')
-rw-r--r--lib/gen8_render.h76
1 files changed, 18 insertions, 58 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 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_DS_STATE_POINTERS GEN6_3D(3, 0, 0x25)
+
+#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