summaryrefslogtreecommitdiff
path: root/glamor/glamor_priv.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-02-01 13:58:14 -0800
committerAdam Jackson <ajax@redhat.com>2016-03-10 11:12:43 -0500
commit0b4c0c75d06f3dbe92be1a26a637e9f05529cb3d (patch)
tree64df0f3068a30650ca3cff0c12509aa40a22bdb1 /glamor/glamor_priv.h
parentb0cc04992ced5d96bb5c52fc1e5c868797cc0a17 (diff)
glamor: Replace "finish access" shader with texture swizzling.
For pictures without alpha, and for most other formats for GLES2, we would make a temporary FBO, make another temporary texture, upload our GLAMOR_MEMORY pixmap to the texture, then run the "finish access" shader across it to swizzle its values around into the temporary FBO (which we would use for a single Render operation and then throw away). We can simplify everything by using GL_ARB_texture_swizzle (or its GLES3 counterpart). It's just not worth the complexity to try to improve the performance of this already low-performance path (SHM pixmaps + Render) on GLES2. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor/glamor_priv.h')
-rw-r--r--glamor/glamor_priv.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 6656b28f4..8f994ea19 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -208,6 +208,7 @@ typedef struct glamor_screen_private {
Bool use_quads;
Bool has_vertex_array_object;
Bool has_dual_blend;
+ Bool has_texture_swizzle;
Bool is_core_profile;
int max_fbo_size;
@@ -286,11 +287,6 @@ typedef struct glamor_screen_private {
[glamor_program_alpha_count]
[SHADER_DEST_SWIZZLE_COUNT];
- /* shaders to restore a texture to another texture. */
- GLint finish_access_prog[2];
- GLint finish_access_revert[2];
- GLint finish_access_swap_rb[2];
-
/* glamor gradient, 0 for small nstops, 1 for
large nstops and 2 for dynamic generate. */
GLint gradient_prog[SHADER_GRADIENT_COUNT][3];
@@ -586,8 +582,6 @@ void glamor_gldrawarrays_quads_using_indices(glamor_screen_private *glamor_priv,
unsigned count);
/* glamor_core.c */
-void glamor_init_finish_access_shaders(ScreenPtr screen);
-
Bool glamor_get_drawable_location(const DrawablePtr drawable);
void glamor_get_drawable_deltas(DrawablePtr drawable, PixmapPtr pixmap,
int *x, int *y);