platform/upstream/mesa.git
2 years agozink: clamp out min_lod operands for explicit lod ops
Mike Blumenkrantz [Wed, 11 May 2022 20:02:51 +0000 (16:02 -0400)]
zink: clamp out min_lod operands for explicit lod ops

this is illegal (and nonsensical)

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16456>

2 years agozink: fix up sparse texture sampling for shadow samplers
Mike Blumenkrantz [Wed, 11 May 2022 13:26:22 +0000 (09:26 -0400)]
zink: fix up sparse texture sampling for shadow samplers

the problem here is that this returns a vec2 instead of a vec5, which
throws all the existing calculations off

given that the shader is (still) expecting a vec2 return from this,
and there's no way to sanely rewrite with nir to be valid for both
sampler types as well as spirv translation, just pad out to a vec2
here and be done with it

Fixes: 73ef54e3424 ("zink: handle residency return value from sparse texture instructions")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16456>

2 years agonir: remove unreachable loop terminators
Timothy Arceri [Mon, 9 May 2022 10:20:26 +0000 (20:20 +1000)]
nir: remove unreachable loop terminators

Remove the conditional break statements associated with all
terminators that are associated with a fixed iteration count,
except for the one associated with the limiting terminator.

This logic matches similiar functionality that exists in the
old GLSL IR unrolling code.

This change helps a piglit test pass on the r300 driver once
we switch off the old GLSL IR unrolling code.

Shader-db results IRIS (BDW):

total instructions in shared programs: 17538619 -> 17538595 (<.01%)
instructions in affected programs: 216 -> 192 (-11.11%)
helped: 3
HURT: 0
helped stats (abs) min: 7 max: 10 x̄: 8.00 x̃: 7
helped stats (rel) min: 10.00% max: 12.07% x̄: 11.38% x̃: 12.07%

total cycles in shared programs: 858674910 -> 858672810 (<.01%)
cycles in affected programs: 79540 -> 77440 (-2.64%)
helped: 3
HURT: 0
helped stats (abs) min: 620 max: 800 x̄: 700.00 x̃: 680
helped stats (rel) min: 2.45% max: 2.83% x̄: 2.63% x̃: 2.62%

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16399>

2 years agonir: always set the exact_trip_count_unknown loop terminator property
Timothy Arceri [Mon, 9 May 2022 08:20:34 +0000 (18:20 +1000)]
nir: always set the exact_trip_count_unknown loop terminator property

Previously we only cared if this was set for the limiting
terminator. However in the following patch we will make use of this
information on other terminators to decide if we can eliminate them.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16399>

2 years agontt: make use of new samplers_used field
Karol Herbst [Thu, 5 May 2022 09:45:28 +0000 (11:45 +0200)]
ntt: make use of new samplers_used field

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agontt: Don't gather samplers_declared twice
Jason Ekstrand [Tue, 10 May 2022 13:57:50 +0000 (08:57 -0500)]
ntt: Don't gather samplers_declared twice

Prior to scanning instrucitons, we initialize it based on variables.  If
this is adding anything, we have a bug somewhere.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agolavapipe: Set images_used in lvp_lower_pipeline_layout
Jason Ekstrand [Tue, 10 May 2022 18:29:00 +0000 (13:29 -0500)]
lavapipe: Set images_used in lvp_lower_pipeline_layout

This mirrors what we do for textures.  Also, the current code is busted
because it sets it based on var->data.binding which
lvp_lower_pipeline_layout will change so it can get out-of-sync.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agollvmpipe: Fill out samplers even if nr_samplers = 0
Jason Ekstrand [Tue, 10 May 2022 18:33:07 +0000 (13:33 -0500)]
llvmpipe: Fill out samplers even if nr_samplers = 0

Coming in from Vulkan or OpenCL, it's possible for nr_samplers to be
zero if all we ever use is texelFetch().  Annoyingly, samplers and
sampler views are handled by the same function.  Fortunately, it will
work if some of the samplers or sampler views are missing so we can just
pass the maximum.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agogallium/draw: Properly handle nr_samplers != nr_sampler_views in keys
Jason Ekstrand [Tue, 10 May 2022 20:58:36 +0000 (15:58 -0500)]
gallium/draw: Properly handle nr_samplers != nr_sampler_views in keys

