[Intel-gfx] [ANNOUNCE] GLAMOR 0.4 Release

Zhigang Gong zhigang.gong at linux.intel.com
Sat Apr 28 12:58:44 CEST 2012


sorry , there is a last minutes bug in v0.4,  As gradient shader has bugs, I
disable it but forgot to disable the finalization calling

which trigger a unresolved symbol when you quit the xserver and lead to you
can't back to the terminal which is really

bad.

 

I submit a patch to branch 0.4-fix,  and tag it as v0.4.1. Please use this
version instead of the v0.4 if you want

to give a try. Sorry again for that.

 

From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com] 
Sent: Saturday, April 28, 2012 6:05 PM
To: glamor at lists.freedesktop.org; intel-gfx at lists.freedesktop.org
Cc: xorg-devel at lists.x.org; Chris Wilson (chris at chris-wilson.co.uk);
'junyan.he at intel.com'; 'root'; Wang, Zhenyu Z; 'nanhai.zou at intel.com'; Fu,
Michael; Dodonov, Eugeni; Jin, Gordon; 'zhigang.gong at gmail.com'
Subject: [ANNOUNCE] GLAMOR 0.4 Release

 

Hi,

 

I'm pleased to announce a new version of glamor project. The new version

is 0.4, here are the details:

 

= What's New =

 

The latest version is 0.4. Here is the new features in this release:

1. DRI2 now works well, and texture-from-pixmap also works well.

2. Fully support glx including AIGLX, indirect glx's GL context

    coexists with glamor's GL context safely. Thanks for Chris

    Wilson's help to refine this function.

3. Optimize most of the fallback path and avoid whole pixmap 

    downloading/uploading as much as possible.

4. 1BPP picture uploading now will not fallback the whole rendering

    path.

5. Fully support all color formats for GLES2 port. Thanks for

    Lipeng's contribution and testing for the GLES2 port on

    PVR545 platform. And thanks Zhengyu to fix some PVR related problems.

6. Fixed many of the bugs for cairo-test-suite, now we get almost

    identical or even better result than UXA.

7. Implemented a fbo/texture cache pool mechanism which will reduce

    the overhead of texture/fbo destruction and creation, and bring

    overall 15-20% performance improvement. On PVR545 platform, we

    even get about 10x performance improvement with this feature.

 

= How to Enable Glamor? =

To enable the Glamor, the following steps is needed:

 

1. Rebuild the mesa using the parameter:

    --with-egl-platforms=x11,drm --with-gallium-drivers=  --enable-gbm
--enable-shared-glapi --enable-glx-tls

2. Rebuild the xf86-video-intel driver, add parameter

    --enable-glamor

    to enable glamor module which is embedded in intel driver.

3. Build and install glamor source.

4. Make sure you have the xorg configure file named glamor.conf

    at conf/glamor.conf under the directory

    /usr/share/X11/xorg.conf.d or /etc/X11/xorg.conf.d/. 

    Although make install will try to install that file to the correct

    directory. But it may failed, as if you are installing the xserver

    to a local directory, then the "make install" will install

    glamor.conf to your local directory rather than the two system

    directories. So you may need to manually copy the file to the system's 

    configuration directory. Otherwise, you will encounter segfault when

    start the xserver. Here is the content of the glamor.conf.

 

  . Section "Module"

  . Load "dri2" 

  . Load "glamoregl"

  . EndSection

 

The reason why we need to load dri2/glamoregl earlier is both glx-xserver

and glamor are a dri2 loader. And glx-xserver side has a own glapi/dispatch
table 

implementation which is a subset of the standard mesa's implementation. So
if

the glx module is loaded earlier than dri2/glamoregl, then we will get an
incomplete 

dispatch table and everything is broken in glamor then. This is also why we
need to

add --enable-glx-tls parameters when build mesa, as we need to keep mesa
align 

with Xserver's behaviors, xserver will enable-glx-tls by default, but mesa
will not.

 

After you finish all the above steps, then you can try to start x with
glamor enabled

DDX. To make sure it's the glamor running, you can refer to Xorg.0.log, and 

check that the Glamor is enabled if you can find the log like:

''__intel(0): Use GLAMOR acceleration.__''

 

= Plan =

 

We plan to release next version 0.5 at early of June. And the following
major features will be added:

1. Fully gradient optimization including linear and radial. Actually, 

    the code is already in this release, but as it has some bugs and

    we disable it currently. Will fix those bug and enable it at next

    release.

2. Large pixmap support. Currently, mesa only support 8Kx8K texture

    size, if a pixmap has larger size, we have to store it in main

    memory and is not efficient. This feature will tile a large

    pixmap to a texture array.

