Commit Graph

154424 Commits

Author SHA1 Message Date
Mike Blumenkrantz 8636717270 zink: add a "compact" descriptor mode
this compacts the ubo+ssbo and samplerview+image sets, enabling zink
to run fully featured with only 4 descriptor sets used

fixes #4964

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz 0adf2dc875 zink: flag descriptor sets as changed before updating hashes
if the program changes, assume the hashes changed

this could probably be improved in the future to check for matching shader
interfaces, but that's a problem for later

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz 851e4d38cb zink: use descriptor set index indirection in cache state updates
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz 5ce79c679d zink: use descriptor set index indirection in program init
should be no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz fe2ba184d8 zink: use descriptor indices in compiler
should be no functional changes, just adding indirection

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz f7eb871efa zink: add screen-based indexing to descriptor sets
this allows indirection for internal descriptor type -> vk descriptor set
and enables more easily altering the descriptor set index at runtime

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz 252cdac5cc zink: create all descriptor ref templates at once
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645>
2022-05-25 04:01:56 +00:00
Mike Blumenkrantz 65e5b589ef zink: clamp dynamic render layerCount to 1
util function unhelpfully returns 0

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16656>
2022-05-25 03:40:05 +00:00
Mike Blumenkrantz c97aee426e zink: only warn once for SRGB fb without KHR_swapchain_mutable_format
Fixes: 4bb45bcd16 ("zink: add error logging for SRGB framebuffer without KHR_swapchain_mutable_format")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16642>
2022-05-25 02:12:33 +00:00
Yiwei Zhang 37764272ab venus: use common entry point for VkPhysicalDeviceMemoryProperties
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16694>
2022-05-24 23:35:28 +00:00
Yiwei Zhang 229538d6da radv: remove VkPhysicalDeviceMemoryProperties2 workaround
This reverts 03888bf09c

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16694>
2022-05-24 23:35:28 +00:00
Yiwei Zhang a19e1f338e vulkan: remove the VkPhysicalDeviceMemoryProperties workaround
cts fix landed in vulkan-cts-1.2.5 while mesa CI has bumped once.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16694>
2022-05-24 23:35:28 +00:00
Michael Skorokhodov 10b6d9230c anv: Update line range
This commit increases the maximum line width to 8.0 for SLK+
and to 7.9921875 for BDW and earlier.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6234
Fixes: fce0027d ("anv: Unbreak wide lines on HSW/BDW")
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15879>
2022-05-24 23:09:26 +00:00
Kenneth Graunke 59bfc9c6cb intel: Fix analysis invalidation in eliminate_find_live_channel
If we saw a HALT instruction, we would forget to invalidate our analysis
pass information before returning progress.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16677>
2022-05-24 22:36:39 +00:00
Marcin Ślusarz 21d3630cbc intel/tools: fix 32-bit build
Fixes: 0aac3b1009 ("intel/tools/aubinator: add support for 2 "new" subopcodes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6553
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16695>
2022-05-24 18:27:32 +00:00
Marcin Ślusarz b95d9bca1d nir: add load_task_payload intrinsic to nir_divergence_analysis
It's divergent depending on sources.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16668>
2022-05-24 17:53:29 +00:00
Marcin Ślusarz 95dbdbf063 nir: add load_mesh_inline_data_intel intrinsic to nir_divergence_analysis
It's not divergent.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16668>
2022-05-24 17:53:29 +00:00
Timur Kristóf 47da245ff2 nir: Add explicit task payload atomic intrinsics.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16693>
2022-05-24 17:21:22 +00:00
Alyssa Rosenzweig d6112acf18 panfrost: Don't allocate SHARED as scanout
This is useless and might cause problems.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Extremely-acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16334>
2022-05-24 17:03:05 +00:00
Alyssa Rosenzweig f625c5a8a0 panfrost: Simplify the kmsro create path
Unify the "create regular resource" and "create scanout resource" code paths.
They only differ in how the backing memory is allocated. This unifies the layout
code as well, avoiding hacks for AFBC.

What I really care about is that, if we're creating the resource, we choose the
layout first with pan_image_layout_init and allocate that layout.
pan_image_layout_init is a common, extensively tested (including unit tested)
helper written for correctness with a deep understanding of the hardware.

By contrast, we currently guess the layout with some hacks specific to AFBC,
allocate our guess, and then then tell pan_image_layout_init to use the layout
we guessed and pray everything works out. (It does work out, but it's all kinds
of wrong, in terms of layering violation. If that really is the way to go, I can
add the required routines to the layout code. But that doesn't seem right.)

All of this is motivated by extending the layout code to handle AFBC with other
superblock sizes or tiled headers without having to pile on extra hacks in this
WSI path.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16334>
2022-05-24 17:03:05 +00:00
Sil Vilerino e5ddd8ad94 meson: Add build option for gallium-d3d12-video feature
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6511
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16597>
2022-05-24 16:36:31 +00:00
Sil Vilerino 4a9e068a6e meson: Update DirectX-Headers dependency to 1.602.0 version with fallback to the wrap
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16597>
2022-05-24 16:36:31 +00:00
Icecream95 a4323b0979 panfrost: Only write depth / stencil once if MRT is used
We can't assume that RT0 will be written, so this has to be based on
whether a combined store has already been emitted, not the location of
the store.

Emit a non-special combined_store intrinsic that only writes colour
for the other RTs, as reordering stores breaks the Midgard compiler.

Fixes: d37e901e35 ("pan/mdg: Add new depth store lowering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6527
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
2022-05-24 16:13:33 +00:00
Icecream95 0a53ebabcd pan/mdg: Read base for combined stores
Fixes depth/stencil writes with MRT.

Fixes: b3d7272753 ("pan/mdg: Don't read base for combined stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
2022-05-24 16:13:33 +00:00
Icecream95 f1a226dd24 pan/bi: Read base for combined stores
Fixes depth/stencil writes with MRT.

Fixes: 996645e479 ("pan/bi: Don't read base for combined stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
2022-05-24 16:13:33 +00:00
Icecream95 9f9ed959bd nir: Add store_combined_output_pan BASE back
It's meaningful for this intrinsic and so does not add noise to the
lowering pass.

(Although dual-source writes must be to RT 0, depth and stencil
writes, which store_combined_output_pan is also used for, can still be
done with MRT enabled.)

Fixes: 5c168f09eb ("nir: Eliminate store_combined_output_pan BASE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
2022-05-24 16:13:33 +00:00
Timur Kristóf 743f4b995d radv: Clarify emitting graphics shader pointers.
Rename radv_emit_global_shader_pointers to radv_emit_graphics_shader_pointers
and don't call it on compute queues. Note that the registers
that this function sets, are not available on the async compute
queue anyway.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16395>
2022-05-24 15:47:13 +00:00
Timur Kristóf 84089d8c8d radv: Refactor queue state to separate structure.
In the future we'll need a 1:N mapping between radv_queue objects and
HW queues, meaning that 1 radv_queue object will need to be able to
submit to multiple queues. To do that, we'll must also maintain a different
state for each HW queue.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16395>
2022-05-24 15:47:13 +00:00
Timur Kristóf 5d3c1f4b41 radv: Pass radv_device pointer to some functions.
This will be needed for a future refactor of these functions
where we won't pass radv_queue to them anymore.
Also remove the radv_queue pointer from functions which
don't actually need it.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16395>
2022-05-24 15:47:13 +00:00
Timur Kristóf 1f2bbfdfca radv: Use a ws variable during preamble creation.
This is to prevent excessive code repetition, and hopefully make the
code a bit easier to read.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16395>
2022-05-24 15:47:13 +00:00
Timur Kristóf 37abbaee36 radv: Introduce ring info structure for queues, refactor preamble generation.
Put the shader ring information into a separate structure.
Also clean up how this information is used when generating the preambles
and add a few comments that explain how it works.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16395>
2022-05-24 15:47:13 +00:00
Viktoriia Palianytsia e39a5f2b9f anv: Add workaround for sample mask with multisampling
The game Batman: Arkham Knight expects OpenGL behavior
with sample mask and multisampling which is different
from the Vulkan one.
This workaround fix changes key->ignore_sample_mask_out
value that is used for
prog_data->uses_omask definition in brv_fs.cpp(9740)
In that way prog_data->uses_omask also changes it value
and the cloak stops flickering.

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

Signed-off-by: Viktoriia Palianytsia <v.palianytsia@globallogic.com>

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16551>
2022-05-24 14:43:57 +00:00
Timur Kristóf 7761b4d89e aco: Fix scratch with task shaders.
Task shaders work like compute shaders, their scratch pointer
is currently located at the first two user SGPRs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16692>
2022-05-24 12:33:49 +00:00
Italo Nicola b634030542 tgsi: Add SEPARABLE_PROGRAM property
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16308>
2022-05-24 11:41:03 +00:00
Samuel Pitoiset 59d246e1c5 radv/ci: fix fails list for NAVI21
Probably a wrong rebase. Also add Vangogh.

Fixes: 72910242a6 ("radv/ci: Skip slow/crashing ray tracing tests")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16690>
2022-05-24 13:14:57 +02:00
Timothy Arceri 1c186580e1 etnaviv: vectorise io
This etnaviv backend code depends heavly on optimisation passes eliminating
all but a single write to shader outputs. Here we make sure that shader
output writes are vectorised.

Fixes: 7647023f3b ("glsl: enable the use of the nir based varying linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6536

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16683>
2022-05-24 09:48:36 +00:00
Timothy Arceri 0a19ae1e98 etnaviv: assert if etna_shader_io_file reg overrun
This code depends on optimisations eliminating all but a single write
to outputs. assert if we are about to overrun the array i.e an
output was possibly written to twice.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6536

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16683>
2022-05-24 09:48:36 +00:00
Konstantin Seurer b2e9e0f2f7 radv: Add fail/flake lists for navi22
This is a copy of the sienna_cichlid ones and
only useful for running vk-cts-image on navi22
cards.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16007>
2022-05-24 08:32:43 +00:00
Konstantin Seurer 5f5882ef08 radv: Enable ray queries by default
Ray queries and acceleration structure builds
are quite stable now and so we can enable those
features for CI and more feedback and bug reports.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16007>
2022-05-24 08:32:43 +00:00
Konstantin Seurer 72910242a6 radv/ci: Skip slow/crashing ray tracing tests
In preparation to enable ray queries by default.
This is also useful for testing ray tracing
pipeline changes with vk-cts-image.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16007>
2022-05-24 08:32:43 +00:00
Marcin Ślusarz 8187716b55 intel/tools: add macros for gfx12+ variant of VCSUNIT0
Not used for now.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16664>
2022-05-24 08:03:45 +00:00
Marcin Ślusarz ba80c36708 intel/tools/aubinator: list all platforms in help message
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16664>
2022-05-24 08:03:45 +00:00
Marcin Ślusarz 0aac3b1009 intel/tools/aubinator: add support for 2 "new" subopcodes
... and add macros for subopcodes we haven't seen yet

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16664>
2022-05-24 08:03:44 +00:00
Marcin Ślusarz 43ad5fd9b7 intel/tools: drop wrappers around mmio regs macros
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16664>
2022-05-24 08:03:44 +00:00
Marcin Ślusarz b916b30f58 intel/tools: clean up mmio regs definitions
Each unit has the same regs at the same offsets.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16664>
2022-05-24 08:03:44 +00:00
Marcin Ślusarz 3910736f29 intel/tools: add support for GEM_CREATE_EXT in intel_dump_gpu
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16664>
2022-05-24 08:03:44 +00:00
Konstantin Seurer d5023027a4 radv: Replace nir_vector_extract with nir_channel
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16650>
2022-05-24 06:44:27 +00:00
Konstantin Seurer 182f1d44a0 radv: Add and use radv_bvh_node_type
We use magic numbers for node types in many
places of the RADV code. This commit adds an enum
for the node types and uses it to replace magic
numbers in the acceleration structure build code.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16650>
2022-05-24 06:44:27 +00:00
Vasily Khoruzhick 2cad65d220 lima: enable PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT
It looks like we don't need to do anything special to enable it.

Piglit spec@arb_buffer_storage@bufferstorage-persistent skip: 16 =>
skip: 12, pass: 4. The rest require GL_ARB_shader_image_load_store

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16660>
2022-05-23 14:21:08 -07:00
Vasily Khoruzhick 73851e3f44 lima: Implement texture_barrier
Improves x11perf -copywinwin100 from ~1520/sec to ~3700/sec

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16658>
2022-05-23 21:08:49 +00:00