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 <[email protected]> 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 <[email protected]> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
