Commit Graph

160716 Commits

Author SHA1 Message Date
Mike Blumenkrantz
76a4d5ce89 vulkan: Update the XML and headers to 1.3.230
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
691ec62452 vulkan: Use altlen when available for array lengths
When the array length is a calculation, the C version of the calculation
is provided in altlen while len often contains LaTeX that we can't do
anything with.  Use altlen when available.  Also, while we're here, wrap
array lengths in parentheses in case they contain math.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
2022-09-29 05:00:10 +00:00
Filip Gawin
1a03788195 gallium: avoid using float based conditions in loops
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12996>
2022-09-29 04:26:37 +00:00
Mike Blumenkrantz
5650d67242 zink: pass actual screen->threaded to zink_tc_context_unwrap()
using the ctx->screen pointer may not actually yield a zink_screen object

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
2022-09-28 23:13:44 +00:00
Mike Blumenkrantz
267d715efb zink: hook up VK_EXT_depth_clamp_zero_one
this is required for GL since the allowable depth range is always [0,1]

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
2022-09-28 23:13:44 +00:00
Mike Blumenkrantz
3d4c8b55e8 zink: move create_pipeline_lib to zink_program.c
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
2022-09-28 23:13:44 +00:00
Mike Blumenkrantz
2136047624 zink: rework ZINK_PIPELINE_LIBRARY_FORCE into ZINK_DEBUG flag
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
2022-09-28 23:13:44 +00:00
Mike Blumenkrantz
e1314e682e zink: move zink_screen_get_pipeline_cache() calls out to callers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18868>
2022-09-28 23:13:44 +00:00
Jason Ekstrand
2044f2910c vulkan/wsi: Add a supports_scanout flag
This flag indicates whether or not the legacy scanout flag is supported.
It defaults to true since that has been the default assumption for the
WSI code up until now.

On NVIDIA hardware, we can't render to linear so, if we don't have
modifiers, we want to automatically fall back to the blit path.  In
theory, we could do this inside the driver but it's a giant pain and
much harder to ensure that the blit only happens as part of
vkQueuePresent().

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
15fca5ca7e vulkan/wsi: Add a typedef for memory type select callbacks
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
39f81564ab vulkan/wsi: Don't expose as many image configure helpers
Now that everything is going through the params-based ones, we don't
need to expose the individual ones.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
43c1c2b888 vulkan/wsi: Always configure images in wsi_swapchain_init()
Now that all the back-ends are converted, we can drop all the extra code
we had for supporting both paths.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
5424049e66 vulkan/wsi/win32: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
76d15717e3 vulkan/wsi/display: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
c315e20d61 vulkan/wsi/wayland: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
8775f08bf1 vulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Jason Ekstrand
29e3fc8eb1 vulkan/wsi: Support configuring swapchain images as part of swapchain init
The eventual goal here is to move as much of the prime and blit logic
out of the individual window-system back-ends as possible.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18826>
2022-09-28 21:35:12 +00:00
Dave Airlie
bfa08a1681 llvmpipe/cs: move compute code to explicit pointer types
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:08:10 +10:00
Dave Airlie
1d6819bf5b llvmpipe/setup: move setup code to explicit pointers.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:08:07 +10:00
Dave Airlie
977476bb05 llvmpipe/fs: fix invocations access for opaque ptrs.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:08:03 +10:00
Dave Airlie
98efdc449d llvmpipe/cs: convert cs thread data to opaque friendly api
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:07:59 +10:00
Dave Airlie
dd60813657 llvmpipe/cs: convert cs context to opaque friendly api
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:07:56 +10:00
Dave Airlie
a8bd993809 llvmpipe/fs: convert linear context to opaque pointers friendly
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:07:51 +10:00
Dave Airlie
f0e9d3e497 llvmpipe/fs: convert thread data ptr to opaque ptr friendly apis
this converts the thread data code.

The cache code still isn't fixed but needs future API changes
to sampling code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:07:47 +10:00
Dave Airlie
1a7250ad96 llvmpipe/fs: start passing explicit context pointer type.
In order to support opaque pointers in the future, we need to be
more explicit with the pointer types here.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29 07:06:38 +10:00
nyanmisaka
ae201bcd42 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>
2022-09-28 19:39:11 +00:00
LingMan
521da0360a docs/rusticl: Document minimum required bindgen version
rusticl requires at least bindgen 0.58.0 to build.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18834>
2022-09-28 18:34:27 +00:00
LingMan
13016d22c5 rusticl/bindgen: Use allowlist-* instead of whitelist-* switches
bindgen 0.58.0 deprecated the `whitelist-*` switches in favor of the new `allowlist-*` switches.
Currently rusticl uses a mixture of both.

Consistently move to the newer versions.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18834>
2022-09-28 18:34:27 +00:00
Corentin Noël
5537f778a0 gallivm: avoid the use of an uninitialized value
When need_derivs is false, lp_build_cube_lookup does not set the value of
derivs_out which means that the stack is not initialized but its pointer
is then used.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18635>
2022-09-28 18:09:55 +00:00
Mike Blumenkrantz
3ed712f748 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>
2022-09-28 15:37:20 +00:00
Mike Blumenkrantz
440c1e3702 zink: always unflag unordered_write when binding image descriptors
image descriptors have to maintain their layout, which means it's no
longer possible to reorder any operations once they use a non-transfer
layout

