Commit Graph

110844 Commits

Author SHA1 Message Date
Lionel Landwerlin a1e6b5e9be vulkan/util: generate a helper function to return pNext struct sizes
This will be used to copy chains of structures so that we can alterate
some of them.

v2: Drop vk_util.h include (Eric)
    Use VkBaseInStructure directly (Eric)

v3: Drop --platforms= param to generator script, instead produce a
    file with #ifdef based what platforms are compiled.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 17:02:02 +01:00
Tomeu Vizoso ad7c9ba0ec panfrost/midgard: Skip liveness analysis for instructions without dest
[Alyssa: Add comment explanation]

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-05-02 15:29:48 +00:00
Tomeu Vizoso a5dddc2d42 panfrost/midgard: Skip register allocation if there's no work to do
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-05-02 15:29:41 +00:00
Eric Engestrom 7c15a87aea gitlab-ci: add scons windows build using mingw
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 15:10:59 +00:00
Eric Engestrom a34ee4dec7 egl: hard-code destroy function instead of passing it around as a pointer
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2019-05-02 14:44:16 +00:00
Connor Abbott 6ec4ed48fc nir/search: Add debugging code to dump the pattern matched
This was useful while debugging the previous commit.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-05-02 16:14:06 +02:00
Connor Abbott 7ce86e6938 nir/search: Add automaton-based pre-searching
nir_opt_algebraic is currently one of the most expensive NIR passes,
because of the many different patterns we've added over the years. Even
though patterns are already sorted by opcode, there are still way too
many patterns for common opcodes like bcsel and fadd, which means that
many patterns are tried but only a few actually match. One way to fix
this is to add a pre-pass over the code that scans it using an automaton
constructed beforehand, similar to the automatons produced by lex and
yacc for parsing source code. This automaton has to walk the SSA graph
and recognize possible pattern matches.

It turns out that the theory to do this is quite mature already, having
been developed for instruction selection as well as other non-compiler
things. I followed the presentation in the dissertation cited in the
code, "Tree algorithms: Two Taxonomies and a Toolkit," trying to keep
the naming similar. To create the automaton, we have to perform
something like the classical NFA to DFA subset construction used by lex,
but it turns out that actually computing the transition table for all
possible states would be way too expensive, with the dissertation
reporting times of almost half an hour for an example of size similar to
nir_opt_algebraic. Instead, we adopt one of the "filter" approaches
explained in the dissertation, which trade much faster table generation
and table size for a few more table lookups per instruction at runtime.
I chose the filter which resulted the fastest table generation time,
with medium table size. Right now, the table generation takes around .5
seconds, despite being implemented in pure Python, which I think is good
enough. Based on the numbers in the dissertation, the other choice might
make table compilation time 25x slower to get 4x smaller table size, but
I don't think that's worth it. As of now, we get the following binary
size before and after this patch:

    text   data	    bss	     dec	   hex	filename
11979455 464720	 730864	13175039	c908ff	before i965_dri.so
   text	   data	    bss	    dec	           hex	filename
12037835 616244	 791792	13445871	cd2aef	after i965_dri.so

There are a number of places where I've simplified the automaton by
getting rid of details in the LHS patterns rather than complicate things
to deal with them. For example, right now the automaton doesn't
distinguish between constants with different values. This means that it
isn't as precise as it could be, but the decrease in compile time is
still worth it -- these are the compilation time numbers for a shader-db
run with my (admittedly old) database on Intel skylake:

