xf86-video-intel: 2 commits - src/sna/gen7_render.c src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Oct 11 06:13:13 PDT 2012
src/sna/gen7_render.c | 11 ++++++-----
src/sna/sna_accel.c | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 0b92a5a3062d73666279e17ac2d711314bcd8dfe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Oct 11 12:16:03 2012 +0100
sna: Correct a bogus assertion after inplace PutImage
If we are forced to use the GPU bo as the target because the CPU bo is
busy, the priv->cpu flag is likely to remain set, so we need to clear it
rather than fail the assertion that is false.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4d6c798..a8a0c93 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3553,7 +3553,6 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
if (upload_inplace(sna, pixmap, priv, region) &&
sna_put_image_upload_blt(drawable, gc, region,
x, y, w, h, bits, stride)) {
- assert(priv->cpu == false);
if (!DAMAGE_IS_ALL(priv->gpu_damage)) {
DBG(("%s: marking damage\n", __FUNCTION__));
if (region_subsumes_drawable(region, &pixmap->drawable))
@@ -3582,6 +3581,7 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
assert_pixmap_damage(pixmap);
priv->clear = false;
+ priv->cpu = false;
return true;
}
commit c51aaa731e5cffc892e59730194ad7c98789b02b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Oct 11 11:36:00 2012 +0100
sna/gen7: Replace bogus state tracking assertion
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 37d0359..4d94c80 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -189,7 +189,8 @@ static const struct blendinfo {
#define GEN7_BLEND_STATE_PADDED_SIZE ALIGN(sizeof(struct gen7_blend_state), 64)
#define BLEND_OFFSET(s, d) \
- (((s) * GEN7_BLENDFACTOR_COUNT + (d)) * GEN7_BLEND_STATE_PADDED_SIZE)
+ ((d != GEN7_BLENDFACTOR_ZERO) << 15 | \
+ (((s) * GEN7_BLENDFACTOR_COUNT + (d)) * GEN7_BLEND_STATE_PADDED_SIZE))
#define NO_BLEND BLEND_OFFSET(GEN7_BLENDFACTOR_ONE, GEN7_BLENDFACTOR_ZERO)
#define CLEAR BLEND_OFFSET(GEN7_BLENDFACTOR_ZERO, GEN7_BLENDFACTOR_ZERO)
@@ -213,7 +214,8 @@ static const struct blendinfo {
SAMPLER_FILTER_NEAREST, SAMPLER_EXTEND_NONE)
#define GEN7_SAMPLER(f) (((f) >> 16) & 0xfff0)
-#define GEN7_BLEND(f) (((f) >> 0) & 0xfff0)
+#define GEN7_BLEND(f) (((f) >> 0) & 0x7ff0)
+#define GEN7_READS_DST(f) (((f) >> 15) & 1)
#define GEN7_KERNEL(f) (((f) >> 16) & 0xf)
#define GEN7_VERTEX(f) (((f) >> 0) & 0xf)
#define GEN7_SET_FLAGS(S, B, K, V) (((S) | (K)) << 16 | ((B) | (V)))
@@ -1059,8 +1061,7 @@ gen7_emit_state(struct sna *sna,
if (need_stall)
gen7_emit_pipe_stall(sna);
- sna->render_state.gen7.emit_flush =
- GEN7_BLEND(op->u.gen7.flags) != NO_BLEND;
+ sna->render_state.gen7.emit_flush = GEN7_READS_DST(op->u.gen7.flags);
}
static void gen7_magic_ca_pass(struct sna *sna,
@@ -3327,7 +3328,7 @@ gen7_emit_copy_state(struct sna *sna,
offset = sna->render_state.gen7.surface_table;
}
- assert(GEN7_BLEND(op->u.gen7.flags) == NO_BLEND);
+ assert(!GEN7_READS_DST(op->u.gen7.flags));
gen7_emit_state(sna, op, offset);
}
More information about the xorg-commit
mailing list