First, make all key_size functions take nr_samplers and nr_sampler_views
separately so we ensure both get passed in.  Second, rework the offset
helpers to take MAX(nr_samplers, nr_sampler_views) so we get the image
param offset correct if nr_samplers < nr_sampler_views.  While we're
here, also re-order the size calculations to be in the same order as the
things land in memory.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agomesa/st: Set samplers_used in lower_tex_src_plane
Jason Ekstrand [Tue, 10 May 2022 16:27:49 +0000 (11:27 -0500)]
mesa/st: Set samplers_used in lower_tex_src_plane

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agottn: Set shader_info::samplers_used
Jason Ekstrand [Tue, 10 May 2022 16:14:37 +0000 (11:14 -0500)]
ttn: Set shader_info::samplers_used

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agogallium: Set shader_info::samplers_used in pstipple_fs
Jason Ekstrand [Tue, 10 May 2022 16:12:18 +0000 (11:12 -0500)]
gallium: Set shader_info::samplers_used in pstipple_fs

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agolavapipe: Set shader_info::samplers_used
Jason Ekstrand [Tue, 10 May 2022 15:52:53 +0000 (10:52 -0500)]
lavapipe: Set shader_info::samplers_used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agoclover: Set images/samplers_used when lowering images
Jason Ekstrand [Tue, 10 May 2022 15:00:14 +0000 (10:00 -0500)]
clover: Set images/samplers_used when lowering images

Also, stop using BITSET_SET_RANGE_INSIDE_WORD for textures so we can
handle more than 32 of them.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>

2 years agoturnip: Add a TU_DEBUG=perf debug option.
Emma Anholt [Mon, 18 Apr 2022 17:10:10 +0000 (10:10 -0700)]
turnip: Add a TU_DEBUG=perf debug option.

For doing performance investigation, I often find it useful to have a "are
we tripping over any of our performance TODOs?" flag, so add it and use it
in a few of the TODOs.

This also greatly cleans up the deqp-vk logs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16316>

2 years agoradv: Print task shader stage name before disasm.
Timur Kristóf [Thu, 27 Jan 2022 09:08:12 +0000 (10:08 +0100)]
radv: Print task shader stage name before disasm.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Lower shared and task_payload variables in task/mesh shaders.
Timur Kristóf [Thu, 27 Jan 2022 09:07:55 +0000 (10:07 +0100)]
radv: Lower shared and task_payload variables in task/mesh shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Allow linking task shaders.
Timur Kristóf [Tue, 18 Jan 2022 15:39:10 +0000 (16:39 +0100)]
radv: Allow linking task shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Postprocess task shader configuration.
Timur Kristóf [Tue, 18 Jan 2022 15:38:49 +0000 (16:38 +0100)]
radv: Postprocess task shader configuration.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Use I/O lowering for task and mesh shaders.
Timur Kristóf [Tue, 8 Feb 2022 10:27:24 +0000 (11:27 +0100)]
radv: Use I/O lowering for task and mesh shaders.

We set the number of task shader ring entries in radv_device
based on the generous assumption that each CU can run task/mesh
shaders with maximum occupancy.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Enable nir_opt_offsets for task shaders.
Timur Kristóf [Tue, 18 Jan 2022 15:37:53 +0000 (16:37 +0100)]
radv: Enable nir_opt_offsets for task shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Implement task shader intrinsics in the ABI.
Timur Kristóf [Wed, 11 May 2022 10:38:02 +0000 (12:38 +0200)]
radv: Implement task shader intrinsics in the ABI.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Add task ring entry argument for mesh shaders.
Timur Kristóf [Mon, 24 Jan 2022 10:33:55 +0000 (11:33 +0100)]
radv: Add task ring entry argument for mesh shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Add task shader arguments.
Timur Kristóf [Sun, 23 Jan 2022 17:35:12 +0000 (18:35 +0100)]
radv: Add task shader arguments.