3. Fully trapezoid optimization. Currently, the trapezoid rendering

    is not optimized, and it will call pixman to do the rasterization

    and then call glamor_composite to do the following composition,

    and then many texture uploading overhead is triggered there.

4. Fine tune the fbo cache mechanism.

 

There is also a wiki page about glamor for your reference at:

http://www.freedesktop.org/wiki/Software/Glamor

Thanks for Junyan to prepare it.

 

The following changes since commit 6167738a70fce8b86190f3610da4363f11b34d5f:

 

  Set glamor's initial version to 0.2.0. (2012-01-11 09:10:15 +0800)

 

are available in the git repository at:

  . git://anongit.freedesktop.org/xorg/driver/glamor v0.4

 

Chris Wilson (3):

      Do not reduce a composite to a copy if we need to sample outside of
the source

      Use CLAMP_TO_BORDER in copy_n_to_n so we can sample outside of the
source

      Fixup glx support

 

Junyan He (7):

      Fixup For list.h change in xorg

      glamor_utils: Add some assistant functions to compare
pixmaps/pictures.

      Prepare for modification of gradient using shader.

      Add the feature of generating linear gradient picture by using shader.

      Add the feature for radial gradient using shader.

      Fix the problem of memory leak in gradient pixmap generating.

      Fix the bug caused by gradient picture set the stops at the same
percentage.

 

Li Peng (1):

      glamor: check driver support GEM or not

 

Peng Li (1):

      glamor_gl_dispatch: fix the dispatch initialization on GLES2.

 

Zhigang Gong (93):

      Add glFinish after glFlush.

      Release previous textre/fb when bind a new texture to a pixmap.

      Rearrange data structure and remove unused fileds.

      glamor_create_picture: Fix the format matching method.

      Add debug message for all the uploading path.

      glamor_set_pixmap_texture/screen_pixmap: Remove useless parameters.

      glamor_fbo: Introduce glamor fbo to manage all the fb/tex.

      glamor-fbo-pool: Implement fbo cache mechanism.

      glamor-fbo-pool: Enable to reuse different size fbo/texture.

      glamor_composite: Fix one bug when we have too more vertices.

      glamor_init: Should set gl_flavor before sub-module intialization.

      glamor_render: Add non-Map/Unmap vertex array for GLES.

      glamor_egl: Don't call eglDestroyImageKHR directly.

      glamor_egl: Add support for the platform doesn't have gbm.

      glamor_gles2: Consolidate gles2 pixmap format readable check to one
function.

      glamor-pixmap-upload: Create a uploading fbo with a texture only.

      glamor_create_fbo: Concentrate the fbo size/depth checking.

      glamor-fbo: Tweek the cache bucket calculation.

      glamor-gles2: Fixup the pixmap before read back if it is not readable.

      Refine CloseScreen and FreeScreen processes.

      Don't call dixSetPrivate directly.

      glamor_eglmodule: Change module name according to normalize naming
