platform/upstream/mesa.git
2 years agofreedreno/a6xx+: Add support for the R8G8_R8B8 and G8R8_B8R8 formats.
Emma Anholt [Thu, 30 Sep 2021 18:03:49 +0000 (11:03 -0700)]
freedreno/a6xx+: Add support for the R8G8_R8B8 and G8R8_B8R8 formats.

This means that EGLimage imports of YUYV and UYVY can use a single sampler
instead of having to create RGBA8 and RG8 samplers mapping the same
texture.  The swizzles are the same as turnip uses, and it makes the
piglit tests for these formats happy.

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

2 years agofreedreno/a6xx: Add some more 16-bit rgb/rgba swaps to our format tables.
Emma Anholt [Fri, 24 Sep 2021 22:20:58 +0000 (15:20 -0700)]
freedreno/a6xx: Add some more 16-bit rgb/rgba swaps to our format tables.

BGR565 is chosen for GL_RGB565 and BGRA4 for GL_RGBA4, so it doesn't
change GLES's behavior.

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

2 years agofreedreno/a6xx: Drop texturing support from other scaled formats.
Emma Anholt [Fri, 24 Sep 2021 22:32:23 +0000 (15:32 -0700)]
freedreno/a6xx: Drop texturing support from other scaled formats.

GLES doesn't expose these texture formats, and we don't want to start
exposing them when turnip starts using our tables.

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

2 years agofreedreno/a6xx: Add support for EXT_texture_sRGB_R8/RG8.
Emma Anholt [Fri, 24 Sep 2021 22:05:57 +0000 (15:05 -0700)]
freedreno/a6xx: Add support for EXT_texture_sRGB_R8/RG8.

Noticed to be missing when comparing format tables between turnip and
freedreno.  Passes dEQP-GLES31 fine.

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

2 years agofreedreno/a6xx: disable vertex fetch support flag for b8g8r8a8_srgb.
Emma Anholt [Fri, 24 Sep 2021 21:21:07 +0000 (14:21 -0700)]
freedreno/a6xx: disable vertex fetch support flag for b8g8r8a8_srgb.

We don't have an srgb decode flag on vertex fetch, r8g8b8a8_srgb isn't
supported either, and GL doesn't ask for vertex fetch for this anyway.

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

2 years agofreedreno/a6xx: Add int/scaled/snorm vertex formats to match turnip.
Emma Anholt [Fri, 24 Sep 2021 21:18:18 +0000 (14:18 -0700)]
freedreno/a6xx: Add int/scaled/snorm vertex formats to match turnip.

Noticed because the vertex formats didn't match up between the two.  GL
doesn't actually look for these vertex formats, though.

Having these marked as supporting texture or color could theoretically
change things I think.

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

2 years agofreedreno/a6xx: Move the format table to common code.
Emma Anholt [Fri, 24 Sep 2021 20:57:34 +0000 (13:57 -0700)]
freedreno/a6xx: Move the format table to common code.

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

2 years agor300: fix UB caused by 1 << 31 and 2 << 30
Filip Gawin [Sat, 2 Oct 2021 16:28:17 +0000 (18:28 +0200)]
r300: fix UB caused by 1 << 31 and 2 << 30

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

2 years agovulkan/wsi/wayland: fix an invalid u_vector_init call
Chia-I Wu [Tue, 5 Oct 2021 01:01:06 +0000 (18:01 -0700)]
vulkan/wsi/wayland: fix an invalid u_vector_init call

u_vector_init requires size to be power-of-two.

Fixes: 151b65b2119 ("vulkan/wsi/wayland: generalize modifier handling")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13186>

2 years agoturnip: clamp per-tile scissors to max viewport size in binning pass
Danylo Piliaiev [Tue, 5 Oct 2021 11:49:40 +0000 (14:49 +0300)]
turnip: clamp per-tile scissors to max viewport size in binning pass

Tiles on the edge may cross maximum viewport size, we have to clamp
per-tile scissor to maximum allowed viewport dimensions.

Add MAX_VIEWPORT_SIZE constant along the way.

Fixes vkd3d test "test_draw_uav_only"

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

2 years agoradv: Use VK_DEFINE_*HANDLE_CASTS instead of rolling our own
Jason Ekstrand [Mon, 27 Sep 2021 22:40:22 +0000 (17:40 -0500)]
radv: Use VK_DEFINE_*HANDLE_CASTS instead of rolling our own

