platform/upstream/mesa.git
19 months agonir: keep xfb properties in nir_create_passthrough_gs
antonino [Thu, 16 Feb 2023 15:56:40 +0000 (16:56 +0100)]
nir: keep xfb properties in nir_create_passthrough_gs

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: handle provoking vertex mode for filled quads
antonino [Mon, 20 Feb 2023 18:52:50 +0000 (19:52 +0100)]
zink: handle provoking vertex mode for filled quads

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agonir/zink: handle provoking vertex mode in `nir_create_passthrough_gs`
antonino [Mon, 20 Feb 2023 18:49:25 +0000 (19:49 +0100)]
nir/zink: handle provoking vertex mode in `nir_create_passthrough_gs`

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: implement flat shading using inlined uniforms
antonino [Thu, 9 Feb 2023 13:12:43 +0000 (14:12 +0100)]
zink: implement flat shading using inlined uniforms

Zink will now handle flat interpolation correctly when line loops
are generated from primitives.

The flat shading information is passed to the emulation gs using constant
uniforms which get inlined.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: add `needs_inlining` to `zink_shader`
antonino [Tue, 21 Feb 2023 17:03:08 +0000 (18:03 +0100)]
zink: add `needs_inlining` to `zink_shader`

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: add flags to `zink_gfx_program` and `zink_context`
antonino [Tue, 21 Feb 2023 09:29:25 +0000 (10:29 +0100)]
zink: add flags to `zink_gfx_program` and `zink_context`

Adds `optimal_keys` and `needs_inlining` to `zink_gfx_program` and
`is_generated_gs_bound` to `zink_context`

Those will be needed for shaders that rely on some uniforms to be
inlined

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: fix flat shading on filled quads
antonino [Tue, 7 Feb 2023 16:01:52 +0000 (17:01 +0100)]
zink: fix flat shading on filled quads

Quads emulated by zink will now have the correct provoking vertex.

Also outputs of the previous shader stage that would normally
not be passed down to the FS (when no GS is bound) will now be skipped.

Different provoking vertex modes are not handled yet.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: handle quads
antonino [Fri, 3 Feb 2023 17:35:42 +0000 (18:35 +0100)]
zink: handle quads

Zink can now handle the quad primitive by emulating it in a gs

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: add `zink_rast_prim` enum
antonino [Tue, 21 Feb 2023 09:37:57 +0000 (10:37 +0100)]
zink: add `zink_rast_prim` enum

Adds an enum with primitives that are natively by vulkan

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: filled quad emulation gs generation function
antonino [Fri, 3 Feb 2023 17:12:54 +0000 (18:12 +0100)]
zink: filled quad emulation gs generation function

This change adds a function to generate a geometry shader that will take a quad
as an input (passed as a line strip with adjacency because quads are not
available as an input primitives for GS) and generate a triangle strip.

This can be used to emulate the quad primitive.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: force line strip out when emulating stipple
antonino [Fri, 3 Feb 2023 14:43:09 +0000 (15:43 +0100)]
zink: force line strip out when emulating stipple

Fixes a bug where, whenever a primtiive that has more than 2 vertices is rendered
with line stipple, the edge between the first and last vertex will have
stretched out stipple.

This happens because interpolation will occur between two non consecutive
stipple counters for the last edge
(which is between the last and first vertices).

Forcing `nir_create_passthrough_gs` to generate a line strip avoids
this because the last vertex will be duplicated and will have
the correct stipple counter for each edge.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agonir: allow to force line strip out in nir_create_passthrough_gs
antonino [Fri, 3 Feb 2023 14:42:20 +0000 (15:42 +0100)]
nir: allow to force line strip out in nir_create_passthrough_gs

`nir_create_passthrough_gs` now allows the user to force the generated GS
to always output a line strip from the primitive
regardless of whether edgeflags are present.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: handle edgeflags
antonino [Fri, 3 Feb 2023 10:44:39 +0000 (11:44 +0100)]
zink: handle edgeflags

Vulkan has no support for edgeflags.

If the user has a geometry shader bound nothing needs to be done as edgeflags
don't work with them, otherwise a geometry shader that emulates them
is generated.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: add `has_edgeflags` flag to zink_shader and zink_gfx_program
antonino [Tue, 21 Feb 2023 09:27:54 +0000 (10:27 +0100)]
zink: add `has_edgeflags` flag to zink_shader and zink_gfx_program

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agonir: handle edge flags in nir_create_passthrough_gs
antonino [Thu, 2 Feb 2023 16:30:05 +0000 (17:30 +0100)]
nir: handle edge flags in nir_create_passthrough_gs

