platform/upstream/mesa.git
18 months agozink: add a workaround for a nir_assign_io_var_locations bug
Mike Blumenkrantz [Fri, 7 Apr 2023 12:12:42 +0000 (08:12 -0400)]
zink: add a workaround for a nir_assign_io_var_locations bug

drivers that use nir_assign_io_var_locations() with EXT_shader_object all
have the same bug with a shader interface that looks like this:

shader output block:
* PSIZ
* VAR0
* VAR8

shader input block:
* VAR0
* VAR8

in this case, output driver locations will be assigned like:
* PSIZ=0
* VAR0=1
* VAR8=2

and input driver locations will be:
* VAR0=0
* VAR8=1

which breaks the shaders even though this is a totally legitimate thing
to do

thus, a second set of shaders have to be created without PSIZ to work around
the bug since I've already spent 18+ hours trying to fix it and have only succeeded
in breaking every driver that uses it

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

18 months agoanv: Improve image/view usage bits verification
Sviatoslav Peleshko [Wed, 8 Feb 2023 08:50:21 +0000 (10:50 +0200)]
anv: Improve image/view usage bits verification

This change makes usage bits verification closer to the Vulkan spec.
i.e. VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT does not always require all formats
to support all the requested usage bits.
Also, VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, when combined with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT can relax the requirements for the
usage supported by the original image format.

v2: Removed strict verification of the format_list_info formats usage
    per chadversary's suggestion. Other minor style/comments tweaks.

v3: Added checking of all compatible formats when
    VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
    are specified, but no list of possible formats was given.

v4: Add VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT handling.

Cc: 22.2 <mesa-stable>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6031
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>

18 months agoanv: Handle UNDEFINED format in image format list
Sviatoslav Peleshko [Wed, 8 Feb 2023 08:48:40 +0000 (10:48 +0200)]
anv: Handle UNDEFINED format in image format list

It's not invalid to have this value in the list, but the only case it
is actually valid as format in the creation of an image or image view
is with Android Hardware Buffers which have their format specified
externally.

So we can just ignore all entries with VK_FORMAT_UNDEFINED.

Cc: 22.2 <mesa-stable>
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>

18 months agoisl: Check all channels in isl_formats_have_same_bits_per_channel
Sviatoslav Peleshko [Wed, 10 Aug 2022 13:20:48 +0000 (16:20 +0300)]
isl: Check all channels in isl_formats_have_same_bits_per_channel

Cc: 22.2 <mesa-stable>
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>

18 months agor600: remove TGSI code path
Gert Wollny [Fri, 24 Feb 2023 11:32:56 +0000 (12:32 +0100)]
r600: remove TGSI code path

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7780
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7342

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

18 months agoglx: fix typos
Harri Nieminen [Mon, 24 Apr 2023 11:32:29 +0000 (14:32 +0300)]
glx: fix typos

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

18 months agoegl: fix typos
Harri Nieminen [Mon, 24 Apr 2023 11:24:02 +0000 (14:24 +0300)]
egl: fix typos

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

18 months agodocs: use custom html theme
Erik Faye-Lund [Thu, 21 Jan 2021 14:11:24 +0000 (15:11 +0100)]
docs: use custom html theme

This uses the new custom HTML theme for Sphinx, so our documentation
looks similar to our website.

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

18 months agodocs: remove support for old sphinx-versions
Erik Faye-Lund [Tue, 25 Apr 2023 06:46:07 +0000 (08:46 +0200)]
docs: remove support for old sphinx-versions

We're not using them, so no point in keeping support around.

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

18 months agodocs: translate admonitions into bootstrap alerts
Erik Faye-Lund [Fri, 17 Mar 2023 14:02:46 +0000 (15:02 +0100)]
docs: translate admonitions into bootstrap alerts

Sphinx and Bootstraps disagree on what these are called. Let's try to
bridge that gap, by rewriting things a bit.

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

18 months agodocs: add bootstrap extension
Erik Faye-Lund [Wed, 6 Jan 2021 13:00:52 +0000 (14:00 +0100)]
docs: add bootstrap extension

To get Sphinx and Bootstrap to work well together, we need to massage
the output from Sphinx a bit. This adds an extension to do such changes,
based on work from here:

https://github.com/pydata/pydata-sphinx-theme

...However, because we don't ship as an external theme, we can't just do
things as a part of __init__.py, so instead we register an extension
that does the heavy lifting for us.

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

18 months agodocs: add custom html theme
Erik Faye-Lund [Wed, 6 Jan 2021 13:00:52 +0000 (14:00 +0100)]
docs: add custom html theme