The core ones have some nifty stuff like asserts that it's a valid
vk_object_base and has the right type.  We don't have real type safety
with Vulkan handles but this is as close as we can get.  The core ones
also track when we've started handing out handles for logging purposes
which we want.

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

2 years agointel/blorp: fix a compile warning about uninitialized use
Tapani Pälli [Tue, 5 Oct 2021 10:16:51 +0000 (13:16 +0300)]
intel/blorp: fix a compile warning about uninitialized use

warning: ‘bind_offset’ may be used uninitialized in this function

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13190>

2 years agonir/lower_io: preserve all metadata when no progress
Lionel Landwerlin [Mon, 4 Oct 2021 18:24:00 +0000 (21:24 +0300)]
nir/lower_io: preserve all metadata when no progress

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13168>

2 years agoradv/llvm: fix exporting VS parameters
Samuel Pitoiset [Tue, 5 Oct 2021 10:20:29 +0000 (12:20 +0200)]
radv/llvm: fix exporting VS parameters

My mistake.

Fixes: 2aa705ec87c ("radv: determine the VS output parameters in the shader info pass")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13191>

2 years agoanv: remove redundant VertexURBEntryReadLength setting
Lionel Landwerlin [Mon, 4 Oct 2021 10:20:46 +0000 (13:20 +0300)]
anv: remove redundant VertexURBEntryReadLength setting

We're setting the same field a dozen lines below to the exact same
value.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13169>

