Commit Graph

147323 Commits

Author SHA1 Message Date
Jesse Natalie ad86267412 meson: Don't override built-in cpp_rtti option, error if it's invalid
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13064>
2021-11-19 15:36:59 +00:00
Lionel Landwerlin 21ec880bf9 anv: initialize anv_bo_sync base fields
v2: zalloc

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: cbb13fae33 ("anv: Add a BO sync type")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13875>
2021-11-19 15:09:43 +00:00
Lionel Landwerlin 04bd5bb69b anv: don't try to close fd = -1
CID: 1464334

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13879>
2021-11-19 14:52:29 +00:00
Samuel Pitoiset ddbc84d5a0 radv: ignore the descriptor set layout when creating descriptor template
From the Vulkan spec:
    "This parameter is ignored if templateType is not
     VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET."

This fixes an assertion about the base object type when running Yuzu
with Vulkan validation layers enabled.

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/13846>
2021-11-19 13:52:36 +00:00
Samuel Pitoiset 2436cafffe radv: allow TC-compat CMASK with storage images on GFX10+
Hardware seems to support it.

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/12173>
2021-11-19 13:30:40 +00:00
Mike Blumenkrantz 22d9d0f8b5 zink: add a compiler pass to scan for shader image use
other frontends and internal shaders won't set this

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13864>
2021-11-19 13:14:46 +00:00
Mike Blumenkrantz e386a57769 zink: explicitly init glsl
need this to be able to use other frontends

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13864>
2021-11-19 13:14:46 +00:00
Alejandro Piñeiro ff89dc3523 vulkan: move common format helpers to vk_format
v3dv, radv, and turnip are using several C&P format helpers (most of
them wrappers over util_format_description based helpers).  methods.

This commit moves the common helpers to the already existing common
vk_format.h. For the case of v3dv we were able to remove the vk_format
header. For turnip and radv, a local vk_format.h header remains, with
methods that are only used for those drivers.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13858>
2021-11-19 12:23:19 +01:00
Samuel Pitoiset 04c90f292e util/queue: fix a data race detected by TSAN when finishing the queue
Thread sanitizer complains if it detects that the pthread_barrier
is destroyed when a thread might still blocked on the barrier.

Fix this by destroying the barrier only if pthread_barrier_wait
returns PTHREAD_BARRIER_SERIAL_THREAD which is the value for success.

In practice this shouldn't fix anything serious given that this code
is only called when the disk cache is destroyed.

Original patch from Timothy Arceri.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4342
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13861>
2021-11-19 09:02:23 +01:00
Qiang Yu cee1dd92bd glx/dri3: fix glXQueryContext does not return GLX_RENDER_TYPE value
Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13772>
2021-11-19 01:37:27 +00:00
Emma Anholt e277b13182 freedreno: Stop exposing MSAA image load/store on desktop GL.
GLES doesn't support it, and blob VK doesn't support it.  We could
theoretically lower it, but don't bother since it's not required.  Fixes
various piglit image load/store tests.

Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13852>
2021-11-18 23:47:58 +00:00
Alyssa Rosenzweig 81d22da6de asahi: Fix BIND_PIPELINE sizing and alignment
Fix a bug in BIND_PIPELINE XML reported by Dougall, which cleans up
a bit of both decoder and driver.

Instead of...

   * 17 bytes BIND_PIPELINE  (17)
   * An unused 8 byte record (25)
   * A set of N 8 byte records (25 + 8 * N)
   * Oops, 1 byte too many! One just disappeared (24 + 8 * N)

It seems to instead be

   * 24 bytes BIND_PIPELINE (24)
   * A set of N 8 byte records (24 + 8 * N)

without the sentinel record. These means the 8 byte records themselves
are shuffled, with the high byte of the pointers split from the low
word, but that's less gross than an off-by-one.

