platform/upstream/mesa.git
15 months agoanv,intel/compiler: enable shortcut in wg id to wg idx lowering on >= gfx12.5
Marcin Ślusarz [Fri, 31 Mar 2023 10:31:19 +0000 (12:31 +0200)]
anv,intel/compiler: enable shortcut in wg id to wg idx lowering on >= gfx12.5

This speeds up vk_meshlet_cadscene in "VK mesh ext" renderer by 1.4%

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

15 months agonir: add cheap shortcut for wg id to wg idx lowering
Marcin Ślusarz [Fri, 31 Mar 2023 10:19:43 +0000 (12:19 +0200)]
nir: add cheap shortcut for wg id to wg idx lowering

... for platforms where integer division is expensive

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

15 months agointel/compiler: pass num_workgroups from task to mesh shaders
Marcin Ślusarz [Fri, 31 Mar 2023 09:58:24 +0000 (11:58 +0200)]
intel/compiler: pass num_workgroups from task to mesh shaders

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

15 months agonir: lower num_workgroups to constants
Marcin Ślusarz [Thu, 6 Apr 2023 13:09:12 +0000 (15:09 +0200)]
nir: lower num_workgroups to constants

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

15 months agonir: use constant components of num_workgroups in wg id to wg idx lowering
Marcin Ślusarz [Fri, 31 Mar 2023 09:56:11 +0000 (11:56 +0200)]
nir: use constant components of num_workgroups in wg id to wg idx lowering

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

15 months agonir: use wg id to wg idx shortcut if two dims of num_workgroups are 1
Marcin Ślusarz [Fri, 31 Mar 2023 09:54:21 +0000 (11:54 +0200)]
nir: use wg id to wg idx shortcut if two dims of num_workgroups are 1

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

15 months agonir: extract try_lower_id_to_index_1d
Marcin Ślusarz [Fri, 31 Mar 2023 09:51:16 +0000 (11:51 +0200)]
nir: extract try_lower_id_to_index_1d

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

15 months agobroadcom: use nir info to keep track of implicit sample shading
Iago Toral Quiroga [Mon, 3 Jul 2023 12:21:14 +0000 (14:21 +0200)]
broadcom: use nir info to keep track of implicit sample shading

It seems NIR is tracking this for us now so we can stop doing this
in the backend.

Also, new CTS tests seem to add the requirement where in the presence of
some builtin's like gl_SampleID in a shader, even if unused, sample shading
is expected to be enabled, which is something we can't track in the backend
since the variable may have been dropped by then.

Fixes 2 failures in:
dEQP-VK.draw.renderpass.implicit_sample_shading.sample*

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

15 months agopvr: Use alignas instead of ALIGN_ATTR and remove ALIGN_ATTR
Yonggang Luo [Tue, 4 Jul 2023 04:35:21 +0000 (12:35 +0800)]
pvr: Use alignas instead of ALIGN_ATTR and remove ALIGN_ATTR

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23982>

15 months agoetnaviv: support OES_texture_half_float_linear
Christian Gmeiner [Mon, 3 Jul 2023 13:36:24 +0000 (15:36 +0200)]
etnaviv: support OES_texture_half_float_linear

Passes all related piglit and deqp tests.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23972>

15 months agodocs: mark OES_texture_half_float done on etnaviv
Christian Gmeiner [Mon, 3 Jul 2023 13:22:11 +0000 (15:22 +0200)]
docs: mark OES_texture_half_float done on etnaviv

Supported by GPUs with HALF_FLOAT feature bit.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23972>

16 months agost/mesa: Set gl_config.floatMode based on color_format
Janne Grunau [Wed, 28 Jun 2023 19:09:50 +0000 (21:09 +0200)]
st/mesa: Set gl_config.floatMode based on color_format

Sets the float color component type in st_visual_to_context_mode()
ensuring float color values are not clamped.
Fixes dEQP-EGL.functional.wide_color.window_fp16_default_colorspace on
asahi, iris and most likely every other driver having it marked as fail
or flake.

Closes: mesa/mesa#9276

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23914>

