sna/traps: Explicitly create an unattach pixmap for fallback
References: https://bugs.freedesktop.org/show_bug.cgi?id=42426 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
23b5640a0f
commit
6890592cd2
|
|
@ -419,6 +419,8 @@ static inline Bool pixmap_is_scanout(PixmapPtr pixmap)
|
|||
PixmapPtr sna_pixmap_create_upload(ScreenPtr screen,
|
||||
int width, int height, int depth,
|
||||
unsigned flags);
|
||||
PixmapPtr sna_pixmap_create_unattached(ScreenPtr screen,
|
||||
int width, int height, int depth);
|
||||
|
||||
struct sna_pixmap *sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags);
|
||||
struct sna_pixmap *sna_pixmap_force_to_gpu(PixmapPtr pixmap, unsigned flags);
|
||||
|
|
|
|||
|
|
@ -623,6 +623,15 @@ sna_pixmap_create_shm(ScreenPtr screen,
|
|||
return pixmap;
|
||||
}
|
||||
|
||||
PixmapPtr
|
||||
sna_pixmap_create_unattached(ScreenPtr screen,
|
||||
int width, int height, int depth)
|
||||
{
|
||||
return create_pixmap(to_sna_from_screen(screen),
|
||||
screen, width, height, depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
}
|
||||
|
||||
static PixmapPtr
|
||||
sna_pixmap_create_scratch(ScreenPtr screen,
|
||||
int width, int height, int depth,
|
||||
|
|
|
|||
|
|
@ -2464,9 +2464,8 @@ trapezoids_fallback(CARD8 op, PicturePtr src, PicturePtr dst,
|
|||
pixman_image_unref(image);
|
||||
}
|
||||
} else {
|
||||
scratch = screen->CreatePixmap(screen,
|
||||
width, height, depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
scratch = sna_pixmap_create_unattached(screen,
|
||||
width, height, depth);
|
||||
if (!scratch)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue