Samuel Pitoiset
a63a31a47b
radv: remove NULL checks when binding a graphics pipeline
...
The driver no longer bind NULL graphics pipelines, so these checks
are useless.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18873 >
2022-09-29 14:44:47 +00:00
Connor Abbott
1ca8930845
tu: Fix setting RB_DEPTH_CNTL::Z_CLAMP_ENABLE
...
I missed this when enabling pipeline libraries, and we were also setting
this to the wrong thing. Previously we were using rasterization state
when parsing depth/stencil indirectly via builder->depth_clip_disable,
which is not allowed with pipeline libraries. Fixing this is a bit
painful because now RB_DEPTH_CNTL can depend on state from both the
fragment shader library and the pre-rasterization library, in addition
to being disabled via output interface state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861 >
2022-09-29 10:47:52 +00:00
Connor Abbott
0b131b3e99
freedreno/a6xx, tu: GRAS_CL_CNTL::UNK5 is Z_CLAMP_ENABLE
...
This changes the behavior for freedreno but it should ultimately be the
same for GL/GLES, given what mesa/st does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861 >
2022-09-29 10:47:52 +00:00
Connor Abbott
5af6dad179
Revert "freedreno,ir3: rename Z_CLAMP_ENABLE to Z_CLIP_DISABLE"
...
This reverts commit 6cb41c5188
. It was
incorrect and the issue it was trying to fix was actually a zink bug.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861 >
2022-09-29 10:47:52 +00:00
Mike Blumenkrantz
7308996921
lavapipe: dynamic state3
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878 >
2022-09-29 05:00:10 +00:00
Jason Ekstrand
092be5a329
vulkan: Add more dynamic color blend states
...
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
Jason Ekstrand
1deb83fb86
vulkan: Add more dynamic multisample states
...
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
Jason Ekstrand
1fee04d8ff
vulkan: Add dynamic state for tessellation domain origin
...
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
Jason Ekstrand
9d0ed9cbcc
vulkan: Add more dynamic rasterizer state
...
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
Jason Ekstrand
effd9962d9
vulkan: Add a dynamic state for vp.depth_clip_negative_one_to_one
...
This is the last bit of viewport state that's not dynamic. Making it
dynamic will help ANV out a bit.
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
Jason Ekstrand
10bc2cd3ae
vulkan: Rename viewport_state::negative_one_to_one
...
This makes it a bit clearer what it's for.
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
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