This custom theme will make the docs look more like the main website,
which makes it slightly less confusing to navigate around when crossing
between the two.

The icon link.svg is from Feathericons:
https://feathericons.com/?query=link

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

18 months agodocs: sort extensions
Erik Faye-Lund [Fri, 10 Mar 2023 15:06:55 +0000 (16:06 +0100)]
docs: sort extensions

It's easier to keep this sorted if we have each element on a separate
line. Let's do that for long-term ease of maintainability.

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

18 months agofrontend/nine: Fix num_textures count
Axel Davy [Sun, 23 Apr 2023 11:49:36 +0000 (13:49 +0200)]
frontend/nine: Fix num_textures count

util_last_bit already included the +1

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865?commit_id=9205a45da50ebc6159169ba42b02d8475b09bfd7
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8894

cc: mesa-stable

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22645>

18 months agozink: reapply VkImageViewUsageCreateInfo when rebinding a surface
Mike Blumenkrantz [Wed, 26 Apr 2023 13:52:56 +0000 (09:52 -0400)]
zink: reapply VkImageViewUsageCreateInfo when rebinding a surface

attachment bits must always be removed if they are not supported

fixes (ANV):
KHR-GL46.texture_view.view_classes

cc: mesa-stable

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

18 months agozink: break out VkImageViewUsageCreateInfo applying for reuse
Mike Blumenkrantz [Wed, 26 Apr 2023 13:52:23 +0000 (09:52 -0400)]
zink: break out VkImageViewUsageCreateInfo applying for reuse

no functional changes

cc: mesa-stable

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

18 months agocrocus: fix refcnt imbalance related to framebuffer
Patrick Lerda [Wed, 15 Mar 2023 12:21:05 +0000 (13:21 +0100)]
crocus: fix refcnt imbalance related to framebuffer

Indeed, the hardcoded framebuffer cleanup doesn't handle "resolve".

For instance, this issue is triggered with "piglit/bin/glx-copy-sub-buffer -samples=2 -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: f5bde99cbdd2 ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22554>

18 months agorusticl/program: use if let to get rid of an unwrap in build
Karol Herbst [Wed, 26 Apr 2023 10:39:45 +0000 (12:39 +0200)]
rusticl/program: use if let to get rid of an unwrap in build

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22434>

18 months agorusticl/program: rework dynamic Program state
Karol Herbst [Wed, 26 Apr 2023 10:39:39 +0000 (12:39 +0200)]
rusticl/program: rework dynamic Program state

We had a lot of implicit locks going on even though there was strictly no
need in doing so. This makes the compilation APIs more atomic while also
providing a cleaner interface.

Not in the mood of splitting it up without deadlocking in the middle. So
it's one big commit sadly.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22434>

18 months agorusticl: Move nir compilation to Program
Antonio Gomes [Mon, 10 Apr 2023 23:57:07 +0000 (20:57 -0300)]
rusticl: Move nir compilation to Program

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

18 months agozink: prune some validation errors from ci
Mike Blumenkrantz [Wed, 26 Apr 2023 14:22:36 +0000 (10:22 -0400)]
zink: prune some validation errors from ci

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

18 months agopan/bi: Don't set has_fsub
Alyssa Rosenzweig [Tue, 25 Apr 2023 14:12:00 +0000 (10:12 -0400)]
pan/bi: Don't set has_fsub

All this option controls is fusing fadd(x, fneg(y)) into a single instruction,
but our modifier propagation can already do that without the special cases.

shader-db changes are mostly noise.

total instructions in shared programs: 2698039 -> 2697812 (<.01%)
instructions in affected programs: 156742 -> 156515 (-0.14%)
helped: 280
HURT: 109
helped stats (abs) min: 1.0 max: 12.0 x̄: 1.69 x̃: 1
helped stats (rel) min: 0.08% max: 10.71% x̄: 0.65% x̃: 0.32%
HURT stats (abs)   min: 1.0 max: 8.0 x̄: 2.26 x̃: 2
HURT stats (rel)   min: 0.15% max: 5.77% x̄: 2.08% x̃: 2.22%
95% mean confidence interval for instructions value: -0.80 -0.36
95% mean confidence interval for instructions %-change: -0.05% 0.28%
Inconclusive result (%-change mean confidence interval includes 0).

total cycles in shared programs: 143679.94 -> 143676.33 (<.01%)
cycles in affected programs: 617.98 -> 614.38 (-0.58%)
helped: 148
HURT: 3
helped stats (abs) min: 0.015625 max: 0.1875 x̄: 0.02 x̃: 0
helped stats (rel) min: 0.17% max: 3.33% x̄: 0.71% x̃: 0.57%
HURT stats (abs)   min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.66% max: 2.27% x̄: 1.46% x̃: 1.45%
95% mean confidence interval for cycles value: -0.03 -0.02
95% mean confidence interval for cycles %-change: -0.77% -0.56%
Cycles are helped.

