summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/gen2_render.c3
-rw-r--r--src/sna/sna_dri.c4
-rw-r--r--src/sna/sna_render.c16
3 files changed, 14 insertions, 9 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 385a5fd4..9ae8352a 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -264,6 +264,8 @@ gen2_emit_texture(struct sna *sna,
uint32_t texcoordtype;
uint32_t filter;
+ assert(channel->bo);
+
if (channel->is_affine)
texcoordtype = TEXCOORDTYPE_CARTESIAN;
else
@@ -2569,6 +2571,7 @@ gen2_render_composite_spans(struct sna *sna,
case 1:
break;
}
+ assert(tmp->base.src.bo || tmp->base.src.is_solid);
tmp->prim_emit = gen2_emit_composite_spans_primitive;
tmp->base.floats_per_vertex = 3;
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index a009d3ed..00a65a9e 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1148,8 +1148,8 @@ can_flip(struct sna * sna,
pixmap = get_window_pixmap(win);
if (pixmap != sna->front) {
- DBG(("%s: no, window is not attached to the front buffer\n",
- __FUNCTION__));
+ DBG(("%s: no, window (pixmap=%ld) is not attached to the front buffer (pixmap=%ld)\n",
+ __FUNCTION__, pixmap->drawable.serialNumber, sna->front->drawable.serialNumber));
return false;
}
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 73d53ba7..c0236294 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -897,8 +897,10 @@ sna_render_pixmap_partial(struct sna *sna,
DBG(("%s (%d, %d)x(%d, %d), pitch %d, max %d\n",
__FUNCTION__, x, y, w, h, bo->pitch, sna->render.max_3d_pitch));
- if (bo->pitch > sna->render.max_3d_pitch)
+ if (bo->pitch > sna->render.max_3d_pitch) {
+ DBG(("%s: pitch too great %d > %d\n", __FUNCTION__, bo->pitch, sna->render.max_3d_pitch));
return false;
+ }
box.x1 = x;
box.y1 = y;
@@ -981,7 +983,7 @@ sna_render_pixmap_partial(struct sna *sna,
return true;
}
-static int
+static bool
sna_render_picture_partial(struct sna *sna,
PicturePtr picture,
struct sna_composite_channel *channel,
@@ -1033,14 +1035,14 @@ sna_render_picture_partial(struct sna *sna,
priv = sna_pixmap_force_to_gpu(pixmap,
MOVE_READ | MOVE_SOURCE_HINT);
if (priv == NULL)
- return 0;
+ return false;
bo = priv->gpu_bo;
}
if (bo->pitch > sna->render.max_3d_pitch) {
DBG(("%s: pitch too great %d > %d\n", __FUNCTION__, bo->pitch, sna->render.max_3d_pitch));
- return -1;
+ return false;
}
if (bo->tiling) {
@@ -1076,14 +1078,14 @@ sna_render_picture_partial(struct sna *sna,
if (w <= 0 || h <= 0 ||
w > sna->render.max_3d_size ||
h > sna->render.max_3d_size)
- return 0;
+ return false;
/* How many tiles across are we? */
channel->bo = kgem_create_proxy(&sna->kgem, bo,
box.y1 * bo->pitch + offset,
h * bo->pitch);
if (channel->bo == NULL)
- return 0;
+ return false;
if (channel->transform) {
memset(&channel->embedded_transform,
@@ -1109,7 +1111,7 @@ sna_render_picture_partial(struct sna *sna,
channel->scale[1] = 1.f/h;
channel->width = w;
channel->height = h;
- return 1;
+ return true;
}
int