Difference at 95.0% confidence
	-42.3485 +/- 1.375
	-7.20383% +/- 0.229926%
	(Student's t, pooled s = 1.69843)

We can always experiment with making it more precise later.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-05-02 16:14:06 +02:00
Samuel Pitoiset 08be23bfde radv: set WD_SWITCH_ON_EOP=1 when drawing primitives from a stream output buffer
According to RadeonSI, this seems to be required by the hardware
to avoid GPU hangs. I think I just forgot to set that bit when I
implemented VK_EXT_transform_feedback.

This fixes a GPU hang with Space Engineers and DXVK.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110291
Fixes: b4eb029062 ("radv: implement VK_EXT_transform_feedback")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-05-02 15:55:46 +02:00
Brian Paul 48107b5a2b glsl: fix typo in #warning message
Trivial.  Spotted by Eric Engestrom.
2019-05-02 06:32:57 -06:00
Brian Paul f0f7c3b03a svga: add SVGA_NO_LOGGING env var (v2)
valgrind crashes when we try to initialize host logging.  This
env var can be used to disable logging.

v2: rebase onto "svga: move host logging to winsys".

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2019-05-02 06:09:35 -06:00
Charmaine Lee 9c5f407b0b svga: move host logging to winsys
This patch adds a host_log interface to svga_winsys and
moves the host logging code to the winsys layer.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2019-05-02 06:09:35 -06:00
Eric Engestrom da8d9e2d88 wsi/wayland: document lack of vkAcquireNextImageKHR timeout support
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:51:03 +00:00
Daniel Stone 9826e04eca vulkan/wsi/wayland: Respect non-blocking AcquireNextImage
If the client has requested that AcquireNextImage not block at all, with
a timeout of 0, then don't make any non-blocking calls.

This will still potentially block infinitely given a non-infinte
timeout, but the fix for that is much more involved.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
Cc: Chad Versace <chadversary@chromium.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108540
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:51:03 +00:00
Erik Faye-Lund 8a67e4d30a docs: reorder heading and notice
All other pages has the heading as ghe first thing in the article. Let's
clean this up for consistency.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 561c2b9bfa docs: drop centered heading for faq
The FAQ is the only article we have that uses a centered heading, which
makes it look odd compared to the other articles. Let's drop the
centering for consistency.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund da4994f252 docs: turn faq-index into an ordered list
HTML already have a way of doing automatically ordered lists, so let's
use that instead of open-coding one.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund afda72dc10 docs: replace empty list with a none-paragraph
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund a4ee15d5fe docs: fix closing of list-items
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund b9eaeffaba docs: fixup list-item tags
The list items needs to contain everything part of the item, not just
the first paragraph.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 830821aaa4 docs: fix closing of paragraphs
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 02a5698017 docs: add missing lists
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 767c517816 docs: fixup bad paragraphing
This markup seems to assume paragraphs survive across block-elements,
which isn't the case. Let's rectify that.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund b877722d75 docs: remove stray list-start
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund c61e9aef76 docs: don't pointlessly close and re-start definition lists
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 0ea4ef2473 docs: fix incorrectly closed paragraph
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund d69c790c22 docs: drop paragraph around preformatted text
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 8ef86c9240 docs: start paragraph before closing it
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 41573d486f docs: close paragraphs before preformatted text
It's illegal to nest block-level elements such as <pre> inside <p> in
HTML. This means that when the paragraphs gets closed after a <pre>-tag,
we end up closing a non-existent tag, so the browser inserts a dummy
<p>-tag. This is entirely pointless, so let's just close these tags
before the <pre>-tag instead.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:16 +00:00
Erik Faye-Lund 5630540a27 docs: remove stray paragraph-close
This isn't matching any paragraph-open tags, so let's get rid of it.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 3bda82b2e5 docs: close lists
These lists never got closed. Let's fix that to avoid issues with bad
parsers.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 92917e82e8 docs: close paragraphs before lists
paragraphs can't contain lists, and attempting to close them after
the list just cause an extra, empty paragraph to be created. We don't
want that, so let's close the paragraphs before the list intead.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 0c3bab7761 docs: open list-item before closing it
A list-item must be openened before it can be closed. So let's replace
this closing tag with an opening tag.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 7eee13c467 docs: use dl/dd instead of blockquote for freedesktop link
The blockquote happens to match the indentation of the other lists for
most browsers, but this isn't a guarantee. Let's instead use a
definition-list, which is more strongly connected to a list, so it's
more likely to have the same indention.

This also makes sure that we don't have similar padding on the
right-hand side, in case we change the text-size.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 3f0568d7e5 docs: use h2 instead of b-tag for headings
<b>-tags aren't allowed in the root of <body>, so let's replace these
with <h2>-tags with some CSS to make them appear as bold.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund e81b6aa311 docs: remove stray paragraph-close
This tag tries to close a non-existent paragraph. Let's get rid of it!

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 5b2a7062ff docs: properly escape ampersand
Even in preformatted blocks, ampersands should be escaped. Let's correct
this, in case of strict parsers.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Erik Faye-Lund 13b990000f docs: properly escape '>'
The '>'-symbol should usually be escaped to avoid confusing strict
parsers. While it's very unlikely to cause issues as-is, let's quite it
for good measure.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 11:09:15 +00:00
Rhys Perry 13c423629e radv: fix set_output_usage_mask() with composite and 64-bit types
It previously used var->type instead of deref_instr->type and didn't
handle 64-bit outputs.

This fixes lots of transform feedback CTS tests involving transform
feedback and geometry shaders (mostly
dEQP-VK.transform_feedback.fuzz.random_geometry.*)

v2: fix writemask widening when comp != 0
v3: fix 64-bit variables when comp != 0, again

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: 19.0 19.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-05-02 10:24:20 +01:00
Erik Faye-Lund 8194d3887e docs: do not hard-code header-height
It's generally nicer to do this in terms of em units, as that scales
better with text-sizes, if we ever decide to change them.

The result is slightly larger than before, but only by a couple of
pixels.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund 5ffe4879b6 docs: simplify css-centering
With "display: flex;" we can make this a bit more automatic, not
requiring a bunch of values to be of specific values to get the right
centering.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund 130400b904 docs: use multiple background-images for header
This is a bit tidier than to set a background on the h1-text, requiring
it to be full height and all.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund cb0123e37a docs: remove spurious newline
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund 3eec974143 docs: avoid repeating the color
The color attribute is inherited in CSS, so there's no point in repeating
this.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund 86e38330d3 docs: avoid repeating the font
The font attribute is inherited in CSS, so there's no point in repeating
this.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund 755c118a4f docs: add missing semicolon
While it's legal to omit the last semicolon in a CSS block, it's
generally not considered good style, as it makes it harder to add new
lines.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund 3085eb90a0 docs: remove long commented out css
These attributes has been commented out since 2005; I don't think
there's a big chance of them making a return as-is.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund b6321d2f67 docs: remove non-existent css attribute
There's no CSS-attribute named "link", so let's remove it.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Erik Faye-Lund a2b0000d3c docs: normaize css-indent style
Tabs has been around as the indention style of this file since it was
created. Some newer CSS has added double-spaces, but let's keep it
consistent.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-05-02 08:45:57 +00:00
Thomas Hellstrom 20b7839392 winsys/svga: Don't abort on EBUSY errors from execbuffer
This error code typically indicated that a buffer object that was referenced
by the command stream was being used for CPU access by another client.
The correct action here is to retry after a while. Use usleep() until we
have proper kernel support for this wait.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2019-05-02 09:51:15 +02:00
Thomas Hellstrom c69557c4a2 winsys/svga: Update the drm interface file
The file vmwgfx_drm.h was a bit outdated. Update to a recent version,
including defines supporting coherent memory.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2019-05-02 09:51:07 +02:00