total fma in shared programs: 22102.44 -> 22098.33 (-0.02%)
fma in affected programs: 395.98 -> 391.88 (-1.04%)
helped: 123
HURT: 3
helped stats (abs) min: 0.015625 max: 0.1875 x̄: 0.03 x̃: 0
helped stats (rel) min: 0.43% max: 18.75% x̄: 1.81% x̃: 0.89%
HURT stats (abs)   min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.66% max: 4.17% x̄: 2.09% x̃: 1.45%
95% mean confidence interval for fma value: -0.04 -0.03
95% mean confidence interval for fma %-change: -2.17% -1.27%
Fma are helped.

total cvt in shared programs: 14735.23 -> 14735.80 (<.01%)
cvt in affected programs: 969.64 -> 970.20 (0.06%)
helped: 179
HURT: 121
helped stats (abs) min: 0.015625 max: 0.09375 x̄: 0.02 x̃: 0
helped stats (rel) min: 0.17% max: 46.15% x̄: 1.13% x̃: 0.31%
HURT stats (abs)   min: 0.015625 max: 0.125 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.42% max: 28.57% x̄: 6.62% x̃: 6.25%
95% mean confidence interval for cvt value: -0.00 0.01
95% mean confidence interval for cvt %-change: 1.32% 2.68%
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 1460952 -> 1460680 (-0.02%)
quadwords in affected programs: 10216 -> 9944 (-2.66%)
helped: 39
HURT: 5
helped stats (abs) min: 8.0 max: 8.0 x̄: 8.00 x̃: 8
helped stats (rel) min: 0.97% max: 11.11% x̄: 4.53% x̃: 3.45%
HURT stats (abs)   min: 8.0 max: 8.0 x̄: 8.00 x̃: 8
HURT stats (rel)   min: 12.50% max: 25.00% x̄: 15.71% x̃: 14.29%
95% mean confidence interval for quadwords value: -7.74 -4.62
95% mean confidence interval for quadwords %-change: -4.43% -0.04%
Quadwords are helped.

total threads in shared programs: 53538 -> 53537 (<.01%)
threads in affected programs: 2 -> 1 (-50.00%)
helped: 0
HURT: 1

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

18 months agodocs: add missing ACO_DEBUG=force-waitdeps
Samuel Pitoiset [Tue, 25 Apr 2023 14:54:45 +0000 (16:54 +0200)]
docs: add missing ACO_DEBUG=force-waitdeps

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

18 months agodocs: rename ACO_DEBUG=noscheduling to ACO_DEBUG=nosched
Samuel Pitoiset [Tue, 25 Apr 2023 14:52:06 +0000 (16:52 +0200)]
docs: rename ACO_DEBUG=noscheduling to ACO_DEBUG=nosched

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

18 months agoegl: Clear EGL_WINDOW_BIT for non-double-buffered EGLConfigs
Adam Jackson [Thu, 10 Sep 2020 21:55:50 +0000 (17:55 -0400)]
egl: Clear EGL_WINDOW_BIT for non-double-buffered EGLConfigs

EGL windows are not required to support single-buffered rendering,
and it's awful, so let's not.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22685>

18 months agoradv: reserve command buffer index for SQTT
Samuel Pitoiset [Mon, 24 Apr 2023 15:33:41 +0000 (17:33 +0200)]
radv: reserve command buffer index for SQTT

These indexes are used to match command buffers with queue events.

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

18 months agoac/sqtt: add a helper to get cmdbuf IDs per queue
Samuel Pitoiset [Mon, 24 Apr 2023 15:15:15 +0000 (17:15 +0200)]
ac/sqtt: add a helper to get cmdbuf IDs per queue

These will be used by RADV to implement queue event timings.

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

18 months agoac/sqtt: add rgp_sqtt_marker_cb_id definition
Samuel Pitoiset [Mon, 24 Apr 2023 14:42:56 +0000 (16:42 +0200)]
ac/sqtt: add rgp_sqtt_marker_cb_id definition

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

18 months agoaco: don't move exec reads around exec writes
Rhys Perry [Fri, 11 Feb 2022 19:19:45 +0000 (19:19 +0000)]
aco: don't move exec reads around exec writes

Fixes flickering and blocky plants in Jedi: Fallen Order.

Also fixes flickering squares in The Last of Us Part 1.

