Commit Graph

125514 Commits

Author SHA1 Message Date
Samuel Pitoiset 26a48d8d35 radv: enable VK_AMD_shader_ballot on GFX6-7 with both compiler backends
It gives +1-2 FPS with Doom Eternal on Pitcairn.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5659>
2020-06-29 07:40:05 +00:00
Boris Brezillon cff418cc4c nir: Add new rules to optimize NOOP pack/unpack pairs
nir_load_store_vectorize_test.ssbo_load_adjacent_32_32_64_64 expectations
need to be fixed accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5589>
2020-06-29 09:18:26 +02:00
Dave Airlie 237d728418 gallivm/nir: fix const loading on big endian systems
The code was expecting the lower 32-bits of the 64-bit to be
what it wanted, don't be implicit, pull the value from the union.

This should fix rendering on big endian systems since NIR was
introduced.

Fixes: 44a6b0107b ("gallivm: add nir->llvm translation (v2)")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5677>
2020-06-29 08:51:18 +10:00
Jonathan Marek 7d31bc9a34 freedreno/ir3: fix resinfo wrmask
resinfo always writes 3 components, which was not being taken into account

Fixes these tests:
dEQP-VK.renderpass.suballocation.attachment_sparse_filling.input_attachment_3
dEQP-VK.renderpass.suballocation.attachment_sparse_filling.input_attachment_7

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5674>
2020-06-28 16:32:08 +00:00
Erik Faye-Lund b1c16e5251 docs: use ref-links for internal references
Ref-link have two benefits over generic links:

1. They produce the right result for non-HTML outputs
2. They get validated at build-time

So let's use them for internal references instead.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>
2020-06-28 09:06:57 +00:00
Erik Faye-Lund 5ee55b206a docs: fix internal references
It seems last time I tried to fix these, I missed a few spots. So let's
try to get things right this time.

Fixes: 429ff05491 ("docs/relnotes: update internal references")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>
2020-06-28 09:06:57 +00:00
Erik Faye-Lund 1d250bf291 docs: restore accidentally dropped labels
These were accidentally dropped when cleaning up the TOC, making links to
them dead. Because we used plain links, sphinx didn't inform us that
these became dead. Let's restore them.

Fixes: 14f2a81b6f ("docs: drop open-coded toc for articles")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>
2020-06-28 09:06:57 +00:00
Erik Faye-Lund 05e61a9157 docs: remove non-existent reference
The section referenced here was removed a while ago, but it was always
empty anyway. Let's just remove it instead of trying to fix it up.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5671>
2020-06-28 09:06:57 +00:00
Bas Nieuwenhuizen 3b74e6fa28 meson: Do not require shader cache for radv.
We fixed the compile error a while ago.

Fixes: cc10b34e9e "util/disk_cache: Fix disk_cache_get_function_timestamp with disabled cache."
Reviewed-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5649>
2020-06-28 01:10:45 +00:00
Vinson Lee c0c03f4772 rbug: Fix rbug_delete_vs_state lock acquisition.
Fix warning reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: mtx_unlock unlocks rb_pipe->call_mutex while it is
unlocked.

Fixes: 07838ff990 ("rbug: Use the call mutex")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3023
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5196>
2020-06-27 00:21:27 +00:00
Alejandro Piñeiro 583d7d3d8d v3d: moving v3d simulator to src/broadcom
So it could be used by both the OpenGL and the Vulkan driver.

In addition to the move, some small changes were needed to be made on
the API. For example, the simulator was receiving v3d_screen on
initialization, and that code setted v3d_screen->sim_file. Now it
returns the new sim_file created.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5666>
2020-06-27 00:06:58 +00:00
Kristian H. Kristensen 4fccbd0ea6 turnip: Put VK_KHR_external_fence_fd stubs back
tu_ImportFenceFdKHR is used by tu_AcquireImageANDROID, which may or
may not work, but let's at least keep things compiling until somebody
has time to tie up the loose ends on the Android side.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5670>
2020-06-26 16:29:15 -07:00
Kenneth Graunke 39f06e2848 iris: Implement pipe->texture_subdata directly
Chris Wilson noted that u_default_texture_subdata's transfer path
sometimes results in wasteful double copies.  This patch is based
on an earlier path he wrote, but updated now that we have staging
blits for busy or compressed textures.

Consider the case of idle, non-CCS-compressed, tiled images:

The transfer-based CPU path has to return a "linear" mapping, so upon
map, it mallocs a temporary buffer.  u_default_texture_subdata then
copies the client memory to this malloc'd buffer, and transfer unmap
performs a tiled_memcpy to copy it back into the texture.  By writing
a direct texture_subdata() implementation, we're able to directly do
a tiled_memcpy from the client memory into the destination texture,
resulting in only one copy.

