diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_render.c | 20 | ||||
-rw-r--r-- | src/intel.h | 3 | ||||
-rw-r--r-- | src/intel_uxa.c | 1 |
3 files changed, 19 insertions, 5 deletions
diff --git a/src/i830_render.c b/src/i830_render.c index 2c40b5df..3f3d2ef6 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -669,7 +669,7 @@ i830_emit_composite_primitive(PixmapPtr dest, ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum]; intel_screen_private *intel = intel_get_screen_private(scrn); Bool is_affine_src, is_affine_mask = TRUE; - int per_vertex, num_floats; + int per_vertex; float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3]; per_vertex = 2; /* dest x/y */ @@ -786,9 +786,10 @@ i830_emit_composite_primitive(PixmapPtr dest, } } - num_floats = 3 * per_vertex; - - OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (num_floats - 1)); + if (intel->vertex_count == 0) { + intel->vertex_index = intel->batch_used; + OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST); + } OUT_BATCH_F(dstX + w); OUT_BATCH_F(dstY + h); OUT_BATCH_F(src_x[2] / intel->scale_units[0][0]); @@ -833,6 +834,17 @@ i830_emit_composite_primitive(PixmapPtr dest, OUT_BATCH_F(mask_w[0]); } } + + intel->vertex_count += 3 * per_vertex; + +} + +void i830_vertex_flush(intel_screen_private *intel) +{ + if (intel->vertex_count) { + intel->batch_ptr[intel->vertex_index] |= intel->vertex_count - 1; + intel->vertex_count = 0; + } } /** diff --git a/src/intel.h b/src/intel.h index 8d31ac1e..04c679fc 100644 --- a/src/intel.h +++ b/src/intel.h @@ -570,9 +570,10 @@ Bool i830_check_composite_texture(ScreenPtr screen, PicturePtr picture); Bool i830_prepare_composite(int op, PicturePtr sourcec, PicturePtr mask, PicturePtr dest, PixmapPtr sourcecPixmap, PixmapPtr maskPixmap, PixmapPtr destPixmap); - void i830_composite(PixmapPtr dest, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h); +void i830_vertex_flush(intel_screen_private *intel); + /* i915_render.c */ Bool i915_check_composite(int op, PicturePtr sourcec, PicturePtr mask, PicturePtr dest, diff --git a/src/intel_uxa.c b/src/intel_uxa.c index 2be26b28..3f231ad2 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -1220,6 +1220,7 @@ Bool intel_uxa_init(ScreenPtr screen) intel->uxa_driver->composite = i830_composite; intel->uxa_driver->done_composite = i830_done_composite; + intel->vertex_flush = i830_vertex_flush; intel->batch_commit_notify = i830_batch_commit_notify; } else if (IS_GEN3(intel)) { intel->uxa_driver->check_composite = i915_check_composite; |