[PATCH] glamor: Don't try to set up core fonts textures when we won't use them.

Alex Deucher alexdeucher at gmail.com
Tue Aug 12 07:55:05 PDT 2014


On Mon, Aug 11, 2014 at 6:23 PM, Eric Anholt <eric at anholt.net> wrote:
> This happens to avoid GL errors on hardware without
> EXT_texture_integer (which implies < GLSL 130, and thus glamor_text.c
> programs not compiling anyway).
>
> Signed-off-by: Eric Anholt <eric at anholt.net>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>
> With this, glamor on simulated RPi gets to the point of showing my
> xterm on my gray background, before some other program compile
> triggers an assertion failure because I need to go implement another
> opcode.
>
>  glamor/glamor_font.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/glamor/glamor_font.c b/glamor/glamor_font.c
> index 57c607d..0ca91fa 100644
> --- a/glamor/glamor_font.c
> +++ b/glamor/glamor_font.c
> @@ -46,6 +46,8 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
>      CharInfoPtr         glyph;
>      unsigned long       count;
>
> +    if (glamor_priv->glsl_version < 130)
> +        return NULL;
>
>      privates = FontGetPrivate(font, glamor_font_private_index);
>      if (!privates) {
> @@ -167,6 +169,11 @@ glamor_unrealize_font(ScreenPtr screen, FontPtr font)
>  Bool
>  glamor_font_init(ScreenPtr screen)
>  {
> +    glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
> +
> +    if (glamor_priv->glsl_version < 130)
> +        return TRUE;
> +
>      if (glamor_font_generation != serverGeneration) {
>          glamor_font_private_index = AllocateFontPrivateIndex();
>          if (glamor_font_private_index == -1)
> --
> 2.0.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list