Mostly the same as for compute shaders, but with a few extras:

task_ring_offsets:
Same as what ring_offsets is to graphics shaders.
Contains an address that points to a buffer that contains
the ring buffer descriptors.

task_ring_entry:
Index that can be used to address the draw and payload rings.

draw_id:
Same meaning as in graphics shaders.

task_ib_addr/task_ib_stride:
Indirect buffer address and stride from the draw calls.
These are used to emulate the firstTask feature of NV_mesh_shader.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Fill task shader info.
Timur Kristóf [Tue, 18 Jan 2022 15:37:34 +0000 (16:37 +0100)]
radv: Fill task shader info.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Set wave size for task shaders.
Timur Kristóf [Tue, 18 Jan 2022 15:37:16 +0000 (16:37 +0100)]
radv: Set wave size for task shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Set user data register for task shaders.
Timur Kristóf [Tue, 18 Jan 2022 15:36:42 +0000 (16:36 +0100)]
radv: Set user data register for task shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoradv: Add radv_pipeline_has_task helper.
Timur Kristóf [Tue, 18 Jan 2022 15:39:53 +0000 (16:39 +0100)]
radv: Add radv_pipeline_has_task helper.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoac: Add task ring entry shader argument.
Timur Kristóf [Sat, 15 Jan 2022 13:09:12 +0000 (14:09 +0100)]
ac: Add task ring entry shader argument.

This is going to be used by both task and mesh shaders for
accessing the draw and payload ring buffers.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agoac/nir: Add I/O lowering for task and mesh shaders.
Timur Kristóf [Sat, 15 Jan 2022 12:56:13 +0000 (13:56 +0100)]
ac/nir: Add I/O lowering for task and mesh shaders.

Task shaders store their output payload to VRAM where mesh
shaders read from. There are two ring buffers:

1. Draw ring: this is where mesh dispatch sizes and
the ready bit are stored.

2. Payload ring: this is where the optional payload
is stored (up to 16K per task workgroup).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14929>

2 years agonir: Mark negative re-distribution on fadd as imprecise
Jason Ekstrand [Tue, 19 Apr 2022 16:05:45 +0000 (11:05 -0500)]
nir: Mark negative re-distribution on fadd as imprecise

Otherwise, it would mutate `fneg(fadd(-0, 0))` into `fadd(0, -0)` which
isn't correct since -0 + (+0) = +0 + (-0) = +0.

This fixes the OpenCL contraction tests on Iris.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16041>

2 years agoiris: Set BindingTableEntryCount for compute shaders
Jason Ekstrand [Tue, 5 Apr 2022 21:42:55 +0000 (16:42 -0500)]
iris: Set BindingTableEntryCount for compute shaders

This may slightly increase perf somewhere because the hardware can now
pre-cache binding tables.  The real feature is that INTEL_DEBUG=bat now
dumps out surface states for compute.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15759>

2 years agosvga: workaround for unexpected double swizzle
Charmaine Lee [Wed, 11 May 2022 05:23:13 +0000 (22:23 -0700)]
svga: workaround for unexpected double swizzle

SM5 requires swizzles for 64 bits alu source to be either .xyzw,
.xyxy, .zwxy, or .zwzw. If the swizzles are not in the valid pattern,
move the source according to the specified swizzle to a temporary register
first.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16464>

2 years agopan/bi: Ensure the end NOP isn't eliminated
Alyssa Rosenzweig [Mon, 2 May 2022 19:28:38 +0000 (15:28 -0400)]
pan/bi: Ensure the end NOP isn't eliminated

Otherwise the lowering doesn't work.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Support atomics on Valhall
Alyssa Rosenzweig [Wed, 23 Mar 2022 01:53:20 +0000 (21:53 -0400)]
pan/bi: Support atomics on Valhall

Atomics on Valhall work basically the same as on Bifrost, however the
instruction selection is simplified as there are no clauses. Support the
simplified set of atomic instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Handle shared/scratch on Valhall
Alyssa Rosenzweig [Tue, 22 Mar 2022 23:43:59 +0000 (19:43 -0400)]
pan/bi: Handle shared/scratch on Valhall

