path: root/glamor/glamor_program.h
diff options
authorKeith Packard <>2014-03-15 13:31:18 -0700
committerKeith Packard <>2014-06-02 11:09:18 -0700
commitba82e4052e4a29e444908c975b0304dd55c44ade (patch)
tree0f4df43c598508bd6e33325753d17c01dcea83b8 /glamor/glamor_program.h
parent39f85c29f346b767482f177270b3918de485a314 (diff)
glamor: Add glamor_program based copy acceleration
Paints with textures, using a temporary buffer for overlapping copies Performs CPU to GPU transfers for pixmaps in memory. Accelerates copy plane when both objects are in the GPU. Includes copy_window acceleration too. v2: Use NV_texture_barrier for non-overlapping copies within the same drawable v3: Switch to glamor_make_current v4: Do overlap check on the bounding box of the region rather than on individual boxes v5: Use Eric Anholt's re-written comments which provide a more accurate description of the code v6: Use floating point uniform for copy plane bit multiplier. This avoids an int to float conversion in the copy plane fragment shader. Use round() instead of adding 0.5 in copy plane. round() and +0.5 end up generating equivalent code, and performance measurements confirm that they are the same speed. Round() is a bit clearer though, so we'll use it. Signed-off-by: Keith Packard <> Reviewed-by: Eric Anholt <> Reviewed-by: Markus Wick <>
Diffstat (limited to 'glamor/glamor_program.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/glamor/glamor_program.h b/glamor/glamor_program.h
index 88efc3593..118f97838 100644
--- a/glamor/glamor_program.h
+++ b/glamor/glamor_program.h
@@ -29,6 +29,7 @@ typedef enum {
glamor_program_location_bg = 2,
glamor_program_location_fill = 4,
glamor_program_location_font = 8,
+ glamor_program_location_bitplane = 16,
} glamor_program_location;
typedef enum {
@@ -61,6 +62,8 @@ struct _glamor_program {
GLint fill_size_uniform;
GLint fill_offset_uniform;
GLint font_uniform;
+ GLint bitplane_uniform;
+ GLint bitmul_uniform;
glamor_program_location locations;
glamor_program_flag flags;
glamor_use prim_use;