Commit Graph

14702 Commits

Author SHA1 Message Date
Adam Jackson 2123f7682d xserver 1.17.2
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-06-16 11:42:47 -04:00
Dave Airlie 8a5fb096d4 glamor: don't do render ops with matching source/dest (v2)
XRender defines this, GL really doesn't like it.

kwin 4.x and qt 4.x seem to make this happen for the
gradient in the titlebar, and on radeonsi/r600 hw
this draws all kinds of wrong.

v2: bump this up a level, and check it earlier.
(I assume the XXXX was for this case.)

[This corresponds to fa12f2c150 in master,
fixed up for 1.17 branch. - ajax]

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-16 11:21:26 -04:00
Rui Matos ea9e021843 xwayland: Throttle our cursor surface updates with a frame callback
In some extreme cases with animated cursors at a high frame rate we
could end up filling the wl_display outgoing buffer and end up with
wl_display_flush() failing.

In any case, using the frame callback to throttle ourselves is the
right thing to do.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit cbb7eb73b5)
2015-06-16 11:21:26 -04:00
Chris Wilson 6cc61df989 present: Copy unflip contents back to the Screen Pixmap
As we unflip after the flip Window no longer passes the pixel ownership
test for the full Screen Pixmap, we can no longer utilize that Window to
copy the contents back to the backing pixmap. To first flip means that
the Window was originally backed by the Screen Pixmap and wholly covered
the Pixmap, thus we need to copy the last frame contents to the Screen
Pixmap when the flip chain is complete.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 806470b9f6)
2015-06-16 11:21:26 -04:00
Vicente Olivert Riera 8b7e1f362b backtrace.c: Fix word cast to a pointer
backtrace.c uses a word size provided by libunwind. In some
architectures like MIPS, libunwind makes that word size 64-bit for all
variants of the architecture.

In the lines #90 and #98, backtrace.c tries to do a cast to a pointer,
which fails in all MIPS variants with 32-bit pointers, like MIPS32 or
MIPS64 n32, because it's trying to do a cast from a 64-bit wide variable
to a 32-bit pointer:

