xserver/glamor
Keith Packard c268d2fc33 glamor: Fix bad rendering of glyphs after an a1 glyph upload. (v3)
Fixes regressions since Eric's "don't make an FBO for the glyph atlas"
change.  The a1 upload was a fallback, as 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
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.

v3: Use CopyPlane to a temp pixmap for the upload
v4: Rewrite anholt's commit message to be from keithp's perspective
    (changes by anholt)

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-07-06 12:01:07 -07:00
..
Makefile.am glamor: Replace CompositeGlyphs code [v2] 2015-05-14 16:32:07 -07:00
glamor.c glamor: Restore the hook to glamor_composite_rectangles(). 2015-07-02 10:05:59 -07:00
glamor.h glamor: Add a new glamor_gbm_bo_from_pixmap() function. 2015-06-30 13:44:09 +10:00
glamor_addtraps.c glamor: Remove _nf rendering functions 2015-03-24 12:01:39 -07:00
glamor_composite_glyphs.c glamor: Fix bad rendering of glyphs after an a1 glyph upload. (v3) 2015-07-06 12:01:07 -07:00
glamor_compositerects.c Convert glamor & glx to new *allocarray functions 2015-04-21 16:58:08 -07:00
glamor_context.h glamor: Replace glamor_get/put_context() with just glamor_make_current(). 2014-04-23 10:32:23 -07:00
glamor_copy.c glamor: Adapt glamor_program API to handle render acceleration 2015-05-14 16:12:42 -07:00
glamor_core.c glamor: Mark a bunch of single-file data static. 2015-07-02 10:06:36 -07:00
glamor_dash.c glamor: Adapt glamor_program API to handle render acceleration 2015-05-14 16:12:42 -07:00
glamor_debug.h glamor: Apply x-indent.sh. 2014-01-27 09:30:47 -08:00
glamor_egl.c glamor: Add a new glamor_gbm_bo_from_pixmap() function. 2015-06-30 13:44:09 +10:00
glamor_egl_stubs.c glamor: add support for allocating linear buffers (v2) 2015-06-30 12:17:55 +10:00
glamor_eglmodule.c Fix files including xorg-server.h by mistake 2014-07-30 12:17:27 -07:00
glamor_fbo.c glamor: Fix up some weird formatting in _glamor_create_fbo_array(). 2015-07-02 10:05:59 -07:00
glamor_font.c glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2 2015-03-24 12:01:38 -07:00
glamor_font.h glamor: Add glamor_program based poly_text and image_text 2014-04-03 13:07:52 -07:00
glamor_glx.c glamor: Do the same MakeCurrent(None) for GLX as we do for EGL. 2014-04-23 10:32:32 -07:00
glamor_glyphblt.c glamor: Just set the logic op to what we want at the start of all rendering. 2015-03-24 12:43:34 -07:00
glamor_gradient.c glamor: Drop CloseScreen-time GL resource cleanup code. 2015-06-29 21:43:35 -07:00
glamor_image.c glamor: Pass depth to glamor_pm_is_solid and glamor_set_planemask 2015-05-14 15:55:53 -07:00
glamor_largepixmap.c glamor: Make a bunch of single-file glamor functions static. 2015-07-02 10:05:59 -07:00
glamor_lines.c glamor: Just set the logic op to what we want at the start of all rendering. 2015-03-24 12:43:34 -07:00
glamor_picture.c glamor: Eliminate separate 'large' pixmap private structure 2015-03-24 12:34:50 -07:00
glamor_pixmap.c glamor: Drop dead glamor_es2_pixmap_read_prepare(). 2015-07-02 10:05:59 -07:00
glamor_points.c glamor: Adapt glamor_program API to handle render acceleration 2015-05-14 16:12:42 -07:00
glamor_prepare.c Convert glamor & glx to new *allocarray functions 2015-04-21 16:58:08 -07:00
glamor_prepare.h glamor: Replace fallback preparation code 2014-06-15 22:02:40 +01:00
glamor_priv.h glamor: Make a bunch of single-file glamor functions static. 2015-07-02 10:05:59 -07:00
glamor_program.c glamor: Use ARRAY_SIZE in a couple more places for consistency. 2015-07-02 10:06:36 -07:00
glamor_program.h glamor: Replace CompositeGlyphs code [v2] 2015-05-14 16:32:07 -07:00
glamor_rects.c glamor: Add a helper function for the common GL_QUADS fallback pattern. 2015-03-24 12:43:34 -07:00
glamor_render.c glamor: Use ARRAY_SIZE in a couple more places for consistency. 2015-07-02 10:06:36 -07:00
glamor_segs.c glamor: Just set the logic op to what we want at the start of all rendering. 2015-03-24 12:43:34 -07:00
glamor_spans.c glamor: Pass depth to glamor_pm_is_solid and glamor_set_planemask 2015-05-14 15:55:53 -07:00
glamor_sync.c glamor: Fix build when configured --enable-glamor --disable-xshmfence 2015-03-24 12:43:34 -07:00
glamor_text.c glamor: Adapt glamor_program API to handle render acceleration 2015-05-14 16:12:42 -07:00
glamor_transfer.c glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER 2015-03-24 12:01:38 -07:00
glamor_transfer.h glamor: Add simple upload/download functions in glamor_transfer 2014-04-03 13:07:51 -07:00
glamor_transform.c glamor: Adapt glamor_program API to handle render acceleration 2015-05-14 16:12:42 -07:00
glamor_transform.h glamor: Adapt glamor_program API to handle render acceleration 2015-05-14 16:12:42 -07:00
glamor_trapezoid.c glamor: Remove _nf rendering functions 2015-03-24 12:01:39 -07:00
glamor_triangles.c glamor: Remove _nf rendering functions 2015-03-24 12:01:39 -07:00
glamor_utils.c Convert glamor & glx to new *allocarray functions 2015-04-21 16:58:08 -07:00
glamor_utils.h glamor: Drop dead GLAMOR_FBO_DOWNLOADED flag. 2015-07-02 10:05:59 -07:00
glamor_vbo.c glamor: Drop CloseScreen-time GL resource cleanup code. 2015-06-29 21:43:35 -07:00
glamor_window.c glamor: Eliminate separate 'large' pixmap private structure 2015-03-24 12:34:50 -07:00
glamor_xv.c glamor: Just set the logic op to what we want at the start of all rendering. 2015-03-24 12:43:34 -07:00