fossil-db (navi21):
Totals from 92 (0.07% of 135636) affected shaders:
Instrs: 35324 -> 35354 (+0.08%); split: -0.03%, +0.11%
CodeSize: 189568 -> 189668 (+0.05%); split: -0.03%, +0.08%
Latency: 345305 -> 346529 (+0.35%); split: -0.02%, +0.37%
InvThroughput: 78632 -> 78625 (-0.01%)
SClause: 1955 -> 1972 (+0.87%); split: -0.61%, +1.48%
Copies: 1311 -> 1304 (-0.53%); split: -0.69%, +0.15%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8883
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8878
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22696>

18 months agobump VVL to 1.3.248
Mike Blumenkrantz [Mon, 24 Apr 2023 20:07:30 +0000 (16:07 -0400)]
bump VVL to 1.3.248

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22672>

18 months agointel/tools: add ability to dump out raw kernels data
Lionel Landwerlin [Wed, 26 Apr 2023 08:14:25 +0000 (11:14 +0300)]
intel/tools: add ability to dump out raw kernels data

Useful for debug.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22703>

18 months agor300: add CI list of known rv370 dEQP failures
Pavel Ondračka [Wed, 26 Apr 2023 09:05:19 +0000 (11:05 +0200)]
r300: add CI list of known rv370 dEQP failures

We don't have CI, but its still convenient for local testing.

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

18 months agor300: fix unconditional KIL on R300/R400
Pavel Ondračka [Wed, 26 Apr 2023 08:18:20 +0000 (10:18 +0200)]
r300: fix unconditional KIL on R300/R400

  0: KIL -none.1111

Negate is not allowed for texturing opcodes, so the incorrect swizzle
was detected, however later optimization, where we try to rewrite incorrect
swizzles from constant (immediate) registers by adding a new ones with
correct order was interfering and not handling this correctly, so we
ended with

CONST[0] = {    -1.0000    -1.0000    -1.0000    -1.0000 }
  0: KIL const[0].xyz-w;

Even if it would get the swizzle right, texturing opcodes can't read from
constant registers, so just skip it and let this be handled by a later
part which inserts an extra mov instead.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Fixes: a8e1e5b5c2aeb7c2fb4eff2203a026090f0853b9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22704>

18 months agoradv/ci: document another vkcts flake on vega10
Martin Roukala (né Peres) [Wed, 26 Apr 2023 07:18:36 +0000 (10:18 +0300)]
radv/ci: document another vkcts flake on vega10

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22702>

18 months agodocs: correct spelling of "frame"
Erik Faye-Lund [Tue, 4 Apr 2023 12:02:42 +0000 (14:02 +0200)]
docs: correct spelling of "frame"

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

18 months agodocs: correct spelling of "tagged"
Erik Faye-Lund [Tue, 4 Apr 2023 12:02:15 +0000 (14:02 +0200)]
docs: correct spelling of "tagged"

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

18 months agodocs: correct spelling of "source"
Erik Faye-Lund [Tue, 4 Apr 2023 11:59:57 +0000 (13:59 +0200)]
docs: correct spelling of "source"

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

18 months agodocs: toplevel -> top-level
Erik Faye-Lund [Tue, 4 Apr 2023 11:59:05 +0000 (13:59 +0200)]
docs: toplevel -> top-level

This is how we spell it elsewhere.

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

18 months agodocs: vlan -> VLAN
Erik Faye-Lund [Tue, 4 Apr 2023 11:55:47 +0000 (13:55 +0200)]
docs: vlan -> VLAN

VLAN is an abbreviation, so let's spell it in all-caps for clarity.

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

18 months agodocs: use correct tick for "doesn't"
Erik Faye-Lund [Mon, 9 Jan 2023 08:32:10 +0000 (09:32 +0100)]
docs: use correct tick for "doesn't"

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

18 months agodocs: perfetto -> Perfetto
Erik Faye-Lund [Mon, 9 Jan 2023 08:31:01 +0000 (09:31 +0100)]
docs: perfetto -> Perfetto

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

18 months agodocs: Anv -> ANV
Erik Faye-Lund [Mon, 9 Jan 2023 08:29:33 +0000 (09:29 +0100)]
docs: Anv -> ANV

We're usually spelling ANV in allcaps, so let's do that here as well.

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

18 months agodocs: cma -> CMA
Erik Faye-Lund [Mon, 9 Jan 2023 08:23:47 +0000 (09:23 +0100)]
docs: cma -> CMA

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

18 months agodocs: did't -> didn't
Erik Faye-Lund [Mon, 9 Jan 2023 07:01:55 +0000 (08:01 +0100)]
docs: did't -> didn't

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

