mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-03 10:20:34 +02:00
Merge branch 'glamor-add-pixmap-alloc-debug' into 'master'
Draft: glamor: Add debug for pixmap allocations See merge request xorg/xserver!1704
This commit is contained in:
commit
ef05ce6373
2 changed files with 11 additions and 0 deletions
|
|
@ -237,6 +237,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
|||
|
||||
if (usage == GLAMOR_CREATE_PIXMAP_NO_TEXTURE) {
|
||||
glamor_init_pixmap_private_small(pixmap, pixmap_priv);
|
||||
glamor_debug_pixmap_alloc("pixmap %p\n", pixmap);
|
||||
return pixmap;
|
||||
}
|
||||
else if (usage == GLAMOR_CREATE_NO_LARGE ||
|
||||
|
|
@ -258,6 +259,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
|||
}
|
||||
|
||||
glamor_pixmap_attach_fbo(pixmap, fbo);
|
||||
glamor_debug_pixmap_alloc("pixmap %p\n", pixmap);
|
||||
|
||||
return pixmap;
|
||||
}
|
||||
|
|
@ -266,6 +268,7 @@ Bool
|
|||
glamor_destroy_pixmap(PixmapPtr pixmap)
|
||||
{
|
||||
if (pixmap->refcnt == 1) {
|
||||
glamor_debug_pixmap_alloc("pixmap %p\n", pixmap);
|
||||
glamor_pixmap_destroy_fbo(pixmap);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#define GLAMOR_DEBUG_FALLBACK 1
|
||||
#define GLAMOR_DEBUG_TEXTURE_DOWNLOAD 2
|
||||
#define GLAMOR_DEBUG_TEXTURE_DYNAMIC_UPLOAD 3
|
||||
#define GLAMOR_DEBUG_PIXMAP_ALLOC 4
|
||||
|
||||
#define GLAMOR_PANIC(_format_, ...) \
|
||||
do { \
|
||||
|
|
@ -66,6 +67,13 @@
|
|||
"Glamor fallback", \
|
||||
##__VA_ARGS__);} while(0)
|
||||
|
||||
#define glamor_debug_pixmap_alloc(_format_,...) \
|
||||
do { \
|
||||
if (glamor_debug_level >= GLAMOR_DEBUG_PIXMAP_ALLOC) \
|
||||
__debug_output_message(_format_, \
|
||||
"Glamor pixmap alloc", \
|
||||
##__VA_ARGS__);} while(0)
|
||||
|
||||
#define DEBUGF(str, ...) do {} while(0)
|
||||
//#define DEBUGF(str, ...) ErrorF(str, ##__VA_ARGS__)
|
||||
#define DEBUGRegionPrint(x) do {} while (0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue