Commit Graph

15220 Commits

Author SHA1 Message Date
Adam Jackson
a722d617a0 autogen: Set a default subject prefix for patches
Per discussion at XDC2015, we want this so we can easily distinguish
which module a patch is for. There's no way to set this in the
server-side config, so setting a default at autogen time is about the
best we can do.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-02-08 17:41:38 -05:00
Jan Burgmeier
7bb64d8c1d Fix XineramaQueryScreens for reverse prime
Make sure we account for slave CRTCs when building the monitor list,
since that's what rrxinerama uses to fake Xinerama geometry.

[ajax: Slightly more informative commit message.]

Bugzilla: https://bugs.freedesktop.org/92313
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-02-08 17:22:34 -05:00
Rui Matos
87d5534f70 xwayland: Clear pending cursor frame callbacks on pointer enter
The last cursor frame we commited before the pointer left one of our
surfaces might not have been shown. In that case we'll have a cursor
surface frame callback pending which we need to clear so that we can
continue submitting new cursor frames.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-02-08 17:09:40 -05:00
Chris Wilson
b7d392931a dri2: Only invalidate the immediate Window upon SetWindowPixmap
All callers of SetWindowPixmap will themselves be traversing the Window
heirarchy updating the backing Pixmap of each child and so we can forgo
doing the identical traversal inside the DRI2SetWindowPixmap handler.

Reported-by: Loïc Yhuel <loic.yhuel@gmail.com>
Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-02-08 17:07:32 -05:00
Laércio de Sousa
da69f2f15a ephyr: don't load ephyr input driver if -seat option is passed
When used for single-GPU multi-seat purposes, there's no need to enable
ephyr virtual input devices, since Xephyr is supposed to handle its own
hardware devices.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:20 -05:00
Laércio de Sousa
7213e99cbc ephyr: ignore Xorg multiseat command line options
Multi-seat-capable display managers commonly pass command-line options
like "-novtswitch", "-sharevts", or "-layout seatXXXX" to Xorg server,
but Xephyr currently refuses to start if these options are passed to it,
which may break Xephyr-based single-GPU multiseat setups.

[ajax: shortened summary]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:20 -05:00
Laércio de Sousa
edd443f69e kdrive: don't let evdev driver overwrite existing device names
KDrive evdev driver deliberately name grabbed devices as "Evdev mouse"
or "Evdev keyboard". This patch will make it skip this step if grabbed
devices are already named (i.e. from udev).

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:20 -05:00
Laércio de Sousa
0b80da0d18 kdrive: set "evdev" driver for input devices automatically, if available.
If kdrive input driver "evdev" is available, no other driver was
explicitly set for a given input device, and its kernel device node is
/dev/input/event*, this patch will make kdrive set "evdev" driver
automatically for such device.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:20 -05:00
Laércio de Sousa
6d6fd688ec kdrive: fix up NewInputDeviceRequest() implementation
This patch simplifies NewInputDeviceRequest() implementation in
kinput.c, making use of improved KdParseKbdOptions() /
KdParsePointerOptions() and merging several "if (ki)"/"if (pi)" clauses.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08 15:04:07 -05:00
Eric Anholt
2c3e876844 glamor: Flip around conditionals in RepeatNone fixups.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:52:41 -08:00
Eric Anholt
e82c8c81df glamor: Cut down a bunch of conditional handling for RepeatFix.
For hardware that doesn't do actual jumps for conditionals (i915,
current vc4 driver), this reduces the number of texture fetches
performed (assuming the driver isn't really smart about noticing that
the same sampler is used on each side of an if just with different
coordinates).

No performance difference on i965 with x11perf -magpixwin100 (n=40).
Improves -magpixwin100 by 12.9174% +/- 0.405272% (n=5) on vc4.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:52:41 -08:00
Eric Anholt
2c3273861c glamor: Clarify how the repeat values being passed around work.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:52:41 -08:00
Eric Anholt
990a8ee013 glamor: Clean up formatting of RepeatFix shader code.
All sorts of weird indentation, and some cuddled conditional
statements deep in the if tree.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:52:41 -08:00
Eric Anholt
20cb5b2d65 glamor: Clarify some logic in RepeatFix handling.
wh ratios are != 1.0 only when large, so with that we can simplify
down how we end up with RepeatFix being used.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:52:41 -08:00
Eric Anholt
07f0d90e4a glamor: Simplify the pixmap box looping.
We had a double loop across h and w, and passed the current x and y
out to callers who then used w to multiply/add to an index.  Instead,
just single loop across w * h.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:13:09 -08:00
Eric Anholt
0dbce65b08 glamor: Reuse the glamor_program_alpha_* enums for Render.
This is a step toward using glamor_program.c for Render acceleration.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:13:07 -08:00
Eric Anholt
9b676786de glamor: Drop extra SHADER_IN type for no mask present.
We can just hand in a constant mask and the driver will optimize away
the multiplication for us.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:13:05 -08:00
Eric Anholt
03f34f8556 glamor: Convert XV to using glamor_program.c.
One less custom path!  By following the common glamor_program.c use
pattern, we get the ability to handle large pixmaps as the
destination.  It's also one less place where glamor_utils.h coordinate
transformation happens.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:13:04 -08:00
Eric Anholt
f368a0ba3a glamor: Simplify XV vertex setup.
We were clipping the drawn rectangle to each clip box, then expanding
the box to a big triangle to avoid tearing, then drawing each triangle
to the destination through a scissor.  If we're using a scissor for
clipping, though, then we don't need to clip the drawn primitive on
the CPU in the first place.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:13:01 -08:00
Eric Anholt
294e45b60d glamor: Set up XV sampler uniforms once at program build time.
No sense doing it on every draw.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:57 -08:00
Eric Anholt
5d7bef2eed glamor: Drop dead glamor_pict_format_is_compatible().
This hasn't been used since 2f80c7791b
(GLAMOR_SEPARATE_TEXTURE removal).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:55 -08:00
Eric Anholt
4494a45040 glamor: Drop comment about dead yInverted flag.
Wait long enough, and you don't need to think about it at all.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:53 -08:00
Eric Anholt
f7c24e6ac3 glamor: Rename the *y_inverted helpers to not say "inverted".
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:51 -08:00
Eric Anholt
1fcb6f4cbf glamor: Drop dead *_from_x_coord_y() functions.
They've been dead since the yInverted removal
(e310387f44).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:48 -08:00
Eric Anholt
9ef11f13af glamor: Clarify when Render fallbacks happen due to an unsupported op.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:44 -08:00
Eric Anholt
b8229cc5f5 glamor: Label programs before linking them.
i965 does most of its compiling at link time, so our debug output for
its shaders didn't have the name on.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:39 -08:00
Eric Anholt
68f236ebd4 ephyr: Make sure we have GLX_ARB_create_context before calling it.
This should fix aborts()s from epoxy on old software stacks.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29 18:12:28 -08:00
Adam Jackson
623ff251dd xephyr: Remove DRI1
This only worked if the backend server supported DRI1, which is
stunningly unlikely these days.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-28 09:01:12 -05:00
Adam Jackson
953b71270c xfree86: Build parser for DRI config file subsection unconditionally
This applies regardless of which DRI you're asking for. Worse, leaving
it out means breaking the config file syntax in a pointless way, since
non-DRI servers can safely just parse it and ignore it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-28 09:01:08 -05:00
Adam Jackson
1a48a5863e xfree86: Remove ancient DRI build instructions
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-28 09:01:03 -05:00
Dave Airlie
d8ecbe5639 ephyr: catch X errors if we try to create a core context and fail.
This stops Xephyr failing on GLXBadFBConfig.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-27 16:47:46 -08:00
Timo Aaltonen
50ca286d79 dri2: Sync i915_pci_ids.h and i965_pci_ids.h from mesa
Adds Skylake, Kabylake and Broxton allowing them to use
modesetting + glamor with dri2.

Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2016-01-27 14:03:34 -05:00
Adam Jackson
bf23db42a4 modesetting: Require sufficiently new libdrm
Bugzilla: https://bugs.freedesktop.org/93883
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2016-01-27 12:53:49 -05:00
Dave Airlie
6978c8ee66 xwayland: add support for use core profile for glamor. (v2)
This adds support to Xwayland to try and use OpenGL core
profile for glamor first.

v1.1: use version defines.
v2: let glamor work out core profile itself.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:04:23 -08:00
Dave Airlie
79c3925532 glamor: add core profile support to EGL glamor. (v2)
v1.1: use version defines.
v2: let glamor work it out itself

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:04:19 -08:00
Keith Packard
98c3504dcf ephyr: Create 3.1 core profile context if possible (v3)
On desktop GL, ask for a 3.1 core profile context if that's available,
otherwise create a generic context.

v2: tell glamor the profile is a core one.
v2.1: add/use GL version defines
v3: let glamor work out core itself

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:04:10 -08:00
Dave Airlie
564d9f0f8c glamor: add core profile support. (v2)
Glamor works out from the profile if it is
core.

This flag is used to disable quads for rendering.

v1.1: split long line + make whitespace conform (Michel)
v1.2: add GL 3.1 version defines
v2: move to having glamor work out the profile.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:04:03 -08:00
Keith Packard
e6754dcb59 glamor: Use GL_RED instead of GL_ALPHA if we have texture_swizzle (v3)
GL_RED is supported by core profiles while GL_ALPHA is not; use GL_RED
for one channel objects (depth 1 to 8), and then swizzle them into the
alpha channel when used as a mask.

[airlied: updated to master, add swizzle to composited glyphs and xv paths]

v2: consolidate setting swizzle into the texture creation code, it
    should work fine there. Handle swizzle when setting color as well.
v3: Fix drawing to a8 with Render (changes by anholt, reviewed by airlied).

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:03:54 -08:00
Eric Anholt
5042b0652b glamor: Drop duplicated GLAMOR_DEFAULT_PRECISIONs in render accel.
We only need it once at the top of the shader, so just put it
there.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-26 12:03:49 -08:00
Dave Airlie
1fd82c764d glamor: don't do copy if we have 0 boxes to copy.
This happens if you run twm + mplayer + xclock and drag
the clock over the mplayer. If we don't catch it, we cause
an illegal draw elements command to be passed to GL.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:02:54 -08:00
Dave Airlie
e7308b6c77 glamor: Add support for CA rendering in a single pass.
It's been on the list to add dual source blending support to avoid the
two pass componentAlpha code.  Radeon has done this for a while in
EXA, so let's add support to bring glamor up to using it.

This adds dual blend to both render and composite glyphs paths.

Initial results show close to doubling of speed of x11perf -rgb10text.

v2: Fix breakage of all of CA acceleration for systems without
    GL_ARB_blend_func_extended.  Add CA support for all the ops we
    support in non-CA mode when blend_func_extended is present.  Clean
    up some comments and formatting.  (changes by anholt)

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-01-26 12:02:42 -08:00
Eric Anholt
cab14a9a08 glamor: Drop the composite_with_copy path entirely.
I originally inherited this from the EXA code, without determining
whether it was really needed.  Regular composite should end up doing
the same thing, since it's all just shaders anyway.  To the extent
that it doesn't, we should fix composite.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-26 12:02:37 -08:00
Eric Anholt
510c860564 glamor: Fix copy-like Render operations between 15 and 16 depth.
Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up
failing, unless you're doing a straight copy at the same bpp where the
misinterpretation matches on both sides.

Fixes rendercheck/blend/over and renderhceck/blend/src in piglit.

Please cherry-pick this to active stable branches.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-21 17:50:25 -08:00
Adam Jackson
bc415fb1e0 glx: Fix GLX_EXT_create_context_es2_profile support
As of v4 of this extension, any GLES version number may be requested (to
enable GLES3 and later). To comply with this, simply remove the API
version checks and leave it to the DRI driver to validate. This happens
to also enable using GLES1 in direct contexts, so if that's the dire
situation you find yourself in, your client driver at least stands a
chance of working.

v4 also specifies that both extension strings should be advertised for
compatibility with clients written against v1 of the extension spec, so
add the es_profile bit to the extension list and enable it whenever we
would enable es2_profile.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-21 10:11:07 -05:00
Keith Packard
49aa5e3ea4 glamor: Use vertex array objects
Core contexts require the use of vertex array objects, so switch both glamor
and ephyr/glamor over.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21 06:49:40 +10:00
Dave Airlie
d99204fb5e glamor/xv: add vbo support (v2.1)
This converts the Xv code to using VBOs instead of
client ptrs. This is necessary to move towards using
the core profile later.

v2: put all boxes into single vbo, use draw arrays
to offset things. (Eric)
v2.1: brown paper bag with releasing vbo.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21 06:47:41 +10:00
Dave Airlie
5582ad1b9b glamor: use vbos in gradient/picture code.
This converts two client arrays users to using vbos,
this is necessary to move to using core profile later.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21 06:47:35 +10:00
Michel Dänzer
25eca80265 present: Handle wraparound when comparing MSC values
When a window moves from one CRTC to another, present_window_to_crtc_msc
updates window_priv->msc_offset according to the delta between the
current MSC values of the old and new CRTC:

            window_priv->msc_offset += new_msc - old_msc;

window_priv->msc_offset is initially 0, so if new_msc < old_msc,
window_priv->msc_offset wraps around and becomes a large number. If the
window_msc parameter passed in is small (in particular if it's 0, such as
is the case when the client just wants to know the current window MSC
value), the returned CRTC MSC value may still be a large number. In that
case, the existing MSC comparisons in pixmap_present weren't working as
intended, resulting in scheduling a wait far into the future when the
target MSC had actually already passed. This would result in the client
(e.g. the Chromium browser) hanging when moving its window between CRTCs.

In order to fix this, introduce msc_is_(equal_or_)after helper functions
which take the wraparound into account for comparing two MSC values.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2016-01-19 18:03:26 -08:00
Michel Dänzer
1db6de7b6a glamor: Disable debugging messages other than GL API errors
According to Nicolai Hähnle, the relevant specification says "All
messages are initially enabled unless their assigned severity is
DEBUG_SEVERITY_LOW", so we need to explicitly disable the messages we
don't want to get. Failing that, we were accidentally logging e.g.
shader stats intended for shader-db.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93659
Tested-by: Laurent Carlier <lordheavym@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-19 12:48:25 -08:00
Dave Airlie
8116fd8a76 glamor: store old fonts in double width textures.
There is a problem with some fonts that the height necessary
to store the font is greater than the max texture size, which
causes a fallback to occur. We can avoid this by storing two
macro columns side-by-side in the texture and adjusting
the calculations to suit.

This fixes
xfd -fn -*-*-*-*-*-*-*-*-*-*-*-*-*-*
falling back here, when it picks
-arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-13 11:21:02 +10:00