18 months agodocs: codepath -> code-path
Erik Faye-Lund [Mon, 9 Jan 2023 06:57:39 +0000 (07:57 +0100)]
docs: codepath -> code-path

This is consistent with how we spell this elsewhere in the docs.

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

18 months agodocs: backfacing -> back-facing
Erik Faye-Lund [Mon, 9 Jan 2023 06:55:42 +0000 (07:55 +0100)]
docs: backfacing -> back-facing

This is consistent with how the OpenGL spec spells it.

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

18 months agodocs: statechanges -> state changes
Erik Faye-Lund [Mon, 9 Jan 2023 06:54:07 +0000 (07:54 +0100)]
docs: statechanges -> state changes

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

18 months agodocs: renderpass -> render pass
Erik Faye-Lund [Mon, 9 Jan 2023 06:52:15 +0000 (07:52 +0100)]
docs: renderpass -> render pass

The Vulkan spec spells render pass in two words, so let's do the same.

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

18 months agoglsl: remove ir_state_slot::swizzle
Erik Faye-Lund [Tue, 25 Apr 2023 17:44:38 +0000 (19:44 +0200)]
glsl: remove ir_state_slot::swizzle

Same story as with the NIR counterpart in the previous commit.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22620>

18 months agonir: remove nir_state_slot::swizzle
Erik Faye-Lund [Fri, 21 Apr 2023 07:39:18 +0000 (09:39 +0200)]
nir: remove nir_state_slot::swizzle

This is only ever written to, never read from. Let's just get rid of it!

This also saves us a few needless includes.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22620>

18 months agozink: use EXT_shader_object to implement generic separate shader precompile
Mike Blumenkrantz [Fri, 31 Mar 2023 21:23:34 +0000 (17:23 -0400)]
zink: use EXT_shader_object to implement generic separate shader precompile

this adds precompile for all separate shader stages (+tcs,tes,geom)
using separate shaders, which should eliminate stuttering for games
using it (e.g., Tomb Raider)

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

18 months agozink: fix longstanding TODO for generated tcs
Mike Blumenkrantz [Thu, 6 Apr 2023 19:00:46 +0000 (15:00 -0400)]
zink: fix longstanding TODO for generated tcs

with dynamic pcp this doesn't matter, and this should only be reached
in async mode if dynamic pcp is available

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

18 months agozink: handle all stages in fixup_io_locations()
Mike Blumenkrantz [Thu, 6 Apr 2023 17:49:51 +0000 (13:49 -0400)]
zink: handle all stages in fixup_io_locations()

this makes the handling a bit more complex, as both input and output
need to be handled for most stages, and also the per-component handling
gets trickier

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

18 months agozink: move separate shader creation to shader CSO creation
Mike Blumenkrantz [Thu, 6 Apr 2023 12:11:29 +0000 (08:11 -0400)]
zink: move separate shader creation to shader CSO creation

this is a more logical place for it and also enables u_blitter
shaders to be fast-linked

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

18 months agozink: use a more standardized loop for initing separate shader program descriptors
Mike Blumenkrantz [Mon, 3 Apr 2023 16:38:08 +0000 (12:38 -0400)]
zink: use a more standardized loop for initing separate shader program descriptors

this should be identical to previous behavior

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

18 months agozink: assign separate shader prog stages from ctx->shader_stages
Mike Blumenkrantz [Mon, 3 Apr 2023 16:26:47 +0000 (12:26 -0400)]
zink: assign separate shader prog stages from ctx->shader_stages

this is functionally equivalent given the checks above which already
restrict which stages can be passed

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

18 months agozink: move some shader CSO functions around
Mike Blumenkrantz [Mon, 3 Apr 2023 16:16:30 +0000 (12:16 -0400)]
zink: move some shader CSO functions around

no functional changes

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

18 months agozink: switch to a regular loop to wait on precompile shader fences
Mike Blumenkrantz [Fri, 31 Mar 2023 21:21:39 +0000 (17:21 -0400)]
zink: switch to a regular loop to wait on precompile shader fences

even if these aren't done yet, it'll still be faster to wait than
to start compiling new pipelines now

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

18 months agozink: streamline separate shader descriptor update
Mike Blumenkrantz [Fri, 31 Mar 2023 21:12:10 +0000 (17:12 -0400)]
zink: streamline separate shader descriptor update

no functional changes

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

18 months agozink: simplify separate shader prog init a little
Mike Blumenkrantz [Fri, 31 Mar 2023 21:12:10 +0000 (17:12 -0400)]
zink: simplify separate shader prog init a little

no functional changes

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

