Commit Graph

147603 Commits

Author SHA1 Message Date
Guilherme Gallo cdf8a14bff ci: Uprev piglit
Bring up the piglit replay jwt-file argument feature.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14004>
2021-12-02 18:01:29 +00:00
Guilherme Gallo 19cb49c280 ci: Update ci-fairy to version with --token-file support
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14004>
2021-12-02 18:01:29 +00:00
Alex Xu (Hello71) 3161bc5c1a meson: check for lld split TLSDESC bug (fixes #5665)
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13934>
2021-12-02 09:18:50 -08:00
Leandro Ribeiro 7c57346dfd egl/wayland: fix surface dma-buf feedback error exits
This fixes a leak that was introduced in 89d15b9a "egl/wayland: add
initial dma-buf feedback support".

Do not leak dri2_surf->wl_dmabuf_feedback when we have to bail out
because of allocation issues.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13985>
2021-12-02 14:18:55 +00:00
Leandro Ribeiro 81361490ef egl/wayland: do not try to bind to wl_drm if not advertised
This fixes a bug that was introduced in 89d15b9a "egl/wayland: add
initial dma-buf feedback support".

Sometimes we have to fallback to wl_drm. But do not try to bind to it
when it is not advertised by the compositor.

This issue was found by n3rdopolis and reported here:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/5697

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13985>
2021-12-02 14:18:55 +00:00
Samuel Pitoiset 3fa2220838 radv: upload shader binaries of a pipeline contiguously in memory
RGP expects shaders to be contiguous in memory, otherwise it explodes
because we have to generate huge captures with lot of holes.

This reduces capture sizes of Cyberpunk 2077 from ~3.5GiB to ~180MiB.

This should also help for future pipeline libraries.

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/13690>
2021-12-02 07:17:04 +00:00
Samuel Pitoiset a7f0463612 radv: pass a pointer to a pipeline for the create/insert cache functions
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/13690>
2021-12-02 07:17:04 +00:00
Samuel Pitoiset 13143b3c11 radv: upload shader binaries after they are all compiled
Instead of mixing compilation and upload. This will allow us to
upload all shader binaries contiguously in memory and also for future
pipeline libraries work.

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/13690>
2021-12-02 07:17:04 +00:00
Samuel Pitoiset ff61b36ba2 radv: add a helper function to upload a shader binary
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/13690>
2021-12-02 07:17:04 +00:00
Samuel Pitoiset dd66de6017 radv: remove never reached free() when compiling shaders
binary_out is never NULL and binaries are freed from the pipeline
after they are added to the cache.

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/13690>
2021-12-02 07:17:04 +00:00
Ilia Mirkin fc2cc39a0f freedreno/ci/a306: split off snorm blending failures
The hardware doesn't support this.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13990>
2021-12-02 03:39:28 +00:00
Ilia Mirkin bbe5b745dc freedreno/ci/a306: split off the f32 blend / texturing failures
The hardware doesn't support this.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13990>
2021-12-02 03:39:28 +00:00
Ilia Mirkin 1f79c36dae freedreno/ci/a306: separate msaa fails
The driver does not implement MSAA. When that happens these can be split
up further.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13990>
2021-12-02 03:39:28 +00:00
Jesse Natalie c47fd3dc00 windows: Use TLS context/dispatch with shared-glapi
However they have to be called via _glapi_get_dispatch/context. This
would be safe to do on any platform, but the extra indirection is only
necessary on Windows since TLS vars can't be exported from a DLL.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13634>
2021-12-02 03:03:14 +00:00
Ilia Mirkin 58aad3f403 freedreno/a3xx: add some legacy formats
These can be used in "legacy" buffer textures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13989>
2021-12-02 02:29:50 +00:00
Ilia Mirkin 41aa583edf freedreno/ci/a306: add additional skip which hangchecks
I was having trouble getting a run to complete without this. Was working
earlier, not sure what changed.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13989>
2021-12-02 02:29:50 +00:00
Emma Anholt 59ba7a2ad8 freedreno/a6xx: Set the tess BO ptrs in the program stateobj.
Saves some draw-time work for tess.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13851>
2021-12-02 01:47:38 +00:00
Emma Anholt 5495359085 freedreno/a6xx: Skip emitting tess BO pointers past the shader's constlen.
Some shaders don't want these pointers, and going past the constlen would
potentially overwrite consts from other draws.  This is a port of a fix
from turnip.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13851>
2021-12-02 01:47:38 +00:00
Emma Anholt d7226e9a9e freedreno/a6xx: Allocate a fixed-size tess factor BO.
Saves per-batch allocations, avoids reallocation for various vertex
counts, and avoids needing the indirect tess addrs constobj so that we
could emit the relocs to the tess BO after we'd emitted all the draws.

Also apparently it fixes one of our CTS fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13851>
2021-12-02 01:47:38 +00:00
Bas Nieuwenhuizen 577a0a7352 radv: Don't emit framebuffer state if there is no renderpass active.
The framebuffer state could still be dirty from when the previous
renderpass was bound.

Fixes: 5632359959 ("radv: Remove the skipping of framebuffer emission if we don't have a framebuffer.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5702
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13969>
2021-12-02 00:35:28 +00:00
Jesse Natalie c3e014670f d3d12: Support compat level 330
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14001>
2021-12-01 23:48:57 +00:00
Ryan Neph 996e855e66 venus: ignore framebuffer for VkCommandBuffer executed outside of render pass
The vulkan spec states[1]:
> If the VkCommandBuffer will not be executed within a render pass instance,
> or if the render pass instance was begun with vkCmdBeginRenderingKHR,
> renderPass, subpass, and framebuffer are ignored.

but venus will still try to encode them, resulting in a guest-side
assert or host-side command stream error.

[1]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBufferInheritanceInfo.html#_description

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13988>
2021-12-01 23:35:42 +00:00
Emma Anholt 06fe04b4d7 nir: Make nir_build_alu() variants per 1-4 arg count.
This saves a bunch of generated code to pack up the extra NULLs to get to
4 args, and saves executing the conditions in nir_build_alu() to then skip
those NULLs.

Saves another 27kb on disk.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13916>
2021-12-01 22:12:19 +00:00
Emma Anholt e770ec1182 nir: Uninline a bunch of nir.h functions.
I aimed for "things that look like big switch statements, or cases where
the compiler is unlikely to be able to constant-propagate an argument into
something useful."

Saves another 80kb on disk.  No perf difference on iris shader-db, n=23.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13916>
2021-12-01 22:12:19 +00:00
Nanley Chery c394f2f0ea iris: Drop redundant iris_resource_disable_aux call
Drop the call to iris_resource_disable_aux in
iris_resource_configure_aux. With the previous patches, we no longer
create CCS surfaces and pick the AUX_NONE usage. As a result, if the aux
usage is NONE, all iris_resource fields already indicate that aux is
disabled.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12398>
2021-12-01 20:36:38 +00:00
Nanley Chery 137a054c94 iris: Enable CCS_E on 32-bpc float formats on TGL+
Allow CCS_E on these formats on TGL+ for a couple reasons:

1) TGL doesn't have the option to fall back to CCS_D/fast-clears like
   prior platforms do.

2) The CCS compression scheme on TGL improves to encode more than 3
   levels of compression. This should help floating point formats.

