platform/upstream/mesa.git
13 months agoanv: flag 3DSTATE_RASTER as dirty after simple shader primitive
Lionel Landwerlin [Mon, 9 Oct 2023 14:20:12 +0000 (17:20 +0300)]
anv: flag 3DSTATE_RASTER as dirty after simple shader primitive

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9899
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25618>

13 months agoanv: fix a couple of missing input for 3DSTATE_RASTER programming
Lionel Landwerlin [Mon, 9 Oct 2023 14:05:39 +0000 (17:05 +0300)]
anv: fix a couple of missing input for 3DSTATE_RASTER programming

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25618>

13 months agoanv: add missing workaround handling in simple shader
Lionel Landwerlin [Mon, 9 Oct 2023 13:50:13 +0000 (16:50 +0300)]
anv: add missing workaround handling in simple shader

It's not going to make any real difference because of the type of
primitive used, but it feels safer to have this everywhere after a
3DPRIMITIVE.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25618>

13 months agoanv: implement INTEL_DEBUG=reemit
Lionel Landwerlin [Mon, 9 Oct 2023 10:37:18 +0000 (13:37 +0300)]
anv: implement INTEL_DEBUG=reemit

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25618>

13 months agopvr: Fix cubemap layer stride
Karmjit Mahil [Tue, 19 Sep 2023 16:08:41 +0000 (17:08 +0100)]
pvr: Fix cubemap layer stride

The hw calculates the layer stride with the assumption of a full
mip chain being there even though certain levels might never be
used.

Fix the `layer_size` by accounting for any missing mip levels.

Fixes: 8991e6464 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Reported-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25344>

13 months agopvr: fix mipmap size calculation for bc formats
SoroushIMG [Sat, 17 Jun 2023 12:59:00 +0000 (13:59 +0100)]
pvr: fix mipmap size calculation for bc formats

The block size given by vk_format_get_blocksize is in blocks, not
texels.

dEQP tests affected:
  dEQP-VK.pipeline.monolithic.image_view.view_type*
    .format.eac*lod_base_mip_level

Fixes: 8991e6464 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25344>

13 months agodocs: use html_static_path for static files
Erik Faye-Lund [Fri, 6 Oct 2023 09:03:55 +0000 (11:03 +0200)]
docs: use html_static_path for static files

I'm not sure why I picked html_extra_path instead, as it's meant for
slightly less directly related files than what html_static_path is for.

So let's switch. It shouldn't make much of a real-world difference, but
should make it a bit easier to understand what this is about.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: only link to old docs from html
Erik Faye-Lund [Fri, 6 Oct 2023 09:29:46 +0000 (11:29 +0200)]
docs: only link to old docs from html

Only the HTML builder knows about these files, so we can't really link
to them when using other builders. This only matter to the link-checker
right now, because that's the only other builder we use.

It's a bit sad that we can't linkcheck files like these, but it doesn't
work either way. Another way of making it work could be to use the
download-role for these files. I'm not sure I think that's any better,
as that makes the code read a bit more confusingly to me; the intent
isn't to *download* the files, but to view them as raw-text.

I could go either way here, though. Neither is fantastic IMO, but
neither is a disaster either.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: mark some redirects as allowed
Erik Faye-Lund [Fri, 6 Oct 2023 09:33:34 +0000 (11:33 +0200)]
docs: mark some redirects as allowed

These redirects are all fine. I don't think we want to apply them,
because they are more about implementation details on the target site.

So let's just mark them as OK. They cause no harm.

There's also some redirects that are all about authentication. We also
don't want to apply these, because they would break the links.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: keep up with intels ever-moving documentation
Erik Faye-Lund [Fri, 6 Oct 2023 09:43:28 +0000 (11:43 +0200)]
docs: keep up with intels ever-moving documentation

No location is ever good enough for Intel. Let's catch up with their
latests churns in documentation URLs...

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: use doc-role when linking to lists article
Erik Faye-Lund [Fri, 6 Oct 2023 08:56:38 +0000 (10:56 +0200)]
docs: use doc-role when linking to lists article

This makes the link-checker see the target.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: apply some trivial redirects
Erik Faye-Lund [Fri, 6 Oct 2023 08:53:32 +0000 (10:53 +0200)]
docs: apply some trivial redirects

These were found by using the linkcheck builder.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: link to upstream etnaviv
Erik Faye-Lund [Fri, 6 Oct 2023 08:50:14 +0000 (10:50 +0200)]
docs: link to upstream etnaviv

The Wiki in this repo has been removed, and the about section mentions
that this is laanwj's personal fork, and not the upstream. So let's
update the link to the upstream repo instead.

There's no wiki there either, but the main repo itself contains a readme
file with some docs. Most of this is pretty stale, but it seems better
than nothing.

In the longer run, we should probably create a page about etnaviv in the
drivers directory of these docs, and try to keep that up to date.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: update link to git-wiki
Erik Faye-Lund [Fri, 6 Oct 2023 08:45:02 +0000 (10:45 +0200)]
docs: update link to git-wiki

The Git Wiki has been long deprecated, and is now partially removed. The
article we pointed to here seems to not have been backed up.

However, there's a new place that documents installing on Windows in the
Git Docs instead. So let's send users there instead.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: update anchor for link
Erik Faye-Lund [Fri, 6 Oct 2023 08:43:28 +0000 (10:43 +0200)]
docs: update anchor for link

