summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-08 19:59:34 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-08 22:29:43 +0100
commitb7f0b0e7e3f66165b87c46f897de536cf74a9daf (patch)
tree70e2adf6b643a579ad7277e21f4b0ac6e3265ef7 /src/sna/sna.h
parentbb8770158c08394c2de79e0ca1c1b3112e17dd23 (diff)
sna: Remove function for force-to-gpu
This is now enitrely done in the core move-to-gpu as a special case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna.h')
-rw-r--r--src/sna/sna.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 67384008..f62cfbc3 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -416,10 +416,6 @@ PixmapPtr sna_pixmap_create_upload(ScreenPtr screen,
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);
-struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling);
-
#define MOVE_WRITE 0x1
#define MOVE_READ 0x2
#define MOVE_INPLACE_HINT 0x4
@@ -427,6 +423,15 @@ struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling);
#define MOVE_SOURCE_HINT 0x10
#define MOVE_WHOLE_HINT 0x20
#define __MOVE_FORCE 0x40
+
+struct sna_pixmap *sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags);
+static inline struct sna_pixmap *
+sna_pixmap_force_to_gpu(PixmapPtr pixmap, unsigned flags)
+{
+ /* Unlike move-to-gpu, we ignore wedged and always create the GPU bo */
+ DBG(("%s(pixmap=%p, flags=%x)\n", __FUNCTION__, pixmap, flags));
+ return sna_pixmap_move_to_gpu(pixmap, flags | __MOVE_FORCE);
+}
bool must_check _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned flags);
static inline bool must_check sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned flags)
{
@@ -450,6 +455,8 @@ sna_drawable_move_to_gpu(DrawablePtr drawable, unsigned flags)
return sna_pixmap_move_to_gpu(get_drawable_pixmap(drawable), flags) != NULL;
}
+struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling);
+
static inline bool
sna_drawable_is_clear(DrawablePtr d)
{