diff options
author | Eric Anholt <eric@anholt.net> | 2008-12-04 15:10:49 -0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-12-05 15:41:42 +0800 |
commit | 0972c5eeb5c2f2a31c92296b6de009adba1f861f (patch) | |
tree | 3cd7a4f72b9978c54b7574d6c5fb37f079ce29c3 /src | |
parent | 87da69ba18c6535fa5faa959a49a0d47c91c7dfe (diff) |
Emit proper relocations to pixmaps in BOs in i965 video.
(cherry picked from commit 48c113ade26d5ad64999cd5cc288495c10e02fc4)
Diffstat (limited to 'src')
-rw-r--r-- | src/i965_video.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/i965_video.c b/src/i965_video.c index 68a12ec8..7e84ae03 100644 --- a/src/i965_video.c +++ b/src/i965_video.c @@ -349,6 +349,7 @@ i965_create_dst_surface_state(ScrnInfoPtr scrn, { I830Ptr pI830 = I830PTR(scrn); struct brw_surface_state *dest_surf_state; + drm_intel_bo *pixmap_bo = i830_get_pixmap_bo(pixmap); drm_intel_bo *surf_bo; surf_bo = drm_intel_bo_alloc(pI830->bufmgr, @@ -375,7 +376,14 @@ i965_create_dst_surface_state(ScrnInfoPtr scrn, dest_surf_state->ss0.mipmap_layout_mode = 0; dest_surf_state->ss0.render_cache_read_mode = 0; - dest_surf_state->ss1.base_addr = intel_get_pixmap_offset(pixmap); + 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->ss2.height = scrn->virtualY - 1; dest_surf_state->ss2.width = scrn->virtualX - 1; dest_surf_state->ss2.mip_count = 0; |