Commit Graph

106645 Commits

Author SHA1 Message Date
Eric Anholt a7c9fd7573 v3d: Drop unused count_nir_instrs() helper.
This was for shader-db, but I haven't cared about NIR instruction counts
in a long time.
2018-12-30 08:03:51 -08:00
Eric Anholt 696f63f1b4 v3d: Hook up some shader-db output to GL_ARB_debug_output.
This allows the original shader-db project's run.c runner to parse things
easily, and is probably a good thing to have for GL_ARB_debug_output in
general.  I formatted it more like Intel's so I can mostly reuse their
report script.
2018-12-30 08:03:51 -08:00
Eric Anholt 87b251a940 v3d: Add a "precompile" debug flag for shader-db.
I've been using my apitrace-based shader-db so far, but it's slow
(apitrace decompression), intrusive (apitrace windows spamming the
screen), and doesn't have much coverage.  The original shader-db provides
a lot more coverage and compiles faster, at the expense of not having the
actual runtime variant key.  As v3d has a lot less runtime variation than
vc4 did, this tradeoff makes more sense.
2018-12-29 13:52:09 -08:00
Eric Anholt 9ec6a3d621 v3d: Fix uniform pretty printing assertion failure with branches.
Fixes: 248a7fb392 ("v3d: Do uniform pretty-printing in the QPU dump.")
2018-12-29 13:52:09 -08:00
Dylan Baker 133a5b8383 meson: Override C++ standard to gnu++11 when building with altivec on ppc64
Otherwise there will be symbol collisions for the vector name.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108943
Distro Bug: https://bugs.gentoo.org/673622
Fixes: 42ea0631f1
       ("meson: build clover")
Acked-by: Matt Turner <mattst88@gmail.com>
2018-12-28 11:04:57 -08:00
Lionel Landwerlin f7bccf6ab4 intel/aub_viewer: highlight true booleans
Useful to spot PIPE_CONTROL flags.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-12-28 16:48:46 +00:00
Lionel Landwerlin 6ba61ea391 intel/aub_viewer: fold binding/sampler table items
Makes things easier to read rather than a long block of text.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-12-28 16:48:43 +00:00
Lionel Landwerlin 7ab8c80625 intel/aub_viewer: fix shader view
Not decoding the shader at the right offset.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-12-28 16:48:40 +00:00
Lionel Landwerlin f3ed4a058d intel/aub_viewer: print address of missing shader
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-12-28 16:48:21 +00:00
Lionel Landwerlin 0382e11989 intel/aub_viewer: fixup 0x address prefix
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-12-28 16:48:18 +00:00
Lionel Landwerlin 8e2fda411a intel/aub_viewer: fix shader get_bo
Instruction addresses are always in ppgtt space.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-12-28 16:48:08 +00:00
Nicholas Kazlauskas e260493f2a radeonsi: Enable adaptive_sync by default for radeon
It's better to let most applications make use of adaptive sync
by default. Problematic applications can be placed on the blacklist
or the user can manually disable the feature.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2018-12-28 17:08:14 +01:00
Nicholas Kazlauskas 2e12fe425f loader/dri3: Enable adaptive_sync via _VARIABLE_REFRESH property
The DDX driver can be notified of adaptive sync suitability by
flagging the application's window with the _VARIABLE_REFRESH property.

This property is set on the first swap the application performs
when adaptive_sync is set to true in the drirc.

It's performed here instead of when the loader is initialized for
two reasons:

(1) The window's drawable can be missing during loader init.
    This can be observed during the Unigine Superposition benchmark.

(2) Adaptive sync will only be enabled closer to when the application
    actually begins rendering.

If adaptive_sync is false then the _VARIABLE_REFRESH property
is deleted on loader init.

The property is only managed on the glx DRI3 backend for now. This
should cover most common applications and games on modern hardware.

Vulkan support can be implemented in a similar manner but would likely
require splitting the function out into a common helper function.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2018-12-28 16:44:47 +01:00
Nicholas Kazlauskas a9c36dbf9c drirc: Initial blacklist for adaptive sync
Applications that don't present at a predictable rate (ie. not games)
shouldn't have adapative sync enabled. This list covers some of the
common desktop compositors, web browsers and video players.

[ Michel Dänzer: Added entry for firefox-esr ]

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2018-12-28 16:44:27 +01:00
Nicholas Kazlauskas 7407670036 util: Add adaptive_sync driconf option
This option lets the user decide whether mesa should notify the
window manager / DDX driver that the current application is adaptive
sync capable.

It's off by default.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2018-12-28 16:38:06 +01:00
Nicholas Kazlauskas 759b940389 util: Get program name based on path when possible
Some programs start with the path and command line arguments in
argv[0] (program_invocation_name). Chromium is an example of
an application using mesa that does this.

This tries to query the real path for the symbolic link /proc/self/exe
to find the program name instead. It only uses the realpath if it
was a prefix of the invocation to avoid breaking wine programs.

