summaryrefslogtreecommitdiff
path: root/src/i965_video.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-02-18 17:26:06 -0500
committerKristian Høgsberg <krh@redhat.com>2009-02-18 17:26:06 -0500
commit872aadc7102bd5131e1582ede081e22672911ba2 (patch)
treeff05701c45f6246f3b1fd0126a56eea41e47f99c /src/i965_video.c
parent527e8177cde3abbabbcdccee0dbc0dcc0068a1be (diff)
Make Xv used a buffer object instead of i830_memory.
We still pin the buffer object in case of overlay, but for textured video we're now no longer using i830_memory for Xv anymore.
Diffstat (limited to 'src/i965_video.c')
-rw-r--r--src/i965_video.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/i965_video.c b/src/i965_video.c
index 7cd20f36..72a55d6d 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -397,6 +397,7 @@ i965_create_dst_surface_state(ScrnInfoPtr scrn,
static drm_intel_bo *
i965_create_src_surface_state(ScrnInfoPtr scrn,
+ drm_intel_bo *src_bo,
uint32_t src_offset,
int src_width,
int src_height,
@@ -424,13 +425,18 @@ i965_create_src_surface_state(ScrnInfoPtr scrn,
src_surf_state->ss0.mipmap_layout_mode = 0;
src_surf_state->ss0.render_cache_read_mode = 0;
- src_surf_state->ss1.base_addr = src_offset;
src_surf_state->ss2.width = src_width - 1;
src_surf_state->ss2.height = src_height - 1;
src_surf_state->ss2.mip_count = 0;
src_surf_state->ss2.render_target_rotation = 0;
src_surf_state->ss3.pitch = src_pitch - 1;
+ src_surf_state->ss1.base_addr =
+ intel_emit_reloc(surface_bo,
+ offsetof(struct brw_surface_state, ss1),
+ src_bo, src_offset,
+ I915_GEM_DOMAIN_SAMPLER, 0);
+
drm_intel_bo_unmap(surface_bo);
return surface_bo;
}
@@ -897,11 +903,11 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
video_pitch);
#endif
+#if 0
/* enable debug */
OUTREG (INST_PM,
(1 << (16 + 4)) |
(1 << 4));
-#if 0
ErrorF ("INST_PM 0x%08x\n", INREG(INST_PM));
#endif
@@ -967,6 +973,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
for (src_surf = 0; src_surf < n_src_surf; src_surf++) {
drm_intel_bo *surf_bo =
i965_create_src_surface_state(pScrn,
+ pPriv->buf,
src_surf_base[src_surf],
src_width[src_surf],
src_height[src_surf],