18 months agozink: use intermediate variable for separate shader db resize check
Mike Blumenkrantz [Fri, 31 Mar 2023 21:10:04 +0000 (17:10 -0400)]
zink: use intermediate variable for separate shader db resize check

no functional changes

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

18 months agozink: use intermediate variable for separate shader descriptor update loop
Mike Blumenkrantz [Fri, 31 Mar 2023 21:08:32 +0000 (17:08 -0400)]
zink: use intermediate variable for separate shader descriptor update loop

no functional changes

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

18 months agoaco,radv: remove unused aco compile options
Qiang Yu [Thu, 13 Apr 2023 04:47:47 +0000 (12:47 +0800)]
aco,radv: remove unused aco compile options

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoaco,ac/llvm,radv,radeonsi: handle ps bc optimization in nir for radv
Qiang Yu [Wed, 29 Mar 2023 07:56:21 +0000 (15:56 +0800)]
aco,ac/llvm,radv,radeonsi: handle ps bc optimization in nir for radv

The side effect is removing the aco/llvm backend bc optimization code
and linear/persp_centroid variable.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoac/nir/ps: remove used nir_variable if created
Qiang Yu [Thu, 30 Mar 2023 09:17:07 +0000 (17:17 +0800)]
ac/nir/ps: remove used nir_variable if created

RADV won't do this, so remove them at last.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoradv: implement nir_load_barycentric_optimize_amd
Qiang Yu [Wed, 29 Mar 2023 07:28:28 +0000 (15:28 +0800)]
radv: implement nir_load_barycentric_optimize_amd

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoac/llvm: remove output variable declaration for radv ps
Qiang Yu [Thu, 30 Mar 2023 01:36:28 +0000 (09:36 +0800)]
ac/llvm: remove output variable declaration for radv ps

radv ps does not support epilog when llvm, so outputs will always
be lowered to exports in nir.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoaco,radv: lower outputs to exports when nir for monolithic ps
Qiang Yu [Thu, 30 Mar 2023 01:32:58 +0000 (09:32 +0800)]
aco,radv: lower outputs to exports when nir for monolithic ps

Remove the compiler backend code for outputs to exports.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoaco: support nir_export_amd with ps targets
Qiang Yu [Wed, 29 Mar 2023 10:05:47 +0000 (18:05 +0800)]
aco: support nir_export_amd with ps targets

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoac/nir/ps: add no_color_export option
Qiang Yu [Wed, 29 Mar 2023 03:50:18 +0000 (11:50 +0800)]
ac/nir/ps: add no_color_export option

For radv which always do ps lower but may use epilog or not.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoac/nir/ps: use nir_export_dual_src_blend_amd when aco
Qiang Yu [Sun, 23 Apr 2023 05:14:19 +0000 (13:14 +0800)]
ac/nir/ps: use nir_export_dual_src_blend_amd when aco

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/22199>

18 months agoaco: implement nir_export_dual_src_blend_amd
Qiang Yu [Sun, 23 Apr 2023 04:11:24 +0000 (12:11 +0800)]
aco: implement nir_export_dual_src_blend_amd

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/22199>

18 months agoaco: move create_fs_dual_src_export_gfx11 above
Qiang Yu [Sun, 23 Apr 2023 05:30:40 +0000 (13:30 +0800)]
aco: move create_fs_dual_src_export_gfx11 above

Will be used in visit_intrinsic(), content is not changed.

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/22199>

18 months agonir: add nir_export_dual_src_blend_amd intrinsic
Qiang Yu [Sun, 23 Apr 2023 03:49:26 +0000 (11:49 +0800)]
nir: add nir_export_dual_src_blend_amd intrinsic

For GFX11 export dual source blend outputs when ACO.
ACO need a pseudo instruction to emit a block of
code which can't be done in nir currently.

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/22199>

18 months agoac/nir/ps: fix null export write mask miss set to 0xf
Rhys Perry [Tue, 25 Apr 2023 13:13:11 +0000 (21:13 +0800)]
ac/nir/ps: fix null export write mask miss set to 0xf

Fixes: c1821544562 ("ac/nir: add ac_nir_lower_ps")
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

18 months agoradv/rt: remove merged VkRayTracingShaderGroupCreateInfoKHR
Daniel Schürmann [Tue, 25 Apr 2023 11:43:27 +0000 (13:43 +0200)]
radv/rt: remove merged VkRayTracingShaderGroupCreateInfoKHR

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

18 months agoradv/rt: replace uses of pGroups with radv_ray_tracing_group
Daniel Schürmann [Tue, 25 Apr 2023 11:37:29 +0000 (13:37 +0200)]
radv/rt: replace uses of pGroups with radv_ray_tracing_group

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

