Re: [PATCH] Fix NO_LOCAL_CLIENT_CRED build
Jon TURNEY jon.tur...@dronecode.org.uk writes: Please consider picking a version you like and applying it, or let me know how I can make this patch acceptable. I'll just apply your original patch and mark it as reviewed-by me. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 4/4] glamor: Drop a bunch of glamor_priv == NULL checks.
Keith Packard kei...@keithp.com writes: Eric Anholt e...@anholt.net writes: Now that it's always non-null when the pixmap is non-null, we don't need so much of this. glamor_get_pixmap_private() itself still accepts a NULL pixmap and returns NULL, because of glamor_render.c Might want to change glamor_pixmap_type to explicitly make GLAMOR_MEMORY be zero just to make it clear that fbCreatePixmap returns a valid glamor pixmap? Sounds good! signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 2/4] glamor: Drop dead glamor_is_large_picture().
Eric Anholt e...@anholt.net writes: It died as of keithp's new glyphs code. Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Keith Packard kei...@keithp.com -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 1/4] glamor: Reuse the glamor_is_memory helper.
Eric Anholt e...@anholt.net writes: Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Keith Packard kei...@keithp.com -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 3/4] glamor: Ask the server to always allocate our private.
Eric Anholt e...@anholt.net writes: This avoids a lot of screwing around to attach our privates later. It means that non-glamor pixmaps now gain 120 bytes of glamor privates on 64-bit (which has quite a bit of fixable bloat), and glamor pixmaps take one less pointer of storage (not counting malloc overhead). Note that privates start out zero-filled, which matches the callocs we were doing when making our own privates, and in the case of an fb pixmap that has a priv where it didn't before, the type ends up being GLAMOR_MEMORY as we would want. Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Keith Packard kei...@keithp.com -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 4/4] glamor: Drop a bunch of glamor_priv == NULL checks.
Eric Anholt e...@anholt.net writes: Now that it's always non-null when the pixmap is non-null, we don't need so much of this. glamor_get_pixmap_private() itself still accepts a NULL pixmap and returns NULL, because of glamor_render.c Might want to change glamor_pixmap_type to explicitly make GLAMOR_MEMORY be zero just to make it clear that fbCreatePixmap returns a valid glamor pixmap? Otherwise, this all looks correct to me. Reviewed-by: Keith Packard kei...@keithp.com -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [git pull] Xwayland fix
Olivier Fourdan ofour...@redhat.com writes: Chris Wilson (1): xwayland: keep temp files out of the client mask Merged. 0cd2280..991712f master - master -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 4/4] glamor: Drop a bunch of glamor_priv == NULL checks.
Michel Dänzer mic...@daenzer.net writes: On 08.07.2015 09:26, Eric Anholt wrote: diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 0a7de82..a923b7a 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -756,8 +756,8 @@ glamor_translate_boxes(BoxPtr boxes, int nbox, int dx, int dy) || _depth_ == 30\ || _depth_ == 32) -#define GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv) (pixmap_priv pixmap_priv-is_picture == 1) -#define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)(pixmap_priv pixmap_priv-gl_fbo == GLAMOR_FBO_NORMAL) +#define GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv) (pixmap_priv-is_picture == 1) +#define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)(pixmap_priv-gl_fbo == GLAMOR_FBO_NORMAL) I guess these macros could be removed now, but that's for later. The series is Reviewed-by: Michel Dänzer michel.daen...@amd.com Thanks! The get_pixmap_priv_from_fd() function isn't attribute-const, so we want to be using these macros instead of glamor_pixmap_has_fbo() generally, since pixmap private lookups can't be CSEed. We could expand the macros in the code, but before that I'm hoping to get rid of the gl_fbo enum, too. It feels like I'm close. GLAMOR_PIXMAP_PRIV_IS_PICTURE is dead in another series that will arrive soon. signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [git pull] Xwayland fix
Olivier Fourdan ofour...@redhat.com writes: Hi Keith, Could you please pull from the following git tree the fix for Xwayland that Chris contributed for bug https://bugs.freedesktop.org/show_bug.cgi?id=91072? Your repository isn't accessible via git:// protocol, which means only people with fd.o accounts can fetch from it. I think all you'd need to do is touch the git-daemon-export-ok file and it should work. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] glamor_egl: Properly free resources on init-error and exit
Hans de Goede hdego...@redhat.com writes: glamor_egl_init() was not undoing any of the init steps on init error, add an glamor_egl_cleanup() function and use this both on error and on exit to cleanup the various resources. Even on a clean exit eglTerminate() was not being called, causing the fd dup()-ed by eglInitialize() to stay open, call eglTerminate() from the new glamor_egl_cleanup() to fix this. Signed-off-by: Hans de Goede hdego...@redhat.com Reviewed-by: Eric Anholt e...@anholt.net I'll stick it in my next pull request, unless keithp grabs it first. signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] xserver updates
Adam Jackson a...@redhat.com writes: Adam Jackson (22): present: static cleanup parser: static cleanup dri3: Remove unbuilt dri3_event.c dri3: static cleanup dix: Unexport various implementation details randr: Unexport some implementation details render: Hide/unexport some implementation details xfree86: Hide some pre-randr mode validation details dga: Hide a bunch of implementation details xge: Hide some implementation details vidmode: Hide implementation details xfixes: Unexport xfixes.h rootless: Build unconditionally fb: Make rootless-agnostic mi: Remove questionable optimization from the rootless path dix: unifdef pWin-rootlessUnhittable dix: Restore PaintWindow screen hook rootless: Genericize the config header a bit glx/swrast: Do more GLX extension setup glx: Implement GLX_ARB_context_flush_control atom: Bump initial table size atom: make FreeAtom static Looks like this is ready to merge, but I couldn't bisect through this when attempting to find the cause of the dixGetGlyphs warning, and the resulting build generates a pile of warnings. So, someone needs to clean up the patch series so that each point along the sequence builds, and the result builds without warnings. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] glamor_egl: Properly free resources on init-error and exit
Eric Anholt e...@anholt.net writes: Hans de Goede hdego...@redhat.com writes: glamor_egl_init() was not undoing any of the init steps on init error, add an glamor_egl_cleanup() function and use this both on error and on exit to cleanup the various resources. Even on a clean exit eglTerminate() was not being called, causing the fd dup()-ed by eglInitialize() to stay open, call eglTerminate() from the new glamor_egl_cleanup() to fix this. Signed-off-by: Hans de Goede hdego...@redhat.com Reviewed-by: Eric Anholt e...@anholt.net I'll stick it in my next pull request, unless keithp grabs it first. Nope, happy to wait for you. I shouldn't be pulling glamor stuff directly ever. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] prime: add rotation support for offloaded outputs (v2)
Alex Deucher alexdeuc...@gmail.com writes: Signed-off-by: Dave Airlie airl...@redhat.com Reviewed-by: Alex Deucher alexander.deuc...@amd.com Merged. 991712f..90db5ed master - master -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] dmx: Fix the build
Broken since: commit 4fd81823fafcd103e8d890f4c0f7c2f90e822336 Author: Dave Airlie airl...@gmail.com Date: Tue Jun 30 14:54:42 2015 +1000 prime: add rotation support for offloaded outputs (v2) Signed-off-by: Adam Jackson a...@redhat.com --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 328563e..98d0821 100644 --- a/configure.ac +++ b/configure.ac @@ -2268,7 +2268,7 @@ if test x$DMX = xyes; then fi DMX_INCLUDES=$XEXT_INC $RENDER_INC $RECORD_INC XDMX_CFLAGS=$DMXMODULES_CFLAGS - XDMX_LIBS=$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB + XDMX_LIBS=$FB_LIB $MI_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB XDMX_SYS_LIBS=$DMXMODULES_LIBS AC_SUBST([XDMX_CFLAGS]) AC_SUBST([XDMX_LIBS]) -- 2.4.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 05/12] glamor: Move glamor_render.c pict handling to glamor_picture.c
These functions aren't used by anything else, and are specific to the temporary-upload-as-a-weird-format path of glamor_render.c, called through glamor_upload_picture_to_texture(). Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_picture.c | 870 glamor/glamor_pixmap.c | 870 glamor/glamor_priv.h| 7 - 3 files changed, 870 insertions(+), 877 deletions(-) diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index 20b9de2..3b0b7c9 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -31,6 +31,876 @@ #include glamor_priv.h #include mipict.h +/* + * Map picture's format to the correct gl texture format and type. + * no_alpha is used to indicate whehter we need to wire alpha to 1. + * + * Although opengl support A1/GL_BITMAP, we still don't use it + * here, it seems that mesa has bugs when uploading a A1 bitmap. + * + * Return 0 if find a matched texture type. Otherwise return -1. + **/ +static int +glamor_get_tex_format_type_from_pictformat_gl(PictFormatShort format, + GLenum *tex_format, + GLenum *tex_type, + int *no_alpha, + int *revert, + int *swap_rb, int is_upload) +{ +*no_alpha = 0; +*revert = REVERT_NONE; +*swap_rb = is_upload ? SWAP_NONE_UPLOADING : SWAP_NONE_DOWNLOADING; +switch (format) { +case PICT_a1: +*tex_format = GL_ALPHA; +*tex_type = GL_UNSIGNED_BYTE; +*revert = is_upload ? REVERT_UPLOADING_A1 : REVERT_DOWNLOADING_A1; +break; +case PICT_b8g8r8x8: +*no_alpha = 1; +case PICT_b8g8r8a8: +*tex_format = GL_BGRA; +*tex_type = GL_UNSIGNED_INT_8_8_8_8; +break; + +case PICT_x8r8g8b8: +*no_alpha = 1; +case PICT_a8r8g8b8: +*tex_format = GL_BGRA; +*tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; +break; +case PICT_x8b8g8r8: +*no_alpha = 1; +case PICT_a8b8g8r8: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; +break; +case PICT_x2r10g10b10: +*no_alpha = 1; +case PICT_a2r10g10b10: +*tex_format = GL_BGRA; +*tex_type = GL_UNSIGNED_INT_2_10_10_10_REV; +break; +case PICT_x2b10g10r10: +*no_alpha = 1; +case PICT_a2b10g10r10: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_INT_2_10_10_10_REV; +break; + +case PICT_r5g6b5: +*tex_format = GL_RGB; +*tex_type = GL_UNSIGNED_SHORT_5_6_5; +break; +case PICT_b5g6r5: +*tex_format = GL_RGB; +*tex_type = GL_UNSIGNED_SHORT_5_6_5_REV; +break; +case PICT_x1b5g5r5: +*no_alpha = 1; +case PICT_a1b5g5r5: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; +break; + +case PICT_x1r5g5b5: +*no_alpha = 1; +case PICT_a1r5g5b5: +*tex_format = GL_BGRA; +*tex_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; +break; +case PICT_a8: +*tex_format = GL_ALPHA; +*tex_type = GL_UNSIGNED_BYTE; +break; +case PICT_x4r4g4b4: +*no_alpha = 1; +case PICT_a4r4g4b4: +*tex_format = GL_BGRA; +*tex_type = GL_UNSIGNED_SHORT_4_4_4_4_REV; +break; + +case PICT_x4b4g4r4: +*no_alpha = 1; +case PICT_a4b4g4r4: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_SHORT_4_4_4_4_REV; +break; + +default: +return -1; +} +return 0; +} + +#define IS_LITTLE_ENDIAN (IMAGE_BYTE_ORDER == LSBFirst) + +static int +glamor_get_tex_format_type_from_pictformat_gles2(PictFormatShort format, + GLenum *tex_format, + GLenum *tex_type, + int *no_alpha, + int *revert, + int *swap_rb, int is_upload) +{ +int need_swap_rb = 0; + +*no_alpha = 0; +*revert = IS_LITTLE_ENDIAN ? REVERT_NONE : REVERT_NORMAL; + +switch (format) { +case PICT_b8g8r8x8: +*no_alpha = 1; +case PICT_b8g8r8a8: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_BYTE; +need_swap_rb = 1; +*revert = IS_LITTLE_ENDIAN ? REVERT_NORMAL : REVERT_NONE; +break; + +case PICT_x8r8g8b8: +*no_alpha = 1; +case PICT_a8r8g8b8: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_BYTE; +need_swap_rb = 1; +break; + +case PICT_x8b8g8r8: +*no_alpha = 1; +case PICT_a8b8g8r8: +*tex_format = GL_RGBA; +*tex_type = GL_UNSIGNED_BYTE; +
[PATCH 08/12] glamor: Drop dead drm_stride field.
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_priv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 5989dc4..f3950f1 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -350,7 +350,6 @@ typedef struct glamor_pixmap_private { glamor_pixmap_fbo *fbo; /** current fbo's coords in the whole pixmap. */ BoxRec box; -int drm_stride; GLuint pbo; RegionRec prepare_region; Bool prepared; -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 07/12] glamor: Drop tracking of the last picture attached to pixmaps.
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor.c | 11 --- glamor/glamor_picture.c | 48 glamor/glamor_priv.h| 15 --- glamor/glamor_render.c | 3 --- glamor/glamor_utils.h | 10 +- glamor/glamor_window.c | 32 6 files changed, 5 insertions(+), 114 deletions(-) diff --git a/glamor/glamor.c b/glamor/glamor.c index 04c548d..6dcc259 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -649,15 +649,6 @@ glamor_init(ScreenPtr screen, unsigned int flags) glamor_priv-saved_procs.glyphs = ps-Glyphs; ps-Glyphs = glamor_composite_glyphs; -glamor_priv-saved_procs.create_picture = ps-CreatePicture; -ps-CreatePicture = glamor_create_picture; - -glamor_priv-saved_procs.destroy_picture = ps-DestroyPicture; -ps-DestroyPicture = glamor_destroy_picture; - -glamor_priv-saved_procs.set_window_pixmap = screen-SetWindowPixmap; -screen-SetWindowPixmap = glamor_set_window_pixmap; - glamor_init_vbo(screen); glamor_init_pixmap_fbo(screen); glamor_init_finish_access_shaders(screen); @@ -719,10 +710,8 @@ glamor_close_screen(ScreenPtr screen) ps-Composite = glamor_priv-saved_procs.composite; ps-Trapezoids = glamor_priv-saved_procs.trapezoids; ps-Triangles = glamor_priv-saved_procs.triangles; -ps-CreatePicture = glamor_priv-saved_procs.create_picture; ps-CompositeRects = glamor_priv-saved_procs.composite_rects; ps-Glyphs = glamor_priv-saved_procs.glyphs; -screen-SetWindowPixmap = glamor_priv-saved_procs.set_window_pixmap; screen_pixmap = screen-GetScreenPixmap(screen); glamor_pixmap_destroy_fbo(screen_pixmap); diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index c36d9d6..691f179 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -900,51 +900,3 @@ glamor_upload_picture_to_texture(PicturePtr picture) else return GLAMOR_UPLOAD_FAILED; } - -/* - * We should already have drawable attached to it, if it has one. - * Then set the attached pixmap to is_picture format, and set - * the pict format. - * */ -int -glamor_create_picture(PicturePtr picture) -{ -PixmapPtr pixmap; -glamor_pixmap_private *pixmap_priv; - -if (!picture || !picture-pDrawable) -return 0; - -pixmap = glamor_get_drawable_pixmap(picture-pDrawable); -pixmap_priv = glamor_get_pixmap_private(pixmap); -pixmap_priv-is_picture = 1; -pixmap_priv-picture = picture; - -return miCreatePicture(picture); -} - -void -glamor_destroy_picture(PicturePtr picture) -{ -PixmapPtr pixmap; -glamor_pixmap_private *pixmap_priv; - -if (!picture || !picture-pDrawable) -return; - -pixmap = glamor_get_drawable_pixmap(picture-pDrawable); -pixmap_priv = glamor_get_pixmap_private(pixmap); - -if (pixmap_priv) { -pixmap_priv-is_picture = 0; -pixmap_priv-picture = NULL; -} -miDestroyPicture(picture); -} - -void -glamor_picture_format_fixup(PicturePtr picture, -glamor_pixmap_private *pixmap_priv) -{ -pixmap_priv-picture = picture; -} diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 2792afa..5989dc4 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -173,9 +173,6 @@ struct glamor_saved_procs { BitmapToRegionProcPtr bitmap_to_region; TrianglesProcPtr triangles; AddTrapsProcPtr addtraps; -CreatePictureProcPtr create_picture; -DestroyPictureProcPtr destroy_picture; -SetWindowPixmapProcPtr set_window_pixmap; #if XSYNC SyncScreenFuncsRec sync_screen_funcs; #endif @@ -350,13 +347,10 @@ typedef struct glamor_pixmap_private { * that data on glamor_finish_access(). */ glamor_access_t map_access; -/** Set if the pixmap is currenty attached to a Picture. */ -unsigned char is_picture:1; glamor_pixmap_fbo *fbo; /** current fbo's coords in the whole pixmap. */ BoxRec box; int drm_stride; -PicturePtr picture; GLuint pbo; RegionRec prepare_region; Bool prepared; @@ -734,15 +728,6 @@ Bool glamor_composite_largepixmap_region(CARD8 op, **/ enum glamor_pixmap_status glamor_upload_picture_to_texture(PicturePtr picture); -int glamor_create_picture(PicturePtr picture); - -void glamor_set_window_pixmap(WindowPtr pWindow, PixmapPtr pPixmap); - -void glamor_destroy_picture(PicturePtr picture); - -void glamor_picture_format_fixup(PicturePtr picture, - glamor_pixmap_private *pixmap_priv); - void glamor_add_traps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap *traps); diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 3048cd8..c3a8f17 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -936,9 +936,6 @@ glamor_composite_choose_shader(CARD8 op, goto fail; } -
[PATCH 09/12] glamor: Take transforms into account when preparing for a fallback.
This function takes the start x/y and the destination's width/height, so it only works if there's no transform. We could potentially transform this box and take its bounds with some rounding, but this at least gets us to read out enough data. Note that this does the same overshoot on destination pictures with a transform attached, but that seems unlikely to be used anyway. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_prepare.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c index 9bfc557..f63cd6e 100644 --- a/glamor/glamor_prepare.c +++ b/glamor/glamor_prepare.c @@ -220,8 +220,15 @@ glamor_prepare_access_picture_box(PicturePtr picture, glamor_access_t access, { if (!picture || !picture-pDrawable) return TRUE; -return glamor_prepare_access_box(picture-pDrawable, access, -x, y, w, h); +if (picture-transform) { +return glamor_prepare_access_box(picture-pDrawable, access, + 0, 0, + picture-pDrawable-width, + picture-pDrawable-height); +} else { +return glamor_prepare_access_box(picture-pDrawable, access, + x, y, w, h); +} } void -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 01/12] glamor: Don't try to do rendering with unsupported formats.
I'm amazed we've made it as far as we have without these checks: if you made an unusual format picture that wasn't the normal a8r8g8b8 or x8r8g8b8 or a8, we'd go ahead and try to render with it, ignoring that the sampler would fetch totally wrong bits. Fixes 260 tests in rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10 Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_render.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 488d1a7..3048cd8 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -753,6 +753,29 @@ glamor_set_normalize_tcoords_generic(PixmapPtr pixmap, texcoords, stride); } +/** + * Returns whether the general composite path supports this picture + * format for a pixmap that is permanently stored in an FBO (as + * opposed to the GLAMOR_PIXMAP_DYNAMIC_UPLOAD path). + * + * We could support many more formats by using GL_ARB_texture_view to + * parse the same bits as different formats. For now, we only support + * tweaking whether we sample the alpha bits of an a8r8g8b8, or just + * force them to 1. + */ +static Bool +glamor_render_format_is_supported(PictFormatShort format) +{ +switch (format) { +case PICT_a8r8g8b8: +case PICT_x8r8g8b8: +case PICT_a8: +return TRUE; +default: +return FALSE; +} +} + static Bool glamor_composite_choose_shader(CARD8 op, PicturePtr source, @@ -783,6 +806,11 @@ glamor_composite_choose_shader(CARD8 op, goto fail; } +if (!glamor_render_format_is_supported(dest-format)) { +glamor_fallback(Unsupported dest picture format.\n); +goto fail; +} + memset(key, 0, sizeof(key)); if (!source) { key.source = SHADER_SOURCE_SOLID; @@ -951,6 +979,11 @@ glamor_composite_choose_shader(CARD8 op, glamor_fallback(Failed to upload source texture.\n); goto fail; } +} else { +if (!glamor_render_format_is_supported(source-format)) { +glamor_fallback(Unsupported source picture format.\n); +goto fail; +} } if (mask_status == GLAMOR_UPLOAD_PENDING) { @@ -959,6 +992,11 @@ glamor_composite_choose_shader(CARD8 op, glamor_fallback(Failed to upload mask texture.\n); goto fail; } +} else if (mask) { +if (!glamor_render_format_is_supported(mask-format)) { +glamor_fallback(Unsupported mask picture format.\n); +goto fail; +} } } #endif -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 11/12] glamor: Move cache_format to glamor_fbo.c, where it's used.
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_fbo.c | 15 +++ glamor/glamor_utils.h | 15 --- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c index 1eee304..262033f 100644 --- a/glamor/glamor_fbo.c +++ b/glamor/glamor_fbo.c @@ -70,6 +70,21 @@ cache_hbucket(int size) return order; } +static int +cache_format(GLenum format) +{ +switch (format) { +case GL_ALPHA: +return 2; +case GL_RGB: +return 1; +case GL_RGBA: +return 0; +default: +return -1; +} +} + static glamor_pixmap_fbo * glamor_pixmap_fbo_cache_get(glamor_screen_private *glamor_priv, int w, int h, GLenum format) diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index e22bbc1..8a96c61 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -824,21 +824,6 @@ format_for_pixmap(PixmapPtr pixmap) #define SWAP_UPLOADING 2 #define SWAP_NONE_UPLOADING3 -inline static int -cache_format(GLenum format) -{ -switch (format) { -case GL_ALPHA: -return 2; -case GL_RGB: -return 1; -case GL_RGBA: -return 0; -default: -return -1; -} -} - /* borrowed from uxa */ static inline Bool glamor_get_rgba_from_pixel(CARD32 pixel, -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 06/12] glamor: Use the actual picture's format when uploading memory pixmaps.
The pixmap-picture is just the *last* picture attached to the pixmap, so you'd potentially be looking at the wrong one when trying to temporarily upload to avoid a composite fallback. There's some trickiness in glamor_render.c when we're dealing with the upload of a GLAMOR_MEMORY pixmap as both the source and mask using different formats, where we smash the source's format to a new value so that the mask can use the same uploaded bits. Dropping most of that should be safe, since it will be uploaded as the source first, so the smashed format will still be used. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_picture.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index 3b0b7c9..c36d9d6 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -307,22 +307,15 @@ glamor_get_tex_format_type_from_pictformat_gles2(PictFormatShort format, static int glamor_get_tex_format_type_from_pixmap(PixmapPtr pixmap, + PictFormatShort pict_format, GLenum *format, GLenum *type, int *no_alpha, int *revert, int *swap_rb, int is_upload) { -glamor_pixmap_private *pixmap_priv; -PictFormatShort pict_format; glamor_screen_private *glamor_priv = glamor_get_screen_private(pixmap-drawable.pScreen); -pixmap_priv = glamor_get_pixmap_private(pixmap); -if (GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv)) -pict_format = pixmap_priv-picture-format; -else -pict_format = format_for_depth(pixmap-drawable.depth); - if (glamor_priv-gl_flavor == GLAMOR_GL_DESKTOP) { return glamor_get_tex_format_type_from_pictformat_gl(pict_format, format, type, @@ -774,7 +767,8 @@ glamor_put_bits(char *dst_bits, int dst_stride, char *src_bits, static Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, -int h, int stride, void *bits, int pbo) +int h, int stride, void *bits, int pbo, +PictFormatShort pict_format) { ScreenPtr screen = pixmap-drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); @@ -784,6 +778,7 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, Bool force_clip; if (glamor_get_tex_format_type_from_pixmap(pixmap, + pict_format, format, type, no_alpha, @@ -884,23 +879,6 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, pbo); } -static enum glamor_pixmap_status -glamor_upload_pixmap_to_texture(PixmapPtr pixmap) -{ -int ret; - -if (glamor_upload_sub_pixmap_to_texture(pixmap, 0, 0, -pixmap-drawable.width, -pixmap-drawable.height, -pixmap-devKind, -pixmap-devPrivate.ptr, 0)) -ret = GLAMOR_UPLOAD_DONE; -else -ret = GLAMOR_UPLOAD_FAILED; - -return ret; -} - /* Upload picture to texture. We may need to flip the y axis or * wire alpha to 1. So we may conditional create fbo for the picture. * */ @@ -912,7 +890,15 @@ glamor_upload_picture_to_texture(PicturePtr picture) assert(picture-pDrawable); pixmap = glamor_get_drawable_pixmap(picture-pDrawable); -return glamor_upload_pixmap_to_texture(pixmap); +if (glamor_upload_sub_pixmap_to_texture(pixmap, 0, 0, +pixmap-drawable.width, +pixmap-drawable.height, +pixmap-devKind, +pixmap-devPrivate.ptr, 0, +picture-format)) +return GLAMOR_UPLOAD_DONE; +else +return GLAMOR_UPLOAD_FAILED; } /* -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 10/12] glamor: Drop another dead function.
This hasn't been used since the format swap/revert stuff for pictures was added back in 2012. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_utils.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 59e6b64..e22bbc1 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -936,13 +936,6 @@ glamor_is_large_pixmap(PixmapPtr pixmap) return (glamor_pixmap_priv_is_large(priv)); } -inline static Bool -glamor_tex_format_is_readable(GLenum format) -{ -return ((format == GL_RGBA || format == GL_RGB || format == GL_ALPHA)); - -} - static inline void _glamor_dump_pixmap_bits(PixmapPtr pixmap, int x, int y, int w, int h) { -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 04/12] glamor: Drop dead glamor_upload_bits_to_pixmap_texture() proto.
Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_priv.h | 9 - 1 file changed, 9 deletions(-) diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 1614b6f..508433a 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -741,15 +741,6 @@ Bool glamor_composite_largepixmap_region(CARD8 op, **/ enum glamor_pixmap_status glamor_upload_picture_to_texture(PicturePtr picture); -/** - * Upload bits to a pixmap's texture. This function will - * convert the bits to the specified format/type format - * if the conversion is unavoidable. - **/ -Bool glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format, - GLenum type, int no_alpha, int revert, - int swap_rb, void *bits); - int glamor_create_picture(PicturePtr picture); void glamor_set_window_pixmap(WindowPtr pWindow, PixmapPtr pPixmap); -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 03/12] glamor: Use the new upload/download interface for XV uploads.
We don't need any of its weird handling of picture formats, since our XV pixmaps don't have any pictures attached. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_pixmap.c | 2 +- glamor/glamor_priv.h | 4 glamor/glamor_xv.c | 38 -- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index 9a14527..5a09d32 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -931,7 +931,7 @@ glamor_put_bits(char *dst_bits, int dst_stride, char *src_bits, } } -Bool +static Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, int h, int stride, void *bits, int pbo) { diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index d085ff2..1614b6f 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -708,10 +708,6 @@ Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag); */ enum glamor_pixmap_status glamor_upload_pixmap_to_texture(PixmapPtr pixmap); -Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, - int h, int stride, void *bits, - int pbo); - glamor_pixmap_clipped_regions * glamor_compute_clipped_regions(PixmapPtr pixmap, RegionPtr region, int *clipped_nbox, diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 364104d..85e6528 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -37,6 +37,7 @@ #endif #include glamor_priv.h +#include glamor_transfer.h #include X11/extensions/Xv.h #include ../hw/xfree86/common/fourcc.h @@ -410,6 +411,7 @@ glamor_xv_put_image(glamor_port_private *port_priv, int srcPitch, srcPitch2; int top, nlines; int s2offset, s3offset, tmp; +BoxRec full_box, half_box; s2offset = s3offset = srcPitch2 = 0; @@ -452,20 +454,28 @@ glamor_xv_put_image(glamor_port_private *port_priv, s2offset = s3offset; s3offset = tmp; } -glamor_upload_sub_pixmap_to_texture(port_priv-src_pix[0], -0, 0, width, nlines, -srcPitch, -buf + (top * srcPitch), 0); - -glamor_upload_sub_pixmap_to_texture(port_priv-src_pix[1], -0, 0, width 1, (nlines + 1) 1, -srcPitch2, -buf + s2offset, 0); - -glamor_upload_sub_pixmap_to_texture(port_priv-src_pix[2], -0, 0, width 1, (nlines + 1) 1, -srcPitch2, -buf + s3offset, 0); + +full_box.x1 = 0; +full_box.y1 = 0; +full_box.x2 = width; +full_box.y2 = nlines; + +half_box.x1 = 0; +half_box.y1 = 0; +half_box.x2 = width 1; +half_box.y2 = (nlines + 1) 1; + +glamor_upload_boxes(port_priv-src_pix[0], full_box, 1, +0, 0, 0, 0, +buf + (top * srcPitch), srcPitch); + +glamor_upload_boxes(port_priv-src_pix[1], half_box, 1, +0, 0, 0, 0, +buf + s2offset, srcPitch2); + +glamor_upload_boxes(port_priv-src_pix[2], half_box, 1, +0, 0, 0, 0, +buf + s3offset, srcPitch2); break; default: return BadMatch; -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
glamor: rendercheck fixes and picture handling simplification
This series came out of the process of trying to figure out if I could safely store a8 pixmaps in an a8r8g8b8 FBO, to improve glamor performance on VC4 (which doesn't support 8-bit FBOs). It turns out the answer is not quite, but the Render code had a lot of bugs obscuring that fact. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 02/12] glamor: Ignore picture formats when choosing color for core rendering.
Attaching a picture to a pixmap doesn't change its GL format, so it doesn't change how core rendering should be assigning colors to it. (Imagine XCreatePixmap(), optional XCreatePicture(pixmap) with various formats, XFillRectangle, XGetImage(). If the XGetImage results changed, this would be wrong). Fixes all failures in rendercheck -t fill and, as a result, the remaining failures in rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10 Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_utils.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index a923b7a..8182006 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -805,16 +805,7 @@ gl_iformat_for_pixmap(PixmapPtr pixmap) static inline CARD32 format_for_pixmap(PixmapPtr pixmap) { -glamor_pixmap_private *pixmap_priv; -PictFormatShort pict_format; - -pixmap_priv = glamor_get_pixmap_private(pixmap); -if (GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv)) -pict_format = pixmap_priv-picture-format; -else -pict_format = format_for_depth((pixmap)-drawable.depth); - -return pict_format; +return format_for_depth((pixmap)-drawable.depth); } #define REVERT_NONE0 -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 12/12] glamor: Drop unused box translation/bounds code.
These are dead since the glamor_copy.c replacement. Signed-off-by: Eric Anholt e...@anholt.net --- glamor/glamor_utils.h | 39 --- 1 file changed, 39 deletions(-) diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 8a96c61..e648af2 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -697,45 +697,6 @@ (c)[1] = (float)y; \ } while(0) -inline static void -glamor_calculate_boxes_bound(BoxPtr bound, BoxPtr boxes, int nbox) -{ -int x_min, y_min; -int x_max, y_max; -int i; - -x_min = y_min = MAXSHORT; -x_max = y_max = MINSHORT; -for (i = 0; i nbox; i++) { -if (x_min boxes[i].x1) -x_min = boxes[i].x1; -if (y_min boxes[i].y1) -y_min = boxes[i].y1; - -if (x_max boxes[i].x2) -x_max = boxes[i].x2; -if (y_max boxes[i].y2) -y_max = boxes[i].y2; -} -bound-x1 = x_min; -bound-y1 = y_min; -bound-x2 = x_max; -bound-y2 = y_max; -} - -inline static void -glamor_translate_boxes(BoxPtr boxes, int nbox, int dx, int dy) -{ -int i; - -for (i = 0; i nbox; i++) { -boxes[i].x1 += dx; -boxes[i].y1 += dy; -boxes[i].x2 += dx; -boxes[i].y2 += dy; -} -} - #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) #endif -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xf86-input-libinput] Add a property for tap drag lock
Hi, On 08-07-15 03:04, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net LGTM: Reviewed-by: Hans de Goede hdego...@redhat.com Regards, Hans --- configure.ac | 2 +- include/libinput-properties.h | 6 +++ man/libinput.man | 9 + src/libinput.c| 94 +++ 4 files changed, 110 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e477ffd..5faaa36 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS # Obtain compiler/linker options from server and required extensions PKG_CHECK_MODULES(XORG, [xorg-server = 1.10] xproto [inputproto = 2.2]) -PKG_CHECK_MODULES(LIBINPUT, [libinput = 0.14.0]) +PKG_CHECK_MODULES(LIBINPUT, [libinput = 0.19.0]) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, diff --git a/include/libinput-properties.h b/include/libinput-properties.h index 6760b50..6135dc8 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -30,6 +30,12 @@ /* Tapping default enabled/disabled: BOOL, 1 value, read-only */ #define LIBINPUT_PROP_TAP_DEFAULT libinput Tapping Enabled Default +/* Tap drag lock enabled/disabled: BOOL, 1 value */ +#define LIBINPUT_PROP_TAP_DRAG_LOCK libinput Tapping Drag Lock Enabled + +/* Tap drag lock default enabled/disabled: BOOL, 1 value */ +#define LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT libinput Tapping Drag Lock Enabled Default + /* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */ #define LIBINPUT_PROP_CALIBRATION libinput Calibration Matrix diff --git a/man/libinput.man b/man/libinput.man index df202a9..f781c59 100644 --- a/man/libinput.man +++ b/man/libinput.man @@ -109,6 +109,12 @@ mouse is connected. .TP 7 .BI Option \*qTapping\*q \*q bool \*q Enables or disables tap-to-click behavior. +.TP 7 +.BI Option \*qTappingDragLock\*q \*q bool \*q +Enables or disables drag lock during tapping behavior. When enabled, a +finger up during tap-and-drag will not immediately release the button. If +the finger is set down again within the timeout, the draging process +continues. .PP For all options, the options are only parsed if the device supports that configuration option. For all options, the default value is the one used by @@ -126,6 +132,9 @@ driver. .BI libinput Tapping Enabled 1 boolean value (8 bit, 0 or 1). 1 enables tapping .TP 7 +.BI libinput Tapping Drag Lock Enabled +1 boolean value (8 bit, 0 or 1). 1 enables drag lock during tapping +.TP 7 .BI libinput Calibration Matrix 9 32-bit float values, representing a 3x3 calibration matrix, order is row 1, row 2, row 3 diff --git a/src/libinput.c b/src/libinput.c index a06e44f..0733d35 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -98,6 +98,7 @@ struct xf86libinput { struct options { BOOL tapping; + BOOL tap_drag_lock; BOOL natural_scrolling; BOOL left_handed; BOOL middle_emulation; @@ -262,6 +263,13 @@ LibinputApplyConfig(DeviceIntPtr dev) Failed to set Tapping to %d\n, driver_data-options.tapping); + if (libinput_device_config_tap_get_finger_count(device) 0 + libinput_device_config_tap_set_drag_lock_enabled(device, + driver_data-options.tap_drag_lock) != LIBINPUT_CONFIG_STATUS_SUCCESS) + xf86IDrvMsg(pInfo, X_ERROR, + Failed to set Tapping DragLock to %d\n, + driver_data-options.tap_drag_lock); + if (libinput_device_config_calibration_has_matrix(device) libinput_device_config_calibration_set_matrix(device, driver_data-options.matrix) != LIBINPUT_CONFIG_STATUS_SUCCESS) @@ -1032,6 +1040,30 @@ xf86libinput_parse_tap_option(InputInfoPtr pInfo, return tap; } +static inline BOOL +xf86libinput_parse_tap_drag_lock_option(InputInfoPtr pInfo, + struct libinput_device *device) +{ + BOOL drag_lock; + + if (libinput_device_config_tap_get_finger_count(device) == 0) + return FALSE; + + drag_lock = xf86SetBoolOption(pInfo-options, + TappingDragLock, + libinput_device_config_tap_get_drag_lock_enabled(device)); + + if (libinput_device_config_tap_set_drag_lock_enabled(device, drag_lock) != + LIBINPUT_CONFIG_STATUS_SUCCESS) { + xf86IDrvMsg(pInfo, X_ERROR, + Failed to set Tapping Drag Lock to %d\n, + drag_lock); + drag_lock = libinput_device_config_tap_get_drag_lock_enabled(device); + } + + return drag_lock; +} +
Re: glamor: rendercheck fixes and picture handling simplification
On 9 July 2015 at 05:45, Eric Anholt e...@anholt.net wrote: This series came out of the process of trying to figure out if I could safely store a8 pixmaps in an a8r8g8b8 FBO, to improve glamor performance on VC4 (which doesn't support 8-bit FBOs). It turns out the answer is not quite, but the Render code had a lot of bugs obscuring that fact. For the whole series, Reviewed-by: Dave Airlie airl...@redhat.com I've r-b'ed some individually but then realised I should just read them all :-) Dave. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 05/12] glamor: Move glamor_render.c pict handling to glamor_picture.c
On 9 July 2015 at 05:45, Eric Anholt e...@anholt.net wrote: These functions aren't used by anything else, and are specific to the temporary-upload-as-a-weird-format path of glamor_render.c, called through glamor_upload_picture_to_texture(). Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Dave Airlie airl...@redhat.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 03/12] glamor: Use the new upload/download interface for XV uploads.
On 9 July 2015 at 05:45, Eric Anholt e...@anholt.net wrote: We don't need any of its weird handling of picture formats, since our XV pixmaps don't have any pictures attached. Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Dave Airlie airl...@redhat.com --- glamor/glamor_pixmap.c | 2 +- glamor/glamor_priv.h | 4 glamor/glamor_xv.c | 38 -- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index 9a14527..5a09d32 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -931,7 +931,7 @@ glamor_put_bits(char *dst_bits, int dst_stride, char *src_bits, } } -Bool +static Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, int h, int stride, void *bits, int pbo) { diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index d085ff2..1614b6f 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -708,10 +708,6 @@ Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, GLenum format, int flag); */ enum glamor_pixmap_status glamor_upload_pixmap_to_texture(PixmapPtr pixmap); -Bool glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w, - int h, int stride, void *bits, - int pbo); - glamor_pixmap_clipped_regions * glamor_compute_clipped_regions(PixmapPtr pixmap, RegionPtr region, int *clipped_nbox, diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 364104d..85e6528 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -37,6 +37,7 @@ #endif #include glamor_priv.h +#include glamor_transfer.h #include X11/extensions/Xv.h #include ../hw/xfree86/common/fourcc.h @@ -410,6 +411,7 @@ glamor_xv_put_image(glamor_port_private *port_priv, int srcPitch, srcPitch2; int top, nlines; int s2offset, s3offset, tmp; +BoxRec full_box, half_box; s2offset = s3offset = srcPitch2 = 0; @@ -452,20 +454,28 @@ glamor_xv_put_image(glamor_port_private *port_priv, s2offset = s3offset; s3offset = tmp; } -glamor_upload_sub_pixmap_to_texture(port_priv-src_pix[0], -0, 0, width, nlines, -srcPitch, -buf + (top * srcPitch), 0); - -glamor_upload_sub_pixmap_to_texture(port_priv-src_pix[1], -0, 0, width 1, (nlines + 1) 1, -srcPitch2, -buf + s2offset, 0); - -glamor_upload_sub_pixmap_to_texture(port_priv-src_pix[2], -0, 0, width 1, (nlines + 1) 1, -srcPitch2, -buf + s3offset, 0); + +full_box.x1 = 0; +full_box.y1 = 0; +full_box.x2 = width; +full_box.y2 = nlines; + +half_box.x1 = 0; +half_box.y1 = 0; +half_box.x2 = width 1; +half_box.y2 = (nlines + 1) 1; + +glamor_upload_boxes(port_priv-src_pix[0], full_box, 1, +0, 0, 0, 0, +buf + (top * srcPitch), srcPitch); + +glamor_upload_boxes(port_priv-src_pix[1], half_box, 1, +0, 0, 0, 0, +buf + s2offset, srcPitch2); + +glamor_upload_boxes(port_priv-src_pix[2], half_box, 1, +0, 0, 0, 0, +buf + s3offset, srcPitch2); break; default: return BadMatch; -- 2.1.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 02/12] glamor: Ignore picture formats when choosing color for core rendering.
On 9 July 2015 at 05:45, Eric Anholt e...@anholt.net wrote: Attaching a picture to a pixmap doesn't change its GL format, so it doesn't change how core rendering should be assigning colors to it. (Imagine XCreatePixmap(), optional XCreatePicture(pixmap) with various formats, XFillRectangle, XGetImage(). If the XGetImage results changed, this would be wrong). Fixes all failures in rendercheck -t fill and, as a result, the remaining failures in rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10 Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Dave Airlie airl...@redhat.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 04/12] glamor: Drop dead glamor_upload_bits_to_pixmap_texture() proto.
On 9 July 2015 at 05:45, Eric Anholt e...@anholt.net wrote: Signed-off-by: Eric Anholt e...@anholt.net Reviewed-by: Dave Airlie airl...@redhat.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] dmx: Fix the build
On 9 July 2015 at 05:57, Adam Jackson a...@redhat.com wrote: Broken since: commit 4fd81823fafcd103e8d890f4c0f7c2f90e822336 Author: Dave Airlie airl...@gmail.com Date: Tue Jun 30 14:54:42 2015 +1000 prime: add rotation support for offloaded outputs (v2) Signed-off-by: Adam Jackson a...@redhat.com tinderbox is gone down, so I missed this. Reviewed-by: Dave Airlie airl...@redhat.com ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel