Commit Graph

169106 Commits

Author SHA1 Message Date
Harri Nieminen
fd767a4517 bin: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22189>
2023-03-30 21:37:00 +00:00
Mike Blumenkrantz
db582e5e7d zink: block resolves where src extents > dst extents
vulkan resolves only provide "extents" instead of src and dst regions like
GL, which means vk resolves can't be used to downscale images, as such
operations will instead just crop the image

fixes #8655

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22195>
2023-03-30 21:13:40 +00:00
Samuel Pitoiset
373c6346f5 radv: add push constant state to the cmdbuf state
Push constants are handled per bind point internally. Using a separate
structure in the cmdbuf state would allow us to update it easily
without relying on bound pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22209>
2023-03-30 20:41:23 +00:00
Samuel Pitoiset
a0baefa033 radv: copy need_indirect_descriptor_sets to radv_cmd_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22209>
2023-03-30 20:41:23 +00:00
Samuel Pitoiset
eeefe18f05 radv: add a helper to convert a VkPipelineBindPoint
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22209>
2023-03-30 20:41:23 +00:00
Rob Clark
88f3676019 freedreno: Optimize repeated finishes
Sometimes apps (glances at stk) spin on a syncobj with very short
timeouts.  But ensuring the fence is flushed all the way through to
the kernel (including handling TC unflushed fences) only needs to
be done once.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark
8416bc1c60 freedreno/drm: Disable threaded-submit for msm
We've had drm/sched support on the kernel side for more than a year and
a half.  This makes submit ioctl async by handling fence waits from the
sched's kthread, which is what threaded submit was originally working
around.  For now, threaded submit is only used for virtgpu, which does
not (yet?) have drm/sched support.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark
a16533c43e freedreno/drm: Make threaded-submit optional
We've had gpu-sched support in the kernel for a while now, so our fence
waits are not synchronous in the ioctl path.  The only reason this path
still exists is that virtgpu does not have gpu-sched.  So lets disable
it on msm.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark
cacbbfd6a8 mesa: Add a few more function traces
Sprinkle around a few more traces that were useful in locating fence
waits.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark
c2194552e7 freedreno/drm: Stop cleanup at first active BO
Buffers are added to the deferred freelist at the tail.  And frequently
the last reference is dropped immediately after the submit.  So almost
always, once we see a still-busy BO, the remaining in the list will also
still be busy.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark
712c26e2b6 freedreno/drm: Fast path for idle check
If already idle, no need to cleanup_fences() (and take related lock).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:00 +00:00
Mike Blumenkrantz
77c7198d76 zink: fix quads emulation gs with array variables
this was broken for e.g., gl_ClipDistance, which uses explicit array
types and therefore cannot be directly read/written

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22208>
2023-03-30 19:21:52 +00:00
Rob Clark
f9a074dd55 dri2/android: Bypass throttling
The android window system (SurfaceFlinger, et al) already does it's own
throttling.  Trying to do this also in mesa's egl is counterproductive.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22197>
2023-03-30 18:46:04 +00:00
Konstantin Seurer
816f434efc radv/rq: Rematerialize inv_dir before proceed
Helps with register pressure.

Quake II RTX:
Totals from 7 (14.29% of 49) affected shaders:

