1. 23 Apr, 2014 1 commit
  2. 03 Apr, 2014 1 commit
  3. 17 Mar, 2014 3 commits
  4. 27 Jan, 2014 3 commits
  5. 18 Dec, 2013 5 commits
    • Zhigang Gong's avatar
      1035fc72
    • Zhigang Gong's avatar
      glyphblt/polyops: Use miFunctions by default. · 4dc6d4e8
      Zhigang Gong authored
      Calling to miFunctions give some opportunities to jump to
      accelerated path, so we switch to call miFunctions rather
      than fallback to fbFunctions directly.
      4dc6d4e8
    • Chris Wilson's avatar
      Fixup glx support · 556adfa6
      Chris Wilson authored
      Renaming glamor_priv->dispatch and wrapping the access to
      the dispatch table with a function that also ensured the
      context was bound.
      
       dispatch = glamor_get_dispatch(glamor_priv);
       ...
       glamor_put_dispatch(glamor_priv);
      
      So that we catch all places where we attempt to call into GL withouta
      context. As an optimisation we can then do glamor_get_context();
      glamor_put_context() around the rendering entry points to reduce the
      frequency of having to restore the old context. (Along with allowing
      the context to be recursively acquired and making the old context part of
      the glamor_egl state.)
      Reviewed-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
      Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
      556adfa6
    • Zhigang Gong's avatar
      GLX: Enable glx support. · 430bc16c
      Zhigang Gong authored
      If we are using MESA as our GL library, then both xserver's
      GLX and glamor are link to the same library. As xserver's
      GLX has its own _glapi_get/set_context/dispatch etc, and it
      is a simplified version derived from mesa thus is not
      sufficient for mesa/egl's dri loader which is used by glamor.
      
      Then if glx module is loaded before glamoregl module, the
      initialization of mesa/egl/opengl will not be correct, and
      will fail at a very early stage, most likely fail to map
      the element buffer.
      
      Two methodis to fix this problem, first is to modify the xserver's
      glx's glapi.c to fit mesa's requirement. The second is to put
      a glamor.conf as below, to the system's xorg.conf path.
      
      Section "Module"
              Load  "glamoregl"
      EndSection
      
      Then glamor will be loaded firstly, and the mesa's libglapi.so
      will be used. As current xserver's dispatch table is the same
      as mesa's, then the glx's dri loader can work without problem.
      
      We took the second method as it don't need any change to xorg.:)
      Although this is not a graceful implementation as it depends
      on the xserver's dispatch table and the mesa's dispatch table
      is the same and the context set and get is using the same method.
      Anyway it works.
      
      As by default, xserver will enable GLX_USE_TLS. But mesa will not
      enable it, you may need to enable that when build mesa.
      
      Three pre-requirements to make this glamor version work:
      
      0. Make sure xserver has commit 66e603, if not please pull the latest
         master branch.
      1. Rebuild mesa by enable GLX_USE_TLS.
      2. Put the glamor.conf to your system's xorg.conf path and make sure
         it loaded prior to glx module.
      
      Preliminary testing shows indirect glxgears works fine.
      
      If user want to use GLES2 for glamor by using MESA, GLX will not
      work correctly.
      
      If you are not using normal MESA, for example PVR's private GLES
      implementation, then it should be ok to use GLES2 glamor and the
      GLX should work as expected. In this commit, I use gbm to check
      whether we are using MESA or non-mesa. Maybe not the best way.
      Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
      430bc16c
    • Zhigang Gong's avatar
      Added more drawing functions. · 92643353
      Zhigang Gong authored
      As we want to take over all the possible GC ops from the DDX
      layer, we need to add all the missed functions.
      This commit also fixed one bug at polylines.
      We simply drop the bugy optimized code now, as it did not
      consider of clip info.
      Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
      92643353