summaryrefslogtreecommitdiff
path: root/glamor/glamor.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-03-18 21:23:24 -0700
committerEric Anholt <eric@anholt.net>2014-03-26 12:58:40 -0700
commit82f91433e277e3711678c1b16be85e89b6c7d530 (patch)
tree0be80fa1a5a29be87e770acb8a5d210e324ce4e1 /glamor/glamor.c
parent11e2f0de71fa341f8b0b1da0a1b9ccbfa6550a50 (diff)
glamor: Get testing code using small FBOs working again
Glamor has a mode where pixmaps will be constructed from numerous small FBOs. This allows testing of the tiled pixmap code without needing to create huge pixmaps. However, the render glyph code assumed that it could create a pixmap large enough for the glyph atlas. Instead of attempting to fix that (which would be disruptive and not helpful), I've added a new pixmap creation usage, GLAMOR_CREATE_NO_LARGE which forces allocation of a single large FBO. Now that we have pixmaps with varying FBO sizes, I then went around and fixed the few places using the global FBO max size and replaced that with the per-pixmap FBO tiling sizes, which were already present in each large pixmap. Xephyr has been changed to pass GLAMOR_CREATE_NO_LARGE when it creates the screen pixmap as it doesn't want to deal with tiling either. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor/glamor.c')
-rw-r--r--glamor/glamor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index 0d0f52c18..22a79e800 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -178,7 +178,9 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3;
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL);
- if (type == GLAMOR_MEMORY_MAP || glamor_check_fbo_size(glamor_priv, w, h)) {
+ if (type == GLAMOR_MEMORY_MAP || usage == GLAMOR_CREATE_NO_LARGE ||
+ glamor_check_fbo_size(glamor_priv, w, h))
+ {
pixmap_priv->type = type;
fbo = glamor_create_fbo(glamor_priv, w, h, format, usage);
}