In my measurements, enabling this on TGL results in a minor performance
improvement on Paraview (+0.06%) rather than a major regression like on
prior platforms. The improvement was measured by taking the average of 3
runs of: waveletvolume.py -d 256 -f 600.

Also, the Intel performance CI reports a 3.81% ±0.12% FPS improvement in
Bioshock Infinite.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12398>
2021-12-01 20:36:38 +00:00
Nanley Chery 1433fe7860 intel/isl: Unify fmt checks in isl_surf_supports_ccs
On TGL+, require that the surface format supports CCS_E in order to
support CCS. This aligns with the ISL code that pads the primary
surface for CCS on this platform.

Pre-TGL, require support for either CCS_D or CCS_E.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12398>
2021-12-01 20:36:38 +00:00
Eric Engestrom d9eaabf05d docs: update calendar and link releases notes for 21.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13998>
2021-12-01 19:32:36 +00:00
Eric Engestrom 897dde881c docs: add release notes for 21.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13998>
2021-12-01 19:32:36 +00:00
Jesse Natalie 70dd119abd CI/d3d12: Add a quick_shader run
Refactor the YML for some DRY, and rename the existing pass from
"-windows" to "-quick_gl" to disambiguate it.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13902>
2021-12-01 18:26:15 +00:00
Jesse Natalie 7afb4aba3f CI/windows: Move reference files to relevant ci subdirectories
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13902>
2021-12-01 18:26:15 +00:00
Jesse Natalie c70e31c4d5 CI/windows: Move SPIRV-to-DXIL test YML to microsoft folder
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13902>
2021-12-01 18:26:15 +00:00
Jesse Natalie 214168621d CI/windows: Move D3D12 test YML to D3D12 driver folder
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13902>
2021-12-01 18:26:15 +00:00
Rob Clark 145b0711fc freedreno/crashdec: Basing GMU log decoding
Looks like each entry is four dwords, with the second dword being a
timestamp.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13937>
2021-12-01 17:53:21 +00:00
Rob Clark 8c654d02a3 freedreno/crashdec: Fallback to chip_id for GPU id
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13937>
2021-12-01 17:53:21 +00:00
Rob Clark f33d5256dd freedreno/crashdec: HFI queue decoding
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13937>
2021-12-01 17:53:21 +00:00
Rob Clark 2133d34b11 freedreno/crashdec: Split out mempool decoding
Before we start adding GMU HFI decoding, lets split the other big
section specific decoding (mempool) out into it's own file.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13937>
2021-12-01 17:53:21 +00:00
Emma Anholt b234c538e8 turnip: Move CP_SET_SUBDRAW_SIZE to vkCmdBindPipeline() time.
Now that the subdraw size is constant for a pipeline, this lets tess draws
avoid the slow path in vkCmdDraw*().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6089>
2021-12-01 16:57:30 +00:00
Jonathan Marek fd11d99254 turnip: use SUBDRAW_SIZE and constant sized tess bos
This fixes the problem of large indirect draws, and at the same time avoids
allocating too large buffers for tessellation.

