diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-09-10 13:33:41 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-09-10 13:33:41 +0200 |
commit | f688359ba004407d918177c149cbee3d9be7b209 (patch) | |
tree | 93aedcef78ff566586e67d90fee83a22cb93f509 | |
parent | 4715034c2763eaf83e0dc54ebeb07cd0bce48427 (diff) |
driver: Set up early depth
And some documentation changes.
-rw-r--r-- | native/driver/etna_internal.h | 1 | ||||
-rw-r--r-- | native/driver/etna_pipe.c | 2 | ||||
-rw-r--r-- | native/etnaviv/cmdstream.xml.h | 4 | ||||
-rw-r--r-- | native/etnaviv/common.xml.h | 12 | ||||
-rw-r--r-- | native/etnaviv/isa.xml.h | 2 | ||||
-rw-r--r-- | native/etnaviv/state.xml.h | 12 | ||||
-rw-r--r-- | native/etnaviv/state_2d.xml.h | 12 | ||||
-rw-r--r-- | native/etnaviv/state_3d.xml.h | 14 | ||||
-rw-r--r-- | native/etnaviv/state_hi.xml.h | 14 | ||||
-rw-r--r-- | native/etnaviv/state_vg.xml.h | 12 | ||||
-rw-r--r-- | native/etnaviv/viv_profile.h | 2 | ||||
-rw-r--r-- | rnndb/state_3d.xml | 2 | ||||
-rw-r--r-- | rnndb/state_hi.xml | 4 | ||||
-rw-r--r-- | tools/data/viv_gallium_state.txt | 1 |
14 files changed, 51 insertions, 43 deletions
diff --git a/native/driver/etna_internal.h b/native/driver/etna_internal.h index ca3e58f..f23e889 100644 --- a/native/driver/etna_internal.h +++ b/native/driver/etna_internal.h @@ -332,6 +332,7 @@ struct etna_3d_state uint32_t /*00E00*/ RA_CONTROL; uint32_t /*00E04*/ RA_MULTISAMPLE_UNK00E04; + uint32_t /*00E08*/ RA_EARLY_DEPTH; uint32_t /*00E10*/ RA_MULTISAMPLE_UNK00E10[VIVS_RA_MULTISAMPLE_UNK00E10__LEN]; uint32_t /*00E40*/ RA_CENTROID_TABLE[VIVS_RA_CENTROID_TABLE__LEN]; diff --git a/native/driver/etna_pipe.c b/native/driver/etna_pipe.c index 70aab30..d2d8dc3 100644 --- a/native/driver/etna_pipe.c +++ b/native/driver/etna_pipe.c @@ -172,6 +172,7 @@ static void reset_context(struct pipe_context *restrict pipe) /*00C18*/ EMIT_STATE(SE_CONFIG, SE_CONFIG); /*00E00*/ EMIT_STATE(RA_CONTROL, RA_CONTROL); /*00E04*/ EMIT_STATE(RA_MULTISAMPLE_UNK00E04, RA_MULTISAMPLE_UNK00E04); + /*00E08*/ EMIT_STATE(RA_EARLY_DEPTH, RA_EARLY_DEPTH); for(int x=0; x<4; ++x) { /*00E10*/ EMIT_STATE(RA_MULTISAMPLE_UNK00E10(x), RA_MULTISAMPLE_UNK00E10[x]); @@ -1271,6 +1272,7 @@ struct pipe_context *etna_new_pipe_context(struct viv_conn *dev, const struct et ectx->gpu3d.PA_W_CLIP_LIMIT = 0x34000001; ectx->gpu3d.GL_VERTEX_ELEMENT_CONFIG = 0x1; ectx->gpu3d.GL_API_MODE = VIVS_GL_API_MODE_OPENGL; + ectx->gpu3d.RA_EARLY_DEPTH = 0x00000031; /* enable */ /* fill in vtable entries one by one */ pc->destroy = etna_pipe_destroy; diff --git a/native/etnaviv/cmdstream.xml.h b/native/etnaviv/cmdstream.xml.h index f96d5b2..5d57b33 100644 --- a/native/etnaviv/cmdstream.xml.h +++ b/native/etnaviv/cmdstream.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: -- /home/orion/projects/etna_viv/rnndb/cmdstream.xml ( 12591 bytes, from 2013-08-12 07:48:56) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) +- /home/orion/projects/etna_viv/rnndb/cmdstream.xml ( 12589 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ diff --git a/native/etnaviv/common.xml.h b/native/etnaviv/common.xml.h index bf28793..fe2d503 100644 --- a/native/etnaviv/common.xml.h +++ b/native/etnaviv/common.xml.h @@ -8,12 +8,12 @@ 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: -- /home/orion/projects/etna_viv/rnndb/state.xml ( 17973 bytes, from 2013-08-13 20:21:24) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) -- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21543 bytes, from 2013-08-07 09:21:45) -- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51089 bytes, from 2013-08-14 09:57:40) -- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54011 bytes, from 2013-08-09 06:55:20) -- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-08-13 20:21:24) +- /home/orion/projects/etna_viv/rnndb/state.xml ( 18253 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21682 bytes, from 2013-09-10 09:11:57) +- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54038 bytes, from 2013-09-10 11:31:44) +- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ diff --git a/native/etnaviv/isa.xml.h b/native/etnaviv/isa.xml.h index c5a189b..9182782 100644 --- a/native/etnaviv/isa.xml.h +++ b/native/etnaviv/isa.xml.h @@ -8,7 +8,7 @@ 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: -- /home/orion/projects/etna_viv/rnndb/isa.xml ( 19384 bytes, from 2013-07-31 04:32:39) +- /home/orion/projects/etna_viv/rnndb/isa.xml ( 19334 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ diff --git a/native/etnaviv/state.xml.h b/native/etnaviv/state.xml.h index 47d45bd..66c5b59 100644 --- a/native/etnaviv/state.xml.h +++ b/native/etnaviv/state.xml.h @@ -8,12 +8,12 @@ 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: -- /home/orion/projects/etna_viv/rnndb/state.xml ( 17973 bytes, from 2013-08-13 20:21:24) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) -- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21543 bytes, from 2013-08-07 09:21:45) -- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51089 bytes, from 2013-08-14 09:57:40) -- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54011 bytes, from 2013-08-09 06:55:20) -- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-08-13 20:21:24) +- /home/orion/projects/etna_viv/rnndb/state.xml ( 18253 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21682 bytes, from 2013-09-10 09:11:57) +- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54038 bytes, from 2013-09-10 11:31:44) +- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ diff --git a/native/etnaviv/state_2d.xml.h b/native/etnaviv/state_2d.xml.h index 2b751f8..090c092 100644 --- a/native/etnaviv/state_2d.xml.h +++ b/native/etnaviv/state_2d.xml.h @@ -8,12 +8,12 @@ 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: -- /home/orion/projects/etna_viv/rnndb/state.xml ( 17973 bytes, from 2013-08-13 20:21:24) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) -- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21543 bytes, from 2013-08-07 09:21:45) -- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51089 bytes, from 2013-08-14 09:57:40) -- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54011 bytes, from 2013-08-09 06:55:20) -- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-08-13 20:21:24) +- /home/orion/projects/etna_viv/rnndb/state.xml ( 18253 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21682 bytes, from 2013-09-10 09:11:57) +- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54038 bytes, from 2013-09-10 11:31:44) +- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ diff --git a/native/etnaviv/state_3d.xml.h b/native/etnaviv/state_3d.xml.h index 2d49f6e..d0978f3 100644 --- a/native/etnaviv/state_3d.xml.h +++ b/native/etnaviv/state_3d.xml.h @@ -8,12 +8,12 @@ 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: -- /home/orion/projects/etna_viv/rnndb/state.xml ( 17973 bytes, from 2013-08-13 20:21:24) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) -- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21543 bytes, from 2013-08-07 09:21:45) -- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51089 bytes, from 2013-08-14 09:57:40) -- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54011 bytes, from 2013-08-09 06:55:20) -- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-08-13 20:21:24) +- /home/orion/projects/etna_viv/rnndb/state.xml ( 18253 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21682 bytes, from 2013-09-10 09:11:57) +- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54038 bytes, from 2013-09-10 11:31:44) +- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ @@ -416,7 +416,7 @@ Copyright (C) 2013 #define VIVS_RA_MULTISAMPLE_UNK00E04 0x00000e04 -#define VIVS_RA_DEPTH_UNK00E08 0x00000e08 +#define VIVS_RA_EARLY_DEPTH 0x00000e08 #define VIVS_RA_MULTISAMPLE_UNK00E10(i0) (0x00000e10 + 0x4*(i0)) #define VIVS_RA_MULTISAMPLE_UNK00E10__ESIZE 0x00000004 diff --git a/native/etnaviv/state_hi.xml.h b/native/etnaviv/state_hi.xml.h index d1a0b64..06e5263 100644 --- a/native/etnaviv/state_hi.xml.h +++ b/native/etnaviv/state_hi.xml.h @@ -8,12 +8,12 @@ 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: -- /home/orion/projects/etna_viv/rnndb/state.xml ( 17973 bytes, from 2013-08-13 20:21:24) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) -- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21543 bytes, from 2013-08-07 09:21:45) -- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51089 bytes, from 2013-08-14 09:57:40) -- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54011 bytes, from 2013-08-09 06:55:20) -- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-08-13 20:21:24) +- /home/orion/projects/etna_viv/rnndb/state.xml ( 18253 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21682 bytes, from 2013-09-10 09:11:57) +- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54038 bytes, from 2013-09-10 11:31:44) +- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ @@ -285,6 +285,7 @@ Copyright (C) 2013 #define VIVS_MC_PROFILE_CONFIG0_PE_RESET 0x000f0000 #define VIVS_MC_PROFILE_CONFIG0_SH__MASK 0x0f000000 #define VIVS_MC_PROFILE_CONFIG0_SH__SHIFT 24 +#define VIVS_MC_PROFILE_CONFIG0_SH_SHADER_CYCLES 0x04000000 #define VIVS_MC_PROFILE_CONFIG0_SH_PS_INST_COUNTER 0x07000000 #define VIVS_MC_PROFILE_CONFIG0_SH_RENDERED_PIXEL_COUNTER 0x08000000 #define VIVS_MC_PROFILE_CONFIG0_SH_VS_INST_COUNTER 0x09000000 @@ -318,6 +319,7 @@ Copyright (C) 2013 #define VIVS_MC_PROFILE_CONFIG1_RA_TOTAL_PRIMITIVE_COUNT 0x00030000 #define VIVS_MC_PROFILE_CONFIG1_RA_PIPE_CACHE_MISS_COUNTER 0x00090000 #define VIVS_MC_PROFILE_CONFIG1_RA_PREFETCH_CACHE_MISS_COUNTER 0x000a0000 +#define VIVS_MC_PROFILE_CONFIG1_RA_CULLED_QUAD_COUNT 0x000b0000 #define VIVS_MC_PROFILE_CONFIG1_RA_RESET 0x000f0000 #define VIVS_MC_PROFILE_CONFIG1_TX__MASK 0x0f000000 #define VIVS_MC_PROFILE_CONFIG1_TX__SHIFT 24 diff --git a/native/etnaviv/state_vg.xml.h b/native/etnaviv/state_vg.xml.h index f13e360..f8fad7f 100644 --- a/native/etnaviv/state_vg.xml.h +++ b/native/etnaviv/state_vg.xml.h @@ -8,12 +8,12 @@ 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: -- /home/orion/projects/etna_viv/rnndb/state.xml ( 17973 bytes, from 2013-08-13 20:21:24) -- /home/orion/projects/etna_viv/rnndb/common.xml ( 16005 bytes, from 2013-08-12 13:59:19) -- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21543 bytes, from 2013-08-07 09:21:45) -- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51089 bytes, from 2013-08-14 09:57:40) -- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54011 bytes, from 2013-08-09 06:55:20) -- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-08-13 20:21:24) +- /home/orion/projects/etna_viv/rnndb/state.xml ( 18253 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/common.xml ( 16543 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_hi.xml ( 21682 bytes, from 2013-09-10 09:11:57) +- /home/orion/projects/etna_viv/rnndb/state_2d.xml ( 51058 bytes, from 2013-09-01 10:53:22) +- /home/orion/projects/etna_viv/rnndb/state_3d.xml ( 54038 bytes, from 2013-09-10 11:31:44) +- /home/orion/projects/etna_viv/rnndb/state_vg.xml ( 5942 bytes, from 2013-09-01 10:53:22) Copyright (C) 2013 */ diff --git a/native/etnaviv/viv_profile.h b/native/etnaviv/viv_profile.h index 40a2abf..0d3033f 100644 --- a/native/etnaviv/viv_profile.h +++ b/native/etnaviv/viv_profile.h @@ -42,7 +42,7 @@ enum viv_profile_counter VIV_PROF_RA_TOTAL_PRIMITIVE_COUNT = 31, /* RA debug reg 3 */ VIV_PROF_RA_PIPE_CACHE_MISS_COUNTER = 32, /* RA debug reg 9 */ VIV_PROF_RA_PREFETCH_CACHE_MISS_COUNTER = 33, /* RA debug reg A */ - VIV_PROF_RA_EEZ_CULLED_COUNTER = 34, /* never set in kernel */ + VIV_PROF_RA_EEZ_CULLED_COUNTER = 34, /* RA debug reg B */ VIV_PROF_TX_TOTAL_BILINEAR_REQUESTS = 35, /* TX debug reg 0 */ VIV_PROF_TX_TOTAL_TRILINEAR_REQUESTS = 36, /* TX debug reg 1 */ VIV_PROF_TX_TOTAL_DISCARDED_TEXTURE_REQUESTS = 37, /* TX debug reg 2 */ diff --git a/rnndb/state_3d.xml b/rnndb/state_3d.xml index 29831b3..5892393 100644 --- a/rnndb/state_3d.xml +++ b/rnndb/state_3d.xml @@ -384,7 +384,7 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> <bitfield pos="1" name="LAST_VARYING_2X" brief="Last varying has 1 or 2 components"></bitfield> </reg32> <reg32 offset="0x00E04" name="MULTISAMPLE_UNK00E04" value="0x00000000"/> - <reg32 offset="0x00E08" name="DEPTH_UNK00E08" value="0x00000031"/> + <reg32 offset="0x00E08" name="EARLY_DEPTH" value="0x00000031" brief="Early depth control"/> <reg32 offset="0x00E10" name="MULTISAMPLE_UNK00E10" value="0x00000000" length="4" stride="4"/> <reg32 offset="0x00E40" name="CENTROID_TABLE" value="0x00000000" length="16" stride="4"/> </stripe> diff --git a/rnndb/state_hi.xml b/rnndb/state_hi.xml index 338995f..1e5e51d 100644 --- a/rnndb/state_hi.xml +++ b/rnndb/state_hi.xml @@ -257,6 +257,7 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> <value value="15" name="RESET"/> </bitfield> <bitfield high="27" low="24" name="SH"> + <value value="4" name="SHADER_CYCLES"/> <value value="7" name="PS_INST_COUNTER"/> <value value="8" name="RENDERED_PIXEL_COUNTER"/> <value value="9" name="VS_INST_COUNTER"/> @@ -292,9 +293,10 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> <value value="0" name="VALID_PIXEL_COUNT"/> <value value="1" name="TOTAL_QUAD_COUNT"/> <value value="2" name="VALID_QUAD_COUNT_AFTER_EARLY_Z"/> - <value value="3" name="TOTAL_PRIMITIVE_COUNT"/> + <value value="3" name="TOTAL_PRIMITIVE_COUNT"/> <!-- input primitives --> <value value="9" name="PIPE_CACHE_MISS_COUNTER"/> <value value="10" name="PREFETCH_CACHE_MISS_COUNTER"/> + <value value="11" name="CULLED_QUAD_COUNT"/> <value value="15" name="RESET"/> </bitfield> <bitfield high="27" low="24" name="TX"> diff --git a/tools/data/viv_gallium_state.txt b/tools/data/viv_gallium_state.txt index 6983701..b0b2488 100644 --- a/tools/data/viv_gallium_state.txt +++ b/tools/data/viv_gallium_state.txt @@ -9,6 +9,7 @@ base_setup_state base_setup. ETNA_STATE_BASE_SETUP PA.W_CLIP_LIMIT GL.VERTEX_ELEMENT_CONFIG GL.API_MODE + RA.EARLY_DEPTH rasterizer_state rasterizer-> ETNA_STATE_RASTERIZER PA.CONFIG |