Making all in os
make[2]: Entering directory
`/home/test/test/1/output/build/xserver_xorg-server-1.15.1/os'
  CC     WaitFor.lo
  CC     access.lo
  CC     auth.lo
  CC     backtrace.lo
backtrace.c: In function 'xorg_backtrace':
backtrace.c:90:20: error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
	 if (dladdr((void *)(pip.start_ip + off), &dlinfo) &&
dlinfo.dli_fname &&
		    ^
backtrace.c:98:13: error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
	     (void *)(pip.start_ip + off));
	     ^
cc1: some warnings being treated as errors
make[2]: *** [backtrace.lo] Error 1
make[2]: *** Waiting for unfinished jobs....

Making the cast to a pointer-sized integer, and then to a pointer fixes
the problem.

Related:
  https://bugs.freedesktop.org/show_bug.cgi?id=79939

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit baa50f60ac)
2015-06-03 09:05:39 -04:00
Ray Strode c424458c93 xwayland: default to local user if no xauth file given. [CVE-2015-3164 3/3]
Right now if "-auth" isn't passed on the command line, we let
any user on the system connect to the Xwayland server.

That's clearly suboptimal, given Xwayland is generally designed
to be used by one user at a time.

This commit changes the behavior, so only the user who started the
X server can connect clients to it.

Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 76636ac12f)
2015-06-03 09:05:39 -04:00
Ray Strode 01b4f5bc89 os: support new implicit local user access mode [CVE-2015-3164 2/3]
If the X server is started without a '-auth' argument, then
it gets started wide open to all local users on the system.

This isn't a great default access model, but changing it in
Xorg at this point would break backward compatibility.

Xwayland, on the other hand is new, and much more targeted
in scope.  It could, in theory, be changed to allow the much
more secure default of a "user who started X server can connect
clients to that server."

This commit paves the way for that change, by adding a mechanism
for DDXs to opt-in to that behavior.  They merely need to call

LocalAccessScopeUser()

in their init functions.

A subsequent commit will add that call for Xwayland.

Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4b4b9086d0)
2015-06-03 09:05:39 -04:00
Ray Strode bebaaa2216 xwayland: Enable access control on open sockets [CVE-2015-3164 1/3]
Xwayland currently allows wide-open access to the X sockets
it listens on, ignoring Xauth access control.

This commit makes sure to enable access control on the sockets,
so one user can't snoop on another user's X-over-wayland
applications.

Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c4534a38b6)
2015-06-03 09:05:39 -04:00
Egbert Eich 761be9cceb Xephyr: Fix broken image when endianess of client machine and host-Xserver differ
The image is created in the native byte order of the machine Xephyr is
rendered on however drawn in the image byte order of the Xephyr server.
Correct byte order in the xcb_image_t structure and convert to native
before updating the window.
If depths of Xephyr and host server differ this is already taken care of
by the depth conversion routine.
It is a terrible wase to always convert and transmit the entire image
no matter of the size of the damaged area. One should probably use
sub-images here. For now we leave this as an exercise.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 910ddf8521)
2015-06-03 09:05:39 -04:00
Egbert Eich f775f24773 Xephyr: Fix screen image draw for the non-Glamor & non-XHSM case
xcb_image_put() prints the entire image, therefore don't use an offset.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c65eda5e66)
2015-06-03 09:05:39 -04:00
Egbert Eich 6395873ea9 Xephyr: Fix compile when debugging is enabled
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 66212ca0d2)
2015-06-03 09:05:38 -04:00
Egbert Eich 70ce575307 Xephyr: Print default server display number if none is specified
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b536d56aef)
2015-06-03 09:05:38 -04:00
Egbert Eich a4882ac792 Xephyr: Don't crash when no command line argument is specified
The DDX specific command line parsing function only gets called
if command line arguments are present. Therefore this function
is not suitable to initialize mandatory global variables.
Replace main() instead.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 5af73f4908)
2015-06-03 09:05:38 -04:00
Jonathan Gray 0dc9da5ce9 glamor: fix build when DRI3 is not defined
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 00f79416b1)
2015-06-03 09:05:38 -04:00
Jonathan Gray 828a1e3803 glamor: remove const from the return type of glamor_get_drawable_location()
Fixes a build error with gcc 4.2.1 on OpenBSD due to
-Werror=return-type from xorg-macros.

error: type qualifiers ignored on function return type

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7c609c911a)
2015-06-03 09:05:38 -04:00
Michel Dänzer 68eb9afb20 modesetting: Include dix-config.h from dumb_bo.c
Fixes mmap failures with 32-bit builds.

Signed-off-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 145ae03814)
2015-06-03 09:05:38 -04:00
Michel Dänzer 554cb404a5 Add AC_SYS_LARGEFILE defines to dix-config.h
Without this, AC_SYS_LARGEFILE doesn't actually have any effect.

Signed-off-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4962c8c088)
2015-06-03 09:05:38 -04:00
Adel Gadllah ae3aa32688 modesetting: Fix software cursor fallback
The code in drmmode_set_cursor does not properly handle the case where
drmModeSetCursor2 returns any other error than EINVAL and silently fails to set
a cursor.

So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable
the cursor2 usage on EINVAL.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c3ce9d8fd4)
2015-06-03 09:05:38 -04:00
Dima Ryazanov d8a39245d6 xwayland: Implement smooth scrolling
We don't even need to simulate button clicks; it's done automatically.
This also fixes scrolling in Qt5 apps.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 81a51a6cac)
2015-06-03 09:05:38 -04:00
Jason Gerecke 5b23104d58 dix: Do not allow device transform to be set on valuatorless devices
If a device does not have any valuators, it makes no sense to set the
device transformation. Return a BadMatch error to let the caller know
that they're trying something stupid.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9ff89a2e46)
2015-06-03 09:05:38 -04:00
Rui Matos 6f7a3366a2 dix/events: Set currentTime to the given time stamp in NoticeTime
The refactoring in commit efc1035ca9
removed the actual update of currentTime.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit fa62ca68ef)
2015-06-03 09:05:38 -04:00
Brent Collins 1a87dbc2ce shm: Fix xselinux resource initialization for xinerama pixmaps
This is necessary to avoid a NULL pointer deference when the pixmap is
used later.

[ajax: massaged commit message, fixed it to compile]

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Brent Collins <bcollins@trustedcs.com>
(cherry picked from commit 7470578520)
2015-06-03 09:05:38 -04:00
Chris Wilson 4f3df05728 shm: Fix use-after-free in ShmDestroyPixmap
We pass the pPixmap->drawable.id to the ShmDetachSegment function after
the pPixmap is freed. Fortunately, we don't use the value inside
ShmDetachSegment and can simply pass zero instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
(cherry picked from commit bcec9f867d)
2015-06-03 09:05:38 -04:00
Olivier Fourdan 40f35e4488 dix: Fix image byte order on big endian hardware
Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using
them.

Otherwise, image byte order could be wrong on big endian hardware even
though endianess detection is correct.

Reported-by: Tim Waugh <twaugh@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 1af15aaf27)
2015-06-03 09:05:38 -04:00
Jason Gerecke 5497f56b87 xfree86: Return NULL from xf86CompatOutput if no compat_output is defined
If no compat_output is defined, we inadvertently (attempt to) return
whatever data is at index -1. Instead, return NULL since that's what
callers are expecting.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit 28159eff6b)
2015-06-03 09:05:37 -04:00
Robert Ancell 9e39ba30f1 xwayland: Fix error strings
Fix missing newlines from error string and fix grammar.

Signed-off-by: Robert Ancell <robert.ancell@canonical.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit cad831f398)
2015-06-03 09:05:37 -04:00
Colin Harrison 953520ef98 os/utils.c: Don't try to build os_move_fd() for WIN32
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit a9b4b7b796)
2015-06-03 09:05:37 -04:00
Jon TURNEY cc88bb64ad hw/xnest: Fix build for MinGW
Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid
type clashes caused by the unwrapped windows.h that includes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 2b114d6a51)
2015-06-03 09:05:37 -04:00
Jon TURNEY 36bba39db1 hw/xwin/winclipboard: Link xwinclip with -lpthread
Link xwinclip with -lpthread to fix build for MinGW

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 5bf3e5c832)
2015-06-03 09:05:37 -04:00
Colin Harrison 5ea517fd39 os/xdmcp.c: Include Xtrans.h when building for WIN32
Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup()

xserver/os/xdmcp.c: In function ‘get_addr_by_name’:
xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration]

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit 8363ef2764)
2015-06-03 09:05:37 -04:00
Alan Coopersmith 2a2f676dce Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86
Needed when using a compiler that defaults to 64-bit output when
configure is checking for $host_cpu.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
(cherry picked from commit d4e85afac6)
2015-06-03 09:05:37 -04:00
Ray Strode 9b9d621f11 systemd-logind: don't second guess D-Bus default timeout
At the moment, the X server uses a non-default timeout for D-Bus
messages to systemd-logind. The only timeouts normally used with
D-Bus are:

1) Infinite
2) Default

Anything else is just as arbitrary as Default, and so rarely makes
sense to use instead of Default.

Put another way, there's little reason to be fault tolerant against
a local root running daemon (logind), that in some configurations, the
X server already depends on for proper functionality.

This commit changes systemd-logind to just use the default timeouts.

Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b1029716e4)
2015-06-03 09:05:37 -04:00
Ray Strode bb5a8da756 systemd-logind: filter out non-signal messages from message filter
It's possible to receive a message reply in the message filter if a
previous message call timed out locally before the reply arrived.

The message_filter function only handles signals, at the moment, and
does not properly handle message replies.

This commit changes the message_filter function to filter out all
non-signal messages, including spurious message replies.

Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 792e925167)
2015-06-03 09:05:37 -04:00
Keith Packard 2c818e7b5d mi: Partial pie-slice filled arcs may need more space for spans
The mi filled arc code estimates that a filled arc will produce no
more spans than the arc is tall. This is true for most arcs except
for pie-slice arcs strictly between 180 and 360 degrees where the missing
portion of the arc faces up or down such that we get two spans on some
scanlines.

For those, we need to reserve room for another height/2 spans. This
patch just does it for all partial pie-sliced arcs to make the test
easier to understand; it's just over-allocating a bit of memory, so
that's safe.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 41932dfbc8)
2015-06-03 09:05:37 -04:00
Hans de Goede 72b66d508a Re-enable non serverfd input devices immediately on vtenter
Non serverfd input devices will never get a systemd-logind dbus resume signal,
causing them to never get re-enabled.

This commit changes xf86VTEnter() to enable them immediately, fixing this.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 21e7d2bb5c)
2015-06-03 09:05:37 -04:00
Aaron Plattner 2ce54b8139 xfree86: Add GPU screens even if there are no active GDevs
xf86platformProbeDev creates GPU screens for any platform devices that were not
matched by a GDev in the loop above, but only if there was at least one device.
This means that it's impossible to configure a device as a GPU screen if there
is only one platform device that matches that driver.

Instead, create a GPU screen (if possible) for any platform device that was not
claimed by the GDev loop.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit e36236eade)
2015-06-03 09:05:37 -04:00
Aaron Plattner 905126c66c xfree86: Fix xf86_check_platform_slot's handling of PCI
If a PCI entity is found, xf86_check_platform_slot performs a device ID check
against the xf86_platform_device passed in.  However, it just returns
immediately without checking the rest of the entities first.  This leads to this
situation happening:

1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI
2. The intel driver creates entity 1 for its platform device, opening
   /dev/dri/card0
3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device,
   which calls doPlatformProbe, which calls xf86_check_platform_slot.
4. xf86_check_platform_slot compares the Intel platform device against the
   NVIDIA PCI entity.  Since they don't have the same device ID, it returns
   TRUE.
5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity
   for the Intel one.

Fix this by only returning FALSE if the PCI ID matches, and continuing the loop
otherwise.  In the scenario above, this allows it to continue on to find the
Intel platform device that matches the second entity.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4ecda36259)
2015-06-03 09:05:37 -04:00
Jon TURNEY d8153d1767 glamor: Fix build when configured --enable-glamor --disable-xshmfence
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 8102927282)
2015-06-03 09:05:37 -04:00
Olivier Fourdan e0bb4a1ec7 glamor: check max native ALU instructions
When using glamor (either in Xephyr or Xwayland) on hardware with too
low instructions limit, glamor fallbacks to sw due to large shaders.

This makes glamor unbearably slow on such hardware.

Check reported value for GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB
and fail in glamor_init() if the limit is lower than 128.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88316
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 4218a1e066)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 9d4c8ff673 glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2
Remove the calls to GL_TEXTURE_MAX_LEVEL. Setting the filtering is
a sufficient hint to the driver about texture mipmap allocation.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 0e1372e1bd)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 3bfeccf88a glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER
The latter might not be available on GLES2.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit c1f35c3d86)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 6a37a33e4c glamor: do not check for gl errors in glamor_build_program
According to Eric Anholt the check for glGetError is not needed here.
Because a opengl error might be set before this function is called
keeping the check could result in glamor_build_program returning
failure when building the shader succeeded.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit b66501b4fd)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 1ec335ca15 glamor: only use (un)pack_subimage when available
Check for GL_EXT_unpack_subimage and GL_NV_pack_subimage to
check if GL_(UN)PACK_ROW_LENGTH is available. Set the offsets
manually to prevent calls to GL_(UN)PACK_SKIP_*.

v2: Check support for GL_NV_pack_subimage as suggested by Matt Turner.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 7c6f483670)
2015-06-03 09:05:36 -04:00
Olivier Fourdan 5df6982a14 xwayland: Add dependency on glamor libs
So that Xwayland gets re-linked each time glamor is modified.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 4f534c26c6)
2015-06-03 09:05:36 -04:00
Olivier Fourdan e2bddc36af ephyr: Fail if glamor is requested but not usable
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 251a067993)
2015-06-03 09:05:36 -04:00
Emil Velikov e2c6135179 randr: use randr: prefix in ErrorF()
To provide some information about the origin of the message.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 93ef0e580e)
2015-06-03 09:05:36 -04:00
Emil Velikov 8c3a0a1904 randr: remove chatty error messages
All of these seem like left over from developments stage. Remove them as
they can cause excessive flood in the logs.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a08ee77398)
2015-06-03 09:05:36 -04:00
Jon TURNEY 660b4469f2 hw/xwin: Report Cygwin version information in log
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit b2aaf69e62)
2015-06-03 09:05:36 -04:00
Jon TURNEY c3db722ffe hw/xwin/glx: Improve code generator to deal with latest Khronos OpenGL registry XML
Improve the parsing of the <proto> XML element

Include all text from the param element, in the order it appears in the xml
document, as part of the formal parameter declaration

This is needed to correctly handle the XML description added in svn r27498 of
glPathGlyphIndexRangeNV()'s baseAndCount parameter of type GLuint[2]

This fixes the way the parameter declaration is generated so it is in the
correct form 'GLuint baseAndCount_[2]' and not 'GLuint baseAndCount[2]_'

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit d02f9611c8)
2015-06-03 09:05:36 -04:00
Jon TURNEY 6fa7510e6a hw/xwin/glx: Refactor parsing of the <proto> XML element
Factor out duplicated code used in parsing of the <proto> XML element in the
code generator

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 5071cb7e0a)
2015-06-03 09:05:36 -04:00