DRI2: Move pixmap pitch alignment for use with depth to pixmap create.
The previous location for pitch fixup would have only worked when depth was used with the backbuffer, and no page flipping or other adventures occurred.
This commit is contained in:
parent
71ec627c3a
commit
fba9b5aff4
|
|
@ -302,6 +302,7 @@ I830AccelInit(ScreenPtr pScreen)
|
|||
* i915 limits 3D textures to pitch of 16B - 8kB, in dwords.
|
||||
* i915 limits 3D destination to ~4kB-aligned offset if tiled.
|
||||
* i915 limits 3D destination to pitch of 16B - 8kB, in dwords, if un-tiled.
|
||||
* i915 limits 3D destination to pitch 64B-aligned if used with depth.
|
||||
* i915 limits 3D destination to pitch of 512B - 8kB, in tiles, if tiled.
|
||||
* i915 limits 3D destination to POT aligned pitch if tiled.
|
||||
* i915 limits 3D destination drawing rect to w,h of 2048,2048.
|
||||
|
|
@ -326,7 +327,7 @@ I830AccelInit(ScreenPtr pScreen)
|
|||
pI830->accel_max_y = 8192;
|
||||
} else {
|
||||
pI830->accel_pixmap_offset_alignment = 4;
|
||||
pI830->accel_pixmap_pitch_alignment = 16;
|
||||
pI830->accel_pixmap_pitch_alignment = 64;
|
||||
pI830->accel_max_x = 2048;
|
||||
pI830->accel_max_y = 2048;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1830,7 +1830,7 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
|
|||
ScreenPtr pScreen = pDraw->pScreen;
|
||||
DRI2BufferPtr buffers;
|
||||
dri_bo *bo;
|
||||
int i, depth, width, cpp;
|
||||
int i;
|
||||
I830DRI2BufferPrivatePtr privates;
|
||||
PixmapPtr pPixmap, pDepthPixmap;
|
||||
|
||||
|
|
@ -1841,11 +1841,7 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
|
|||
if (privates == NULL) {
|
||||
xfree(buffers);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* The byte rowstride for 3D buffers must be a multiple of 64 bytes. */
|
||||
cpp = pDraw->bitsPerPixel / 8;
|
||||
width = ((pDraw->width * cpp + 63) & ~63) / cpp;
|
||||
}
|
||||
|
||||
pDepthPixmap = NULL;
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
@ -1860,9 +1856,9 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
|
|||
pPixmap->refcnt++;
|
||||
} else {
|
||||
pPixmap = (*pScreen->CreatePixmap)(pScreen,
|
||||
width,
|
||||
pDraw->height,
|
||||
pDraw->depth, 0);
|
||||
pDraw->width,
|
||||
pDraw->height,
|
||||
pDraw->depth, 0);
|
||||
}
|
||||
|
||||
if (attachments[i] == DRI2_BUFFER_DEPTH)
|
||||
|
|
|
|||
Loading…
Reference in New Issue