`nir_create_passthrough_gs` will now take a boolean argument to decide
whether it needs to handle edgeflags.

When true is passed it will output a line strip where edges that
shouldn't be visible are not emitted.

This is usefull because geometry shaders will generally throw away
edgeflags so for a passthrough GS to act transparently it needs to emulate them.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agonir: calculate number of vertices in nir_create_passthrough_gs
antonino [Fri, 3 Feb 2023 10:23:09 +0000 (11:23 +0100)]
nir: calculate number of vertices in nir_create_passthrough_gs

`nir_create_passthrough_gs` has been changed to take the type of primitive
as opposed to the number of vertices as an argument.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agonir: avoid generating conflicting output variables
antonino [Mon, 20 Feb 2023 18:26:20 +0000 (19:26 +0100)]
nir: avoid generating conflicting output variables

Because not all vertex outputs can have corresponding fragment inputs
(eg. edgeflags) some logic is needed to correctly generate variables in
a passthough gs.

Before this change some output variables ened up with the same location.

Fixes: d0342e28b32 ("nir: Add helper to create passthrough GS shader")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agonir: handle primitives with adjacency
antonino [Mon, 13 Feb 2023 11:57:38 +0000 (12:57 +0100)]
nir: handle primitives with adjacency

`nir_create_passthrough_gs` can now handle primitives with adjacency where some
vertices need to be skipped.

Fixes: d0342e28b32 ("nir: Add helper to create passthrough GS shader")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agozink: handle switching between primitives
antonino [Fri, 3 Feb 2023 10:43:04 +0000 (11:43 +0100)]
zink: handle switching between primitives

Zink will generate geometry shaders to emulate certain features, however there
might be different variants of those depending on the primitive type.

This commits adds the logic to generate or bind the correct emulation GS
in the case where nothing changes except the primitive type.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>

19 months agointel/compiler: compactify locations of mesh outputs
Marcin Ślusarz [Mon, 18 Jul 2022 11:47:00 +0000 (13:47 +0200)]
intel/compiler: compactify locations of mesh outputs

Needed in support of anv code for Wa_14015590813.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17622>

19 months agoanv: work around for per-prim attributes corruption
Marcin Ślusarz [Wed, 6 Jul 2022 15:17:42 +0000 (17:17 +0200)]
anv: work around for per-prim attributes corruption

Wa_14015590813 for gfx 12.5

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17622>

19 months agoci/broadcom: Skip another texelfetch case.
Eric Anholt [Tue, 28 Mar 2023 22:54:06 +0000 (15:54 -0700)]
ci/broadcom: Skip another texelfetch case.

This one has also flaked a pipeline recently with a timeout.

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

19 months agoci/freedreno: Flake KHR-GL45.shader_image_load_store.basic-allTargets-store
Eric Anholt [Tue, 28 Mar 2023 22:50:11 +0000 (15:50 -0700)]
ci/freedreno: Flake KHR-GL45.shader_image_load_store.basic-allTargets-store

It has UnexpectedPassed a couple of times recently.

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

19 months agonir: Fix use of alloca() without #include c99_alloca.h
Sil Vilerino [Mon, 27 Mar 2023 20:29:32 +0000 (16:29 -0400)]
nir: Fix use of alloca() without #include c99_alloca.h

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22150>

19 months agoglsl: Drop dead prototype.
Emma Anholt [Thu, 16 Mar 2023 00:07:10 +0000 (17:07 -0700)]
glsl: Drop dead prototype.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>

19 months agoglsl: Remove the TessLevel lowering special case from xfb.
Emma Anholt [Wed, 15 Mar 2023 23:26:38 +0000 (16:26 -0700)]
glsl: Remove the TessLevel lowering special case from xfb.

The NIR vectorized tess level pass applies later, and it leaves the name
as-is, so we don't need to mess around with
gl_TessLevelInnerMesa/OuterMesa.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>

19 months agoglsl: Delete the lower_tess_level pass.
Emma Anholt [Mon, 20 Mar 2023 17:12:18 +0000 (10:12 -0700)]
glsl: Delete the lower_tess_level pass.

NIR i/o lowering and sysval lowering can handle the compact var fine at
this point.