16 months agoanv_video: reject decoding of unsupported profiles and formats
Lynne [Fri, 30 Jun 2023 17:34:26 +0000 (19:34 +0200)]
anv_video: reject decoding of unsupported profiles and formats

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23954>

16 months agolavapipe: expose subgroups in mesh/task shaders.
Dave Airlie [Mon, 3 Jul 2023 20:07:22 +0000 (06:07 +1000)]
lavapipe: expose subgroups in mesh/task shaders.

These are just compute shaders under the hood.

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

16 months agoanv: Fix compute maximum number of threads value
José Roberto de Souza [Mon, 3 Jul 2023 15:15:00 +0000 (08:15 -0700)]
anv: Fix compute maximum number of threads value

There is no mention in spec about subtract one of the number of
threads, also Iris and blorp code don't subtract.

Alchemist PRMs: Volume 2a: Command Reference: Instructions: CFE_STATE: Maximum Number of Threads:
Normally set to the maximum number of threads: (# EUs) * (# threads/EU)

Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23973>

16 months agonir/print: Reformat the preds/succs block information
Caio Oliveira [Tue, 13 Jun 2023 07:10:27 +0000 (00:10 -0700)]
nir/print: Reformat the preds/succs block information

- Always print preds in same line as block name;
- Use a single line for empty blocks;
- Align preds/succs with the instructions.

```
if %29 {
    block b4:    // preds: b3
    32     %30 = load_const (0x00000000 = 0.000000)
    32x4   %31 = @vulkan_resource_index (%30 (0x0)) (desc_set=0, binding=0, desc_type=SSBO)
    32x4   %32 = @load_vulkan_descriptor (%31) (desc_type=SSBO)
    32x4   %33 = deref_cast (Storage *)%32 (ssbo Storage)  (ptr_stride=0, align_mul=4, align_offset=0)
    32x4   %34 = deref_struct &%33->fail (ssbo uint)  // &((Storage *)%32)->fail
    32     %36 = @deref_atomic (%34, %35 (0x1)) (access=1, atomic_op=iadd)
                 // succs: b6
} else {
    block b5:  // preds: b3, succs: b6
}
```

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Print div/con annotation first
Caio Oliveira [Thu, 15 Jun 2023 20:37:35 +0000 (13:37 -0700)]
nir/print: Print div/con annotation first

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Use 4-space indentation
Caio Oliveira [Fri, 9 Jun 2023 21:34:48 +0000 (14:34 -0700)]
nir/print: Use 4-space indentation

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Use `//` for comments
Caio Oliveira [Fri, 9 Jun 2023 21:43:38 +0000 (14:43 -0700)]
nir/print: Use `//` for comments

Makes it easier to copy snippets of shaders into code or
test comments without worrying about conflict with `/* */`.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Don't use comment syntax for deref_cast properties
Caio Oliveira [Sat, 10 Jun 2023 00:05:59 +0000 (17:05 -0700)]
nir/print: Don't use comment syntax for deref_cast properties

Follow the same syntax as the intrinsic indices, since they
are conceptually similar.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Rename print_tabs() to print_indentation() and use it more
Caio Oliveira [Fri, 9 Jun 2023 21:25:04 +0000 (14:25 -0700)]
nir/print: Rename print_tabs() to print_indentation() and use it more

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Align instructions around `=`
Caio Oliveira [Fri, 9 Jun 2023 21:05:58 +0000 (14:05 -0700)]
nir/print: Align instructions around `=`

- For SSA destination, padding is applied before `%`.
- For Reg destination, pad to the SSA size (to align div/con),
  then remaining padding is applied before `r`.
- For instructions without destination, padding is applied so
  they start right after the ` = ` of the cases above.

If the block doesn't have any destinations, there's no padding
is applied to the instructions without destinations in that
block.

For now registers with array access will be unaligned.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Use BITSIZExELEMENTS for SSA sizes
Caio Oliveira [Fri, 9 Jun 2023 19:12:13 +0000 (12:12 -0700)]
nir/print: Use BITSIZExELEMENTS for SSA sizes

Omits the `x1` part if its one element.

```
32x3   %3 = @load_deref (%0) (access=0)
32     %4 = mov %3.x
32     %5 = deref_var &gl_LocalInvocationID (system uvec3)
32x3   %8 = @load_deref (%5) (access=0)
32     %9 = mov %8.x
```

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Use `bN` instead of `block_N` for identifying basic blocks
Caio Oliveira [Fri, 9 Jun 2023 18:53:50 +0000 (11:53 -0700)]
nir/print: Use `bN` instead of `block_N` for identifying basic blocks

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir/print: Use symbols % for SSA and @ for intrinsic
Caio Oliveira [Fri, 9 Jun 2023 18:45:12 +0000 (11:45 -0700)]
nir/print: Use symbols % for SSA and @ for intrinsic

The variable uniquifying now uses # instead of @.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564>

16 months agonir: Add nir_foreach_function_safe and use it
Yonggang Luo [Wed, 28 Jun 2023 17:05:45 +0000 (01:05 +0800)]
nir: Add nir_foreach_function_safe and use it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23902>

16 months agoradv: Use nir_remove_non_entrypoints in radv_shader.c
Yonggang Luo [Wed, 28 Jun 2023 17:08:21 +0000 (01:08 +0800)]
radv: Use nir_remove_non_entrypoints in radv_shader.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23902>

16 months agoglsl: Use nir_remove_non_entrypoints to simplify the code
Yonggang Luo [Wed, 28 Jun 2023 17:06:53 +0000 (01:06 +0800)]
glsl: Use nir_remove_non_entrypoints to simplify the code

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23902>

16 months agonir: Update the comment to call nir_remove_non_entrypoints directly
Yonggang Luo [Wed, 28 Jun 2023 17:04:54 +0000 (01:04 +0800)]
nir: Update the comment to call nir_remove_non_entrypoints directly

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23902>

16 months agodxil: Use nir_remove_non_entrypoints
Yonggang Luo [Wed, 28 Jun 2023 17:03:34 +0000 (01:03 +0800)]
dxil: Use nir_remove_non_entrypoints

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23902>

16 months agoamd: Move ac_hw_stage to its own file
Konstantin Seurer [Wed, 28 Jun 2023 15:30:43 +0000 (17:30 +0200)]
amd: Move ac_hw_stage to its own file

Otherwise ACO has to include ac_shader_util.h which also includes NIR.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23906>

16 months agonir/builder_opcodes: Do not generate empty intrinsic indices
Konstantin Seurer [Tue, 27 Jun 2023 20:17:28 +0000 (22:17 +0200)]
nir/builder_opcodes: Do not generate empty intrinsic indices

Gets rid of all the

struct nir_*_indices {
   int _; /* exists to avoid empty initializers */
};

declarations. 14293 loc -> 12900 loc

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23906>

16 months agonir/opt_dead_cf: Handle if statements ending in a jump correctly
Konstantin Seurer [Sat, 20 May 2023 19:57:57 +0000 (21:57 +0200)]
nir/opt_dead_cf: Handle if statements ending in a jump correctly

If a then/else block ends in a jump, the phi nodes do not necessarily
have to reference the always taken branch because they are dead code.
Avoid crashing in this case by only rewriting phis, if the block does
not end in a jump.

cc: mesa-stable

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

16 months agotu: Use common dirty tracking for PC_PRIMITIVE_CNTL_0
Connor Abbott [Fri, 19 May 2023 13:09:36 +0000 (15:09 +0200)]
tu: Use common dirty tracking for PC_PRIMITIVE_CNTL_0

This improves the vkoverhead base draw call throughput by around 4%
which fixes a regression from the old code while making things simpler.

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

16 months agotu: Rewrite to use common Vulkan dynamic state
Connor Abbott [Mon, 3 Apr 2023 17:42:53 +0000 (19:42 +0200)]
tu: Rewrite to use common Vulkan dynamic state

This drops a significant amount of code for tracking partial state that
is now handled by the common state tracking infrastructure.

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

16 months agotu: Split pipeline struct into different types
Connor Abbott [Tue, 28 Mar 2023 09:56:54 +0000 (11:56 +0200)]
tu: Split pipeline struct into different types

The common state code expects you to use a different struct for state in
graphics pipelines and in pipeline libraries. This means we need to
copy the approach radv uses in order to be compatible. This also allows
us to shrink the structs a bit by moving compute-only things to the
compute pipeline and library-only things to the library pipeline.

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

16 months agofreedreno/a6xx: Fix name of A6XX_PC_PRIMITIVE_CNTL_0::TESS_UPPER_LEFT_DOMAIN_ORIGIN
Connor Abbott [Mon, 12 Jun 2023 14:46:02 +0000 (16:46 +0200)]
freedreno/a6xx: Fix name of A6XX_PC_PRIMITIVE_CNTL_0::TESS_UPPER_LEFT_DOMAIN_ORIGIN

Document what it actually does.

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

16 months agotu: Don't use A6XX_PC_PRIMITIVE_CNTL_0::TESS_UPPER_LEFT_DOMAIN_ORIGIN
Connor Abbott [Mon, 12 Jun 2023 14:22:04 +0000 (16:22 +0200)]
tu: Don't use A6XX_PC_PRIMITIVE_CNTL_0::TESS_UPPER_LEFT_DOMAIN_ORIGIN

This field also affects triangle strip and triangle fan ordering, so we
would get the incorrect (D3D) order with tessellation and geometry
shaders both enabled. Instead flip clockwise/counterclockwise when
the domain origin is upper-left, as radv does.

Because the register is only emitted when tessellation is active which
forces sysmem, it shouldn't regress performance to emit it directly
instead of using a draw state. We're already very tight on draw states.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Don't track each vertex input field
Connor Abbott [Fri, 19 May 2023 17:48:55 +0000 (19:48 +0200)]
vk/graphics_state: Don't track each vertex input field

It's unlikely that anyone will call vkCmdSetVertexInputEXT() twice with
the exact same arguments, so this wasn't really doing anything, and it
hurt performance in the common case as shown via "vkoverhead -test 21"
on turnip.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovulkan: Fix renderpass flags with driver-specific renderpass
Connor Abbott [Tue, 4 Apr 2023 17:49:28 +0000 (19:49 +0200)]
vulkan: Fix renderpass flags with driver-specific renderpass

We need to use the driver's renderpass to get the flags if the driver
provides it.

Fixes: f3876db1ee5 ("vulkan: Plumb rendering flags through vk_graphics_pipeline_state")
Reviewed-by: Faith Ekstrand <faith.ekstrand@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Track attachment count as state
Connor Abbott [Tue, 4 Apr 2023 16:02:26 +0000 (18:02 +0200)]
vk/graphics_state: Track attachment count as state

Even if this isn't dynamic state per-se because it always comes from the
pipeline, it's useful to be able to track it for the various dynamic
states that it affects, which may be either precompiled or not on
turnip.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agoradv: Fix radv_pipeline_is_blend_enabled
Connor Abbott [Mon, 3 Jul 2023 09:21:20 +0000 (11:21 +0200)]
radv: Fix radv_pipeline_is_blend_enabled

This was relying on cb being NULL instead of just gracefully handling
it, and it will stop being NULL once we start tracking attachment count
as state. Moreover is was broken in the case where only the blend enable
is dynamic.

Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Add helpers for pre-baking state
Connor Abbott [Mon, 3 Apr 2023 17:10:30 +0000 (19:10 +0200)]
vk/graphics_state: Add helpers for pre-baking state

Previously, drivers have either not supported some dynamic state (like
vertex input or sample locations) at all or it's been always dynamic. In
order to be able to set dynamic state sometimes and other times leave it
up to driver-specific state packets, we need a few helpers.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Fix some assertions when copying state
Connor Abbott [Mon, 3 Apr 2023 16:45:05 +0000 (18:45 +0200)]
vk/graphics_state: Fix some assertions when copying state

On turnip we support dynamic vertex input, but static vertex input is
precompiled and so we will copy from a source without VI to a
destination with VI and it's valid in this case to do nothing. On the
other hand, it should never be valid if VI state is set but the pointer
isn't there, which the code previously silently skipped over. There's a
similar issue with sample locations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Add VI_BINDINGS_VALID state
Connor Abbott [Mon, 3 Apr 2023 16:30:18 +0000 (18:30 +0200)]
vk/graphics_state: Add VI_BINDINGS_VALID state

This is a mirror of vi::bindings_valid, but we can track it and set it
properly even when vertex input state is precompiled, because it is also
needed on turnip for knowing the size of the vertex buffer and vertex
stride state packets even when vertex input state is precompiled.
Previously drivers that could pre-bake vertex input state were expected
to handle this themselves, but this would've been complicated for turnip
because we can handle both pre-baked and dynamic vertex input state. Now
we have the one field which is correctly set in all circumstances and we
never have to setup space for vertex input state in the pipeline.

Reviewed-by: Faith Ekstrand <faith.ekstrand@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Add feedback_loop_input_only
Connor Abbott [Wed, 29 Mar 2023 14:32:12 +0000 (16:32 +0200)]
vk/graphics_state: Add feedback_loop_input_only

On turnip, there are two cases for feedback loops:

- For feedback loops that involve input attachments, everything works as
  normal in GMEM mode but have to do a workaround in sysmem.
- For feedback loops that may involve any texture, GMEM mode is
  impossible and we have to disable it.

Currently we track this through a special flag on the pipeline, but this
won't be practical in the future. Add a flag to the common renderpass
state struct to patch this info through when using our own renderpass.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agovk/graphics_state: Remove vk_subpass_info
Connor Abbott [Wed, 29 Mar 2023 08:28:25 +0000 (10:28 +0200)]
vk/graphics_state: Remove vk_subpass_info

It only has a subset of the renderpass state, whereas with turnip we
need to use pretty much all of it at one point or another. Just allow
the driver to pass in the entire vk_render_pass_state if it's using its
own renderpass implementation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agoutil/bitset: Add some extra functions
Connor Abbott [Mon, 3 Apr 2023 16:26:57 +0000 (18:26 +0200)]
util/bitset: Add some extra functions

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>

16 months agocompiler/clc: Switch to use nir_foreach_function_impl in function nir_lower_libclc
Yonggang Luo [Wed, 28 Jun 2023 10:49:43 +0000 (18:49 +0800)]
compiler/clc: Switch to use nir_foreach_function_impl in function nir_lower_libclc

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23901>

16 months agov3d/ci: add new flake
Juan A. Suarez Romero [Mon, 3 Jul 2023 15:55:43 +0000 (17:55 +0200)]
v3d/ci: add new flake

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23975>

16 months agod3d12: Video Decode - Refactor and style fixes
Sil Vilerino [Mon, 3 Jul 2023 16:07:26 +0000 (12:07 -0400)]
d3d12: Video Decode - Refactor and style fixes

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

16 months agod3d12: Video Process - Implement get_processor_fence and async queing
Sil Vilerino [Fri, 30 Jun 2023 19:37:19 +0000 (15:37 -0400)]
d3d12: Video Process - Implement get_processor_fence and async queing

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

16 months agod3d12: Video Encode - GPU wait on input surface fence
Sil Vilerino [Fri, 30 Jun 2023 18:36:35 +0000 (14:36 -0400)]
d3d12: Video Encode - GPU wait on input surface fence

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

16 months agod3d12: Video Decode - Sync 3D context copy with decode work for texture array case
Sil Vilerino [Mon, 3 Jul 2023 01:07:43 +0000 (21:07 -0400)]
d3d12: Video Decode - Sync 3D context copy with decode work for texture array case

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

16 months agod3d12: Apply style format to d3d12_video_dec.cpp
Sil Vilerino [Sat, 1 Jul 2023 16:26:04 +0000 (12:26 -0400)]
d3d12: Apply style format to d3d12_video_dec.cpp

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

16 months agod3d12: Video Decode - Implement get_decoder_fence and async queing
Sil Vilerino [Fri, 30 Jun 2023 19:44:36 +0000 (15:44 -0400)]
d3d12: Video Decode - Implement get_decoder_fence and async queing

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

16 months agofrontend/va: Add video processing async fence support
Sil Vilerino [Fri, 30 Jun 2023 19:26:01 +0000 (15:26 -0400)]
frontend/va: Add video processing async fence support

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23969>

16 months agofrontend/va: Pass surf->fence in PIPE_VIDEO_ENTRYPOINT_ENCODE contexts for driver...
Sil Vilerino [Fri, 30 Jun 2023 19:45:29 +0000 (15:45 -0400)]
frontend/va: Pass surf->fence in PIPE_VIDEO_ENTRYPOINT_ENCODE contexts for driver to wait on input surface pending work

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23969>

16 months agozink/ci: Add ext_transform_feedback@api-errors to fail list.
Tatsuyuki Ishi [Mon, 3 Jul 2023 16:26:09 +0000 (01:26 +0900)]
zink/ci: Add ext_transform_feedback@api-errors to fail list.

These leaks pipelines due to a test bug.

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

16 months agoradv: Enable weak reference cache for device->mem_cache.
Tatsuyuki Ishi [Tue, 27 Jun 2023 12:59:58 +0000 (21:59 +0900)]
radv: Enable weak reference cache for device->mem_cache.

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

16 months agoradv: reference pipeline cache object in radv_pipeline
Daniel Schürmann [Mon, 26 Jun 2023 10:16:35 +0000 (12:16 +0200)]
radv: reference pipeline cache object in radv_pipeline

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

16 months agointel: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:03:40 +0000 (13:03 +0200)]
intel: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agopanfrost: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:03:24 +0000 (13:03 +0200)]
panfrost: Use nir_builder_at

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