GitLab has renamed "specific" runners to "project"-runners. And
additionally, they currently document two ways of creating them.

Let's update the link to point to the new, non-deprecated way.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: update a few links to https
Erik Faye-Lund [Fri, 6 Oct 2023 08:24:40 +0000 (10:24 +0200)]
docs: update a few links to https

These links forward to the HTTPS version now, let's save the users a
redirect.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agodocs: fix linkcheck
Erik Faye-Lund [Fri, 6 Oct 2023 08:05:45 +0000 (10:05 +0200)]
docs: fix linkcheck

When running with the linkcheck builder,
app.builder.default_translator_class is None, making us throw an
exception and give up.

We don't need the bootstrap extension in this case, so just do nothing
instead.

Fixes: f72033bb707 ("docs: add bootstrap extension")
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585>

13 months agoutil: Deduplicate macros between u_math.h and macros.h
Yonggang Luo [Fri, 4 Aug 2023 05:24:08 +0000 (13:24 +0800)]
util: Deduplicate macros between u_math.h and macros.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24484>

13 months agoanv: Fix transfer type assert
Vinson Lee [Sun, 8 Oct 2023 17:09:59 +0000 (10:09 -0700)]
anv: Fix transfer type assert

Fix defect reported by Coverity Scan.

Constant expression result (CONSTANT_EXPRESSION_RESULT)
always_true_or: The or condition
type != ANV_TIMESTAMP_CAPTURE_AT_CS_STALL || type != ANV_TIMESTAMP_REWRITE_COMPUTE_WALKER
will always be true because type cannot be equal to two different values
at the same time, so it must be not equal to at least one of them.

Fixes: 5112b421462 ("anv: Handle end of pipe with MI_FLUSH_DW on transfer queue")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25605>

13 months agofreedreno: Rework supported-modifiers handling
Rob Clark [Thu, 5 Oct 2023 22:26:12 +0000 (15:26 -0700)]
freedreno: Rework supported-modifiers handling

We should be taking into account the format while deciding if we support
a given modifier or not.  So a simple array of supported modifiers does
not do the trick.