Affects: nouveau, virgl, svga, radeonsi, r600, llvmpipe.  Does not affect
PIPE_CAP_NIR_COMPACT_ARRAYS drivers like crocus, iris, d3d12, freedreno,
zink.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>

19 months agonir_to_tgsi: Handle stores to compact outputs.
Emma Anholt [Mon, 20 Mar 2023 21:09:22 +0000 (14:09 -0700)]
nir_to_tgsi: Handle stores to compact outputs.

We had been relying on glsl lowering to a vec4 output, but we can just do
a tiny override here to support compact variables and drop the lowering
pass.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>

19 months agonir/lower_sysvals: Add support for un-lowered tess_level_inner/outer.
Emma Anholt [Mon, 20 Mar 2023 17:10:42 +0000 (10:10 -0700)]
nir/lower_sysvals: Add support for un-lowered tess_level_inner/outer.

GLSL has been responsible for doing this, but we can just extract the
array index here.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>

19 months agogallivm: Skip loads/stores that are definitely outside of compact vars.
Emma Anholt [Mon, 20 Mar 2023 17:57:37 +0000 (10:57 -0700)]
gallivm: Skip loads/stores that are definitely outside of compact vars.

As I reduce GLSL lowering code, OOB TessLevel accesses can end up making
it to the backend.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>

19 months agovenus: re-use VN_DEBUG_NO_ABORT to disable ring monitoring abort()
Ryan Neph [Tue, 28 Mar 2023 22:40:09 +0000 (15:40 -0700)]
venus: re-use VN_DEBUG_NO_ABORT to disable ring monitoring abort()

Useful to keep the hung guest process alive while debugging the renderer
process.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22176>

19 months agonir: Remove IB address and stride intrinsics.
Timur Kristóf [Mon, 27 Mar 2023 23:35:08 +0000 (01:35 +0200)]
nir: Remove IB address and stride intrinsics.

RADV used these to emulate firstTask for NV_mesh_shader.
They are no longer needed.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoac/nir: Remove ac_nir_apply_first_task_to_task_shader.
Timur Kristóf [Mon, 27 Mar 2023 15:37:24 +0000 (17:37 +0200)]
ac/nir: Remove ac_nir_apply_first_task_to_task_shader.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoac/nir/ngg: Remove NV_mesh_shader support.
Timur Kristóf [Mon, 27 Mar 2023 15:36:20 +0000 (17:36 +0200)]
ac/nir/ngg: Remove NV_mesh_shader support.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoradv: Clean up emitting zero mesh shader draw id.
Timur Kristóf [Mon, 27 Mar 2023 23:07:39 +0000 (01:07 +0200)]
radv: Clean up emitting zero mesh shader draw id.

When task shaders are also used,
the draw id is undefined in mesh shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoradv: Remove first_task and ib_addr/ib_stride.
Timur Kristóf [Mon, 27 Mar 2023 14:23:53 +0000 (16:23 +0200)]
radv: Remove first_task and ib_addr/ib_stride.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoradv: Remove NV_mesh_shader API entrypoints.
Timur Kristóf [Mon, 27 Mar 2023 14:09:08 +0000 (16:09 +0200)]
radv: Remove NV_mesh_shader API entrypoints.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoradv: Don't expose NV_mesh_shader and don't use it in CI.
Timur Kristóf [Mon, 27 Mar 2023 13:38:47 +0000 (15:38 +0200)]
radv: Don't expose NV_mesh_shader and don't use it in CI.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22139>

19 months agoiris: implement recommended flush/wait of AUX-TT invalidation
Lionel Landwerlin [Wed, 29 Mar 2023 08:12:01 +0000 (11:12 +0300)]
iris: implement recommended flush/wait of AUX-TT invalidation

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22183>

19 months agoanv: implement recommended flush/wait of AUX-TT invalidation
Lionel Landwerlin [Wed, 29 Mar 2023 08:06:13 +0000 (11:06 +0300)]
anv: implement recommended flush/wait of AUX-TT invalidation

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22183>

19 months agopvr: Mark all normalized formats as supporting with_packed_usc_channel
Jarred Davies [Mon, 6 Mar 2023 00:15:05 +0000 (00:15 +0000)]
pvr: Mark all normalized formats as supporting with_packed_usc_channel

Avoids assert seen in dEQP-VK.api.smoke.triangle

Signed-off-by: Jarred Davies <jarred.davies@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22174>

