Jason Ekstrand [Thu, 18 Feb 2021 22:09:31 +0000 (16:09 -0600)]
intel/compiler: Add code for compiling CL-style SPIR-V kernels
v2: simplify INTEL_DEBUG expressions (Marcin)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
Jason Ekstrand [Thu, 29 Oct 2020 14:44:30 +0000 (09:44 -0500)]
intel/debug: Dump KERNEL source when INTEL_DEBUG=cs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
Jason Ekstrand [Mon, 28 Sep 2020 14:11:39 +0000 (09:11 -0500)]
intel/nir: Add optimizations to help OpenCL-style kernels
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
Lionel Landwerlin [Mon, 18 Oct 2021 12:24:23 +0000 (15:24 +0300)]
intel/nir/fs: replace COMPUTE || KERNEL by gl_shader_stage_is_compute()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
Jason Ekstrand [Sat, 15 Aug 2020 05:28:55 +0000 (00:28 -0500)]
nir/print: Add support for generic pointers
The way they're handled is that deref->modes is treated as a bitfield of
possible modes. Variables are required to have a specific mode and
derefs with deref_type_var are as well.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
Yonggang Luo [Sun, 20 Mar 2022 00:01:24 +0000 (08:01 +0800)]
glx/egl: improve dri null screen related error messages.
Convert from `failed to create dri screen` to more exact error message
for easier debugging
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15480>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:46 +0000 (11:56 +0100)]
crocus: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:31 +0000 (11:56 +0100)]
d3d12: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:13 +0000 (11:56 +0100)]
etnaviv: replace opencoded slab_zalloc
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:00 +0000 (11:56 +0100)]
freedreno: replace opencoded slab_zalloc
Reviewed-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:55:45 +0000 (11:55 +0100)]
lima: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:55:33 +0000 (11:55 +0100)]
iris: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:28 +0000 (11:47 +0100)]
v3d: replace opencoded slab_zalloc
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:17 +0000 (11:47 +0100)]
vc4: replace opencoded slab_zalloc
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:01 +0000 (11:47 +0100)]
virgl: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:46:38 +0000 (11:46 +0100)]
zink: replace opencoded slab_zalloc
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:55:10 +0000 (11:55 +0100)]
r600: replace opencoded slab_zalloc
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:50 +0000 (11:47 +0100)]
radeonsi: replace opencoded slab_zalloc
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>
Mike Blumenkrantz [Wed, 16 Mar 2022 17:59:52 +0000 (13:59 -0400)]
lavapipe: KHR_synchronization2
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15413>
Mike Blumenkrantz [Wed, 16 Mar 2022 17:58:46 +0000 (13:58 -0400)]
lavapipe: add QueueSubmit2 implementation
this converts the existing code to use VkSubmitInfo2 structs and adds
a new QueueSubmit wrapper which generates these structs from VkSubmitInfo
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15413>
Mike Blumenkrantz [Wed, 16 Mar 2022 17:58:15 +0000 (13:58 -0400)]
lavapipe: add sync2 cmdbuf method implementations
nothing special here
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15413>
Mike Blumenkrantz [Wed, 16 Mar 2022 13:04:53 +0000 (09:04 -0400)]
lavapipe: fix typo in set_event execution
Fixes:
eb7eccc76f0 ("lavapipe: Use generated command queue code")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15413>
Mike Blumenkrantz [Mon, 21 Mar 2022 04:22:08 +0000 (00:22 -0400)]
docs: update lavapipe features and relnotes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15463>
Mike Blumenkrantz [Fri, 18 Mar 2022 12:51:44 +0000 (08:51 -0400)]
lavapipe 1.3
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15463>
Mike Blumenkrantz [Fri, 18 Mar 2022 17:25:56 +0000 (13:25 -0400)]
lavapipe: add a GetPhysicalDeviceToolPropertiesEXT stub
when no tools are loaded, this will otherwise crash
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15463>
Mike Blumenkrantz [Fri, 11 Mar 2022 16:13:57 +0000 (11:13 -0500)]
lavapipe: EXT_subgroup_size_control
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15354>
Mike Blumenkrantz [Fri, 11 Mar 2022 23:08:38 +0000 (18:08 -0500)]
llvmpipe: fix variable naming insanity in cs generator
in the top part of this function, the x/y/z size variables are used to
represent the loop iterator limits
in the bottom part, they change to represent the loop iterator values
my brain.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15354>
Mike Blumenkrantz [Fri, 11 Mar 2022 22:03:30 +0000 (17:03 -0500)]
llvmpipe: fix subgroup id construction
the coroutine idx is based on the number of x loops, but the subgroup id
is based on the coroutine's total loops
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15354>
Mike Blumenkrantz [Fri, 11 Mar 2022 16:10:56 +0000 (11:10 -0500)]
llvmpipe: fix gl_NumSubgroups
this is (x * y * z) / subgroup_size, not num_x_loops
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15354>
Mike Blumenkrantz [Fri, 18 Mar 2022 14:00:44 +0000 (10:00 -0400)]
lavapipe: EXT_inline_uniform_block
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 13:56:31 +0000 (09:56 -0400)]
lavapipe: implement EXT_inline_uniform_block
this is a lot of machinery to propagate the block sizes down from the
descriptor layout to the pipeline layout to the rendering_state
block data is appended to ubo0 immediately following push constant
data (if it exists), which requires that a new buffer be created and
filled any time either type of data changes
shader handling is done by propagating the offset of each block relative
to the start of its descriptor set, then accumulating the sizes of
every uniform block in each preceding descriptor set into the offset,
then adding on the push constant size, and finally adding that on to
the existing load_ubo deref offset
update-after-bind is no longer an issue since each instance of pc+block
data is its own immutable buffer that can never be modified
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 13:55:06 +0000 (09:55 -0400)]
lavapipe: remove unused struct member
this was used at some point I think?
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 13:50:36 +0000 (09:50 -0400)]
lavapipe: use stream uploader for push constant upload
now instead of having static per-stage buffer regions and letting llvmpipe
do the upload, lavapipe creates a new pipe_resource and chucks it away
with take_ownership=true to allow it to be destroyed once it's no longer
in use
this also alters ubo0 mechanics such that the buffer is now sized exactly to
the size of the push constants in the pipeline and push constants are only
updated when the appropriate shader stage is flagged
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 13:48:16 +0000 (09:48 -0400)]
lavapipe: save pipeline stages that push constants are active on
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 13:47:26 +0000 (09:47 -0400)]
lavapipe: add a stream uploader to rendering_state and queue objects
not currently used
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 13:45:56 +0000 (09:45 -0400)]
lavapipe: zalloc pipeline layout structs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Fri, 18 Mar 2022 02:44:16 +0000 (22:44 -0400)]
lavapipe: don't emit compute states during draw
there's a separate function for this
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15457>
Mike Blumenkrantz [Mon, 14 Mar 2022 20:25:29 +0000 (16:25 -0400)]
lavapipe: KHR_shader_terminate_invocation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
Mike Blumenkrantz [Mon, 14 Mar 2022 20:25:14 +0000 (16:25 -0400)]
lavapipe: extend demote->discard pass to handle terminate
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
Mike Blumenkrantz [Mon, 14 Mar 2022 19:47:53 +0000 (15:47 -0400)]
lavapipe: EXT_shader_demote_to_helper_invocation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
Mike Blumenkrantz [Mon, 14 Mar 2022 19:47:03 +0000 (15:47 -0400)]
lavapipe: run some shader passes for demote handling
pipe internals already support discard, so as long as everything is
rewritten to use discard, we don't need any further changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
Mike Blumenkrantz [Mon, 14 Mar 2022 19:45:17 +0000 (15:45 -0400)]
nir/lower_is_helper_invocation: create load_helper_invocation instr with bitsize=1
the specification stipulates that this is a bool value, so don't load it as an int
or else nir_validate explodes
Fixes:
f17b41ab4f0 ("nir: add lowering pass for helperInvocationEXT()")
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
Mike Blumenkrantz [Tue, 8 Mar 2022 22:40:22 +0000 (17:40 -0500)]
zink: handle conversion for vertices statistics query with LINE_LOOP draws
the converted number of vertices is 2x that of the "real" number of vertices,
so divide the results by 2
this works nicely since zink performs cpu readback for all queries, and shader
aggregation should be simple in the future as well
fixes:
KHR-GL46.pipeline_statistics_query_tests_ARB.functional_primitives_vertices_submitted_and_clipping_input_output_primitives
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15401>
Mike Blumenkrantz [Tue, 8 Mar 2022 22:39:40 +0000 (17:39 -0500)]
zink: store vertices statistics query to context
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15401>
M Henning [Sun, 20 Mar 2022 04:23:46 +0000 (00:23 -0400)]
nouveau: Fix out-of-bounds access in AlgebraicOpt
for cases where we calculate the absolute value of the result
of a unary operation
We can remove this problematic check since it's redundant with
the one several lines down.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15476>
M Henning [Sun, 7 Nov 2021 01:33:34 +0000 (21:33 -0400)]
nouveau: Handle unaligned tlsBase during spills
Without this, 128-bit or 64-bit register spills can generate unaligned
loads and stores if tlsBase is unaligned.
Fixes glsl-1.50/execution/variable-indexing/gs-input-array-vec3-index-rd
with NV50_PROG_USE_NIR=1 on kepler
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13693>
Kenneth Graunke [Fri, 4 Mar 2022 07:57:13 +0000 (23:57 -0800)]
iris: Fix MOCS for copy regions
These were, unfortunately, backwards. The source is the texture.
The destination is the render target.
Fixes:
d8cb76211c5 ("iris: Fix MOCS for buffer copies")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15473>
Andrey Konovalov [Thu, 3 Feb 2022 19:30:17 +0000 (19:30 +0000)]
ir3: set local_size for shaders of MESA_SHADER_KERNEL type
ir3_compile_shader_nir() should set local_size[] and local_size_variable
fields not only for compute shaders, but for the OpenCL kernels too.
v2: use gl_shader_stage_is_compute() instead of explicit comparison with
MESA_SHADER_[COMPUTE,KERNEL].
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14863>
Emma Anholt [Thu, 17 Mar 2022 22:35:56 +0000 (15:35 -0700)]
ci/traces: Make sure we have no pre-existing traces-db before starting.
bare-metal can reboot boards into an existing rootfs on intermittent
device failure, but traces-db doesn't do any sanity-checking of the local
downloads of traces and would proceed to just trying to replay them.
Nuke any existing trace db so that it re-downloads every time, same as
LAVA or docker container tests do.
Fixes: #5585
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15440>
Michel Zou [Fri, 18 Mar 2022 19:07:21 +0000 (20:07 +0100)]
lavapipe: fix i686 mingw build
Fixes:
987e8a5a
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15464>
Mike Blumenkrantz [Tue, 22 Feb 2022 20:26:06 +0000 (15:26 -0500)]
lavapipe: zalloc lvp_image_view structs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15462>
Mike Blumenkrantz [Fri, 18 Feb 2022 16:55:17 +0000 (11:55 -0500)]
lavapipe: break out resolves into separate functions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15462>
Mike Blumenkrantz [Tue, 25 Jan 2022 14:27:22 +0000 (09:27 -0500)]
lavapipe: store number of immutable samplers to pipeline layout
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15462>
Jason Ekstrand [Fri, 18 Mar 2022 20:47:50 +0000 (15:47 -0500)]
spirv: Properly mangle generic pointers
Fixes:
a8e53a772f61 ("spirv: Add generic pointer support")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15470>
Eric Engestrom [Fri, 18 Mar 2022 19:28:14 +0000 (19:28 +0000)]
docs: update calendar and link releases notes for 21.3.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15466>
Eric Engestrom [Fri, 18 Mar 2022 19:26:42 +0000 (19:26 +0000)]
docs: add release notes for 21.3.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15466>
Emma Anholt [Wed, 16 Mar 2022 22:50:00 +0000 (15:50 -0700)]
ci/turnip: Increase the hangcheck timer to 2 seconds.
We get a lot of useful coverage from running graphicsfuzz with spilling
enabled, but it's also pretty slow and can cause intermittent hangcheck
failures. I thought I'd categorized them when merging !14839 (device loss
on reset), but it looks like not all of them and we're now more likely to
have flakes take out the whole test run when a single flake makes the rest
of the caselist a flake.
This is a little unfortunate in that it means our test environment is not
the same as a stock system you would want to run deqp on to submit
conformance, but I think it's an improvement in the test maintenance work
vs needing to fix things up later.
We have some other tests besides turnip that can trigger hangchecks which
we might also like this increase for (some disabled traces, for example).
However, freedreno GL has a 5-second timeout waiting for idle when
mapping, and a couple of 2-second timeouts in a row can result in spurious
failures in other tests!
Fixes: #6163
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15435>
Alyssa Rosenzweig [Sun, 13 Mar 2022 23:59:58 +0000 (19:59 -0400)]
pan/bi: Use bi_dontcare for ZS_EMIT
This is more portable and avoids special casing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Tue, 21 Dec 2021 21:55:05 +0000 (16:55 -0500)]
pan/bi: Emit arch-specific code for bi_dontcare
We use bi_dontcare() to specify any encoding where we don't care about
the value, with a preference for power-efficient encodings. On Bifrost,
a (possibly nonexistant) FAU read is the best encoding. On Valhall, that
encoding doesn't exist so just use a zero. That should be good enough in
practice.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 3 Mar 2022 01:49:20 +0000 (20:49 -0500)]
pan/bi: Model Valhall action on bi_instr
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Tue, 21 Dec 2021 22:18:28 +0000 (17:18 -0500)]
pan/bi: Add Valhall-specific zero builder
When emitting code during or after register allocation, we need to be able to
emit constants without running the constant->{LUT, move, uniform} pass running
after. In particular, we need to access the constant 0 to implement spill code.
Add a Valhall-specific zero for this purpose.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Sun, 13 Mar 2022 23:43:18 +0000 (19:43 -0400)]
pan/bi: Don't analyze helper reqs in !frag shaders
Waste of time, and possibly invalid too.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 16:14:55 +0000 (12:14 -0400)]
pan/bi: Print Valhall-specific FAU indices
We'll emit these shortly, prepare the printer.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Sun, 13 Mar 2022 22:54:50 +0000 (18:54 -0400)]
pan/bi: Use vertex/instance ID helpers
Enables portability to Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Sun, 13 Mar 2022 22:53:32 +0000 (18:53 -0400)]
pan/bi: Add helpers to get vertex/instance ID
These are preloaded in different places across Bifrost and Valhall. Abstract
that away so code using the builder isn't littered with "is Valhall?" checks.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 20:47:00 +0000 (16:47 -0400)]
pan/va: Fix ST_CVT definitions
They are basicallly just STORE with an extra source and the memory access
modifier in a different place.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 20:46:19 +0000 (16:46 -0400)]
pan/va: Align error messages in disassembler tests
Makes it easier to spot the difference, less eye scanning.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 20:24:32 +0000 (16:24 -0400)]
pan/va: Add missing .auto32 register format
Clipped to .auto for consistency with Bifrost (and the existing IR).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 20:06:15 +0000 (16:06 -0400)]
pan/va: Add LEA_ATTR_IMM instruction
Encoded like LEA_TEX_IMM.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 20:03:42 +0000 (16:03 -0400)]
pan/va: Model LEA_TEX_IMM more accurately
The unknown field is a descriptor type, which we model as an opcode2 since it's
a fixed constant. This allows us to disambiguate LEA_TEX_IMM from LEA_ATTR_IMM.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Sun, 13 Mar 2022 23:59:36 +0000 (19:59 -0400)]
pan/va: Correct definition of ZS_EMIT
It's a message instruction, not an ALU one... duh.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 17:23:52 +0000 (13:23 -0400)]
panfrost: Add Tiler Job to v9 XML
Legacy tiling job, semantics are the same as on Midgard. Useful for blits and
transform feedback.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 17:22:10 +0000 (13:22 -0400)]
panfrost: Refactor XML to permit non-IDVS jobs
Tiler jobs look similar, but don't have the Allocations fields. Refactor to make
this possible to express.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 16:56:27 +0000 (12:56 -0400)]
panfrost: Fix definition of DCD on v9
The position and varying shader environment descriptors are additional sections
of the job, rather than part of the (fragment only) DCD. This distinction
matters for non-IDVS jobs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Sun, 13 Mar 2022 22:41:05 +0000 (18:41 -0400)]
panfrost: Fix primitive restart with 32-bit indices
There's an overflow here if index_size = 4. Caught when bringing up Valhall, not
sure why this was never caught before. Yikes.
Fixes:
7a6a5f3fe15 ("panfrost: Handle explicit primitive restart")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Sun, 13 Mar 2022 22:25:30 +0000 (18:25 -0400)]
panfrost: Correct ASTC decode mode XML
The narrow/wide bit was backwards.
Fixes:
bfba7533c7a ("panfrost: Add Valhall Plane Descriptor XML")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Thu, 17 Mar 2022 19:34:25 +0000 (15:34 -0400)]
pan/decode: Unify tiler job handling
Instead of adding a third Valhall path, let's use GenXML to unify our paths.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Alyssa Rosenzweig [Mon, 14 Mar 2022 22:46:14 +0000 (18:46 -0400)]
pan/decode: Handle blend arrays on Valhall
Required for MRT.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
Connor Abbott [Fri, 18 Mar 2022 11:32:41 +0000 (12:32 +0100)]
tu: Actually expose VK_EXT_texel_buffer_alignment
Oops...
Fixes:
3d04c435 ("tu: Trivially implement VK_EXT_texel_buffer_alignment")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15451>
Omar Akkila [Fri, 18 Mar 2022 04:54:43 +0000 (00:54 -0400)]
lavapipe: Lift fence check into dedicated function
Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15443>
Georg Lehmann [Fri, 18 Mar 2022 13:10:21 +0000 (14:10 +0100)]
radv: Don't hash ycbcr sampler base object.
Stops gamescope from recompiling pipelines on every start.
Cc: mesa-stable
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15454>
Jason Ekstrand [Wed, 9 Mar 2022 00:04:54 +0000 (18:04 -0600)]
panvk: Hook up emulated secondary command buffers
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Boris Brezillon [Wed, 9 Mar 2022 17:49:22 +0000 (18:49 +0100)]
panvk: Refcount the descriptor set and pipeline layouts
Lifetime of descriptor sets and pipeline layouts are odd. Let's refcount
them so we don't end up with use-after-free patterns.
That means we can't use custom allocators for those objects.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Jason Ekstrand [Tue, 8 Mar 2022 23:50:09 +0000 (17:50 -0600)]
vulkan/runtime: Add emulated secondary command buffer support
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Boris Brezillon [Thu, 10 Mar 2022 17:22:59 +0000 (18:22 +0100)]
vulkan/cmd_queue: Fix the allocation scope
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND is used for transient allocations that
are not expected to live outside the vkXxx(). Use
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT for cmd_entry allocations.
v2 (Jason Ekstrand):
- Also fix the manually typed entrypoints in vk_cmd_enqueue.c
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Boris Brezillon [Wed, 2 Feb 2022 18:05:16 +0000 (19:05 +0100)]
vulkan/cmd_queue: Track allocation errors in vk_cmd_queue
Needed to report allocation failures when vkEndCommandBuffer() is
called.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Jason Ekstrand [Thu, 17 Mar 2022 16:00:27 +0000 (11:00 -0500)]
vulkan/cmd_queue: Auto-generate more vk_cmd_enqueue_unless_primary_Cmd*
Instead of one MANUAL_COMMANDS, we now have two deny-lists:
MANUAL_COMMANDS and NO_ENQUEUE_COMMANDS. The former is for things which
have a manually typed implementation in vk_cmd_enqueue.c and the later
is for things we want to ignore entirely. This lets us auto-generate
vk_cmd_enqueue_unless_primary_Cmd* entrypoints for the manually typed
vk_cmd_enqueue_Cmd* entrypoints.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Jason Ekstrand [Wed, 9 Mar 2022 20:47:29 +0000 (14:47 -0600)]
vulkan/cmd_queue: Generate enqueue_if_not_primary entrypoints
These check the command buffer level and enqueue the command if it's not
a primary but uses vk_device::command_dispatch_table for primaries.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Jason Ekstrand [Tue, 8 Mar 2022 23:13:46 +0000 (17:13 -0600)]
vulkan/cmd_queue: Add a vk_cmd_queue_execute() helper
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14406>
Mike Blumenkrantz [Fri, 18 Mar 2022 16:34:58 +0000 (12:34 -0400)]
Revert "features: fix some vk extension listings"
This reverts commit
a3e9388953f60d22c188d0e40bb4187be9048800.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15460>
Jason Ekstrand [Fri, 18 Mar 2022 14:57:33 +0000 (09:57 -0500)]
lavapipe: Drop GetPhysicalDeviceQueueFamilyProperties
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:54:37 +0000 (09:54 -0500)]
lavapipe: Use VK_OUTARRAY for GetPhysicalDeviceQueueFamilyProperties[2]
This fixes bugs with lavapipe's hand-rolled pCount handling. The driver
is supposed to set *pCount to the number of queues actually written in
the case where it's initialized to a value that's too large. It's also
supposed to handle *pCount being too small.
Fixes:
b38879f8c5f5 ("vallium: initial import of the vulkan frontend")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:53:26 +0000 (09:53 -0500)]
panvk: Drop GetPhysicalDeviceQueueFamilyProperties
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:52:51 +0000 (09:52 -0500)]
v3dv: Drop GetPhysicalDeviceQueueFamilyProperties
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:51:51 +0000 (09:51 -0500)]
turnip: Drop tu_legacy.c
The remaining three helpers all have helpers in the common code.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:50:07 +0000 (09:50 -0500)]
radv: Drop GetPhysicalDeviceQueueFamilyProperties
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:49:09 +0000 (09:49 -0500)]
anv: Drop GetPhysicalDeviceQueueFamilyProperties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Jason Ekstrand [Fri, 18 Mar 2022 14:48:41 +0000 (09:48 -0500)]
vulkan: Add a 2 wrapper for vkGetPhysicalDeviceQueueFamilyProperties
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15459>
Mike Blumenkrantz [Fri, 18 Mar 2022 14:17:46 +0000 (10:17 -0400)]
features: fix some vk extension listings
memory model is 1.3 and descriptor indexing isn't required by anything
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15458>
Jason Ekstrand [Thu, 17 Mar 2022 22:35:27 +0000 (17:35 -0500)]
anv: Use layerCount for clears and transitions in BeginRendering
The Vulkan spec was recently clerified to say that transitions only
happen to the bound layers:
"Automatic layout transitions apply to the entire image subresource
attached to the framebuffer. If multiview is not enabled and the
attachment is a view of a 1D or 2D image, the automatic layout
transitions apply to the number of layers specified by
VkFramebufferCreateInfo::layers. If multiview is enabled and the
attachment is a view of a 1D or 2D image, the automatic layout
transitions apply to the layers corresponding to views which are
used by some subpass in the render pass, even if that subpass does
not reference the given attachment."
This is in the context of render passes but it applies to dynamic
rendering because the implicit layout transition stuff is a Mesa pseudo-
extension and inherits those rules.
For clears, the Vulkan spec says:
"renderArea is the render area that is affected by the render pass
instance. The effects of attachment load, store and multisample
resolve operations are restricted to the pixels whose x and y
coordinates fall within the render area on all attachments. The
render area extends to all layers of framebuffer."
Again, this is in the context of render passes but the same principals
apply to dynamic rendering where the layerCount and renderArea are
specified as part of the vkCmdBeginRendering() call.
Fixes:
3501a3f9ed92 ("anv: Convert to 100% dynamic rendering")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15441>