[PATCH 1/2] glamor: Fix bad rendering of glyphs after an a1 glyph upload.

Michel Dänzer michel at daenzer.net
Thu Jul 2 01:25:54 PDT 2015


On 02.07.2015 06:56, Eric Anholt wrote:
> Fixes regressions since my "don't make an FBO for the glyph atlas"
> change.  The a1 upload was a fallback, as I expected.  However,
> fallback reads use glReadPixels() because there's no
> glGetTexSubImage2D() to match glTexSubImage2D().  We were just binding
> the 0 FBO value, so the glReadPixels() would throw a GL error instead
> of getting any data.  After the fallback was done we'd write back the
> undefined data to the atlas, blowing away the entire rest of the atlas
> because we didn't specify any bounds on our prepare.
> 
> To fix the fallbacks to actually work, we'd need a prepare path that
> allocates some memory memory do a full glGetTexImage() into, then

Typo: "memory memory"


> memcpy out of that.  Instead, just dodge the general fallback by
> implementing the specific upload we need to do here, which should also
> be *much* faster at uploading a1 glyphs since it's not
> readpixels/texsubimaging back and forth.
> 
> Signed-off-by: Eric Anholt <eric at anholt.net>

Nice fix. I wasn't able to reproduce the problem on the other machine
before because I didn't have bitmap fonts enabled in the fontconfig
configuration there.

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list