diff options
author | Lucas Stach <[email protected]> | 2017-09-29 14:17:41 +0200 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2017-10-10 12:32:24 +0200 |
commit | ca949e00d803abd7500192cc4804e77763c0aff3 (patch) | |
tree | 3866c5f15a1b87a8ca8c9515efb6f54eb3dbb22a /src/gallium | |
parent | 0ab59f120b40191c60489ebc5383d6a886697c40 (diff) |
etnaviv: update HW headers and fix provoking vertex
Now that the real meaning of the 2 bits in PA_SYSTEM_MODE is known,
we can set them according to the rasterizer state, which fixes uses
that are setting provoking vertex first.
Signed-off-by: Lucas Stach <[email protected]>
Reviewed-by: Wladimir J. van der Laan <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_rasterizer.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/hw/cmdstream.xml.h | 8 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/hw/common.xml.h | 18 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/hw/isa.xml.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/hw/state.xml.h | 14 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/hw/state_3d.xml.h | 67 |
6 files changed, 67 insertions, 47 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c b/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c index 56f2735e8a1..c8627b1a9ab 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c @@ -61,7 +61,8 @@ etna_rasterizer_state_create(struct pipe_context *pctx, /* XXX anything else? */ /* XXX bottom_edge_rule */ cs->PA_SYSTEM_MODE = - COND(so->half_pixel_center, VIVS_PA_SYSTEM_MODE_UNK0 | VIVS_PA_SYSTEM_MODE_UNK4); + COND(!so->flatshade_first, VIVS_PA_SYSTEM_MODE_PROVOKING_VERTEX_LAST) | + COND(so->half_pixel_center, VIVS_PA_SYSTEM_MODE_HALF_PIXEL_CENTER); /* so->scissor overrides the scissor, defaulting to the whole framebuffer, * with the scissor state */ diff --git a/src/gallium/drivers/etnaviv/hw/cmdstream.xml.h b/src/gallium/drivers/etnaviv/hw/cmdstream.xml.h index d4da03016ea..f8d76b01058 100644 --- a/src/gallium/drivers/etnaviv/hw/cmdstream.xml.h +++ b/src/gallium/drivers/etnaviv/hw/cmdstream.xml.h @@ -8,11 +8,11 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- cmdstream.xml ( 14313 bytes, from 2016-11-17 18:46:23) -- copyright.xml ( 1597 bytes, from 2016-10-29 07:29:22) -- common.xml ( 23473 bytes, from 2017-01-07 14:27:54) +- cmdstream.xml ( 15289 bytes, from 2017-09-29 11:52:39) +- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) +- common.xml ( 23529 bytes, from 2017-09-29 11:52:39) -Copyright (C) 2012-2016 by the following authors: +Copyright (C) 2012-2017 by the following authors: - Wladimir J. van der Laan <[email protected]> - Christian Gmeiner <[email protected]> - Lucas Stach <[email protected]> diff --git a/src/gallium/drivers/etnaviv/hw/common.xml.h b/src/gallium/drivers/etnaviv/hw/common.xml.h index 8b73fd81289..85c4990b61a 100644 --- a/src/gallium/drivers/etnaviv/hw/common.xml.h +++ b/src/gallium/drivers/etnaviv/hw/common.xml.h @@ -8,13 +8,13 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- state.xml ( 19930 bytes, from 2017-01-07 14:27:54) -- common.xml ( 23473 bytes, from 2017-01-07 14:27:54) -- state_hi.xml ( 26403 bytes, from 2017-01-07 14:27:54) -- copyright.xml ( 1597 bytes, from 2016-10-29 07:29:22) -- state_2d.xml ( 51552 bytes, from 2016-10-29 07:29:22) -- state_3d.xml ( 66964 bytes, from 2017-04-13 12:38:05) -- state_vg.xml ( 5975 bytes, from 2016-10-29 07:29:22) +- state.xml ( 20229 bytes, from 2017-09-29 11:52:39) +- common.xml ( 23529 bytes, from 2017-09-29 11:52:39) +- state_hi.xml ( 26403 bytes, from 2017-03-09 15:43:43) +- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) +- state_2d.xml ( 51552 bytes, from 2016-12-08 16:37:56) +- state_3d.xml ( 68429 bytes, from 2017-09-29 11:55:19) +- state_vg.xml ( 5975 bytes, from 2016-12-08 16:37:56) Copyright (C) 2012-2017 by the following authors: - Wladimir J. van der Laan <[email protected]> @@ -247,7 +247,7 @@ DEALINGS IN THE SOFTWARE. #define chipMinorFeatures3_UNK24 0x01000000 #define chipMinorFeatures3_UNK25 0x02000000 #define chipMinorFeatures3_NEW_HZ 0x04000000 -#define chipMinorFeatures3_UNK27 0x08000000 +#define chipMinorFeatures3_PE_DITHER_FIX 0x08000000 #define chipMinorFeatures3_UNK28 0x10000000 #define chipMinorFeatures3_SH_ENHANCEMENTS3 0x20000000 #define chipMinorFeatures3_UNK30 0x40000000 @@ -269,7 +269,7 @@ DEALINGS IN THE SOFTWARE. #define chipMinorFeatures4_UNK14 0x00004000 #define chipMinorFeatures4_UNK15 0x00008000 #define chipMinorFeatures4_HALTI2 0x00010000 -#define chipMinorFeatures4_UNK17 0x00020000 +#define chipMinorFeatures4_2D_MIRROR_EXTENSION 0x00020000 #define chipMinorFeatures4_SMALL_MSAA 0x00040000 #define chipMinorFeatures4_UNK19 0x00080000 #define chipMinorFeatures4_NEW_RA 0x00100000 diff --git a/src/gallium/drivers/etnaviv/hw/isa.xml.h b/src/gallium/drivers/etnaviv/hw/isa.xml.h index 31706807e3d..35a050e2156 100644 --- a/src/gallium/drivers/etnaviv/hw/isa.xml.h +++ b/src/gallium/drivers/etnaviv/hw/isa.xml.h @@ -8,8 +8,8 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- isa.xml ( 34392 bytes, from 2017-04-13 12:44:36) -- copyright.xml ( 1597 bytes, from 2016-10-29 07:29:22) +- isa.xml ( 34708 bytes, from 2017-09-29 11:52:39) +- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) Copyright (C) 2012-2017 by the following authors: - Wladimir J. van der Laan <[email protected]> diff --git a/src/gallium/drivers/etnaviv/hw/state.xml.h b/src/gallium/drivers/etnaviv/hw/state.xml.h index 2b278e0fffb..bd82218a3d7 100644 --- a/src/gallium/drivers/etnaviv/hw/state.xml.h +++ b/src/gallium/drivers/etnaviv/hw/state.xml.h @@ -8,13 +8,13 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- state.xml ( 19930 bytes, from 2017-01-07 14:27:54) -- common.xml ( 23473 bytes, from 2017-01-07 14:27:54) -- state_hi.xml ( 26403 bytes, from 2017-01-07 14:27:54) -- copyright.xml ( 1597 bytes, from 2016-10-29 07:29:22) -- state_2d.xml ( 51552 bytes, from 2016-10-29 07:29:22) -- state_3d.xml ( 66964 bytes, from 2017-04-13 12:38:05) -- state_vg.xml ( 5975 bytes, from 2016-10-29 07:29:22) +- state.xml ( 20229 bytes, from 2017-09-29 11:52:39) +- common.xml ( 23529 bytes, from 2017-09-29 11:52:39) +- state_hi.xml ( 26403 bytes, from 2017-03-09 15:43:43) +- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) +- state_2d.xml ( 51552 bytes, from 2016-12-08 16:37:56) +- state_3d.xml ( 68429 bytes, from 2017-09-29 11:55:19) +- state_vg.xml ( 5975 bytes, from 2016-12-08 16:37:56) Copyright (C) 2012-2017 by the following authors: - Wladimir J. van der Laan <[email protected]> diff --git a/src/gallium/drivers/etnaviv/hw/state_3d.xml.h b/src/gallium/drivers/etnaviv/hw/state_3d.xml.h index 4a632e3dbc0..b025117c0da 100644 --- a/src/gallium/drivers/etnaviv/hw/state_3d.xml.h +++ b/src/gallium/drivers/etnaviv/hw/state_3d.xml.h @@ -8,13 +8,13 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- state.xml ( 19930 bytes, from 2017-01-07 14:27:54) -- common.xml ( 23473 bytes, from 2017-01-07 14:27:54) -- state_hi.xml ( 26403 bytes, from 2017-01-07 14:27:54) -- copyright.xml ( 1597 bytes, from 2016-10-29 07:29:22) -- state_2d.xml ( 51552 bytes, from 2016-10-29 07:29:22) -- state_3d.xml ( 67197 bytes, from 2017-07-23 10:53:21) -- state_vg.xml ( 5975 bytes, from 2016-10-29 07:29:22) +- state.xml ( 20229 bytes, from 2017-09-29 11:52:39) +- common.xml ( 23529 bytes, from 2017-09-29 11:52:39) +- state_hi.xml ( 26403 bytes, from 2017-03-09 15:43:43) +- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) +- state_2d.xml ( 51552 bytes, from 2016-12-08 16:37:56) +- state_3d.xml ( 68429 bytes, from 2017-09-29 11:55:19) +- state_vg.xml ( 5975 bytes, from 2016-12-08 16:37:56) Copyright (C) 2012-2017 by the following authors: - Wladimir J. van der Laan <[email protected]> @@ -88,17 +88,17 @@ DEALINGS IN THE SOFTWARE. #define RS_FORMAT_A8R8G8B8 0x00000006 #define RS_FORMAT_YUY2 0x00000007 #define RS_FORMAT_R16F 0x00000011 -#define RS_FORMAT_X16R16F 0x00000012 -#define RS_FORMAT_X16B16G16R16F 0x00000013 +#define RS_FORMAT_G16R16F 0x00000012 +#define RS_FORMAT_A16B16G16R16F 0x00000013 #define RS_FORMAT_R32F 0x00000014 -#define RS_FORMAT_X32R32F 0x00000015 +#define RS_FORMAT_G32R32F 0x00000015 #define RS_FORMAT_A2B10G10R10 0x00000016 #define RS_FORMAT_R8I 0x00000017 -#define RS_FORMAT_X8R8I 0x00000018 -#define RS_FORMAT_X8B8G8R8I 0x00000019 +#define RS_FORMAT_G8R8I 0x00000018 +#define RS_FORMAT_A8B8G8R8I 0x00000019 #define RS_FORMAT_R16I 0x0000001a -#define RS_FORMAT_X16R16I 0x0000001b -#define RS_FORMAT_X16B16G16R16I 0x0000001c +#define RS_FORMAT_G16R16I 0x0000001b +#define RS_FORMAT_A16B16G16R16I 0x0000001c #define RS_FORMAT_B10G11R11F 0x0000001d #define RS_FORMAT_A2B10G10R10UI 0x0000001e #define RS_FORMAT_G8R8 0x0000001f @@ -132,11 +132,11 @@ DEALINGS IN THE SOFTWARE. #define TEXTURE_FORMAT_EXT_RG11_EAC 0x00000004 #define TEXTURE_FORMAT_EXT_SIGNED_RG11_EAC 0x00000005 #define TEXTURE_FORMAT_EXT_G8R8 0x00000006 -#define TEXTURE_FORMAT_EXT_A16F 0x00000007 -#define TEXTURE_FORMAT_EXT_A16L16F 0x00000008 +#define TEXTURE_FORMAT_EXT_R16F 0x00000007 +#define TEXTURE_FORMAT_EXT_G16R16F 0x00000008 #define TEXTURE_FORMAT_EXT_A16B16G16R16F 0x00000009 -#define TEXTURE_FORMAT_EXT_A32F 0x0000000a -#define TEXTURE_FORMAT_EXT_A32L32F 0x0000000b +#define TEXTURE_FORMAT_EXT_R32F 0x0000000a +#define TEXTURE_FORMAT_EXT_G32R32F 0x0000000b #define TEXTURE_FORMAT_EXT_A2B10G10R10 0x0000000c #define TEXTURE_FORMAT_EXT_SIGNED_R11_EAC 0x0000000d #define TEXTURE_FORMAT_EXT_R8_SNORM 0x0000000e @@ -157,7 +157,9 @@ DEALINGS IN THE SOFTWARE. #define TEXTURE_FILTER_LINEAR 0x00000002 #define TEXTURE_FILTER_ANISOTROPIC 0x00000003 #define TEXTURE_TYPE_NONE 0x00000000 +#define TEXTURE_TYPE_1D 0x00000001 #define TEXTURE_TYPE_2D 0x00000002 +#define TEXTURE_TYPE_3D 0x00000003 #define TEXTURE_TYPE_CUBE_MAP 0x00000005 #define TEXTURE_WRAPMODE_REPEAT 0x00000000 #define TEXTURE_WRAPMODE_MIRRORED_REPEAT 0x00000001 @@ -410,8 +412,8 @@ DEALINGS IN THE SOFTWARE. #define VIVS_PA_POINT_SIZE 0x00000a1c #define VIVS_PA_SYSTEM_MODE 0x00000a28 -#define VIVS_PA_SYSTEM_MODE_UNK0 0x00000001 -#define VIVS_PA_SYSTEM_MODE_UNK4 0x00000010 +#define VIVS_PA_SYSTEM_MODE_PROVOKING_VERTEX_LAST 0x00000001 +#define VIVS_PA_SYSTEM_MODE_HALF_PIXEL_CENTER 0x00000010 #define VIVS_PA_W_CLIP_LIMIT 0x00000a2c @@ -985,15 +987,13 @@ DEALINGS IN THE SOFTWARE. #define VIVS_RS_EXTRA_CONFIG_UNK20 0x00100000 #define VIVS_RS_EXTRA_CONFIG_UNK28 0x10000000 -#define VIVS_RS_UNK016B0 0x000016b0 +#define VIVS_RS_KICKER_INPLACE 0x000016b0 #define VIVS_RS_UNK016B4 0x000016b4 #define VIVS_RS_SINGLE_BUFFER 0x000016b8 #define VIVS_RS_SINGLE_BUFFER_ENABLE 0x00000001 -#define VIVS_RS_UNK016BC 0x000016bc - #define VIVS_RS_PIPE(i0) (0x00000000 + 0x4*(i0)) #define VIVS_RS_PIPE__ESIZE 0x00000004 #define VIVS_RS_PIPE__LEN 0x00000008 @@ -1055,6 +1055,8 @@ DEALINGS IN THE SOFTWARE. #define VIVS_TS_HDEPTH_SIZE 0x000016ac +#define VIVS_TS_COLOR_CLEAR_VALUE_EXT 0x000016bc + #define VIVS_TS_SAMPLER(i0) (0x00000000 + 0x4*(i0)) #define VIVS_TS_SAMPLER__ESIZE 0x00000004 #define VIVS_TS_SAMPLER__LEN 0x00000008 @@ -1162,6 +1164,8 @@ DEALINGS IN THE SOFTWARE. #define VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__MASK 0x000ffc00 #define VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT 10 #define VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT(x) (((x) << VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT) & VIVS_TE_SAMPLER_LOG_SIZE_HEIGHT__MASK) +#define VIVS_TE_SAMPLER_LOG_SIZE_RGB 0x20000000 +#define VIVS_TE_SAMPLER_LOG_SIZE_SRGB 0x80000000 #define VIVS_TE_SAMPLER_LOD_CONFIG(i0) (0x000020c0 + 0x4*(i0)) #define VIVS_TE_SAMPLER_LOD_CONFIG_BIAS_ENABLE 0x00000001 @@ -1179,7 +1183,16 @@ DEALINGS IN THE SOFTWARE. #define VIVS_TE_SAMPLER_UNK02140(i0) (0x00002140 + 0x4*(i0)) -#define VIVS_TE_SAMPLER_UNK02180(i0) (0x00002180 + 0x4*(i0)) +#define VIVS_TE_SAMPLER_3D_CONFIG(i0) (0x00002180 + 0x4*(i0)) +#define VIVS_TE_SAMPLER_3D_CONFIG_DEPTH__MASK 0x00003fff +#define VIVS_TE_SAMPLER_3D_CONFIG_DEPTH__SHIFT 0 +#define VIVS_TE_SAMPLER_3D_CONFIG_DEPTH(x) (((x) << VIVS_TE_SAMPLER_3D_CONFIG_DEPTH__SHIFT) & VIVS_TE_SAMPLER_3D_CONFIG_DEPTH__MASK) +#define VIVS_TE_SAMPLER_3D_CONFIG_LOG_DEPTH__MASK 0x03ff0000 +#define VIVS_TE_SAMPLER_3D_CONFIG_LOG_DEPTH__SHIFT 16 +#define VIVS_TE_SAMPLER_3D_CONFIG_LOG_DEPTH(x) (((x) << VIVS_TE_SAMPLER_3D_CONFIG_LOG_DEPTH__SHIFT) & VIVS_TE_SAMPLER_3D_CONFIG_LOG_DEPTH__MASK) +#define VIVS_TE_SAMPLER_3D_CONFIG_WRAP__MASK 0x30000000 +#define VIVS_TE_SAMPLER_3D_CONFIG_WRAP__SHIFT 28 +#define VIVS_TE_SAMPLER_3D_CONFIG_WRAP(x) (((x) << VIVS_TE_SAMPLER_3D_CONFIG_WRAP__SHIFT) & VIVS_TE_SAMPLER_3D_CONFIG_WRAP__MASK) #define VIVS_TE_SAMPLER_CONFIG1(i0) (0x000021c0 + 0x4*(i0)) #define VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT__MASK 0x0000001f @@ -1210,6 +1223,10 @@ DEALINGS IN THE SOFTWARE. #define VIVS_TE_SAMPLER_LOD_ADDR__ESIZE 0x00000040 #define VIVS_TE_SAMPLER_LOD_ADDR__LEN 0x0000000e +#define VIVS_TE_SAMPLER_UNK02C00(i0, i1) (0x00002c00 + 0x4*(i0) + 0x40*(i1)) +#define VIVS_TE_SAMPLER_UNK02C00__ESIZE 0x00000040 +#define VIVS_TE_SAMPLER_UNK02C00__LEN 0x0000000e + #define VIVS_NTE 0x00000000 #define VIVS_NTE_SAMPLER(i0) (0x00000000 + 0x4*(i0)) @@ -1261,6 +1278,8 @@ DEALINGS IN THE SOFTWARE. #define VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__MASK 0x000ffc00 #define VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT 10 #define VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT(x) (((x) << VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__SHIFT) & VIVS_NTE_SAMPLER_LOG_SIZE_HEIGHT__MASK) +#define VIVS_NTE_SAMPLER_LOG_SIZE_RGB 0x20000000 +#define VIVS_NTE_SAMPLER_LOG_SIZE_SRGB 0x80000000 #define VIVS_NTE_SAMPLER_LOD_CONFIG(i0) (0x00010180 + 0x4*(i0)) #define VIVS_NTE_SAMPLER_LOD_CONFIG_BIAS_ENABLE 0x00000001 |