glamor: Maybe fix up the format/type for setspans.
This commit is contained in:
parent
4f139db92f
commit
f92d1478e9
|
@ -198,8 +198,20 @@ glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src,
|
||||||
if (screen_pixmap != dest_pixmap) {
|
if (screen_pixmap != dest_pixmap) {
|
||||||
fbSetSpans(drawable, gc, src, points, widths, n, sorted);
|
fbSetSpans(drawable, gc, src, points, widths, n, sorted);
|
||||||
} else {
|
} else {
|
||||||
|
GLenum format, type;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
switch (drawable->depth) {
|
||||||
|
case 24:
|
||||||
|
case 32:
|
||||||
|
format = GL_BGRA;
|
||||||
|
type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ErrorF("Unknown setspans depth %d\n", drawable->depth);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!glamor_set_destination_pixmap(dest_pixmap))
|
if (!glamor_set_destination_pixmap(dest_pixmap))
|
||||||
return;
|
return;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
|
@ -207,7 +219,7 @@ glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src,
|
||||||
points[i].y - dest_pixmap->screen_y);
|
points[i].y - dest_pixmap->screen_y);
|
||||||
glDrawPixels(widths[i],
|
glDrawPixels(widths[i],
|
||||||
1,
|
1,
|
||||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
format, type,
|
||||||
src);
|
src);
|
||||||
src += PixmapBytePad(widths[i], drawable->depth);
|
src += PixmapBytePad(widths[i], drawable->depth);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user