From 435c5093aa2043eb832a5f4cb468d7141488e14c Mon Sep 17 00:00:00 2001 From: Lukasz Kalamarz Date: Thu, 12 Jul 2018 16:15:23 +0200 Subject: lib/rendercopy: Use gen4 definitions if applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of using definitions duplicated in gen7_render header, we should use the oldest definition that is working with chosen gen. This patch reuse gen6 definitons if registers/fields/shifts that were introduced in other genX_render headers. v3: Rebase and checkpatch Signed-off-by: Lukasz Kalamarz Cc: Katarzyna Dec Cc: Antonio Argenziano Cc: Daniele Ceraolo Spurio Cc: Ville Syrjälä Reviewed-by: Katarzyna Dec --- lib/gen8_render.h | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'lib/gen8_render.h') diff --git a/lib/gen8_render.h b/lib/gen8_render.h index 470dca0f..c62047d8 100644 --- a/lib/gen8_render.h +++ b/lib/gen8_render.h @@ -5,21 +5,21 @@ # define GEN8_WM_LEGACY_DIAMOND_LINE_RASTERIZATION (1 << 26) -#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_SCISSOR_STATE_POINTERS GEN4_3D(3, 0, 0xf) +#define GEN8_3DSTATE_STENCIL_BUFFER GEN4_3D(3, 0, 0x06) +#define GEN8_3DSTATE_HIER_DEPTH_BUFFER GEN4_3D(3, 0, 0x07) +#define GEN8_3DSTATE_MULTISAMPLE GEN4_3D(3, 0, 0x0d) # define GEN8_3DSTATE_MULTISAMPLE_NUMSAMPLES_2 (1 << 1) # define GEN9_3DSTATE_MULTISAMPLE_NUMSAMPLES_16 (4 << 1) -#define GEN8_3DSTATE_WM_HZ_OP GEN6_3D(3, 0, 0x52) +#define GEN8_3DSTATE_WM_HZ_OP GEN4_3D(3, 0, 0x52) -#define GEN8_3DSTATE_VF_INSTANCING GEN6_3D(3, 0, 0x49) +#define GEN8_3DSTATE_VF_INSTANCING GEN4_3D(3, 0, 0x49) # define GEN8_SBE_FORCE_URB_ENTRY_READ_LENGTH (1 << 29) # define GEN8_SBE_FORCE_URB_ENTRY_READ_OFFSET (1 << 28) # 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_3DSTATE_SBE_SWIZ GEN4_3D(3, 0, 0x51) +#define GEN8_3DSTATE_RASTER GEN4_3D(3, 0, 0x50) # define GEN8_RASTER_FRONT_WINDING_CCW (1 << 21) # define GEN8_RASTER_CULL_NONE (1 << 16) @@ -28,34 +28,34 @@ # define GEN8_VS_FLOATING_POINT_MODE_ALTERNATE (1 << 16) #define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP \ - GEN6_3D(3, 0, 0x21) -#define GEN8_3DSTATE_PS_BLEND GEN6_3D(3, 0, 0x4d) + GEN4_3D(3, 0, 0x21) +#define GEN8_3DSTATE_PS_BLEND GEN4_3D(3, 0, 0x4d) # define GEN8_PS_BLEND_HAS_WRITEABLE_RT (1 << 30) -#define GEN8_3DSTATE_WM_DEPTH_STENCIL GEN6_3D(3, 0, 0x4e) -#define GEN8_3DSTATE_PS_EXTRA GEN6_3D(3,0, 0x4f) +#define GEN8_3DSTATE_WM_DEPTH_STENCIL GEN4_3D(3, 0, 0x4e) +#define GEN8_3DSTATE_PS_EXTRA GEN4_3D(3, 0, 0x4f) # define GEN8_PSX_PIXEL_SHADER_VALID (1 << 31) # define GEN8_PSX_ATTRIBUTE_ENABLE (1 << 8) -#define GEN8_3DSTATE_DS_STATE_POINTERS GEN6_3D(3, 0, 0x25) +#define GEN8_3DSTATE_DS_STATE_POINTERS GEN4_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_SAMPLER_STATE_POINTERS_HS GEN4_3D(3, 0, 0x2c) +#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS GEN4_3D(3, 0, 0x2d) -#define GEN8_3DSTATE_VF GEN6_3D(3, 0, 0x0c) -#define GEN8_3DSTATE_VF_TOPOLOGY GEN6_3D(3, 0, 0x4b) +#define GEN8_3DSTATE_VF GEN4_3D(3, 0, 0x0c) +#define GEN8_3DSTATE_VF_TOPOLOGY GEN4_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 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_BIND_TABLE_POOL_ALLOC GEN4_3D(3, 1, 0x19) +#define GEN8_3DSTATE_GATHER_POOL_ALLOC GEN4_3D(3, 1, 0x1a) +#define GEN8_3DSTATE_DX9_CONSTANT_BUFFER_POOL_ALLOC GEN4_3D(3, 1, 0x1b) +#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS GEN4_3D(3, 1, 0x13) +#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS GEN4_3D(3, 1, 0x14) +#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS GEN4_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_SAMPLER_PALETTE_LOAD0 GEN6_3D(3, 1, 0x02) -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 GEN6_3D(3, 1, 0x0c) +#define GEN8_3DSTATE_VF_SGVS GEN4_3D(3, 0, 0x4a) +#define GEN8_3DSTATE_SO_DECL_LIST GEN4_3D(3, 1, 0x17) +#define GEN8_3DSTATE_SO_BUFFER GEN4_3D(3, 1, 0x18) +#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 GEN4_3D(3, 1, 0x02) +#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 GEN4_3D(3, 1, 0x0c) /* Some random bits that we care about */ #define GEN8_VB0_BUFFER_ADDR_MOD_EN (1 << 14) -- cgit v1.2.3