19 months agodocs: drop reference to modindex
Erik Faye-Lund [Mon, 20 Mar 2023 10:02:55 +0000 (11:02 +0100)]
docs: drop reference to modindex

We don't render such a page, so there's no point in linking to it.

Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22022>

19 months agoradv: replace pipeline->force_vrs_per_vertex during cmdbuf recording
Samuel Pitoiset [Wed, 22 Mar 2023 16:48:02 +0000 (17:48 +0100)]
radv: replace pipeline->force_vrs_per_vertex during cmdbuf recording

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

19 months agoradv: replace pipeline->is_ngg occurrences during cmdbuf recording
Samuel Pitoiset [Wed, 22 Mar 2023 16:17:51 +0000 (17:17 +0100)]
radv: replace pipeline->is_ngg occurrences during cmdbuf recording

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

19 months agoradv: move user_data_0 to the shader info pass
Samuel Pitoiset [Mon, 27 Mar 2023 17:05:06 +0000 (19:05 +0200)]
radv: move user_data_0 to the shader info pass

Using the next stage is enough to determine the base reg.

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

19 months agoradv: determine and store the next graphics stage to radv_shader_info
Samuel Pitoiset [Mon, 27 Mar 2023 16:50:51 +0000 (18:50 +0200)]
radv: determine and store the next graphics stage to radv_shader_info

This will be useful in many cases.

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

19 months agoradv: copy bound shaders to the cmdbuf state
Samuel Pitoiset [Wed, 22 Mar 2023 11:49:33 +0000 (12:49 +0100)]
radv: copy bound shaders to the cmdbuf state

To stop relying on the pipeline everywhere.

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

19 months agoradv: move dirtying flags for mesh shading to radv_bind_pre_rast_shader()
Samuel Pitoiset [Mon, 27 Mar 2023 16:39:29 +0000 (18:39 +0200)]
radv: move dirtying flags for mesh shading to radv_bind_pre_rast_shader()

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

19 months agoradv: stop using last_vgt_api_stage_{locs} during cmdbuf recording
Samuel Pitoiset [Mon, 27 Mar 2023 07:43:35 +0000 (09:43 +0200)]
radv: stop using last_vgt_api_stage_{locs} during cmdbuf recording

Use the last VGT shader instead.

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

19 months agoradv: determine the last VGT shader at pipeline bind time
Samuel Pitoiset [Mon, 27 Mar 2023 12:39:42 +0000 (14:39 +0200)]
radv: determine the last VGT shader at pipeline bind time

And replace streamout_shader by last_vgt_shader which is similar.

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

19 months agoradv: keep track of active stages as part of the cmdbuf state
Samuel Pitoiset [Mon, 27 Mar 2023 07:33:14 +0000 (09:33 +0200)]
radv: keep track of active stages as part of the cmdbuf state

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

19 months agoradv: add an assertion about shader stage to radv_bind_pre_rast_shader()
Samuel Pitoiset [Mon, 27 Mar 2023 07:23:44 +0000 (09:23 +0200)]
radv: add an assertion about shader stage to radv_bind_pre_rast_shader()

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

19 months agoradv: add radv_bind_shader() helper
Samuel Pitoiset [Fri, 24 Mar 2023 15:12:16 +0000 (16:12 +0100)]
radv: add radv_bind_shader() helper

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

19 months agoradv: pass a shaders array to radv_get_shader()
Samuel Pitoiset [Mon, 27 Mar 2023 12:18:57 +0000 (14:18 +0200)]
radv: pass a shaders array to radv_get_shader()

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

19 months agoradv: pass shader/base_reg to radv_emit_view_index_per_stage
Samuel Pitoiset [Wed, 22 Mar 2023 11:55:01 +0000 (12:55 +0100)]
radv: pass shader/base_reg to radv_emit_view_index_per_stage

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

19 months agokmsro: sort drivers alphabetically
Eric Engestrom [Mon, 27 Mar 2023 17:43:10 +0000 (18:43 +0100)]
kmsro: sort drivers alphabetically

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agokmsro: uniformize renderonly creation
Eric Engestrom [Mon, 27 Mar 2023 16:33:51 +0000 (17:33 +0100)]
kmsro: uniformize renderonly creation

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agovc4: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:23:42 +0000 (17:23 +0100)]
vc4: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agov3d: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:22:51 +0000 (17:22 +0100)]
v3d: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agopanfrost: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:21:40 +0000 (17:21 +0100)]
panfrost: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agolima: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:20:11 +0000 (17:20 +0100)]
lima: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agofreedreno: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:18:48 +0000 (17:18 +0100)]
freedreno: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agoetnaviv: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:15:23 +0000 (17:15 +0100)]
etnaviv: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agoasahi: change create_renderonly signature to uniformize it
Eric Engestrom [Mon, 27 Mar 2023 16:13:10 +0000 (17:13 +0100)]
asahi: change create_renderonly signature to uniformize it

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22144>

