Hans-Kristian Arntzen
be0dcbdfa2
wsi/x11: Implement EXT_swapchain_maintenance1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
8ece1ade5b
wsi/common: Add common implementation of vkReleaseSwapchainImagesEXT.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Marek Olšák
c1fa7fe785
lavapipe/ci: add a new flake
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
4f7e353237
amd: lower multi-component subdword SSBO loads in NIR
...
because the hw and LLVM only support subdword single-component SSBO loads,
and ac_nir_to_llvm splits multi-component loads because of that, which is
inefficient.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
82919e2dcb
amd: lower subdword UBO loads in NIR
...
This fixes broken subdword UBO loads with LLVM.
It's only needed for LLVM, but it's done for both LLVM and ACO because
the pass can be fully validated only with ACO and the Vulkan CTS right now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
1a424fee4a
ac/llvm: implement nir_op_unpack_32_4x8
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
6aee999131
aco: implement nir_op_unpack_32_4x8
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
09005e6dfc
ac/nir: add ac_nir_lower_subdword_loads to lower 8/16-bit loads to 32 bits
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
b80bd58265
nir: skip nir_op_unpack_32_4x8 in nir_lower_alu_width
...
The pass can't handle it just like the other unpack opcodes and generates
invalid NIR.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Marek Olšák
ec38758e86
nir: return progress from nir_lower_io_to_scalar
...
oversight?
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399 >
2023-03-03 03:27:40 +00:00
Faith Ekstrand
9a4641cf6b
intel/nir: Limit unaligned loads to vec4
...
This probably doesn't affect Vulkan or GL because they can't have
anything bigger than a vec4 anyway unless it's a u64vec4 and those have
to be at least 8B aligned. This may affect CL apps if they use
__attribute__((packed)) on something with big vectors, depending on how
LLVM decides to translate that.
Fixes: f8aa83f0c8 ("intel/nir: Use nir_lower_mem_access_bit_sizes()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
c11ac5e446
nir: Handle wider unaligned loads in lower_mem_access_bit_size
...
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
7e8a10be67
nir: Make chunk_align_offset const in lower_mem_load()
...
This should make things more clear than changing the value from earlier
in the loop. Also, rename chunk_offset to load_offset so they match.
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
eb9a56b6ca
nir: Rename nir_mem_access_size_align::align_mul to align
...
It's a simple alignment so calling it align_mul is a bit misleading.
Suggested-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
802bf1d9a6
nir: Rename align to whole_align in lower_mem_load
...
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
ca4d73ba36
nir: Add a combined alignment helper
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@colllabora.com >
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
e433a7c4fa
nir: Add UBO support to nir_lower_mem_access_bit_sizes
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
116a851264
nir: Add mode filtering to lower_mem_access_bit_sizes
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Faith Ekstrand
4b06b1a7c5
nir: Check against combined alignment in nir_lower_mem_access_bit_sizes
...
Checking against align_mul is insufficient if align_offset > 0. We need
to check against the combined alignment instead.
Fixes: 2e2d7803c7 ("nir: Add a load/store bit size lowering pass")
Reviewed-by: M Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524 >
2023-03-03 02:00:39 +00:00
Patrick Lerda
352fee176c
mesa/framebuffer: fix gl_framebuffer.resolve refcnt imbalance
...
Indeed, "resolve" is not freed at the gl_framebuffer destroy
stage.
For instance, this issue is triggered and detected with
"piglit/bin/fbo-depthstencil clear default_fb -samples=2 -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
Fixes: f5bde99cbd ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21663 >
2023-03-03 01:28:47 +00:00
Marek Olšák
73c91c4c8a
radeonsi: assume shader is never NULL in si_emit_shader_*
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
ab802a1f91
radeonsi: simplify encoding VGPRS and SGPRS
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
63d5eb35f4
radeonsi: check the pm4.reg_va_low_idx assertion unconditionally
...
This is not a hot path. We can always do this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
51e4437eee
radeonsi: add si_pm4_set_reg_va to simplify setting reg_va_low_idx for RGP
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
8a564f72e5
radeonsi: reindent code in si_state_binning.c
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
3a26d2b1a7
radeonsi: don't merge SET_* packets that have a different index in si_pm4_state
...
Oops.
Fixes: c8e2c6faf6 ("radeonsi: use SET_SH_REG_INDEX with index=3 for registers containing CU_EN")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
0d543d76d7
radeonsi: reorganize si_emit_framebuffer_state for better readability
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
0669d7c29b
radeonsi: remove Smart Access Memory because CPU access has large overhead
...
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8176
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:49 +00:00
Marek Olšák
1862c8296c
radeonsi/ci: update flakes and gfx8-polaris11 results
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Marek Olšák
3c9aa3e201
amd/rtld: allow 64K LDS for all shader stages except for gfx6
...
Gfx6 can only use 32K LDS per workgroup.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Marek Olšák
ccaaf8fe04
amd: massively simplify how info->spi_cu_en is applied
...
Instead of having ac_set_reg_cu_en that sets the register, replace it with
ac_apply_cu_en that only returns the modified register value,
which allows a large simplification in both drivers because a lot of code
becomes duplicated after it's switched to ac_apply_cu_en.
RADV also didn't apply it to a few registers. Fixed.
This removes 82 lines of code in total.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Marek Olšák
2b3f551ed8
ac/nir: don't use load_esgs_vertex_stride_amd on gfx6-8
...
An improvement for 9f1e6d8f70 .
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Marek Olšák
79732416fd
amd: query cache sizes from the kernel
...
Also rename l1_cache_size -> tcp_cache_size. L1 means shader array cache.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Marek Olšák
6e2e89e6d8
amd,radeonsi: change enabled_rb_mask to 64 bits
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Marek Olšák
03ffb8d77c
amd: update amdgpu_drm.h
...
From kernel commit 817714d9665e.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641 >
2023-03-03 00:41:48 +00:00
Asahi Lina
8e86ba3dd4
asahi: Pull device name from device struct
...
This isn't filled in yet, but will be once the UAPI init function is
added.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
f1dac37b3d
asahi: Add agx_bo_mmap() calls to transfer path
...
We have the prototype for this already.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
3716f72413
asahi: Add result buffer to context/batches
...
The result buffer is where the kernel places statistics and fault
information after the GPU executes a command. Dummy structure pending
UAPI.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
798fc2730b
asahi: Add agx_debug_fault() helper
...
We expect to forward GPU fault information to userspace. Since Mesa can
get that information, we can look up the fault address to log what was
the containing or nearest BO. Add a helper for that, so it can be called
from the driver.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
240e9dc5dc
asahi: Add APIs for DMA-BUF sync file import/export
...
These are generic ioctls, so it is safe to add them now.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
d610f40e17
asahi: Implement Linux driver scaffolding, sans UAPI
...
With macOS support out of the way, we can start implementing a lot of
the Linux driver interface and bookkeeping without actually adding the
UAPI proper. Let's do that to reduce the size of the UAPI patchset.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
942d9cc17b
asahi: Align device submission API with upcoming UAPI
...
Nothing implemented, but this lets us get the batch tracking bits in,
including explicit sync/DMA-BUF integration which uses generic ioctls.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
7f2e24d2ef
asahi: Add nocluster,sync,stats debug flags
...
These are only useful with the upcoming Linux UAPI, but there's no harm
in getting the debug scaffolding in now.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Asahi Lina
afe134a49c
asahi: Drop macOS backend
...
This might be useful in the future, but it is best reimplemented in
terms of the upcoming Linux UAPI instead of having parallel codepaths.
Let's drop it.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662 >
2023-03-03 00:28:48 +00:00
Yiwei Zhang
b5e7a22c2e
venus: ensure invariance of buffer memory requirement size
...
Need to align the size for the initial cache miss.
Fixes: ef255444c1 ("venus: switch to lazy VkBuffer cache")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21644 >
2023-03-03 00:07:23 +00:00
Marek Olšák
2e2605e297
mesa: initialize VertexProgram._VaryingInputs before the first use
...
Noticed by code inspection.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21438 >
2023-03-02 23:38:12 +00:00
Marek Olšák
0a71957a9b
mesa: remove a redundant call to _mesa_update_edgeflag_state_vao
...
It's called again a few lines later.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21438 >
2023-03-02 23:38:12 +00:00
Marek Olšák
0293f8d8ce
mesa: fix glPopClientAttrib with fixed-func VP and zero-stride varyings
...
This was missed.
Fixes: 3a294ff01f - mesa: move the _mesa_set_varying_vp_inputs call to where the state changes
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8246
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21438 >
2023-03-02 23:38:12 +00:00
Alexandros Frantzis
689ce66a43
vulkan/wsi/wayland: Fix destruction of event queue with proxies still attached.
...
Destroy the surface dmabuf feedback proxy before destroying the event
queue that the proxy is attached to.
This silences a warning that libwayland 1.22 emits for programs that use
Vulkan/Wayland:
warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
zwp_linux_dmabuf_feedback_v1@18 still attached
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647 >
2023-03-02 19:09:29 +00:00
Alexandros Frantzis
ee5d2250fd
egl/wayland: Fix destruction of event queue with proxies still attached.
...
Destroy the display wrapper proxy before destroying the event queue that
the proxy is attached to.
This silences a warning that libwayland 1.22 emits for programs that use
EGL/Wayland:
warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
wl_display@1 still attached
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646 >
2023-03-02 18:32:02 +00:00