There's no .seg modifier, so we have some easy lowering to do ourselves.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Handle shared atomic exchange on Valhall
Alyssa Rosenzweig [Wed, 30 Mar 2022 20:18:06 +0000 (16:18 -0400)]
pan/bi: Handle shared atomic exchange on Valhall

Need to lower the WLS into a segment addition, since the .seg modifier was
dropped on Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Preserve AXCHG.i32 destination
Alyssa Rosenzweig [Wed, 30 Mar 2022 19:56:41 +0000 (15:56 -0400)]
pan/bi: Preserve AXCHG.i32 destination

dEQP-GLES31.functional.image_load_store.2d.atomic.exchange_r32f_result

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Support image loads on Valhall
Alyssa Rosenzweig [Wed, 30 Mar 2022 19:52:22 +0000 (15:52 -0400)]
pan/bi: Support image loads on Valhall

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Emit LEA_TEX on Valhall
Alyssa Rosenzweig [Wed, 30 Mar 2022 18:12:06 +0000 (14:12 -0400)]
pan/bi: Emit LEA_TEX on Valhall

As opposed to LEA_ATTR_TEX. In principle we could do this for Bifrost too, but
let's keep the Midgard compatible path for now.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agopan/bi: Don't analyze td on Valhall
Alyssa Rosenzweig [Fri, 23 Jul 2021 22:04:24 +0000 (18:04 -0400)]
pan/bi: Don't analyze td on Valhall

The implementation is based on clauses, so it won't work on Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16410>

2 years agolavapipe: enable subgroup quad operations
Autumn on Tape [Thu, 5 May 2022 00:45:22 +0000 (17:45 -0700)]
lavapipe: enable subgroup quad operations

Signed-off-by: Autumn on Tape <autumn@cyfox.net>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16340>

2 years agomesa: Make sure to fallback to handling the original choose texture format
Corentin Noël [Tue, 10 May 2022 15:23:24 +0000 (17:23 +0200)]
mesa: Make sure to fallback to handling the original choose texture format

It is possible for st_ChooseTextureFormat to return MESA_FORMAT_NONE when
samples is forced to 2. Always allow to fallback to the original case.

Fixes: 89c94502b6650fed222abd3588e9c927811580aa
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6441
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16432>

2 years agoaco: drop unused radv include
Dave Airlie [Mon, 9 May 2022 01:24:59 +0000 (11:24 +1000)]
aco: drop unused radv include

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco: remove radv vs prolog key from aco internals.
Dave Airlie [Thu, 5 May 2022 04:27:01 +0000 (14:27 +1000)]
aco: remove radv vs prolog key from aco internals.

This creates an aco specific key, and converts radv to it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco/radv: convert to aco shader info at the radv level.
Dave Airlie [Thu, 5 May 2022 03:34:41 +0000 (13:34 +1000)]
aco/radv: convert to aco shader info at the radv level.

This removes the radv shader info type from aco completely.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco/info: add some more fields.
Dave Airlie [Thu, 5 May 2022 02:42:03 +0000 (12:42 +1000)]
aco/info: add some more fields.

These fields are also used in aco.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco: convert vs and so info over to aco structs.
Dave Airlie [Thu, 5 May 2022 02:22:13 +0000 (12:22 +1000)]
aco: convert vs and so info over to aco structs.

This renames the vs to vp (vertex pipeline) on the way past.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco: remove radv specific streamout info
Dave Airlie [Thu, 5 May 2022 02:17:15 +0000 (12:17 +1000)]
aco: remove radv specific streamout info

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco/info: reduce the gs ring info to what is needed.
Dave Airlie [Thu, 5 May 2022 02:11:53 +0000 (12:11 +1000)]
aco/info: reduce the gs ring info to what is needed.

Only one member was being used.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco: move to a minimal aco shader info struct.
Dave Airlie [Thu, 5 May 2022 01:51:50 +0000 (11:51 +1000)]
aco: move to a minimal aco shader info struct.