19 months agozink: stop leaking separate shader nir
Mike Blumenkrantz [Tue, 28 Mar 2023 20:50:24 +0000 (16:50 -0400)]
zink: stop leaking separate shader nir

this is a huge memleak

Fixes: e3b746e3a31 ("zink: use GPL to handle (simple) separate shader objects")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22175>

19 months agoci/zink: Update the tgl manual run xfails.
Emma Anholt [Mon, 27 Mar 2023 16:43:30 +0000 (09:43 -0700)]
ci/zink: Update the tgl manual run xfails.

These have been consistent for 3 runs.

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

19 months agoci/etnaviv: Polish the gc2000 xfails a bit.
Emma Anholt [Mon, 27 Mar 2023 16:39:15 +0000 (09:39 -0700)]
ci/etnaviv: Polish the gc2000 xfails a bit.

These were consistent in the last 3 CI runs.  The rest of the failures in
those runs were flakes spread all around the general shader tests, which
are correlated with GPU hangs.

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

19 months agoci/crocus: Fix 1.3.5.0 xfails.
Emma Anholt [Mon, 27 Mar 2023 16:34:14 +0000 (09:34 -0700)]
ci/crocus: Fix 1.3.5.0 xfails.

Whoops, copy and pasted the wrong lines from another board, this GPU is
GL4.6 not 4.5.