16 months agomicrosoft: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:03:05 +0000 (13:03 +0200)]
microsoft: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agolavapipe: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:02:34 +0000 (13:02 +0200)]
lavapipe: Use nir_builder_at

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

16 months agozink: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:02:21 +0000 (13:02 +0200)]
zink: Use nir_builder_at

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

16 months agovc4: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:01:49 +0000 (13:01 +0200)]
vc4: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agoradeonsi: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:01:27 +0000 (13:01 +0200)]
radeonsi: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agor600: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:01:08 +0000 (13:01 +0200)]
r600: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agoetnaviv: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:00:47 +0000 (13:00 +0200)]
etnaviv: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agocrocus: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 11:00:08 +0000 (13:00 +0200)]
crocus: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agogallium,st: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:59:44 +0000 (12:59 +0200)]
gallium,st: Use nir_builder_at

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

16 months agofreedreno: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:59:05 +0000 (12:59 +0200)]
freedreno: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agospirv: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:57:47 +0000 (12:57 +0200)]
spirv: Use nir_builder_at

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

16 months agonir: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:57:29 +0000 (12:57 +0200)]
nir: Use nir_builder_at

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

16 months agoglsl: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:56:44 +0000 (12:56 +0200)]
glsl: Use nir_builder_at

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

16 months agov3d: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:56:26 +0000 (12:56 +0200)]
v3d: Use nir_builder_at

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agoasahi: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:55:47 +0000 (12:55 +0200)]
asahi: Use nir_builder_at

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