VGPRs: 688 -> 672 (-2.33%)
CodeSize: 167496 -> 167560 (+0.04%); split: -0.01%, +0.05%
MaxWaves: 70 -> 72 (+2.86%)
Instrs: 31716 -> 31760 (+0.14%); split: -0.02%, +0.16%
Latency: 385343 -> 386040 (+0.18%); split: -0.01%, +0.19%
InvThroughput: 78878 -> 78045 (-1.06%); split: -1.22%, +0.17%
VClause: 596 -> 600 (+0.67%)
Copies: 4774 -> 4747 (-0.57%); split: -0.98%, +0.42%
PreVGPRs: 617 -> 592 (-4.05%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20469>
2023-03-30 18:15:11 +00:00
Mike Blumenkrantz
9c73312248 zink: set src access when rebinding buffers, unset unordered_*
this ensures that the buffer is marked active and prevents promotion
in cases where reordering would break rendering

unordered_read prohibits write reordering for buffers, so setting
this flag must be done when the buffer is actually used, ideally as
late as possible

setting it at the time of (re)bind catches all the buffer rebind cases
which might otherwise erroneously permit reordering

fixes #8381

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22205>
2023-03-30 17:54:11 +00:00
Danylo Piliaiev
2cc9364c20 tu/drm: Support cached non-coherent memory
Requires some hand rolled assembly:
- DC CVAC / DC CIVAC for aarch64
- DCCMVAC / DCCIMVAC for arm32, unfortunately it seems that it is
  illegal to call them from userspace.
- clflush for x86-64

We handle x86-64 case because Turnip may run in x86-64 guest
e.g. in FEX-Emu or Box64.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20550>
2023-03-30 15:50:47 +00:00
Danylo Piliaiev
5a59410962 turnip: add cached and cached-coherent memory types
vkd3d requires cached memory type.

MSM backend doesn't have a special ioctl for memory
flushing/invalidation, we'd have to use cvac and civac
arm assembly instructions (would be done in following commit).

KGSL has an the ioctl for this, which is used in this commit.

Note, CTS tests doesn't seem good at testing flushing and
invalidating, the ones I found passed on KGSL with both
functions being no-op.

Based on the old patch from Jonathan Marek.

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

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20550>
2023-03-30 15:50:47 +00:00
Erik Faye-Lund
bd816084c6 zink: enable spir-v 1.6 for vulkan 1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18274>
2023-03-30 14:06:54 +00:00
Erik Faye-Lund
99bd1eaf3d zink: use spir-v 1.6 local-size when needed
The WorkgroupSize built-in is deprecated in SPIR-V 1.6, so let's switch
to using LocalSizeId instead, like the spec recommends.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18274>
2023-03-30 14:06:54 +00:00
Erik Faye-Lund
da895596da zink: use demote from spir-v 1.6 when possible
With SPIR-V 1.6, we don't need to enable the extension for demote any
more.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18274>
2023-03-30 14:06:54 +00:00
Erik Faye-Lund
636bfc6358 zink: emit terminate for spir-v 1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18274>
2023-03-30 14:06:54 +00:00
Mike Blumenkrantz
67462ed014 zink: add spirv builder function for terminate
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18274>
2023-03-30 14:06:54 +00:00
Mike Blumenkrantz
db1371cce1 llvmpipe: fix handling of unused color attachments
if an attachment doesn't have blending or color output from the shader,
nothing should touch the attachment

this is consistent with vulkan spec and needed for upcoming cts coverage

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
2023-03-30 12:04:22 +00:00
Mike Blumenkrantz
6a5dcd2776 llvmpipe: fix linear fs analysis with nonzero fs outputs
linear fs only works with output 0

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
2023-03-30 12:04:22 +00:00
Samuel Pitoiset
15f1d5cc8f radv: copy ia_multi_vgt_param to the cmdbuf state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
0daffade14 radv: copy uses_{drawid,baseinstance} to the cmdbuf state
As well as the vertex user sgpr info. This also needs to be copied
for merged shaders (ie. VS+TCS).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
8fd915098d radv: copy rast_prim to the cmdbuf state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
6ee8d33ef4 radv: add a helper that returns the current rasterized primitive
For tess/geom/mesh the rasterized primitive is part of the shader
info and primitive topology should be ignored.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
b0a007583d radv: copy custom blend mode to the cmdbuf state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
bc39fa9500 radv: rework emitting inner coverage when a fragment shader is bound
To stop relying on the pipeline. The state is now flagged when a new
fragment shader with a different inner coverage setting is bound.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
2023-03-30 11:43:06 +00:00
Samuel Pitoiset
5231643900 radv: remove radv_graphics_pipeline::vb_desc_alloc_size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:19 +00:00
Samuel Pitoiset
b2ac40e734 radv: remove radv_graphics_pipeline::vb_desc_usage_mask
Use the VS shader info instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:19 +00:00
Samuel Pitoiset
2b1a0c0a29 radv: adjust vb_desc_usage_mask for dynamic VS inputs in the info pass
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:19 +00:00
Samuel Pitoiset
d87c813da1 aco: remove unused aco_shader_info::vb_desc_usage_mask
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:19 +00:00
Samuel Pitoiset
c7784f1409 radv: remove radv_graphics_pipeline::can_use_simple_input
Use the VS shader info instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:19 +00:00
Samuel Pitoiset
53b2b30d0b radv: remove radv_graphics_pipeline::next_vertex_stage
Use the active stages bitfield instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:18 +00:00
Samuel Pitoiset
f224e9f1a5 radv: remove radv_graphics_pipeline::last_vertex_attrib_bit
Use the VS shader info instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:18 +00:00
Samuel Pitoiset
99bca4cb50 radv: remove radv_graphics_pipeline::use_per_attribute_vb_descs
Use the VS shader info instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22192>
2023-03-30 11:21:18 +00:00
Patrick Lerda
5d85966805 intel: fix memory leak related to brw_nir_create_passthrough_tcs()
Indeed, the parameter "mem_ctx" was not processed.

For instance, this issue is triggered with the crocus driver and
"piglit/bin/shader_runner tests/spec/arb_tessellation_shader/execution/compatibility/tes-clip-vertex-different-from-position.shader_test -auto -fbo":
SUMMARY: AddressSanitizer: 235216 byte(s) leaked in 48 allocation(s).

Fixes: 96ba0344db ("intel: Use common helpers for TCS passthrough shaders")
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/22173>
2023-03-30 10:52:07 +00:00
Pierre-Eric Pelloux-Prayer
9c90deefb2 radeonsi: don't use alignment_log2 of imported buffers
This value isn't passed to the importer by the kernel
so we can't check it.

Fixes: f7a4051b83 ("radeonsi: Check pitch and offset for validity.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8431
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22170>
2023-03-30 10:14:31 +00:00
Erik Faye-Lund
ba6336ce3e docs: use version-number as toctree-title for relnotes
Using the full titles makes most of these take up two lines in the
toctree. The version number is really the only thing we should care
about, though.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21956>
2023-03-30 10:09:01 +00:00
Erik Faye-Lund
b09e1ecef0 docs: move old relnotes to _extra directory
These aren't built, so they won't get copied out into the public folder
unless we put is inside the _extra folder.

This has been broken all since the conversion to Sphinx, whoops!

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21956>
2023-03-30 10:09:01 +00:00
Lina Versace
655150918b venus: Enable VK_EXT_memory_budget
Tested dEQP-VK.info.device_memory_budget on Intel with vtest.  When the
test is ran at approximately the same time on the native driver and on
vtest, the qpa result files each report approximately the same memory
budget.

Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22099>
2023-03-30 09:55:40 +00:00
Lina Versace
85007a5caf venus: Refactor vn_physical_device_init_memory_properties
Improve readability.

Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22099>
2023-03-30 09:55:40 +00:00
Lina Versace
436a0d2609 venus: Delete vn_renderer_info::has_cache_management
It has been false since commit 247232d596, when Venus was merged
upstream in April 2021.

Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22099>
2023-03-30 09:55:39 +00:00
Lina Versace
e58352930e venus: Update protocol for VK_EXT_memory_budget
Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22099>
2023-03-30 09:55:39 +00:00
Karol Herbst
72b7e20bf7 nvc0: enable fp helper invocation memory loads on Turing+
Starting with GSP this will be the only way of doing so, for older gens
we'll just fix it up on the kernel side.

Cc: mesa-stable
Acked-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21989>
2023-03-30 09:40:22 +00:00
Samuel Pitoiset
d147cf5a56 radv: use serialized NIR for graphics libs with the RETAIN flag
Cloning NIR shaders consumes too much RAM and this can easily explode
in memory for games that create a ton of graphics libraries. Using
serialized NIR shaders help considerably.

This reduces RAM usage in dota2 with GPL from 3GiB to 400MiB.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22143>
2023-03-30 09:02:20 +00:00
Eric Engestrom
5e413f4919 ci/broadcom: slightly increase coverage of vk tests
The previous commit has freed up a couple of runners, so let's repurpose
them to make vk test jobs take less time; with that spare time, let's
increase the coverage a little bit.

Most jobs now take 10-12 minutes, just like they used to.

Stress-tested over 40+ runs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21902>
2023-03-30 08:21:23 +00:00
Eric Engestrom
a96e51382c ci/broadcom: consolidate v3d-rpi4* jobs into a single v3d-rpi4-gl:armhf
Using now 12 instead of 14 runners, most jobs take 11-13 minutes, which
is about the same as when they were all running separately (10-13 min).

Stress-tested over 8 runs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21902>
2023-03-30 08:21:23 +00:00