Commit Graph

158058 Commits

Author SHA1 Message Date
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
Mike Blumenkrantz
01edc6f174 zink: always unset var->data.explicit_xfb_buffer
ensure that this isn't accidentally triggering for non-xfb shaders

Fixes: 6d40db84c9 ("zink: handle direct xfb output from output variables")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
(cherry picked from commit 53004e57d6)
2022-09-27 10:03:31 -07:00
Mike Blumenkrantz
cf2be66218 zink: free vertex_state_cache on shutdown
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 903aba413d)
2022-09-27 10:03:31 -07:00
Mike Blumenkrantz
380ffeb205 lavapipe: propagate shader access info across libraries
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18827>
(cherry picked from commit 6db172436a)
2022-09-27 10:03:30 -07:00
Mike Blumenkrantz
23cab32e26 lavapipe: set writemask for compute shader buffers
I don't know how this wasn't being set?

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18827>
(cherry picked from commit 6c935f3f3d)
2022-09-27 10:03:29 -07:00
Dylan Baker
3c44bd1166 .pick_status.json: Update to c268ae9efe 2022-09-27 10:03:17 -07:00
Dave Airlie
73e50fdb0f llvmpipe: bind sampler views/images properly.
There is some code that relies on TGSI here, and it has limits.
For now always just bind resources > 31.

Fixes
dEQP-VK.pipeline.pipeline_library.descriptor_limits*

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
(cherry picked from commit 16fd0c11c6)
2022-09-26 15:10:24 -07:00
Dave Airlie
1cfa6ef606 llvmpipe: memset empty images in the key
This fixes a bunch of valgrind warnings in
dEQP-VK.pipeline.pipeline_library.descriptor_limits.fragment_shader.storage_images_63

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
(cherry picked from commit b144d3e6a7)
2022-09-26 15:10:24 -07:00
Dave Airlie
6635957f5d lavapipe: handle view mask layer count properly for begin rendering.
If the view mask is set the layer count should be taken from it,
not from the layerCount.

Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>
(cherry picked from commit fe5636af6e)
2022-09-26 15:10:23 -07:00
Dave Airlie
8f9fc8e186 lavapipe: take layers into account around render surface creation.
This makes the code more consistent with handling layers, but also
makes sure a new surface is created when the w/h/layers changes.

Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>
(cherry picked from commit 21d39dd1de)
2022-09-26 15:10:23 -07:00
Timur Kristóf
4295192f35 radv: Use a fallback for marketing name when libdrm doesn't know it.
Currently for GPUs which don't have a marketing name in libdrm,
RADV just prints "(null) (RADV ...)", which looks bad.

This commit replaces the "(null)" with "AMD Unknown".

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18775>
(cherry picked from commit 25e1c3d5b3)
2022-09-26 15:10:22 -07:00
Yiwei Zhang
34aa290747 mesa/st: emit string marker based on PIPE_CAP_STRING_MARKER
Fixes: 10ac88b72f ("mesa/st: drop emit string marker device table entry.")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18803>
(cherry picked from commit 37900ee2dd)
2022-09-26 15:10:21 -07:00
Pierre-Eric Pelloux-Prayer
35ebfa8a63 radeonsi/gfx11: don't set VERTS_PER_SUBGRP to 0
It seems slower.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: 25a66477d0 ("radeonsi/gfx11: register changes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18758>
(cherry picked from commit 4fdf10fdaf)
2022-09-26 15:10:18 -07:00
Lionel Landwerlin
a7750abce3 intel/fs: fixup a64 messages
And run algebraic when either int64 for float64 are not supported so
those don't end up in the generated code.

Cc: mesa-stable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit 139e8f4635)
2022-09-26 15:10:17 -07:00
Lionel Landwerlin
8a3a0210ae intel/nir/rt: store ray query state in scratch
Initially I tried to store ray query state in the RT scratch space but
got the offset wrong. In the end putting this in the scratch surface
makes more sense, especially for non RT stages.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit 838bbdcf2e)
2022-09-26 15:10:17 -07:00
Lionel Landwerlin
87f6095557 intel/nir/rt: change scratch check validation
It's very unfortunate that we have the RT scratch being conflated with
the usual scratch. In our implementation those are 2 different buffers.

The usual scratch access are done through the scratch surface state
(delivered through thread payload), while RT scratch (which outlives
thread dispatch with shader calls) is its own buffer.

So checking the NIR scratch size makes no sense as we can have normal
scratch accesses completely unrelated to RT scratch accesses.

This change switches the validation by looking at whether the scratch
base pointer intrinsic is being used (which is what we use/abuse to
implement RT scratch).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit f7fab09a07)
2022-09-26 15:10:16 -07:00
Lionel Landwerlin
318020df2b intel/nir/rt: fix ray query proceed level
Initially the level is world (top level), then it's whatever level the
potential hit is.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit 259b1647e6)
2022-09-26 15:10:16 -07:00