16 months agoradv: Use nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:55:12 +0000 (12:55 +0200)]
radv: Use nir_builder_at

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

16 months agonir: Add nir_builder_at
Konstantin Seurer [Tue, 27 Jun 2023 10:53:06 +0000 (12:53 +0200)]
nir: Add nir_builder_at

Creates and returns a nir_builder from a cursor. The nir_function_impl
is retrieved using said cursor. This should be fine as long as it is not
used on extracted control flow.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>

16 months agofreedreno/fdperf: Use common device info helpers
Rob Clark [Fri, 30 Jun 2023 14:50:11 +0000 (07:50 -0700)]
freedreno/fdperf: Use common device info helpers

Manually constructing the chip-id will stop working with future devices.
And now that we get the generation from the device table, we can't be
sloppy about using a bogus dev_id.

Fixes: 00900b76e0f4 ("freedreno: Decouple GPU gen from gpu_id/chip_id")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23953>

16 months agovulkan/pipeline_cache: Introduce weak reference mode.
Tatsuyuki Ishi [Tue, 27 Jun 2023 12:40:49 +0000 (21:40 +0900)]
vulkan/pipeline_cache: Introduce weak reference mode.

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

16 months agovulkan/pipeline_cache: Move cache_object_unref out of header.
Tatsuyuki Ishi [Tue, 27 Jun 2023 12:23:10 +0000 (21:23 +0900)]
vulkan/pipeline_cache: Move cache_object_unref out of header.