Fixes: ecca3b9655db ("ci/crocus: Update expectations from VK CTS 1.3.5.0.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22146>

19 months agoanv: Fix stride mismatch in mesa and minigbm
Sai Teja Pottumuttu [Tue, 28 Mar 2023 10:13:05 +0000 (10:13 +0000)]
anv: Fix stride mismatch in mesa and minigbm

It is observed that in display resolutions where width is not equal to
stride, vulkan rendering is being distorted. This is happening due to
stride calculation mismatch between minigbm and mesa.

This fix makes sure that the stride calculated in minigbm is passed to
anv and isl.

The issue was found while debugging the following android cts tests and
thus fixes them as well.
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformNotSetToMatchCurrentTransform
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformSetToMatchCurrentTransform

Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22163>

19 months agoanv: use primitive ID override when shader does not supply it
Tapani Pälli [Tue, 28 Mar 2023 16:07:22 +0000 (19:07 +0300)]
anv: use primitive ID override when shader does not supply it

Patch moves over this fix from iris driver.

Fixes following test on DG2:
   dEQP-VK.rasterization.culling.primitive_id

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com> [v1]
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22130>

19 months agoradv: stop using the pipeline for emitting shaders
Samuel Pitoiset [Thu, 23 Mar 2023 16:26:35 +0000 (17:26 +0100)]
radv: stop using the pipeline for emitting shaders

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

19 months agoradv: pass the ES shader to radv_pipeline_emit_hw_ngg()
Samuel Pitoiset [Fri, 24 Mar 2023 07:15:05 +0000 (08:15 +0100)]
radv: pass the ES shader to radv_pipeline_emit_hw_ngg()

This allows to remove the radv_pipeline dependency.

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

19 months agoradv: use the ES type to apply a workaround for NGG on GFX10
Samuel Pitoiset [Fri, 24 Mar 2023 07:23:24 +0000 (08:23 +0100)]
radv: use the ES type to apply a workaround for NGG on GFX10

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

19 months agoradv: use the shader info stage to simplify emitting NGG shaders
Samuel Pitoiset [Fri, 24 Mar 2023 07:05:56 +0000 (08:05 +0100)]
radv: use the shader info stage to simplify  emitting NGG shaders

Instead of relying on the pipeline.

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

19 months agoradv: stop using the pipeline for emitting PS inputs
Samuel Pitoiset [Thu, 23 Mar 2023 17:16:50 +0000 (18:16 +0100)]
radv: stop using the pipeline for emitting PS inputs

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

19 months agoradv: add radv_get_last_vgt_shader() helper
Samuel Pitoiset [Thu, 23 Mar 2023 17:15:59 +0000 (18:15 +0100)]
radv: add radv_get_last_vgt_shader() helper

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

19 months agoradv: emit the GS copy shader outside of radv_pipeline_emit_hw_gs()
Samuel Pitoiset [Thu, 23 Mar 2023 16:22:45 +0000 (17:22 +0100)]
radv: emit the GS copy shader outside of radv_pipeline_emit_hw_gs()

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

19 months agoradv: stop using get_vs_output_info() when emitting VS/NGG shaders
Samuel Pitoiset [Tue, 21 Mar 2023 13:01:30 +0000 (14:01 +0100)]
radv: stop using get_vs_output_info() when emitting VS/NGG shaders

It's always the current shader outinfo struct.

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

19 months agopvr: fix segfault in dEQP-VK.ycbcr.query.*
Luigi Santivetti [Thu, 9 Mar 2023 15:54:35 +0000 (15:54 +0000)]
pvr: fix segfault in dEQP-VK.ycbcr.query.*

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22061>

19 months agoaco: clean up to_mad_mix
Georg Lehmann [Fri, 24 Mar 2023 11:43:35 +0000 (12:43 +0100)]
aco: clean up to_mad_mix

These instructions are 32bit, so they don't support opsel anyway.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22103>

19 months agoradv/ci: update CI lists for Polaris10 and Pitcairn
Samuel Pitoiset [Mon, 27 Mar 2023 07:52:29 +0000 (09:52 +0200)]
radv/ci: update CI lists for Polaris10 and Pitcairn

Recent ac/surface changes fixed those.

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

19 months agozink: use c++ template to deduplicate image barrier functions
Mike Blumenkrantz [Tue, 21 Mar 2023 14:54:16 +0000 (10:54 -0400)]
zink: use c++ template to deduplicate image barrier functions

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

19 months agozink: minor tweaks for image barriers
Mike Blumenkrantz [Tue, 21 Mar 2023 14:43:37 +0000 (10:43 -0400)]
zink: minor tweaks for image barriers

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

19 months agozink: use c++ template to deduplicate all the buffer barrier code
Mike Blumenkrantz [Tue, 21 Mar 2023 14:38:51 +0000 (10:38 -0400)]
zink: use c++ template to deduplicate all the buffer barrier code

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

19 months agozink: move all barrier-related functions to c++
Mike Blumenkrantz [Tue, 21 Mar 2023 14:18:22 +0000 (10:18 -0400)]
zink: move all barrier-related functions to c++

this will enable a lot of deduplication

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

19 months agozink: break out a src region barrier check for reuse
Mike Blumenkrantz [Mon, 27 Mar 2023 13:19:38 +0000 (09:19 -0400)]
zink: break out a src region barrier check for reuse

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

19 months agozink: fix some type mismatches for c++ compilation
Mike Blumenkrantz [Tue, 21 Mar 2023 14:17:21 +0000 (10:17 -0400)]
zink: fix some type mismatches for c++ compilation

no functional changes

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

19 months agoasahi: Don't lie about seamless cube maps
Alyssa Rosenzweig [Fri, 24 Mar 2023 22:22:28 +0000 (18:22 -0400)]
asahi: Don't lie about seamless cube maps

Now that mesa/st is setting seamless_cube_map properly we don't need to play any
games here. Remove the hack workaround.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>

19 months agomesa/st: Normalize wrap modes for seamless cubes
Alyssa Rosenzweig [Sat, 11 Mar 2023 23:58:34 +0000 (18:58 -0500)]
mesa/st: Normalize wrap modes for seamless cubes

The OpenGL specification requires that seamless cube maps ignore the wrap mode,
but some hardware may try to respect the wrap mode even for seamless cubes
contrary to the spec. Since OpenGL maps samplers 1:1 to textures (at least
without bindless texture support...), it's easy to override the wrap mode for
seamless cubes to something that works for the hardware.

I'm not sure if there is value in gating this behaviour behind a CAP. On one
hand, there is a tiny bit of extra CPU overhead added to change samplers. On the
other hand, normalizing wrap modes might improve CSO caching, and normalizing to
a non-BORDER mode avoids the expensive border colour code later in the function.

We will need a different workaround in our Vulkan driver. Potentially, we'll
have to duplicate *every* sampler to have a cubemap version and a non-cubemap
version, selecting a sampler in the shader based on the texture opcode. That
sucks and implementing it would depend on subtle details of how we implement
descriptor sets, so it's not like we would share that code with the GL driver
anyway. In the mean time, let's get this right for GL without the performance
hit of duplication.

Fixes dEQP-GLES3.functional.texture.filtering.cube.* on Asahi, as well as a
smattering of dEQP-GLES31.functional.texture.filtering.cube_array.* fails on
softpipe.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>

19 months agomesa/st: Only set seamless for GLES3
Alyssa Rosenzweig [Fri, 24 Mar 2023 22:18:26 +0000 (18:18 -0400)]
mesa/st: Only set seamless for GLES3

6148e3aae7e ("mesa: Fix ctx->Texture.CubeMapSeamless") introduced a hack, where
seamless cube maps would be requested even for GLES2 contexts despite the spec,
on the assumption that GLES2 gallium drivers would ignore the bit. But that
requires Gallium drivers to know what GLES version they advertise, which is a
horrible layering violation. When the commit was written 8 years ago, there were
classic drivers to contend with so it made sense as a fix to get GLES 3.0 up and
running. With classic drivers gone, it's time to sunset the hack and restore the
intended behaviour by setting ctx->Texture.CubeMapSeamless only once we know the
version.

In addition to fixing a semantic issue in the Gallium contract and preventing a
regression from the next commit, this fixes cube maps on Mali-T720 under
Panfrost. In general, Panfrost supports GLES3 (and honours the seamless flag
everywhere) but on T720 we only advertise GLES2 due to missing MRT support on
older Midgard devices, so we need the flag set properly to distinguish these
cases.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>

19 months agodriconf: add a workaround for Kaiju-A-Gogo
Paul Gofman [Mon, 27 Mar 2023 20:36:12 +0000 (14:36 -0600)]
driconf: add a workaround for Kaiju-A-Gogo

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

19 months agoradeonsi: monolithic PS emit epilog in nir directly
Qiang Yu [Sun, 26 Feb 2023 08:40:12 +0000 (16:40 +0800)]
radeonsi: monolithic PS emit epilog in nir directly

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agoac/nir: add ac_nir_lower_ps
Qiang Yu [Sat, 25 Feb 2023 13:14:52 +0000 (21:14 +0800)]
ac/nir: add ac_nir_lower_ps

Lower ps output to nir_export_amd.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agonir: add nir_fisnan helper function
Qiang Yu [Sat, 25 Feb 2023 13:13:50 +0000 (21:13 +0800)]
nir: add nir_fisnan helper function

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agonir,radeonsi: add and implement nir_load_alpha_reference_amd
Qiang Yu [Fri, 24 Feb 2023 06:39:17 +0000 (14:39 +0800)]
nir,radeonsi: add and implement nir_load_alpha_reference_amd

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agoaco: implement float16 nir_op_pack_(s|u)norm_2x16
Qiang Yu [Fri, 24 Feb 2023 06:22:08 +0000 (14:22 +0800)]
aco: implement float16 nir_op_pack_(s|u)norm_2x16

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agoac/llvm: implement float16 nir_op_pack_(s|u)norm_2x16
Qiang Yu [Fri, 24 Feb 2023 06:17:07 +0000 (14:17 +0800)]
ac/llvm: implement float16 nir_op_pack_(s|u)norm_2x16

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agonir: pack_(s|u)norm_2x16 support float16 as input
Qiang Yu [Fri, 24 Feb 2023 05:57:33 +0000 (13:57 +0800)]
nir: pack_(s|u)norm_2x16 support float16 as input

For AMD GPU which has instruction to normalize and pack two float16
inputs, and used when fragment shader export color output.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21552>

19 months agointel: Allocate mesh shader URB space before task shader
José Roberto de Souza [Fri, 24 Feb 2023 18:58:36 +0000 (10:58 -0800)]
intel: Allocate mesh shader URB space before task shader

A future platform requires that mesh shader URB space be allocated
before task shader URB space.

If task shader is enabled, it will align the mesh shader URB size to
8Kb and give the remaning back to task shader. Otherwise, no aligment
is needed, and mesh shader will have all the URB space.

BSpec: 56229, 56230
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21603>

19 months agoradv/rt: Refactor rq_load lowering
Konstantin Seurer [Tue, 21 Feb 2023 10:45:09 +0000 (11:45 +0100)]
radv/rt: Refactor rq_load lowering

This just gets rid of all the bcsel emissions.

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