summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-01-24Bump to version 0.6.0.glamor-egl-0.6.0Zhigang Gong1-1/+1
Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com>
2014-01-24Silent some compilation warnings.Zhigang Gong2-8/+9
Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com>
2014-01-23polylines: Handle diagonal linesAaron Watry1-20/+146
Split a diagonal line into 2 or more horizontal/vertical lines. We want to split the line into as small a number of segments as possible. E.g. line from (x,y) of (1,1)->(5,2) with a slope of .25 would be split into: (1,1)->(2,1), (3,2)->(5,2) This is basically an implementation of Bresenham's line algorithm but with FP instead of integers. If the line's horizontal-ish, then iterate over the x values, and every time the rounded y value changes, start a new rectangle. If abs(slope) is > 1, then iterate over the y values instead. If the slope is == 1, then we're basically stuck drawing a bunch of points. Partially Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=68524 Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-01-17Fix memory leak in _glamor_copy_n_to_n()Michel Dänzer1-2/+3
It would leak the memory allocated for the region rects in some cases. Found with valgrind. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-01-17glamor: Fix coordinates handling for composite source/mask picturesAnthony Waters1-8/+8
There were actually two issues with the original code I believe, the first is that the call to glamor_convert_gradient_picture wasn't properly referencing the coordinates of the source/mask pictures. The second, was that the updated references (x_temp/y_temp) were also improperly set, they should always be 0 because the temp pictures are new ones that start at (0, 0). The reason it worked in certain cases and it didn't in others (notably the tray icons) was due to the numbers working out based on the call to glamor_composite. In the cases that it did work extent->x1 would equal x_dest and extent->y1 would equal y_dest, making it so what was actually passed into glamor_convert_gradient_picture and the settings for x_temp/y_temp were correct. However, for the case when extent->x1 wouldn't equal x_dest and extent->y1 wouldn't equal y_dest (for example with the tray icons) then the wrong parameters get passed into glamor_convert_gradient_picture and x_temp/y_temp are set improperly. Fixes issues with tray icons not appearing properly in certain cases. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64738 Signed-Off-by: Anthony Waters <awaters1@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16libglamoregl: remove -I$(top_srcdir)/srcGaetan Nadon1-2/+1
Automake always provide -I. It is at the beginning of the list of compiler options. Not needed either to find glamor_egl.c source. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16Make: remove cruft copied over from the X server makefilesGaetan Nadon2-20/+1
In toplevel makefile: nostdinc: only xserver, no other X modules aclocaldir: no local macros to install xkb_path: xserver only "Gross hack": xserver only In src/makefile: SOLARIS_ASM_CFLAGS; server only XORG_INCS: undefined variable DIX_CFLAGS: undefined variable Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16Makefile: remove redundant distribution directivesGaetan Nadon1-4/+0
The pc.in specified in AC_CONFIG_FILES are always distributed SUBDIRS do not contain variables so DIST_SUBDIRS not required autogen.sh should not be distributed in tarballs. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16autoconf: fix warning by replacing the deprecated AC_HELP_STRINGGaetan Nadon1-2/+2
Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16configure.ac: the product in the url should be "xorg"Gaetan Nadon1-2/+2
The component is glamor, but the product is "xorg". Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16README: fix typos and update informationGaetan Nadon1-14/+16
- Fix a few typos - Update the bottom section as glamor is a component of xorg and not a product - Provide glamor information following the same boiler plate pattern as all the other xorg modules Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16COPYING: update the file to reflect the licenses in the source codeGaetan Nadon1-1/+122
Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16.gitignore: use default X.Org toplevel gitignoreGaetan Nadon2-0/+73
Same pattern as all other modules. This module was not git ignoring any file. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-16glamor: fix leak in xv code.Dave Airlie1-1/+1
This loop needed to go one higher, not sure if this fixes the leak MrCooper was seeing on irc, but it fixes a leak. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-09Fix glamor_egl->egl_create_image_khr makes pointer from integerGaetan Nadon1-1/+1
This is a warning, but a real problem can occur on some system. Reported-by: Fabio Pedretti <fabio.ped@libero.it> Reviewed-by: Axel Davy <davyaxel@free.fr> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-09Fix configure to disable building Dri3 support when GBM v9 is missingAxel Davy1-2/+5
Signed-off-by: Axel Davy <axel.davy@ens.fr> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-12-06Add DRI3 support to glamorAxel Davy6-14/+405
This implements some DRI3 helpers to help the DDXs using glamor to support DRI3. Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-20Fixed some compilation warning/error or error checking.Zhigang Gong2-6/+11
There is one compilation error ,cast int to pointer, when built without libgbm, reported by Gaetan Nadon. And some error checking after memory allocation, reported by Seth Arnold. There are still some similar issues in the largepixmap implementation. They are relatively more complicate due to the heavy usage of RegionXXX APIs which may allocate implicitly. Will fix them in the future. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Tested-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-19Allow to create textured pixmaps from gbm_bo without using gem namesAxel Davy2-0/+47
This implements glamor_egl_create_textured_pixmap_from_gbm_bo, which is similar to glamor_egl_create_textured_pixmap, except it takes a gbm_bo as argument. Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-19config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILESGaetan Nadon1-1/+2
Fix Automake warning: AC_OUTPUT should be used without arguments. www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-06glamor: remove unused variableFabio Pedretti1-1/+0
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-06fixup picture in SetWindowPixmapMaarten Lankhorst4-2/+41
When creating a window with recordmydesktop running, the following may happen: create picture 0x1cd457e0, with drawable 0x1327d1f0 (SetWindowPixmap is called) destroy picture 0x1cd457e0, with drawable 0x1cd65820 Obtaining format for pixmap 0x1327d1f0 and picture 0x1cd457e0 ==7989== Invalid read of size 4 ==7989== at 0x8CAA0CA: glamor_get_tex_format_type_from_pixmap (glamor_utils.h:1252) ==7989== by 0x8CAD1B7: glamor_download_sub_pixmap_to_cpu (glamor_pixmap.c:1074) ==7989== by 0x8CA8BB7: _glamor_get_image (glamor_getimage.c:66) ==7989== by 0x8CA8D2F: glamor_get_image (glamor_getimage.c:92) ==7989== by 0x29AEF2: miSpriteGetImage (misprite.c:413) ==7989== by 0x1E7674: compGetImage (compinit.c:148) ==7989== by 0x1F5E5B: ProcShmGetImage (shm.c:684) ==7989== by 0x1F686F: ProcShmDispatch (shm.c:1121) ==7989== by 0x15D00D: Dispatch (dispatch.c:432) ==7989== by 0x14C569: main (main.c:298) ==7989== Address 0x1cd457f0 is 16 bytes inside a block of size 120 free'd ==7989== at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7989== by 0x228897: FreePicture (picture.c:1477) ==7989== by 0x228B23: PictureDestroyWindow (picture.c:73) ==7989== by 0x234C19: damageDestroyWindow (damage.c:1646) ==7989== by 0x1E92C0: compDestroyWindow (compwindow.c:590) ==7989== by 0x20FF85: DbeDestroyWindow (dbe.c:1389) ==7989== by 0x185D46: FreeWindowResources (window.c:907) ==7989== by 0x1889A7: DeleteWindow (window.c:975) ==7989== by 0x17EBF1: doFreeResource (resource.c:873) ==7989== by 0x17FC1B: FreeClientResources (resource.c:1139) ==7989== by 0x15C4DE: CloseDownClient (dispatch.c:3402) ==7989== by 0x2AB843: CheckConnections (connection.c:1008) ==7989== (II) fail to get matched format for dfdfdfdf The fix is to update the picture pointer when the window pixmap is changed, so it moves the picture around with the window rather than the pixmap. This makes FreePicture work correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71088 Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-02Fixed an incorrect printf format.Zhigang Gong1-1/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69573 Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-31Remove useless return statementBrian Paul1-1/+0
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-31Remove redundant dispatch->glEnable(GL_TEXTURE_2D)Brian Paul1-1/+0
The same call was already made a few lines earlier. Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-31Fix _glamor_set_spans() bug (re-used 'n' variable)Brian Paul1-4/+4
n was used as a function parameter. But inside the for (i=1..n) loop, n got reassigned as REGION_NUM_RECTS() and then decremented to zero by the while loop. This caused the for loop to only iterate once instead of 'n' times. This patch renames the n parameter to numPoints. Found by code inspection. Untested. Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-19glamor: enable Xv by defaultAlex Deucher1-6/+5
Also move the configure option out of the middle of the debug option handling. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-08glamor_render: fix PictFiltersGrigori Goronzy1-0/+9
Add Fast/Good/Best and appropriately map to Nearest and Bilinear. Additionally, add a fallback path for unsupported filters. Notably, this fixes window shadow rendering with Compiz, which uses PictFilterConvolution for some odd reason. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-08Use GL_STATIC_DRAW for element index bufferGrigori Goronzy1-2/+2
The buffer never changes anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-10-08Use glDrawRangeElements instead of glDrawElementsGrigori Goronzy5-0/+23
This lets us explicitly specify the range of vertices that are used, which the OpenGL driver can use for optimization. Particularly, it results in lower CPU overhead with Mesa-based drivers. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-09-27Shoud return null subpixmap if we fail to get a valid map address.Zhigang Gong1-0/+4
The patch is prepared by Raul Fernandes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86693 Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-09-27glamor: add initial Xv supportDave Airlie6-2/+692
This does YV12 and I420 for now, not sure if we can do packed without a GL extension. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-24Reset traps_count and ptrap when necessary for the next trapezoid cliprectMichel Dänzer1-0/+3
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64912 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: He Junyan <junyan.he@inbox.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-09-18Fix RegionContainsRect test for PutImageMichel Dänzer1-1/+1
The return value of RegionContainsRect() is not a boolean but an enum indicating that the region contains the rectangle completely, partially or not at all. We can only take the PutImage fastpath when the region contatins the rectangle completely. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65964 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-08-26Bump to 0.5.1.v0.5.1glamor-egl-0.5.1Zhigang Gong1-1/+1
The change in this version is only about bug fix and package build fix. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-08-26Use GBM_LIBS and GBM_CFLAGSChristian König1-2/+8
Signed-off-by: Christian König <christian.koenig at amd.com> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
2013-03-18Don't use AC_PROG_LIBTOOLArmin K1-1/+0
Autoconf only needs libtool macros which are copied when autoreconf is run. There is no need for looking for "libtool" program in PATH. This properly disables static libraries from being built and installed. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-03-18First attempt to make libglamor.so shared versioned libraryArmin K2-8/+6
As recommended by Michel in this thread reply: http://lists.freedesktop.org/archives/glamor/2013-March/000305.html v2: Correct shared library location in glamor.pc.in Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62259 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-03-18Properly dist necesary headersArmin K1-0/+1
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-03-18Silence Automake 1.13 warningsArmin K1-1/+1
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-03-18glamoregl: Use xf86ScreenToScrn()Michel Dänzer1-10/+10
Fixes crashes when glamor is used for a GPU screen with xserver 1.13 or newer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57200#c17 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-29glamor_utils: fix unlikely define useDave Airlie1-2/+1
using a define across a split line expression is failure, compiling with warnings shows this up. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-29glamor: add compiler.hDave Airlie1-0/+1
This is also required for distchecking. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-29glamor: fix make distcheck part 1Dave Airlie1-1/+7
This just adds the headers, then it falls over on the sdk_HEADERS as it overrides proper install paths by the looks of it. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-13glamor_compositerects: Need to initialize region before fallback.Zhigang Gong1-10/+10
As we need to call DamageRegionAppend even for fallback path, we must initialize the region before do that. Pointed by Igor Vagulin. https://bugs.freedesktop.org/show_bug.cgi?id=56940 Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2012-11-06Don't use glBlitFramebufferEXT for overlapping copies.Michel Dänzer1-1/+2
According to the GL_EXT_framebuffer_blit spec, the result of doing so is undefined. But we need well-defined results. :) Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-08-10Bump to version 0.5.v0.5glamor-egl-0.5.0Zhigang Gong1-1/+1
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2012-08-10Increase vbo size to 64K verts.Zhigang Gong2-2/+1
This commit will benefit vertex stressing cases such as aa10text/rgb10text, and can get about 15% performance gain. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Acked-by: Junyan <junyan.he@linux.intel.com>
2012-08-10Silence compilation warnings.Zhigang Gong17-337/+280
After increase to gcc4.7, it reports more warnings, now fix them. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: Junyan He<junyan.he@linux.intel.com>
2012-08-08glamor_largepixmap: Fixed a bug in repeat clipping.Zhigang Gong1-18/+6
If the repeat direction only has one block, then we need to set the dx/dy to cover all the extent. This commit also silence some compilation warnings. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>