José Roberto de Souza [Fri, 30 Sep 2022 17:18:13 +0000 (10:18 -0700)]
intel: Share code to read render timestamp
Timestamp read is not in any hot path so there is no down-sides in
share the same function between iris, crocus, anv and hasvk.
Also while at it also dropping the functions to read MMIO from kernel,
the only use is read render timestamp so we don't need it.
v2:
- fix compilaton of ds
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18920>
Rajnesh Kanwal [Wed, 21 Sep 2022 15:19:45 +0000 (16:19 +0100)]
pvr: Implement vkCmdExecuteCommands API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Rajnesh Kanwal [Wed, 21 Sep 2022 18:12:59 +0000 (19:12 +0100)]
pvr: Add support to copy a control stream to another control stream.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Rajnesh Kanwal [Wed, 21 Sep 2022 15:56:49 +0000 (16:56 +0100)]
pvr: Reserve space for vdm state for deferred secondary buffer.
For secondary buffer we need to emit additional vdm state along
with additional ppp state words to provide depthbias and scissor
indexes. These are indexes into depthbias and scissor tables.
In vkCmdExecuteCommands we append secondary buffer tables to primary
buffer tables, so the depthbias and scissor indexes change and
need fixing. This is why we need to emit these separatly.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Rajnesh Kanwal [Wed, 21 Sep 2022 15:54:59 +0000 (16:54 +0100)]
pvr: Create deferred control stream for secondary command buffers.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Rajnesh Kanwal [Wed, 21 Sep 2022 15:45:13 +0000 (16:45 +0100)]
pvr: Add support for PVR_CMD_STREAM_TYPE_GRAPHICS_DEFERRED stream.
This adds support for PVR_CMD_STREAM_TYPE_GRAPHICS_DEFERRED type control
stream. The main difference is that this is backed by host memory.
This is mainly needed for secondary command buffers allocated with
VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT. In this case we need
to copy secondary command buffer's control stream over to primary
stream in vkCmdExecuteCommands.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Rajnesh Kanwal [Wed, 21 Sep 2022 15:43:57 +0000 (16:43 +0100)]
pvr: Fix check in pvr_cmd_uses_deferred_cs_cmds.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Rajnesh Kanwal [Wed, 21 Sep 2022 15:18:19 +0000 (16:18 +0100)]
pvr: Add pvr_csb_emit_link function to support secondary buffer links.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18871>
Pavel Ondračka [Tue, 20 Sep 2022 14:55:52 +0000 (16:55 +0200)]
r300: fix reader detection with breaks
We were previously ignoring the breaks completelly. This patch
is heavily based on analysis and draft patch from Filip Gawin.
It mostly mirrors the current behavior for ENDIF with minor
differences. If the reader is in a branch leading directly to BRK,
we set the AbortOnRead mask as when encountering ENDIF but jump to
the ENDLOOP. If the reader was before the branch, we save the
AbortOnRead mask as if in normal branch handling and restore it
at the end of the loop.
Besides the single dEQP fix, this also fixes one more dEQP and few
piglits when the loop unrolling is disabled.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7249
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18900>
Pavel Ondračka [Wed, 21 Sep 2022 19:20:32 +0000 (21:20 +0200)]
Revert "r300: be less agresive with copy propagate in loops"
This reverts commit
2bdffe7eb212ddc10f2ed9ef51095886a55109b4.
This solution was mostly a workaround to fix the copy propagation.
A (hopefully) proper fix to the reader detection is in the next commit.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18900>
Dylan Baker [Fri, 30 Sep 2022 19:13:28 +0000 (12:13 -0700)]
meson: run genxml sort tests
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:59:19 +0000 (11:59 -0700)]
intel/genxml: run gen_sort_tags on all of the xml
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:58:10 +0000 (11:58 -0700)]
intel/genxml: add a validation mode to gen_sort_tags
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:42:52 +0000 (11:42 -0700)]
intel/genxml: add 'nonzero' to gen_sort_tags
which was added in
ebe2a2b5f6a461ec4644accb4e7b02c430bb8f16.
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:40:29 +0000 (11:40 -0700)]
intel/genxml: don't overwrite the input of gen_sort_tags in place
otherwise we can be left with garbage
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:34:06 +0000 (11:34 -0700)]
intel/genxml: remove unused variable in gen_sort_tags.py
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:29:30 +0000 (11:29 -0700)]
intel/genxml: use `a not in {x, y}` instead of `a != x or a != y`
It's faster, less code, and more idiomatic
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:27:44 +0000 (11:27 -0700)]
intel/genxml: add type annotations to gen_sort_tags.py
let static analysis help us out
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 18:00:57 +0000 (11:00 -0700)]
intel/genxml: don't use parens with python assert statement
assert is a statement in python, not a function. Useing parens with it
leads to madness, because assert takes two arguments in the form `assert
expression: bool, message: str`. With parens though it's tempting to
write `assert(expression, message)`, which results in an assert that is
*always* true, because a non-empty tuple (which is what is written) is
*never* false.
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 17:59:15 +0000 (10:59 -0700)]
intel/genxml: use a set for lookups
Python will pre-compute the set since it's const, and the performance of
a set search is significantly better than that of a list search
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Dylan Baker [Fri, 30 Sep 2022 17:58:16 +0000 (10:58 -0700)]
intel/genxml: use a single pattern for res
regex is expensive, do less of it.
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
Eric Engestrom [Thu, 22 Sep 2022 14:11:41 +0000 (16:11 +0200)]
docs/release-calendar: add 22.3 schedule
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18756>
Caio Oliveira [Sat, 1 Oct 2022 07:36:59 +0000 (00:36 -0700)]
intel/compiler: Explicitly include build-id when linking intel_clc
Ensure that the program will have a build-id.
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18924>
Karol Herbst [Tue, 27 Sep 2022 17:08:41 +0000 (19:08 +0200)]
radeonsi: stop vectorizing unpack_32_2x16_split
nir_to_llvm can't deal with them being vectors.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Karol Herbst [Tue, 27 Sep 2022 22:22:39 +0000 (00:22 +0200)]
ac/llvm: fix load_ubo for vectors with more than 4 elements
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Karol Herbst [Tue, 27 Sep 2022 18:10:37 +0000 (20:10 +0200)]
ac/llvm: fix load/store_shared for vectors with more than 4 elements
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Karol Herbst [Tue, 27 Sep 2022 14:45:05 +0000 (16:45 +0200)]
ac/llvm: fix load_const for vectors with more than 4 elements
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Karol Herbst [Sat, 24 Sep 2022 22:49:09 +0000 (00:49 +0200)]
ac/llvm: support non 32 bit sized workgroup ids
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Karol Herbst [Sat, 24 Sep 2022 22:01:05 +0000 (00:01 +0200)]
rusticl/kernel: assign locations before passing the nir to drivers
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Karol Herbst [Sat, 24 Sep 2022 19:09:32 +0000 (21:09 +0200)]
rusticl: limit global mem to 2GB
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18802>
Martin Roukala (né Peres) [Sat, 1 Oct 2022 03:46:19 +0000 (06:46 +0300)]
ci/b2c: add support for the new format of CI_RUNNER_TAGS
Seems like Gitlab did not follow their own documentation:
```
CI_RUNNER_TAGS 8.10 0.5 A comma-separated list of the runner tags.
```
But it would seem like a gitlab update brought json-style lists which
broke:
```
CI_RUNNER_TAGS = '["keywords-gateway", "CI-gateway"]'
```
This commit adds support for both style.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: John Brooks <john@fastquake.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18923>
Karol Herbst [Wed, 28 Sep 2022 00:01:45 +0000 (02:01 +0200)]
rusticl/mem: align fill pattern buffer to 4 bytes
drivers might treat it as a uint32_t* buffer.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18853>
Caio Oliveira [Thu, 29 Sep 2022 20:30:31 +0000 (13:30 -0700)]
spirv: Enable OpEmitMeshTasksEXT workaround for Clay Shader Compiler
Clay Shader Compiler is the SPIR-V generator used by GravityMark benchmark.
Fixes #7368.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18894>
Karol Herbst [Tue, 27 Sep 2022 22:49:00 +0000 (00:49 +0200)]
rusticl/mem: fix image OOB checks
The CL API puts the array layer on the height, where gallium puts it on
the depth. This is taken into account everywhere else, except for API
validation.
Fixes:
8b9a5adf8be ("rusticl/mem: return errors for OOB accesses")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18852>
Mike Blumenkrantz [Fri, 30 Sep 2022 03:00:41 +0000 (23:00 -0400)]
delete graw tests
These seem abandoned and they make interfaces changes less easy.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
Mike Blumenkrantz [Fri, 30 Sep 2022 03:00:28 +0000 (23:00 -0400)]
delete rbug
These seem abandoned and they make interfaces changes less easy.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
Mike Blumenkrantz [Fri, 30 Sep 2022 02:59:29 +0000 (22:59 -0400)]
remove xvmc
These seem abandoned and they make interfaces changes less easy.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
Mike Blumenkrantz [Tue, 27 Sep 2022 18:39:56 +0000 (14:39 -0400)]
zink: set depth clamp
this is correct according to spec
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 30 Sep 2022 15:40:58 +0000 (11:40 -0400)]
zink: define zink_pipeline_dynamic_state3 as zink_rasterizer_hw_state
this ensures the structs are kept in sync
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 30 Sep 2022 04:38:07 +0000 (00:38 -0400)]
zink: reenable GPL
this is now functional again
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Sun, 25 Sep 2022 16:40:57 +0000 (12:40 -0400)]
zink: use an extra pipeline state bit to track coherent fbfetch usage for gpl outputs
bringing parity to non-gpl codepath
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Sun, 25 Sep 2022 16:18:59 +0000 (12:18 -0400)]
zink: don't deref prog->shaders during pipeline construction
this may or may not be valid depending on (upcoming) threading changes,
and the nir pointers are all readily available
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Sun, 25 Sep 2022 16:18:12 +0000 (12:18 -0400)]
zink: reorder zink_destroy_gfx_program()
this ensures that pipeline cache entries are freed before shaders
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 23 Sep 2022 16:11:35 +0000 (12:11 -0400)]
zink: move binding_map to hw_state part of vertex state
this is used when dynamic states aren't used
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 23 Sep 2022 02:24:49 +0000 (22:24 -0400)]
zink: add param to disable optimization when combining pipeline libraries
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 23 Sep 2022 02:24:25 +0000 (22:24 -0400)]
zink: require optimal_keys for GPL
this is pointless otherwise
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 23 Sep 2022 02:23:22 +0000 (22:23 -0400)]
zink: set VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Thu, 22 Sep 2022 21:23:44 +0000 (17:23 -0400)]
zink: further compress zink_gfx_output_key lookups
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Thu, 22 Sep 2022 21:13:10 +0000 (17:13 -0400)]
zink: compress zink_gfx_output_key members
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Tue, 27 Sep 2022 13:54:18 +0000 (09:54 -0400)]
zink: don't access prog->shaders array during pipeline compile
this may or may not have valid data
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
Mike Blumenkrantz [Fri, 30 Sep 2022 23:39:32 +0000 (19:39 -0400)]
zink: add tgl ci skip
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18921>
Dawn Han [Tue, 20 Sep 2022 17:24:32 +0000 (17:24 +0000)]
venus: Update mutable descriptor struct type
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766>
Dawn Han [Tue, 20 Sep 2022 01:22:51 +0000 (01:22 +0000)]
venus: support the promoted VK_EXT_mutable_descriptor_type
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766>
Roland Scheidegger [Thu, 29 Sep 2022 18:59:03 +0000 (20:59 +0200)]
gallivm: remove dead cube map lod calculation code
Since commit
d413fd02190d ("gallivm: Always take the per-pixel LOD path
for cubemaps.") the special cube rho code was not used anymore.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18892>
Bas Nieuwenhuizen [Fri, 30 Sep 2022 22:10:46 +0000 (00:10 +0200)]
vulkan/wsi/x11: Fix double free of modifiers.
Breaks radv when modifiers are used.
Fixes:
8775f08bf11 ("vulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7386
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7398
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18919>
Mike Blumenkrantz [Tue, 14 Jun 2022 20:13:23 +0000 (16:13 -0400)]
zink: use more dynamic state3 when available
this is an all-or-nothing type of thing, where either all the blend/ms
states are available or they aren't
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18890>
Mike Blumenkrantz [Mon, 13 Jun 2022 21:05:56 +0000 (17:05 -0400)]
zink: use dynamic state3 rasterization states when available
this massively reduces the number of pipelines required
also temporarily disable GPL until a few more patches land since something's
weird and broken
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18890>
Mike Blumenkrantz [Fri, 30 Sep 2022 18:06:40 +0000 (14:06 -0400)]
lavapipe: improve blend handling on pipeline binds
* use renderpass info for independent blend
* only reset blend state if no color attachments
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18913>
Rhys Perry [Tue, 27 Sep 2022 11:06:42 +0000 (12:06 +0100)]
aco: fix assembler.gfx11.vinterp test
This was missed. I guess CI doesn't have a recent enough LLVM for these
tests.
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/17710>
Rhys Perry [Thu, 21 Jul 2022 15:16:16 +0000 (16:16 +0100)]
aco: limit hard clauses to 63 instructions
See https://reviews.llvm.org/D127391
fossil-db (gfx1100):
Totals from 4 (0.00% of 161689) affected shaders:
Latency: 24545 -> 24539 (-0.02%)
InvThroughput: 102867 -> 102835 (-0.03%)
fossil-db (navi10):
Totals from 4 (0.00% of 161220) affected shaders:
Latency: 25969 -> 25959 (-0.04%)
InvThroughput: 112917 -> 112869 (-0.04%)
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/17710>
Rhys Perry [Thu, 21 Jul 2022 15:15:45 +0000 (16:15 +0100)]
aco/gfx11: update form_hard_clauses
See https://reviews.llvm.org/D127391
fossil-db (gfx1100):
Totals from 116 (0.07% of 161689) affected shaders:
Instrs: 124719 -> 124664 (-0.04%); split: -0.06%, +0.02%
CodeSize: 731660 -> 731440 (-0.03%); split: -0.04%, +0.01%
Latency: 2771695 -> 2771671 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 1050309 -> 1050312 (+0.00%)
VClause: 3731 -> 3779 (+1.29%)
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/17710>
Rhys Perry [Thu, 21 Jul 2022 14:54:26 +0000 (15:54 +0100)]
aco/gfx11: deallocate VGPRs at the end of the shader
fossil-db (gfx1100):
Totals from 65987 (40.81% of 161689) affected shaders:
Instrs:
57123207 ->
57199947 (+0.13%)
CodeSize:
308402500 ->
308709460 (+0.10%)
Latency:
680527139 ->
680527160 (+0.00%)
InvThroughput:
131620026 ->
131620045 (+0.00%)
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/17710>
Rhys Perry [Thu, 21 Jul 2022 14:45:11 +0000 (15:45 +0100)]
aco: update sendmsg enum from LLVM
Add GFX11 enums and some new ones that apparently existed before.
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/17710>
Rhys Perry [Thu, 21 Jul 2022 14:17:24 +0000 (15:17 +0100)]
aco/gfx11: fix s_waitcnt printing
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/17710>
Rhys Perry [Thu, 21 Jul 2022 14:12:38 +0000 (15:12 +0100)]
aco: improve wait_imm unpack
Add GFX11 support and use wait_imm::unset_counter. Looping in the waitcnt
pass was probably broken on GFX11 because of this.
fossil-db (gfx1100):
Totals from 899 (0.56% of 161689) affected shaders:
Instrs: 1319368 -> 1319179 (-0.01%)
CodeSize: 7124640 -> 7123884 (-0.01%)
Latency:
26554304 ->
26404606 (-0.56%)
InvThroughput: 9032485 -> 8978773 (-0.59%); split: -0.59%, +0.00%
No navi10 fossil-db changes.
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/17710>
Rhys Perry [Wed, 13 Jul 2022 17:42:21 +0000 (18:42 +0100)]
aco/gfx11: swap ds_cmpst_* data operands
According to an LLVM comment, these are swapped in GFX11.
No fossil-db changes.
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/17710>
SoroushIMG [Tue, 27 Sep 2022 10:18:11 +0000 (11:18 +0100)]
zink: enable loop unrolling for loops that have soft fp64
The info that a loop contains fp64 ops is lost after full
software lowering.
Therefore, specifically unroll these loops in zink instead of
in vulkan, where the blown up body is no longer unrolled.
This helps a lot in KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Thu, 29 Sep 2022 14:04:21 +0000 (15:04 +0100)]
nir: allow to fine tune unrolling for loops with soft fp64 ops
Lowered fp64 ops can blow up the loop bodies while still being
suitable for unrolling.
Allow for using different parameters to unroll loops with
soft fp64.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Thu, 29 Sep 2022 13:59:06 +0000 (14:59 +0100)]
nir: track whether a loop contains soft fp64 ops
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Mon, 26 Sep 2022 22:19:02 +0000 (23:19 +0100)]
zink: fix spirv temp func variable class emission
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Wed, 21 Sep 2022 19:49:43 +0000 (20:49 +0100)]
zink: fix nir_op_unpack_64_2x32 emission
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Wed, 21 Sep 2022 20:20:54 +0000 (21:20 +0100)]
zink: lower 64bit pack when float64 not supported
SPIRV ops for 64bit pack/unpack require float64 cap.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Wed, 21 Sep 2022 19:52:28 +0000 (20:52 +0100)]
zink: optimise lower_64bit_vars for when int64 is supported
There are vulkan drivers that support Int64 but not Float64.
Optimise the 64bit lowering by converting doubles to uint64,
but keep matrix lowerig to float as glsl int64 matrices do
not exist.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
SoroushIMG [Wed, 21 Sep 2022 19:59:37 +0000 (20:59 +0100)]
zink: lower 64bit vars for drivers without float64
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
Mike Blumenkrantz [Fri, 30 Sep 2022 12:53:59 +0000 (08:53 -0400)]
zink: call flush_resource when presenting garbage
this ensures the resource is queued for presentation
fixes #7359
Fixes:
babf9474c43 ("zink: rework flush_frontbuffer to always flush")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18899>
Corentin Noël [Thu, 15 Sep 2022 13:56:09 +0000 (15:56 +0200)]
ci: Remove Wno-error=stringop-truncation from debian-arm64-asan
All the warnings are now fixed.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
Corentin Noël [Thu, 15 Sep 2022 12:55:52 +0000 (14:55 +0200)]
gallium/hud: use snprintf(..., "%s", ...) instead of strncpy
This fixes a warning with stringop-truncation:
```
error: 'strncpy' output may be truncated copying 127 bytes from a string of length 255 [-Werror=stringop-truncation]
1443 | strncpy(graph->name, s, sizeof(graph->name)-1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
Corentin Noël [Thu, 15 Sep 2022 12:49:22 +0000 (14:49 +0200)]
mesa/main: do not copy the exact size of the string
This fixes a compiler warning with stringop-truncation:
```
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
286 | strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
Rhys Perry [Fri, 26 Aug 2022 10:46:06 +0000 (11:46 +0100)]
aco: add VMEMtoScalarWriteHazard tests
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/18270>
Rhys Perry [Thu, 21 Jul 2022 14:13:57 +0000 (15:13 +0100)]
aco: improve printing of s_waitcnt_depctr
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/18270>
Rhys Perry [Thu, 21 Jul 2022 14:13:46 +0000 (15:13 +0100)]
aco: improve printing of sgpr_null
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/18270>
Rhys Perry [Thu, 25 Aug 2022 19:07:41 +0000 (20:07 +0100)]
aco: use some helpers in GFX10 hazard workarounds
No fossil-db changes.
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/18270>
Rhys Perry [Thu, 25 Aug 2022 19:40:31 +0000 (20:40 +0100)]
aco: improve VMEMtoScalarWriteHazard s_waitcnt mitigation
fossil-db (navi10):
Totals from 171 (0.13% of 134563) affected shaders:
Instrs: 69348 -> 69144 (-0.29%)
CodeSize: 381112 -> 380296 (-0.21%)
Latency: 451534 -> 451387 (-0.03%)
InvThroughput: 88692 -> 88686 (-0.01%)
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/18270>
Rhys Perry [Thu, 25 Aug 2022 19:04:01 +0000 (20:04 +0100)]
aco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation
It doesn't make sense for a "s_waitcnt vmcnt(0)" to affect a store or DS
instruction.
LLVM checks for "s_waitcnt vmcnt(0) lgkmcnt(0) expcnt(0)" but ignores
s_waitcnt_vscnt (which I assume is a bug).
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
bcf94bb933e ("aco: properly recognize that s_waitcnt mitigates VMEMtoScalarWriteHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
Georg Lehmann [Mon, 12 Sep 2022 11:12:18 +0000 (13:12 +0200)]
nir/opt_algebraic: Optimize more (a cmp b ? a : b) to min/max.
Foz-DB Navi21:
Totals from 112 (0.08% of 134913) affected shaders:
CodeSize: 1618384 -> 1618172 (-0.01%); split: -0.06%, +0.04%
Instrs: 307695 -> 307535 (-0.05%); split: -0.05%, +0.00%
Latency: 3590228 -> 3589658 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 563692 -> 563447 (-0.04%); split: -0.05%, +0.01%
Copies: 24541 -> 24519 (-0.09%); split: -0.10%, +0.01%
Branches: 13480 -> 13468 (-0.09%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18548>
Rajnesh Kanwal [Thu, 22 Sep 2022 11:08:00 +0000 (12:08 +0100)]
pvr: Implement vkGetEventStatus API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18864>
Rajnesh Kanwal [Sun, 25 Sep 2022 19:36:41 +0000 (20:36 +0100)]
pvr: Add assert to check for non-NULL binding_desc.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 19:25:18 +0000 (20:25 +0100)]
pvr: Call VALGRIND_FREELIKE_BLOCK before unmapping to avoid use after free.
Fixes: CID 1503261.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 19:11:53 +0000 (20:11 +0100)]
pvr: Fix Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) errors.
Fixes: CID 1503255, 1503258, 1503265, 1503268, 1504078, 1507509.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:52:10 +0000 (19:52 +0100)]
pvr: Zero init pbe_cs_words to avoid passing on garbage.
In case if the surface->resolve_type is not PVR_RESOLVE_TYPE_PBE
then we do not setup pbe_cs_words in which case we might end up
using garbage values.
Fixes: CID 1515466.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:47:43 +0000 (19:47 +0100)]
pvr: Remove dead code from pvr_perform_start_of_render_clears.
Logically the hw_render would never be NULL so the if block is
never used and can be removed.
Fixes: CID1503270.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:43:47 +0000 (19:43 +0100)]
pvr: Remove framebuffer NULL check from pvr_CmdBeginRenderPass2.
Framebuffer can not be NULL in pvr_CmdBeginRenderPass2.
Fixes: CID 1503259.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:39:31 +0000 (19:39 +0100)]
pvr: Remove redundant assignment error.instruction.
Fixes: CID 1503256.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:38:37 +0000 (19:38 +0100)]
pvr: Remove redundant instruction buffer check.
Fixes: CID 1503273.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Rajnesh Kanwal [Sun, 25 Sep 2022 18:20:22 +0000 (19:20 +0100)]
pvr: Convert attachment indexes to unsigned.
This commit converts attachment indexes used in renderpass to unsigned
and uses VK_ATTACHMENT_UNUSED for unused attachments instead of -1.
Also fixes some signed to unsigned comparisons.
Fixed: CID 1515587, 1515590, 1515597, 1515604.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
Tapani Pälli [Tue, 27 Sep 2022 05:42:13 +0000 (08:42 +0300)]
anv: limit to default fast clear color when image used for transfer
v2: use vk_image_layout_to_usage_flags for detecting
transfer usage (Nanley)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7189
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18836>
Rajnesh Kanwal [Thu, 22 Sep 2022 14:39:32 +0000 (15:39 +0100)]
pvr: Handle indirect buffer address in pvr_setup_descriptor_mappings.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18872>
Rajnesh Kanwal [Thu, 22 Sep 2022 13:36:02 +0000 (14:36 +0100)]
pvr: implement vkcmddispatchindirect api.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18872>
Samuel Pitoiset [Thu, 29 Sep 2022 12:49:34 +0000 (14:49 +0200)]
radv: enable the unified heap on APUs for Red Dead Redemption 2
This seems to resolve the memory explosion without hurting performance.
This workaround is only applied for native Vulkan.
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/18884>
Samuel Pitoiset [Tue, 27 Sep 2022 17:46:53 +0000 (19:46 +0200)]
radv: add a new drirc option to enable a unified heap on APUs
This option (radv_enable_unified_heap_on_apu) allows to force the
driver to expose only one heap of VRAM because some games seem to
perform better with that.
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/18884>