Commit Graph

141563 Commits

Author SHA1 Message Date
Bas Nieuwenhuizen 02c5dc8035 nir: Add lowered vendor independent raytracing intrinsics.
For use in a generic nir_lower_shader_calls.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10339>
2021-06-21 21:23:51 +00:00
Emma Anholt 58f5605124 freedreno: Handle full blit discards by invalidating the resource.
The previous implementation had several issues:

- It wasn't checking all the conditions necessary for "this blit updates
  the whole surface", like PIPE_MASK_Z but not S on a depth/stencil
  buffer.
- It would reset the previous batchbuffer, even if that batch had side
  effects on other buffers.
- The layering was painful to follow and made any recursion extra
  dangerous.

Now, we use a more conservative test (enough for the resource shadowing
case) and just invalidate the buffer up front, which should have the right
logic for discarding drawing to that resource.

I found I had to add fd_bc_flush_writer() to the end of fd_blitter_blit()
-- a flush was happening at fb state restore time when the discard flag
was set, and losing that flush breaks
dEQP-GLES31.functional.stencil_texturing.format.stencil_index8_cube.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
2021-06-21 20:48:21 +00:00
Emma Anholt 74ede4b353 freedreno: Move the rsc-based batch flushing to helper functions.
I want to reuse these, and this gives them nice names.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
2021-06-21 20:48:21 +00:00
Emma Anholt 447b6f60a6 gallium/util: Introduce a helper for finding whole-resource blits.
This can be useful for tilers to discard previous rendering to a buffer
instead of reloading before drawing all the pixels.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
2021-06-21 20:48:21 +00:00
Emma Anholt 9ce44dc9bc gallium/draw: Garbage collect draw_pt_fetch_emit.
Now that we don't have draw_set_force_passthrough(), this middle end was
inaccessible.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>
2021-06-21 20:27:35 +00:00
Emma Anholt 5e019269d6 gallium/draw: Garbage collect draw_set_force_passthrough
Introduced in c48da7d78b ("draw: add switch for drivers to force vertex
data passthrough") in 2008 and never used.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>
2021-06-21 20:27:35 +00:00
Simon Ser ae2b7a29d2 docs/envvars: document MESA_VK_WSI_PRESENT_MODE
This env var was introduced in a182adfd83 ("wsi: allow to override the
present mode with MESA_VK_WSI_PRESENT_MODE").

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11441>
2021-06-21 20:22:51 +00:00
Simon Ser 7369b1a21e vulkan/wsi/wayland: simplify wl_surface version check
No need to cast to a wl_proxy, there is a wl_surface variant
available.

No need to cache the result of get_version(), this is just a
one-line getter and doesn't perform any roundtrip.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11420>
2021-06-21 20:01:28 +00:00
Jordan Justen eb98171252 intel/gen125.xml: Drop GPGPU_WALKER
Ref: f4902bb189 ("intel/genxml,anv,iris: Drop the legacy compute path from gen125.xml")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11489>
2021-06-21 19:40:14 +00:00
Lionel Landwerlin e9e1e0362b anv: implement VK_EXT_physical_device_drm
v2: add docs
    update error messages (Sagar)

v3: Use fstat() (Jason)

v4: Do fstat() on demand (Jason)

v5: clear major/minor values if not present (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8649>
2021-06-21 19:18:07 +00:00
Marek Olšák 6a2e3d2736 radeonsi: cleanup some primitive discard CS TODOs regarding instancing, etc.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 4b5eb336e1 radeonsi: skip buffer_atomic_add(ptr, n) when n=0 in the prim discard CS
This improves performance of the shader nicely.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák df4de12af4 radeonsi: drop support for triangle fans from the prim discard CS
because it doesn't implement triangle fan splitting, so it's incomplete

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 4fa58c04e4 radeonsi: drop gfx7 support from the prim discard CS to simplify code
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák fc95ba6c86 radeonsi: remove the Z culling option from the primitive discard CS
Not useful.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák a448074d05 radeonsi: don't compile TES and GS draw_vbo variants for the prim discard CS
This also fixes the incorrect emit_draw_packets template argument.
The condition should be inverted.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák b35b5926c9 radeonsi: try to keep all VS input loads together for better perf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 901f4aa5d6 radeonsi: remove incorrect comment about PA
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák ce4f4a8d13 radeonsi: set more precise max_waves in NGG code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 1e9cc86511 radeonsi: merge 2 conditional blocks with same condition into 1 in culling code
The block only loads input VGPRs from LDS, and the next block uses them.
The entering condition is the same, even though the second block is
the next shader part beginning with the prolog.

Simply move the VGPR loads into the prolog.

This decreases the shader code size by 12 bytes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 786678a017 radeonsi: restructure si_get_vs_vgpr_comp_cnt for readability
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Rob Clark 06ff0ae4bb freedreno: Flush if at risk of overflowing bos table
Fixes overflow crash in tex-miplevel-selection

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4007
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11487>
2021-06-21 18:45:23 +00:00
Rob Clark 5b4f670c1c freedreno/a6xx: Handle fb_read in sysmem path
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11487>
2021-06-21 18:45:23 +00:00
Rob Clark 1a1eabd7d8 freedreno/ci: Garbage collect some a630 flakes
Haven't seen these, at least since flake reporting switched to OFTC
channel (~1 month ago)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11487>
2021-06-21 18:45:23 +00:00
Matti Hamalainen aeaeef661a gallium/tools: improve handling of pointer arrays
Extend the special handling of return types to also include pointer
type array list elements, so we ignore the initial "name" of the
element until we know a better type for them. This improves the type
"detection" of such pointer array elements when parsing the logs
with dump.py / tracediff.sh

Related to Mesa issue #4609

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11492>
2021-06-21 18:33:41 +00:00
Rhys Perry 1e508777b4 radv: allow VK_FORMAT_R8G8_SRGB sampling
No reason why we can't do this. AMDVLK also allows this.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11317>
2021-06-21 18:17:09 +00:00
Jason Ekstrand 1a14d98fa2 nir: Document all the ALU opcodes
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11438>
2021-06-21 16:47:00 +00:00
Jason Ekstrand 73188c6954 nir,docs: Add docs for NIR ALU instructions
About half or more of the text here is actually from Connor Abbot.  I've
edited it a bit to bring it up-to-date and make a few things more clear.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11438>
2021-06-21 16:46:59 +00:00
Jason Ekstrand f00b5a30f5 nir: Require vectorized ALU ops to be all-or-nothing
Long ago, the semantics of bcsel were such that it took a single boolean
value and selected between whole vectors.  These days, it takes a vector
boolean with the assumption that if you want the old behavior you can
just use a .xxxx swizzle.  There currently are no opcodes which use a
output_size of 0 but have a scalar or fixed-vector input.  Let's
disallow it for now to force us to think through the semantics again if
this ever comes up as something someone actually wants.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11438>
2021-06-21 16:46:59 +00:00
Rhys Perry ea68d4a676 nir/propagate_invariant: add invariant_prim option
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11035>
2021-06-21 15:13:05 +00:00
Mike Blumenkrantz 7144f33802 zink: handle custom border color without matching wrap mode case
this is just default border color and the custom color is ignored

Fixes: 36f4e61403 ("zink: rework border color handling")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11495>
2021-06-21 14:54:33 +00:00
Jason Ekstrand 69d4fa3a1c vulkan: Update the XML and headers to 1.2.182
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11497>
2021-06-21 14:29:16 +00:00
Jason Ekstrand 2e08bae9b3 nir,vc4: Suffix a bunch of unorm 4x8 opcodes _vc4
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11463>
2021-06-21 09:04:08 -05:00
Jason Ekstrand 0afbfee8da nir,panfrost: Suffix fsat_signed and fclamp_pos with _mali
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11463>
2021-06-21 09:03:34 -05:00
Jason Ekstrand f0f713960b nir,amd: Suffix nir_op_cube_face_coord/index with _amd
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11463>
2021-06-21 09:03:34 -05:00
Timur Kristóf e5510536e7 aco: Fix checking if load_shared is used by cross lane instructions.
This commit fixes two issues with it:

1. Prevent it from going into an infinite loop.
2. Check all uses, not just first use.

Closes: #4916
Fixes: b4e22eb482
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11361>
2021-06-21 13:42:52 +00:00
Andres Gomez 90c7ab08ea ci: use bash with download-git-cache.sh
It's a bash script, so make sure we use bash and not just sh.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9865>
2021-06-21 15:05:25 +03:00
Bas Nieuwenhuizen d074cc4af4 util/fossilize_db: Only lock the db file, not the index.
This thing is entirely opt-in wrt caring about it when writing to
a file anyway. Since we also lock the two at the same time and they
have an 1-1 relation we can just lock one of the two files. Saves
some syscalls.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11485>
2021-06-21 10:05:12 +00:00
Bas Nieuwenhuizen 4f0f8133a3 util/fossilize_db: Do not lock the fossilize db permanently.
This avoids all locks for reads and using lock only while actually
writing.

This is enabled by doing two things:

1) Reading the index incrementally. This way we get new entries
   written by other processes and do not write duplicate entries.
2) Taking the lock only during writes, and applying the incremental
   read while holding the lock so we always append to the actual end of the file.

Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11485>
2021-06-21 10:05:12 +00:00
Bas Nieuwenhuizen 2ec1bff0f3 util/fossilize_db: Split out reading the index.
Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11485>
2021-06-21 10:05:12 +00:00
Bas Nieuwenhuizen bd41c51c8f util/fossilize_db: Pull seek into lock.
Otherwise the seek can overlap with other reads/writes.

Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11485>
2021-06-21 10:05:12 +00:00
Bas Nieuwenhuizen a99474fae5 radv: Add -Wpointer-arith.
Gives earlier indications of MSVC issues.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11478>
2021-06-21 09:32:00 +00:00
Timur Kristóf 72174a3eef ac/nir: Update TCS output barriers with nir_var_mem_shared.
Output loads and stores are lowered to shared memory access,
so we have to update the barriers to also reflect this.

Closes: #4955
Fixes: bf966d1c1d

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11484>
2021-06-21 08:27:14 +00:00
Erik Faye-Lund ed04cb62d8 docs: use rst captions
This is slightly stronger semantically.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11464>
2021-06-21 08:22:51 +00:00
Erik Faye-Lund e41efc173b docs: use more file-roles
This makes the documentation a bit easier to read, and aids
spell-checkers, so let's specify these using file-roles.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11464>
2021-06-21 08:22:51 +00:00
Erik Faye-Lund 63c9d51981 docs: drop historic meson details
Similar to the last few commits, we require Meson 0.52 now. There's no
point in confusing users with specifying what versions supports what
here, as all supported versions works the same way now.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11464>
2021-06-21 08:22:51 +00:00
Erik Faye-Lund 07cd8897fb docs: remove outdated clarification
Similar to the previous commit, we now require Meson 0.52 all the time,
so there's no point in singling this out.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11464>
2021-06-21 08:22:51 +00:00
Erik Faye-Lund 309b549f0e docs: remove outdated meson-section
We're already requiring Meson 0.52, so there's no point in mentioning
this old work-around.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11464>
2021-06-21 08:22:51 +00:00
Iago Toral Quiroga fa8868192b v3dv: remove const qualifier for resource pointer in view objects
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11443>
2021-06-21 06:00:56 +00:00
Iago Toral Quiroga b8abedb974 v3dv: expose VK_KHR_copy_commands2
Relevant CTS tests:
dEQP-VK.api.copy_and_blit.copy_commands2.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11443>
2021-06-21 06:00:56 +00:00