Matt Coster [Thu, 1 Sep 2022 09:08:11 +0000 (10:08 +0100)]
pvr: debug: Enhancements to hex dumps
Contains the following enhancements & fixes:
- Increase (decrease?) the granularity to single bytes rather than
using an arbitrary word size,
- Remove some spurious semicolons at the end of macros, and
- Do not collapse sections of zero bytes that consist of only a single
line.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040>
Karmjit Mahil [Mon, 21 Nov 2022 15:51:52 +0000 (15:51 +0000)]
pvr: Remove a todo in vkCmdEndRenderPass2().
The first end_sub_cmd() is to make sure that we end the last sub_cmd.
The end_sub_cmd() in pvr_resolve_unemitted_resolve_attachments() makes
sure that we end any transfer sub_cmds created in there.
Suggested-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957>
Karmjit Mahil [Mon, 21 Nov 2022 15:38:07 +0000 (15:38 +0000)]
pvr: Replace sub_cmd flags with bools within each sub_cmd type.
This commit remove:
- PVR_SUB_COMMAND_FLAG_TRANSFER_SERIALIZE_WITH_FRAG.
- PVR_SUB_COMMAND_FLAG_OCCLUSION_QUERY.
The first flag was specific to transfer sub commands and the last
one, for graphics ones. Now we just have a bool in the transfer
sub_cmd, and one in the graphics sub_cmd.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957>
Karmjit Mahil [Wed, 16 Nov 2022 17:00:38 +0000 (17:00 +0000)]
pvr: Handle PVR_SUB_COMMAND_FLAG_OCCLUSION_QUERY.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957>
Karmjit Mahil [Wed, 16 Nov 2022 16:38:18 +0000 (16:38 +0000)]
pvr: Handle PVR_SUB_COMMAND_FLAG_TRANSFER_SERIALIZE_WITH_FRAG.
The flag was previously named PVR_SUB_COMMAND_FLAG_WAIT_ON_PREVIOUS_FRAG.
Since the next fragment job is also made to wait for the transfer
job to complete, the previous name might have been a bit misleading.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957>
Iago Toral Quiroga [Thu, 1 Dec 2022 10:02:12 +0000 (11:02 +0100)]
v3dv: fix job serialization for single sync path
The idea in the single sync path is that we serialize any job that
needs to wait, however, our ANY queue syncobj only tracks the last job
submitted to any hardware queue, so in practice when we wait on this
we are only serializing against the queue to which we have submitted
the last job, which is not correct.
Fix that by accumulating the last job sync into the ANY queue synbcobj
to ensure that waiting on this syncobj effectively waits on all
hardware queues.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20078>
Iago Toral Quiroga [Thu, 1 Dec 2022 09:59:17 +0000 (10:59 +0100)]
v3dv: make single-sync paths more explicit
Instead of having functions that return early in multi-sync mode
let's only call them when we are in single-sync mode. I think this
makes the code more explicit.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20078>
Boris Brezillon [Tue, 20 Apr 2021 09:03:29 +0000 (11:03 +0200)]
panfrost: Add NATIVE_FENCE_FD cap
Add support for NATIVE_FENCE_FD so panfrost can advertise support for
EGL_ANDROID_native_fence_sync.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19774>
Boris Brezillon [Wed, 30 Nov 2022 09:00:02 +0000 (10:00 +0100)]
panfrost: Move fence code to pan_fence.{c,h}
Before adding support for NATIVE_FENCE_FD, let's move the fencing logic
to a dedicated file to avoid spreading the code in different places.
Suggested-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19774>
Boris Brezillon [Wed, 16 Nov 2022 09:48:34 +0000 (10:48 +0100)]
panfrost: Destroy panfrost_context::syncobj in the ctx desctruction path
Destroy panfrost_context::syncobj in the ctx desctruction path so we
don't leak a sync object.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19774>
Qiang Yu [Tue, 29 Nov 2022 03:15:17 +0000 (11:15 +0800)]
ac/nir/ngg: rename nogs 16bit output mask and var
To represent 16bit outputs more clearly.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
Qiang Yu [Sat, 12 Nov 2022 03:58:03 +0000 (11:58 +0800)]
ac/nir/ngg: gs support 16bit outputs
radeonsi uses 16bit varying slots.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
Qiang Yu [Sun, 13 Nov 2022 08:36:26 +0000 (16:36 +0800)]
ac/nir/ngg: gs skip check bit size before nir_u2u
nir_u2u do for us.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
Qiang Yu [Sun, 13 Nov 2022 08:30:39 +0000 (16:30 +0800)]
ac/nir/ngg: gs store output use src_type index for type info
More precise type info, can be used for 16bit output streamout
to convert 16bit int/uint/float to 32bit one later.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
Qiang Yu [Sat, 12 Nov 2022 13:24:08 +0000 (21:24 +0800)]
ac/nir/ngg: gs use u_foreach_bit64 to loop all output slots
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
Qiang Yu [Fri, 11 Nov 2022 10:46:40 +0000 (18:46 +0800)]
ac/nir/ngg: reduce nogs 16bit output gather space
Max slot number for 16bit output is 16, so no need to use
64 array size for them.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
Jason Ekstrand [Thu, 15 Sep 2022 23:31:06 +0000 (18:31 -0500)]
util/dynarray: Add an append_array helper
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19685>
Marcin Ślusarz [Mon, 24 Oct 2022 12:59:41 +0000 (14:59 +0200)]
intel/compiler: user payload starts after TUE header & its padding
All data written by the user are offset by TUE header size.
Without this patch we copy the correct amount of user data, but both
"from" and "to" offsets are wrong.
Fixes:
37e78803d7b ("intel/compiler: use nir_lower_task_shader pass")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19409>
Marcin Ślusarz [Mon, 24 Oct 2022 12:55:38 +0000 (14:55 +0200)]
nir/lower_task_shader: allow offsetting of the start of payload
We need this, because on Intel task payload starts with private header,
followed by user-accessible data.
Fixes:
37e78803d7b ("intel/compiler: use nir_lower_task_shader pass")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19409>
Marcin Ślusarz [Fri, 21 Oct 2022 13:49:52 +0000 (15:49 +0200)]
intel/compiler: adjust [store|load]_task_payload.base too
Base also needs to be converted from bytes to words.
Fixes:
c36ae42e4cc ("intel/compiler: Use nir_var_mem_task_payload")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19409>
David Heidelberg [Thu, 1 Dec 2022 10:38:56 +0000 (11:38 +0100)]
ci/zink: add lavapipe flakes
Listed from: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7613
Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7781
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20093>
Erik Faye-Lund [Tue, 27 Sep 2022 07:57:10 +0000 (09:57 +0200)]
zink: do not complain about missing line-stipple support
We can lower this now, so let's not complain about it...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Tue, 27 Sep 2022 11:23:04 +0000 (13:23 +0200)]
zink: lower line stipple
This lowers line-stippling to a combination of geometry and fragment
shaders:
- The geometry shader computes the length of each line-segment, and
outputs a varying that produces the stipple position.
- The fragment shader looks up the stipple position in the
stipple-pattern once per sample, and updates the sample mask
accordingly.
In case there's no geometry shader in place, we create a new
pass-through shader.
We should probably not declare the the push-constants in the pipeline
layout unless they're actually needed. But we already do this
unconditionally for the vertex shader and tesselation push-constants, so
let's do it unconditionally for these as well for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Thu, 3 Nov 2022 11:45:47 +0000 (12:45 +0100)]
zink: allow to generate any vertex shader stage
There's times when it's going to be useful to generate geometry shaders
as well, so let's generalize the infrastructure for generated shader
stages a bit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Thu, 17 Nov 2022 11:15:54 +0000 (12:15 +0100)]
zink: process non-optimal-key passes first
Right now, it's only the vertex-shader that needs special handling for
non-optimal keys. That makes it possible to use fallthrough to always
end up in the last-vertex-stage conditional.
But we're about to add special handling for the geometry stage as well,
so let's prepare by splitting the switch-statement in two; one that only
happens for non-optimal keys, and does all the needed processing there,
and one that deals with the rest.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Tue, 27 Sep 2022 07:43:11 +0000 (09:43 +0200)]
zink: give gs its own shader-key
Line-stipple lowering is going to need some geometry-shader specific
lowering, so lets give the GS its own shader-key struct.
The GS variant only needs a non-optimal variant, so let's assert that to
be sure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Wed, 26 Oct 2022 13:38:03 +0000 (15:38 +0200)]
zink: emit vars with nir_var_shader_temp mode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Tue, 27 Sep 2022 07:35:54 +0000 (09:35 +0200)]
zink: add line-stippling lowering passes
There's two notable limitations here:
- This will viewport-map to viewport #0 only. This is because we need
the viewport-scale factors, which we'll be uploading using
push-constants. And we don't want to waste too many of those...
- It's missing a "global" stipple-counter. It doesn't seem like there's
a portable way of implementing this, so this is going to require a VK
extension that can be implemented in a hardware-specific way in the
long run. For now, let's just ignore the global stipple counter.
These two limitations don't seem viable to overcome for now, so but this
is better than nothing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
Erik Faye-Lund [Tue, 27 Sep 2022 10:53:03 +0000 (12:53 +0200)]
zink: setup driver-workaround for missing linestipple
This is not ideal, but at least it should work. In the long run, we
might want to store a bit per mode we're missing, so we can do this
conditionally. But that's quite a bit more complicated, so let's go with
this for now.
The line-stippling logic needs non-optimal shader-keys. So let's drop
some perf on the floor here.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
David Heidelberg [Wed, 30 Nov 2022 09:55:08 +0000 (10:55 +0100)]
ci/alpine: disable the job, still occasionally flakes
See: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/
32689466
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20076>
Emma Anholt [Mon, 28 Nov 2022 19:27:09 +0000 (11:27 -0800)]
glx: Require __DRI_SWRAST >= 4 for doing swrast.
The only implementer in tree is v4.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:25:01 +0000 (11:25 -0800)]
egl: Refactor common error handling for context creation.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:24:15 +0000 (11:24 -0800)]
egl: Bump minimum version of __DRI_SWRAST to 4.
The only implementer in tree is v4. This simplifies some bits now that we
always have CreateContextAttribs.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:22:23 +0000 (11:22 -0800)]
glx: Require __DRI_DRI2 v2 for doing X11 DRI2.
The only implementer in tree is v4.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:20:57 +0000 (11:20 -0800)]
egl: Require __DRI_DRI2 v4 if we're to do DRI2.
The only in-tree implementers are v4.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:19:07 +0000 (11:19 -0800)]
egl: Bump __DRI_CONFIG_OPTIONS min version to 2.
The only implementer in tree is v2.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:12:44 +0000 (11:12 -0800)]
egl: Bump minimum version of __DRI_IMAGE to 6 and drop version checks.
All __DRI_IMAGEs in tree are v6+ (lowest being drisw) and implement
createImageFromTexture.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:08:56 +0000 (11:08 -0800)]
egl: Bump required version of optional __DRI2_FENCE to 2.
The only implementer of it in tree is v2, so no need for checks.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Mon, 28 Nov 2022 19:34:58 +0000 (11:34 -0800)]
gbm: Bump required __DRI_IMAGE version to 6.
That's the minimum implemented in tree (gallium swrast). Drops a few more
version checks.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Wed, 23 Nov 2022 00:58:08 +0000 (16:58 -0800)]
gbm: Drop support for __DRI_DRI2 < 4 and __DRI_SWRAST < 4.
We're always loading a gallium driver built from this tree, so it's always
v4.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Emma Anholt [Sat, 26 Nov 2022 05:44:18 +0000 (21:44 -0800)]
dri: Add notes on what part of the loader interface are used by Xorg.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044>
Connor Abbott [Tue, 29 Nov 2022 14:56:39 +0000 (15:56 +0100)]
freedreno/fdl: Set sRGB bit for storage images
This probably wasn't noticed earlier because tests using sRGB storage
images didn't exist, and we didn't know whether this works, but this
fixes dEQP-VK.image.store.without_format.2d.*_srgb which also proves
that the bit works.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20060>
Alyssa Rosenzweig [Sat, 26 Nov 2022 00:57:25 +0000 (19:57 -0500)]
agx: Clamp point sizes
Fixes vs-point_size-zero.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Sat, 26 Nov 2022 00:46:15 +0000 (19:46 -0500)]
agx: Handle 32-bit gl_FragCoord.zw
The coefficient register is 16-bit so our builder will make the iter 16-bit too
(maybe not the best design...), force fp32 to match the NIR intrinsic.
Fixes glsl-fs-fragcoord-zw-ortho
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Sat, 26 Nov 2022 00:37:25 +0000 (19:37 -0500)]
agx: Handle large varying indices
Fixes glsl-max-varyings.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Fri, 25 Nov 2022 22:06:40 +0000 (17:06 -0500)]
asahi: Support one-sided polygon modes
We can implement glPolygonMode(GL_FRONT_AND_BACK, ...) natively. What we can't
implement natively are two-sided polygon modes. For that Apple has a nontrivial
lowering which I don't feel the need to implement unless someone actually hits a
workload other than Piglit that uses it.
Vulkan requires only one-sided polygon modes (so this is sufficient there), and
GLES doesn't have polygon modes at all. If an app hits the unimplemented case,
throw a warning like Zink does.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Sat, 26 Nov 2022 03:19:12 +0000 (22:19 -0500)]
asahi: Handle NULL sampler views
Fixes fp-fragment-position (crash->pass).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Sat, 26 Nov 2022 03:08:23 +0000 (22:08 -0500)]
asahi: Unset GL_CLAMP
Use the Zink lowering for the legacy mode, it's not too many instructions on AGX
anyway. Fixes texwrap tests.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Sat, 26 Nov 2022 00:27:20 +0000 (19:27 -0500)]
asahi: Set frag coord caps correctly
Fixes ./glsl-arb-fragment-coord-conventions, c.f.
12facf23b1f ("panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER").
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Sat, 26 Nov 2022 00:10:54 +0000 (19:10 -0500)]
asahi: Set PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION
Fixes arb-provoking-vertex-render.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Alyssa Rosenzweig [Fri, 25 Nov 2022 23:53:17 +0000 (18:53 -0500)]
asahi: Set PIPE_CAP_SUPPORTED_PRIM_MODES
To lower GL_POLYGONS which we don't do natively. Fixes a pile of crashes in
Piglit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017>
Jason Ekstrand [Tue, 29 Nov 2022 20:08:50 +0000 (14:08 -0600)]
hasvk: Drop anv_nir_add_base_work_group_id()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 20:08:22 +0000 (14:08 -0600)]
anv: Drop anv_nir_add_base_work_group_id()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 20:05:19 +0000 (14:05 -0600)]
intel/nir: Set has_base_workgroup_id for lower_compute_system_values
This option didn't exist half a decade ago when I first implemented base
workgroup support in ANV. It's cleaner to just have split system values
like all the other zero_base+base things do.
We currently only do this for COMPUTE and not KERNEL because it lets us
avoid changing intel_clc for now. We can add KERNEL later if needed.
We also don't do this lowering for task/mesh.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 20:04:50 +0000 (14:04 -0600)]
hasvk: Implement lower_base_workgroup_id
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 20:03:54 +0000 (14:03 -0600)]
anv: Implement lower_base_workgroup_id
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 19:58:29 +0000 (13:58 -0600)]
crocus: Lower load_base_workgroup_id to zero
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 19:58:20 +0000 (13:58 -0600)]
iris: Lower load_base_workgroup_id to zero
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 19:54:55 +0000 (13:54 -0600)]
intel/fs: Support load_workgroup_id_zero_base
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Jason Ekstrand [Tue, 29 Nov 2022 19:52:43 +0000 (13:52 -0600)]
nir/divergence: Handle base_workgroup_id and workgrpu_id_zero_base
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068>
Bas Nieuwenhuizen [Mon, 21 Nov 2022 00:27:49 +0000 (01:27 +0100)]
radv: Remove the old LBVH shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891>
Bas Nieuwenhuizen [Mon, 21 Nov 2022 00:26:22 +0000 (01:26 +0100)]
radv: Switch to new LBVH implementation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891>
Bas Nieuwenhuizen [Mon, 21 Nov 2022 00:11:36 +0000 (01:11 +0100)]
radv: Add new LBVH shaders.
Contrary to the previous implementation, this actually implements an LBVH builder.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891>
Bas Nieuwenhuizen [Tue, 29 Nov 2022 01:28:08 +0000 (02:28 +0100)]
radv: Handle nodes with 2 invalid children in internal node converter.
Fixes:
682dc5c28e4 ("radv: Add conversion shader for internal nodes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891>
Alyssa Rosenzweig [Sat, 29 Oct 2022 19:58:28 +0000 (15:58 -0400)]
panfrost: Enable AFBC of more formats
Enable AFBC for all RGBA UNORM formats possible in v5. This does not
cover the AFBC rules for newer gens, nor for YUV.
Noticed with an uncompressed R8 UNORM texture in SuperTuxKart.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758>
Alyssa Rosenzweig [Thu, 27 Oct 2022 21:31:08 +0000 (17:31 -0400)]
panfrost: Enable AFBC of sRGB formats
AFBC of sRGB formats should just work. We just need to flip it on and enjoy
the improved performance.
In particular, this means that RGBA8 UNORM and RGBA8 sRGB UNORM are now
considered compatible formats for AFBC. That's a bug fix, because
GALLIUM_HUD use will act like a texture view between sRGB and linear
views. For FBOs, that will "just" result in a decompression, hurting
performance. For window system rendering with AFBC, that will cause an
assertion failure, as we cannot decompress SHARED resources.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758>
Alyssa Rosenzweig [Sat, 29 Oct 2022 19:38:26 +0000 (15:38 -0400)]
panfrost: Enable AFBC of cube maps
Missed by mistake. This is not the same as 3D AFBC, it's just like a 2D
array. Noted in a supertuxkart pandecode.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758>
Alyssa Rosenzweig [Wed, 30 Nov 2022 20:33:05 +0000 (15:33 -0500)]
panfrost: Handle all RGB AFBC modes on v9
We're about to enable AFBC on more formats in the core AFBC code. The plane
descriptor packing needs to be aware of these new formats.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758>
Georg Lehmann [Mon, 28 Nov 2022 16:20:10 +0000 (17:20 +0100)]
aco: Use wave size specific opcode for s_or in cube map coord code.
Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20041>
Jason Ekstrand [Tue, 29 Nov 2022 19:28:12 +0000 (13:28 -0600)]
nir/builder: Also short-circuit for auto-generated nir_t2t<N>()
This makes nir_i2i32(b, x) behave exactly like nir_i2iN(b, x, 32) etc.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7787
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Jason Ekstrand [Tue, 29 Nov 2022 19:10:42 +0000 (13:10 -0600)]
nir/builder: Rework the boolean conversion helpers
Move them up to where the other conversion helpers. For nir_b2<T>(),
suffix them with N like all the others and make them use
nir_type_convert() as well.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Jason Ekstrand [Tue, 29 Nov 2022 18:54:21 +0000 (12:54 -0600)]
nir/builder: Drop nir_i2i and nir_u2u in favor of nir_x2xN
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Jason Ekstrand [Tue, 29 Nov 2022 18:56:37 +0000 (12:56 -0600)]
nir/builder: Move conversions higher in nir_builder.h
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Jason Ekstrand [Tue, 29 Nov 2022 18:48:38 +0000 (12:48 -0600)]
nir/builder: Short-circuit in nir_type_convert if no conversion happens
If both types are the same or both are integer types with the same bit
size, no actual conversion happens and nir_type_conversion_op() will
return nir_op_mov. In this case, there's no point in emitting the move
and we can just return src instead.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Jason Ekstrand [Tue, 29 Nov 2022 18:50:33 +0000 (12:50 -0600)]
nir/builder: Fix indentation of nir_type_convert
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Jason Ekstrand [Tue, 29 Nov 2022 20:26:44 +0000 (14:26 -0600)]
nir: Fix builder usage in lower_mediump_vars()
In our handling of load_deref, we were calling builder helpers to create
conversions and then adjusting the destination bit size of the load. We
should adjust the bit size first because the builder sometimes looks at
the bit sizes of SSA values passed in as arguments.
Even though it's not strictly necessary, adjust the store_deref case as
well to make it fully symmetric with the load_deref case.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067>
Alyssa Rosenzweig [Fri, 28 Oct 2022 01:28:34 +0000 (21:28 -0400)]
pan/mdg: Emulate 8-bit with the 16-bit pipe
We don't care to support i8vec16, we just need a bit of 8-bit support to
implement format packing/unpacking in blend shaders. We're already doing
this by using the 16-bit pipe, we just need to commit to it all the way
-- reporting the correct sizes in max_bitsize_for_alu so the mask
packing logic works as intended -- and dropping the imov-specific hack
that was introduced to workaround a similar class of bugs.
With the previous patch, fixes:
dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.1
Fixes:
39e4b7279dc ("pan/midg: Fix swizzling on 8-bit sources")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19763>
Alyssa Rosenzweig [Fri, 28 Oct 2022 02:15:24 +0000 (22:15 -0400)]
pan/mdg: Refuse to schedule CSEL.vector to SMUL
Even if we only mask a single component from the result of CSEL.vector,
in our IR we treat its semantics as vector which causes trouble with
when scheduled to a scalar unit.
The problematic bundle looks like this:
vmul.MOV.i32 R31, TMP0.xxxx, R0.yzww
sadd.MAX.i32 TMP0.y, R0.y, #65408
smul.CSEL.vector.i32 R0.y, TMP0.y, #127
As the comment in midgard.h illuminates, these CSEL instructions are
actually operating per-bit, lining up with the all-1's booleans in
Midgard. The Bifrost analogue is MUX.i32.bit, not CSEL.i32. We should
probably rename the Midgard instruction to make that clear.
Anyhoo, on the scalar unit, CSEL/MUX operates on the bottom 32-bits of
its source. That's ok for the usual r31.w case, because that's secretly
replicating to its nonexistent register, I think? But that doesn't work
with the CSEL.vector (MUX.vector) form, because the condition it's
actually muxing on is r31.x, which here is R0.y, not the intended R0.x.
Rather than adding more special cases to the already overcomplicated
scheduler (for the dubious benefit of avoiding a small shaderdb
regression), just avoid scheduling CSEL.vector to smul.
With the next patch, fixes:
dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.1
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19763>
Daniel Stone [Wed, 30 Nov 2022 15:06:55 +0000 (15:06 +0000)]
ci: Rebalance radv/grunt testing
We've recently rebalanced our lab devices to get a fewer number of
grunts. Switch to scheduling only on the newer shinier ones, running
fewer tests. We'll evaluate the runtime, and if they're quick enough
then we can increase the amount of testing we do.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20081>
Rajnesh Kanwal [Fri, 7 Oct 2022 07:40:11 +0000 (12:40 +0500)]
pvr: Add support to submit occlusion query sub cmds.
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Fri, 7 Oct 2022 07:38:51 +0000 (12:38 +0500)]
pvr: Create a separate compute context for queries.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Thu, 6 Oct 2022 13:10:10 +0000 (18:10 +0500)]
pvr: Set isp userpass to dirty for secondary command buffers.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Thu, 6 Oct 2022 12:13:27 +0000 (17:13 +0500)]
pvr: Process queries and emit write program when ending sub_cmd.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Thu, 6 Oct 2022 12:11:32 +0000 (17:11 +0500)]
pvr: Kick job and end sub_cmd if barrier_store is set in vkCmdExecuteCommands.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Thu, 6 Oct 2022 12:07:08 +0000 (17:07 +0500)]
pvr: Process secondary buffer queries in vkCmdExecuteCommands.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Thu, 6 Oct 2022 12:00:36 +0000 (17:00 +0500)]
pvr: Save error result in cmd_buffer state.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 20:58:16 +0000 (01:58 +0500)]
pvr: Implement vkCmdCopyQueryPoolResults API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 20:57:52 +0000 (01:57 +0500)]
pvr: Implement vkCmdResetQueryPool API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 15:40:44 +0000 (20:40 +0500)]
pvr: Add support to generate query programs.
This commit adds support to generate three types of query related
programs. PVR_QUERY_TYPE_AVAILABILITY_WRITE allows to submit the
queries, PVR_QUERY_TYPE_RESET_QUERY_POOL allows to reset the pool
and PVR_QUERY_TYPE_COPY_QUERY_RESULTS is to copy the results.
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 13:48:24 +0000 (18:48 +0500)]
pvr: Add PVR_SUB_CMD_TYPE_OCCLUSION_QUERY type sub cmd.
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 13:41:46 +0000 (18:41 +0500)]
pvr: Create device specific compute query programs.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 12:19:18 +0000 (17:19 +0500)]
pvr: Implement vkCmdEndQuery API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 12:18:33 +0000 (17:18 +0500)]
pvr: Implement vkCmdBeginQuery API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 11:55:20 +0000 (16:55 +0500)]
pvr: Sequential dependency should be NONE for 0 constant shared regs.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 11:49:08 +0000 (16:49 +0500)]
pvr: Implement vkGetQueryPoolResults API.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 11:45:51 +0000 (16:45 +0500)]
pvr: Add support to generate update compute kernel.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 11:43:35 +0000 (16:43 +0500)]
pvr: Add support to generate compute kernel to update shared regs.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Rajnesh Kanwal [Wed, 5 Oct 2022 11:34:24 +0000 (16:34 +0500)]
pvr: Change CDM to compute, TA to geometry and 3D to fragment.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371>
Gert Wollny [Tue, 29 Nov 2022 14:53:41 +0000 (15:53 +0100)]
r600: Store nir shaders serialized to save memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7247
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20061>
Georg Lehmann [Mon, 28 Nov 2022 16:10:22 +0000 (17:10 +0100)]
aco: Don't prematurely emit s_andn2.
Split s_not + s_and allows more inverse comparision and s_cbranch_vccz
optimizations.
Foz-DB Navi21:
Totals from 516 (0.38% of 134913) affected shaders:
CodeSize: 7273724 -> 7273720 (-0.00%)
Instrs: 1364408 -> 1364407 (-0.00%)
Latency:
14604862 ->
14604858 (-0.00%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19143>