summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-10-25 14:11:17 +0200
committerChristoph Bumiller <[email protected]>2012-10-28 14:25:56 +0100
commit351d3c59f2a1153047d45fcdb23cc487f231683d (patch)
tree9d635d13810d1dde763c2f52f62102af28aa7eef /src/gallium/drivers/nv50
parenteaa8e56108e28ff5fabc8c471f4e904b53c5f8fb (diff)
nv50,nvc0: fix 2d engine stencil-only copies
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_2d.xml.h59
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c4
2 files changed, 44 insertions, 19 deletions
diff --git a/src/gallium/drivers/nv50/nv50_2d.xml.h b/src/gallium/drivers/nv50/nv50_2d.xml.h
index bc9bcf7839e..dfbef2c6a30 100644
--- a/src/gallium/drivers/nv50/nv50_2d.xml.h
+++ b/src/gallium/drivers/nv50/nv50_2d.xml.h
@@ -1,5 +1,5 @@
-#ifndef NV50_2D_XML
-#define NV50_2D_XML
+#ifndef RNNDB_NV50_2D_XML
+#define RNNDB_NV50_2D_XML
/* Autogenerated file, DO NOT EDIT manually!
@@ -8,14 +8,14 @@ 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:
-- nv50_2d.xml ( 9799 bytes, from 2010-12-28 17:17:11)
-- copyright.xml ( 6452 bytes, from 2010-12-15 23:45:18)
-- nv_object.xml ( 11898 bytes, from 2010-12-28 17:17:11)
-- nvchipsets.xml ( 3074 bytes, from 2010-12-15 23:45:18)
-- nv_defs.xml ( 4437 bytes, from 2010-12-15 23:45:18)
-- nv50_defs.xml ( 4487 bytes, from 2010-12-15 23:45:18)
-
-Copyright (C) 2006-2010 by the following authors:
+- rnndb/nv50_2d.xml ( 11113 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/copyright.xml ( 6452 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/nv_object.xml ( 12912 bytes, from 2012-07-12 09:41:09)
+- ./rnndb/nvchipsets.xml ( 3736 bytes, from 2012-07-12 09:41:09)
+- ./rnndb/nv_defs.xml ( 4437 bytes, from 2011-07-09 13:43:58)
+- ./rnndb/nv50_defs.xml ( 5468 bytes, from 2011-07-09 13:43:58)
+
+Copyright (C) 2006-2011 by the following authors:
- Artur Huillet <[email protected]> (ahuillet)
- Ben Skeggs (darktama, darktama_)
- B. R. <[email protected]> (koala_br)
@@ -106,6 +106,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_2D_UNK228 0x00000228
+#define NVC0_2D_UNK228 0x00000228
+
#define NV50_2D_SRC_FORMAT 0x00000230
#define NV50_2D_SRC_LINEAR 0x00000234
@@ -116,6 +118,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_2D_SRC_LAYER 0x00000240
+#define NVC0_2D_UNK0240 0x00000240
+
#define NV50_2D_SRC_PITCH 0x00000244
#define NV50_2D_SRC_PITCH__MAX 0x00040000
@@ -170,23 +174,33 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_2D_ROP 0x000002a0
#define NV50_2D_BETA1 0x000002a4
+#define NV50_2D_BETA1_BETA1__MASK 0x7f800000
+#define NV50_2D_BETA1_BETA1__SHIFT 23
#define NV50_2D_BETA4 0x000002a8
+#define NV50_2D_BETA4_B__MASK 0x000000ff
+#define NV50_2D_BETA4_B__SHIFT 0
+#define NV50_2D_BETA4_G__MASK 0x0000ff00
+#define NV50_2D_BETA4_G__SHIFT 8
+#define NV50_2D_BETA4_R__MASK 0x00ff0000
+#define NV50_2D_BETA4_R__SHIFT 16
+#define NV50_2D_BETA4_A__MASK 0xff000000
+#define NV50_2D_BETA4_A__SHIFT 24
#define NV50_2D_OPERATION 0x000002ac
#define NV50_2D_OPERATION_SRCCOPY_AND 0x00000000
#define NV50_2D_OPERATION_ROP_AND 0x00000001
-#define NV50_2D_OPERATION_BLEND_AND 0x00000002
+#define NV50_2D_OPERATION_BLEND 0x00000002
#define NV50_2D_OPERATION_SRCCOPY 0x00000003
-#define NV50_2D_OPERATION_UNK4 0x00000004
+#define NV50_2D_OPERATION_ROP 0x00000004
#define NV50_2D_OPERATION_SRCCOPY_PREMULT 0x00000005
#define NV50_2D_OPERATION_BLEND_PREMULT 0x00000006
-#define NV50_2D_UNK2B0 0x000002b0
-#define NV50_2D_UNK2B0_UNK0__MASK 0x0000003f
-#define NV50_2D_UNK2B0_UNK0__SHIFT 0
-#define NV50_2D_UNK2B0_UNK1__MASK 0x00003f00
-#define NV50_2D_UNK2B0_UNK1__SHIFT 8
+#define NV50_2D_PATTERN_OFFSET 0x000002b0
+#define NV50_2D_PATTERN_OFFSET_X__MASK 0x0000003f
+#define NV50_2D_PATTERN_OFFSET_X__SHIFT 0
+#define NV50_2D_PATTERN_OFFSET_Y__MASK 0x00003f00
+#define NV50_2D_PATTERN_OFFSET_Y__SHIFT 8
#define NV50_2D_PATTERN_SELECT 0x000002b4
#define NV50_2D_PATTERN_SELECT_MONO_8X8 0x00000000
@@ -194,6 +208,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_2D_PATTERN_SELECT_MONO_1X64 0x00000002
#define NV50_2D_PATTERN_SELECT_COLOR 0x00000003
+#define NVC0_2D_UNK2DC 0x000002dc
+
+#define NVC0_2D_UNK2E0 0x000002e0
+
#define NV50_2D_PATTERN_COLOR_FORMAT 0x000002e8
#define NV50_2D_PATTERN_COLOR_FORMAT_16BPP 0x00000000
#define NV50_2D_PATTERN_COLOR_FORMAT_15BPP 0x00000001
@@ -201,6 +219,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_2D_PATTERN_COLOR_FORMAT_8BPP 0x00000003
#define NV50_2D_PATTERN_COLOR_FORMAT_UNK4 0x00000004
#define NV50_2D_PATTERN_COLOR_FORMAT_UNK5 0x00000005
+#define NV50_2D_PATTERN_COLOR_FORMAT_UNK6 0x00000006
#define NV50_2D_PATTERN_MONO_FORMAT 0x000002ec
#define NV50_2D_PATTERN_MONO_FORMAT_CGA6 0x00000000
@@ -268,6 +287,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NV50_2D_PATTERN_Y8_Y3__MASK 0xff000000
#define NV50_2D_PATTERN_Y8_Y3__SHIFT 24
+#define NVC0_2D_DRAW_COLOR_LONG(i0) (0x00000540 + 0x4*(i0))
+#define NVC0_2D_DRAW_COLOR_LONG__ESIZE 0x00000004
+#define NVC0_2D_DRAW_COLOR_LONG__LEN 0x00000004
+
#define NV50_2D_DRAW_SHAPE 0x00000580
#define NV50_2D_DRAW_SHAPE_POINTS 0x00000000
#define NV50_2D_DRAW_SHAPE_LINES 0x00000001
@@ -390,4 +413,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVC0_2D_FIRMWARE__LEN 0x00000020
-#endif /* NV50_2D_XML */
+#endif /* RNNDB_NV50_2D_XML */
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index f315a235aef..511ee8fdbec 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -1072,6 +1072,8 @@ nv50_blit_eng2d(struct nv50_context *nv50, const struct pipe_blit_info *info)
}
if (mask != 0xffffffff) {
+ BEGIN_NV04(push, NV50_2D(ROP), 1);
+ PUSH_DATA (push, 0xca); /* DPSDxax */
BEGIN_NV04(push, NV50_2D(PATTERN_COLOR_FORMAT), 1);
PUSH_DATA (push, NV50_2D_PATTERN_COLOR_FORMAT_32BPP);
BEGIN_NV04(push, NV50_2D(PATTERN_COLOR(0)), 4);
@@ -1080,7 +1082,7 @@ nv50_blit_eng2d(struct nv50_context *nv50, const struct pipe_blit_info *info)
PUSH_DATA (push, 0xffffffff);
PUSH_DATA (push, 0xffffffff);
BEGIN_NV04(push, NV50_2D(OPERATION), 1);
- PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY_PREMULT);
+ PUSH_DATA (push, NV50_2D_OPERATION_ROP);
}
if (src->ms_x > dst->ms_x || src->ms_y > dst->ms_y) {