While we are at it, also handle QCOM_TILED3.  (We really only use
QCOM_TILED2 in GMEM so it isn't user visible.)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9938
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25575>

13 months agoci/freedreno: re-enable Cheza (Adreno 630) runners
David Heidelberg [Mon, 25 Sep 2023 16:42:35 +0000 (22:12 +0530)]
ci/freedreno: re-enable Cheza (Adreno 630) runners

Problems we're resolved.

This reverts commit 1f3446499f2d3ffa056e3c5928ecbc8c4faac836.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25376>

13 months agoutil: Avoid waste space when linear alloc'ing large sizes
Caio Oliveira [Tue, 3 Oct 2023 06:24:51 +0000 (23:24 -0700)]
util: Avoid waste space when linear alloc'ing large sizes

In the linear allocator, when a size larger than the minimum
buffer size is allocated, we currently create the new buffer
to fit exactly the requested size.

In that case, don't bother updating the `latest` pointer, since
this newly created buffer is already full.  In the worst case,
the current `latest` is full and it would be the same; in the
best case, there's still room for small allocations, so we avoid
wasting space if the next allocations would fit.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25517>

13 months agonvk: set optimization level to 3
Thomas H.P. Andersen [Sat, 7 Oct 2023 14:45:30 +0000 (16:45 +0200)]
nvk: set optimization level to 3

The refactor in a4f8fd9dd53d90307c98c1b4ed15ec1deaa8f8d3 changed NV50_PROG_OPTIMIZE
from 3 to 0.

Running with NV50_PROG_OPTIMIZE=0 causes some shaders to not compile. One example is
dEQP-VK.pipeline.monolithic.creation_cache_control.compute_pipelines.duplicate_single_recreate_explicit_caching
which fails with:
"Assertion `insn->src(src0 & FA_SRC_MASK).getFile() == FILE_GPR' failed"
A similar error also happen when testing Serious Sam Fusion 2017

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25601>

13 months agoci: print deqp version in the job log
Eric Engestrom [Thu, 9 Mar 2023 11:33:53 +0000 (11:33 +0000)]
ci: print deqp version in the job log

This allows to easily verify which version was actually running in some
job, to notice if an image tag wasn't properly bumped, for instance.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21850>

13 months agov3d/ci: move traces job to wayland
Eric Engestrom [Tue, 11 Jul 2023 12:30:08 +0000 (13:30 +0100)]
v3d/ci: move traces job to wayland

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24094>

13 months agoci: do not report failed job when flakes reporting fails
David Heidelberg [Sat, 7 Oct 2023 19:05:07 +0000 (21:05 +0200)]
ci: do not report failed job when flakes reporting fails

It's not critical for the job itself.

Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25604>

13 months agopick-ui: add `Backport-to: XX.Y` nomination
Eric Engestrom [Mon, 18 Oct 2021 22:02:52 +0000 (23:02 +0100)]
pick-ui: add `Backport-to: XX.Y` nomination

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13664>

13 months agopick-ui: use more expressive variable names
Eric Engestrom [Wed, 3 Nov 2021 20:36:11 +0000 (20:36 +0000)]
pick-ui: use more expressive variable names

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13664>

13 months agopick-ui: use assignment expressions
Eric Engestrom [Wed, 3 Nov 2021 20:36:11 +0000 (20:36 +0000)]
pick-ui: use assignment expressions

Python 3.8 is 2 years old by now, I think it's time to allow using its
features, especially for a script that's only used by the release
maintainers.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13664>

13 months agotu,util/driconf: Add option to not reserve descriptor set
Mark Collins [Tue, 3 Oct 2023 19:12:13 +0000 (19:12 +0000)]
tu,util/driconf: Add option to not reserve descriptor set

A descriptor set is internally reserved for descriptor set dynamic
offset which might not be used by an applications which otherwise
requires an extra descriptor set. This driconf option allows making
that trade-off by dropping support for dynamic offsets in exchange
for an extra descriptor set which means 5 usable descriptor sets on
A6XX and 8 on A7XX.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25534>

13 months agotu: Support higher descriptor set count for A7XX
Mark Collins [Tue, 3 Oct 2023 18:22:49 +0000 (18:22 +0000)]
tu: Support higher descriptor set count for A7XX

Allows for the descriptor set count to vary at runtime depending on
the specific GPU to allow for 7 usable descriptor sets on A7XX with
one reserved for dynamic offsets.

Passing VK-CTS: dEQP-VK.binding_model.*

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25534>

13 months agofreedreno/common: Add max_sets property to A6xxGPUInfo
Mark Collins [Tue, 3 Oct 2023 15:58:56 +0000 (15:58 +0000)]
freedreno/common: Add max_sets property to A6xxGPUInfo

A7XX increases the maximum amount of descriptor sets from 5 to 8,
the amount of descriptor sets was added as a property of the
A6xxGPUInfo to accommodate it changing across GPUs.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25534>

13 months agoanv: fix index buffer size programming
Lionel Landwerlin [Sat, 7 Oct 2023 13:13:35 +0000 (16:13 +0300)]
anv: fix index buffer size programming

This is a merge issue due to 2 MRs touching the same code.

Fixes a few maintence5 tests like : dEQP-VK.robustness.bind_index_buffer2.offset_0.draw_indexed.oo_size

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25599>

13 months agonir: handle nir_var_mem_ubo in nir_clone_uniform_variable
Marek Olšák [Fri, 7 Apr 2023 03:34:47 +0000 (23:34 -0400)]
nir: handle nir_var_mem_ubo in nir_clone_uniform_variable

for UBOs

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agonir: expose reusable linking helpers for cloning uniform loads
Marek Olšák [Wed, 5 Apr 2023 10:40:59 +0000 (06:40 -0400)]
nir: expose reusable linking helpers for cloning uniform loads

for the new varying optimizer

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agonir: gather dual slot input information
Marek Olšák [Tue, 26 Sep 2023 04:10:44 +0000 (00:10 -0400)]
nir: gather dual slot input information

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agonir: take dual slot input info into account when computing IO driver locations
Marek Olšák [Tue, 26 Sep 2023 04:09:49 +0000 (00:09 -0400)]
nir: take dual slot input info into account when computing IO driver locations

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agonir: add dual-slot input information into load_input intrinsics
Marek Olšák [Mon, 13 Mar 2023 04:18:47 +0000 (00:18 -0400)]
nir: add dual-slot input information into load_input intrinsics

This is necessary to allow optimizing VS inputs after nir_lower_io, which
is currently impossible because the loss of dual-slot information in NIR
would break VS inputs. With this, driver locations can be recomputed by
calling nir_recompute_io_bases. It's a prerequisite for optimizing varyings
with lowered IO.

When this is used, we will be able to eliminate unused dual-slot VS inputs
as well as unused low and high halves of dual-slot VS inputs for the first
time, which can happen due to optimizations of varyings. Without this,
st/mesa binds vertex buffers for dual-slot inputs that are fully or
partially unused in the shader.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agonir: recompute IO bases after DCE in nir_lower_io_passes
Marek Olšák [Thu, 31 Aug 2023 14:54:39 +0000 (10:54 -0400)]
nir: recompute IO bases after DCE in nir_lower_io_passes

otherwise the IO bases can be incorrect due to non-DCE'd input loads

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agonir: sort variables by location in nir_lower_io_passes to work around a bug
Marek Olšák [Fri, 1 Sep 2023 22:56:10 +0000 (18:56 -0400)]
nir: sort variables by location in nir_lower_io_passes to work around a bug

I don't know why this is necessary, but it unblocks the work on varying
optimizations.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25394>

13 months agovirgl: Use common clear_texture if host doesn't support the feature
Gert Wollny [Fri, 6 Oct 2023 07:31:24 +0000 (09:31 +0200)]
virgl: Use common clear_texture if host doesn't support the feature

v2: Fix include (osy)

Fixes: a1eabeff (gallium: remove PIPE_CAP_CLEAR_TEXTURE)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9944

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25580>

13 months agoci: Uprev crosvm
Vignesh Raman [Fri, 6 Oct 2023 05:14:35 +0000 (10:44 +0530)]
ci: Uprev crosvm

Recent commit in linux kernel 6.6 rc3 broke booting
in crosvm. Latest crosvm contains a fix for this issue.
So bump the crosvm version to latest.

https://issuetracker.google.com/issues/303128596
https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4906858

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25582>

13 months agoci/lima: farm is down, disable for now
David Heidelberg [Sat, 7 Oct 2023 08:17:57 +0000 (10:17 +0200)]
ci/lima: farm is down, disable for now

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25596>

13 months agoci/b2c: switch containers to a back-up ahead of valve-infra renaming
Martin Roukala (né Peres) [Fri, 6 Oct 2023 18:20:11 +0000 (21:20 +0300)]
ci/b2c: switch containers to a back-up ahead of valve-infra renaming

We are about to rename mupuf/valve-infra into gfx-ci/ci-tron.

While most resources will transparently be redirected, gitlab does
not allow us to keep our containers during the migration.

To work around that, I uploaded the current containers to Eric's fork
of valve-infra. Let's use these containers until the migration is over!

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25593>

13 months agonvk: Invalidate SKED caches at the top of command buffers
Faith Ekstrand [Fri, 6 Oct 2023 23:46:07 +0000 (18:46 -0500)]
nvk: Invalidate SKED caches at the top of command buffers

This is the cache that caches QMDs.  We need to invalidate it or else we
can end up with cache collisions and end up running the wrong shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25595>

13 months agonvk: Invalidate sampler/texture header caches in BeginCommandBuffer()
Faith Ekstrand [Thu, 5 Oct 2023 17:34:35 +0000 (12:34 -0500)]
nvk: Invalidate sampler/texture header caches in BeginCommandBuffer()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25595>

13 months agonvk: Add a nvk_cmd_buffer_compute_cls() helper
Faith Ekstrand [Fri, 6 Oct 2023 23:45:32 +0000 (18:45 -0500)]
nvk: Add a nvk_cmd_buffer_compute_cls() helper

We have one of these for 3D and it's more ergonamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25595>

13 months agonouveau: Generate headers for Maxwell B compute
Faith Ekstrand [Fri, 6 Oct 2023 23:42:34 +0000 (18:42 -0500)]
nouveau: Generate headers for Maxwell B compute

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25595>

13 months agointel/fs: Add DP4A to get_lowered_simd_width
Ian Romanick [Thu, 5 Oct 2023 00:41:08 +0000 (17:41 -0700)]
intel/fs: Add DP4A to get_lowered_simd_width

While working on cooperative matrix support, I noticed some invalid
DP4A instructions being generated.

    dp4a(32)    g33<1>UD    g21<8,8,1>UD    g1.0<0,1,0>UD   g9<1,1,1>UD

This violates the constraint that the destination or a source can only
access two consecutive GRFs.

I'm a little surprised that validation didn't catch this. Perhaps
because it's a 3 source instruction? Either way, it seems like a bigger
project to fix that.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 0f809dbf404 ("intel/compiler: Basic support for DP4A instruction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25554>

13 months agoutil: Add function print information about a ralloc tree
Caio Oliveira [Mon, 18 Sep 2023 21:55:58 +0000 (14:55 -0700)]
util: Add function print information about a ralloc tree

In release mode print the ralloc tree header pointers.  In debug mode,
will look at the child allocations recursively checking for the canary
values.  In most cases this should work and give us extra information
about the type of the subtree (GC, Linear) and the allocation sizes.

For example, calling it at the end of spirv_to_nir() will output the
following tree with a summary at the end (lines elided to focus on the
general structure of the output)

```
0xca8d00 (472 bytes)
  0xdf2c60 (32 bytes)
  0xdf2c00 (32 bytes)
  0xdf2ba0 (32 bytes)
  0xdf2b40 (32 bytes)
  (...)
  0xcde8b0 (64 bytes)
  0xcde760 (72 bytes)
    0xd2de40 (168 bytes)
  0xcce660 (64 bytes)
  0xcce510 (72 bytes)
    0xcce5a0 (120 bytes)
  0xcce490 (64 bytes)
  (...)
  0xcbc450 (456 bytes)
    0xdf55c0 (160 bytes)
      0xdf5730 (72 bytes)
        0xdf57c0 (80 bytes)
      0xdf5530 (72 bytes)
        0xdf56a0 (80 bytes)
    (...)
    0xcbe840 (128 bytes)
      0xcc4310 (4 bytes)
    0xcbc660 (536 bytes) (gc context)
      0xde6b40 (32576 bytes) (gc slab or large block)
      0xddb160 (32704 bytes) (gc slab or large block)
      0xdc8d50 (32704 bytes) (gc slab or large block)
      (...)
      0xcde9a0 (32704 bytes) (gc slab or large block)
      0xcd6720 (32704 bytes) (gc slab or large block)
      0xcce6e0 (32768 bytes) (gc slab or large block)
  0xcbc330 (72 bytes)
    0xd680a0 (208 bytes)
  0xca9010 (78560 bytes)
  0xca8f20 (176 bytes)

==== RALLOC INFO ptr=0xca8d30 info=0xca8d00
ralloc allocations    = 4714
  - linear            = 0
  - gc                = 23
  - other             = 4691
content bytes         = 1055139
ralloc metadata bytes = 226272
linear metadata bytes = 0
====
```

There's a flag to pass so only the summary at the end is printed.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25482>

13 months agoutil: Add a canary to identify gc_ctx in debug mode
Caio Oliveira [Fri, 29 Sep 2023 22:34:02 +0000 (15:34 -0700)]
util: Add a canary to identify gc_ctx in debug mode

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25482>

13 months agoutil: Add size to ralloc_header in debug mode
Caio Oliveira [Mon, 18 Sep 2023 21:24:00 +0000 (14:24 -0700)]
util: Add size to ralloc_header in debug mode

For 64-bit environments this just fills a padding.  Will enable
dumping more information when debugging ralloc trees.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25482>

13 months agorusticl: Add Rust bindings for inline glsl_types functions
Caio Oliveira [Sat, 16 Sep 2023 17:19:22 +0000 (10:19 -0700)]
rusticl: Add Rust bindings for inline glsl_types functions

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agocompiler/types: Flip wrapping of basic "get type" functions
Caio Oliveira [Fri, 29 Sep 2023 07:36:13 +0000 (00:36 -0700)]
compiler/types: Flip wrapping of basic "get type" functions

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agocompiler/types: Flip wrapping of convenience accessors for vector types
Caio Oliveira [Thu, 7 Sep 2023 23:49:47 +0000 (16:49 -0700)]
compiler/types: Flip wrapping of convenience accessors for vector types

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agocompiler/types: Flip wrapping of various type identification checks
Caio Oliveira [Sat, 2 Sep 2023 06:49:26 +0000 (23:49 -0700)]
compiler/types: Flip wrapping of various type identification checks

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agocompiler/types: Flip wrapping of base_type checks
Caio Oliveira [Sat, 2 Sep 2023 05:35:26 +0000 (22:35 -0700)]
compiler/types: Flip wrapping of base_type checks

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agocompiler/types: Move C declarations into glsl_types.h
Caio Oliveira [Fri, 29 Sep 2023 18:09:55 +0000 (11:09 -0700)]
compiler/types: Move C declarations into glsl_types.h

This ensures they'll be visible for the C++ inline implementations.
Reordered the functions to better organize them: queries, getters,
transformers, layout functions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agocompiler/types: Move the C++ inline functions in glsl_type out of the struct body
Caio Oliveira [Fri, 1 Sep 2023 23:26:02 +0000 (16:26 -0700)]
compiler/types: Move the C++ inline functions in glsl_type out of the struct body

Just move code, will make easier to flip these to be wrappers to the C code.  Keep
those in a separate header file to reduce cluttering glsl_types.h.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25470>

13 months agovenus: fix re-export of imported classic 3d resources
Yiwei Zhang [Fri, 6 Oct 2023 06:41:54 +0000 (23:41 -0700)]
venus: fix re-export of imported classic 3d resources

When the guest driver is Virgl while Xwayland is on Zink, Virgl can
request virtgpu classic 3d resource allocations for swapchain images.
Zink will import when the image is shared with xserver and will export
for fd info of all 2d images later to be forwarded.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25579>

13 months agoradv: fix re-emitting streamout descriptors for NGG streamout
Samuel Pitoiset [Tue, 19 Sep 2023 13:47:34 +0000 (15:47 +0200)]
radv: fix re-emitting streamout descriptors for NGG streamout

In a scenario like:
CmdBindTransformFeedbackBuffers()
BeginTransformFeedback()
CmdDraw() --> streamout descriptors emitted
EndTransformFeedback() --> streamout descriptors emitted as 0 (disabled)
CmdDraw()
BeginTransformFeedback()
CmdDraw() --> streamout descriptor not re-emitted
EndTransformFeedback()

Fix this by re-emitting streamout descriptors when streamout is
enabled/disabled because a buffer size of 0 acts like a disable bit.

This fixes dEQP-VK.transform_feedback.simple.backward_dependency_indirect*
on NAVI31.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25583>

13 months agozink: store bindless var when creating it to avoid creating it again
antonino [Fri, 6 Oct 2023 10:42:20 +0000 (12:42 +0200)]
zink: store bindless var when creating it to avoid creating it again

When bindless variables are created they get used directly and never
stored anywhere so if another bindless instruction is encountered
duplicate variables are created.

Fixes: fe2ba184d8c ("zink: use descriptor indices in compiler")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25591>

13 months agotu/kgsl: Fix field order in kgsl_command_object init
Danylo Piliaiev [Fri, 6 Oct 2023 08:26:26 +0000 (10:26 +0200)]
tu/kgsl: Fix field order in kgsl_command_object init

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9942

Fixes: ec268fa5b666a49adafc431dbc05b73bfd74526e
("tu/kgsl: Support u_trace and perfetto")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25581>

13 months agoegl/wayland: Don't segfault if `create_wl_buffer` returns `NULL`
Ian Douglas Scott [Mon, 28 Aug 2023 23:18:01 +0000 (16:18 -0700)]
egl/wayland: Don't segfault if `create_wl_buffer` returns `NULL`

Normally, this shouldn't fail, but it has various cases where it returns
`NULL`. Without this change, it would result in a segfault when
`wl_buffer_add_listener` is called.

This instead makes `EGLSwapBuffers` return a `EGL_BAD_ALLOC` error.

The other place `create_wl_buffer` is called already checks the return
value, and the Vulkan WSI code doesn't seem to have an issue like this.

Signed-off-by: Ian Douglas Scott <ian@iandouglasscott.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24915>

13 months agoci: skip dEQP-VK.api.driver_properties.conformance_version for everyone
Eric Engestrom [Tue, 3 Oct 2023 09:17:08 +0000 (10:17 +0100)]
ci: skip dEQP-VK.api.driver_properties.conformance_version for everyone

This test checks the driver's reported conformance version against the
version of the CTS we're running. This check fails every few months
and everyone has to go and bump the number in every driver.

Running this check only makes sense while preparing a conformance
submission, so skip it in the regular CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25519>

13 months agodocs/ci: rewrite the "farm maintenance ^ other change" rule to mean what we actually...
Eric Engestrom [Thu, 5 Oct 2023 11:52:40 +0000 (12:52 +0100)]
docs/ci: rewrite the "farm maintenance ^ other change" rule to mean what we actually meant

Sometimes updates to the farm config are needed before re-enabling it,
or updating test expectations with new failures that happened while the
farm was down, etc.

These need to be allowed, as the alternative is to update the
config/expectations/etc. blindly in one MR, merge it, and then merge
another MR with the farm re-enablement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25560>

13 months agofix: clover: LLVM 18: s/CodeGenOpt::/CodeGenOptLevel::/
Kai Wasserbäch [Fri, 6 Oct 2023 09:48:30 +0000 (11:48 +0200)]
fix: clover: LLVM 18: s/CodeGenOpt::/CodeGenOptLevel::/

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9833
Reference: https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25586>

13 months agofix: clover: LLVM 18 renamed/moved CGFT_*, update compat layer
Kai Wasserbäch [Fri, 6 Oct 2023 09:32:59 +0000 (11:32 +0200)]
fix: clover: LLVM 18 renamed/moved CGFT_*, update compat layer

LLVm renamed and moved the CGFT_* stuff, we need to update the clover
compat header to follow suit.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9833
Reference: https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25586>

13 months agoradv: fix gang submissions with chaining
Samuel Pitoiset [Thu, 31 Aug 2023 08:35:38 +0000 (10:35 +0200)]
radv: fix gang submissions with chaining

Gang submissions are mostly only be used for task shaders to both
submit GFX and ACE command buffers in the same submission. Though,
the gang leader (the last submitted CS) IP type should match the
queue IP type to determine which fence to signal.

But if chaining is enabled, it's possible that all GFX cmdbufs are
chained to the first GFX cmdbuf, which means the last CS is ACE and
not GFX.

Fix this by resetting chaining for GFX when a cmdbuffer has GFX+ACE.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9724
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24966>

13 months agoradv: fill the scratch BO in radv_fill_shader_rings()
Samuel Pitoiset [Thu, 5 Oct 2023 10:23:58 +0000 (12:23 +0200)]
radv: fill the scratch BO in radv_fill_shader_rings()

Cleanup.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25529>

13 months agoradv: always write the sample positions when a new descriptor BO is created
Samuel Pitoiset [Thu, 5 Oct 2023 10:21:49 +0000 (12:21 +0200)]
radv: always write the sample positions when a new descriptor BO is created

This was completely broken, for example in the following scenario:
- submits something which needs sample positions (this creates a new
descriptor BO with sample positions)
- submits something which needs the tess rings (this creates a new
descriptor BO with tess rings but without sample positions, ie.
add_sample_positions would be FALSE)
- submits something which needs sample positions again (this won't
create a new descriptor BO because it incorrectly remembered that
sample positions were set)

Fix this by always writing the sample positions.

This should fix the following flakes:
- dEQP-VK.fragment_shading_barycentric.*.weights.pipeline_topology_dynamic.msaa_interpolate_at_sample.*
- dEQP-VK.pipeline.fast_linked_library.multisample_interpolation.sample_interpolate_at_distinct_values.*
- dEQP-VK.pipeline.fast_linked_library.multisample_interpolation.sample_interpolation_consistency.*
- dEQP-VK.draw.renderpass.linear_interpolation.*
- dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.linear_interpolation.*

These flakes were extremely hard to reproduce!

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25529>

13 months agointel/ds: track acceleration RT commands
Lionel Landwerlin [Wed, 10 Aug 2022 11:10:10 +0000 (11:10 +0000)]
intel/ds: track acceleration RT commands

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25570>

13 months agoanv: use buffer pools for BVH build buffers
Lionel Landwerlin [Thu, 5 Oct 2023 14:54:35 +0000 (17:54 +0300)]
anv: use buffer pools for BVH build buffers

Private memory for BVH builds doesn't need to be mapped on the host,
it's purely for use by the GPU. So it can be put into a different
buffer pool that can put into VRAM only buffers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25570>

13 months agoanv: move bo_pool allocation flags to init caller
Lionel Landwerlin [Thu, 5 Oct 2023 15:03:41 +0000 (18:03 +0300)]
anv: move bo_pool allocation flags to init caller

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25570>

13 months agoanv: reduce working temporary memory for BVH builds
Lionel Landwerlin [Thu, 5 Oct 2023 14:09:54 +0000 (17:09 +0300)]
anv: reduce working temporary memory for BVH builds

Part of the memory allocated (private) is a temporary working buffer
for the GRL kernels. Once the build operation is done, the buffer
becomes unused.

Rather than allocate a new buffer each time, reuse the current last
allocated one if its size fits the next build operation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25570>

13 months agoci: drop unused ephemeral packages in alpine image
Eric Engestrom [Wed, 4 Oct 2023 12:15:07 +0000 (13:15 +0100)]
ci: drop unused ephemeral packages in alpine image

There's nothing between installing these packages and removing them that
uses them, so let's just drop them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25546>

13 months agointel/fs: Tweak default case of fs_inst::size_read()
Caio Oliveira [Tue, 3 Oct 2023 18:12:47 +0000 (11:12 -0700)]
intel/fs: Tweak default case of fs_inst::size_read()

In the default case, there's a special case with a few conditions.
Prefer the cheapest conditions first, so we can take advantage of
short-circuiting.

Effect is a small but still significant reduce in shader compilation
times, as can be seen by:

- Fossil replay for Rise of the Tomb Raider

```
Difference at 95.0% confidence
-0.433333 +/- 0.028609
-1.42556% +/- 0.0941163%
(Student's t, pooled s = 0.0337886)
```

- Fossil replay for Batman Arkham City

```
Difference at 95.0% confidence
-8.84 +/- 0.146083
-1.65932% +/- 0.0274207%
(Student's t, pooled s = 0.125423)
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25549>

13 months agozink: don't check submit count for unflushed usage
Mike Blumenkrantz [Thu, 5 Oct 2023 16:56:10 +0000 (12:56 -0400)]
zink: don't check submit count for unflushed usage

unflushed usage is unflushed regardless of the submit count and is
critical for detecting multi-context synchronization

fixes Wolfenstein: The New Order load screen deadlock

Fixes: db12b881c7f ("zink: track/check submit info on resource batch usage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25572>

13 months agoegl/wayland: return sooner from swrast_update_buffers() if zink
Mike Blumenkrantz [Wed, 13 Sep 2023 13:22:55 +0000 (09:22 -0400)]
egl/wayland: return sooner from swrast_update_buffers() if zink

Fixes: 0f50cc03ef0 ("egl/wayland: don't block in swrast when updating buffers for zink")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24700>

13 months agoegl/wayland: don't block in swrast when updating buffers for zink
Mike Blumenkrantz [Tue, 15 Aug 2023 16:21:24 +0000 (12:21 -0400)]
egl/wayland: don't block in swrast when updating buffers for zink

this is broken, let vulkan wsi handle buffer management

Fixes: 74451ed3f08 ("egl/wayland: wait for compositor to release shm buffers")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24700>

13 months agoRevert "egl/wayland: Add image loader extension for swrast"
Mike Blumenkrantz [Tue, 15 Aug 2023 16:07:36 +0000 (12:07 -0400)]
Revert "egl/wayland: Add image loader extension for swrast"

This reverts commit 45b9b0ba32c6a6eed388ff080f7eaf5a765fe970.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24700>

13 months agoci/hasvk: Add a bunch of new CTS border color fails.
Emma Anholt [Thu, 5 Oct 2023 20:15:30 +0000 (13:15 -0700)]
ci/hasvk: Add a bunch of new CTS border color fails.

pretty sure this is from new coverage since the CTS uprev..

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25574>

13 months agoci/crocus: Add known piglit flakes
Emma Anholt [Thu, 5 Oct 2023 20:13:09 +0000 (13:13 -0700)]
ci/crocus: Add known piglit flakes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25574>

13 months agoci/etnaviv: return gl-1.4-tex1d-2dborder as a known flake
Emma Anholt [Thu, 5 Oct 2023 20:10:41 +0000 (13:10 -0700)]
ci/etnaviv: return gl-1.4-tex1d-2dborder as a known flake

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25574>

13 months agonouveau/winsys: use mmap instead of mmap64 in nouveau_bo
Simon Zeni [Thu, 5 Oct 2023 14:09:55 +0000 (10:09 -0400)]
nouveau/winsys: use mmap instead of mmap64 in nouveau_bo

The function `mmap64` is part of the large file extension and should not be
called directly. Instead `mmap` should be use and let the system use the
correct interface.

Signed-off-by: Simon Zeni <simon.zeni@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25569>

13 months agoradv: hard code format features for emulated formats
Chia-I Wu [Wed, 13 Sep 2023 23:21:27 +0000 (16:21 -0700)]
radv: hard code format features for emulated formats

The format features are known.  No need to rely on
radv_is_sampler_format_supported which will not work for ASTC.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agoradv: simplify view format override for emulated formats
Chia-I Wu [Wed, 13 Sep 2023 23:23:45 +0000 (16:23 -0700)]
radv: simplify view format override for emulated formats

Override the view format to the format of plane 1 when the view format
is also emulated.  There is no functional change.

v2: check iview->vk.format directly (@yogeshmohan)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agoradv: add radv_is_format_emulated
Chia-I Wu [Wed, 13 Sep 2023 22:54:00 +0000 (15:54 -0700)]
radv: add radv_is_format_emulated

This is a cleanup with no functional change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agovulkan/runtime, radv: remove 1D support from ETC2 emulation
Chia-I Wu [Tue, 26 Sep 2023 23:48:00 +0000 (16:48 -0700)]
vulkan/runtime, radv: remove 1D support from ETC2 emulation

The nir code deos not support 1D.  There is also no point in supporting
1D ETC2 images.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agovulkan/runtime: fix a harmless typo for ETC2 emulation
Chia-I Wu [Tue, 26 Sep 2023 23:45:56 +0000 (16:45 -0700)]
vulkan/runtime: fix a harmless typo for ETC2 emulation

Init input_img_3d correctly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agovulkan/runtime: fix image type check for ETC2 emulation
Chia-I Wu [Tue, 5 Sep 2023 22:20:31 +0000 (15:20 -0700)]
vulkan/runtime: fix image type check for ETC2 emulation

There was a typo causing the wrong push constant to be loaded.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agoradv: use vk_tecompress_etc2 from the runtime
Chia-I Wu [Tue, 5 Sep 2023 21:08:32 +0000 (14:08 -0700)]
radv: use vk_tecompress_etc2 from the runtime

There are some minor differences

 - fix incorrectly use of device->meta_state.resolve_compute.p_layout
 - when on_demand is true, the creation of ds and pipeline layouts are
   also deferred
 - unlike radv_meta_get_view_type, vk_texcompress_etc2_image_view_type
   returns 1d/2d array image views

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agovulkan/runtime: add a helper for ETC2 emulation
Chia-I Wu [Thu, 31 Aug 2023 23:33:37 +0000 (16:33 -0700)]
vulkan/runtime: add a helper for ETC2 emulation

This is based on radv's ETC2 emulation.  There is no real change to the
generated NIR shader.

v2: rename vk_texcompress_etc2_image_format to vk_texcompress_etc2_emulation_format
    update the comments

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25071>

13 months agotu: Fix VK_FORMAT_A8_UNORM_KHR using UBWC when !has_8bpp_ubwc
Danylo Piliaiev [Thu, 5 Oct 2023 13:11:35 +0000 (15:11 +0200)]
tu: Fix VK_FORMAT_A8_UNORM_KHR using UBWC when !has_8bpp_ubwc

Fixes hangs in Anno 1800 with DXVK 2.3

Fixes: 302907e347612c3d748c88aed90fd6ab60a638f5
("tu: Expose VK_KHR_maintenance5")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25567>

13 months agomesa: Fix glBegin/End when LINE_LOOP is not supported
Konstantin Seurer [Fri, 22 Sep 2023 11:21:30 +0000 (13:21 +0200)]
mesa: Fix glBegin/End when LINE_LOOP is not supported

Emits the first vertex inside glEnd.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25346>

13 months agoaco/gfx11: support vinterp as fma_mix
Georg Lehmann [Thu, 14 Sep 2023 11:25:07 +0000 (13:25 +0200)]
aco/gfx11: support vinterp as fma_mix

Totals from 718 (0.94% of 76572) affected shaders:
Instrs: 657897 -> 654219 (-0.56%)
CodeSize: 3471668 -> 3457352 (-0.41%); split: -0.41%, +0.00%
VGPRs: 34200 -> 34164 (-0.11%)
Latency: 11687698 -> 11677030 (-0.09%); split: -0.10%, +0.00%
InvThroughput: 1455371 -> 1451537 (-0.26%); split: -0.26%, +0.00%
VClause: 7598 -> 7600 (+0.03%)
SClause: 18293 -> 18241 (-0.28%); split: -0.44%, +0.15%
Copies: 34641 -> 34644 (+0.01%); split: -0.05%, +0.06%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25220>

13 months agoaco: support v_fma_f32_dpp as fma_mix
Georg Lehmann [Thu, 14 Sep 2023 11:15:39 +0000 (13:15 +0200)]
aco: support v_fma_f32_dpp as fma_mix

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25220>

13 months agoaco/gfx11: apply clamp/omod to vinterp
Georg Lehmann [Thu, 14 Sep 2023 11:01:09 +0000 (13:01 +0200)]
aco/gfx11: apply clamp/omod to vinterp

Totals from 2504 (3.27% of 76572) affected shaders:
MaxWaves: 74098 -> 74106 (+0.01%)
Instrs: 1829278 -> 1823427 (-0.32%); split: -0.32%, +0.00%
CodeSize: 9775908 -> 9759308 (-0.17%); split: -0.18%, +0.01%
Latency: 13494107 -> 13485390 (-0.06%); split: -0.10%, +0.04%
InvThroughput: 2052428 -> 2048724 (-0.18%); split: -0.18%, +0.00%
VClause: 26637 -> 26640 (+0.01%); split: -0.04%, +0.05%
SClause: 62027 -> 61988 (-0.06%); split: -0.14%, +0.08%
Copies: 73776 -> 73815 (+0.05%); split: -0.07%, +0.12%
PreVGPRs: 84403 -> 84397 (-0.01%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25220>

13 months agoRevert "ac/gpu_info: replace ib_alignment with per-IP IB base and size alignments"
Marek Olšák [Thu, 5 Oct 2023 08:52:29 +0000 (04:52 -0400)]
Revert "ac/gpu_info: replace ib_alignment with per-IP IB base and size alignments"

This reverts commit b6f435888b718506e8b806eae2a17d6ecf027dfc.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25558>

13 months agoRevert "ac/gpu_info: pad IBs according to ib_size_alignment"
Marek Olšák [Thu, 5 Oct 2023 08:52:24 +0000 (04:52 -0400)]
Revert "ac/gpu_info: pad IBs according to ib_size_alignment"

This reverts commit 4f660f99378382871f0c29e0d4b4d6a044dfe715.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25558>