mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 02:20:07 +01:00
glamor: fallback if font is too large for FBO size.
running xfontsel on haswell here, with a max texture size
of 8kx8k, one font wants 9711 height. This fallsback to
sw in this case.
A proper solution probably involves using an array texture.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 64081d0eac)
This commit is contained in:
parent
f7da9e4cd8
commit
f673c6cffb
1 changed files with 5 additions and 0 deletions
|
|
@ -80,6 +80,11 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
|
|||
overall_width = glyph_width_bytes * num_cols;
|
||||
overall_height = glyph_height * num_rows;
|
||||
|
||||
if (overall_width > glamor_priv->max_fbo_size ||
|
||||
overall_height > glamor_priv->max_fbo_size) {
|
||||
/* fallback if we don't fit inside a texture */
|
||||
return NULL;
|
||||
}
|
||||
bits = malloc(overall_width * overall_height);
|
||||
if (!bits)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue