Commit Graph

151119 Commits

Author SHA1 Message Date
Connor Abbott 5ba3ea1eb3 tu: Rewrite dynamic descriptor handling
We need to prepare for storage buffers having different sizes from
uniform buffers. This switches dynamic_offset_offset to have units of
bytes, the same as offset, and as a nice bonus we can more easily
combine the dynamic and non-dynamic paths in various different places.
This also entails rewriting the code that patches dynamic descriptors,
since we can no longer assume a linear mapping between indices in
dynamicOffsets and descriptor locations which the previous approach
heavily relied on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
2022-03-15 21:36:38 +00:00
Mike Blumenkrantz 6f7f6df287 zink: export indirect io pipe caps
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
2022-03-15 21:25:05 +00:00
Mike Blumenkrantz 02569428a8 zink: fix unreachable() location in ntv streamout info
super annoying to debug otherwise

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
2022-03-15 21:25:05 +00:00
Mike Blumenkrantz b53ee02192 zink: add DOUBLE glsl type for streamout export
not used yet but someday

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
2022-03-15 21:25:05 +00:00
Mike Blumenkrantz 68267aeab8 zink: add nir_var_function_temp support to ntv
I said I'd never do this, but here we are

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
2022-03-15 21:25:05 +00:00
Emma Anholt eb9b092001 turnip: Enable VK_EXT_display_control using the common code.
It's all implemented now, so we can turn it back on.  Passes 15/16 tests
when X11 isn't running, and 1/16 when it is, with no failures in either
mode.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15351>
2022-03-15 20:08:58 +00:00
Samuel Pitoiset 10d69d5f0b radv: fix returning empty drmFormatModifierTilingFeatures
From the Vulkan spec:
    "drmFormatModifierTilingFeatures is a bitmask of
     VkFormatFeatureFlagBits that are supported by any image created
     with format and drmFormatModifier. The returned
     drmFormatModifierTilingFeatures must contain at least one bit."

This fixes recent CTS dEQP-VK.drm_format_modifiers.*.

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/15383>
2022-03-15 19:43:48 +00:00
Samuel Pitoiset dc247e5d43 radv: remove VK_AMD_shader_info support
This extension is quite old and useless now.
VK_KHR_pipeline_executable_properties should be used instead.

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/15299>
2022-03-15 19:23:53 +00:00
Bas Nieuwenhuizen a0ccc46969 radv: Expose VK_VALVE_descriptor_set_host_mapping for vkd3d only.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>
2022-03-15 18:52:41 +00:00
Hans-Kristian Arntzen 86a7b5e276 radv: Implement VK_VALVE_descriptor_set_host_mapping.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>
2022-03-15 18:52:41 +00:00
Bas Nieuwenhuizen 6c0bc7eb07 vk: Update xml and headers to 1.3.207.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>
2022-03-15 18:52:41 +00:00
Dave Airlie c6ac3e017d llvmpipe/fs: add missing depth_clamp key printing
Helps debugging shaders better.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15385>
2022-03-15 18:35:20 +00:00
Mike Blumenkrantz 1b2c4d7196 lavapipe: KHR_shader_integer_dot_product
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15384>
2022-03-15 18:07:47 +00:00
Mike Blumenkrantz 4cf9e24039 gallivm: implement nir_op_pack_32_4x8_split
just reusing existing helpers and llvm can optimize it for us

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15384>
2022-03-15 18:07:47 +00:00
Mike Blumenkrantz a33a07bd06 lavapipe: maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz b2f69a8bb8 lavapipe: set maxBufferSize for maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz 987e8a5a0c lavapipe: implement vkGetDevice*MemoryRequirements
for maint4

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz 49cac7b33d lavapipe: ref/unref pipeline layouts for pipeline creation
required by maintenance4

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
2022-03-14 21:30:13 -04:00
Mike Blumenkrantz 2f9976debc lavapipe: always clone shader nir for shader states
these become owned and freed by llvmpipe, so ensure that freeing
them there won't cause crashes

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15281>
2022-03-15 00:58:22 +00:00
Jason Ekstrand 2170c3ac63 panvk: Use the correct integer border colors
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
2022-03-14 23:04:09 +00:00
Jason Ekstrand 8dd917b9f0 panvk: Rework texture, sampler, and image binding index calculation
This adds a new get_resource_deref_binding helper which decodes a
resource deref into set, binding, and index.  To make texture
instructions nicer, the index can optionally be split into immediate
and SSA parts.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
2022-03-14 23:04:09 +00:00
Jason Ekstrand 17e79b044e panvk: Skip ZS setup if there is no depth/stencil attachment
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
2022-03-14 23:04:09 +00:00
Jason Ekstrand 4f843db0a1 panvk: Make panvk_image_view derive from vk_image_view
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
2022-03-14 23:04:09 +00:00
Jason Ekstrand 1865b7a93e panvk: Make panvk_image derive from vk_image
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
2022-03-14 23:04:09 +00:00
Eric Engestrom 5dbbc0f0a8 Revert "glx: Fix build errors with --enable-mangling (v2)"
This reverts commit a27f2d991b.

As of a0829cf23b ("GL: drop symbols mangling support"), this
extra complexity isn't needed anymore.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2298>
2022-03-14 22:14:25 +00:00
Igor Torrente f30334b6c4 Venus: add VN_CMD_ENQUEUE to vn_cmd_encode_memory_barriers
Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
2022-03-14 21:47:19 +00:00
Igor Torrente a65d2ef1c1 Venus: Adjust VN_CMD_ENQUEUE to set VN_COMMAND_BUFFER_STATE_INVALID
This improves the issue of a return inside the macro.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
2022-03-14 21:47:19 +00:00
Igor Torrente 6cdbc0299a Venus: Add VN_CMD_ENQUEUE macro with vkCmd* common code
Several `vn_Cmd` share the same code to enqueue the command to the
command stream.

This adds a macro with this common code.

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
2022-03-14 21:47:19 +00:00
Samuel Pitoiset 1dfee91fdf radv: export the pipeline hash via VK_KHR_pipeline_executable_properties
This will help to match RGP<->Fossilize pipelines.

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/15279>
2022-03-14 20:20:40 +00:00
Rhys Perry c4cf92cad7 radv,aco,ac/llvm: fix indirect dispatches on the compute queue on GFX7-10
Since neither PKT3_LOAD_SH_REG_INDEX nor PKT3_COPY_DATA work with compute
queues on GFX7-10, we have to load the dispatch size from memory in the
shader.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15064>
2022-03-14 19:54:36 +00:00
Rhys Perry 973967c49d aco: split and recombine unaligned sgpr inputs
An example is the num_work_groups argument. Fixes invalid assembly with
func.compute.num-workgroups.basic.q0

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15064>
2022-03-14 19:54:36 +00:00
Juan A. Suarez Romero 000b935c50 v3dv/ci: add test to skip list
Add test that it is a timeout in the CI, but otherwise it passes.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15374>
2022-03-14 18:55:13 +00:00
Boris Brezillon ff8aa15fa0 panvk: Add support for texel buffers
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15334>
2022-03-14 18:06:01 +00:00
Boris Brezillon 9dc8382de8 panvk: Add a dummy sampler for NIR tex operations that don't take one
In the NIR domain, some texture operations don't require a sampler, but
Bifrost/Midgard always want one. Let's add a dummy sampler to handle
that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15334>
2022-03-14 18:06:01 +00:00
Jason Ekstrand a35e721162 panvk: Stop advertising Vulkan 1.1
We're nowhere close to even having Vulkan 1.0 working yet, there's no
reason to get too excited about 1.1.  It just means piles more test
crashes for features we're claiming to support but don't.  If we want to
enable more tests, we can turn on the extensions for those features once
we actually have them working.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15334>
2022-03-14 18:06:01 +00:00
Erik Faye-Lund dd9b8881e0 Revert "ci: downgrade sphinx to v3.x"
The readthedocs theme now supports Sphinx 4.x, so there's no longer any
reason to stick with 3.x.

This reverts commit a545b6eda0.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15212>
2022-03-14 17:21:57 +00:00
Icecream95 d5870c45ae panfrost: Optimise recalculation of max sampler view
Previously we always searched through 128 sampler views for set
sampler views, now we never look above the maximum updated view.

Fixes: 304851422a ("panfrost: Fix set_sampler_views for big GL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15366>
2022-03-14 16:33:40 +00:00
Icecream95 3e405afeb9 panfrost: Don't initialise the trampolines array
PIPE_MAX_SHADER_SAMPLER_VIEWS is 128, so we just end up initialising a
kilobyte of memory for no reason, when usually only a couple of
sampler views are used.

Fixes: 53ef20f08d ("panfrost: Handle NULL sampler views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15366>
2022-03-14 16:33:40 +00:00
Samuel Pitoiset b003a101ee radv: stop zeroing radv_sample_locations_state in barriers
This is useless because all fields should be correctly filled if the
pNext struct is found.

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/15164>
2022-03-14 12:45:29 +00:00
Samuel Pitoiset 612a12a42c radv: move waiting for events to CmdWaitEvents2KHR()
CmdPipelineBarrier doesn't have events.

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/15164>
2022-03-14 12:45:29 +00:00
Samuel Pitoiset c6d776f092 radv: remove unnecessary check in FreeCommandBuffers()
cmd_buffer->pool should never be NULL. Even if AllocateCommandBuffers()
fails, the successfully created cmdbuffers would have it set correctly.

From the Vulkan spec:

    "VUID-vkFreeCommandBuffers-pCommandBuffers-parent
     Each element of pCommandBuffers that is a valid handle must have
     been created, allocated, or retrieved from commandPool."

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/15164>
2022-03-14 12:45:29 +00:00
Samuel Pitoiset 01ec899083 radv: remove unnecessary NULL check in TrimCommandPool()
This function seems rarely used or maybe never but I noticed this.

From the Vulkan spec:

    "VUID-vkTrimCommandPool-commandPool-parameter
     commandPool must be a valid VkCommandPool handle".

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/15164>
2022-03-14 12:45:29 +00:00
Samuel Pitoiset 269b1232ee radv: remove useless check in radv_cmd_buffer_upload_data()
ptr shouldn't be NULL.

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/15164>
2022-03-14 12:45:29 +00:00
Samuel Pitoiset 0eaf9dbce3 radv: fix compatibility with VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
Some formats can be accepted if a compatible format is also supported
and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT used.

Fixes new CTS dEQP-VK.image.extended_usage_bit_compatibility.*.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6046
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/15063>
2022-03-14 11:16:33 +00:00
Samuel Pitoiset 42f84a5886 radv: update inputs_read when lowering the view index
Otherwise inputs_read doesn't contain the information. This shouldn't
fix anything in practice because radv_shader_info gathers this from
the variable.

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/15337>
2022-03-14 10:26:41 +00:00
Ernst Sjöstrand e5f3689cff intel/compiler: Fix non-trivial designated initializer
Not supported by GCC 7.

src/compiler/nir/nir_builder_opcodes.h:14156:118:
sorry, unimplemented: non-trivial designated initializers not supported
src/intel/compiler/brw_mesh.cpp:515:7:
note: in expansion of macro ‘nir_store_per_primitive_output’

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Fixes: bc4f8c073a ("intel/compiler: inject MUE initialization")
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15360>
2022-03-14 09:56:04 +00:00
Samuel Pitoiset d7514c5f04 radv: stop waiting for DMA to be idle for all transfer operations
Only copy operations actually use CP DMA.

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/15194>
2022-03-14 09:36:28 +00:00
Gert Wollny 1b354ab913 Revert "llvmpipe: allow vertex processing and fragment processing in parallel"
This reverts commit ec8104c6b2.
  llvmpipe: allow vertex processing and fragment processing in parallel

The commit breaks the the virglrenderer vtest environment used in the
virglrednerer CI and running wayland in virtualized environments.

Related: #6130
Related: #6110

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15338>
2022-03-14 09:22:22 +00:00
Samuel Pitoiset 5f3d3be24a radv: fix indirect dispatches on the compute queue on GFX10.3+
For weird reasons, the COPY_DATA packet doesn't seem to copy anything
while on the compute queue. Instead, use PKT3_LOAD_SH_REG_INDEX which
seems to work as expected.

Note that LOAD_SH_REG_INDEX on the compute queue is only supported by
the CP on GFX10.3, so we need to implement a different solution (load
from the indirect BO in the shader) for older generations.

This should fix the Control RT GPU hang.

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/15053>
2022-03-14 08:54:23 +00:00
Samuel Pitoiset 53ccfbb996 amd: add PKT3_LOAD_SH_REG_INDEX
It seems only available on GFX8+.

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/15053>
2022-03-14 08:54:23 +00:00