This should be kept to only things aco uses, and expanded when
radeonsi support is added. Things should be removed if lowered in NIR.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoaco: move info pointer to a copy.
Dave Airlie [Thu, 5 May 2022 01:32:53 +0000 (11:32 +1000)]
aco: move info pointer to a copy.

This is just setup to move this to a different struct later.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342>

2 years agoradv: Don't retile read-only images.
Georg Lehmann [Fri, 6 May 2022 12:48:38 +0000 (14:48 +0200)]
radv: Don't retile read-only images.

Avoid unnessecary work on FOREIGN queue release barriers. If we can't modify
the image there can't be a situation where we need to update the presentable
dcc data.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16371>

2 years agopps: Open writable renderer node in DrmDevice::create
Danylo Piliaiev [Mon, 9 May 2022 17:28:28 +0000 (20:28 +0300)]
pps: Open writable renderer node in DrmDevice::create

DrmDevice::create_all correctly opened the node with O_RDWR, while
DrmDevice::create was not, causing failure to create writable buffer.

Fixes pps-config on Freedreno.

Fixes: 1cc72b2aef82373247466c2e7b81970c867ad0fa
("pps: Gfx-pps v0.3.0")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16406>

2 years agopanvk: Advertise support for logicOp
Jason Ekstrand [Thu, 5 May 2022 17:47:34 +0000 (12:47 -0500)]
panvk: Advertise support for logicOp

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agonir/lower_blend: Expand or shrink output variables as needed
Jason Ekstrand [Tue, 3 May 2022 17:34:44 +0000 (12:34 -0500)]
nir/lower_blend: Expand or shrink output variables as needed

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agomidgard: Handle FB fetch from non-vec4 output variables.
Jason Ekstrand [Mon, 9 May 2022 20:24:46 +0000 (15:24 -0500)]
midgard: Handle FB fetch from non-vec4 output variables.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agonir/builder: Add a nir_resize_vector helper
Jason Ekstrand [Mon, 9 May 2022 20:16:16 +0000 (15:16 -0500)]
nir/builder: Add a nir_resize_vector helper

We're about to use this a couple of places.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agonir/builder: Add a nir_trim_vector helper
Jason Ekstrand [Mon, 9 May 2022 17:15:44 +0000 (12:15 -0500)]
nir/builder: Add a nir_trim_vector helper

This pattern pops up a bunch and the semantics of nir_channels() aren't
very convenient much of the time.  Let's add a nir_trim_vector() which
matches nir_pad_vector().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agonir/lower_blend: Support SNORM and integer formats for logic ops
Jason Ekstrand [Tue, 3 May 2022 15:55:24 +0000 (10:55 -0500)]
nir/lower_blend: Support SNORM and integer formats for logic ops

This fixes 158 of the dEQP-VK.pipeline.logic_op.* tests, once we turn
the feature on.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agonir/lower_blend: Stop passing the whole options object around
Jason Ekstrand [Tue, 3 May 2022 15:44:30 +0000 (10:44 -0500)]
nir/lower_blend: Stop passing the whole options object around

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agonir/lower_blend: Be more explicit about deref assumptions
Jason Ekstrand [Tue, 3 May 2022 14:28:01 +0000 (09:28 -0500)]
nir/lower_blend: Be more explicit about deref assumptions

