diff options
author | Dave Airlie <airlied@redhat.com> | 2016-01-12 18:13:46 +1000 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-01-26 12:02:42 -0800 |
commit | e7308b6c77561df44c04f81509f8ada678705d94 (patch) | |
tree | 71f2de2d4f24cd7e6ed8eca8b68dd0dedacdb55f /glamor/glamor_priv.h | |
parent | cab14a9a08ff06bc4cbef79c7be8f1d07c07ebf9 (diff) |
glamor: Add support for CA rendering in a single pass.
It's been on the list to add dual source blending support to avoid the
two pass componentAlpha code. Radeon has done this for a while in
EXA, so let's add support to bring glamor up to using it.
This adds dual blend to both render and composite glyphs paths.
Initial results show close to doubling of speed of x11perf -rgb10text.
v2: Fix breakage of all of CA acceleration for systems without
GL_ARB_blend_func_extended. Add CA support for all the ops we
support in non-CA mode when blend_func_extended is present. Clean
up some comments and formatting. (changes by anholt)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'glamor/glamor_priv.h')
-rw-r--r-- | glamor/glamor_priv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 8ed53e7fb..e49aee5ab 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -86,6 +86,12 @@ typedef struct glamor_composite_shader { }; } glamor_composite_shader; +enum ca_state { + CA_NONE, + CA_TWO_PASS, + CA_DUAL_BLEND, +}; + enum shader_source { SHADER_SOURCE_SOLID, SHADER_SOURCE_TEXTURE, @@ -106,6 +112,7 @@ enum shader_in { SHADER_IN_NORMAL, SHADER_IN_CA_SOURCE, SHADER_IN_CA_ALPHA, + SHADER_IN_CA_DUAL_BLEND, SHADER_IN_COUNT, }; @@ -202,6 +209,7 @@ typedef struct glamor_screen_private { Bool has_rw_pbo; Bool use_quads; Bool has_vertex_array_object; + Bool has_dual_blend; int max_fbo_size; struct xorg_list |