Reworked by @anholt to use a separate tess factor BO so we can skip the
WFIs to set the TESSFACTOR_ADDR.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6089>
2021-12-01 16:57:30 +00:00
Emma Anholt 3748b8afce freedreno/ir3: Make a shared helper for the tess factor stride.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6089>
2021-12-01 16:57:30 +00:00
M Henning 17de0841ae nouveau/nir: Use natural alignment for scalars
We used to request vec4 alignment for everything on the nir codepath,
but this triggers an assertion failure since a0b82c24b6, which prohibits
vec4 alignment on scalars. Since requiring vec4 alignment on scalars is a
little silly anyway, this patch relaxes the alignment to naturally aligned
for scalars.

Fixes about 27 crashing tests in piglit and deqp on kepler, including eg
piglit/tests/spec/glsl-1.30/execution/fs-large-local-array.shader_test

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13883>
2021-12-01 16:10:57 +00:00
Lionel Landwerlin 698343edc5 util/u_trace/perfetto: add new env variable to enable perfetto
When using the Vulkan API, command buffers can be recorded way before
perfetto is enabled. This can be problematic if you want already
recorded command buffers to produce traces.

This new environment variable makes perfetto enabled internally so
that command buffers are recorded with timestamps, even though no
perfetto recording happens.

v2: rename to GPU_TRACE_INSTRUMENT (Rob)

