sna: Use private identifier for internal scratch pixmaps
This was meant to be a part of the previous commit. These are the scratch pixmaps for which we truly do want to allocate GPU-only. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
14a065a267
commit
d6f543011b
|
|
@ -624,5 +624,6 @@ memcpy_blt(const void *src, void *dst, int bpp,
|
|||
uint16_t width, uint16_t height);
|
||||
|
||||
#define SNA_CREATE_FB 0x10
|
||||
#define SNA_CREATE_SCRATCH 0x11
|
||||
|
||||
#endif /* _SNA_H */
|
||||
|
|
|
|||
|
|
@ -268,6 +268,11 @@ static PixmapPtr sna_create_pixmap(ScreenPtr screen,
|
|||
if (usage == CREATE_PIXMAP_USAGE_SCRATCH)
|
||||
return fbCreatePixmap(screen, width, height, depth, usage);
|
||||
|
||||
if (usage == SNA_CREATE_SCRATCH)
|
||||
return sna_pixmap_create_scratch(screen,
|
||||
width, height, depth,
|
||||
I915_TILING_Y);
|
||||
|
||||
if (FORCE_GPU_ONLY && width && height)
|
||||
return sna_pixmap_create_scratch(screen,
|
||||
width, height, depth,
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ sna_dri_create_buffer(DrawablePtr drawable,
|
|||
|
||||
pixmap = NULL;
|
||||
bo = NULL;
|
||||
usage = CREATE_PIXMAP_USAGE_SCRATCH;
|
||||
usage = SNA_CREATE_SCRATCH;
|
||||
switch (attachment) {
|
||||
case DRI2BufferFrontLeft:
|
||||
pixmap = get_drawable_pixmap(drawable);
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ static Bool realize_glyph_caches(struct sna *sna)
|
|||
CACHE_PICTURE_SIZE,
|
||||
CACHE_PICTURE_SIZE,
|
||||
depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
SNA_CREATE_SCRATCH);
|
||||
if (!pixmap)
|
||||
goto bail;
|
||||
|
||||
|
|
@ -726,7 +726,7 @@ glyphs_via_mask(struct sna *sna,
|
|||
|
||||
pixmap = screen->CreatePixmap(screen,
|
||||
width, height, format->depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
SNA_CREATE_SCRATCH);
|
||||
if (!pixmap)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ static int sna_render_picture_downsample(struct sna *sna,
|
|||
|
||||
tmp = screen->CreatePixmap(screen,
|
||||
w/2, h/2, pixmap->drawable.depth,
|
||||
CREATE_PIXMAP_USAGE_SCRATCH);
|
||||
SNA_CREATE_SCRATCH);
|
||||
if (!tmp)
|
||||
goto fixup;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue