Commit Graph

15452 Commits

Author SHA1 Message Date
Olivier Fourdan
fda5675f9d xkb: add hook to allow/deny AccessX key repeat
The xserver generates the key repeat by itself.

But when used with another server processing inputs first (e.g. a
Wayland compositor), the other server may be busy dealing with some
other things and not queue up key release events in time.

Add a vfunc in XkbSrvInfo to possibly add a check before re-emitting a
keypress event in the AccessX timer handler, so that the key repeat has
a chance to be denied if the server processing the input is not ready.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-03 09:39:42 +02:00
Keith Packard
3735ab965a Merge remote-tracking branch 'daenzer/for-master' 2016-06-02 07:47:16 -07:00
Keith Packard
7c77c42fe8 dix: Don't update current time in the middle of input event processing
In patch 137ac094e7, Adam moved an
expensive call to UpdateCurrentTime out of the main dispatch
loop. That's a good change as the original fix from Chase was a bit
expensive. However, it breaks grab processing and so a couple of the
calls to UpdateCurrenTime need to be removed.

Input event processing can generate a stream of events; a button press
that activates a grab will send a press followed by a sequence of
enter/leave events. All of these should have the same time stamp on
the wire as they occur at the 'same' time.

More importantly, the grab time recorded in the device is pulled from
currentTime after all of the events are delivered, so if currentTime
doesn't match the time in the device event, then future grab
modifications will fail as the time marked in the device will be
'later' than the grab time known to the client (which is defined as
the timestamp from the activating input event).

A bit of history here -- it used to be that currentTime was driven
*entirely* by input events; those timestamps didn't even have to be
related to the system time in any way. Then we started doing ICCCM
stuff and people got confused when PropertyNotify events would have
the same timestamp even when delivered minutes apart because no input
events were delivered.

We added code in the server to go update the time, but only if no
input events were pending (so that the clock "wouldn't" go
backwards). The only places where this is necessary is in request
processing which may generate an event with a timestamp, and there
only at the very top of the request processing code so that the whole
request would be processed at the 'same time', just like events.

cc: Chase Douglas <chase.douglas@canonical.com>
cc: Peter Hutterer <peter.hutterer@who-t.net>
cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-01 10:31:52 -07:00
Keith Packard
ce65463374 os: Initialize NotifyFds earlier in startup
If the server calls AbortServer during the first-time initialization
(which can happen if you start the server on an already using
DISPLAY), then the dbus code will shut down and call the notify fd
interface. If the notify fd list hasn't been initialized, the server
will crash.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-01 10:31:52 -07:00
Keith Packard
f0756793e4 os: Lock input while messing with input device list
The list of input devices may be changed by hotplugging while the
server is active, and those changes may come from either the main
thread or the input thread. That means the list of input devices needs
to be protected by a mutex.

This prevents input drivers from receiving I/O ready callbacks after
removing a device.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-01 10:31:52 -07:00
Jonas Ådahl
a779fda224 xwayland: Use the CLOCK_MONOTONIC clock
By default the X server will try CLOCK_MONOTONIC_COARSE before
CLOCK_MONOTONIC, while A Wayland compositor may only support getting
their timestamps from the CLOCK_MONOTONIC clock. This causes various
issues since it may happen that a timestamp from CLOCK_MONOTONIC
retrieved before a sending an X request will still be "later" than the
timestamp the X server than gets after receiving the request, due to the
fact that CLOCK_MONOTONIC_COARSE has a lower resolution.

To avoid these issues, make Xwayland always use CLOCK_MONOTONIC, so
that it becomes possible for Wayland compositor only supporting
CLOCK_MONOTONIC and X server to use the same clock.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-31 08:44:38 +10:00
Michel Dänzer
43dbc556f3 xfree86/modes: Remove xf86_reload_cursors v2
No longer needed now that xf86CursorResetCursor is getting called for
each CRTC configuration change.

v2: Keep xf86_reload_cursors as a deprecated empty inline function
    until all drivers stop calling it. (Adam Jackson)

Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-30 17:54:51 +09:00
Michel Dänzer
e156c0ccb5 os: Use strtok instead of xstrtokenize in ComputeLocalClient
Fixes leaking the memory pointed to by the members of the array returned
by xstrtokenize.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-30 17:51:10 +09:00
Michel Dänzer
5ff75da317 glamor: Cannot use copies when accessing outside of composite source
Commit b64108fa ("glamor: Check for composite operations which are
equivalent to copies") failed to copy conditions from exaComposite which
ensure that the composite operation doesn't access outside of the source
picture.

This fixes rendercheck regressions from the commit above.

Reviewed-by: Keith Packard <keithp@keithp.com>
2016-05-30 17:49:32 +09:00
Michel Dänzer
84e0d5d63c xfree86/modes: Assign xf86_config->cursor in xf86_load_cursor_image v2
Fixes a crash on startup in the radeon driver's drmmode_show_cursor()
due to xf86_config->cursor == NULL, because no CRTC was enabled yet, so
xf86_crtc_load_cursor_image was never called.

(Also use scrn->pScreen instead of xf86ScrnToScreen(scrn))

v2: Set xf86_config->cursor at the beginning of xf86_load_cursor_image
    instead of at the end.

Reviewed-by: Keith Packard <keithp@keithp.com>
2016-05-30 16:30:43 +09:00
Keith Packard
28b2c880a9 xfree86: Provide xf86BlockSIGIO and xf86ReleaseSIGIO as wrappers for input mutex
Threaded input doesn't use SIGIO anymore, but existing drivers using
xf86BlockSIGIO and xf86ReleaseSIGIO probably want to lock the input
mutex during those operations. Provide inline functions to do this
which are marked as 'deprecated' so that drivers will get warnings
until they are changed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 00:17:34 -07:00
Keith Packard
2bed654be7 dix: Remove bogus input_mutex and input_mutex_count definitions from globals.c
These are local to inputthread.c; the ones in globals.c aren't
declared in any header file.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 00:17:15 -07:00
Keith Packard
06bdc3bc1a os: fix input_mutex_count off-by-one in input_force_unlock
input_force_unlock was mis-using input_mutex_lock and leaving it set
to -1. As this is  executed from OsInit at each server generation, on
the second time through, the mutex would be left locked (!) due to the
trylock call. This caused input to fail after the first server reset.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-29 19:21:15 -07:00
Keith Packard
de36200659 xfree86: Remove event reading code from xf86Wakeup
Oops. This didn't get removed when xfree86 was converted over to use
the input thread.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-29 19:21:06 -07:00
Keith Packard
c9703007ea Add ax_pthread.m4 to m4/
Threaded input requires AX_PTHREAD, which is provided by this file.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-29 19:20:51 -07:00
Keith Packard
c07b796b47 xfree86: Bump ABI versions
threaded input can affect drivers that use OsBlockSIGIO when dealing
with cursors.

Signed-off-by: Keith Packard <keithp@keithp.com>
Requested-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-29 18:44:37 -07:00
Keith Packard
24e4c6db25 test: Actually verify that two equivalent touch points are the same
I typo'd when fixing this at Peter's request and left off the '2' from
the second variable name.

Signed-off-by: Keith Packard <keithp@keithp.com>
2016-05-29 18:43:16 -07:00
Keith Packard
1338bfa81c test: Make touch test reflect new ability to realloc touch array [v2]
Threaded input allows the input code to call malloc while processing
events. In this case, that's in the middle of processing touch events
and needing to resize the touch buffer.

This test was expecting the old behaviour where touch points would get
dropped if the buffer was full. The fix is to check for the new
behaviour instead.

[v2]

 * make sure two finding two equivalent touches return the same touch
   object

 * check to make sure the queue resizes by the expected amount

   Changes provided by Peter Hutterer <peter.hutterer@who-t.net>

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-29 18:35:29 -07:00
Keith Packard
8b9b4387e8 glamor: Adjust for drawable x/y in composite's copy optimization
Patch b64108fa30 added a short cut that
identifies composite operations that can be performed with a simple
copy instead.

glamor_copy works in absolute coordinates, so the dx and dy values
passed in need to be converted from drawable-relative to absolute by
adding the drawable x/y values.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-05-27 13:24:39 -07:00
Keith Packard
0d16a0c3b9 os: Increase default client buffer to 16kB
This matches a change made in xcb and improves performance for a small
increase in memory usage.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-27 10:34:33 -07:00
Keith Packard
714736124f modesetting: Use new xf86CurrentCursor API
Use this instead of the (now deprecated) cursor pointer in the
xf86CrtcConfigRec.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-27 10:11:16 -07:00
Keith Packard
e69061e605 kdrive: Use threaded input
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
a977c9c4d0 xfree86: Use threaded input mechanism [v2]
Switch the XFree86 DDX over to threaded input

v2: Rewrite comment in xf86Helper about silken mouse

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
f84703b50c dix: Reallocate touchpoint buffer at input event time [v2]
Now that input is threaded, malloc can be used at event time to resize
the touchpoint buffer as needed.x

v2: Remove "Need to grow the queue means dropping events."
    from comment as it no longer applies. (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
e2df803fca mi: Grow event queue while reading events
Now that events are read at normal process time, we can use malloc to
grow the event queue instead of discarding events.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
30ac756798 Create a threaded mechanism for input [v7]
The current SIGIO signal handler method, used at generation of input events,
has a bunch of oddities. This patch introduces an alternative way using a
thread, which is used to select() all input device file descriptors.

A mutex was used to control the access to input structures by the main and input
threads. Two pipes to emit alert events (such hotplug ones) and guarantee the
proper communication between them was also used.

Co-authored-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>

v2: Fix non-Xorg link. Enable where supported by default.

    This also splits out the actual enabling of input threads to
    DDX-specific patches which follow

v3: Make the input lock recursive

v4: Use regular RECURSIVE_MUTEXes instead of rolling our own
    Respect the --disable-input-thread configuration option by
    providing stubs that expose the same API/ABI.

    Respond to style comments from Peter Hutterer.

v5: use __func__ in inputthread debug and error mesages.

    Respond to style comments from Peter Hutterer.

v6: use AX_PTHREAD instead of inlining pthread tests.

    Suggested by Emil Velikov <emil.l.velikov@gmail.com>

v7: Use pthread_sigmask instead of sigprocmask when using threads

    Suggested by Adam Jackson <ajax@redhat.com>

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-26 16:07:54 -07:00
Keith Packard
728c9570a0 xkb: Hold input lock across injected key event processing
This makes the code more consistent with other versions of
out-of-queue event processing

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
05d549d604 xfree86: Remove unnecessary errno save/restore in xf86ReadInput
When this code was called from SIGIO, saving and restoring errno could
possibly have made sense in some strange environment. Now that this
will not be called from a signal handler, there is no reason to do that.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
0bbb5aabf7 kdrive: Don't lock input across read in KdNotifyFd
We won't need these locks with the new threaded input code as it holds
the input lock across all of the input device I/O operations.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
6a5a4e6037 Remove SIGIO support for input [v5]
This removes all of the SIGIO handling support used for input
throughout the X server, preparing the way for using threads for input
handling instead.

Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
to stub functions input_lock/input_unlock so that we don't lose this
information.

xfree86 SIGIO support is reworked to use internal versions of
OsBlockSIGIO and OsReleaseSIGIO.

v2: Don't change locking order (Peter Hutterer)
v3: Comment weird && FALSE in xf86Helper.c
    Leave errno save/restore in xf86ReadInput
    Squash with stub adding patch (Peter Hutterer)
v4: Leave UseSIGIO config parameter so that
    existing config files don't break (Peter Hutterer)
v5: Split a couple of independent patch bits out
    of kinput.c (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Keith Packard
8cf832c288 kdrive: Remove unneeded AddEnabledDevice/RemoveEnabledDevice calls
kdrive uses the NotifyFd interface, which handles all of the necessary
fd configuration in the OS layer. Having it also use the old
EnableDevice interfaces is incorrect.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Adam Jackson
4fca18dc03 xfree86: Add IndirectGLX server flag (v2)
Not all display managers make it easy (or possible) to modify the
command line flags passed to the server, so add a way to get to it from
xorg.conf.

v2: Fix the FlagOptions list to not have IGLX after the terminator (Alan
Coopersmith)

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-26 14:00:11 -04:00
Keith Packard
181a4bd0cc glamor: Preserve GL_RED bits in R channel when destination is GL_RED [v2]
A1 and A8 pixmaps are usually stored in the Red channel to conform
with more recent GL versions. When using these pixmaps as mask values,
that works great. When using these pixmaps as source values, then the
value we want depends on what the destination looks like.

For RGBA or RGB destinations, then we want to use the Red channel
for A values and leave RGB all set to zero.

For A destinations, then we want to leave the R values in the Red
channel so that they end up in the Red channel of the output.

This patch adds a helper function, glamor_bind_texture, which performs
the glBindTexture call along with setting the swizzle parameter
correctly for the Red channel. The swizzle parameter for the Alpha
channel doesn't depend on the destination as it's safe to leave it
always swizzled from the Red channel.

This fixes incorrect rendering in firefox for this page:

	https://gfycat.com/HoarseCheapAmericankestrel

while not breaking rendering for this page:

	https://feedly.com

v2: Add change accidentally left in patch for missing
    glDisable(GL_COLOR_LOGIC_OP).
    Found by Emil Velikov <emil.l.velikov@gmail.com>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63397
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-26 09:17:59 -07:00
Keith Packard
b07bc700b3 glamor: glamor_make_current sooner in glamor_composite_with_shader
glamor_make_current is supposed to be called before any GL APIs.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-26 09:17:59 -07:00
Keith Packard
743b6f231e glamor: Disable logic ops when doing compositing [v4]
If the logic op gets left enabled, it overrides the blending
operation, causing incorrect contents on the display.

v2: Disable only on non-ES2, but disable even for PictOpSrc

v3: Found another place this is needed in
    glamor_composite_set_shader_blend

v4: Remove change dependent on new glamor_set_composite_texture
    API. This belongs in a different patch.
    Found by Emil Velikov <emil.l.velikov@gmail.com>

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-26 09:17:59 -07:00
Keith Packard
f5670b4a7e xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor
This makes the cursor pointer held by xf86Cursors.c get reset to NULL
whenever the cursor isn't displayed, and means that the reference
count held in xf86Cursor.c is sufficient to cover the reference in
xf86Cursors.c.

As HideCursor may be called in the cursor loading path after
UseHWCursor or UseHWCursorARGB when HARDWARE_CURSOR_UPDATE_UNHIDDEN
isn't set in the Flags field, the setting of the cursor pointer had to
be moved to the LoadCursor paths.

LoadCursorARGBCheck gets the cursor pointer, but LoadCursorImageCheck
does not. For LoadCursorImageCheck, I added a new function,
xf86CurrentCursor, which returns the current cursor. With this new
function, we can eliminate the cursor pointer from the
xf86CrtcConfigRec, once drivers are converted over to use it.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 09:13:20 -07:00
Michel Dänzer
b64108fa30 glamor: Check for composite operations which are equivalent to copies
Increases x11perf -compwinwin500 numbers by a factor of 10 for me with
radeonsi.

Conditions copied from exaComposite().

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-05-25 11:10:14 -04:00
Michel Dänzer
4711ebc174 glamor: Fix sampling outside of RGBx source/mask pictures
RENDER requires that sampling outside of any source/mask picture results
in alpha == 0.0.

The OpenGL border colour cannot set alpha = 0.0 if the texture format
doesn't have an alpha channel, so we have to use the RepeatFix handling
in that case.

Also, only force alpha = 1.0 when sampling inside of RGBx source/mask
pictures.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94514
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-05-25 11:09:09 -04:00
Keith Packard
4d649d5177 mi: Remove miPointerRec from API
This moves the definition of miPointerRec from mipointrst.h to
mipointer.c so that it is no longer visible in the API, allowing it to
be changed while the API/ABI is frozen.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2016-05-25 11:05:37 -04:00
Keith Packard
3f9015b6dc xwayland: Move sprite invalidation logic into mipointer
This creates a function that invalidates the current sprite and forces
a sprite image reload the next time the sprite is checked, moving that
logic out of the xwayland sources and allowing the miPointerRec
structure to be removed from the server API.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-25 11:00:56 -04:00
Adam Jackson
4e124203f2 damage: Make damageRegionProcessPending take a damage not a drawable
In the case where there's no damage monitor on the drawable, we look
that fact up twice: once before rendering to decide whether to compute
damage, and again after to decide whether to append it. This is wasted
effort, as the layer below us is effectively not allowed to change
whether there's a damage monitor for the drawable, but there's no way
the compiler can know that.

Instead, look it up once up front, and change the check macros and
damageRegionProcessPending to take a damage not a drawable.

v2: Explicitly pass pDamage to the macros as well (Michel Dänzer)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-05-18 15:25:44 -04:00
Jeremy Huddleston Sequoia
1bb932bf14 XQuartz: Fix default CFBundleVersion
m4/shell variable name collision broke the case when the configure
option was not used

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-18 13:15:57 -04:00
Andrew Comminos
2fbf5c2f91 Input: Send XI2 FocusOut NotifyPointer events to the pointer window.
This changes XInput 2's propagation of NotifyPointer focus out events to
include the pointer window as well, similar to core events. This fixes
a potential permanent focus in GDK when the focus moves to PointerRoot.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93539

Signed-off-by: Andrew Comminos <andrew@comminos.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-16 15:19:54 +10:00
Olivier Fourdan
984be789d5 xwayland: don't check events as early as InitInput
If data is received during XWayland startup, it will be read early in
InitInput() before the connection data is initialized, causing a crash.

Remove the wayland rountrips from InitInput() as this is done again in
xwl_screen_init() where it seems more appropriate.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-11 12:23:47 -04:00
Adam Jackson
3f569435e1 glx: Stop tracking hasUnflushedCommands
This is only meaningful for indirect contexts, and all it does is
(maybe) prevent a flush when switching away from an indirect context.
Indirect contexts aren't worth optimizing for, and Mesa tracks whether
a flush is needed anyway.

Careful readers will note that ReadPixels would reset the flag even
though it doesn't imply a flush!

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-11 11:23:20 -04:00
Adam Jackson
0ebb58f6b6 glx: Remove some redundant zero-init of GLX context state
The context is already calloc'd.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-11 11:23:20 -04:00
Adam Jackson
d5ba095982 glx/dri2: Implement dri2FlushFrontBuffer explicitly
No functional change.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-11 11:23:20 -04:00
Adam Jackson
0ba4e251a1 glx: Code motion
No functional change, just rearranging some code to make later commits
more obvious.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-11 11:23:20 -04:00
Adam Jackson
f523ebb549 dix: Remove pointless client-state callbacks
Private storage is pre-zeroed by the private system itself.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-05-11 11:21:08 -04:00
Michel Dänzer
140c2f1a54 EXA: Honour op parameter to exaGlyphs even if maskFormat == NULL
Reported-by: Uli Schlachter <psychon@znc.in>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94775
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2016-05-09 12:41:13 -04:00