Timur Kristóf [Tue, 24 Jan 2023 17:53:52 +0000 (18:53 +0100)]
nir: Add pack_half_2x16_rtz_split opcode.
Same as pack_half_2x16_rtz_split, but always uses RTZ mode.
Note that pack_half_2x16 rounding mode is unspecified.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15838>
Lionel Landwerlin [Wed, 21 Dec 2022 18:16:27 +0000 (20:16 +0200)]
intel/fs: drop FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GFX7
We can lower FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD into other more
generic sends and drop this internal opcode.
The idea behind this change is to allow bindless surfaces to be used
for UBO pulls and why it's interesting to be able to reuse
setup_surface_descriptors(). But that will come in a later change.
No shader-db changes on TGL & DG2.
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/20416>
Erico Nunes [Wed, 11 Jan 2023 12:50:48 +0000 (13:50 +0100)]
lima/ci: Add more piglit unsupported tests to skip
It is not an exhaustive list but it helps by reducing the bulk of
"Failed to create waffle_context for OpenGL [34].x" errors in the logs
by thousands of occurrences and those are probably not going to be
needed.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20909>
Jose Fonseca [Mon, 16 Jan 2023 14:20:04 +0000 (14:20 +0000)]
llvmpipe: Ensure floating point SSE state is reset regardless of the write mask.
The code emitted by lp_build_fpstate_set to reset the FP state could be
jumped over when the write mask was zero, leading to denormals not being
flushed to zero.
Spotted by Roland Scheidegger.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20901>
Samuel Pitoiset [Wed, 25 Jan 2023 08:30:48 +0000 (09:30 +0100)]
radv: fix ignoring graphics shader stages that don't need to be imported
If a shader stage is already imported from a library it should be
properly ignored.
Fixes recent CTS dEQP-VK.pipeline.fast_linked_library.misc.unused_shader_stages*.
Fixes:
c8765c5244a ("radv: ignore shader stages that don't need to be imported with GPL")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20899>
Samuel Pitoiset [Tue, 24 Jan 2023 17:04:13 +0000 (18:04 +0100)]
radv: fix creating libraries with PS epilog and all CB states as dynamic
It's legal to create a library with FRAGMENT_OUTPUT_INTERFACE and with
all CB states as dynamic, in this case the PS epilog should be dynamic.
This fixes a bunch of regressions while running Zink/RADV CTS with
RADV_PERFTEST=gpl.
Zink is the final boss.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20882>
Iago Toral Quiroga [Mon, 23 Jan 2023 09:57:40 +0000 (10:57 +0100)]
v3dv: add a cl_advance_and_end helper
For the common case where we're emitting packet we don't need to
update the cl_out pointer and then store the result in cl->next,
we can directly update cl->next.
This shows a small improvement in vkoverhead's scores for basic
draw tests.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20897>
Jesse Natalie [Wed, 25 Jan 2023 20:24:56 +0000 (12:24 -0800)]
dzn: Support Vulkan 1.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 22:56:22 +0000 (14:56 -0800)]
dzn: Ensure we don't mix DSV+simultaneous-access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 21:16:47 +0000 (13:16 -0800)]
dzn: Enhanced barriers fixes/workarounds
Fix: Acquire/release should have one valid access/sync and one set
to none.
Workaround: D3D doesn't like simultaneous access resources leaving
COMMON layout, nor does it like setting UAV/RTV access bits for the
COMMON layout.
Use UNDEFINED -> UNDEFINED layout transitions, where the access bits
just aren't validated.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 20:24:45 +0000 (12:24 -0800)]
dzn: Always do clears with copies on non-graphics queues
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 20:20:01 +0000 (12:20 -0800)]
dzn: Support float control
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 17:03:52 +0000 (09:03 -0800)]
dzn: Cache GPUVA for buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 17:02:35 +0000 (09:02 -0800)]
dzn: Handle separate stencil usage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 16:48:18 +0000 (08:48 -0800)]
dzn: Fix dynamic rendering clear load op for non-multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Jesse Natalie [Wed, 25 Jan 2023 20:18:01 +0000 (12:18 -0800)]
microsoft/compiler: Support float controls
Float controls are emitted as function attributes on the entrypoint.
These function attributes are not the standard build-in LLVM kind, but
are strings, which the DXIL backend didn't know how to emit. So, this
change adds string attribute support and uses it for fp32 ftz/preserve.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20919>
Timur Kristóf [Tue, 31 May 2022 19:13:36 +0000 (21:13 +0200)]
aco: Remove dynamic VS input loads.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20733>
Timur Kristóf [Mon, 16 Jan 2023 21:22:03 +0000 (22:22 +0100)]
radv: Lower dynamic VS inputs in NIR.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20733>
Timur Kristóf [Tue, 10 Jan 2023 18:15:25 +0000 (19:15 +0100)]
aco: Enable constant exec mask based optimization on compute shaders.
We know for sure exec is initially -1 when the shader always has full subgroups.
Fossil DB stats on GFX11:
Totals from 3884 (2.88% of 134913) affected shaders:
SpillSGPRs: 1673 -> 1697 (+1.43%); split: -1.67%, +3.11%
SpillVGPRs: 2316 -> 2310 (-0.26%); split: -0.65%, +0.39%
CodeSize:
19584436 ->
19567156 (-0.09%); split: -0.13%, +0.04%
Scratch: 217088 -> 216832 (-0.12%)
Instrs: 3784596 -> 3780303 (-0.11%); split: -0.15%, +0.03%
Latency:
39971204 ->
39794967 (-0.44%); split: -0.47%, +0.03%
InvThroughput: 7885552 -> 7801247 (-1.07%); split: -1.14%, +0.07%
VClause: 74654 -> 74611 (-0.06%); split: -0.07%, +0.01%
SClause: 103139 -> 103043 (-0.09%); split: -0.13%, +0.04%
Copies: 279864 -> 281995 (+0.76%); split: -0.72%, +1.48%
Branches: 92082 -> 92084 (+0.00%); split: -0.03%, +0.03%
PreSGPRs: 155637 -> 149491 (-3.95%)
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/20670>
Timur Kristóf [Tue, 10 Jan 2023 11:58:52 +0000 (12:58 +0100)]
radv, aco: Add uses_full_subgroups to compute shader info.
Allow the compiler to assume that the shader always has full subgroups,
meaning that the initial EXEC mask is -1 in all waves (all lanes enabled).
This assumption is incorrect for ray tracing and internal (meta) shaders
because they can use unaligned dispatch.
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/20670>
Timur Kristóf [Fri, 20 Jan 2023 16:04:20 +0000 (17:04 +0100)]
radv: Get rid of app_shaders_internal.
This will make sure the internal field is set to true for internal
shaders which are initialized outside of radv_device_init_meta.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20670>
Friedrich Vock [Fri, 20 Jan 2023 21:17:48 +0000 (22:17 +0100)]
vulkan/rmv: Remove delta parameter from dump helpers
It was unused.
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>
Friedrich Vock [Fri, 20 Jan 2023 21:17:12 +0000 (22:17 +0100)]
vulkan/rmv: Use the timestamp divisor instead of a hardcoded value
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>
Friedrich Vock [Fri, 20 Jan 2023 20:19:28 +0000 (21:19 +0100)]
radv/rmv: Correct timestamp shifting
The shifting was off-by-one compared to how it is done in the kernel. Also, excess_length needs to be casted to uint64_t to prevent zeroing everything except the 5 LSBs.
Fixes:
abf3bcd6 ("radv: Add RMV resource tracking")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>
Friedrich Vock [Fri, 20 Jan 2023 20:14:44 +0000 (21:14 +0100)]
radv/rmv: Log bo destruction before freeing it
Fixes:
abf3bcd6 ("radv: Add RMV resource tracking")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>
Friedrich Vock [Wed, 18 Jan 2023 17:46:55 +0000 (18:46 +0100)]
radv/rmv: Avoid more CPU unmap deadlocks
Fixes:
8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>
Friedrich Vock [Wed, 18 Jan 2023 17:14:37 +0000 (18:14 +0100)]
radv/rmv: Also check the other pid field
Sometimes it seems like this field contains the correct pid instead.
Fixes:
8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20820>
Emma Anholt [Sun, 10 Jul 2022 03:22:35 +0000 (20:22 -0700)]
ci: Add manual rules variations to disable irrelevant driver jobs.
If you're only affecting one or a couple of drivers, it would be nice if
your pipeline buttons on the web UI weren't full of manual run buttons for
all the other drivers.
This is a bunch of duplicated lines, but less than it could have been now
that we have !references.
In some of these cases (i915g, nouveau, etnaviv), we have no non-manual
jobs for those drivers, so I could have just rewritten the original
"driver-rules" to "driver-manual-rules". I decided to keep things
consistent between drivers, though, because this is all esoteric enough to
readers already without making different drivers' rules look different.
Fixes: #4891
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17445>
Emma Anholt [Tue, 22 Nov 2022 19:49:47 +0000 (11:49 -0800)]
ci: Move the performance jobs' allow_failure:true to the gl rules.
This helps clarify what's going on with these magic manual jobs.
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17445>
Lionel Landwerlin [Wed, 25 Jan 2023 18:16:23 +0000 (20:16 +0200)]
vulkan/wsi/wayland: improve same gpu detection
Some compositor like KWin do not return the render node.
v2: Make sure we test if only drm_info.hasPrimary is true (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
db42ed1e04 ("vulkan/wsi/wl: correctly find whether the compositor uses the same GPU")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8139
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20914>
Adam Stylinski [Mon, 23 Jan 2023 02:07:22 +0000 (21:07 -0500)]
mesa: fix out of bounds stack access on big endian
The texture format code relies on a python-generated atlas of structs
that describe a lookup table for texture swizzling. Many of these
texture formats contain the index "6" used for this lookup. The 6th
index just so happens to represent a "don't care" value, however the
out of bounds read is still best to be avoided. The address sanitizer
finds this issue pretty immediately but it only shows up on big endian
because the textures don't need this on little.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20846>
Sidney Just [Wed, 25 Jan 2023 22:14:44 +0000 (14:14 -0800)]
zink: Fix non debug builds failing to compile on
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20917>
Francisco Jerez [Tue, 27 Sep 2022 22:28:48 +0000 (15:28 -0700)]
intel/fs: Fix src and dst types of LOAD_PAYLOAD ACP entries during copy propagation.
The ACP entries created by copy propagation to track the implied
copies of LOAD_PAYLOAD instructions don't model the behavior of
LOAD_PAYLOAD correctly, since (as of
41868bb6824c6106a55c844) header
moves are implicitly retyped to UD and the destination of non-header
copies implicitly uses the same type as the corresponding source, even
though the ACP entries created for such copies could incorrectly
represent a type conversion, which can lead to mis-optimization of the
program.
According to Marcin, this fixes the func.mesh.ext.workgroup_id.task.q0
crucible test.
Fixes:
41868bb6824c6106a55c844 ("i965/fs: Rework the fs_visitor LOAD_PAYLOAD instruction")
Reported-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18980>
Chad Versace [Fri, 9 Dec 2022 17:41:30 +0000 (09:41 -0800)]
docs: Lower Python requirement to 3.6
Issue 7716 bumped the Python requirement from 3.6 to 3.7 for two
reasons. They are now non-issues.
- Usage of f-strings. But f-strings are a 3.6 feature.
- Usage of `from __future__ import annotations`. But the previous
commit removes that usage.
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7716
See:
5cf862fbb9 ("docs: update Python requirement to 3.7")
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20237>
Chad Versace [Thu, 8 Dec 2022 18:53:51 +0000 (10:53 -0800)]
util/glsl2spirv: Fix build with Python 3.6
ChromeOS still uses Python 3.6, but the glsl2spirv script uses module
'__future__.annotations', introduced in Python 3.7. Fix the build by
removing module, but otherwise preserve the type annotations.
Fixes:
949c3b55db ("util/glsl2spirv: add type annotations")
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20237>
Mike Blumenkrantz [Tue, 24 Jan 2023 22:02:08 +0000 (17:02 -0500)]
zink: validation ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
Mike Blumenkrantz [Tue, 24 Jan 2023 21:56:48 +0000 (16:56 -0500)]
zink: force GENERAL layout for all fb attachments with image binds
this is incredibly stupid, but KHR-GL46.texture_view.coherency does all
kinds of rasterization discard draws with fb attachments bound as images,
and there's no other sane way to catch it dynamically
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
Mike Blumenkrantz [Tue, 24 Jan 2023 21:46:30 +0000 (16:46 -0500)]
zink: update sampler layout when detecting feedback loop for first time
ensure synchronization between descriptor layout and layout used here
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
Mike Blumenkrantz [Tue, 24 Jan 2023 21:46:02 +0000 (16:46 -0500)]
zink: return false for implicit feedback loop check with image binds
this can only be GENERAL layout so it's not a feedback loop ever
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
Mike Blumenkrantz [Tue, 24 Jan 2023 21:45:15 +0000 (16:45 -0500)]
zink: don't skip repeated handling feedback loops
these can persist across multiple draws, so return true if it's still
a feedback loop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
Mike Blumenkrantz [Tue, 24 Jan 2023 21:19:45 +0000 (16:19 -0500)]
zink: move barrier jit to zink_context.c
this gives access to all the good descriptor functions and enshrinkens
the c++ file size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
Mike Blumenkrantz [Wed, 25 Jan 2023 14:24:16 +0000 (09:24 -0500)]
zink: fix VK_DYNAMIC_STATE_LINE_WIDTH usage
add a special tracker here to set the state only when necessary
Fixes:
659c39fafbb ("zink: rework primitive rasterization type logic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20886>
Samuel Pitoiset [Wed, 25 Jan 2023 13:29:18 +0000 (14:29 +0100)]
radv/winsys: prefix all error messages with RADV
RadeonSI prints the exact same message and it can be confusing.
All other error messages in the winsys are prefixed now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20904>
Mike Blumenkrantz [Mon, 12 Sep 2022 19:38:35 +0000 (15:38 -0400)]
radv: Move constant flushing check out to callers.
Approximately 10% improvement in CPU overhead score on 3900X.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20655>
José Roberto de Souza [Mon, 23 Jan 2023 21:02:34 +0000 (13:02 -0800)]
intel/ds: Nuke intel_ds_queue::queue_id
queue_id is not used anywhere.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20888>
José Roberto de Souza [Mon, 23 Jan 2023 19:03:55 +0000 (11:03 -0800)]
hasvk: Nuke anv_queue:index_in_family
This value is also stored in vk_queue, so we can nuke from anv_queue.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20888>
José Roberto de Souza [Mon, 23 Jan 2023 19:02:55 +0000 (11:02 -0800)]
anv: Nuke anv_queue:index_in_family
This value is also stored in vk_queue, so we can nuke from anv_queue.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20888>
José Roberto de Souza [Thu, 6 Oct 2022 20:33:15 +0000 (13:33 -0700)]
intel: Add kmd_type parameter to necessary intel_gem.h functions
Here adding kmd_type parameter to
intel_gem_read_render_timestamp(), intel_gem_can_render_on_fd() and
intel_gem_supports_protected_context().
Those 3 functions will have Xe implementations, the other functions
in intel_gem.h will not be called by Xe code paths so not adding
kernel_driver_type to it.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>
José Roberto de Souza [Mon, 22 Aug 2022 19:56:27 +0000 (12:56 -0700)]
intel: Add intel_kmd_type parameter to intel_engine_get_info()
This will be needed to execute proper function to fetch engines from
kernel mode driver.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>
José Roberto de Souza [Thu, 4 Aug 2022 20:21:05 +0000 (13:21 -0700)]
intel/dev: Detect what is the kernel mode driver loaded
Intel GPUs will have a new kernel mode driver, support for some
platforms will overlap so we will need to detect in runtime what is
the kernel mode driver loaded for each device.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>
Philip Langdale [Mon, 23 Jan 2023 10:36:26 +0000 (18:36 +0800)]
radeonsi: correctly declare YUV420_10 RT Format support for AV1
This appears to have been an oversight. AV1 Main profile requires
support for both 8bit and 10bit, and so we should always declare
support for the YUV420_10 RT Format. This support then cascades
into supporting the appropriate surface formats and meets expectations
of vaapi clients (especially ffmpeg based) on how to detect support
for these formats.
Note that the commit [
0b02db3007] was also made with the intention of
fixing this problem, but it does so in a non-idiomatic way. With that
change, there is still no declared YUV420_10 RT Format, and instead
the P010 surface format is reported under the YUV420 RT Format. This
is not going to work with all vaapi clients. I recommend that this
commit be reverted.
Signed-off-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20870>
Konstantin Seurer [Wed, 18 Jan 2023 15:34:55 +0000 (16:34 +0100)]
radv: Merge the leaf and internal converter
We have everything we need in the internal one already so we can just
encode leaf nodes there. Since this functionality isn't split anymore,
the shader was renamed to "encode".
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20768>
Rhys Perry [Tue, 24 Jan 2023 14:15:26 +0000 (14:15 +0000)]
radv: skip creation of null TLAS for null winsys
This won't work because there are no memory types.
Fixes fossilize replay with NULL winsys.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Fixes:
31ca19589fe ("radv: Create a null TLAS as meta state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20878>
Martin Roukala (né Peres) [Fri, 20 Jan 2023 06:35:20 +0000 (08:35 +0200)]
ci/b2c: uprev to b2c v0.9.9
No functional change expected, just a minor reduction in size compared
to the previous version and updated components.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20806>
Helen Koike [Mon, 21 Nov 2022 17:37:22 +0000 (14:37 -0300)]
ci/android: add android to the ci
Add android to the ci, so we can test mesa on it.
Add debian/x86_test-android and test-android jobs.
One build the container to run tests, and the other execute the tests.
Android is executed on top of cuttlefish VM with virgl.
Mesa libs are replaced on the cuttlefish image, and deqp and deqp-runner
are used to execute tests.
Co-developed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Mon, 21 Nov 2022 17:14:24 +0000 (14:14 -0300)]
ci: export artifacts from debian-android
export mesa build from this job, so it can be picked up by an android
testing job.
Co-developed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Mon, 21 Nov 2022 18:02:44 +0000 (15:02 -0300)]
ci: debian-android compile virgl
compile virgl so we can test android on a vm.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Mon, 21 Nov 2022 17:27:33 +0000 (14:27 -0300)]
ci: compile deqp-runner for android
To allow testing mesa on android, we need deqp-runner compiled for it,
so we can add android on the ci.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Mon, 21 Nov 2022 17:31:39 +0000 (14:31 -0300)]
ci: compile deqp for android
To allow testing mesa on android, we need deqp compiled for it, so we
can add android on the ci.
Add patch that redirect logs to stdout instead of logcat.
Compile deqp to allow running it directly from command line instead of
Android activity.
Co-developed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Tomeu Vizoso [Mon, 21 Nov 2022 17:17:22 +0000 (14:17 -0300)]
ci: Use NDK 25b to build for the Android ABI level 33
25b is the currently supported NDK, as per the below:
https://github.com/android/ndk/wiki
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Fri, 2 Dec 2022 14:30:44 +0000 (11:30 -0300)]
ci/android: move sdk version and ndk to a job variable
make it easier to update sdk version and ndk without the need to make
changes all over the code.
Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Tomeu Vizoso [Wed, 16 Nov 2022 08:27:24 +0000 (09:27 +0100)]
ci: Build for Android with libbacktrace=false
This is needed for using this build inside Android systems with VNDK
enabled, as in recent versions of it libbacktrace isn't available to
libraries in /vendor.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Tomeu Vizoso [Wed, 16 Nov 2022 07:03:01 +0000 (08:03 +0100)]
android: Cleanup unneeded headers from the sync stub
These were probably copy pasted from the previous unified stub.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Tomeu Vizoso [Tue, 15 Nov 2022 08:48:02 +0000 (09:48 +0100)]
android: Make libbacktrace optional again
For the same reason why we used to have USE_LIBBACKTRACE with the old
Android makefiles, allow to build Mesa without linking to it.
In recent VNDK versions, libbacktrace isn't available.
When building without linking libbacktrace, for some reason some symbols
related to C++ exception handling are exposed. Allow them in the symbols
check script.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Sat, 3 Dec 2022 12:42:19 +0000 (09:42 -0300)]
android: allow system = 'android' on cross file
Allow building with system = 'android' on the cross file.
This avoids creating symlinks for the libs.
Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Thu, 1 Dec 2022 23:24:12 +0000 (20:24 -0300)]
ci: move patches to patches directory
Group all patches in a directory.
Improve organization to organize the current and future patches.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Helen Koike [Thu, 1 Dec 2022 20:42:17 +0000 (17:42 -0300)]
ci/debian-android: move pkgconfig paths to the cross file
Move pkgconfig paths out of the job script into the cross file.
Use pkg_config_libdir on the cross file instead.
Which makes more sense and cleaner code.
Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
Italo Nicola [Tue, 24 Jan 2023 14:23:56 +0000 (14:23 +0000)]
panfrost: fix off-by-one when exporting format modifiers
`count` should not be incremented before the check, because it causes
the modifiers array to be filled starting from position 1 instead of 0.
This bug causes one less format modifier to be available than would
otherwise be expected, which could then lead to a dmabuf query failing
in situations where a supported modifier wouldn't be advertised.
It also causes garbage data to be advertised as a modifier in position 0
of the array, although this is not very likely to cause issues.
Fixes:
2a1217513 ("panfrost: Implement panfrost_query_dmabuf_modifiers")
Cc: mesa-stable
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20879>
Samuel Pitoiset [Mon, 23 Jan 2023 15:43:32 +0000 (16:43 +0100)]
radv: fix RADV_DEBUG=hang with multiple cmdbuffer per submission
With RADV_DEBUG=hang, there is only one cmdbuffer per submission and
this has been broken recently.
This fixes a segfault when generating GPU hang reports.
Fixes:
76deaa1b1a9 ("radv: Refactor command buffer handling in radv_queue_submit_normal.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20860>
Bas Nieuwenhuizen [Sun, 22 Jan 2023 23:37:32 +0000 (00:37 +0100)]
radv: Reduce descriptor pool allocation for alignment.
Since we can now rely on this due to the stricter layout code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20847>
Bas Nieuwenhuizen [Sun, 22 Jan 2023 23:30:15 +0000 (00:30 +0100)]
radv: Strictly limit alignment needed within a descriptor set.
By doing two passes we limit the number of times we need to have a gap
after a 16-byte descriptor to align for an image descriptor.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20847>
Pierre-Eric Pelloux-Prayer [Fri, 13 Jan 2023 15:13:46 +0000 (16:13 +0100)]
radeonsi/gfx11: fix ge_cntl programming
gfx11 renamed PRIM_GRP_SIZE to VERTS_PER_SUBGRP but another change was
was missed.
Update our code based on PAL's UniversalCmdBuffer::CalcGeCntl function
(especially useVgtOnchipCntlForTess being false for gfx11).
Fixes:
25a66477d02 ("radeonsi/gfx11: register changes")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
Pierre-Eric Pelloux-Prayer [Fri, 13 Jan 2023 10:00:07 +0000 (11:00 +0100)]
radeonsi/gfx11: clamp PRIM_GRP_SIZE
Legal range of values is [1, 256].
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
Pierre-Eric Pelloux-Prayer [Thu, 12 Jan 2023 16:31:53 +0000 (17:31 +0100)]
winsys/amdgpu: use DMA_BUF_SET_NAME_B if available
Give a name to dma-buf. This name appears in /sys/kernel/debug/dma_buf/bufinfo
and could be useful to debug dma-buf:
Dma-buf Objects:
size flags mode count exp_name ino name
00606208 00000002 00080007 00000003 drm
00192014 2321705-glxgears
The name is only added to non-shared buffer, to avoid overwriting
an existing name when exporting an imported buffer (otherwise all
dma-buf will pretend to be created by XWayland).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
Pierre-Eric Pelloux-Prayer [Tue, 17 Jan 2023 20:50:09 +0000 (21:50 +0100)]
drm-uapi/dma-buf.h: use __u32/__u64 types
Otherwise we might get build errors: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/
34886940
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
Kenneth Graunke [Wed, 18 Jan 2023 18:33:49 +0000 (10:33 -0800)]
iris: Add missing untyped data port flush on PIPELINE_SELECT
This is needed when switching away from GPGPU mode. See the previous
commit for anv. This is not likely to make a practical difference for
iris because it never switches back and forth between modes like anv.
Fixes:
172e0b0ebff ("iris: Update PIPELINE_CONTROL flush when switching pipeline mode in TGL+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20774>
Kenneth Graunke [Wed, 18 Jan 2023 10:50:32 +0000 (02:50 -0800)]
anv: Add missing untyped data port flush on PIPELINE_SELECT
See the comments in emit_apply_pipe_flushes(). Flushing HDC is not
sufficient in GPGPU mode, and we need to set the untyped data port flush
bit as well.
Fixes many dEQP-VK failures with INTEL_COMPUTE_CLASS=1 on Alchemist.
Fixes:
1067ec90a59 ("anv: Update PIPELINE_CONTROL flush when switching pipeline mode in TGL+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20774>
Yogesh Mohan Marimuthu [Fri, 20 Jan 2023 06:59:00 +0000 (12:29 +0530)]
radeonsi: remove some shadow reg optimization for bf1 game
This patch removes below shadow reg optimization. This is done for
Vega64 battlefield 1 crash when shadow regs enabled.
+ reset only dirty states with buffers in si_pm4_reset_emitted()
+ various draw states in si_begin_new_gfx_cs()
v2: remove first_cs parameter from si_pm4_reset_emitted() (Marek Olšák)
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Thu, 12 Jan 2023 04:12:53 +0000 (09:42 +0530)]
radv: allow NULL initial_preamble_cs in radv_amdgpu_winsys_cs_submit_sysmem()
In case of mcbp, shadowed_regs is initialized early in radv_queue_init()
function by submitting the command buffer. The command buffer is submitted in
radv_init_shadowed_regs_buffer_state() function. When RADV_DEBUG=noibs is used
radv_amdgpu_winsys_cs_submit_sysmem() function is used to submit command buffer.
radv_amdgpu_winsys_cs_submit_sysmem() crashes here because initial_preamble_cs
is NULL. This patch fixes the radv_amdgpu_winsys_cs_submit_sysmem() function
to support NULL initial_preamble_cs.
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Tue, 18 Oct 2022 06:54:36 +0000 (12:24 +0530)]
radv: fence complete struct is 4 qw size
also libdrm function amdgpu_cs_chunk_fence_info_to_data() has qw multiplier
and hence need not do it in radv_amdgpu_cs_submit().
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Mon, 12 Sep 2022 18:01:11 +0000 (23:31 +0530)]
radv: INDEX_TYPE and NUM_INSTANCES PKT3 are not shadowed
INDEX_TYPE and NUM_INSTANCES PKT3 should be always written
if shadowing is enabled since they are not shadowed.
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Tue, 22 Nov 2022 08:12:17 +0000 (13:42 +0530)]
radv: set preemp flag and pre_ena bit for shadowregs
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Thu, 22 Sep 2022 18:52:42 +0000 (00:22 +0530)]
radv: add support for register shadowing
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Mon, 29 Aug 2022 05:23:28 +0000 (10:53 +0530)]
radv: add shadowregs variable to RADV_DEBUG environment variable
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Yogesh Mohan Marimuthu [Tue, 20 Sep 2022 18:25:53 +0000 (23:55 +0530)]
ac,radeonsi: move shadow regs create ib preamble function to amd common
The si_create_shadowing_ib_preamble() function can be reused from radv also.
Hence it is moved.
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
Emma Anholt [Wed, 25 Jan 2023 01:03:27 +0000 (17:03 -0800)]
ci/freedreno: Mark max-texture-size as a flake.
It's been a popular spurious fail in merges in the last week.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20894>
Jakub Kulík [Wed, 12 Oct 2022 13:28:01 +0000 (15:28 +0200)]
mesa: Fix format transform on big endian platforms
Reviewed-by: Emma Anholt <emma@anholt.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6001
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19051>
Emma Anholt [Tue, 24 Jan 2023 18:47:37 +0000 (10:47 -0800)]
ci/zink: Update radv xfails for the recent shadow fixes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Thu, 19 Jan 2023 05:36:33 +0000 (21:36 -0800)]
ci/zink: Update TGL full-run xfails.
arb_shader_texture_lod-texgradcube was a fail incorrectly removed in the
sahdow changes. line-smooth-* is new piglit coverage.
Haven't pinpointed when the rest were fixed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Thu, 12 Jan 2023 22:28:26 +0000 (14:28 -0800)]
ci/zink: Add coverage using the vulkan validation layer on lvp.
Let's make sure we aren't introducing new validation failures as
development proceeds. Basically, we record the current set of known
validation failures from the CTS, and for any validation failure we have
the layer log it and abort.
I had started encoding xfails from piglit, but it turns out that piglit
and the validation layer fight about the teardown process, producing
use-after-frees.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Thu, 19 Jan 2023 00:59:11 +0000 (16:59 -0800)]
zink: Re-emit the SpvBuiltInSampleMask access chain each load.
Otherwise, the access chain you emitted last time may not dominate the
current use.
Fixes the following validation failure in
dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.bits_unique_per_sample.multisample_texture_2:
UNASSIGNED-CoreValidation-Shader-InconsistentSpirv(ERROR / SPEC):
msgNum: 7060244 - Validation Error: [
UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle =
0x55cf3cea2c60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 |
SPIR-V module not valid: ID '67[%67]' defined in block '23[%23]' does
not dominate its use in block '31[%31]'
Fixes:
8899f6a19857 ("zink: fix gl_SampleMaskIn spirv generation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Wed, 18 Jan 2023 22:29:55 +0000 (14:29 -0800)]
zink: Fix up mismatches of memory model vs addressing model.
MemoryModelVulkan was left out for CSes using it.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Tue, 17 Jan 2023 21:33:32 +0000 (13:33 -0800)]
zink: Fix validation failure for maxLod < minLod.
GL lets you set a silly state, so do something plausible instead of
undefined.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Thu, 12 Jan 2023 22:43:38 +0000 (14:43 -0800)]
zink: Add missing Flat decorations on some inputs.
Fixes validation failures:
Test case 'dEQP-GLES31.functional.android_extension_pack.shaders.es32.extension_directive.oes_sample_variables'..
MESA: error: Validation Error: [
UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle =
0x563a1838b790, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 |
SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment
OpEntryPoint operand 31 with Input interfaces with integer or float type
must have a Flat decoration for Entry Point id 4.
%gl_SampleId = OpVariable %_ptr_Input_uint Input
Test case 'KHR-GL46.shader_ballot_tests.ShaderBallotAvailability'..
MESA: error: Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x5558e12f17e0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment OpEntryPoint operand 28 with Input interfaces with integer or float type must have a Flat decoration for Entry Point id 4.
%gl_SubgroupLocalInvocationId = OpVariable %_ptr_Input_uint Input
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Emma Anholt [Fri, 13 Jan 2023 00:03:20 +0000 (16:03 -0800)]
zink: Fatal error if requesting validation and we fail to load the layer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
Jesse Natalie [Thu, 19 Jan 2023 21:31:12 +0000 (13:31 -0800)]
dzn: Use core feature matching logic instead of rolling our own
This will print nice messages on unsupported features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
Jesse Natalie [Thu, 19 Jan 2023 21:30:49 +0000 (13:30 -0800)]
dzn: Implement subgroup size control extension
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
Jesse Natalie [Thu, 19 Jan 2023 21:30:23 +0000 (13:30 -0800)]
dzn: Support more subgroup/quad ops
See the comment around supported shader stages - to avoid
introducing CTS failures, vertex/geometry support for
subgroups are turned off since they cannot support quads.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
Jesse Natalie [Thu, 19 Jan 2023 21:28:33 +0000 (13:28 -0800)]
spirv2dxil: Support subgroup SPIR-V caps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
Jesse Natalie [Thu, 19 Jan 2023 21:28:18 +0000 (13:28 -0800)]
spirv2dxil: Lower some wave op properties
DXIL has no concept of subgroup mask ops, relative
shuffle ops, and everything is scalar.
Most wave broadcast ops support i1 overloads, except
for quad swap operations. Go figure. Use lower_bit_size
to promote those to i32 instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>