Because we pull the RT from the variable location and use that to look
up formats, we need a constant RT index.  To deal with arrays (possibly
of arrays), we would either need to handle array derefs (we don't today)
or we need to require the variables to be split into one variable per
RT.  Given that we have to lower indirect derefs anyway (to get constant
indices), we may as well require the client to split output variables by
calling nir_lower_io_arrays_to_elements_no_indirect().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agopanvk: Call nir_lower_io_arrays_to_elements_no_indirects
Jason Ekstrand [Tue, 3 May 2022 18:08:29 +0000 (13:08 -0500)]
panvk: Call nir_lower_io_arrays_to_elements_no_indirects

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>

2 years agoci/radv: remove amdgpu.gpu_recovery=0 from the kernel cmdline
Martin Roukala (né Peres) [Tue, 10 May 2022 10:08:38 +0000 (13:08 +0300)]
ci/radv: remove amdgpu.gpu_recovery=0 from the kernel cmdline

This was set as an attempt to detect when the GPU got hung, and let
our hangcheck detect this issue and kill the run. This however has
not been working so well, so let's try without it.

Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16423>

2 years agov3dv: expose VK_KHR_spirv_1_4
Iago Toral Quiroga [Wed, 11 May 2022 07:16:09 +0000 (09:16 +0200)]
v3dv: expose VK_KHR_spirv_1_4

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16424>

2 years agov3dv: expose VK_KHR_shader_float_controls
Iago Toral Quiroga [Tue, 10 May 2022 10:53:08 +0000 (12:53 +0200)]
v3dv: expose VK_KHR_shader_float_controls

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16424>

2 years agotu: Do not flush ccu in clear/blits during renderpass
Danylo Piliaiev [Thu, 5 May 2022 17:29:05 +0000 (20:29 +0300)]
tu: Do not flush ccu in clear/blits during renderpass

For clear/blits ccu flush not only worse for perf, but also messes up
flush_bits when executed in a conditional set of commands.

We already don't flush for 3d blits.

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

Fixes: 487aa807bd1b70602fcb6fbdabd101d4cff7c07b
("tu: Rewrite flushing to use barriers")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16352>

2 years agoradv: remove useless check against nir_texop_samples_identical
Samuel Pitoiset [Tue, 10 May 2022 12:02:09 +0000 (14:02 +0200)]
radv: remove useless check against nir_texop_samples_identical

nir_texop_samples_identical is lowered to
nir_texop_fragment_mask_fetch_amd earlier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16426>

2 years agoradeonsi: report more missing/broken texture formats as unsupported on gfx6-9
Marek Olšák [Sat, 7 May 2022 19:37:34 +0000 (15:37 -0400)]
radeonsi: report more missing/broken texture formats as unsupported on gfx6-9

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16386>

2 years agoradeonsi: report 10_10_10_2 scaled formats as unsupported on gfx6-9 as well
Marek Olšák [Sat, 7 May 2022 19:30:44 +0000 (15:30 -0400)]
radeonsi: report 10_10_10_2 scaled formats as unsupported on gfx6-9 as well

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16386>

2 years agoradv: optimised command buffer reset of vertex bindings.
Dave Airlie [Mon, 11 Apr 2022 03:42:58 +0000 (13:42 +1000)]
radv: optimised command buffer reset of vertex bindings.

This takes the buffer ptrs out of the struct, so they can be memset
separately and optimises the memset to be minimal for them.

Removing them from the struct avoids having to loop to clear them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>

2 years agoradv: only dirty line stipple when necessary.
Dave Airlie [Mon, 9 May 2022 06:16:08 +0000 (16:16 +1000)]
radv: only dirty line stipple when necessary.

Line stipple only cares if things changes to/from line strip.

Reduces overheads seen running pixmark volplosion with zink.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>

2 years agoradv: cache the slab bo pointer in the pipeline.
Dave Airlie [Mon, 9 May 2022 06:06:58 +0000 (16:06 +1000)]
radv: cache the slab bo pointer in the pipeline.

Otherwise each emission has to pointer chase across cachelines.

Reduces overhead seen with zink on pixmark volplosion test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>

2 years agozink: don't finish barriers cmd buffer if not used.
Dave Airlie [Mon, 9 May 2022 05:51:45 +0000 (15:51 +1000)]
zink: don't finish barriers cmd buffer if not used.

finishing has some cpu overhead, which if the cmd buffer isn't
going to be used is pointless. just let it get reset next time.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>

2 years agozink: avoid extra submits for empty wait cmdbufs.
Dave Airlie [Mon, 9 May 2022 05:51:20 +0000 (15:51 +1000)]
zink: avoid extra submits for empty wait cmdbufs.

This just avoids cpu overheads from processing that won't get used.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>

2 years agoradeonsi: Move NULL check before dereference.
Vinson Lee [Sat, 7 May 2022 00:17:50 +0000 (17:17 -0700)]
radeonsi: Move NULL check before dereference.

Fix defect reported by Coverity Scan.

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking desc suggests that it may be
null, but it has already been dereferenced on all paths leading to
the check.

Fixes: 2f83dce059 ("radeonsi: don't report R64_*INT as a sampler format because it doesn't work")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16380>

2 years agoradeonsi: port tess ring calcs to the common helper.
Dave Airlie [Tue, 10 May 2022 01:47:33 +0000 (11:47 +1000)]
radeonsi: port tess ring calcs to the common helper.

This uses the common helper code to implement the tess ring sizing.

One question is if radeonsi should be using tess_offchip_ring_offset
in some places it's using tess_factor_ring_size?

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16415>

2 years agoac: port radeonsi tess factor calculations to common code.
Dave Airlie [Tue, 10 May 2022 01:44:01 +0000 (11:44 +1000)]
ac: port radeonsi tess factor calculations to common code.

This was updated in
4e49a05e37232 ("radeonsi: increase the tesselation factor ring size")
and
9fecac091f315 ("radeonsi/gfx11: scattered register deltas")

This will apply this to radv.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16415>

2 years agoradv/ac: introduce a new common function for hs calcs.
Dave Airlie [Tue, 10 May 2022 01:41:54 +0000 (11:41 +1000)]
radv/ac: introduce a new common function for hs calcs.

This ports the radv code to the new ac code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16415>

2 years agozink: create images with modifiers any time there is an import handle
Mike Blumenkrantz [Fri, 29 Apr 2022 15:52:52 +0000 (11:52 -0400)]
zink: create images with modifiers any time there is an import handle

there's no way to pass in a plane offset otherwise, so this is necessary
in order to handle yuv imports

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: rebind resources for export as needed
Mike Blumenkrantz [Fri, 29 Apr 2022 15:02:55 +0000 (11:02 -0400)]
zink: rebind resources for export as needed

exporting all resources breaks suballocation, so instead just use the
existing heuristics and then forcibly rebind resources as needed
for this functionality

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: add a LINEAR drm modifier if rebinding to add dmabuf export
Mike Blumenkrantz [Fri, 29 Apr 2022 15:01:49 +0000 (11:01 -0400)]
zink: add a LINEAR drm modifier if rebinding to add dmabuf export

this needs to have some kind of modifier, so be conservative here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: force memory exports if dmabuf bind is specified
Mike Blumenkrantz [Fri, 29 Apr 2022 15:01:06 +0000 (11:01 -0400)]
zink: force memory exports if dmabuf bind is specified

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: fix conditional for modifier usage
Mike Blumenkrantz [Fri, 29 Apr 2022 15:00:12 +0000 (11:00 -0400)]
zink: fix conditional for modifier usage

the shared check here was inaccurate; if the resource has dmabuf
export, then use modifiers

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: add a bind flag to indicate a resource is exported as a dmabuf
Mike Blumenkrantz [Fri, 29 Apr 2022 14:59:31 +0000 (10:59 -0400)]
zink: add a bind flag to indicate a resource is exported as a dmabuf

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: unset pipe_resource::next pointers when creating resource copies
Mike Blumenkrantz [Fri, 29 Apr 2022 14:57:53 +0000 (10:57 -0400)]
zink: unset pipe_resource::next pointers when creating resource copies

this otherwise walks the chain and destroys all the resources

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: always check for fb rebinds when starting renderpass
Mike Blumenkrantz [Fri, 29 Apr 2022 14:52:27 +0000 (10:52 -0400)]
zink: always check for fb rebinds when starting renderpass

ensure the right image is being used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agoRevert "zink: export fd info for all 2d images"
Mike Blumenkrantz [Fri, 29 Apr 2022 11:42:05 +0000 (07:42 -0400)]
Revert "zink: export fd info for all 2d images"

This reverts commit fda7371b4cfc5a15f2207f5165f3a8e14442a522.

this breaks suballocation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: create a copy context for the screen on init
Mike Blumenkrantz [Fri, 29 Apr 2022 11:41:52 +0000 (07:41 -0400)]
zink: create a copy context for the screen on init

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: introduce copy contexts
Mike Blumenkrantz [Fri, 29 Apr 2022 11:41:32 +0000 (07:41 -0400)]
zink: introduce copy contexts

this is for creating a context which is only used for copying images

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: break out resource bind-adding into separate function for reuse
Mike Blumenkrantz [Fri, 29 Apr 2022 11:41:02 +0000 (07:41 -0400)]
zink: break out resource bind-adding into separate function for reuse

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: add a flag to indicate whether a resource is exportable
Mike Blumenkrantz [Fri, 29 Apr 2022 11:40:44 +0000 (07:40 -0400)]
zink: add a flag to indicate whether a resource is exportable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: outdent some code
Mike Blumenkrantz [Fri, 29 Apr 2022 11:34:33 +0000 (07:34 -0400)]
zink: outdent some code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agozink: remove unused headers/struct members/linkage
Mike Blumenkrantz [Fri, 29 Apr 2022 11:26:09 +0000 (07:26 -0400)]
zink: remove unused headers/struct members/linkage

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>

2 years agoglsl: Fix ir_quadop_vector validation
Michael Skorokhodov [Tue, 10 May 2022 07:48:53 +0000 (10:48 +0300)]
glsl: Fix ir_quadop_vector validation

Some glcts tests have failed due to incorrect processing of `ir_quadop_vector` in
`ir_validation`. e.g:
`GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_geometry`

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6461
Fixes: 23cde71b ("glsl: Stop lowering ir_quadop_vector.")

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16420>

2 years agoradv: fix memory leak of descriptor set layout
Benjamin Cheng [Mon, 4 Apr 2022 04:35:19 +0000 (00:35 -0400)]
radv: fix memory leak of descriptor set layout

We need to be able to track the descriptor sets explicity to unref the
descriptor sets, otherwise these descriptor sets will not unref the
descriptor set layout it holds.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6222
Fixes: 66f7289d568
("radv: add reference counting for descriptor set layouts")

Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15741>

2 years agokopper: remove unused zink include
Mike Blumenkrantz [Tue, 10 May 2022 19:32:20 +0000 (15:32 -0400)]
kopper: remove unused zink include

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16441>

2 years agoradv: call nir_lower_vars_to_ssa later
Daniel Schürmann [Tue, 4 Jan 2022 09:59:07 +0000 (09:59 +0000)]
radv: call nir_lower_vars_to_ssa later

Totals from 599 (0.44% of 134913) affected shaders: (GFX10.3)
CodeSize: 1243732 -> 1240512 (-0.26%); split: -0.26%, +0.00%
Instrs: 223370 -> 222702 (-0.30%); split: -0.30%, +0.00%
Latency: 901762 -> 885446 (-1.81%); split: -1.81%, +0.00%
InvThroughput: 305546 -> 305536 (-0.00%)
SClause: 12690 -> 12554 (-1.07%); split: -1.13%, +0.06%
Copies: 23779 -> 23778 (-0.00%)
PreSGPRs: 17781 -> 17829 (+0.27%)

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668>

2 years agoradv: move two NIR passes out of tight optimization loop
Daniel Schürmann [Wed, 24 Jun 2020 15:22:54 +0000 (16:22 +0100)]
radv: move two NIR passes out of tight optimization loop

nir_remove_dead_variables
nir_opt_shrink_vectors

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668>

2 years agoanv: re-alloc push constants after secondary command buffers
Iván Briano [Tue, 10 May 2022 01:30:20 +0000 (18:30 -0700)]
anv: re-alloc push constants after secondary command buffers

If the secondary command buffer executed used push constants on a
different set of stages than the primary is using, we may end up not
reallocating them for the primary, getting misrender artifacts at best,
or a nice GPU hang at worst.

Fixes the tests from a CTS from the future:
dEQP-VK.dynamic_rendering.random.*

Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16439>