summaryrefslogtreecommitdiff
path: root/src/i965_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i965_video.c')
-rw-r--r--src/i965_video.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/i965_video.c b/src/i965_video.c
index f6020d4e..d4590279 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -375,13 +375,10 @@ i965_create_dst_surface_state(ScrnInfoPtr scrn,
dest_surf_state->ss0.mipmap_layout_mode = 0;
dest_surf_state->ss0.render_cache_read_mode = 0;
- if (pixmap_bo != NULL)
- dest_surf_state->ss1.base_addr =
- intel_emit_reloc(surf_bo, offsetof(struct brw_surface_state, ss1),
- pixmap_bo, 0,
- I915_GEM_DOMAIN_SAMPLER, 0);
- else
- dest_surf_state->ss1.base_addr = intel_get_pixmap_offset(pixmap);
+ dest_surf_state->ss1.base_addr =
+ intel_emit_reloc(surf_bo, offsetof(struct brw_surface_state, ss1),
+ pixmap_bo, 0,
+ I915_GEM_DOMAIN_SAMPLER, 0);
dest_surf_state->ss2.height = scrn->virtualY - 1;
dest_surf_state->ss2.width = scrn->virtualX - 1;
@@ -775,8 +772,7 @@ i965_emit_video_setup(ScrnInfoPtr pScrn, drm_intel_bo *bind_bo, int n_src_surf)
/* brw_debug (pScrn, "after base address modify"); */
BEGIN_BATCH(38);
- /* Enable VF statistics */
- OUT_BATCH(BRW_3DSTATE_VF_STATISTICS | 1);
+ OUT_BATCH(MI_NOOP);
/* Pipe control */
OUT_BATCH(BRW_PIPE_CONTROL |
@@ -795,7 +791,6 @@ i965_emit_video_setup(ScrnInfoPtr pScrn, drm_intel_bo *bind_bo, int n_src_surf)
OUT_BATCH(0); /* sf */
/* Only the PS uses the binding table */
OUT_RELOC(bind_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
- drm_intel_bo_unreference(bind_bo);
/* Blend constant color (magenta is fun) */
OUT_BATCH(BRW_3DSTATE_CONSTANT_COLOR | 3);
@@ -1131,15 +1126,16 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
i965_emit_video_setup(pScrn, bind_bo, n_src_surf);
- BEGIN_BATCH(10);
+ BEGIN_BATCH(12);
/* Set up the pointer to our vertex buffer */
- OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 2);
+ OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 3);
/* four 32-bit floats per vertex */
OUT_BATCH((0 << VB0_BUFFER_INDEX_SHIFT) |
VB0_VERTEXDATA |
((4 * 4) << VB0_BUFFER_PITCH_SHIFT));
OUT_RELOC(vb_bo, I915_GEM_DOMAIN_VERTEX, 0, 0);
OUT_BATCH(3); /* four corners to our rectangle */
+ OUT_BATCH(0); /* reserved */
OUT_BATCH(BRW_3DPRIMITIVE |
BRW_3DPRIMITIVE_VERTEX_SEQUENTIAL |
@@ -1151,6 +1147,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
OUT_BATCH(1); /* single instance */
OUT_BATCH(0); /* start instance location */
OUT_BATCH(0); /* index buffer offset, ignored */
+ OUT_BATCH(MI_NOOP);
ADVANCE_BATCH();
intel_batch_end_atomic(pScrn);
@@ -1160,7 +1157,9 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
i965_post_draw_debug(pScrn);
}
- i830MarkSync(pScrn);
+ /* release reference once we're finished */
+ drm_intel_bo_unreference(bind_bo);
+
#if WATCH_STATS
i830_dump_error_state(pScrn);
#endif