summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-01-13 19:36:25 +0100
committerChristoph Bumiller <[email protected]>2011-01-13 19:36:25 +0100
commit370ae0bd614fcbf9c4c0424fb5c41f2cfbc17b3e (patch)
treeb98197b1c06da3c49d418c884d5cf9d8463e37fb /src
parentabbb1c8f084c6739bc9d6f559caf26f3f71b2fab (diff)
nvc0: identify POINT_RASTER_RULES, add POINT_SMOOTH state
Point smoothing requires rasterization rules to be set to OGL. Sorry for the extra noise caused by the header update.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3d.xml.h48
-rw-r--r--src/gallium/drivers/nvc0/nvc0_screen.c10
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c1
-rw-r--r--src/gallium/drivers/nvc0/nvc0_stateobj.h2
4 files changed, 42 insertions, 19 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
index 702e58b2e3c..31302949d5e 100644
--- a/src/gallium/drivers/nvc0/nvc0_3d.xml.h
+++ b/src/gallium/drivers/nvc0/nvc0_3d.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:
-- 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
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index 2300af52eda..54eec660b2a 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -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);
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index 5a9b1c28509..c08f3693f5e 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -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));
diff --git a/src/gallium/drivers/nvc0/nvc0_stateobj.h b/src/gallium/drivers/nvc0/nvc0_stateobj.h
index e7cd94800de..ee788c5bb9c 100644
--- a/src/gallium/drivers/nvc0/nvc0_stateobj.h
+++ b/src/gallium/drivers/nvc0/nvc0_stateobj.h
@@ -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 {