summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-02-06 06:04:13 +1000
committerDave Airlie <airlied@linux.ie>2008-02-06 06:04:13 +1000
commit470cd6a401c6a3e8fea981a8fe97c28be3cfb81d (patch)
treee0ba35d1847529fa8754a22f079f166bbd95e150 /src
parentf65e8dfac23adfa199026765fe3a1ea08cf4da67 (diff)
r300: remove r300 specific vertex emission
Set the vertex and fragment engine to expect the mask coords.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_commonfuncs.c6
-rw-r--r--src/radeon_exa_render.c39
-rw-r--r--src/radeon_reg.h2
3 files changed, 9 insertions, 38 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index 53bbce9..53c428a 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -97,8 +97,10 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
OUT_ACCEL_REG(R300_VAP_CNTL, 0x300456);
OUT_ACCEL_REG(R300_VAP_VTE_CNTL, 0x300);
OUT_ACCEL_REG(R300_VAP_PSC_SGN_NORM_CNTL, 0x0);
- OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_0, 0x6a014001);
+ OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_0, 0x4a014001);
+ OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_1, 0x6b01);
OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_EXT_0, 0xf688f688);
+ OUT_ACCEL_REG(R300_VAP_PROG_STREAM_CNTL_EXT_1, 0xf688);
OUT_ACCEL_REG(R300_VAP_PVS_CODE_CNTL_0, 0x100400);
OUT_ACCEL_REG(R300_VAP_PVS_CODE_CNTL_1, 0x1);
OUT_ACCEL_REG(R300_VAP_PVS_VECTOR_INDX_REG, 0);
@@ -113,7 +115,7 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
OUT_ACCEL_REG(R300_VAP_PVS_FLOW_CNTL_OPC, 0x0);
OUT_ACCEL_REG(R300_VAP_OUT_VTX_FMT_0, 0x1);
- OUT_ACCEL_REG(R300_VAP_OUT_VTX_FMT_1, 0x2);
+ OUT_ACCEL_REG(R300_VAP_OUT_VTX_FMT_1, (0x2 << 3) | 0x2);
OUT_ACCEL_REG(R300_VAP_GB_VERT_CLIP_ADJ, 0x3f800000);
OUT_ACCEL_REG(R300_VAP_GB_VERT_DISC_ADJ, 0x3f800000);
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index c642aff..02d11f4 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -1037,7 +1037,6 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
}
#define VTX_COUNT 6
-#define R300_VTX_COUNT 4
#ifdef ACCEL_CP
@@ -1051,14 +1050,6 @@ do { \
OUT_RING_F(_maskY); \
} while (0)
-#define VTX_OUT4(_dstX, _dstY, _srcX, _srcY) \
-do { \
- OUT_RING_F(_dstX); \
- OUT_RING_F(_dstY); \
- OUT_RING_F(_srcX); \
- OUT_RING_F(_srcY); \
-} while (0)
-
#else /* ACCEL_CP */
#define VTX_OUT(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \
@@ -1071,14 +1062,6 @@ do { \
OUT_ACCEL_REG_F(RADEON_SE_PORT_DATA0, _maskY); \
} while (0)
-#define VTX_OUT4(_dstX, _dstY, _srcX, _srcY) \
-do { \
- OUT_ACCEL_REG_F(RADEON_SE_PORT_DATA0, _dstX); \
- OUT_ACCEL_REG_F(RADEON_SE_PORT_DATA0, _dstY); \
- OUT_ACCEL_REG_F(RADEON_SE_PORT_DATA0, _srcX); \
- OUT_ACCEL_REG_F(RADEON_SE_PORT_DATA0, _srcY); \
-} while (0)
-
#endif /* !ACCEL_CP */
#ifdef ONLY_ONCE
@@ -1111,8 +1094,8 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
ENTER_DRAW(0);
- /*ErrorF("RadeonComposite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n",
- srcX, srcY, maskX, maskY,dstX, dstY, w, h);*/
+ /* ErrorF("RadeonComposite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n",
+ srcX, srcY, maskX, maskY,dstX, dstY, w, h); */
srcXend = srcX + w;
srcYend = srcY + h;
@@ -1150,7 +1133,7 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
transformPoint(transform[1], &maskBottomRight);
}
- vtx_count = (info->ChipFamily >= CHIP_FAMILY_R300) ? R300_VTX_COUNT : VTX_COUNT;
+ vtx_count = VTX_COUNT;
if (IS_R300_VARIANT) {
BEGIN_ACCEL(1);
@@ -1208,22 +1191,6 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
VTX_OUT(dstX, dstY + h, srcX, srcYend, maskX, maskYend);
VTX_OUT(dstX + w, dstY + h, srcXend, srcYend, maskXend, maskYend);
VTX_OUT(dstX + w, dstY, srcXend, srcY, maskXend, maskY);
- } else if (IS_R300_VARIANT) {
- VTX_OUT4((float)dstX, (float)dstY,
- xFixedToFloat(srcTopLeft.x) / info->texW[0],
- xFixedToFloat(srcTopLeft.y) / info->texH[0]);
-
- VTX_OUT4((float)dstX, (float)(dstY + h),
- xFixedToFloat(srcBottomLeft.x) / info->texW[0],
- xFixedToFloat(srcBottomLeft.y) / info->texH[0]);
-
- VTX_OUT4((float)(dstX + w), (float)(dstY + h),
- xFixedToFloat(srcBottomRight.x) / info->texW[0],
- xFixedToFloat(srcBottomRight.y) / info->texH[0]);
-
- VTX_OUT4((float)(dstX + w), (float)dstY,
- xFixedToFloat(srcTopRight.x) / info->texW[0],
- xFixedToFloat(srcTopRight.y) / info->texH[0]);
} else {
VTX_OUT((float)dstX, (float)dstY,
xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0],
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index eec8784..8d45d7b 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -3767,7 +3767,9 @@
#define R300_VAP_VTE_CNTL 0x20B0
#define R300_VAP_PSC_SGN_NORM_CNTL 0x21DC
#define R300_VAP_PROG_STREAM_CNTL_0 0x2150
+#define R300_VAP_PROG_STREAM_CNTL_1 0x2154
#define R300_VAP_PROG_STREAM_CNTL_EXT_0 0x21e0
+#define R300_VAP_PROG_STREAM_CNTL_EXT_1 0x21e4
#define R300_VAP_PVS_CODE_CNTL_0 0x22D0
#define R300_VAP_PVS_CODE_CNTL_1 0x22D8
#define R300_VAP_PVS_VECTOR_INDX_REG 0x2200