platform/upstream/mesa.git
18 months agovenus: drop VkQueueBindSparse
Juston Li [Tue, 20 Dec 2022 22:51:51 +0000 (14:51 -0800)]
venus: drop VkQueueBindSparse

Sparse binding is already disabled with fence feedback enabled by
default due to the difficulty getting both to work.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agovenus: remove filtering external semaphores for QueueSubmit
Juston Li [Tue, 20 Dec 2022 22:47:20 +0000 (14:47 -0800)]
venus: remove filtering external semaphores for QueueSubmit

We now require VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT for
external semaphores.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agovenus: require exportable/importable bit for ext semaphores sync fd
Juston Li [Tue, 20 Dec 2022 22:19:13 +0000 (14:19 -0800)]
venus: require exportable/importable bit for ext semaphores sync fd

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agovenus: require exportable bit for ext fence sync fd
Juston Li [Tue, 20 Dec 2022 22:18:08 +0000 (14:18 -0800)]
venus: require exportable bit for ext fence sync fd

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agovenus: require importable external semaphores for WSI
Juston Li [Mon, 9 Jan 2023 22:06:31 +0000 (14:06 -0800)]
venus: require importable external semaphores for WSI

Semaphore sync fd import required for WSI to skip scrubbing
the wsi/external wait semaphores.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agovenus: refactor VK_KHR_synchronization2 ext sync fd requirements
Juston Li [Mon, 9 Jan 2023 21:47:27 +0000 (13:47 -0800)]
venus: refactor VK_KHR_synchronization2 ext sync fd requirements

In preparation for adding additional dependency requirements for
external sync fd support.

Move vn_physical_device_init_external_* so external sync fd support can
be retrieved earlier. Then move sync2 disabling to
vn_physical_device_get_passthrough_extensions and 1.3 downgrading
to vn_physical_device_init_properties.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agovenus: refactor out vn_feedback_event_cmd_record2
Juston Li [Tue, 22 Nov 2022 19:37:11 +0000 (11:37 -0800)]
venus: refactor out vn_feedback_event_cmd_record2

Refactor out vn_feedback_event_cmd_record2 into a shared functon
that downgrades pipeline barrier commands for non synchronization2
commands.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20088>

18 months agogbm/backend: fix gbm compile without dri
Vincent Davis Jr [Wed, 28 Dec 2022 22:28:01 +0000 (16:28 -0600)]
gbm/backend: fix gbm compile without dri

Commit introduces a fix that allows for gbm to be built with an empty
backend. There are situation especially in a Yocto/OE cross compilation
environment where you want to build with an empty backend. The particular
situation is as such:

The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
errors such as:

| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
                undefined reference to `gbm_dri_backend'
| collect2: error: ld returned 1 exit status

Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled

Add fix to bypasses compilation issue by excluding gbm dri backend. If
HAVE_DRI || HAVE_DRIX not specified.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447>

18 months agodzn: Fix clear bind flag logic
Jesse Natalie [Fri, 13 Jan 2023 20:39:22 +0000 (12:39 -0800)]
dzn: Fix clear bind flag logic

This is the patch I had meant to merge

Fixes: 8b79e6fb ("dzn: No need to add another bind flag for clears if one is already present")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20361>

18 months agodzn/ci: Add image test group, which is all passing now
Jesse Natalie [Fri, 16 Dec 2022 17:09:46 +0000 (09:09 -0800)]
dzn/ci: Add image test group, which is all passing now

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

18 months agodzn/ci: Remove flakes/fails that don't hit anymore
Jesse Natalie [Fri, 16 Dec 2022 17:06:17 +0000 (09:06 -0800)]
dzn/ci: Remove flakes/fails that don't hit anymore

The fails weren't causing pipeline failures because the tests just
aren't run, thanks to the dEQP fraction.

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

18 months agoci/windows: Download updated WARP 1.0.4 package
Jesse Natalie [Fri, 16 Dec 2022 17:04:51 +0000 (09:04 -0800)]
ci/windows: Download updated WARP 1.0.4 package

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20361>

18 months agomesa: Trivially advertise NV_generate_mipmap_sRGB
Adam Jackson [Mon, 17 Oct 2022 21:13:22 +0000 (17:13 -0400)]
mesa: Trivially advertise NV_generate_mipmap_sRGB

... if you have EXT_framebuffer_sRGB. The extension just relaxes an
error check that we're already not performing, and sRGB rendering
implies sRGB texture support, and mipmap generation would need it to be
a valid render format. So advertise it if EXT_framebuffer_sRGB works.

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

18 months agomesa: Fix extension table formatting
Adam Jackson [Mon, 17 Oct 2022 21:13:08 +0000 (17:13 -0400)]
mesa: Fix extension table formatting

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

18 months agoradv: Use the new NIR builder tex helpers for meta
Jason Ekstrand [Wed, 2 Nov 2022 18:57:56 +0000 (13:57 -0500)]
radv: Use the new NIR builder tex helpers for meta

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19480>

18 months agonir/builder: Add some texture helpers
Jason Ekstrand [Wed, 2 Nov 2022 18:37:06 +0000 (13:37 -0500)]
nir/builder: Add some texture helpers

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19480>

18 months agonir: Add more opcodes to nir_tex_instr_is_query()
Jason Ekstrand [Wed, 2 Nov 2022 21:33:48 +0000 (16:33 -0500)]
nir: Add more opcodes to nir_tex_instr_is_query()

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19480>

18 months agoglx: Harmonize glXCreateGLXPixmap with glXCreatePixmap
Adam Jackson [Fri, 6 Jan 2023 21:51:12 +0000 (16:51 -0500)]
glx: Harmonize glXCreateGLXPixmap with glXCreatePixmap

This was open-coding some things, and not perfectly. Likewise for the
destroy path.

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

18 months agoglx: Fix drawable type inference in visual/fbconfig setup
Adam Jackson [Fri, 6 Jan 2023 17:24:11 +0000 (12:24 -0500)]
glx: Fix drawable type inference in visual/fbconfig setup

This was just all kinds of wrong. Note that the comment implying "this
is a workaround for old XQuartz" is on the "not apple" side of the
ifdef. Anyway. xserver didn't start sending GLX_DRAWABLE_TYPE in the
fbconfig until:

    commit 8cde0af3c57f0375ba8ba77af9fdf74b79d9496d
    Author: Kristian Høgsberg <krh@redhat.com>
    Date:   Wed Apr 2 19:06:40 2008 -0400

        Send the GLX_EXT_texture_from_pixmap attributes to the client.

So we can remove this default from the fbconfig path. But we preserve it
for the GLXGetVisualConfigs path, because that is specified not to send
GLX_DRAWABLE_TYPE.

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

18 months agoglx: Inline a few single-use constant strings into their user
Adam Jackson [Wed, 4 Jan 2023 21:43:10 +0000 (16:43 -0500)]
glx: Inline a few single-use constant strings into their user

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

18 months agoglx: Move 1.2 GLXPixmap code into glx_pbuffer.c
Adam Jackson [Mon, 12 Dec 2022 19:30:02 +0000 (14:30 -0500)]
glx: Move 1.2 GLXPixmap code into glx_pbuffer.c

We're going to rename this file to something like glx_drawable.c
eventually, but for right now let's just get all the create/destroy calls
in the same place.

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

18 months agoglx: Check for initial "glX" first in glXGetProcAddress
Adam Jackson [Wed, 4 Jan 2023 17:23:38 +0000 (12:23 -0500)]
glx: Check for initial "glX" first in glXGetProcAddress

This makes us match eglGetProcAddress, otherwise you scan the entire GLX
function table on every glXGetProcAddress.

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

18 months agoglx: Reflow MakeContextCurrent a little
Adam Jackson [Tue, 3 Jan 2023 23:58:03 +0000 (18:58 -0500)]
glx: Reflow MakeContextCurrent a little

First, move a few early-out checks up since they don't need to take the
GLX lock. Second, move garbage collecting deleted contexts up to
immediately after they are unbound. This fixes a memory leak, albeit a
difficult one to hit, in the case where you switch away from a deleted
context but switching to the new one errors out. In that case we would
leak the deleted context, since it's been unbound from all threads and
there's no longer an XID for it.

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

18 months agoglx: Clean up some funny business from context bind/unbind
Adam Jackson [Tue, 3 Jan 2023 23:33:34 +0000 (18:33 -0500)]
glx: Clean up some funny business from context bind/unbind

We always fully unbind the old context before binding the new one, so
there's no point in passing both contexts to both the unbind and then
the bind.

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

18 months agoglx: Remove support for glXGetDriverConfig for old drivers
Adam Jackson [Tue, 3 Jan 2023 22:12:42 +0000 (17:12 -0500)]
glx: Remove support for glXGetDriverConfig for old drivers

gallium implements __DRI_CONFIG_OPTIONS version 2.

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

18 months agoglx: Remove a can't-happen NULL check
Adam Jackson [Tue, 3 Jan 2023 22:12:21 +0000 (17:12 -0500)]
glx: Remove a can't-happen NULL check

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

18 months agoglx: Remove glx_context::screen
Adam Jackson [Mon, 19 Dec 2022 20:46:02 +0000 (15:46 -0500)]
glx: Remove glx_context::screen

We're already keeping a back pointer to the glx_screen which already
tracks this, it's not important enough to keep the screen number in two
places.

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

18 months agoglx/dri3: Simplify protocol version tracking
Adam Jackson [Mon, 19 Dec 2022 17:00:42 +0000 (12:00 -0500)]
glx/dri3: Simplify protocol version tracking

This is really just a single elaborate capability check, so stash a
boolean in the display state for it.

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

18 months agoasahi: Handle sampler->compare_mode
Alyssa Rosenzweig [Thu, 5 Jan 2023 00:49:14 +0000 (19:49 -0500)]
asahi: Handle sampler->compare_mode

Instead of smashing unconditionally to 1. Not sure if this fixes anything but it
gets rid of an unknown at least. Possibly slightly faster.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20561>

18 months agoaco: Pass correct number of coords to Vega 1D LOD instruction.
Bas Nieuwenhuizen [Fri, 13 Jan 2023 15:32:41 +0000 (16:32 +0100)]
aco: Pass correct number of coords to Vega 1D LOD instruction.

If we pass a physical 2D texture descriptor we should also pass 2
coords. Otherwise it just uses the random content in the second
register which ends up funny sometimes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20696>

18 months agonir/nir_opt_move: fix ALWAYS_INLINE compiler error
t0b3 [Sat, 10 Dec 2022 13:32:53 +0000 (14:32 +0100)]
nir/nir_opt_move: fix ALWAYS_INLINE compiler error

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Closes: #6825
Fixes: f1d20ec6 ("nir/nir_opt_move: handle non-SSA defs ")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439>

18 months agoradv: fix re-emitting RB+ when the non-compacted color format changes
Samuel Pitoiset [Fri, 13 Jan 2023 09:32:08 +0000 (10:32 +0100)]
radv: fix re-emitting RB+ when the non-compacted color format changes

If the previously emitted graphics pipeline uses the value A for
col_format_non_compacted and the new bound graphics pipeline uses B.

At bind time, radv_cmd_state::col_format_non_compacted will be set to
B and the rbplus flag will be dirtied. But if there is no draws and a
new graphics pipeline is bound with the same value as A, the next
draw will emit the rbplus state with B instead of A.

This can be basically triggered with meta operations after drawing
because the driver saves/restores the bound pipeline.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8073
Fixes: 11469f7553d ("radv: copy the non-compacted color format at pipeline bind time")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20692>

18 months agoradv: fix hashing pipeline keys if RADV_PERFTEST=ngg_streamout is used
Samuel Pitoiset [Thu, 12 Jan 2023 10:21:51 +0000 (11:21 +0100)]
radv: fix hashing pipeline keys if RADV_PERFTEST=ngg_streamout is used

On GFX10-10.3, RADV_PERFTEST=ngg_streamout can be used to replace the
legacy path but it should be in the pipeline key. Otherwise, it's
possible to load legacy shaders from the cache instead of NGG.

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

18 months agozink/ci: relocate radv testing from radv's gitlab-ci.yml
Martin Roukala (né Peres) [Thu, 12 Jan 2023 16:09:46 +0000 (18:09 +0200)]
zink/ci: relocate radv testing from radv's gitlab-ci.yml

Zink testing should happen in the layered-backends stage, not the AMD
one.

Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20677>

18 months agozink/ci: add a fail to the VG flake list
Martin Roukala (né Peres) [Thu, 12 Jan 2023 15:24:41 +0000 (17:24 +0200)]
zink/ci: add a fail to the VG flake list

It seems to have happened only once so far, but let's be proactive as
an unexpected pass is fatal.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20677>

18 months agozink/ci/radv: remove a test from the fails list
Martin Roukala (né Peres) [Thu, 12 Jan 2023 13:22:57 +0000 (15:22 +0200)]
zink/ci/radv: remove a test from the fails list

It seems `spec@ext_texture_array@fbo-depth-array stencil-draw` got
fixed last week, so let's update the expectations.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20677>

18 months agoci/piglit: compress results.csv before uploading it to GitLab
Martin Roukala (né Peres) [Thu, 12 Jan 2023 12:08:01 +0000 (14:08 +0200)]
ci/piglit: compress results.csv before uploading it to GitLab

The results.csv file of a full piglit run is about 6 MB.

Given how seldomly this file is being used, and the fact that it cannot
be viewed directly in gitlab's artifact page anyway.

Let's compress the file using zstd, and enjoy a ~90% reduction in size
at the cost of probably less than 500ms of compression time on a slow
device, and 55ms on the CI machines in the valve farm.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20669>

18 months agoci/deqp-runner: compress results.csv before uploading it to GitLab
Martin Roukala (né Peres) [Thu, 12 Jan 2023 11:49:02 +0000 (13:49 +0200)]
ci/deqp-runner: compress results.csv before uploading it to GitLab

The results.csv file can get ridiculously big for a vkcts run (up to
135MB). Given how seldomly this file is being used, and the fact that
it cannot be viewed directly in gitlab's artifact page anyway.

Let's compress the file using zstd, and enjoy a ~95% reduction in size
at the cost of probably less than 1 second of compression time on even
the slowest of the devices in CI (which would use sharing), and about
150ms on the CI machines in the Valve farm.

Suggested-by: Daniel Stone <daniels@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20669>

18 months agoRevert "ci: Collabora's LAVA lab for maintance"
Sergi Blanch Torne [Wed, 11 Jan 2023 07:25:14 +0000 (08:25 +0100)]
Revert "ci: Collabora's LAVA lab for maintance"

Farm up again

This reverts commit 900ccec7e8fa809ef0a9154db4d0ecec3fe26e9c.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20633>

18 months agoci: disable Collabora's LAVA lab for maintance
Sergi Blanch Torne [Wed, 11 Jan 2023 07:17:49 +0000 (08:17 +0100)]
ci: disable Collabora's LAVA lab for maintance

This is to inform you of some planned downtime in the LAVA lab as follows:

    Start: 2023-01-13 08:00 GMT
    End: 2023-01-13 12:00 GMT

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20632>

18 months agoradv: fix missing implementation of creating images from swapchains
Samuel Pitoiset [Wed, 11 Jan 2023 08:14:08 +0000 (09:14 +0100)]
radv: fix missing implementation of creating images from swapchains

These pNext structs are part of VK_KHR_swapchain which is core Vulkan
1.1 but they were missing. Loosely based on ANV.

Passed WSI CTS.

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

18 months agointel/utrace: document tracepoints
Lionel Landwerlin [Wed, 25 May 2022 07:47:27 +0000 (10:47 +0300)]
intel/utrace: document tracepoints

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agointel/ds: remove unused trace point
Lionel Landwerlin [Tue, 10 Jan 2023 21:01:06 +0000 (23:01 +0200)]
intel/ds: remove unused trace point

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agointel/ds: add INTEL_GPU_TRACEPOINT envvar to toggle tracepoints
Lionel Landwerlin [Sun, 22 May 2022 13:00:40 +0000 (16:00 +0300)]
intel/ds: add INTEL_GPU_TRACEPOINT envvar to toggle tracepoints

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agoanv: add support for command buffer tagging in traces
Lionel Landwerlin [Sun, 22 May 2022 10:18:42 +0000 (13:18 +0300)]
anv: add support for command buffer tagging in traces

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agovulkan/debug_utils: copy debug util labels
Lionel Landwerlin [Thu, 12 Jan 2023 12:09:14 +0000 (14:09 +0200)]
vulkan/debug_utils: copy debug util labels

The copied structures currently can point to freed memory.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agoutil/u_trace: add support for variable length trace points
Lionel Landwerlin [Wed, 11 Jan 2023 23:08:46 +0000 (01:08 +0200)]
util/u_trace: add support for variable length trace points

Use case being :

struct tp {
   ...
   char string[0];
};

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agointel/ds: move event_id access to perfetto lambda
Lionel Landwerlin [Sun, 22 May 2022 14:15:50 +0000 (17:15 +0300)]
intel/ds: move event_id access to perfetto lambda

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agointel/ds: track secondary cmdbuffers in perfetto
Lionel Landwerlin [Sat, 21 May 2022 16:04:21 +0000 (19:04 +0300)]
intel/ds: track secondary cmdbuffers in perfetto

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agoanv: record secondaries' traces into primaries
Lionel Landwerlin [Fri, 20 May 2022 21:38:40 +0000 (00:38 +0300)]
anv: record secondaries' traces into primaries

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agopps: print out message when we get the first counters
Lionel Landwerlin [Sat, 21 May 2022 16:06:16 +0000 (19:06 +0300)]
pps: print out message when we get the first counters

Mostly for debug purposes, show the first visible counter timestamp.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655>

18 months agoagx: Peephole select after opt_preamble
Alyssa Rosenzweig [Thu, 29 Dec 2022 23:04:40 +0000 (18:04 -0500)]
agx: Peephole select after opt_preamble

Reduces control flow in Dolphin uber shaders, which saves us a few cycles.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20597>

18 months agonir/peephole_select: Allow load_preamble
Alyssa Rosenzweig [Tue, 10 Jan 2023 03:10:56 +0000 (22:10 -0500)]
nir/peephole_select: Allow load_preamble

load_preamble is intended to be almost free (costing at most a move), and it
does not have special bounds checking requirement, so it's ok to select with it.
With this, drivers that use nir_opt_preamble together with a late call to
peephole_select can optimize sequences like:

   if (x) {
      <uniform-on-uniform calculation>
   } else {
      <different uniform-on-uniform calculation>
   }

to simply

   bcsel(x, <uniform register 0>, <uniform register 1>)

rather than emitting needless control flow / branching over some moves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20597>

18 months agozink: simplify get_slot_components() for xfb emission
Mike Blumenkrantz [Thu, 12 Jan 2023 17:59:58 +0000 (12:59 -0500)]
zink: simplify get_slot_components() for xfb emission

multiplying by the array size is always wrong for this case, and not
doing so allows for some simplification and better inlining, though
the output results are identical

the one corner case is clip/cull distance, which need special handling
since they're arrays with vec semantics

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

18 months agonir/lower_bool: ntt: Generate a good opcode for bcsel
Pavel Ondračka [Thu, 24 Nov 2022 08:24:35 +0000 (09:24 +0100)]
nir/lower_bool: ntt: Generate a good opcode for bcsel

This is heavily copy-pasted from a patch of Ian Romanick, including the
commit message.

Previously, this pass always generated fcsel for bcsel.  This was the
only place that generate fcsel, so various drivers assumed (and needed!)
that src0 was a Boolean with 0.0 or 1.0 as the only values.

Specifically, many DX9 / GL_ARB_vertex_program platforms lack a CMP
instruction in vertex shaders.  In those cases, they would use LRP to
implement fcsel.  The bummer is that many plaforms have a real fcsel
instruction, and those platforms would benefit from other places
generating that opcode.

Instead of leaving assumptions in drivers about the sources of an opcode
that they can't really support, allow them to control the way the
lowering pass translates bcsel.  Two flags are used to control this:

- If the driver sets has_fused_comp_and_csel in nir_options, fcsel_gt
  will be used.  Since the Boolean value is 0.0 or 1.0, this is
  equivalent to fcsel.

- If the parameter has_fcsel_ne is set, fcsel will be used.  This is the
  old path.

- Otherwise, the lowering pass assumes we're on a crufty, old DX9 vertex
  program, and it emits flrp.

With this, the assumptions about src0 of fcsel in NTT can be removed.
If a platform can't handle fcsel, it should ensure that the lowering
pass won't generate it.

No change in shader-db.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20162>

18 months agoi915: Enable generation of fcsel_gt and fcsel_ge opcodes
Ian Romanick [Wed, 15 Jun 2022 05:05:21 +0000 (22:05 -0700)]
i915: Enable generation of fcsel_gt and fcsel_ge opcodes

DX9 PS 1.x / GL_ARB_fragment_program shaders that have been converted to
GLSL are littered with patterns like

    ps_r1.x = ((ps_t0.y >= 0.0) ? ps_r1.x : ps_c1.y);

This is because CMP is a fundamental opcode in those earlier shading
languages.  i915 supports this opcode natively, but there's no way to
get it directly into the backend.  Instead, NIR and NTT generate some
combination of fcsel and sge and hope for the best.

i915
total instructions in shared programs: 49032 -> 48897 (-0.28%)
instructions in affected programs: 4173 -> 4038 (-3.24%)
helped: 39
HURT: 0

total temps in shared programs: 2795 -> 2790 (-0.18%)
temps in affected programs: 22 -> 17 (-22.73%)
helped: 5
HURT: 0

total const in shared programs: 4976 -> 4967 (-0.18%)
const in affected programs: 203 -> 194 (-4.43%)
helped: 9
HURT: 0

GAINED: shaders/trine/fp-13.shader_test FS

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20162>

18 months agor300: Enable generation of fcsel_gt and fcsel_ge opcodes
Ian Romanick [Tue, 21 Jun 2022 21:54:29 +0000 (14:54 -0700)]
r300: Enable generation of fcsel_gt and fcsel_ge opcodes

RV530:
total instructions in shared programs: 135032 -> 134833 (-0.15%)
instructions in affected programs: 15654 -> 15455 (-1.27%)
helped: 133
HURT: 13

total temps in shared programs: 17051 -> 17045 (-0.04%)
temps in affected programs: 202 -> 196 (-2.97%)
helped: 11
HURT: 5

RV370:
total instructions in shared programs: 84439 -> 84378 (-0.07%)
instructions in affected programs: 2519 -> 2458 (-2.42%)
helped: 49
HURT: 7

total temps in shared programs: 12399 -> 12380 (-0.15%)
temps in affected programs: 322 -> 303 (-5.90%)
helped: 20
HURT: 10

GAINED: shaders/godot3.4/22-69.shader_test FS

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20162>

18 months agonir/lower_int_to_float: Add support for i32csel opcodes
Ian Romanick [Wed, 15 Jun 2022 04:50:14 +0000 (21:50 -0700)]
nir/lower_int_to_float: Add support for i32csel opcodes

These lower naturally to the corresponding fcsel opcodes.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20162>

18 months agontt: Add support for fcsel_gt and fcsel_ge opcodes
Ian Romanick [Wed, 15 Jun 2022 04:57:43 +0000 (21:57 -0700)]
ntt: Add support for fcsel_gt and fcsel_ge opcodes

These match the TGSI CMP opcode very nicely.  Every driver that uses NTT
for its fragment shader path should be able to enable these opcodes now.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20162>

18 months agodocs: reset new_features.txt
Dylan Baker [Thu, 12 Jan 2023 19:06:07 +0000 (11:06 -0800)]
docs: reset new_features.txt

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

18 months agoVERSION: bump to 23.1.0-devel for further development
Dylan Baker [Thu, 12 Jan 2023 19:04:51 +0000 (11:04 -0800)]
VERSION: bump to 23.1.0-devel for further development

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

18 months agointel/genxml: Drop CACHE_MODE_SS definition.
Kenneth Graunke [Tue, 10 Jan 2023 22:02:06 +0000 (14:02 -0800)]
intel/genxml: Drop CACHE_MODE_SS definition.

This is a global register which isn't settable by userspace contexts.
It also shouldn't appear in any of our aubinator decodes from error
states or aub dumps, as no userspace batch should be setting it.

So it's not very valuable to have here.  Just makes us think we can
set it.  Plus, a lot of the field definitions changed a bunch, and
would need updating.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20627>

18 months agoradv: Fix deadlock in radv_rmv_log_event_create
Konstantin Seurer [Wed, 11 Jan 2023 09:45:53 +0000 (10:45 +0100)]
radv: Fix deadlock in radv_rmv_log_event_create

Fixes: 8d0e6c0 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20636>

18 months agodzn: Declare debug only root_dwords as ASSERTED
GH Cao [Thu, 12 Jan 2023 17:20:25 +0000 (01:20 +0800)]
dzn: Declare debug only root_dwords as ASSERTED

Such variable is only used in assert(), so declare it as ASSERTED.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7885
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7234

Signed-off-by: GH Cao <driver1998.ms@outlook.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20676>

18 months agoanv: Add a tracepoint for the fallback implicit sync wait path.
Emma Anholt [Tue, 10 Jan 2023 19:01:16 +0000 (11:01 -0800)]
anv: Add a tracepoint for the fallback implicit sync wait path.

If you're here, you'd really like to know.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20658>

18 months agoperfetto: Add the intel data sources to system.cfg.
Emma Anholt [Tue, 10 Jan 2023 18:34:41 +0000 (10:34 -0800)]
perfetto: Add the intel data sources to system.cfg.

Now I don't need to remember different perfetto setups depending on which
system I'm profiling.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20658>

18 months agodocs/perfetto: Fix the name of the i915 render stages data sources.
Emma Anholt [Tue, 10 Jan 2023 18:36:46 +0000 (10:36 -0800)]
docs/perfetto: Fix the name of the i915 render stages data sources.

Fixes: ef27399bca95 ("docs: update perfetto with the latest status")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20658>

18 months agoci: build hasvk if we're building anv
Adam Jackson [Thu, 27 Oct 2022 18:38:14 +0000 (14:38 -0400)]
ci: build hasvk if we're building anv

!19355 should never have happened, but we didn't bother to add build
coverage for hasvk when we split it out from anv.

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

18 months agovulkan/rmv: Only trace on the n-th frame
Konstantin Seurer [Wed, 11 Jan 2023 08:39:00 +0000 (09:39 +0100)]
vulkan/rmv: Only trace on the n-th frame

This makes it stop dumping on every n-th frame. It also uses a simple
increment, since the function is locked.

Fixes: defed48 ("vulkan: Add common RMV tracing infrastructure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20635>

18 months agoradv/rmv: Capture names of pipelines but not command buffers
Friedrich Vock [Wed, 11 Jan 2023 18:41:58 +0000 (19:41 +0100)]
radv/rmv: Capture names of pipelines but not command buffers

For command buffers, only scratch/upload bos are logged which cannot be attributed to command buffer handles.

Fixes: 5611ab25 ("radv: Add RMV tracing layer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20647>

18 months agoradv/rmv: Fix resource ids for name tokens
Friedrich Vock [Wed, 11 Jan 2023 17:19:19 +0000 (18:19 +0100)]
radv/rmv: Fix resource ids for name tokens

Fixes: 5611ab25 ("radv: Add RMV tracing layer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20647>

18 months agohud: fix values printing
Pierre-Eric Pelloux-Prayer [Wed, 11 Jan 2023 14:02:12 +0000 (15:02 +0100)]
hud: fix values printing

Oops...

Fixes: 595079c37cc ("hud: extract float printf modifer selection logic to helper")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20643>

18 months agoutil: add a return value to util_sprintf
Pierre-Eric Pelloux-Prayer [Thu, 12 Jan 2023 08:08:45 +0000 (09:08 +0100)]
util: add a return value to util_sprintf

The regular sprintf is expected to return the number of char writter,
so let's do the same in our version.

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

18 months agonv30: add nv49 results
Filip Gawin [Sat, 12 Nov 2022 12:27:13 +0000 (13:27 +0100)]
nv30: add nv49 results

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19696>

18 months agor300: don't cache abs in fragment shader
Filip Gawin [Tue, 10 Jan 2023 21:51:30 +0000 (22:51 +0100)]
r300: don't cache abs in fragment shader

Currently this ends up with unneeded move.

fixes: 63f353b45605379b8b81754543907a6b0fc3afdd

Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20625>

18 months agozink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier
Simon Ser [Tue, 20 Dec 2022 14:38:57 +0000 (15:38 +0100)]
zink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier

Some format modifiers change the number of planes used by an image.
For instance AMD DCC modifiers uses 2 or 3 planes. However the
format modifier was ignored in the PIPE_RESOURCE_PARAM_NPLANES
get_param hook.

Fix this by using get_dmabuf_modifier_planes() instead of
util_format_get_num_planes().

This fixes wlroots-based compositors under zink.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: c025cb9ee9d7 ("zink: fix dmabuf plane returns")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20395>

18 months agogen_release_notes: include links in relnotes.rst when generating the new release...
Eric Engestrom [Thu, 29 Dec 2022 23:46:51 +0000 (23:46 +0000)]
gen_release_notes: include links in relnotes.rst when generating the new release note

This is required to allow the docs to build, which in turn is required
if we want to allow merge requests against release (staging) branches.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20460>

18 months agogen_release_notes: allow using the script from another checkout
Eric Engestrom [Thu, 29 Dec 2022 23:39:48 +0000 (23:39 +0000)]
gen_release_notes: allow using the script from another checkout

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

18 months agogen_release_notes: avoid crashing when none of the commits mention closing an issue
Eric Engestrom [Fri, 30 Dec 2022 00:14:34 +0000 (00:14 +0000)]
gen_release_notes: avoid crashing when none of the commits mention closing an issue

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

18 months agogen_release_notes: stop the script if we can't generate the release note
Eric Engestrom [Thu, 29 Dec 2022 23:44:27 +0000 (23:44 +0000)]
gen_release_notes: stop the script if we can't generate the release note

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

18 months agofrontends/va/postproc: yuv422 to nv12
Thong Thai [Tue, 22 Nov 2022 00:13:35 +0000 (19:13 -0500)]
frontends/va/postproc: yuv422 to nv12

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tested-by: Suresh Guttula <suresh.guttula@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19915>

18 months agogallium/auxiliary/vl: compute shaders for progressive yuv
Thong Thai [Tue, 22 Nov 2022 00:11:09 +0000 (19:11 -0500)]
gallium/auxiliary/vl: compute shaders for progressive yuv

v2: Add a one line offset to the compute shader, to get the
correct output, as suggested by Suresh <Suresh.Guttula@amd.com>.
v3: Add `FALLTHROUGH` to fix a compilation error

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tested-by: Suresh Guttula <suresh.guttula@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19915>

18 months agofrontends/va/postproc: default to weave when deinterlacing
Thong Thai [Fri, 25 Nov 2022 22:38:53 +0000 (17:38 -0500)]
frontends/va/postproc: default to weave when deinterlacing

Signed-off-by: Thong Thai <thong.thai@amd.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19915>

18 months agogallium/auxiliary/vl: fix scale and translate parameters
Thong Thai [Tue, 22 Nov 2022 00:21:30 +0000 (19:21 -0500)]
gallium/auxiliary/vl: fix scale and translate parameters

Fixes the scale and translate portion of the code to allow for
scale and crop to work properly.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19915>

18 months agodocs: utilities: Update list of development utilities
Corentin Noël [Mon, 2 Jan 2023 11:42:42 +0000 (12:42 +0100)]
docs: utilities: Update list of development utilities

Explicitly mention supported APIs and add GFXReconstruct for
Vulkan tracing and debugging.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20474>

18 months agodocs: debugging: Fix path to dlist.c
Corentin Noël [Mon, 2 Jan 2023 11:41:50 +0000 (12:41 +0100)]
docs: debugging: Fix path to dlist.c

This file has now long being moved to another directory.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20474>

18 months agoradv/gfx11: increase radeon_check_space for occlusion query begin
Rhys Perry [Wed, 11 Jan 2023 20:03:08 +0000 (20:03 +0000)]
radv/gfx11: increase radeon_check_space for occlusion query begin

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

18 months agodri: Free the already allocated optionCache and optionInfo on failure
Corentin Noël [Thu, 12 Jan 2023 09:35:21 +0000 (10:35 +0100)]
dri: Free the already allocated optionCache and optionInfo on failure

These fields are allocated as they have to be taken into account for initScreen.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20663>

18 months agodri: Do not free the given screen in initScreen implementation
Corentin Noël [Thu, 12 Jan 2023 09:04:37 +0000 (10:04 +0100)]
dri: Do not free the given screen in initScreen implementation

The given screen is already freed by the caller in case a NULL-pointer is
returned by the implementation.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20663>

18 months agogbm: Avoid leaks on screen creation failures
Corentin Noël [Thu, 12 Jan 2023 10:26:04 +0000 (11:26 +0100)]
gbm: Avoid leaks on screen creation failures

Some of the code paths were not freeing the allocated strings,
also remove the unused ret variable as we are always returning -1 on failure.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20667>

18 months agolima/ci: add deqp-egl run to the deqp suite
Erico Nunes [Sat, 17 Dec 2022 11:00:46 +0000 (12:00 +0100)]
lima/ci: add deqp-egl run to the deqp suite

Both wayland and X backends are covered by headless weston, with
X enabled through weston Xwayland.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20392>

18 months agolima/ci: change lima jobs to use deqp-runner suite
Erico Nunes [Sat, 17 Dec 2022 10:59:56 +0000 (11:59 +0100)]
lima/ci: change lima jobs to use deqp-runner suite

Align it with the state of other drivers' ci and make it
easier to enable more tests later.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20392>

18 months agor600: Request that state validation is emitted for all changed states
Gert Wollny [Tue, 3 Jan 2023 16:07:28 +0000 (17:07 +0100)]
r600: Request that state validation is emitted for all changed states

Restricting the state change only to newly used states results in problems,
because SSBOs, Images, and the framebuffers make use of the same limited
set of resources, and not properly unbinding un-used resoureces leads to
invalid rendering and GPU hangs.

Fixes: aaa4b0e6
   st/mesa: move check_program_state code into _mesa_update_state

v2: use new cap name and switched meaning

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

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

18 months agogallium: Add cap to request state validation for all dirty state
Gert Wollny [Tue, 3 Jan 2023 16:04:19 +0000 (17:04 +0100)]
gallium: Add cap to request state validation for all dirty state

With aaa4b0e6 state validation is no longer called for all changed states,
but only for states that will be active with a new shader program.
Not all drivers support this and might prefer if the state validation
is emitted for all states that might be changed. So add a cap that the
driver can signal one or the other preference, and default to the new
behavior.

Fixes: aaa4b0e6
   st/mesa: move check_program_state code into _mesa_update_state

v2: - Rename cap and and invert its meaning, query the cap
      only once and store it in st, handle the mask update
      when updating the shader i.e. not in st_validate_state (Marek)

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

18 months agodocs: move note on other drivers to the bottom
Erik Faye-Lund [Wed, 11 Jan 2023 14:50:08 +0000 (15:50 +0100)]
docs: move note on other drivers to the bottom

This was always meant to be at the bottom of the page. To reduce the
risk of more driver-specific environment variables being added below,
let's add a horizontal rule to mark the difference. This should make it
more clear that this paragraph doesn't belong to the previous heading.

Fixes: c70c5ecd2e7 ("docs: move generic gallium envvars to root doc")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20644>

18 months agoac/nir/ngg: implement 16bit output streamout
Qiang Yu [Fri, 16 Dec 2022 06:12:12 +0000 (14:12 +0800)]
ac/nir/ngg: implement 16bit output streamout

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20350>

18 months agoac/nir/ngg: refine nogs outputs handling
Qiang Yu [Thu, 8 Dec 2022 10:22:24 +0000 (18:22 +0800)]
ac/nir/ngg: refine nogs outputs handling

Gather outputs in advance to save both output data and type. Output data
is used for streamout and gfx11 param export. Output type is used for
streamout latter.

The output info will also be used for nir vertex export in the future.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Singed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20350>

18 months agoac/nir/ngg: fix gs 16bit output uninitialized channel when gfx11
Qiang Yu [Fri, 9 Dec 2022 10:05:15 +0000 (18:05 +0800)]
ac/nir/ngg: fix gs 16bit output uninitialized channel when gfx11

Fixes: abe2e99e9e5 ("ac/nir/ngg: gs support 16bit outputs")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20350>

18 months agoac/nir/ngg: fix gs store output for no param offset slot when gfx11
Qiang Yu [Fri, 9 Dec 2022 09:42:31 +0000 (17:42 +0800)]
ac/nir/ngg: fix gs store output for no param offset slot when gfx11

When slot has no param offset, we should not emit store output for
them on gfx11.

Fixes: abe2e99e9e5 ("ac/nir/ngg: gs support 16bit outputs")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20350>

18 months agoac/nir/ngg: always reset output when gs emit vertex
Qiang Yu [Fri, 9 Dec 2022 06:44:21 +0000 (14:44 +0800)]
ac/nir/ngg: always reset output when gs emit vertex

Follow the spec, all outputs even not this stream need to be
reset after emit vertex.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20350>