glamor: Changes to 'master'
Zhigang Gong
gongzg at kemper.freedesktop.org
Fri Jun 15 04:34:46 PDT 2012
src/Makefile.am | 2
src/glamor.c | 62 +
src/glamor.h | 4
src/glamor_copyarea.c | 341 +++++++--
src/glamor_core.c | 18
src/glamor_debug.h | 4
src/glamor_fbo.c | 149 +++-
src/glamor_fill.c | 102 ++
src/glamor_getimage.c | 4
src/glamor_glyphs.c | 228 ++++--
src/glamor_gradient.c | 48 -
src/glamor_largepixmap.c | 1336 ++++++++++++++++++++++++++++++++++++++
src/glamor_picture.c | 10
src/glamor_pixmap.c | 404 +++++++++--
src/glamor_priv.h | 238 ++++++
src/glamor_putimage.c | 8
src/glamor_render.c | 1009 ++++++++++++++---------------
src/glamor_tile.c | 197 ++++-
src/glamor_trapezoid.c | 1624 +++++++++++++++++++++++++++++++++++++++++++++++
src/glamor_utils.h | 690 ++++++++++++++++++-
20 files changed, 5490 insertions(+), 988 deletions(-)
New commits:
commit 08e86e4b64b5c36b5d1db0d95effb79d82842f14
Author: Junyan He <junyan.he at linux.intel.com>
Date: Fri Jun 15 09:00:15 2012 +0800
Fix a bug for trapezoid clip
We find in some cases the trapezoid will be render as a triangle and
the left edge and right edge will cross with each other just bellow
the top or over the bottom. The distance between the cross poind and
the top or bottom is less than pixman_fixed_1_minus_e, so after the
fixed converted to int, the cross point has the same value with the
top or botton and the triangle should not be affected. But in our
clip logic, the cross point will be clipped out. So add a logic
to fix this problem.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit d9202dc2cb6aadfbc14983279649c2285c3e6501
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Fri Jun 15 13:31:30 2012 +0800
gles2_largepixmap: force clip for a non-large pixmap.
One case we need force clip when download/upload a drm_texture
pixmap. Actually, this is only meaningful for testing purpose.
As we may set the max_fbo_size to a very small value, but the
drm texture may exceed this value but the drm texture pixmap
is not largepixmap. This is not a problem with OpenGL. But for
GLES2, we may need to call glamor_es2_pixmap_read_prepare to
create a temporary fbo to do the color conversion. Then we have
to force clip the drm pixmap here to avoid large pixmap handling
at glamor_es2_pixmap_read_prepare.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 291402b1a9abd7a1e747c71b2e7c7104d5061614
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Fri Jun 15 09:03:42 2012 +0800
glamor_emit_composite_vert: Optimize to don't do two times vert coping.
We change some macros to put the vert to the vertex buffer
directly when we cacluating it. This way, we can get about
4% performance gain.
This commit also fixed one RepeatPad bug, when we RepeatPad
a not eaxct size fbo. We need to calculate the edge. The edge
should be 1.0 - half point, not 1.0.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 741a065f55fc78d624ef9c423d8c36d8d06a95c3
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Fri Jun 15 08:46:24 2012 +0800
glamor_glyphs: Before get upload to cache flush is needed.
When we can't get a cache hit and have to evict one cache
entry to upload new picture, we need to flush the previous
buffer. Otherwise, we may get corrupt glyphs rendering result.
This is the reason why user-font-proxy may fail sometimes.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 996194140ce10b8c8b2b1cf8774c857fed4a6f24
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Fri Jun 15 08:43:37 2012 +0800
copyarea: Cleanup the error handling logic.
Should use ok rather than mixed ok or ret.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 0604eb4aadf0162e7971b2e8b138174e376eb5e4
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Tue Jun 12 18:21:10 2012 +0800
trapezoid: Fallback to sw-rasterize for largepixmap.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 566ba215aac7c191d85410b8794d28b561e0aff5
Author: Junyan He <junyan.he at linux.intel.com>
Date: Tue Jun 5 03:21:03 2012 +0800
Use the direct render path for A1
Because when mask depth is 1, there is no Anti-Alias at all,
in this case, the directly render can work well and it is faseter.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit 0bc9a5de83063976902866e4175effedd3ae5a1f
Author: Junyan He <junyan.he at linux.intel.com>
Date: Mon Jun 4 07:52:05 2012 +0800
Add the trapezoid direct render logic
We firstly get the render area by clipping the trapezoid
with the clip rect, then split the clipped area into small
triangles and use the composite logic to generate the result
directly. This manner is fast but have the problem that
some implementation of GL do not implement the Anti-Alias
of triangles fill, so the edge sometimes has sawtooth. It is
not acceptable when use trapezoid to approximate circles and
wide lines.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit 2133d22a7e57d0151051106fa15464218ae88385
Author: Junyan He <junyan.he at linux.intel.com>
Date: Mon Jun 4 07:22:27 2012 +0800
Modilfy the composite logic to two phases
We seperate the composite to two phases, firstly to
select the shader according to source type and logic
op, setting the right parameters. Then we emit the
vertex array to generate the dest result.
The reason why we do this is that the shader may be
used to composite no only rect, trapezoid and triangle
render function can also use it to render triangles and
polygens. The old function glamor_composite_with_shader
do the whole two phases work and can not match the
new request.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit 445ee22ac67976d8226f2ba743a3a6897781c404
Author: Junyan He <junyan.he at linux.intel.com>
Date: Mon Jun 4 03:18:40 2012 +0800
Add macro of vertex setting for triangle stripe
Add macro of vertex setting for triangle stripe draw,
and make the code clear.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit 2f6aa7a8d3fcae266b174fd629131616ef09686a
Author: RobinHe <robinhe at robinhe-desktop.lan>
Date: Sat Jun 2 22:00:09 2012 +0800
Use shader to generate the temp trapezoid mask
The old manner of trapezoid render uses pixman to
generate a mask pixmap and upload it to the GPU.
This effect the performance. We now use shader to
generate the temp trapezoid mask to avoid the
uploading of this pixmap.
We implement a anti-alias manner in the shader
according to pixman, which will caculate the area
inside the trapezoid dividing total area for every
pixel and assign it to the alpha value of that pixel.
The pixman use a int-to-fix manner to approximate but
the shader use float, so the result may have some
difference.
Because the array in the shader has optimization problem,
we need to emit the vertex of every trapezoid every
time, which will effect the performance a lot. Need to
improve it.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit 5f03910369012e1d9b973142f704d8488df57f59
Author: RobinHe <robinhe at robinhe-desktop.lan>
Date: Sat Jun 2 21:52:25 2012 +0800
Create the file glamor_triangles.c
Create the file glamor_trapezoid.c, extract the logic
relating to trapezoid from glamor_render.c to this file.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
commit 7ed0d760fbd4378c59fde4d88adc6eca2cb3ea95
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 14:02:59 2012 +0800
Enable large pixmap by default.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 3ed87725dc79c6dd51598a4ed060ad8c53306d55
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 13:05:48 2012 +0800
largepixmap: Fix the selfcopy issue.
If the source and destination are the same pixmap/fbo, and we
need to split the copy to small pieces. Then we do need to
consider the sequence of the small pieces when the copy area
has overlaps. This commit take the reverse/upsidedown into
the clipping function, thus it can generate correct sequence
and avoid corruption self copying.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit d3e0c76f8cd17784b0b57ddaafe30c9996ac67de
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 11:42:46 2012 +0800
largepixmap: Support self composite for large pixmap.
The simplest way to support large pixmap's self compositing
is to just clone a pixmap private data structure, and change
the fbo and box to point to the correct postions. Don't need
to copy a new box.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit f3c06ebd10f1518f11d75ac563f1d671df51935a
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 09:36:56 2012 +0800
largepixmap: Add transform/repeat/reflect/pad support.
This commit implement almost all the needed functions for
the large pixmap support. It's almost complete.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 503dc69c03421f2ea42089137c024eca2a137ff6
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 02:27:00 2012 +0800
glamor_getimage: should call miGetimage if failed to get sub-image.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit a0ae6978c712f5f8c325553d08d085693b9e6518
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 02:24:41 2012 +0800
glamor_putimage: Correct the wrong stride value.
We should not use the destination pixmap's devkind as the input
image data's stride.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit b0257c3a67798d44e0f8218ccc798c5392729c62
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 02:15:53 2012 +0800
largepixmap: Enable glamor_composite.
Now we start to enable glamor_composite on large pixmap.
We need to do a three layer clipping to split the dest/source/mask
to small pieces. This commit only support non-transformation and
repeat normal case.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit e836be57a45c3acee73251190593a882428fa7ed
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 01:52:14 2012 +0800
largepixmap: Implement infrastructure for large pixmap.
Added infrastructure for largepixmap, this commit implemented:
1. Create/Destroy large pixmap.
2. Upload/Download large pixmap.
3. Implement basic repeat normal support.
3. tile/fill/copyarea large pixmap get supported.
The most complicated part glamor_composite still not implemented.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
commit 25ba2dcf0e9858edc93fafa0d77f6d1a574bd833
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date: Mon Jun 11 01:02:30 2012 +0800
glamor_largepixmap: first commit for large pixmap.
This is the first commit to add support for large pixmap.
The large here means a pixmap is larger than the texutre's
size limitation thus can't fit into one single texutre.
The previous implementation will simply fallback to use a
in memory pixmap to contain the large pixmap which is
very slow in practice.
The basic idea here is to use an array of texture to hold
the large pixmap. And when we need to get a specific area
of the pixmap, we just need to compute/clip the correct
region and find the corresponding fbo.
We need to implement some auxiliary routines to clip every
rendering operations into small pieces which can fit into
one texture.
The complex part is the transformation/repeat/repeatReflect
and repeat pad and their comination. We will support all of
them step by step.
This commit just add some necessary data structure to represent
the large pixmap, and doesn't change any rendering process.
This commit doesn't add real large pixmap support.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
More information about the xorg-commit
mailing list