Fix pixmap offset
Use consistent interface for counting pixmap offset.
This commit is contained in:
parent
bda3c69a7a
commit
b73235f404
|
|
@ -112,9 +112,7 @@ i830_pixmap_tiled(PixmapPtr pPixmap)
|
|||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
unsigned long offset;
|
||||
|
||||
/* Don't use exaGetPixmapOffset becuase we might be called from XAA code. */
|
||||
offset = (long)pPixmap->devPrivate.ptr -
|
||||
(long)pI830->FbBase;
|
||||
offset = intel_get_pixmap_offset(pPixmap);
|
||||
if (offset == pI830->front_buffer->offset &&
|
||||
pI830->front_buffer->tiling != TILE_NONE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2402,9 +2402,10 @@ I830PutImage(ScrnInfoPtr pScrn,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
|
||||
((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
|
||||
pI830->FbMapSize)) {
|
||||
if (!pI830->useEXA &&
|
||||
(((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
|
||||
((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
|
||||
pI830->FbMapSize))) {
|
||||
/* If the pixmap wasn't in framebuffer, then we have no way in XAA to
|
||||
* force it there. So, we simply refuse to draw and fail.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
/* front buffer, pitch, offset */
|
||||
OUT_RING(_3DSTATE_BUF_INFO_CMD);
|
||||
OUT_RING(BUF_3D_ID_COLOR_BACK | BUF_3D_USE_FENCE |
|
||||
BUF_3D_PITCH(pPixmap->devKind));
|
||||
OUT_RING(BUF_3D_ADDR((long)pPixmap->devPrivate.ptr - (long)pI830->FbBase));
|
||||
BUF_3D_PITCH(intel_get_pixmap_pitch(pPixmap)));
|
||||
OUT_RING(BUF_3D_ADDR(intel_get_pixmap_offset(pPixmap)));
|
||||
ADVANCE_LP_RING();
|
||||
|
||||
if (!planar) {
|
||||
|
|
|
|||
|
|
@ -371,13 +371,12 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
dest_surf_state->ss0.mipmap_layout_mode = 0;
|
||||
dest_surf_state->ss0.render_cache_read_mode = 0;
|
||||
|
||||
dest_surf_state->ss1.base_addr = (long)pPixmap->devPrivate.ptr -
|
||||
(long)pI830->FbBase;
|
||||
dest_surf_state->ss1.base_addr = intel_get_pixmap_offset(pPixmap);
|
||||
dest_surf_state->ss2.height = pScrn->virtualY - 1;
|
||||
dest_surf_state->ss2.width = pScrn->virtualX - 1;
|
||||
dest_surf_state->ss2.mip_count = 0;
|
||||
dest_surf_state->ss2.render_target_rotation = 0;
|
||||
dest_surf_state->ss3.pitch = pPixmap->devKind - 1;
|
||||
dest_surf_state->ss3.pitch = intel_get_pixmap_pitch(pPixmap) - 1;
|
||||
dest_surf_state->ss3.tiled_surface = i830_pixmap_tiled(pPixmap);
|
||||
dest_surf_state->ss3.tile_walk = 0; /* TileX */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue