Emit proper relocations to pixmaps in BOs in i965 video.

This commit is contained in:
Eric Anholt 2008-12-04 15:10:49 -08:00
parent ae2cd8b75e
commit 48c113ade2
1 changed files with 9 additions and 1 deletions

View File

@ -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;