2 years agonir: preserve all metadata when nir_opt_vectorize doesn't make progress
Marcin Ślusarz [Tue, 10 Aug 2021 10:46:55 +0000 (12:46 +0200)]
nir: preserve all metadata when nir_opt_vectorize doesn't make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agonir: preserve all metadata when nir_propagate_invariant doesn't make progress
Marcin Ślusarz [Tue, 10 Aug 2021 10:43:05 +0000 (12:43 +0200)]
nir: preserve all metadata when nir_propagate_invariant doesn't make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agonir: preserve all metadata when nir_lower_int_to_float doesn't make progress
Marcin Ślusarz [Mon, 9 Aug 2021 15:00:01 +0000 (17:00 +0200)]
nir: preserve all metadata when nir_lower_int_to_float doesn't make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agoglsl: preserve all metadata when lower_buffer_interface_derefs doesn't make progress
Marcin Ślusarz [Fri, 6 Aug 2021 13:27:52 +0000 (15:27 +0200)]
glsl: preserve all metadata when lower_buffer_interface_derefs doesn't make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agoanv: preserve all metadata when anv_nir_lower_multiview doesn't make progress
Marcin Ślusarz [Fri, 6 Aug 2021 12:50:00 +0000 (14:50 +0200)]
anv: preserve all metadata when anv_nir_lower_multiview doesn't make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agoanv: use nir_shader_instructions_pass in anv_nir_lower_ycbcr_textures
Marcin Ślusarz [Fri, 6 Aug 2021 12:46:21 +0000 (14:46 +0200)]
anv: use nir_shader_instructions_pass in anv_nir_lower_ycbcr_textures

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agoanv: use nir_shader_instructions_pass in anv_nir_add_base_work_group_id
Marcin Ślusarz [Fri, 6 Aug 2021 12:42:35 +0000 (14:42 +0200)]
anv: use nir_shader_instructions_pass in anv_nir_add_base_work_group_id

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_metadata_none instead of its value
Marcin Ślusarz [Fri, 6 Aug 2021 12:38:31 +0000 (14:38 +0200)]
intel/compiler: use nir_metadata_none instead of its value

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_opt_peephole_ffma
Marcin Ślusarz [Fri, 6 Aug 2021 12:33:14 +0000 (14:33 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_opt_peephole_ffma

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_lower_storage_image
Marcin Ślusarz [Fri, 6 Aug 2021 12:27:58 +0000 (14:27 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_storage_image

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_lower_scoped_barriers
Marcin Ślusarz [Fri, 6 Aug 2021 12:16:24 +0000 (14:16 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_scoped_barriers

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_lower_mem_access_bit_sizes
Marcin Ślusarz [Fri, 6 Aug 2021 12:12:11 +0000 (14:12 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_mem_access_bit_sizes

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_lower_conversions
Marcin Ślusarz [Fri, 6 Aug 2021 11:58:06 +0000 (13:58 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_conversions

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_clamp_image_1d_2d_array_sizes
Marcin Ślusarz [Fri, 6 Aug 2021 11:20:53 +0000 (13:20 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_clamp_image_1d_2d_array_sizes

No functional changes.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agointel/compiler: use nir_shader_instructions_pass in brw_nir_demote_sample_qualifiers
Marcin Ślusarz [Fri, 6 Aug 2021 10:56:31 +0000 (12:56 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_demote_sample_qualifiers

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress
- pass returns true ONLY when it makes progress ("progress" was initialized incorrectly)

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

2 years agoradv: fix vk_object_base_init/finish for internal device memory objects
Samuel Pitoiset [Mon, 4 Oct 2021 11:40:44 +0000 (13:40 +0200)]
radv: fix vk_object_base_init/finish for internal device memory objects

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13172>

2 years agoradv: fix writing combined image/sampler descriptor
Samuel Pitoiset [Mon, 4 Oct 2021 11:22:59 +0000 (13:22 +0200)]
radv: fix writing combined image/sampler descriptor

This will crash with the common Vulkan handles if sampler is NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13172>

2 years agoradv: fix vk_object_base_init/finish for push descriptors
Samuel Pitoiset [Mon, 4 Oct 2021 11:10:07 +0000 (13:10 +0200)]
radv: fix vk_object_base_init/finish for push descriptors

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13172>

2 years agointel/compiler: add missing line returns to logs
Lionel Landwerlin [Sun, 3 Oct 2021 12:58:36 +0000 (15:58 +0300)]
intel/compiler: add missing line returns to logs

In the upcoming intel_clc tool, we're allowing to print these messages
out and some of them just don't look right.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13165>

2 years agoanv: enable UBO indexing
Lionel Landwerlin [Wed, 29 Sep 2021 07:22:14 +0000 (10:22 +0300)]
anv: enable UBO indexing

We added support but didn't expose it through the API.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b704d03efd4767 ("anv: Do UBO loads with global addresses for bindless")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5426
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13097>

2 years agocrocus/query: don't loop on ready status after gpu hang.
Dave Airlie [Tue, 5 Oct 2021 02:11:26 +0000 (12:11 +1000)]
crocus/query: don't loop on ready status after gpu hang.

When a GPU hang occurs, the syncobj will eventually timeout,
if this is a wait, just set ready, so things will continue.

This matches 965 behaviour better.

Fixes: c282a082bef0 ("crocus/query: poll the syncobj in the no wait situation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188>

2 years agocrocus/gen6: don't reemit the svbi when debugging
Dave Airlie [Tue, 14 Sep 2021 21:08:53 +0000 (07:08 +1000)]
crocus/gen6: don't reemit the svbi when debugging

This messes up the counts, stops some tests failing when reemit
is enabled

Fixes: f3630548f1da ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188>

2 years agofreedreno/tools: Fix build failure when cffdump isn't built but tests are.
Emma Anholt [Mon, 4 Oct 2021 21:54:08 +0000 (14:54 -0700)]
freedreno/tools: Fix build failure when cffdump isn't built but tests are.

Can't test the tool if we don't build it.  Move the other test definition
next to the tool, too.

Fixes: 82b5c9526592 ("freedreno: Move crashdec/cffdec tests to be meson unit tests.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13183>

2 years agovulkan/physical_device_features: Stop generating a header
Jason Ekstrand [Fri, 1 Oct 2021 17:32:36 +0000 (12:32 -0500)]
vulkan/physical_device_features: Stop generating a header

It only has one entrypoint and nothing in it is based on code-gen.  We
can put that one entrypoint in vk_physical_device.h instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13150>

2 years agovulkan/physical_device_features: Drop some unnecessary dependencies
Jason Ekstrand [Fri, 1 Oct 2021 17:19:12 +0000 (12:19 -0500)]
vulkan/physical_device_features: Drop some unnecessary dependencies

None of these are actually used.  We parse the XML bare and don't need
any extension or entrypoint information.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13150>

2 years agoci/freedreno: Restart the run if cheza spontenously reboots.
Emma Anholt [Mon, 4 Oct 2021 20:15:21 +0000 (13:15 -0700)]
ci/freedreno: Restart the run if cheza spontenously reboots.

Occasionally (once every couple weeks?) a cheza reboots mid run, around a
GPU fault.  Detect that and do an internal retry instead of failing out
the job.

Closes: #5388
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13181>

2 years agopanfrost: Disable flaky piglit job for now.
Emma Anholt [Mon, 4 Oct 2021 20:11:35 +0000 (13:11 -0700)]
panfrost: Disable flaky piglit job for now.

It's been getting intermittent failures on marge since being enabled, turn
it back off until it can get stabilized.

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

2 years agoci: enable building RADV in debian-release
Samuel Pitoiset [Thu, 30 Sep 2021 11:39:24 +0000 (13:39 +0200)]
ci: enable building RADV in debian-release

To build RADV without LLVM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13117>

2 years agoRevert "freedreno: Move the batch cache to the context."
Rob Clark [Sat, 2 Oct 2021 18:16:18 +0000 (11:16 -0700)]
Revert "freedreno: Move the batch cache to the context."

This reverts commit b2349a46715e870d7f38ce5f3854bef9718a835c.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5441
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159>

2 years agoRevert "freedreno: Remove the submit lock locking."
Rob Clark [Sat, 2 Oct 2021 18:16:17 +0000 (11:16 -0700)]
Revert "freedreno: Remove the submit lock locking."

This reverts commit 22486ffa5172dd0425479ce64785b0f29bf59cdf.

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

2 years agoRevert "freedreno: Use a BO bitset for faster checks for resource referenced."
Rob Clark [Sat, 2 Oct 2021 18:16:16 +0000 (11:16 -0700)]
Revert "freedreno: Use a BO bitset for faster checks for resource referenced."

This reverts commit 3ade94df862ccc9562fd82ff8baa14b62b8be031.

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

2 years agoRevert "freedreno: Remove dead fd_batch_reset()."
Rob Clark [Sat, 2 Oct 2021 18:16:15 +0000 (11:16 -0700)]
Revert "freedreno: Remove dead fd_batch_reset()."

This reverts commit 63cc1fe71f151b69928d59624795fd70f98c02f9.

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

2 years agoRevert "freedreno: Fix autotune regression since batch-cache rework."
Rob Clark [Sat, 2 Oct 2021 18:16:13 +0000 (11:16 -0700)]
Revert "freedreno: Fix autotune regression since batch-cache rework."

This reverts commit b8c4ad378d22988cbb20743dc74d377b5d6ac7ed.

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

2 years agozink: Disable TC syncs for get_device_reset_status()
Rob Clark [Mon, 4 Oct 2021 18:25:44 +0000 (11:25 -0700)]
zink: Disable TC syncs for get_device_reset_status()

zmike said it should work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

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

2 years agofreedreno: Disable TC syncs for get_device_reset_status()
Rob Clark [Mon, 4 Oct 2021 18:16:36 +0000 (11:16 -0700)]
freedreno: Disable TC syncs for get_device_reset_status()

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163>

2 years agogallium/u_threaded: Get reset status without sync
Rob Clark [Sun, 3 Oct 2021 16:12:25 +0000 (09:12 -0700)]
gallium/u_threaded: Get reset status without sync

GPU hangs are asynchronous already, there should not be an expectation
that this is synchronized with driver thread.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

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

2 years agoanv: Identify code paths specific to graphics primitive pipeline
Caio Marcelo de Oliveira Filho [Thu, 8 Jul 2021 21:47:08 +0000 (14:47 -0700)]
anv: Identify code paths specific to graphics primitive pipeline

In preparation for adding support for the graphics mesh pipeline,
identify all the paths that are specific the primitive pipeline.

This shouldn't change any behavior since the code currently only
supports the primitive pipeline.

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

2 years agoanv: Move together primitive pipeline emit calls
Caio Marcelo de Oliveira Filho [Thu, 8 Jul 2021 21:44:17 +0000 (14:44 -0700)]
anv: Move together primitive pipeline emit calls

Just moving code and the packet order, no functional change expected.

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

2 years agoanv: Use input assembly state only when pipeline has vertex stage
Marcin Ślusarz [Tue, 31 Aug 2021 12:49:57 +0000 (14:49 +0200)]
anv: Use input assembly state only when pipeline has vertex stage

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>

2 years agoanv: Set graphics pipeline active_stages earlier
Marcin Ślusarz [Tue, 31 Aug 2021 12:43:08 +0000 (14:43 +0200)]
anv: Set graphics pipeline active_stages earlier

So that we can use the active_stages in copy_non_dynamic_state() later.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>

2 years agoanv: Validate vertex related states only when VS is present
Caio Marcelo de Oliveira Filho [Wed, 19 May 2021 18:26:21 +0000 (11:26 -0700)]
anv: Validate vertex related states only when VS is present

Mesh pipeline doesn't use those states, so we can't assert them
unconditionally for a graphics pipeline.

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

2 years agocompiler/clc: Preserve OCL kernel arg type metadata on LLVM13
Jesse Natalie [Mon, 4 Oct 2021 16:32:02 +0000 (09:32 -0700)]
compiler/clc: Preserve OCL kernel arg type metadata on LLVM13

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

2 years agocompiler/clc: Null extensions should mean all supported, not all
Jesse Natalie [Mon, 4 Oct 2021 16:29:22 +0000 (09:29 -0700)]
compiler/clc: Null extensions should mean all supported, not all

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

2 years agolima: use nir_shader_instructions_pass in lima_nir_split_load_input
Marcin Ślusarz [Tue, 10 Aug 2021 12:44:22 +0000 (14:44 +0200)]
lima: use nir_shader_instructions_pass in lima_nir_split_load_input

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13176>

2 years agowsi/x11: Fix a misunderstanding about how xcb_get_geometry works
Adam Jackson [Wed, 29 Sep 2021 15:44:42 +0000 (11:44 -0400)]
wsi/x11: Fix a misunderstanding about how xcb_get_geometry works

The code here is well-intentioned, but the only way a GetGeometry
request can fail is if you name an invalid drawable. And if we did that,
either our internal state got corrupted, or - more likely - the user
destroyed the window. In either case there's nothing more we can do with
the surface, so report that it's been lost.

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

2 years agofreedreno: Handle PIPE_FORMAT_NONE buffers
Rob Clark [Sun, 8 Aug 2021 19:23:43 +0000 (12:23 -0700)]
freedreno: Handle PIPE_FORMAT_NONE buffers

Clover creates buffers with format=NONE.. which is not technically
incorrect.  Just treat this as r8_unorm so we know width0 is the size
in bytes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>

2 years agofreedreno: Handle cso==NULL in bind_sampler_states
Rob Clark [Tue, 24 Aug 2021 00:18:57 +0000 (17:18 -0700)]
freedreno: Handle cso==NULL in bind_sampler_states

This is a thing that comes up with clover.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>

2 years agofreedreno/ir3: Remove used unused
Rob Clark [Sun, 22 Aug 2021 15:31:51 +0000 (08:31 -0700)]
freedreno/ir3: Remove used unused

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>

2 years agofreedreno: Fix some indentation
Rob Clark [Mon, 23 Aug 2021 15:58:27 +0000 (08:58 -0700)]
freedreno: Fix some indentation

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>

2 years agofreedreno: Optimize no-op submits
Rob Clark [Thu, 30 Sep 2021 15:39:53 +0000 (08:39 -0700)]
freedreno: Optimize no-op submits

In some cases we need to emit a no-op batch/submit, just to get a fence.
No need to emit all the boilerplate state-resture and flushing in this
case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>

2 years agofreedreno: Get shader variant msgs in perf debug output
Rob Clark [Sat, 2 Oct 2021 18:55:10 +0000 (11:55 -0700)]
freedreno: Get shader variant msgs in perf debug output

We want FD_MESA_DEBUG=perf to also tell us about variants.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>

2 years agopan/mdg: Use the correct swizzle for condition moves
Icecream95 [Fri, 23 Jul 2021 00:14:32 +0000 (12:14 +1200)]
pan/mdg: Use the correct swizzle for condition moves

Fixes: 70072a20e00 ("pan/midgard: Refactor swizzles")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13173>

2 years agopanvk: Support clearing ZS attachments
Boris Brezillon [Thu, 30 Sep 2021 10:54:40 +0000 (12:54 +0200)]
panvk: Support clearing ZS attachments

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137>

2 years agopanvk: Allow clear_attachment of RTs > 0
Boris Brezillon [Thu, 30 Sep 2021 10:53:11 +0000 (12:53 +0200)]
panvk: Allow clear_attachment of RTs > 0

It's just a matter of skipping unused BLEND descriptors and emitting
the one we want to clear.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137>

2 years agopanvk: Pass the render target index to panvk_meta_clear_attachment()
Boris Brezillon [Thu, 30 Sep 2021 09:36:50 +0000 (11:36 +0200)]
panvk: Pass the render target index to panvk_meta_clear_attachment()

The attachment index and render target don't necessarily match. We need
to explicitly pass the render target index to
panvk_meta_clear_attachment() so it can select the correct shader and
emit a valid RSD.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agopanvk: Fix wls_size retrieval
Boris Brezillon [Thu, 30 Sep 2021 08:45:56 +0000 (10:45 +0200)]
panvk: Fix wls_size retrieval

Fix a typo in wls_size assignment leading to a wrong wls_size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agopanvk: Don't use panfrost_get_default_swizzle() on v7+
Boris Brezillon [Thu, 30 Sep 2021 08:52:07 +0000 (10:52 +0200)]
panvk: Don't use panfrost_get_default_swizzle() on v7+

This helper produces invalid component order values on v7. Use the
MALI_RGB_COMPONENT_ORDER_xxx definitions instead.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agopanvk: Fix allocation of BOs bigger than the slab size
Boris Brezillon [Fri, 1 Oct 2021 07:11:42 +0000 (09:11 +0200)]
panvk: Fix allocation of BOs bigger than the slab size

We can pick a BO from the pool if the BO size exceeds the pool size. In
that case, allocate a BO and save it in a separate array so we can free
it when the memory pool is reset or released.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>

2 years agoradv: Add force_emulate_rt perftest option
Joshua Ashton [Wed, 22 Sep 2021 09:55:15 +0000 (10:55 +0100)]
radv: Add force_emulate_rt perftest option

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Enable raytracing extensions on older generations
Joshua Ashton [Tue, 21 Sep 2021 12:59:43 +0000 (13:59 +0100)]
radv: Enable raytracing extensions on older generations

We have shader-based bvh traversal for this on older generations now.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Implement software emulation for intersect_ray
Joshua Ashton [Tue, 21 Sep 2021 14:29:59 +0000 (15:29 +0100)]
radv: Implement software emulation for intersect_ray

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Implement build_node_to_addr for GFX8 and below
Joshua Ashton [Tue, 21 Sep 2021 14:46:03 +0000 (15:46 +0100)]
radv: Implement build_node_to_addr for GFX8 and below

Removes the nir_ prefix also given it no longer acts like a typical builder function.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Do not pass result to insert_traversal_aabb_case
Joshua Ashton [Tue, 21 Sep 2021 14:24:25 +0000 (15:24 +0100)]
radv: Do not pass result to insert_traversal_aabb_case

This is unused as it performs the tests itself.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: Remove assert in radv_rt_bind_tables
Joshua Ashton [Tue, 21 Sep 2021 13:00:34 +0000 (14:00 +0100)]
radv: Remove assert in radv_rt_bind_tables

Not necessary anymore.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>

2 years agoradv: determine the ES type (VS or TES) for GS earlier
Samuel Pitoiset [Thu, 30 Sep 2021 07:53:18 +0000 (09:53 +0200)]
radv: determine the ES type (VS or TES) for GS earlier

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

2 years agoradv: remove useless loads_dynamic_offsets when emitting push constants
Samuel Pitoiset [Tue, 28 Sep 2021 12:30:53 +0000 (14:30 +0200)]
radv: remove useless loads_dynamic_offsets when emitting push constants

It's always TRUE if loads_push_constants is TRUE.

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

2 years agoradv: remove redundant check of needs_multiview_view_index for PS
Samuel Pitoiset [Tue, 28 Sep 2021 09:31:11 +0000 (11:31 +0200)]
radv: remove redundant check of needs_multiview_view_index for PS

layer_input is always TRUE if needs_multiview_view_index is TRUE.

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

2 years agoradv: move use of NGG to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 10:01:57 +0000 (12:01 +0200)]
radv: move use of NGG to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing VRS rates to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:51:51 +0000 (11:51 +0200)]
radv: move forcing VRS rates to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing MRT output NaN fixup to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:11:33 +0000 (11:11 +0200)]
radv: move forcing MRT output NaN fixup to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing invariant geometry to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:07:02 +0000 (11:07 +0200)]
radv: move forcing invariant geometry to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: move forcing discard to demote to the graphics pipeline key
Samuel Pitoiset [Wed, 29 Sep 2021 09:01:31 +0000 (11:01 +0200)]
radv: move forcing discard to demote to the graphics pipeline key

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>

2 years agoradv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()
Samuel Pitoiset [Fri, 1 Oct 2021 07:58:46 +0000 (09:58 +0200)]
radv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()

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

2 years agoradv: remove unnecessary ac_nir_ngg_config output struct
Samuel Pitoiset [Fri, 1 Oct 2021 08:00:25 +0000 (10:00 +0200)]
radv: remove unnecessary ac_nir_ngg_config output struct

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

2 years agoradv: move ngg passthrough determination earlier
Samuel Pitoiset [Fri, 1 Oct 2021 07:56:44 +0000 (09:56 +0200)]
radv: move ngg passthrough determination earlier

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

2 years agomove: move ngg lds bytes determination earlier
Samuel Pitoiset [Fri, 1 Oct 2021 07:49:43 +0000 (09:49 +0200)]
move: move ngg lds bytes determination earlier

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

2 years agoradv: move ngg early prim export determination earlier
Samuel Pitoiset [Fri, 1 Oct 2021 07:41:49 +0000 (09:41 +0200)]
radv: move ngg early prim export determination earlier

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

2 years agoradv: move ngg culling determination earlier
Rhys Perry [Fri, 10 Sep 2021 15:25:05 +0000 (16:25 +0100)]
radv: move ngg culling determination earlier

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

2 years agoradv: do not declare an extra user SGPR for sample positions and PS
Samuel Pitoiset [Fri, 1 Oct 2021 12:47:47 +0000 (14:47 +0200)]
radv: do not declare an extra user SGPR for sample positions and PS

This is part of the scratch buffer.

No fossils-db change on Sienna.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13140>

2 years agoradeonsi: don't clear G_028644_OFFSET
Pierre-Eric Pelloux-Prayer [Wed, 29 Sep 2021 13:02:13 +0000 (15:02 +0200)]
radeonsi: don't clear G_028644_OFFSET

Before 11d1309d827 this field was updated even when G_028644_PT_SPRITE_TEX was 0.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423

Fixes: 11d1309d827 ("radeonsi: restructure si_get_ps_input_cntl for future refactoring")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13105>

2 years agoradv: get the float controls execution mode from NIR for LLVM
Samuel Pitoiset [Thu, 23 Sep 2021 08:07:38 +0000 (10:07 +0200)]
radv: get the float controls execution mode from NIR for LLVM

No need to duplicate it. Though, I think it was already broken
for merged shaders, but it doesn't matter.

No CTS regressions anyways with LLVM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12989>

2 years agoradv: disable the DX10 diamond test for better line rasterization perf
Samuel Pitoiset [Mon, 27 Sep 2021 15:48:04 +0000 (17:48 +0200)]
radv: disable the DX10 diamond test for better line rasterization perf

Ported from RadeonSI. PAL also doesn't enable it for Vulkan.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13066>

2 years agolima/parser: add shader disassembly to dump
Andreas Baierl [Fri, 1 Oct 2021 10:44:17 +0000 (12:44 +0200)]
lima/parser: add shader disassembly to dump

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13138>

2 years agoclc: let user specify the targetted SPIRV version
Lionel Landwerlin [Fri, 24 Sep 2021 08:00:16 +0000 (11:00 +0300)]
clc: let user specify the targetted SPIRV version

This version is given to the LLVM-SPIRV translator. On the SPIRV-Tools
side of things, we want to use the highest available version to be
sure to be able to parse back what was generated.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113>

2 years agoclc: print warnings/errors on their own line
Lionel Landwerlin [Fri, 30 Jul 2021 11:05:49 +0000 (14:05 +0300)]
clc: print warnings/errors on their own line

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13113>