For linear buffers, there is no advantage to doing things directly, so
we simply fall back to u_default_texture_subdata()'s transfer path to
avoid replicating those cases.

We still may want to use GPU staging buffers for busy destinations
(to avoid stalls) or CCS-compressed images (to compress the data),
at which point we also fall back to the existing path.  We thought
to try and use a tiled temporary, but this didn't appear to help.

Improves performance in x11perf -shmput500 by 1.96x on my Icelake.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2500
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3818>
2020-06-26 21:20:41 +00:00
Eric Anholt 34630fe081 turnip: Properly return VK_DEVICE_LOST on queuesubmit failures.
The device lost support closely matches the anv code for the same.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
2020-06-26 19:34:17 +00:00
Eric Anholt 487576e3cf turnip: Fix error handling of DRM_MSM_GEM_INFO ioctls.
drmCommandWriteRead gives us a -errno, and we only checked for -1 (-EPERM,
incidentally).  All the callers wanted 0 for errors, which they were
getting by the fact that req.value was 0-initialized in our stack
allocation (though this only works as long as the kernel doesn't return an
error after setting req.value to something), and -EPERM not really being
an answer we would expect from an ioctl at this stage in the driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
2020-06-26 19:34:17 +00:00
Eric Anholt e67c2e1c96 turnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
2020-06-26 19:34:17 +00:00
Bas Nieuwenhuizen aba8c579a9 turnip: semaphore support.
There is only one queue for now, so for non-shared semaphores, the
implementation is basically a no-op. For shared semaphores, this
always uses syncobjs. This depends on syncobj support in the msm
kernel driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
2020-06-26 19:34:17 +00:00
Eric Anholt 6283da34a9 ci/baremetal: Bump the kernel to a recent drm-msm-fixes for msm semaphores.
We need this to test the new VK feature we're about to land.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
2020-06-26 19:34:17 +00:00
Daniel Schürmann 5c0f82b0d7 aco: fix partial copies on GFX6/7
While we don't allow partial subdword copies,
we still need to be able to split 64bit registers

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5663>
2020-06-26 19:21:57 +00:00
Lepton Wu 66482303f6 mapi: x86: Fix dynamic entries in x86 tsd stubs.
We need to update dynamic entries related code after updating
asm stubs.

Fixes: 45206d7673 ("mapi: Adapted libglvnd x86 tsd changes")
Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5598>
2020-06-26 18:28:01 +00:00
Eric Anholt 63805ccd3f ci/bare-metal: Fail early when we get stuck powering on a cheza.
I think I've seen about 3 of this error total so far, but waiting 60
minutes for the scripts to give up wastes marge time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5651>
2020-06-26 16:54:07 +00:00
Rob Clark 189a0fecf5 freedreno/ir3: move nir finalization to after cache miss
In cases where every variant is a shader-cache-hit, we never need the
post-finalize round of nir opt/lowering passes.  So defer this until
the first shader-cache-miss to avoid doing pointless work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:55:21 -07:00
Rob Clark f97acb4bb4 freedreno/ir3: disk-cache support
Adds a shader disk-cache for ir3 shader variants.  Note that builds with
`-Dshader-cache=false` have no-op stubs with `disk_cache_create()` that
returns NULL.

Binning pass variants are serialized together with their draw-pass
counterparts, due to shared const-state.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:55:19 -07:00
Rob Clark 6aadb00e60 freedreno/ir3: build binning variant at same time as draw variant
For shader-cache, we are going to want to serialize them together.
Which is awkward if the two related variants are not compiled together.