It's still not clear what the last 8 bytes of the BIND_VERTEX_PIPELINE
structure mean, or the last 4 byte of the BIND_FRAGMENT_PIPELINE
structure which seems to be a bit shorter.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig 3b108393a2 asahi: Remove obnoxious workaround
Now that we're not hardcoded any magic BO IDs, there is no minimum
number of allocations needed. Remove the unneeded -- and obnoxious --
workaround of allocating unused BOs on startup.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig a28775046c asahi: Remove silly magic numbers
These are unnecessary now that the structure of agx_map_* is better
understood.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig d55a1a77bd asahi: Fix agx_map_* structures
Dougall Johnson observed these structures make more sense with indices[]
first in the entries and indices[] absent from the header. Then the
sentinel entry disappears, nr_entries makes more sense, and a few magic
numbers pop out. Many thanks to Dougall's astute eyes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig 6637fbb211 asahi: Allocate special scratch buffers
Seem to be used for preemption.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig 30433ae716 asahi: Deflake addresses
Reported by Dougall.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig df1824046a asahi: Rename PANDECODE->AGXDECODE
Fix remnant of the Panfrost decoder fork.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
2021-11-18 23:35:25 +00:00
Alyssa Rosenzweig e346ca5b41 pan/bi: Add XML for LD_BUFFER
Encoded like LOAD.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig 69ddbc4341 pan/bi: Suppress uniform validation for LD_BUFFER
Seems to be ok and used by the DDK...

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig 36486f54e9 pan/bi: Confirm IDP unit on Valhall
Based on Anandtech which gives 8-bit dot product throughput on Valhall
under FMA and not consistent with SFU.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig b8ba909ca6 pan/bi: Forbid unaligned staging registers on Valhall
Would've saved me some debugging with the computerator. I keep
forgetting about this nuance. Enforce it in the assembler.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig df807cb839 pan/bi: Add XML for assembling Valhall image stores
Not complete yet but let's get some tests in early. Document the new
instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig 58b65a340c pan/bi: Add Valhall's special FMA_RSCALE instructions
Like Bifrost, but exposed as separate physical instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig aee819d54c pan/bi: Add sqrt form of Valhall FREXPM
Like Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig 137053c4f4 pan/bi: Add full form of Valhall MUX instruction
Like Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Alyssa Rosenzweig 855ab23d9a pan/bi: Annotate Valhall instructions with units
Based on analyzing the cycle counts reported by the Mali offline
compiler.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
2021-11-18 23:16:20 +00:00
Mike Blumenkrantz 04cc1b93b1 zink: enable PIPE_TEXTURE_TRANSFER_COMPUTE on non-cpu drivers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13859>
2021-11-18 22:12:58 +00:00
Mike Blumenkrantz ea761a40d5 zink: use pb_slab_alloc_reclaimed(reclaim_all) for BAR heap sometimes
this forces a full slab reclaim any time the device is known to have a
too-small BAR in order to keep memory usage at a minimum when it might otherwise
balloon out and crash us

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13850>
2021-11-18 21:22:30 +00:00
Mike Blumenkrantz da9acf7088 aux/pb: add a new slab alloc function for reclaiming all bo objects
sometimes a driver might want to always reclaim all bo objects in the course
of allocating a new bo. this is useful when it's known that a given memory
heap is very small and will likely need to keep its usage minimized

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13850>
2021-11-18 21:22:30 +00:00
Roland Scheidegger b7e2214b3c llvmpipe: adjust rounding for viewport scissoring
Some apps may try to use a viewport adjusted by 0.5 pixels (among other
things) to emulate d3d9 pixel center, and in this case we would end up
with incorrect "fake scissor" box (shifted by 1 pixel), hence pixels
being incorrectly scissored away when permit_linear_rasterizer is set
(this happens even if the linear rasterizer is not used in the end).

So adjust the offset so that the half-way points get rounded down instead
of up.
(This is all a bit iffy I think since we don't use fractional
boxes (with 8 subpixel bits) anywhere yet, but at least without msaa
it should work out.)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13794>
2021-11-18 19:23:13 +00:00
Eric Engestrom f6dd931640 docs: add 22.0 branchpoint date for perspective
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13848>
2021-11-18 19:00:02 +00:00
Eric Engestrom f75e657e69 docs: add 21.3.x release schedule
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13848>
2021-11-18 19:00:02 +00:00
Eric Engestrom 9aea588900 docs: update calendar and link releases notes for 21.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13848>
2021-11-18 19:00:02 +00:00
Eric Engestrom 1061f3ad0d docs: add release notes for 21.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13848>
2021-11-18 19:00:02 +00:00
Samuel Pitoiset 341278f069 radv: disable HTILE for D32S8 format and mipmaps on GFX10
Stencil texturing with HTILE doesn't work with mipmapping on Navi10-14,
it's a hw bug. RadeonSI and PAL have a workaround too.