For future use where private functions are called from unref code.

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

16 months agovulkan/pipeline_cache: Move locking outside of remove_object.
Tatsuyuki Ishi [Tue, 27 Jun 2023 12:21:41 +0000 (21:21 +0900)]
vulkan/pipeline_cache: Move locking outside of remove_object.

To match a future use case better.

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

16 months agovulkan/pipeline_cache: Do not consume object passed into remove_object.
Tatsuyuki Ishi [Tue, 27 Jun 2023 12:20:38 +0000 (21:20 +0900)]
vulkan/pipeline_cache: Do not consume object passed into remove_object.

Future use case will require removing an object with zero ref count, so
leave it up to the caller to call unref.

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

16 months agodocs/features: update anv entries
Lionel Landwerlin [Mon, 3 Jul 2023 09:15:10 +0000 (12:15 +0300)]
docs/features: update anv entries

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23967>

16 months agoRevert "ci: disable Collabora's LAVA lab for maintance"
Sergi Blanch Torne [Tue, 20 Jun 2023 15:01:58 +0000 (17:01 +0200)]
Revert "ci: disable Collabora's LAVA lab for maintance"

This reverts commit https://gitlab.freedesktop.org/mesa/mesa/-/commit/1cf56af7cad410ba81d27e4df5c0c53ac106a7ab

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23760>

