Commit Graph

14331 Commits

Author SHA1 Message Date
Keith Packard
cff1293627 glamor: sync_fence_set_triggered should use glFlush, not glFinish
I intended to use glFlush all along, but somehow managed to type
glFinish instead. glFlush is sufficient (for a single-queue GPU) to
ensure serialization between queued rendering in the X server and
future rendering from the client.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-07-19 12:25:24 -07:00
Keith Packard
cfa302d622 glamor: Add support for SHM sync fences
This hooks up SHM sync fences to complete the requirements for DRI3
running on Glamor.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-18 12:22:50 -07:00
Colin Walters
ac3acab131 xf86platformBus: Add assertion to avoid (fatal) compiler warning
Compilation of -video-intel started failing in gnome-continuous,
it's because xserver has -Werror=return-type on, and gcc can't
prove this function always returns a value:

   /usr/include/xorg/xf86platformBus.h:119:1: error: control reaches end of non-void function [-Werror=return-type]

Let's add assertions to the accessor functions to fix this.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-18 08:31:20 -07:00
Keith Packard
5c2e9fa3d6 Merge remote-tracking branch 'anholt/glamor-next' 2014-07-17 20:06:21 -07:00
Eric Anholt
6d49548849 Merge remote-tracking branch 'origin/master' into glamor-next
I've done this merge manually to resolve the minor conflict in glamor.c.

Signed-off-by: Eric Anholt <eric@anholt.net>
2014-07-17 18:07:26 -07:00
Eric Anholt
9ddcb20f47 glamor: Drop the "are we doing a series of blits or draws" logic.
It's unused since keithp's copy acceleration code completely replaced
glamor_copyarea.c and removed the blit path.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:48 -07:00
Eric Anholt
b03a581d8c glamor: Remove a dead prototype.
The corresponding code was deleted in
2ff4100849 (2012)

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:46 -07:00
Eric Anholt
b5f94df319 glamor: Drop dead glamor_restore_pixmap_to_texture().
Unused since the glamor_prepare.c replacement of glamor_finish_access().

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:44 -07:00
Eric Anholt
98155bd9d9 glamor: Drop dead glamor_download_pixmap_to_cpu()
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:42 -07:00
Eric Anholt
b6181007de glamor: Drop dead get/pub sub pixmap functions.
These were replaced by the new glamor_prepare.c code.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:40 -07:00
Eric Anholt
e310387f44 glamor: Remove always-true yInverted flag.
All users of glamor had the same value set, and it complicated things
for no reason.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:38 -07:00
Eric Anholt
d71ecbb458 glamor: Drop constant arguments to glamor_solid().
After keithp's change to drop the old glamor_fill() code, nothing ever
changed these values.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:34:29 -07:00
Eric Anholt
db9bff5c38 glamor: Drop unnecessary glTexParameteri() in upload of texture data.
We're not drawing, and we're not initially setting up the texture for
later drawing.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:34:28 -07:00
Eric Anholt
1140a89d77 glamor: Use MIN/MAX macros to clean up glamor_transfer.c
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:34:26 -07:00
Eric Anholt
2ab0fba9df glamor: Drop unnecessary glTexParameteri() in SetSpans().
If this path needed the filters set, so would all the other
glDrawArrays() callers.  But they don't.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:34:16 -07:00
Keith Packard
e678b4971b xfree86: Provide backward-compatibilty API for OdevAttributes
This allows drivers to compile using the old OdevAttributes API
against a new server. It generates compiler errors if the caller uses
the wrong or undefined attribute types, or if the caller provides an
incorrect default value for an integer attribute.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-17 17:11:05 -07:00
Keith Packard
60c05ce1ab config: Replace OdevAttributes linked list with struct
OdevAttributes are a fixed set of values with known types; instead of
storing them in a linked list and requiring accessor/settor functions,
replace the list header, struct OdevAttributes, with a struct that
directly contains the values. This provides for compile-time
typechecking of the values, eliminates a significant amount of code
and generally simplifies using this datatype.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-17 17:10:48 -07:00
Keith Packard
55f5bfb578 glamor: Fix temp picture coordinates in glamor_composite_clipped_region
To understand this patch, let's start at the protocol interface where
the relationship between the coordinate spaces is documented:

        static Bool
        _glamor_composite(CARD8 op,
                          PicturePtr source,
                          PicturePtr mask,
                          PicturePtr dest,
                          INT16 x_source,
                          INT16 y_source,
                          INT16 x_mask,
                          INT16 y_mask,
                          INT16 x_dest, INT16 y_dest,
                          CARD16 width, CARD16 height, Bool fallback)