rule.

      prepare_access: Don't use fbo after it was downloaded.

      glamor_fill/tile: Fixed a tileX/tileY calculation bug.

      glamor_dump_pixmap: Add helper routine to dump pixmap.

      glamor_picture: Fix the wrong order of header file.

      glamor_pixmap: Should bind unpack buffer to 0 after the uploading.

      GLX: Enable glx support.

      glamor_tile/composite: Modify fs to re-calculate texture coords.

      glamor_render: Only recalculate texture for repeat case.

      glamor_fbo: Fix a bug when create No gl FBO pixmap.

      glamor_copyarea: Don't use GL_CLAMP_TO_BORDER when GLES2 enabled.

      For DRI swap buffers.

      Bump version to 0.3.1 for the new swap buffer API.

      configure.ac: Let's enable the AM_MAINTAINER_MODE.

      glamor_fill: Should restore alu to GXcopy.

      glamor_fbo: Added one macro to disable fbo cache.

      glamor_render: Disable gradient shader conversion due to bug.

      glamor_utils: Added debug function to dump depth 15/16 pixmap.

      gles2: Fixed color conversion for the formats except 1555 and 2101010.

      gles2: Added 1555/2101010 formats support.

      glamor_putimage: Reuse the function in pixmap.c to do the uploading.

      glamor_set_alu: Fallback for non GXcopy ops with GLES2.

      render: Enable more componentAlpha support.

      getimage: Enable getimage by default.

      glamor_set_alu: Added GXclear support at glamor_solid.

      glyphblt/polyops: Use miFunctions by default.

      glamor_color_convert: Let the caller to provide destination buffer.

      glamor_es2_pixmap_read_prepare: Just prepare the required region.

      glamor_download_sub_pixmap_to_cpu: New function to download subregion.

      fallback_optimize: Prepare for downloading/uploading subregion.

      glamor_polyfillrect: Optimize fallback path.

      glamor_polyfillrect: Fixed a potential bug if fallback at glamor_fill.

      glamor_getimage: Use glamor_download_sub_pixmap_to_cpu to get image.

      glamor_pixmap_upload_texture: Support to upload a sub region of data.

      glamor_upload/download: fix 1bpp bug.

      glamor_polylines: Don't fallback for non-solid fill.

      glamor_pixmap_ensure_fbo: Should allocate tex if we don't have one.

      glamor_gl: Use GL_ALPHA for depth 8 pixmap.

      Don't need to set GL_PACK_ROW_LENGTH/GL_UNPACK_ROW_LENGTH.

      glamor_pixmap_priv: Always return a valid private pixmap.

      Fixed a unbalanced glamor_put_dispatch.

      glamor_putimage: Reuse copy area to do the clipped copy.

      Fixed a stride problem for textured_drm pixmap.

      glamor_put_sub_pixmap: Change to use glamor_upload_sub_pixmap.

      glamor_render: Don't download whole picture when fallback.

      glamor_getspans: Reuse glamor_download_sub_pixmap.

      code clean up.

      glamor_setspans: Reuse glamor_upload_sub_pixmap.

      glamor_upload_pixmap: Use glTexImage2D for a fully update.

      pending_op: Remove the pending operations handling.

      glamor_getimage: Don't fallback to miGetImage.

      Fixed one potential texture size mismatch problem.

      glamor_putimage: Optimize for direct uploading and fallback path.

      gradient: Disable gradient for gles2.

      Disable A8 texture format for GLES2.

      glamor_copyarea: Don't access a DRM only pixmap.

      gradient: Don't need fixup flag when creating pixmap.

      glamor_render.c: Fixed repeatPad and repeatRelect.

      Fixed a1 bug.

      glamor_fbo: Added a threshold value for the fbo cache pool.

      glamor_render: Have to use eaxct size pixmap for transformation.

      glamor_copyarea: Return earlier if have zero nbox.

      glamor_blockhandler: Don't do glFinish every time.

      glamor_render: Fix the repeat none for GLES2.

      configure: Install glamor.conf to xorg.conf.d.

      Remove unecessary header file.

      Added --enable-debug configuration option.

      Added some copyright and author information.

      Fixed one typo bug when fixup a mask picture.

      Fixed an uninitialized problem at gradient shader functions.

      Fixed all unused variables warnings.

      Release 0.4.

 

Makefile.am               |    4 +-

README                    |   24 +-

ReleaseNote               |   76 ++

conf/Makefile.am          |   24 +

conf/glamor.conf          |    4 +

configure.ac              |   84 ++-

src/Makefile.am           |   14 +-

src/glamor.c              |  332 +++++---

src/glamor.h              |  172 +++--

src/glamor_addtraps.c     |    4 -

src/glamor_copyarea.c     |  179 ++--

src/glamor_copyplane.c    |    8 +-

src/glamor_copywindow.c   |    4 -

src/glamor_core.c         |  176 +++--

src/glamor_debug.h        |   31 +

src/glamor_egl.c          |  332 +++++--

src/glamor_eglmodule.c    |   12 +-

src/glamor_fbo.c          |  592 +++++++++++++

src/glamor_fill.c         |  118 ++-

src/glamor_fillspans.c    |   23 +-

src/glamor_getimage.c     |   88 +--

src/glamor_getspans.c     |   74 +--

src/glamor_gl_dispatch.c  |   62 ++-

src/glamor_gl_dispatch.h  |   20 +-

src/glamor_glext.h        |   29 +

src/glamor_glyphblt.c     |   43 +-

src/glamor_glyphs.c       |   10 +-

src/glamor_picture.c      |   57 +-

src/glamor_pixmap.c       | 1299 ++++++++++++++++++----------

src/glamor_polyfillrect.c |   32 +-

src/glamor_polylines.c    |   14 +-

src/glamor_polyops.c      |   72 +--

src/glamor_priv.h         |  348 ++++++---

src/glamor_putimage.c     |  202 ++---

src/glamor_render.c       | 2118
++++++++++++++++++++++++++++++++++++++++++---

src/glamor_setspans.c     |   74 +-

src/glamor_tile.c         |  135 ++--

src/glamor_triangles.c    |    4 -

src/glamor_utils.h        |  721 ++++++++++++++--

src/glamor_window.c       |    4 -

src/glapi.h               |  121 +++

41 files changed, 5939 insertions(+), 1801 deletions(-)

create mode 100644 ReleaseNote

create mode 100644 conf/Makefile.am

create mode 100644 conf/glamor.conf

create mode 100644 src/glamor_fbo.c

create mode 100644 src/glapi.h

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120428/6d6f0723/attachment.html>


More information about the Intel-gfx mailing list