Fixes: ca03e35821 ("zink: expand unordered_exec")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18727>
2022-09-28 15:37:20 +00:00
Mike Blumenkrantz
4c58b92e44 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>
2022-09-28 14:30:10 +00:00
Mike Blumenkrantz
0de63e9774 aux/trace: dump line_rectangular member of rasterizer state
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>
2022-09-28 14:30:10 +00:00
Konstantin Seurer
7c6f407d4c radv: Add and use AS and scratch layout structs
The memory layout logic is duplicated between
radv_GetAccelerationStructureBuildSizesKHR and
radv_CmdBuildAccelerationStructuresKHR. This patch adds a helper that
computes the scratch and acceleration structure memory layout for a
given build configuration.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18842>
2022-09-28 12:28:01 +00:00
Samuel Pitoiset
bad75ed3f1 radv: fix emitting RBPLUS state when MRTs are compacted
The RBPLUS state needs the non-compacted SPI_SHADER_COL_FORMAT value,
otherwise the state is wrongly emitted if there is holes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7348
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7319
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7365
Fixes: 8fcb4aa0eb ("radv: compact MRTs to save PS export memory space")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18818>
2022-09-28 11:48:16 +00:00
Bas Nieuwenhuizen
1dd5d94f65 radv: Do an early check of distance in triangle culling.
Culls like 99% of the triangles that are culled at all.

Reduces VALU usage in Q2RTX traversal by ~8%, though doesn't look
like VALU is a bottleneck at this point ...

For Control we get a ~5% reduction in VALU usage, but similarly it
doesn't look like a bottleneck.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18830>
2022-09-28 11:08:28 +00:00
Pierre-Eric Pelloux-Prayer
e06c332bf7 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>
2022-09-28 10:20:10 +00:00
Pierre-Eric Pelloux-Prayer
8af8dc97bc 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>
2022-09-28 10:20:10 +00:00
Lionel Landwerlin
582bf4d9f7 anv: flag BO for write combine when CPU visible and potentially in lmem
This should fix a performance regression with the internal kernel
branch which does not support the upstream I915_MMAP_OFFSET_FIXED.

With I915_MMAP_OFFSET_FIXED we defer the mapping flags to the kernel
since it knows better where buffers are going to end up (lmem or smem).

The internal kernel doesn´t have that and there we should use write
combined for anything that can be in lmem.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>
2022-09-28 09:51:31 +00:00
Mark Janes
c8f563b633 anv: Allocate buffers with write-combined local memory
Marginally improves DG1 performance (< 1%)

v2: Only on local mem (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>
2022-09-28 09:51:31 +00:00
Mark Janes
5c62ad34b6 anv: Use WC mapped local memory for block pool BO
Improve DG1 performance:

  Fallout: +7%
  Talos:  +15%

v2: Don't drop SNOOP (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>
2022-09-28 09:51:31 +00:00
Mark Janes
755b413ffa anv: Track BOs that need a write-combined mapping
v2: simplify logic a bit (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>
2022-09-28 09:51:31 +00:00
Daniel Schürmann
97850c0bf0 aco/opt_value_numbering: use monotonic_allocator for unordered_map
This patch also changes the rename map to unordered.
Roughly halves the time spent on CSE in ACO.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>
2022-09-28 09:25:20 +00:00
Daniel Schürmann
b39d2168a7 aco: implement allocator_traits for monotonic_allocator<T>
For easier usage, this patch also adds aliases for std::map
and std::unordered_map using this allocator.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>
2022-09-28 09:25:20 +00:00
Daniel Schürmann
a128d444cb aco: use monotonic_buffer_resource for instructions
As monotonic_buffer_resource is not thread-safe,
we use a thread_local instance which gets allocated once.

This change reduces the compile time spent in ACO by
approximately 10%.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>
2022-09-28 09:25:20 +00:00
Daniel Schürmann
15b3cc73bf aco: implement custom memory resource
This basic allocator implements an arena allocation strategy
and cannot free individual allocations.
It is intended for very fast memory allocations in situations
where memory is used to build up a few objects and then is
released all at once.

This class mimics std::pmr::monotonic_buffer_resource.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>
2022-09-28 09:25:20 +00:00
Daniel Schürmann
0b76e22a96 aco: simplify operands_offset calculation in create_instruction()
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>
2022-09-28 09:25:20 +00:00
Kenneth Graunke
a778f3edd3 blorp: Fix typo in blorp_xy_block_copy_blt
suppotred -> supported (Thanks to Tapani for catching this.)

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>
2022-09-28 08:41:35 +00:00
Kenneth Graunke
759d51c367 blorp: Implement blitter clears via XY_FAST_COLOR_BLT
Vulkan transfer queues need this functionality.  A lot of the code is
pretty similar to what we have for XY_BLOCK_COPY_BLT.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>
2022-09-28 08:41:35 +00:00
Kenneth Graunke
5f4ad65daf blorp: Make blitter_supports_aux accessible from multiple files.
We'll want it in blorp_clear.c shortly.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>
2022-09-28 08:41:35 +00:00