The coordinates are passed to this function directly off the wire and
are all relative to their respective drawables. For Windows, this means
that they are relative to the upper left corner of the window, in
whatever pixmap that window is getting drawn to.

_glamor_composite calls miComputeCompositeRegion to construct a clipped
region to actually render to. In reality, miComputeCompositeRegion clips
only to the destination these days; source clip region based clipping
would have to respect the transform, which isn't really possible. The
returned region is relative to the screen in which dest lives; offset by
dest->drawable.x and dest->drawable.y.

What is important to realize here is that, because of clipping, the
composite region may not have the same position within the destination
drawable as x_dest, y_dest. The protocol coordinates now exist solely to
'pin' the three objects together.

        extents->x1,y1		Screen origin of clipped operation
        width,height            Extents of the clipped operation
        x_dest,y_dest		Unclipped destination-relative operation coordinate
        x_source,y_source	Unclipped source-relative operation coordinate
        x_mask,y_mask		Unclipped mask-relative operation coordinate

One thing we want to know is what the offset is from the original
operation origin to the clipped origin

        Destination drawable relative coordinates of the clipped operation:

               x_dest_clipped = extents->x1 - dest->drawable.x
               y_dest_clipped = extents->y1 - dest->drawable.y

        Offset from the original operation origin:

                x_off_clipped = x_dest_clipped - x_dest
                y_off_clipped = y_dest_clipped - y_dest

        Source drawable relative coordinates of the clipped operation:

                x_source_clipped = x_source + x_off_clipped;
                y_source_clipped = y_source + y_off_clipped;

        Mask drawable relative coordinates of the clipped operation:

                x_mask_clipped = x_source + x_off_clipped;
                y_mask_clipped = y_source + y_off_clipped;

This is where the original code fails -- it doesn't subtract the
destination drawable location when computing the distance that the
operation has been moved by clipping. Here's what it does when
constructing a temporary source picture:

        temp_src =
            glamor_convert_gradient_picture(screen, source,
                                            extent->x1 + x_source - x_dest,
                                            extent->y1 + y_source - y_dest,
                                            width, height);
        ...
        x_temp_src = -extent->x1 + x_dest;
        y_temp_src = -extent->y1 + y_dest;

glamor_convert_gradient_picture needs source drawable relative
coordinates, but that is not what it's getting; it's getting
screen-relative coordinates for the destination, adjusted by the
distance between the provided source and destination operation
coordinates. We want x_source_clipped and y_source_clipped:

        x_source_clipped = x_source + x_off_clipped
                         = x_source + x_dest_clipped - x_dest
                         = x_source + extents->x1 - dest->drawable.x - x_dest

x_temp_src/y_temp_src are supposed to be the coordinates of the original
operation translated to the temporary picture:

        x_temp_src = x_source - x_source_clipped;
        y_temp_src = y_source - y_source_clipped;

Note that x_source_clipped/y_source_clipped will never be less than
x_source/y_source because all we're doing is clipping. This means that
x_temp_src/y_temp_src will always be non-positive; the original source
coordinate can never be strictly *inside* the temporary image or we
could have made the temporary image smaller.

        x_temp_src = x_source - x_source_clipped
                   = x_source - (x_source + x_off_clipped)
                   = -x_off_clipped
                   = x_dest - x_dest_clipped
                   = x_dest - (extents->x1 - dest->drawable.x)

Again, this is off by the destination origin within the screen
coordinate space.