18 months agoradv: Hash pipeline libraries separately
Friedrich Vock [Mon, 13 Mar 2023 20:16:47 +0000 (21:16 +0100)]
radv: Hash pipeline libraries separately

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

18 months agoradv/rt: add shader stage indices to radv_ray_tracing_group
Daniel Schürmann [Fri, 14 Apr 2023 10:00:03 +0000 (12:00 +0200)]
radv/rt: add shader stage indices to radv_ray_tracing_group

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

18 months agoradv/rt: rename radv_ray_tracing_module -> radv_ray_tracing_group
Daniel Schürmann [Tue, 25 Apr 2023 11:24:55 +0000 (13:24 +0200)]
radv/rt: rename radv_ray_tracing_module -> radv_ray_tracing_group

This name better reflects the purpose and content of this struct.

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

18 months agosvga: set PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY for VGPU10 device
Charmaine Lee [Wed, 12 Apr 2023 21:13:04 +0000 (00:13 +0300)]
svga: set PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY for VGPU10 device

Instead of forcing vertex buffer stride to be 4 byte aligned only,
DX10 actually allows the stride to be non 4-byte aligned but the
alignment of an element must be the nearest power of 2 greater or equal to the
width of the element's format, or 4, whichever is less.  So the requirement is
better met with PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY which if set to
TRUE, the sum of vertex element offset + vertex buffer offset + vertex buffer
stride must be aligned to the vertex attributes component size.
Note: PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY cannot be set
with other alignment-requiring CAPs, so we have to return 0 for all the
other alignement CAPs.

This avoids some unnecessary software vertex translate fallback.

cc: mesa-stable

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22689>

18 months agointel/dev: report stepping for TGL systems
Mark Janes [Tue, 18 Apr 2023 19:20:07 +0000 (12:20 -0700)]
intel/dev: report stepping for TGL systems

Workaround 14010672564 requires a check for the TGL B0 stepping.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22458>

18 months agointel/dev: update mesa_defs.json from defect database
Mark Janes [Wed, 12 Apr 2023 21:42:37 +0000 (14:42 -0700)]
intel/dev: update mesa_defs.json from defect database

These modifications represent:

 * changes to defects made since Feb 16, 2023
 * changes to automated processing of defect state

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22458>

18 months agoglx: add fail check for current context in another thread
Illia Polishchuk [Tue, 25 Apr 2023 08:42:20 +0000 (11:42 +0300)]
glx: add fail check for current context in another thread

The GLX spec for glXMakeCurrent (3.3):
"If ctx is current to some other thread, then glXMakeCurrent will generate
a BadAccess error"

The GLX spec for glXCopyContext (3.3):
"If the destination context is current for some thread then a BadAccess
error is generated"

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7961
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22546>

18 months agoradv/rt: properly destroy radv_ray_tracing_lib_pipeline on error
Daniel Schürmann [Tue, 25 Apr 2023 14:12:19 +0000 (16:12 +0200)]
radv/rt: properly destroy radv_ray_tracing_lib_pipeline on error

Also return the correct error code.

Fixes: 4dafb69d61820c4a9b71856e62797b51f13df91c ('radv/rt: defer library_pipeline allocation')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22684>

18 months agoci/zink: Try to update TGL results for new MSAA behavior.
Emma Anholt [Tue, 25 Apr 2023 17:12:55 +0000 (10:12 -0700)]
ci/zink: Try to update TGL results for new MSAA behavior.

A few fixes, but mostly tons of new GPU hangs.

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

18 months agoci/crocus: Note a recent regression.
Emma Anholt [Tue, 25 Apr 2023 17:04:16 +0000 (10:04 -0700)]
ci/crocus: Note a recent regression.

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

18 months agoci/lima: Skip ppgtt_memory_alignment that flaked a job with the oomkiller.
Emma Anholt [Tue, 25 Apr 2023 16:56:46 +0000 (09:56 -0700)]
ci/lima: Skip ppgtt_memory_alignment that flaked a job with the oomkiller.

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

18 months agoci/panfrost: Drop tex3d-maxsize on g52.
Emma Anholt [Tue, 25 Apr 2023 16:25:57 +0000 (09:25 -0700)]
ci/panfrost: Drop tex3d-maxsize on g52.

Implicated in 3 job-level flakes where Xorg got killed yesterday.

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

18 months agoci: add a660 firmware into rootfs
David Heidelberg [Thu, 20 Apr 2023 13:29:27 +0000 (15:29 +0200)]
ci: add a660 firmware into rootfs

Until we bump to Debian 12 (bookworm).

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-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/22604>

