Commit Graph

158024 Commits

Author SHA1 Message Date
Timothy Arceri
753f3a7d7d util/conf: enable init to zero workaround for Exanima
Fixes rendering issues on llvmpipe.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6449

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18935>
(cherry picked from commit 3200b5c46b)
2022-10-11 13:27:16 -07:00
Erik Faye-Lund
db2417625e gallium/u_threaded_context: remove stale comment
We're now using PIPE_SHADER_MAX_SAMPLER_VIEWS, so this advice is
outdated.

Fixes: 620c5e9dd0 ("gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18973>
(cherry picked from commit b666c203ee)
2022-10-11 13:27:14 -07:00
Diogo Ivo
beb3819d66 nouveau: treat DRM_FORMAT_INVALID as implicit modifier
Failing to allocate resources when DRM_FORMAT_INVALID
is passed as a modifier breaks tegra. Change this behaviour
so that this modifier is instead interpreted as a don't care,
allowing for the driver to choose an appropriate modifier internally.

v2: change nouveau instead of tegra (Thierry Rieding)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6693
Fixes: 129d83cac2 ("nouveau: Use format modifiers in buffer allocation")
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18649>
(cherry picked from commit 941c70a28a)
2022-10-11 13:27:14 -07:00
Gert Wollny
87f92ebdd5 r600/sfn: don't propagate registers into conditional test
We don't check whether the register is overwritten between the actual
conditional test and the test of the used result, so don't try to
optimize the evaluation of the conditional.

Fixes: 79ca456b48
   r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>
(cherry picked from commit 6de40d17ba)
2022-10-11 13:27:13 -07:00
Gert Wollny
4760c763e4 r600/sfn: Always start a new CF after a KILL instruction
Docu says:

   Ensure that the KILL* instruction is the last instruction
   in an ALU clause, because the remaining instructions executed
   in the clause do not reflect the updated valid state after
   the kill operation.

Fixes: 79ca456b48
    r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>
(cherry picked from commit 99b7a12ec1)
2022-10-11 13:27:13 -07:00
Alejandro Tafalla
52eac47f75 freedreno: Fix graphic glitches on a4xx and a5xx
Like on adreno 3xx, hw binning and scissor optimizations don't work correctly
together on a4xx and a5xx GPUs.

Disable binning as a workaround if scissor optimizations are being used.

Fixes: f68c6951b8 8efaae3e19

Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18925>
(cherry picked from commit afe4b534b5)
2022-10-11 13:27:12 -07:00
Emma Anholt
c66624f59b turnip: Don't use the dynamic color write enable during non-dynamic.
We have the correct merged color write enable state as a local var here,
use that instead of the zero cmd->state.color_write_enable.  Fixes
blending in many traces with ANGLE on turnip.  In the process of fixing,
clarify the logic a little bit.

Fixes: 169e03800d ("tu: Implement VK_EXT_color_write_enable")
Fixes: #7328
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18956>
(cherry picked from commit dadb29cf2e)
2022-10-11 13:27:11 -07:00
Dylan Baker
7173cb4f43 .pick_status.json: Update to 243aa6b2ec 2022-10-11 13:26:57 -07:00
Dylan Baker
610800395d docs: Add sha256 sum for 22.2.1 2022-10-11 12:09:25 -07:00
Dylan Baker
21e7392eb5 VERSION: update to 22.2.1 2022-10-11 11:53:31 -07:00
Dylan Baker
d8021bbb09 docs: add release notes for 22.2.1 2022-10-11 11:53:31 -07:00
Dylan Baker
3ba10f961e docs: remove new_features.txt
which was accidentally not commit before.
2022-10-11 11:50:29 -07:00
Dylan Baker
d4d47ef6ef .pick_status.json: Mark ff933485b7 as denominated 2022-10-04 14:54:33 -07:00
Connor Abbott
f79525dda6 ir3/analyze_ubo_ranges: Account for reserved consts better
It turns out that the ir3_setup_const_state() already includes reserved
consts, so we were accidentally counting it twice. This makes us use
less consts, and if there are enough reserved consts can make it go
negative and wrap around. Fix this while also making sure the previous
bug remains fixed.

Fixes: 8cb1deded6 ("ir3/analyze_ubo_ranges: Account for reserved consts")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>
(cherry picked from commit dcab399a17)
2022-10-04 14:54:29 -07:00
Gert Wollny
bdc71b81c8 nir_lower_to_source_mods: Don't sneek in an abs modifier from parent
If the abs source modifiers is not supported for the current
instruction because it is an instruction with three sources we
may still see a parent mov that has the `abs` modifier. In this
case we must not propagate that abs modifier from that parent
instructions.

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

Fixes: cd73b6174b
    nir/lower_to_source_mods: Stop turning add, sat, and neg into mov

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18902>
(cherry picked from commit 9ebe893a61)
2022-10-04 14:54:29 -07:00
SoroushIMG
4d6fe87a24 zink: fix nir_op_unpack_64_2x32 emission
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
(cherry picked from commit d2e2b9bb80)
2022-10-04 14:54:26 -07:00
Rhys Perry
9566c44069 aco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation
It doesn't make sense for a "s_waitcnt vmcnt(0)" to affect a store or DS
instruction.

LLVM checks for "s_waitcnt vmcnt(0) lgkmcnt(0) expcnt(0)" but ignores
s_waitcnt_vscnt (which I assume is a bug).

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: bcf94bb933 ("aco: properly recognize that s_waitcnt mitigates VMEMtoScalarWriteHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
(cherry picked from commit 2bd16256a6)
2022-10-04 14:54:26 -07:00
Mike Blumenkrantz
642b4d6b6e pipe-loader: fix zink driinfo header path
this feels like a compiler bug, but somehow just specifying the
shorter path ends up with a broken/partial header include

Fixes: d760a9151b ("gallium: Learn about kopper")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
(cherry picked from commit 8da9e65500)
2022-10-04 14:54:25 -07:00
Mike Blumenkrantz
1ff57b2c14 zink: fix/improve handling for multi-component bitfield ops
the original improvement for this correctly handled cases where
the offset/count values were swizzled with .xxxx, but it was broken
for any other swizzling

this adds a nir pass to more easily manipulate the swizzles and rewrite
the multi-component ops as multiple ops with the swizzled params

fixes #6697

Fixes: 8e97f51c67 ("zink: handle swizzled offset/count values for shader bitfield ops")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18706>
(cherry picked from commit af775f842c)
2022-10-04 14:54:25 -07:00
Mike Blumenkrantz
1cfd9ec3d7 glthread: handle DeleteBuffers(n=-1) gracefully
this is a valid error condition

cc: mesa-stable

fixes:
GTF-GL46.gtf21.GL2FixedTests.buffer_objects.buffer_objects

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18856>
(cherry picked from commit 004c5b60ca)
2022-10-04 14:54:24 -07:00
Dylan Baker
3aa0a2a7c7 .pick_status.json: Update to 68f3c38c80 2022-10-04 14:54:10 -07:00
Dylan Baker
9d1f0e8c82 .pick_status.json: Mark 5af6dad179 as denominated 2022-09-29 10:40:39 -07:00
Mike Blumenkrantz
62ed7e993c zink: add a draw barrier when unbinding a sampler-bound fb surface
this is guaranteed to need some kind of layout change, so ensure the
barrier actually happens

cc: mesa-stable

SoroushIMG <soroush.kashani@imgtec.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18855>
(cherry picked from commit 5bc19dd5f7)
2022-09-29 10:40:39 -07:00
nyanmisaka
71b0b79e58 gallium: Do not include offscreen winsys if glx is disabled
Offscreen winsys introduced in Mesa 22.2 depends on glx(dri) and libswkmsdri.

The error message is:
/usr/bin/ld: src/gallium/auxiliary/libgalliumvlwinsys.a.p/vl_vl_winsys_dri_vgem.c.o: in function `vl_vgem_drm_screen_create':
vl_winsys_dri_vgem.c:(.text.vl_vgem_drm_screen_create+0x28): undefined reference to `kms_dri_create_winsys'

Fixes: 31dcb396 (gallium/vl: Add software winsys and offscreen winsys)

Cc: mesa-stable
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18843>
(cherry picked from commit ae201bcd42)
2022-09-29 10:40:39 -07:00
Lionel Landwerlin
5a4a4f8f8e anv: remove HDC flush from invalidate bits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a49b145e8d ("anv: Replace DC Flush with HDC Pipeline Flush")
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
(cherry picked from commit 0926ac42cb)
2022-09-29 10:40:39 -07:00
Dylan Baker
1ecc6cc1da .pick_status.json: Update to e5631add0d 2022-09-29 10:40:39 -07:00
Jonathan
897e382d9d gallium/u_threaded: buffer sharedness tracking
This fixes TC's buffer invalidation code for buffers that are shared
between contexts.

TC is unable to notify other TCs in case it replaces a shared buffer's
underlying storage when invalidating, causing those other TCs to use
wrong buffer IDs for busyness tracking, which leads to corruption due
to invalidation fast-paths being triggered when they shouldn't be.

This patch addresses this issue by tracking if a buffer is shared, and
if it is, disabling buffer storage replacement for the affected buffer.
This is achieved by tracking which TC instance first accessed a certain
buffer. If a second instance then accesses it as well, it will realize
that it isn't the only one working on the buffer and mark the buffer
accordingly.

If TC needs to invalidate a buffer for the correctness of an operation
at any point, it will fall back to doing the operation in a synchronous
fashion with this patch if the buffer is shared and currently busy.

It might be possible to later detect that a buffer has become un-shared;
however, this is outside of the scope of this bugfix patch.

v2: Do not disable buffer busyness tracking for shared buffers.

Fixes: e9c41b32 ("gallium/u_threaded: add buffer lists - tracking of buffers referenced by tc")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 8f159a8576)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18349>
2022-09-28 19:03:32 +00:00
Jonathan
8a57b219d1 gallium/u_threaded: Prepare for buffer sharedness tracking
tc_add_to_buffer_list and tc_bind_buffer need the tc instance too.

(cherry picked from commit aa87803069)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18349>
2022-09-28 19:03:32 +00:00
Jesse Natalie
6b77710d2d u_atomic: Add a helper for pointer compare-exchange
Notably this helps with MSVC, which complains about compiling the not-taken
branches of the ternary when called with pointer args. Using a version that
doesn't have "runtime" sizeof checks eliminates the warnings.

Reviewed-by: Jonathan Strobl <jonathan.strobl@gmx.de>
(cherry picked from commit 6718bff75b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18349>
2022-09-28 19:03:32 +00:00
Feng Jiang
5383fd12d2 virgl/vtest: fix memory overwrite problem in virgl_vtest_send_get_caps()
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
(cherry picked from commit 060936fe0d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18071>
2022-09-28 18:49:43 +00:00
Mike Blumenkrantz
94c771bcdb zink: set layouts before possibly reordering image copies
layout-setting may change which cmdbuf can be used

Fixes: 731d7be375 ("zink: make get_cmdbuf() public")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18727>
(cherry picked from commit 3ed712f748)
2022-09-28 10:14:58 -07:00
Mike Blumenkrantz
63a60728ad aux/trace: dump depth_clamp for rasterizer state
cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18783>
(cherry picked from commit 4c58b92e44)
2022-09-28 10:14:58 -07:00
Pierre-Eric Pelloux-Prayer
a4222b0881 tc: don't use CPU storage for glBufferData
This fixes a performance regression with yquake2 cause by
the enablement of cpu_storage by default for radeonsi in
a5a8e19741.

Fixes: a5a8e19741 ("radeonsi: enable tc cpu_storage by default")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18774>
(cherry picked from commit e06c332bf7)
2022-09-28 10:14:58 -07:00
Pierre-Eric Pelloux-Prayer
9372399842 tc: do a GPU->CPU copy to initialize cpu_storage
If the GPU-side storage has been written to without using cpu_storage,
then we have to initialize the CPU-side storage correctly.

This requires a sync + copy but it's a one time operation so it shouldn't
affect performance much.

I don't think it fixes any existing bug, but the next commit will need
this to behave correctly.

cc: mesa-stable

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18774>
(cherry picked from commit 8af8dc97bc)
2022-09-28 10:14:58 -07:00
Lionel Landwerlin
b4c91f086a intel/nir: disable assert on async stack id
This can be accessed from :
   - RT shaders
   - CS trampoline shader

We missed the second part here.

Fixes: 0465714790 ("intel/nir/rt: add more helpers for ray queries")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
(cherry picked from commit 57593c5395)
2022-09-28 10:14:58 -07:00
Lionel Landwerlin
63fc489471 intel/nir: fix potential invalid function impl ptr usage
We keep the nir_builder::impl value around, but we've run some passes
that might have change the main function.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 96fde5518b ("intel/rt: Add a helper to create the raygen trampoline shader")
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
(cherry picked from commit 8d580de4a9)
2022-09-28 10:14:58 -07:00
Lionel Landwerlin
ce21dde04d intel/nir: fixup preserved metadata in rayquery lowering
Another case of not clearing the metadata correctly.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
(cherry picked from commit 1ffd28149f)
2022-09-28 10:14:58 -07:00
Mike Blumenkrantz
1ab6d664c3 mesa: set normalized_coords for bindless texture buffer samplers
this isn't "used", but it's the default

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18845>
(cherry picked from commit 7829fb9adf)
2022-09-28 10:14:58 -07:00
Mike Blumenkrantz
d537057606 zink: don't flatten 64bit arrays during rewrite
dunno what I was thinking here

Fixes: 5b2f850425 ("zink: rewrite 64bit shader i/o as 32bit")

SoroushIMG <soroush.kashani@imgtec.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18728>
(cherry picked from commit 17e3df4cd2)
2022-09-28 10:14:58 -07:00
Mike Blumenkrantz
70e2817f65 zink: always run optimize_nir after lower_64bit_vars
it's otherwise possible (and likely) that optimizations won't
happen since there's no shader key data active

Fixes: 5b2f850425 ("zink: rewrite 64bit shader i/o as 32bit")

SoroushIMG <soroush.kashani@imgtec.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18728>
(cherry picked from commit 0f053f0f07)
2022-09-28 10:14:58 -07:00
Dylan Baker
358e054bfd .pick_status.json: Update to 3ed712f748 2022-09-28 10:14:58 -07:00
Yonggang Luo
24af5a7f82 util: Disable usage of __attribute__((__const__)) when the compiler is clang
Clang didn't implement __attribute__((__const__)) properly for release build.
The issue tracker is: https://github.com/llvm/llvm-project/issues/56993

Closes #6781
Closes #6782
Closes #7170

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18798>
2022-09-27 18:08:15 +00:00
Dylan Baker
5e73858b9e .pick_status.json: Mark 40a235c9a8 as denominated 2022-09-27 10:49:05 -07:00
Dylan Baker
bc71af26d6 .pick_status.json: Mark cbad4adc13 as denominated 2022-09-27 10:48:22 -07:00
Dylan Baker
bef8fe631e .pick_status.json: Mark 1aacd9492d as backported 2022-09-27 10:47:52 -07:00
Dylan Baker
b0a45e65a7 .pick_status.json: Mark 5b7c2dffc4 as denominated 2022-09-27 10:45:36 -07:00
Dylan Baker
5cba513470 .pick_status.json: Mark 49efa73ba1 as denominated 2022-09-27 10:45:35 -07:00
Erik Faye-Lund
a53554f388 docs: fixup broken rst syntax
Seems I messed this up when converting things, and nobody noticed until
now!

Fixes: d4397c0048 ("docs: use envvar role for envvars")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18641>
(cherry picked from commit c816081eea)
2022-09-27 10:03:34 -07:00
Yonggang Luo
8a40852756 ci/docs: Stick to specific version of python packages
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18833>
(cherry picked from commit 9cbfe9a8ba)
2022-09-27 10:03:32 -07:00
Mike Blumenkrantz
883c0f7b2f zink: avoid overflow when clamping bufferviews
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
(cherry picked from commit 084f3b6664)
2022-09-27 10:03:32 -07:00