This fixes 35 piglit failures with Zink on Navi10.

Cc: 21.3 mesa-stable
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/13814>
2021-11-18 14:45:54 +00:00
Tomeu Vizoso d63cd245e1 ci: Uprev Crosvm
And use my fork while we upstream some improvements to Crosvm that make
it more appropriate for using in CI.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
2021-11-18 13:36:24 +00:00
Tomeu Vizoso 81f25d8f27 virgl/ci: Run each dEQP instance in its own VM
Currently we run deqp-runner inside a single VM, which makes very poor
use of the available CPUs because Virgl has a bottleneck in the VMM that
serializes everything.

With this change, we can run several Crosvm instances in a runner and
make full use of the CPUs. Getting the same coverage with 3 runners
instead of 6.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
2021-11-18 13:36:24 +00:00
Tomeu Vizoso 4bfcbe3f69 ci: Remove syslogd
Crosvm doesn't need it any more.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
2021-11-18 13:36:24 +00:00
Tomeu Vizoso d542e978e9 virgl/ci: Set GALLIVM_PERF=nopt,no_quad_lod
nopt will disable some shader optimizations that slow down test runs for
no gain.

no_quad_lod will disable some speed hacks that can cause inaccurate
results.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
2021-11-18 13:36:24 +00:00
Tomeu Vizoso 8a3cccc3f4 ci: Don't set GALLIVM_PERF in the scripts
Instead, let gitlab-ci.yml files define it.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
2021-11-18 13:36:24 +00:00
Tomeu Vizoso 8acdf1f71c ci: Create symlink to /install early
So we can use well-known absolute paths in configuration files.
Otherwise, the install dir is within $CI_PROJECT_DIR, which changes
between jobs.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12828>
2021-11-18 13:36:24 +00:00
Mike Blumenkrantz e7b9561959 gallium: implement compute pbo download
this reworks PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER into an
enum as PIPE_CAP_TEXTURE_TRANSFER_MODES, enabling drivers to choose
a (sometimes) faster, compute-based download mechanism based on a new
pipe_screen hook

compute pbo download is implemented using shaders with a prolog to convert
the input format to generic rgb float values, then an epilog to convert
to the output value. the prolog and epilog are determined based on a vec4
of packed ubo data which is dynamically updated based on the API usage

currently, the only known limitations are:
* GL_ARB_texture_cube_map_array is broken somehow (and disabled)
* AMD hardware somehow can't do depth readback?

otherwise it should work for every possible case

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-18 08:00:07 -05:00
Mike Blumenkrantz ed65b5e839 mesa/st: make some pbo functions public
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-18 08:00:05 -05:00
Mike Blumenkrantz f7a51e9469 mesa/st: make sampler_type_for_target public
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-18 07:58:29 -05:00
Mike Blumenkrantz c9a47c85da gallium: rename PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER
this is now a bitfield enum for more functionality

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-18 07:58:29 -05:00
Mike Blumenkrantz 0b30a7a243 gallium: add pipe_screen::is_compute_copy_faster hook
this can be used to query whether a driver expects a given texture
copy to be faster as a compute shader or using cpu/gfx transfers

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984>
2021-11-18 07:58:29 -05:00
Dylan Baker a854cbc7b5 turnip: don't use mesa/macros.h to get utils/rounding.h
For hopefully obvious reasons.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13853>
2021-11-18 10:46:51 +00:00
Pierre-Eric Pelloux-Prayer df8aeb4598 radeonsi/sqtt: increase the default buffer size to 32MB
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13838>
2021-11-18 10:53:37 +01:00
Pierre-Eric Pelloux-Prayer 56382ec071 radeonsi: unreference framebuffer state after use
util_copy_framebuffer_state increases refcounts, so we have
to decrement them afterwards.

Fixes: b1b491cdbb ("radeonsi: add a faster clear path for glClearTexImage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5631
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13838>
2021-11-18 10:53:34 +01:00