18 months agoci/lava: add support for HDK 888 firmware
David Heidelberg [Thu, 20 Apr 2023 13:14:37 +0000 (15:14 +0200)]
ci/lava: add support for HDK 888 firmware

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-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/22604>

18 months agoci/lava: implement fastboot support
David Heidelberg [Wed, 5 Apr 2023 23:17:26 +0000 (01:17 +0200)]
ci/lava: implement fastboot support

Based on work from Tomeu Vizoso.

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-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/22604>

18 months agoci: add Adreno 660 on sm8350 chipset (HDK 888)
David Heidelberg [Wed, 5 Apr 2023 20:27:09 +0000 (22:27 +0200)]
ci: add Adreno 660 on sm8350 chipset (HDK 888)

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-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/22604>

18 months agoaux/draw: fix memory leak related to ureg_get_tokens()
Patrick Lerda [Wed, 8 Mar 2023 20:27:57 +0000 (21:27 +0100)]
aux/draw: fix memory leak related to ureg_get_tokens()

Indeed, the function nir_to_tgsi() returns an ureg_get_tokens() allocated
object which is assigned locally. The ureg_get_tokens() allocated object
should be freed.

For instance, this issue is triggered with a llvm enabled lima,
"piglit/bin/gl-1.0-rendermode-feedback -auto -fbo":
Direct leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x7faeaa4500 in __interceptor_realloc (/usr/lib64/libasan.so.6+0xa4500)
    #1 0x7fa4a88f1c in tokens_expand ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:239
    #2 0x7fa4a88f1c in get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:262
    #3 0x7fa4a900f4 in copy_instructions ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2079
    #4 0x7fa4a900f4 in ureg_finalize ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2129
    #5 0x7fa4a91dfc in ureg_get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2206
    #6 0x7fa4b20a2c in nir_to_tgsi_options ../src/gallium/auxiliary/nir/nir_to_tgsi.c:4011
    #7 0x7fa4a0c914 in draw_create_vertex_shader ../src/gallium/auxiliary/draw/draw_vs.c:77

Fixes: b5e782f5f431 ("aux/draw: use nir_to_tgsi for draw shader in llvm path")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21924>

18 months agoradv: Don't leak the RT prolog binary
Friedrich Vock [Mon, 17 Apr 2023 14:19:11 +0000 (16:19 +0200)]
radv: Don't leak the RT prolog binary

Fixes: 063d0c90 ("radv: Combine all the parts together with a main loop for an RT pipeline.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22535>

18 months agoradv/rt: Plug some memory leaks during shader creation
Friedrich Vock [Mon, 17 Apr 2023 14:14:50 +0000 (16:14 +0200)]
radv/rt: Plug some memory leaks during shader creation

nir_inline_function actually clones instructions instead of moving them.
Free the shaders explicitly after inserting them instead.

Fixes: 207ce6d658 ("radv: Add helper to inline shaders into the main shader.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22535>

18 months agozink: print the type of shader when dumping
Mike Blumenkrantz [Tue, 25 Apr 2023 14:13:53 +0000 (10:13 -0400)]
zink: print the type of shader when dumping

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

18 months agonouveau/codegen: Check nir_dest_num_components
M Henning [Tue, 25 Apr 2023 05:41:03 +0000 (01:41 -0400)]
nouveau/codegen: Check nir_dest_num_components

instead of reaching into a union and pulling out garbage when
the dest is a reg

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8863
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22674>

18 months agofreedreno/a6xx: Change a618 tile_align_h back to 32
Rob Clark [Tue, 25 Apr 2023 17:07:31 +0000 (10:07 -0700)]
freedreno/a6xx: Change a618 tile_align_h back to 32

Commit 60bc7c0e221 ("freedreno: Specify GMEM tile alignment per GPU")
changed the tile_align_h from 32 to 16 (which _should_ be the correct
value).  But this is causing failure in android 9 skqp dstreadshuffle.
(But not, seemingly, with the android 11 version of skia+skqp, which
picks the same tile size.  So this is likely papering something over.)

For now, to unblock things, revert back to the previous tile_align_h.

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

18 months agofreedreno: Fix resource tracking vs rebind/invalidate
Rob Clark [Mon, 24 Apr 2023 22:11:09 +0000 (15:11 -0700)]
freedreno: Fix resource tracking vs rebind/invalidate

We can now no longer rely on certain dirty bits to re-trigger draw time
resource tracking.  We need to use the new fd_dirty*_resource() APIs.

Fixes `org.skia.skqp.SkQPRunner#gles_recordopts` on android 9.

Fixes: 0a62a874fc5 ("freedreno: Re-work dirty-resource tracking")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22683>