v3: Move instrumentation check to generated headers (Danylo)
    Decouple instrumentation enabling from tracing (Danylo)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13911>
2021-12-01 15:14:05 +00:00
Lionel Landwerlin 65697d6141 util/u_trace: add end_of_pipe property to tracepoints
In order to capture the timestamp when things actually end on Intel
GPU HW, we need to know whether the timestamp should be capture at the
top or end of pipeline.

v2: use one line python if/else (Danylo)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13911>
2021-12-01 15:14:05 +00:00
Viktoriia Palianytsia 6f54ebe44f glsl: fix for unused variable in glsl_types.cpp
Unused variable vector_elements is now used in return from
function decode_type_from_blob instead of encoded.basic.vector_elements.
In the code we can see how those variables were equated
and then the operations were made exactly to vector_elements.
But variable didn't pass into any other variables or functions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5536
Signed-off-by: Viktoriia Palianytsia <v.palianytsia@globallogic.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13725>
2021-12-01 09:33:41 +00:00
Marcin Ślusarz 4f58cc82e2 spirv: handle SpvOpMemberName
Now we can see field names in structs instead of generic
"fieldN" with NIR_PRINT=1.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13941>
2021-12-01 08:56:29 +00:00
Lionel Landwerlin 8e568d3f00 nir/opt_deref: don't try to cast empty structures
Found while running valgrind :

==3583454== Invalid read of size 4
==3583454==    at 0xF48336: glsl_get_struct_field_offset (nir_types.cpp:84)
==3583454==    by 0xC7CD0D: opt_replace_struct_wrapper_cast (nir_deref.c:1068)
==3583454==    by 0xC7CDD9: opt_deref_cast (nir_deref.c:1087)
==3583454==    by 0xC7DD8E: nir_opt_deref_impl (nir_deref.c:1369)
==3583454==    by 0xC7DF4E: nir_opt_deref (nir_deref.c:1428)
==3583454==    by 0xA63F3C: brw_kernel_from_spirv (brw_kernel.c:325)
==3583454==    by 0xA3BC2C: main (intel_clc.c:481)
==3583454==  Address 0xe4f7e88 is 24 bytes after a block of size 48 in arena "client"

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/13952>
2021-12-01 08:24:39 +00:00
Boris Brezillon 69ec384bba gallium/d3d12: Don't use designated initializers
Use of designated initializers requires at least '/std:c++20', and
mesa is using c++14 by default.

Fixes: 8d3a3e7a00 ("microsoft/compiler: Use textures for SRVs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13912>
2021-12-01 08:51:17 +01:00
Boris Brezillon 83280b8e23 microsoft/compiler: Fix dxil_nir_create_bare_samplers()
_mesa_hash_table_u64_search() returns the data directly, not an
hash_entry object. We also need to take the descriptor set into account
for this pass to work properly on Vulkan shaders.

Fixes: 46bc7cf678 ("microsoft/compiler: Rewrite sampler splitting pass to be smarter and handle derefs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13912>
2021-12-01 08:51:05 +01:00
Ilia Mirkin c868bff36a freedreno/ci: add piglit runs for a306
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13920>
2021-11-30 20:06:07 -05:00
Mauro Rossi 1ba231fb75 android: define cpp_rtti=false because libLLVM is built w/o RTTI (v2)
libLLVM for Android is built without RTTI, but after commit ad86267
mesa inherits meson default RTTI enabled state.

cpp_rtti=false is added to meson options in android/mesa3d_cross.mk

(v2) Add Fixes tag and use spaces instead of tabs for aligning the trailing \

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Fixes: ad862674 ("meson: Don't override built-in cpp_rtti option, error if it's invalid")
Cc: "21.3" "21.2" mesa-stable
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13901>
2021-11-30 22:58:30 +01:00