The code should look like:

        temp_src =
            glamor_convert_gradient_picture(screen, source,
                                            extent->x1 + x_source - x_dest - dest->pDrawable->x,
                                            extent->y1 + y_source - y_dest - dest->pDrawable->y,
                                            width, height);

        x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x;
        y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y;

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Markus Wick <markus@selfnet.de>
2014-07-17 16:20:12 -07:00
Keith Packard
16fbad3c7a Post 1.16 version bump to 1.16.99.1
And we're off towards 1.17; this version bump serves to keep
development versions distinct from stable versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 16:17:53 -07:00
Keith Packard
bfa5c73a36 ephyr: Free damage structure at server reset time
The usual mechanism for freeing a damage structure when the pixmap is
destroyed does not work for the screen pixmap as it isn't freed in the
normal way.

The existing driver cleanup function, scrfini, is called after the
wrapped CloseScreen functions, including damageCloseScreen, are called
and thus ephyr can't free the damage structure at that point.

Deal with this by providing an early CloseScreen hook in KdCloseScreen
which ephyr can use to free the damage structure before damage itself
shuts down.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-07-17 11:26:44 -07:00
Keith Packard
3319e7041f hw/xfree86: Let xf86Rotate leave the BlockHandler unwrapped when possible
When no shadow frame buffer is needed, the rotate block handler
doesn't need to be called any more. Remove it from the chain.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:25 -07:00
Keith Packard
79a2733005 hw/xfree86: Fix VGA arbiter screen proc wrapping
Change the screen proc epilog code to re-fetch the current screen
function in case a nested proc changes how things work. This isn't a
problem with the current code as all of the wrapping layers that are
set up at server init time (like the VGA arbiter) leave themselves in
the screen proc chain forever. But, this makes the code conform with
the expected norms.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:22 -07:00
Keith Packard
a1189fe322 mi: Fix block handler wrapping in miSprite
miSpriteBlockHandler was leaving the BlockHandler wrapped until just
before calling any nested block handler. If any code executed before
that added or removed block handlers, the wrapping chain would have
been broken.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:20 -07:00
Keith Packard
08fc33042c hw/xfree86: Fix block handler wrapping in xf86Rotate
xf86Rotate, it was delaying unwrapping the BlockHandler until after
calling xf86RotateRedisplay. If there was a software cursor on the
screen, the redisplay operation would cause cursor to be removed from
the frame buffer and the misprite block handler to be inserted into
the block handler chain with the misprite screen private saved block
handler now set to xf86RotateBlockHandler.

When xf86RotateRedisplay returned, xf86RotateBlockHandler would then
set screen->BlockHandler to its saved value, call down and then reset
screen->BlockHandler to xf86RotateBlockHandler. miSpriteBlockHandler
would never be called after that, which meant that the software cursor
will now disappear from the screen whenever rendering overlapped and
would only reappear when the cursor was moved.

To correct this, all that is needed is to move the restoration of
screen->BlockHandler to the top of xf86RotateBlockHandler, before the
call to xf86RotateRedisplay.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:15 -07:00
Keith Packard
c75fee79ac Document how to correctly wrap screen procedures
This adds a large comment to include/scrnintstr.h which should serve
to document the correct way to wrap any screen procedure, with a
particular focus on how to dynamically add/remove wrapping layers
while the server is running.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:16:52 -07:00
Peter Harris
5eb77697ea Avoid starting a comment with */*
Even though -Wcomment doesn't mind it (in gcc or clang), the appearance
of */* confuses the syntax highlighter of some editors (eg. vim), and
causes warnings in MSVC.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 10:19:52 -07:00
Keith Packard
8b36e1ec8d Update to version 1.16.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 00:03:33 -07:00
Hans de Goede
4dbb641bb2 config_odev_add_attribute*: Check for right attribute type
Don't allow setting string attributes to integers and vice versa.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-14 13:21:30 -07:00
Hans de Goede
25eca7ce35 Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD
Looks like the value of ODEV_ATTRIB_DRIVER was not updated when the patch
adding it got rebased on top of a newer server version.

This fixes the xserver crashing when systemd-logind integration is used.

