summaryrefslogtreecommitdiff
path: root/src/r600_exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-07-05 15:14:59 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-07-05 15:14:59 +0200
commit11cf8a28eb46f48d101888552266921bee8b63fc (patch)
treee085d081ed1ad1471ec250cd6c3f19d432d3d907 /src/r600_exa.c
parent8d2f712eaf1e569fd92bbe2db5aceb43b7b367d1 (diff)
KMS CS fixes.
* Flush CS before running out of space. * Don't flush CS every time when switching between 2D and 3D engine, but make sure to re-initialize 2D/3D state after flushing. Doesn't seem quite perfect yet (some rendering seems to get dropped on the floor sometimes), but this should fix a lot of CS failures people have been seeing.
Diffstat (limited to 'src/r600_exa.c')
-rw-r--r--src/r600_exa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 18831f7f..3673064c 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1166,7 +1166,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
}
if (unit == 0) {
- if (!accel_state->has_mask) {
+ if (!accel_state->msk_pic) {
if (PICT_FORMAT_RGB(pPict->format) == 0) {
pix_r = SQ_SEL_0;
pix_g = SQ_SEL_0;
@@ -1397,7 +1397,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
/* return FALSE; */
if (pMask) {
- accel_state->has_mask = TRUE;
+ accel_state->msk_pic = pMaskPicture;
if (pMaskPicture->componentAlpha) {
accel_state->component_alpha = TRUE;
if (R600BlendOp[op].src_alpha)
@@ -1409,7 +1409,7 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
accel_state->src_alpha = FALSE;
}
} else {
- accel_state->has_mask = FALSE;
+ accel_state->msk_pic = NULL;
accel_state->component_alpha = FALSE;
accel_state->src_alpha = FALSE;
}
@@ -1598,7 +1598,7 @@ static void R600Composite(PixmapPtr pDst,
srcBottomRight.x = IntToxFixed(srcX + w);
srcBottomRight.y = IntToxFixed(srcY + h);
- if (accel_state->has_mask) {
+ if (accel_state->msk_pic) {
xPointFixed maskTopLeft, maskTopRight, maskBottomLeft, maskBottomRight;
if (((accel_state->vb_index + 3) * 24) > (accel_state->ib->total / 2)) {
@@ -1693,7 +1693,7 @@ static void R600DoneComposite(PixmapPtr pDst)
/* Vertex buffer setup */
- if (accel_state->has_mask) {
+ if (accel_state->msk_pic) {
accel_state->vb_size = accel_state->vb_index * 24;
vtx_res.id = SQ_VTX_RESOURCE_vs;
vtx_res.vtx_size_dw = 24 / 4;