16 months agoci/microsoft: partly revert rename from container-rules to manual-rules
David Heidelberg [Mon, 3 Jul 2023 10:47:49 +0000 (12:47 +0200)]
ci/microsoft: partly revert rename from container-rules to manual-rules

We need to keep container job as a manual one, while others are always
disabled.

Fixes: c9de0d297743 ("ci/microsoft: rename manual rules according to rest introduced rules")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23968>

16 months agoci: when touching farms, never run manual jobs
David Heidelberg [Mon, 3 Jul 2023 10:44:48 +0000 (12:44 +0200)]
ci: when touching farms, never run manual jobs

It's implied, that in moments of enabling farm manual jobs never run.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23968>

16 months agotu/kgsl: Fix memory overwrite with vkFlushMappedMemoryRanges when more than 1 range
Shan-Min Chao [Wed, 7 Jun 2023 16:49:45 +0000 (09:49 -0700)]
tu/kgsl: Fix memory overwrite with vkFlushMappedMemoryRanges when more than 1 range

Fixes: 5a594109623fff43fcd3b874b160c711e81bf55d ("turnip: add cached and cached-coherent memory types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23504>

16 months agoaco: remove 64-bit integer conversion opcodes
Rhys Perry [Tue, 27 Jun 2023 18:54:56 +0000 (19:54 +0100)]
aco: remove 64-bit integer conversion opcodes

These are handled by nir_lower_int64 now.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23926>

16 months agoradeonsi: use nir_lower_conv64
Rhys Perry [Wed, 28 Jun 2023 16:10:28 +0000 (17:10 +0100)]
radeonsi: use nir_lower_conv64

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23926>

16 months agoradv: call nir_lower_int64 later
Rhys Perry [Tue, 27 Jun 2023 18:23:39 +0000 (19:23 +0100)]
radv: call nir_lower_int64 later

I would rather this be after several of these complicated lowering passes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23926>

16 months agoradv: use nir_lower_conv64
Rhys Perry [Tue, 27 Jun 2023 18:22:42 +0000 (19:22 +0100)]
radv: use nir_lower_conv64

This has a more accurate i2f/u2f implementation.

fossil-db (navi21):
Totals from 342 (0.26% of 133461) affected shaders:
MaxWaves: 10480 -> 10472 (-0.08%)
Instrs: 273455 -> 274019 (+0.21%); split: -0.02%, +0.22%
CodeSize: 1545020 -> 1546852 (+0.12%); split: -0.11%, +0.23%
VGPRs: 9528 -> 9552 (+0.25%)
SpillSGPRs: 553 -> 592 (+7.05%); split: -2.71%, +9.76%
SpillVGPRs: 821 -> 811 (-1.22%); split: -1.71%, +0.49%
Latency: 3837590 -> 3822989 (-0.38%); split: -0.52%, +0.14%
InvThroughput: 1284512 -> 1277012 (-0.58%); split: -0.77%, +0.19%
VClause: 6480 -> 6486 (+0.09%); split: -0.15%, +0.25%
SClause: 6640 -> 6645 (+0.08%); split: -0.02%, +0.09%
Copies: 45858 -> 46160 (+0.66%); split: -0.10%, +0.76%
Branches: 8736 -> 8741 (+0.06%); split: -0.01%, +0.07%
PreSGPRs: 14320 -> 14323 (+0.02%)
PreVGPRs: 8545 -> 8551 (+0.07%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9275
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23926>

16 months agonir: split nir_lower_mov64
Rhys Perry [Tue, 27 Jun 2023 18:19:39 +0000 (19:19 +0100)]
nir: split nir_lower_mov64

ACO will want to lower the conversions, but preserve the bcsels.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23926>

16 months agoradv: Enable required subgroup size on mesh/task.
Timur Kristóf [Thu, 29 Jun 2023 12:39:04 +0000 (14:39 +0200)]
radv: Enable required subgroup size on mesh/task.

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/23925>

16 months agoradv: Use required subgroup info for graphics shaders.
Timur Kristóf [Thu, 29 Jun 2023 12:38:09 +0000 (14:38 +0200)]
radv: Use required subgroup info for graphics shaders.

We plan to allow setting this on some graphics shader stages.

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/23925>

16 months agoradv: Refactor required subgroup size in pipeline key.
Timur Kristóf [Thu, 29 Jun 2023 12:27:25 +0000 (14:27 +0200)]
radv: Refactor required subgroup size in pipeline key.

This is to allow setting required subgroup size and
full subgroups on more than just the compute stage.

Use an enum (not the actual subgroup size integer)
so that we can have some bits reserved there for
future use.

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/23925>

16 months agoetnaviv: nir: do a late nir_opt_cse run
Christian Gmeiner [Wed, 28 Jun 2023 11:26:50 +0000 (13:26 +0200)]
etnaviv: nir: do a late nir_opt_cse run

This cleans up a lot and helps to generate much better code. There
are only benefits on GPUs without inline immediate support.

shader-db results on GC2000:

total instructions in shared programs: 237168 -> 235101 (-0.87%)
instructions in affected programs: 17297 -> 15230 (-11.95%)
helped: 758
HURT: 0
helped stats (abs) min: 1 max: 24 x̄: 2.73 x̃: 2
helped stats (rel) min: 7.14% max: 29.41% x̄: 14.47% x̃: 14.29%
95% mean confidence interval for instructions value: -2.94 -2.51
95% mean confidence interval for instructions %-change: -14.84% -14.09%
Instructions are helped.

total temps in shared programs: 85553 -> 84969 (-0.68%)
temps in affected programs: 2879 -> 2295 (-20.28%)
helped: 584
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 5.00% max: 25.00% x̄: 21.48% x̃: 20.00%
95% mean confidence interval for temps value: -1.00 -1.00
95% mean confidence interval for temps %-change: -21.76% -21.21%
Temps are helped.

total immediates in shared programs: 154800 -> 154800 (0.00%)
immediates in affected programs: 0 -> 0
helped: 0
HURT: 0

total loops in shared programs: 0 -> 0
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

LOST:   0
GAINED: 0

No changes on GC3000 and GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23947>

16 months agoci: disable Collabora's LAVA lab for maintance
Sergi Blanch Torne [Tue, 20 Jun 2023 14:57:50 +0000 (16:57 +0200)]
ci: disable Collabora's LAVA lab for maintance

This is to inform you of some planned downtime in the LAVA lab as follows:

  * Start: 2023-07-03 07:00 UTC
  * End: 2023-07-03 11:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23759>