https://bugzilla.redhat.com/show_bug.cgi?id=1118540

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-14 13:18:15 -07:00
Peter Hutterer
9a19bf06b5 Revert "dix: fix up coordinate scaling when external monitors are present"
This reverts commit d90b5f8301.

Reverting for two reasons:
* the scaling does not work on devices that don't advertise resolution, and
  the default resolution used (100 units/mm) is higher than most devices,
  resulting in a significant slowdown of the touchpads.
* the scaling is still affected by resolution changing. The patch worked
  before acceleration but since it maps into resolution-dependent dx/dy
  coordinates the acceleration may distort the movement after the fact. So the
  same input data generates different movements depending on the resolution.
  This can't easily be fixed for all affected devices as synaptics has its own
  velocity calculation method whereas wacom doesn't. So anything in the server
  won't work for both at the same time.

Revert this for now, until a more integrated solution can be implemented.
2014-07-14 15:05:58 +10:00
Aaron Plattner
acc0b5edd1 xfree86: Only support one sysconfigdir
When the X server is compiled with --prefix set to something other than /usr,
then it ends up with a nonstandard sysconfigdir in its .pc file.  This causes
various other components to install their xorg.conf.d snippets there.

However, the X server first looks for /usr/share/X11/xorg.conf.d before looking
in sysconfigdir.  That means that if the system administrator installed anything
that created that path, the user's custom sysconfigdir is not searched.

Rather than doing that, just look in the configured sysconfdir and nowhere else.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-14 08:48:13 +10:00
Peter Hutterer
578b9283bc xfree86: don't force the screensaver off on DPMS unblank, merely suggest it
Commit 41d4beb261 added symmetry to the
screensaver/DPMS invocations so that one (en|dis)ables the other. Having
dependencies between DPMS and the screensaver is subject to further arguments,
but in this particular case using SCREENSAVER_FORCER is detrimental.
SCREENSAVER_FORCER(ScreenSaverReset) resets the idle time for all
devices on DPMS unblank.

It prevents at least one use-case that GNOME tries to implement:
GNOME displays a notification before suspending. If the display is
currently blanked, GNOME lights it up to display the message. With the
original patch in place DPMS unblank also resets the device idle times, thus
restarting the timeout ad infinitum.

Switch this to a more suggestive SCREENSAVER_OFF(ScreenSaverReset). This keeps
the symmetry in blanking mode (DPMS and screensaver turn each other on/off as
expected) but does not reset the idle time on the devices.

