nvc0: identify POINT_RASTER_RULES, add POINT_SMOOTH state
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 13 Jan 2011 18:36:25 +0000 (19:36 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 13 Jan 2011 18:36:25 +0000 (19:36 +0100)
Point smoothing requires rasterization rules to be set to OGL.

Sorry for the extra noise caused by the header update.

src/gallium/drivers/nvc0/nvc0_3d.xml.h
src/gallium/drivers/nvc0/nvc0_screen.c
src/gallium/drivers/nvc0/nvc0_state.c
src/gallium/drivers/nvc0/nvc0_stateobj.h

index 702e58b2e3cb02efe999ac91f0e2d115fb2e966b..31302949d5ed2f81bc3a9666c036c55393c2fde4 100644 (file)
@@ -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:
-- nvc0_3d.xml    (  30401 bytes, from 2011-01-08 18:09:11)
+- nvc0_3d.xml    (  30827 bytes, from 2011-01-13 18:23:07)
 - copyright.xml  (   6452 bytes, from 2010-11-25 23:28:20)
 - nv_defs.xml    (   4437 bytes, from 2010-07-06 07:43:58)
 - nv_3ddefs.xml  (  16394 bytes, from 2010-12-17 15:10:40)
@@ -449,6 +449,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_3D_LINKED_TSC                                     0x00001234
 
+#define NVC0_3D_DRAW_TFB_BYTES                                 0x0000123c
+
 #define NVC0_3D_FP_RESULT_COUNT                                        0x00001298
 
 #define NVC0_3D_DEPTH_TEST_ENABLE                              0x000012cc
@@ -511,6 +513,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_ALPHA_TEST_FUNC_GEQUAL                         0x00000206
 #define NVC0_3D_ALPHA_TEST_FUNC_ALWAYS                         0x00000207
 
+#define NVC0_3D_DRAW_TFB_STRIDE                                        0x00001318
+#define NVC0_3D_DRAW_TFB_STRIDE__MIN                           0x00000001
+#define NVC0_3D_DRAW_TFB_STRIDE__MAX                           0x00000fff
+
 #define NVC0_3D_BLEND_COLOR(i0)                                       (0x0000131c + 0x4*(i0))
 #define NVC0_3D_BLEND_COLOR__ESIZE                             0x00000004
 #define NVC0_3D_BLEND_COLOR__LEN                               0x00000004
@@ -603,6 +609,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_3D_STENCIL_FRONT_FUNC_MASK                                0x0000139c
 
+#define NVC0_3D_DRAW_TFB_BASE                                  0x000013a4
+
 #define NVC0_3D_FRAG_COLOR_CLAMP_EN                            0x000013a8
 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_0                          0x00000001
 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_1                          0x00000010
@@ -613,7 +621,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_6                          0x01000000
 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_7                          0x10000000
 
-#define NVC0_3D_Y_ORIGIN_BOTTOM                                        0x000013ac
+#define NVC0_3D_SCREEN_Y_CONTROL                               0x000013ac
+#define NVC0_3D_SCREEN_Y_CONTROL_Y_NEGATE                      0x00000001
+#define NVC0_3D_SCREEN_Y_CONTROL_TRIANGLE_RAST_FLIP            0x00000010
 
 #define NVC0_3D_LINE_WIDTH                                     0x000013b0
 
@@ -621,7 +631,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_GP_VERTEX_OUTPUT_COUNT__MIN                    0x00000001
 #define NVC0_3D_GP_VERTEX_OUTPUT_COUNT__MAX                    0x00000400
 
-#define NVC0_3D_FENCE_UNK                                      0x0000142c
+#define NVC0_3D_VERTEX_ARRAY_FLUSH                             0x0000142c
 
 #define NVC0_3D_VB_ELEMENT_BASE                                        0x00001434
 
@@ -668,7 +678,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_COUNTER_RESET_UNK1E                            0x0000001e
 #define NVC0_3D_COUNTER_RESET_GENERATED_PRIMITIVES             0x0000001f
 
-#define NVC0_3D_MULTISAMPLE_ZETA_ENABLE                                0x00001534
+#define NVC0_3D_MULTISAMPLE_ENABLE                             0x00001534
 
 #define NVC0_3D_ZETA_ENABLE                                    0x00001538
 
@@ -747,7 +757,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_GEQUAL                  0x00000206
 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_ALWAYS                  0x00000207
 
-#define NVC0_3D_MULTISAMPLE_COLOR_ENABLE                       0x000015b4
+#define NVC0_3D_CSAA_ENABLE                                    0x000015b4
 
 #define NVC0_3D_FRAMEBUFFER_SRGB                               0x000015b8
 
@@ -849,6 +859,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_3D_POINT_SMOOTH_ENABLE                            0x00001658
 
+#define NVC0_3D_POINT_RASTER_RULES                             0x0000165c
+#define NVC0_3D_POINT_RASTER_RULES_OGL                         0x00000000
+#define NVC0_3D_POINT_RASTER_RULES_D3D                         0x00000001
+
 #define NVC0_3D_POINT_SPRITE_CTRL                              0x00001660
 
 #define NVC0_3D_TEX_MISC                                       0x00001664
@@ -1028,6 +1042,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_VERTEX_ARRAY_FETCH_STRIDE__SHIFT               0
 #define NVC0_3D_VERTEX_ARRAY_FETCH_ENABLE                      0x00001000
 
+#define NVC0_3D_VERTEX_ARRAY_START_HIGH(i0)                   (0x00001c04 + 0x10*(i0))
+#define NVC0_3D_VERTEX_ARRAY_START_HIGH__ESIZE                 0x00000010
+#define NVC0_3D_VERTEX_ARRAY_START_HIGH__LEN                   0x00000020
+
+#define NVC0_3D_VERTEX_ARRAY_START_LOW(i0)                    (0x00001c08 + 0x10*(i0))
+#define NVC0_3D_VERTEX_ARRAY_START_LOW__ESIZE                  0x00000010
+#define NVC0_3D_VERTEX_ARRAY_START_LOW__LEN                    0x00000020
+
 #define NVC0_3D_VERTEX_ARRAY_DIVISOR(i0)                      (0x00001c0c + 0x10*(i0))
 #define NVC0_3D_VERTEX_ARRAY_DIVISOR__ESIZE                    0x00000010
 #define NVC0_3D_VERTEX_ARRAY_DIVISOR__LEN                      0x00000020
@@ -1058,6 +1080,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_3D_IBLEND_FUNC_DST_ALPHA(i0)                     (0x00001e18 + 0x20*(i0))
 
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH(i0)                   (0x00001f00 + 0x8*(i0))
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH__ESIZE                 0x00000008
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH__LEN                   0x00000020
+
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW(i0)                    (0x00001f04 + 0x8*(i0))
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW__ESIZE                  0x00000008
+#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW__LEN                    0x00000020
+
 #define NVC0_3D_SP(i0)                                        (0x00002000 + 0x40*(i0))
 #define NVC0_3D_SP__ESIZE                                      0x00000040
 #define NVC0_3D_SP__LEN                                                0x00000006
@@ -1132,14 +1162,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_3D_VERTEX_ARRAY_SELECT                            0x00003820
 
-#define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH                                0x00003824
-
-#define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW                         0x00003828
-
-#define NVC0_3D_VERTEX_ARRAY_START_HIGH                                0x0000382c
-
-#define NVC0_3D_VERTEX_ARRAY_START_LOW                         0x00003830
-
 #define NVC0_3D_BLEND_ENABLES                                  0x00003858
 
 #define NVC0_3D_POLYGON_MODE_FRONT                             0x00003868
index 2300af52eda86244464cf8c98b7e09679e158de8..54eec660b2a7f60f7192744153f6f7e2cbb3e927 100644 (file)
@@ -289,8 +289,6 @@ nvc0_magic_3d_init(struct nouveau_channel *chan)
    OUT_RING  (chan, (2 << 16) | 2);
    BEGIN_RING(chan, RING_3D_(0x0de8), 1);
    OUT_RING  (chan, 1);
-   BEGIN_RING(chan, RING_3D_(0x165c), 1);
-   OUT_RING  (chan, 0);
 
 #if 0 /* software method */
    BEGIN_RING(chan, RING_3D_(0x1528), 1); /* MP poke */
@@ -445,9 +443,9 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
    BEGIN_RING(chan, RING_3D(RT_CONTROL), 1);
    OUT_RING  (chan, 1);
 
-   BEGIN_RING(chan, RING_3D(MULTISAMPLE_ZETA_ENABLE), 1);
+   BEGIN_RING(chan, RING_3D(CSAA_ENABLE), 1);
    OUT_RING  (chan, 0);
-   BEGIN_RING(chan, RING_3D(MULTISAMPLE_COLOR_ENABLE), 1);
+   BEGIN_RING(chan, RING_3D(MULTISAMPLE_ENABLE), 1);
    OUT_RING  (chan, 0);
    BEGIN_RING(chan, RING_3D(MULTISAMPLE_MODE), 1);
    OUT_RING  (chan, NVC0_3D_MULTISAMPLE_MODE_1X);
@@ -525,7 +523,7 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
    OUT_RELOCl(chan, screen->txc, 65536, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
    OUT_RING  (chan, NVC0_TSC_MAX_ENTRIES - 1);
 
-   BEGIN_RING(chan, RING_3D(Y_ORIGIN_BOTTOM), 1);
+   BEGIN_RING(chan, RING_3D(SCREEN_Y_CONTROL), 1);
    OUT_RING  (chan, 0);
    BEGIN_RING(chan, RING_3D(WINDOW_OFFSET_X), 2);
    OUT_RING  (chan, 0);
@@ -591,6 +589,8 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
 
    BEGIN_RING(chan, RING_3D(POINT_COORD_REPLACE), 1);
    OUT_RING  (chan, 0);
+   BEGIN_RING(chan, RING_3D(POINT_RASTER_RULES), 1);
+   OUT_RING  (chan, NVC0_3D_POINT_RASTER_RULES_OGL);
 
    BEGIN_RING(chan, RING_3D(FRAG_COLOR_CLAMP_EN), 1);
    OUT_RING  (chan, 0x11111111);
index 5a9b1c2850995ba36297c0d03efc3acc94f4f90d..c08f3693f5ea45c6b57a0c0e98712e7bb8929f9d 100644 (file)
@@ -207,6 +207,7 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
        SB_DATA    (so, fui(cso->point_size));
     }
     SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization);
+    SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth);
 
     SB_BEGIN_3D(so, POLYGON_MODE_FRONT, 1);
     SB_DATA    (so, nvgl_polygon_mode(cso->fill_front));
index e7cd94800de5470cb06c44683a4d4b277eb924ce..ee788c5bb9cbadd1e694ec91ffe6cbfcc68c9236 100644 (file)
@@ -48,7 +48,7 @@ nvc0_tic_entry(struct pipe_sampler_view *view)
 struct nvc0_rasterizer_stateobj {
    struct pipe_rasterizer_state pipe;
    int size;
-   uint32_t state[43];
+   uint32_t state[36];
 };
 
 struct nvc0_zsa_stateobj {