Cc: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-12-28 15:41:01 +01:00
Tomeu Vizoso bf1dfcc3e8 etnaviv: Consolidate buffer references from framebuffers
We were leaking surfaces because the references taken in
etna_set_framebuffer_state weren't being released on context destroy.

Instead of just directly releasing those references in
etna_context_destroy, use the util_copy_framebuffer_state helper.

Take the chance to remove the duplicated buffer references in
compiled_framebuffer_state to avoid confusion.

The leak can be reproduced with a client that continuously creates and
destroys contexts.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reported-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-12-28 10:22:01 +01:00
Dave Airlie d1ce7eba8b virgl/vtest: fix front buffer flush with protocol version 0.
Older versions of virglrenderer before 33da7361aec486290df0aec4ad8dfa8ff6adde2c
in vtest mode, misrender gears.

Fixes: 9d81cd8e7c (virgl: Pass resource size and transfer offsets)
Reviewed-By: Gert  Wollny <gert.wollny@collabora.com>
2018-12-28 16:50:38 +10:00
Dylan Baker 6adbd9ac74 docs/autoconf: Mark autoconf as being replaced
I know it's not what anyone wants, but how about we start with a
message in the documentation that encourages people to try meson.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Engeström <eric@engestrom.ch>
2018-12-27 09:03:20 -08:00
Dylan Baker 4c32964f49 docs/install: Update python dependency section
Note that meson requires python 3, scons requires python 2, and
autotools works with either.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Engeström <eric@engestrom.ch>
2018-12-27 09:03:20 -08:00
Dylan Baker a57dbe6971 docs/meson: Update LLVM section with information about native files
Reviewed-by: Eric Engeström <eric@engestrom.ch>
2018-12-27 09:03:17 -08:00
Dylan Baker 40ec5fec0a docs/install: Add meson to the main install page
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Engeström <eric@engestrom.ch>
2018-12-27 09:03:07 -08:00
Juan A. Suarez Romero fe7919acad docs: update calendar, add news item and link release notes for 18.2.8
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2018-12-27 17:37:33 +01:00
Juan A. Suarez Romero 0d53451890 docs: add sha256 checksums for 18.2.8
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
(cherry picked from commit 24c31bc0e237148b1c44811b17c61fc71f09bd93)
2018-12-27 17:35:04 +01:00
Juan A. Suarez Romero 008478e340 docs: add release notes for 18.2.8
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
(cherry picked from commit 785e09e3b32980380eb2081eeb48c157306f99ba)
2018-12-27 17:35:02 +01:00
Ilia Mirkin 2269ab8588 nv50,nvc0: add missing CAPs for unsupported features
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-12-26 20:28:07 -05:00
Ilia Mirkin 1d10bb2025 nvc0: enable GL_NV_shader_atomic_float on pre-Maxwell
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-12-26 20:04:57 -05:00
Ilia Mirkin 0dd55db10f nv50/ir: add support for converting ATOMFADD to proper ir
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-12-26 20:04:57 -05:00
Ilia Mirkin 9867f2a1f7 st/mesa: expose GL_NV_shader_atomic_float when ATOMFADD is supported
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-12-26 20:04:57 -05:00
Ilia Mirkin 4d5a6a1649 st/mesa: select ATOMFADD when source type is float
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-12-26 20:04:57 -05:00
Ilia Mirkin d139231b32 gallium: add PIPE_CAP_TGSI_ATOMFADD to indicate support
ATOMFADD is a little special -- make drivers have to specify it
explicitly.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-12-26 20:04:57 -05:00
Ilia Mirkin 5574414edc tgsi: add ATOMFADD operation
This is supported by at least NVIDIA hardware, and exposeable via GL
extensions.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-12-26 20:04:57 -05:00
Ilia Mirkin bac8534267 st/mesa: allow glDrawElements to work with GL_SELECT feedback
Not sure if this ever worked, but the current logic for setting the
min/max index is definitely wrong for indexed draws. While we're at it,
bring in all the usual logic from the non-indirect drawing path.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109086
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-12-26 19:30:33 -05:00
Eric Anholt 7d7ecfbcbc gallium/ttn: Fix setup of outputs_written.
We need a 64-bit value, otherwise we only handle the low 32, and happen to
sign-extend to claim to write all varying slots if VARYING_SLOT_VAR2 was
used.

Fixes: 4d0b2c7aaa ("ttn: Update shader->info as we generate code.")
Reviewed-by: Rob Clark <robdclark@gmail.com>
2018-12-26 11:42:09 -08:00
Lionel Landwerlin e2ae5f2f0a anv: don't do partial resolve on layer > 0
We've made the choice not to use fast clears on layer > 0 with
multilayer images. This is partly because we would need to store
multiple clear colors for each layer, making the existing memory
layout, already including aux surfaces, fast clear color, image state,
etc... even more complex.

