1. 26 Jan, 2016 1 commit
    • Dave Airlie's avatar
      glamor: Add support for CA rendering in a single pass. · e7308b6c
      Dave Airlie authored
      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: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
  2. 14 May, 2015 2 commits
    • Keith Packard's avatar
      glamor: Replace CompositeGlyphs code [v2] · b0d2e010
      Keith Packard authored
      New composite glyphs code uses the updated glamor program
      infrastructure to create efficient shaders for drawing render text.
      Glyphs are cached in two atlases (one 8-bit, one 32-bit) in a simple
      linear fashion. When the atlas fills, it is discarded and a new one
      v2: Eric Anholt changed the non-GLSL 130 path to use quads instead of
      two triangles for a significant performance improvement on hardware
      with quads. Someone can fix the GLES quads emulation if they want to
      make it faster there.
      v3: Eric found more dead code to delete
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
    • Keith Packard's avatar
      glamor: Adapt glamor_program API to handle render acceleration · 1b745e0c
      Keith Packard authored
      This extends the existing API to support options needed for render
      accleration, including an additional fragment, 'combine', (which
      provides a place to perform the source IN mask operation before the
      final OP dest state) and an additional 'defines' parameter which
      provides a way to add target-dependent values without using a uniform.
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
  3. 24 Mar, 2015 1 commit
  4. 15 Jun, 2014 2 commits
    • Keith Packard's avatar
      glamor: Add glamor_program based 0-width dashed lines · d18f5801
      Keith Packard authored
      This makes sure the pixelization for dashed lines matches non-dashed
      lines, while also speeding them up.
      v2: Switch to glamor_make_current
      v3: Create dash pattern pixmap without GLAMOR_CREATE_FBO_NO_FBO
      v4: Adopt suggestions from Eric's review:
        - Drops power-of-two alignment of our line vertex data, simplifying
          the code.
        - Stops reading from the VBO.  While on keithp's and my machines the
          VBO is mapped cached, on many implementations it will be mapped WC,
          making those reads extremely expensive.
        - Style fixes (line wrapping, spaces around operators).
      v5: Adopt suggestions from Markus' review:
        - Use max when computing zero-width dashed line length.
          Don't open code max here.
        - Embed CoordModePrevious into VBO writing for dashed lines
          Instead of pre-computing the coord mode previous results, just
          embed this in the loop which fills the vertex buffer. Saves
          re-writing the request buffer, and shortens the code a bit
      v6: Export glamor_destroy_gc for UXA
          UXA needs to call glamor_destroy_gc from its GCFuncs, so export
      Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
    • Keith Packard's avatar
      glamor: Add glamor_program based copy acceleration · 45ebc4e3
      Keith Packard authored
      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
      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's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarMarkus Wick <markus@selfnet.de>
  5. 26 Mar, 2014 1 commit