This also decouples allocation and compile, which will simplify adding
shader-cache (which still needs to allocate, but can skip compile).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:53:02 -07:00
Rob Clark 83b97bf161 freedreno/a6xx+ir3: stop generating pointless binning shaders
Currently we always do sysmem if there is tess.  And for GS, the binning
pass VS ends up identical to the draw pass VS, so no point in compiling
it twice.  (For GS what we should do someday is generate a binning pass
GS, and possibly if we can do cross-stage linking opts, an optimized
binning pass VS, but the required outputs would somehow have to end up
in the shader variant key.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:53:00 -07:00
Rob Clark fdbe1ffaf7 freedreno/ir3: shuffle some variant fields
Just to group together the parts that will get serialized when we have
shader disk-cache.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:43:23 -07:00
Rob Clark c0f22c3d94 freedreno/ir3: add ir3_compiler_destroy()
Use ir3_compiler_destroy() rather than open-coding ralloc_free().  This
will give us a place to add more compiler related cleanup code in the
following patches.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:43:23 -07:00
Rob Clark f1ab57359c freedreno/ir3: move finalize_nir to pscreen hook
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:43:22 -07:00
Rob Clark d3ae559378 freedreno/ir3: add ir3_finalize_nir()
The next step is to hook this into pscreen->finalize_nir() so it can
come before the state tracker's shader-caching.

Unfortunately we still need to do lower_io after mesa/st, so that is
split out into a post-finalize pass.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
2020-06-26 08:43:22 -07:00
Mike Blumenkrantz e35b8971a7 zink: use OpFUnordNotEqual for nir_op_fne
we want to detect NaNs here, and OpFUnordNotEqual is the variant which does this

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 765de33d3c zink: set lower_mul_high and lower_rotate in ntv compiler options
we don't implement these

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 49c13fccf7 zink: handle isign alu in ntv
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 21fe5b0ffd zink: handle ixor in ntv
fixes spec@glsl-1.30@execution@built-in-functions@fs-op-assign-bitxor tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 651d093298 zink: lower byte/word extract ops in nir
we don't implement these, and pre-optimizing them breaks things in ntv->vtn

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 90d3455848 zink: add bitfield_reverse handling to ntv
fixes several piglit tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 957d8e2658 zink: add ult handling for ntv
fixes shaders@glsl-vs-absolutedifference-uint piglit test

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Mike Blumenkrantz 2159aa0c49 zink: handle signed and unsigned min/max ops in ntv
fixes a number of piglit amd_shader_trinary_minmax tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>
2020-06-26 14:07:35 +00:00
Samuel Pitoiset f13d79f519 radv: remove the load/store workaround for Monster Hunter World with LLVM
Now that ACO is default, this is pointless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>
2020-06-26 14:42:44 +02:00
Samuel Pitoiset a30ad8cb23 radv: remove the shader ballot workaround for Youngblood with LLVM
Now that ACO is default, this is now pointless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>
2020-06-26 14:42:42 +02:00
Erik Faye-Lund 099916384a docs: update favicon
I created a new and cleaner favicon for mesa3d.org, and it seems like a
good idea to use that one for the docs as well.

While we're at it, replace the original PNG with the original SVG asset
the ICO-file was generated from.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5643>
2020-06-26 12:09:22 +00:00
Jonathan Marek 2fbc12a0ac turnip: fix huge scissor min/max case
Now that tu_cs_emit_regs is used for the scissor, it hits an assert when
the scissor is too large. Fixes this dEQP test:

dEQP-VK.draw.scissor.static_scissor_max_int32

Fixes: 9c0ae5704d ("turnip: fix empty scissor case")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5655>
2020-06-26 11:34:49 +00:00
Jonathan Marek 1854eeefde turnip: fix VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES
My attempt to be clever here backfired, it overwrites the pNext and stops
the loop (causing deqp to fail to query extension features after that).

Fixes: 62de79ac44 ("turnip: implement VK_KHR_shader_draw_parameters")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5654>
2020-06-26 11:11:29 +00:00
Icecream95 6b886fbc0b panfrost: Add PAN_MESA_DEBUG=gl3 flag
This flag allows forcing GL 3.3 without having to use
MESA_GL_VERSION_OVERRIDE etc.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5584>
2020-06-26 10:30:03 +00:00
Connor Abbott 1288613f1c freedreno/a6xx: use firstIndex field
Analogous to the turnip change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5644>
2020-06-26 10:05:24 +00:00
Connor Abbott ba5e1c5310 tu: Pass firstIndex directly to CP_DRAW_INDX_OFFSET
Saves some minor overhead, cleans things up a bit, and removes one more
unknown. We now program the internal registers in the same way between
direct/indirect draws.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5644>
2020-06-26 10:05:24 +00:00
Connor Abbott 259d07a2ff freedreno/registers: Label firstIndex field in CP_DRAW_INDX_OFFSET
Based on comparing the implementations of CP_DRAW_INDX_OFFSET and
CP_DRAW_INDIRECT, this is what this field is for.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5644>
2020-06-26 10:05:24 +00:00
Connor Abbott a32fb2f9d0 freedreno: On a5xx+ INDX_SIZE is MAX_INDICES
This was already done correctly for the indirect variants, and turnip
was setting the correct value, but it seems freedreno missed the change
in the non-indirect variant. Also, fix a misspelling of "indices" and
add a type to INDX_SIZE.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5644>
2020-06-26 10:05:24 +00:00
Connor Abbott 1dd24bf27b freedreno: Share constlen between different stages properly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5607>
2020-06-26 09:34:33 +00:00
Connor Abbott d9dd989d2a freedreno: Refactor ir3_cache shader compilation
Use an array, which makes it more like turnip and makes implementing the
const limits easier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5607>
2020-06-26 09:34:33 +00:00
Connor Abbott 8ad65609da tu: Share constlen between different stages properly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5607>
2020-06-26 09:34:33 +00:00