Partial resolves are the operations transfering the clear colors into
the auxiliary buffers. This operation is currently implemented in
Blorp by loading the clear color from the image's BO, into a shader
that then samples from the auxiliary buffer and writes the color only
if it isn't there already.

The problem here is that because we store only one clear color for all
layers and it is used for partial resolves. If you trigger a partial
clear on a layer > 0, then you're likely to deal with a color that is
not what you actually want. In the particular issues below, we have
multiple layers, each cleared with a different color but the partial
resolve just writes the wrong color into the auxiliary buffers for
layers > 0.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108910
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108911
Cc: mesa-stable@lists.freedesktop.org
2018-12-24 09:42:46 +00:00
Axel Davy c6b37e5412 st/nine: Increase the limit of cached ff shaders
100 is too small for some games, which triggers recompilations
every frame. Increase to 1024.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-12-23 08:14:50 +01:00
Axel Davy 104681c5d5 st/nine: Add src reference to nine_context_range_upload
Just like nine_context_box_upload, nine_context_range_upload
should reference the src, which holds the ram source buffer.

Fixes: https://github.com/iXit/Mesa-3D/issues/327
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Cc: mesa-stable@lists.freedesktop.org
2018-12-23 08:14:50 +01:00
Axel Davy 42d672fa6a st/nine: Bind src not dst in nine_context_box_upload
nine_context_box_upload uploads a ram buffer (from src)
to a pipe_resource (dst).
We already have a refcount on the pipe_resource,
what needs to be protected from release is the ram buffer,
thus a reference to src.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Cc: mesa-stable@lists.freedesktop.org
2018-12-23 08:14:50 +01:00
Axel Davy f91f748fab st/nine: Fix volumetexture dtor on ctor failure
The dtor is called on allocation failure,
thus we must check the volumes are allocated
before trying to release them.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Cc: mesa-stable@lists.freedesktop.org
2018-12-23 08:14:50 +01:00
Axel Davy 1cc8192ad0 st/nine: Switch to presentation buffer if resize is detected
This enables to match the window size
on resize on all cases, as it only works
currently with presentation buffers.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-12-23 08:14:50 +01:00
Axel Davy c442dd7890 st/nine: Use helper to release swapchain buffers later
This patch introduces a structure to release the
present_handles only when they are fully released
by the server, thus making
"DestroyD3DWindowBuffer" actually release the buffer
right away when called.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-12-23 08:14:50 +01:00
Rob Clark 51a44c3aac freedreno/a6xx: fix 3d texture layout
Maybe not 100% perfect, but seems to be a pretty good approximation of
that.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-22 15:29:15 -05:00
Rob Clark 8f60f1381d freedreno: update generated headers
Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-22 15:28:50 -05:00
Rob Clark be9ec158d7 freedreno/a6xx: improve setup_slices() debug msgs
Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-22 15:28:24 -05:00
Rob Clark 2b497fc507 freedreno/a6xx: simplify special case for 3d layout
This logic can be re-written as the two cases for 3d (ie. before/after
the miplevel sizes start reducing) vs everything else.  I think it is
easier to read this way.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-22 15:27:57 -05:00
Rob Clark d71a50f831 freedreno: combine fd_resource_layer_offset()/fd_resource_offset()
We really only need this logic in one place.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-22 15:27:37 -05:00
Rob Clark 6667dde098 freedreno/ir3: don't treat all inputs/outputs as vec4
This was a hold-over from the early TGSI days, and mostly not needed
with NIR.  This avoids burning an entire 4 consecutive scalar regs
for vec3 outputs, for example.  Which fixes a few places that we were
doing worse that we should on register usage.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-22 15:27:21 -05:00
Rob Clark 3453814622 freedreno/ir3: fix fallout of extra assert
Fixes the following crash that happened after d6110d4d

The problem happens if we first compile a "vanilla" shader with nothing
lowered in NIR, which perform the final lowering passes on so->shader->
nir (including nir_lower_locals_to_regs()), and then later we have
compile a shader with some lowering.  The second time through we would
have already done nir_lower_locals_to_regs().

Arguably this was already a bug, just one we hadn't noticed yet.

Fixes: d6110d4d54 intel/compiler: move nir_lower_bool_to_int32 before nir_lower_locals_to_regs
Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-12-21 19:04:22 -05:00
Kenneth Graunke 626f2477ab st/nir: Drop unused gl_program parameter in VS input handling helper.
Nobody uses this, so let's drop it.  This makes the helper callable
from places without a gl_program.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-12-21 15:29:32 -08:00
Kenneth Graunke 3a78b46e59 st/nir: Gather info after applying lowering FS variant features
DrawPixels lowering, for example, adds new varyings that need to be
accounted for in inputs_read.  The earlier info gathering at link time
cannot account for this.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-12-21 15:29:30 -08:00