https://bugzilla.gnome.org/show_bug.cgi?id=731241

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-By: Egbert Eich <eich@freedesktop.org>
2014-07-14 08:39:50 +10:00
Peter Hutterer
daa1a9d22d os: prevent negative array index access (#80890)
If an empty string is provided to LogMessageVerbSigSafe, the length of the
printed string is 0.

Read-only access only and the only effect it had was adding a linebreak or not.

X.Org Bug 80890 <http://bugs.freedesktop.org/show_bug.cgi?id=80890>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-10 10:24:04 +10:00
Keith Packard
9de3cc8daa Merge remote-tracking branch 'jturney/master' 2014-07-07 16:53:07 -07:00
Keith Packard
9308eafb7d Update to version 1.15.99.904
One more RC to get the non-PCI patches tested before release

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:28:26 -07:00
Thierry Reding
b6cc489838 xfree86: Make error message more readable
While at it also replace a tab by four spaces for consistency.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:13:20 -07:00
Thierry Reding
eeefecd9df xfree86: Support driver loading via OutputClass
Use the OutputClass configuration to determine what drivers to autoload
for a given device.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:12:41 -07:00
Thierry Reding
a270bb18ba xfree86: Introduce OutputClass configuration
The OutputClass section provides a way to match output devices to a set
of given attributes and configure them. For now, only matching by kernel
driver name is supported. This can be used to determine what DDX module
to load for non-PCI output devices. DDX modules can ship an xorg.conf.d
snippet (e.g. in /usr/share/X11/xorg.conf.d) that looks like this:

	Section "OutputClass"
	    Identifer "NVIDIA Tegra open-source driver"
	    MatchDriver "tegra"
	    Driver "opentegra"
	EndSection

This will cause any device that's driven by the kernel driver named
"tegra" to use the "opentegra" DDX module.

See the OUTPUTCLASS section in xorg.conf(5) for more details.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:12:09 -07:00
Thierry Reding
856bb80cea xfree86: Store kernel driver name in platform device attribute
When opening a DRM device, query the version and store the driver name
as a new attribute for future reference.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:11:34 -07:00
Thierry Reding
5a4e15c3f6 xfree86: Make driver matching consistent
Most of the driver enumeration functions take an array and a maximum
number of entries that they are allowed to fill in. Upon success, they
return the number of entries filled in. This allows them to be easily
used to consecutively.

One exception is the xf86MatchDriverFromFiles() function, which doesn't
return a value, so callers have to manually search the array for the
first empty entry.

This commit modifies the xf86MatchDriverFromFiles() to behave the same
way as others, which makes it easier to deal with.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>  (on arm / platform device)
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:11:00 -07:00
Tomasz Borowik
a61ca6f006 glamor: Fix stack corruption in glamor_init
glGet on GL_MAX_VIEWPORT_DIMS returns two values

Reviewed-by: Markus Wick <markus@selfnet.de>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-03 13:05:19 -07:00
Keith Packard
10d2805dbc fb: Don't free NULL pixmap in fbCloseScreen. Bug #80313
We fixed fbCloseScreen to use the FreePixmap function so that the
private counts would be updated correctly during CloseScreen. Xvfb
calls FreePixmap and sets devPrivate to NULL before fbCloseScreen is
called; not checking devPrivate before calling would result in a NULL
pointer dereference.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-07-03 12:57:19 -07:00
Yaakov Selkowitz
a5499870e2 hw/xwin: link dynamically and export symbols
With my patch to fix shared libXfont to work correctly on Cygwin/Win32,
there is no need for -static anymore.  But, XWin.exe must export its
symbols in order for them to override libXfont's stubs.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-07-03 15:48:07 +01:00
Maarten Lankhorst
5f3485b06e bump to 0.9.0 2014-06-26 10:37:19 +02:00
Thierry Reding
a3b44ad8db exa: Fix a warning when enabling DEBUG_TRACE_FALL
The format string wants a picture and a character, but the argument list
contains only a character, causing GCC to complain. Add the missing
argument.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-25 11:59:22 -07:00
Kristian Høgsberg
2f113d68f6 xwayland: Add glamor and DRI3 support
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-24 15:09:55 -07:00
Michel Dänzer
fd16555c2f Revert "glamor: Fix coordinates handling for composite source/mask pictures"
This reverts commit 4e9aabb6fc.

It broke kwin decorations with XRender compositing.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-24 15:08:17 -07:00
Chris Wilson
18744907d0 dri2: Invalidate DRI2Buffers upon SetWindowPixmap updates
When transitioning to a redirected or unredirected Window, the Composite
layer modifies the Window's Pixmap. However, the DRI2Buffer for the
Drawable is still pointing to the backing bo of the old Pixmap with the
result that rendering goes astray.

This now also effects DRI2 Drawables that are touched by PresentPixmap.

v2: Fixup the function name after rebasing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Reinis Danne <reinis.danne@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-23 15:05:08 -07:00
Chris Wilson
4d92fab39c dri2: Use the PrimeScreen when creating/reusing buffers
This fixes a segfault when we attempt to call ds->ReuseBufferNotify()
passing a Prime DRI2BufferPtr to the master backend.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80001
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-23 14:54:54 -07:00
Eric Anholt
0d9ad78180 glamor: Fix GLES2 non-VBO temporary memory allocation.
We'd get a request for like 16 bytes, claim to have allocated
GLAMOR_VBO_SIZE, and then not reallocate when something a request
bigger than 16 came along.  The intent was to always allocate at least
GLAMOR_VBO_SIZE.

Fixes segfaults with Xephyr -glamor_gles2 and running gnome-terminal.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-23 14:51:56 -07:00