platform/upstream/mesa.git
16 months agopvr: Don't allocate/upload 0 size coeff programs
Jarred Davies [Mon, 6 Mar 2023 00:08:04 +0000 (00:08 +0000)]
pvr: Don't allocate/upload 0 size coeff programs

Fixes 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/22051>

16 months agopvr: fix clang-format issue
Frank Binns [Wed, 8 Mar 2023 15:26:17 +0000 (15:26 +0000)]
pvr: fix clang-format issue

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

16 months agoaco: drop leftover variable
David Heidelberg [Sun, 19 Mar 2023 09:22:15 +0000 (10:22 +0100)]
aco: drop leftover variable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8652
Fixes: 44fdd2ebcb27 ("aco: end reduce tmp after control flow, when used within control flow")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22011>

16 months agoci/etnaviv: Get the gc2000_piglit manual job mostly working.
Emma Anholt [Mon, 20 Mar 2023 22:51:16 +0000 (15:51 -0700)]
ci/etnaviv: Get the gc2000_piglit manual job mostly working.

It was timing out, and the xfails were rather stale.

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

16 months agoci/hasvk: Update some xfails from the 8-sample fast clear disable.
Emma Anholt [Mon, 20 Mar 2023 22:13:08 +0000 (15:13 -0700)]
ci/hasvk: Update some xfails from the 8-sample fast clear disable.

Fixes: e509afacf3fb ("hasvk: Disable non-zero fast clears for 8xMSAA images")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22039>

16 months agoci/crocus: Update expectations from VK CTS 1.3.5.0.
Emma Anholt [Mon, 20 Mar 2023 22:10:52 +0000 (15:10 -0700)]
ci/crocus: Update expectations from VK CTS 1.3.5.0.

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

16 months agoci/iris: Update more manual job xfails from the Wayland build change.
Emma Anholt [Wed, 15 Mar 2023 16:55:11 +0000 (09:55 -0700)]
ci/iris: Update more manual job xfails from the Wayland build change.

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

16 months agoradv: implement VK_KHR_map_memory2
Samuel Pitoiset [Mon, 20 Mar 2023 17:49:25 +0000 (18:49 +0100)]
radv: implement VK_KHR_map_memory2

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

16 months agoradv: pass radv_shader to radv_shader_need_indirect_descriptor_sets()
Samuel Pitoiset [Mon, 13 Mar 2023 15:24:03 +0000 (16:24 +0100)]
radv: pass radv_shader to radv_shader_need_indirect_descriptor_sets()

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

16 months agoradv: pass radv_ray_tracing_pipeline to radv_rt_pipeline_compile()
Samuel Pitoiset [Mon, 13 Mar 2023 15:15:49 +0000 (16:15 +0100)]
radv: pass radv_ray_tracing_pipeline to radv_rt_pipeline_compile()

The base.base is redundant but this will allow us to move the shaders
array out of radv_pipeline.

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

16 months agoradv: rework dumping shaders when a GPU hang is reported
Samuel Pitoiset [Mon, 13 Mar 2023 12:49:17 +0000 (13:49 +0100)]
radv: rework dumping shaders when a GPU hang is reported

Preliminary work for moving the shaders array outside of radv_pipeline.

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

16 months agoradv: pass radv_shader to radv_dump_shader_stats()
Samuel Pitoiset [Mon, 13 Mar 2023 12:32:23 +0000 (13:32 +0100)]
radv: pass radv_shader to radv_dump_shader_stats()

Preliminary work for moving the shaders array outside of radv_pipeline.

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

16 months agoradv: use a separate compute path in radv_flush_constants()
Samuel Pitoiset [Mon, 13 Mar 2023 15:02:32 +0000 (16:02 +0100)]
radv: use a separate compute path in radv_flush_constants()

radv_get_shader() will be a radv_graphics_pipeline only function.

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

16 months agoradv: pass shader/base_reg to radv_emit_userdata_address()
Samuel Pitoiset [Mon, 13 Mar 2023 13:43:59 +0000 (14:43 +0100)]
radv: pass shader/base_reg to radv_emit_userdata_address()

Preliminary work for moving the shaders array outside of radv_pipeline.

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

16 months agoradv: pass shader/base_reg to radv_emit_inline_push_consts()
Samuel Pitoiset [Mon, 13 Mar 2023 13:05:21 +0000 (14:05 +0100)]
radv: pass shader/base_reg to radv_emit_inline_push_consts()

Preliminary work for moving the shaders array outside of radv_pipeline.

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

16 months agoradv: pass shader/base_reg to radv_emit_descriptor_pointers()
Samuel Pitoiset [Mon, 13 Mar 2023 13:02:01 +0000 (14:02 +0100)]
radv: pass shader/base_reg to radv_emit_descriptor_pointers()

Preliminary work for moving the shaders array outside of radv_pipeline.

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

16 months agoradv: replace radv_lookup_user_sgpr() by radv_get_user_sgpr()
Samuel Pitoiset [Mon, 13 Mar 2023 14:43:54 +0000 (15:43 +0100)]
radv: replace radv_lookup_user_sgpr() by radv_get_user_sgpr()

radv_get_user_sgpr() no longer relies on radv_pipeline which is
another step for moving the shaders array outside of it.

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

16 months agoradv: stop using radv_get_shader_shader() for task shaders
Samuel Pitoiset [Mon, 13 Mar 2023 14:30:23 +0000 (15:30 +0100)]
radv: stop using radv_get_shader_shader() for task shaders

radv_get_shader() should only be used for VS or TES, no need to add
another indirection for task shaders. While we are at it, rename
compute_shader to task_shader.

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

16 months agogallium: Fix u_stream_outputs_for_vertices with QUADS
Alyssa Rosenzweig [Sat, 18 Mar 2023 02:59:05 +0000 (22:59 -0400)]
gallium: Fix u_stream_outputs_for_vertices with QUADS

Per the spec. This helper is only used in nv50 and panfrost, the latter is known
to have a completely broken transform feedback implementation and I'd be
unsurprised if the same is true for nv50. So unsurprising that compatibility
profile interaction was missed.

This is part of the Piglit ext_transform_feedback-tessellation quads puzzle.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22013>

16 months agodocs: remove old thanks-article
Erik Faye-Lund [Mon, 20 Mar 2023 14:58:04 +0000 (15:58 +0100)]
docs: remove old thanks-article

This article is so out of date it's of no real use any more, and
updating it seems quite pointless. Let's just move it to the graveyard,
and forward any readers to the version we have in the amber-release.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22028>

16 months agodocs: move developers article to main website
Erik Faye-Lund [Mon, 20 Mar 2023 14:53:36 +0000 (15:53 +0100)]
docs: move developers article to main website

This isn't content that relates directly to a specific release of Mesa,
and it's also quite out-of-date. Let's move it to the main mesa website
instead, where we have an updated version.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22028>

16 months agoac/nir/ngg: Rename repacked variables to clarify their name.
Timur Kristóf [Fri, 17 Mar 2023 21:23:54 +0000 (14:23 -0700)]
ac/nir/ngg: Rename repacked variables to clarify their name.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Create separate variable for repacked rel_patch_id.
Timur Kristóf [Fri, 17 Mar 2023 21:19:24 +0000 (14:19 -0700)]
ac/nir/ngg: Create separate variable for repacked rel_patch_id.

This should be handled separately from the other repacked
variables, because it doesn't use a dword.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Remove some superfluous variables.
Timur Kristóf [Fri, 17 Mar 2023 21:09:58 +0000 (14:09 -0700)]
ac/nir/ngg: Remove some superfluous variables.

These mostly existed because of the long name of the state variable
and are not really necessary.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Rename state variables to "s".
Timur Kristóf [Fri, 17 Mar 2023 21:07:37 +0000 (14:07 -0700)]
ac/nir/ngg: Rename state variables to "s".

It was a bad idea to give them a long name, let's correct it.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Move divergence analysis call to analyze_shader_before_culling.
Timur Kristóf [Fri, 17 Mar 2023 19:19:10 +0000 (12:19 -0700)]
ac/nir/ngg: Move divergence analysis call to analyze_shader_before_culling.

It actually belongs there.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Split some functions out of save_reusable_variables.
Timur Kristóf [Fri, 17 Mar 2023 18:45:56 +0000 (11:45 -0700)]
ac/nir/ngg: Split some functions out of save_reusable_variables.

To make the function a little easier to read and understand.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Rename saved_uniform to reusable_nondeferred_variable.
Timur Kristóf [Fri, 17 Mar 2023 18:29:57 +0000 (11:29 -0700)]
ac/nir/ngg: Rename saved_uniform to reusable_nondeferred_variable.

We are planning to reuse more than just uniforms later,
hence let's clarify the name of these.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agoac/nir/ngg: Remove usused lds_es enum values.
Timur Kristóf [Fri, 17 Mar 2023 18:29:29 +0000 (11:29 -0700)]
ac/nir/ngg: Remove usused lds_es enum values.

These were meant to explain the LDS layout, but
the actual LDS usage is better explained by:
ngg_nogs_get_culling_pervertex_lds_size().
Also add some comments there.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>

16 months agodocs/zink: clean up requirements-language
Erik Faye-Lund [Fri, 10 Mar 2023 13:16:21 +0000 (14:16 +0100)]
docs/zink: clean up requirements-language

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

16 months agodocs/zink: mention vk1.2 mirror-clamp feature option
Erik Faye-Lund [Fri, 10 Mar 2023 13:10:22 +0000 (14:10 +0100)]
docs/zink: mention vk1.2 mirror-clamp feature option

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

16 months agoac/llvm: fix build with LLVM 17
Pierre-Eric Pelloux-Prayer [Mon, 20 Mar 2023 09:26:11 +0000 (10:26 +0100)]
ac/llvm: fix build with LLVM 17

This builds with LLVM 12 -> 17 and a running a simple app seems to work.

I couldn't test LLVM 11 because meson fails with:

    Looking for a fallback subproject for the dependency llvm (modules:
    bitwriter, engine, mcdisassembler, mcjit, core, executionengine,
    scalaropts, transformutils, instcombine, amdgpu, bitreader, ipo, native)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8297
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22021>

16 months agovulkan: depend idep_vulkan_runtime_headers on vk_physical_device_features.h
Constantine Shablya [Fri, 17 Mar 2023 12:52:47 +0000 (14:52 +0200)]
vulkan: depend idep_vulkan_runtime_headers on vk_physical_device_features.h

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

16 months agovulkan: fix building with python3.8
Constantine Shablya [Thu, 16 Mar 2023 15:17:53 +0000 (17:17 +0200)]
vulkan: fix building with python3.8

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8640
Reviewed-by: Ricardo Garcia <rgarcia@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21958>

16 months agoradv: add support for caching PS epilogs
Samuel Pitoiset [Tue, 14 Mar 2023 11:57:35 +0000 (12:57 +0100)]
radv: add support for caching PS epilogs

For PS epilogs created at link time because libraries are still not
cached.

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

16 months agoradv: make radv_shader_part_create() non-static
Samuel Pitoiset [Tue, 14 Mar 2023 11:57:09 +0000 (12:57 +0100)]
radv: make radv_shader_part_create() non-static

It will be used when creating shaders from the cache.

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

16 months agoradv: allow to return the PS epilog binary to the pipeline
Samuel Pitoiset [Fri, 10 Mar 2023 15:04:57 +0000 (16:04 +0100)]
radv: allow to return the PS epilog binary to the pipeline

To add it to the shaders cache.

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

16 months agoradv: upload prologs/epilogs as part of radv_shader_part_create()
Samuel Pitoiset [Fri, 10 Mar 2023 14:54:28 +0000 (15:54 +0100)]
radv: upload prologs/epilogs as part of radv_shader_part_create()

Don't need to duplicate this code.

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

16 months agoradv: store the total radv_shader_part_binary size
Samuel Pitoiset [Fri, 10 Mar 2023 14:44:13 +0000 (15:44 +0100)]
radv: store the total radv_shader_part_binary size

Similar to radv_shader. This will be used for the shaders cache.

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

16 months agoradv: store spi_shader_col_format to radv_shader_part_binary
Samuel Pitoiset [Fri, 10 Mar 2023 14:40:22 +0000 (15:40 +0100)]
radv: store spi_shader_col_format to radv_shader_part_binary

For PS epilogs in the cache.

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

16 months agoradv: stop storing the binary as part of radv_shader_part
Samuel Pitoiset [Mon, 20 Mar 2023 12:58:31 +0000 (13:58 +0100)]
radv: stop storing the binary as part of radv_shader_part

It's unnecessary to keep a pointer to the binary.

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

16 months agoradv: remove set but never used num_preserved_sgprs
Samuel Pitoiset [Fri, 10 Mar 2023 13:26:00 +0000 (14:26 +0100)]
radv: remove set but never used num_preserved_sgprs

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

16 months agoiris: implement occlusion query related Wa_14017076903
Tapani Pälli [Wed, 2 Nov 2022 10:48:25 +0000 (12:48 +0200)]
iris: implement occlusion query related Wa_14017076903

Fixes artifacts on some games that relied on occlusion query
results when no PS or depth buffers are bound.

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

16 months agoanv: implement occlusion query related Wa_14017076903
Tapani Pälli [Wed, 2 Nov 2022 10:38:52 +0000 (12:38 +0200)]
anv: implement occlusion query related Wa_14017076903

Fixes artifacts on some games that relied on occlusion query
results when no PS or depth buffers are bound.

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

16 months agov3d: implement NV_conditional_render extension
Juan A. Suarez Romero [Wed, 6 Jul 2022 09:47:00 +0000 (11:47 +0200)]
v3d: implement NV_conditional_render extension

The hardware doesn't support native conditional rendering, so it is
implemented by software.

Code borrowed from Freedreno and Panfrost.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17373>

16 months agov3d: include offset as part of streamout target
Juan A. Suarez Romero [Tue, 7 Mar 2023 09:49:58 +0000 (10:49 +0100)]
v3d: include offset as part of streamout target

When dealing with multiple Transform Feedback buffers, each of them
needs to have their own offset, so when resuming from one to another we
know exactly were to continue adding primitives.

Fixes "spec@arb_transform_feedback2@change objects while paused (gles3)"
piglit test.

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

16 months agov3d: cache pipe query results
Juan A. Suarez Romero [Wed, 6 Jul 2022 09:18:14 +0000 (11:18 +0200)]
v3d: cache pipe query results

As the BO storing the results is destroyed after getting the query
results, store the results in case requesting the results again.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17373>

16 months agoanv: report shader max dispatch width in pipeline props
Lionel Landwerlin [Sun, 19 Mar 2023 13:07:26 +0000 (15:07 +0200)]
anv: report shader max dispatch width in pipeline props

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

16 months agointel/compiler: report max dispatch width statistic
Lionel Landwerlin [Sun, 19 Mar 2023 13:03:33 +0000 (15:03 +0200)]
intel/compiler: report max dispatch width statistic

Most tools looking at shader stats assume that there is only a single
resulting binary shader out of a single input. On Intel HW this is not
always the case. So having a statistic on each variant that reports
the maximum dispatch width helps showing improvement on a single
shader in terms of how large we manage to compile it.

For shaders that can be compiled in multiple SIMD width (like fragment
shaders), this will report the maximum dispatch width in the
statistics of each variants.

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

16 months agobroadcom/compiler: track pending ldtmu count with each TMU lookup
Iago Toral Quiroga [Mon, 20 Mar 2023 10:15:40 +0000 (11:15 +0100)]
broadcom/compiler: track pending ldtmu count with each TMU lookup

And use this information when scheduling QPU to avoid merging
a new TMU request into a previous ldtmu instruction when doing
so may cause TMU output fifo overflow due to a stalling ldtmu.

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

16 months agodocs: fixup broken indentation
Erik Faye-Lund [Mon, 13 Mar 2023 13:59:37 +0000 (14:59 +0100)]
docs: fixup broken indentation

This extra indentation caused these to be inside <blockquote>-tags,
which obviously isn't what we want.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21927>

16 months agodocs: escape a few more strings
Erik Faye-Lund [Tue, 14 Mar 2023 10:57:36 +0000 (11:57 +0100)]
docs: escape a few more strings

This makes it more obvious that these are not just plain english words.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21896>

16 months agodocs: fixup broken envvar-role syntax
Erik Faye-Lund [Tue, 14 Mar 2023 10:55:29 +0000 (11:55 +0100)]
docs: fixup broken envvar-role syntax

This needs a leading colon, otherwise it renders as "envvar:" followed
with environment variable using the c-expression role.

Fixes: 4c19426fd6a ("docs/envvars: add missing mesa disk cache envvars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21896>

16 months agoradv: enable fullyCoveredFragmentShaderInputVariable on GFX9+
Samuel Pitoiset [Wed, 22 Feb 2023 15:36:11 +0000 (16:36 +0100)]
radv: enable fullyCoveredFragmentShaderInputVariable on GFX9+

For vkd3d-proton Tier 3.

It's passing CTS and vkd3d-proton tests.

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

16 months agoradv: implement fullyCoveredFragmentShaderInputVariable
Samuel Pitoiset [Wed, 22 Feb 2023 15:34:55 +0000 (16:34 +0100)]
radv: implement fullyCoveredFragmentShaderInputVariable

1 means INNER_COVERAGE.

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

16 months agoradv: enable SAMPLE_COVERAGE_ENA if the fully covered built-in is used
Samuel Pitoiset [Wed, 22 Feb 2023 15:34:18 +0000 (16:34 +0100)]
radv: enable SAMPLE_COVERAGE_ENA if the fully covered built-in is used

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

16 months agoradv: lower nir_intrinsic_load_fully_covered
Samuel Pitoiset [Wed, 22 Feb 2023 15:32:26 +0000 (16:32 +0100)]
radv: lower nir_intrinsic_load_fully_covered

The sample coverage VGPR input would be the inner coverage and 0 means
it's uncovered.

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

16 months agospirv,nir: add support for SpvBuiltInFullyCoveredEXT
Samuel Pitoiset [Wed, 22 Feb 2023 15:31:18 +0000 (16:31 +0100)]
spirv,nir: add support for SpvBuiltInFullyCoveredEXT

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

16 months agospirv: add SpvCapabilityFragmentFullyCoveredEXT
Samuel Pitoiset [Tue, 21 Feb 2023 16:00:05 +0000 (17:00 +0100)]
spirv: add SpvCapabilityFragmentFullyCoveredEXT

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

16 months agoradv: initialize cmd_buffer upload list earlier
Benjamin Cheng [Sun, 19 Mar 2023 20:27:51 +0000 (16:27 -0400)]
radv: initialize cmd_buffer upload list earlier

When cs allocation fails in radv_create_cmd_buffer,
radv_destroy_cmd_buffer is called before returning
VK_ERROR_OUT_OF_HOST_MEMORY. At that point, the upload list is not
initalized yet, so SIGSEGV will occur when trying to iterate through the
upload bo list. Initialize the upload list earlier to avoid this.

Signed-off-by: Benjamin Cheng <ben@bcheng.me>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22016>

16 months agozink: add ZINK_DEBUG=flushsync
Mike Blumenkrantz [Thu, 16 Mar 2023 12:41:55 +0000 (08:41 -0400)]
zink: add ZINK_DEBUG=flushsync

this disables the submission thread

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

16 months agozink: don't update fbfetch in db mode if inputAttachmentDescriptorSize==0
Mike Blumenkrantz [Thu, 16 Mar 2023 12:31:16 +0000 (08:31 -0400)]
zink: don't update fbfetch in db mode if inputAttachmentDescriptorSize==0

turnip gets away with this somehow, so silence harmless validation errors

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

16 months agozink: rework handling of unordered->ordered write buffer barriers
Mike Blumenkrantz [Mon, 20 Mar 2023 14:49:55 +0000 (10:49 -0400)]
zink: rework handling of unordered->ordered write buffer barriers

this improves handling for barriers that originate from a write in the
unordered cmdbuf, adding tracking to resources to better determine access
in the unordered cmdbuf and then utilizing that to generate a single split
memory barrier added at the end of the unordered cmdbuf for all the buffers
written to on that cmdbuf

the next step will be to also merge the read access down onto the end-of-cmdbuf
barrier so that all stream upload-type functionality becomes a single barrier

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

16 months agozink: always set sampler layouts when unbinding fb images while rp optimizing
Mike Blumenkrantz [Wed, 15 Mar 2023 17:26:16 +0000 (13:26 -0400)]
zink: always set sampler layouts when unbinding fb images while rp optimizing

this may or may not always be accurate, but in the cases where it is, it should
avoid some renderpass splitting, and in the cases where it isn't, there may
already be issues

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

16 months agozink: only run post-fb-unbind layout stuff if the resource isn't being destroyed
Mike Blumenkrantz [Mon, 20 Mar 2023 20:37:27 +0000 (16:37 -0400)]
zink: only run post-fb-unbind layout stuff if the resource isn't being destroyed

if refcount==1, the resource won't be used any further, and all the code
in this block is only for resources that will be used as samplers,
so don't run any of it

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

16 months agozink: add an assert to ensure zsbuf invalidation doesn't break rendering
Mike Blumenkrantz [Wed, 15 Mar 2023 17:09:19 +0000 (13:09 -0400)]
zink: add an assert to ensure zsbuf invalidation doesn't break rendering

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

16 months agozink: force unordered_write=false when binding image descriptors
Mike Blumenkrantz [Wed, 8 Mar 2023 23:38:51 +0000 (18:38 -0500)]
zink: force unordered_write=false when binding image descriptors

there's no way to link up image layouts between the unordered cmdbuf
and the main one, so if an op is promoted to unordered after an image
is used as a descriptor, the layout will be broken

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

16 months agozink: fix unordered access for image descriptors
Mike Blumenkrantz [Wed, 8 Mar 2023 20:48:33 +0000 (15:48 -0500)]
zink: fix unordered access for image descriptors

previously the unordered access flags would be set before the deferred
barrier was added, which would guarantee no descriptor barriers could
be deferred and thus terminate renderpasses any time a new descriptor
was bound that was both an image and needed a layout change

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

16 months agozink: add batch refs for framebuffer surfaces on bind and ref update
Mike Blumenkrantz [Mon, 6 Mar 2023 12:12:51 +0000 (07:12 -0500)]
zink: add batch refs for framebuffer surfaces on bind and ref update

if this scenario occurs:

* bind fb on ctx A
* draw
* flush + change context to B
* read fb on ctx B
* delete ctx A

then a dead batch write will be left on the fb bo

cc: mesa-stable

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

16 months agozink: flag some rp ends as unsafe
Mike Blumenkrantz [Mon, 20 Mar 2023 13:43:50 +0000 (09:43 -0400)]
zink: flag some rp ends as unsafe

the only "safe" rp ends are:
* set_framebuffer_state (new rp)
* flush_resource (present)
* flush (end of rp)

any other rp end needs its rp info sanitized to avoid e.g., reapplying clears

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

16 months agozink: never split a renderpass for a loadop change
Mike Blumenkrantz [Mon, 20 Mar 2023 13:41:56 +0000 (09:41 -0400)]
zink: never split a renderpass for a loadop change

not sure if this was possible, but make sure it's not

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

16 months agozink: delete unused barrier api
Mike Blumenkrantz [Fri, 3 Mar 2023 19:10:26 +0000 (14:10 -0500)]
zink: delete unused barrier api

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

16 months agozink: simplify resource_check_defer_buffer_barrier()
Mike Blumenkrantz [Fri, 3 Mar 2023 12:53:07 +0000 (07:53 -0500)]
zink: simplify resource_check_defer_buffer_barrier()

this is a remnant of when the function was used for both images
and buffers

no functional changes

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

16 months agozink: handle swapchain creation failure less lazily
Mike Blumenkrantz [Thu, 9 Mar 2023 12:51:16 +0000 (07:51 -0500)]
zink: handle swapchain creation failure less lazily

this is a real scenario

cc: mesa-stable

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

16 months agonir/lower_mediump: Fix assertion about copy_deref lowering matching.
Emma Anholt [Wed, 1 Mar 2023 19:02:28 +0000 (11:02 -0800)]
nir/lower_mediump: Fix assertion about copy_deref lowering matching.

Copy and paste typo.  We shouldn't have copy_derefs during this pass,
anyway, but caught a failure with my upcoming unit testing.

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

16 months agoglsl/lower_precision: Add actual spec quotes for "check_parameters"
Emma Anholt [Thu, 2 Mar 2023 21:14:01 +0000 (13:14 -0800)]
glsl/lower_precision: Add actual spec quotes for "check_parameters"

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

16 months agoglsl: Fix the precision of atomic counter builtin function args.
Emma Anholt [Thu, 2 Mar 2023 21:10:06 +0000 (13:10 -0800)]
glsl: Fix the precision of atomic counter builtin function args.

More special-casing dropped from GLSL lower_precision.

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

16 months agoglsl/lower_precision: Drop most special-casing of builtin arg precision.
Emma Anholt [Thu, 2 Mar 2023 21:04:14 +0000 (13:04 -0800)]
glsl/lower_precision: Drop most special-casing of builtin arg precision.

bitCount is still special in that our lowering would try to demote its arg
based on the precision of its output, and it shouldn't do that.  But the
other special cases now have appropriate qualifiers on them at the IR
level.

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

16 months agoglsl: Set the precision of function return value temporaries.
Emma Anholt [Thu, 2 Mar 2023 00:02:38 +0000 (16:02 -0800)]
glsl: Set the precision of function return value temporaries.

The signature should dictate the precision of the temp we store into.
This ends up ignored by lower_precision for now, which always rewrites it
so as to handle custom lowering of builtin precision..

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

16 months agoglsl: Handle highp promotion of builtin function args in the builtins.
Emma Anholt [Wed, 1 Mar 2023 23:04:49 +0000 (15:04 -0800)]
glsl: Handle highp promotion of builtin function args in the builtins.

It's what the spec says to do.  This will may help us avoid special-casing
these functions if we ever lower precision after builtin inlining.

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

16 months agoglsl: Set the precisions of builtin function arguments and returns.
Emma Anholt [Wed, 1 Mar 2023 23:31:21 +0000 (15:31 -0800)]
glsl: Set the precisions of builtin function arguments and returns.

These have precision qualifiers defined in the spec, in which case we
should emit them them while generating builtin signatures and code.  We've
been special-casing them in GLSL lower_precision, but now we can just rely
on the precision qualifier of the builtin if non-NONE.

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

16 months agoglsl/lower_precision: Add a cut-down testcase for #8124
Emma Anholt [Thu, 2 Mar 2023 19:46:24 +0000 (11:46 -0800)]
glsl/lower_precision: Add a cut-down testcase for #8124

This pattern is the core of the webgl conformance failure, I think.  And,
I think actually lower_precision was doing the right thing, just the
conformance test going through ANGLE was screwing up.

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

16 months agoglsl/lower_precision: Add a unit test that I thought we might fail at.
Emma Anholt [Thu, 2 Mar 2023 18:25:31 +0000 (10:25 -0800)]
glsl/lower_precision: Add a unit test that I thought we might fail at.

If you lowered precision too late, it would be easy to break this.

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

16 months agoglsl: Simplify vector constructors from scalars.
Emma Anholt [Thu, 2 Mar 2023 18:11:54 +0000 (10:11 -0800)]
glsl: Simplify vector constructors from scalars.

No need to generate a temp in this case.  Cleanup I noticed while looking
at lower_precision behavior (and I've included a testcase to sanity check
that things work out).

This causes a tiny amount of scheduling change on freedreno:

total instructions in shared programs: 11010012 -> 11010012 (0.00%)
instructions in affected programs: 147 -> 147 (0.00%)

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

16 months agoanv: Implement VK_KHR_map_memory2
Faith Ekstrand [Mon, 20 Mar 2023 22:02:45 +0000 (17:02 -0500)]
anv: Implement VK_KHR_map_memory2

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22031>

16 months agoanv: Limit memory maps to the client-allocated size
Faith Ekstrand [Mon, 20 Mar 2023 22:02:40 +0000 (17:02 -0500)]
anv: Limit memory maps to the client-allocated size

No need to expose extra padding or CCS data to the client map.  Now that
we have the data, we can also make the BindBufferMemory asserts a bit
more accurate.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22031>

16 months agovulkan: Provide wrappers for VK_EXT_map_memory2 functions
Faith Ekstrand [Mon, 20 Mar 2023 22:02:36 +0000 (17:02 -0500)]
vulkan: Provide wrappers for VK_EXT_map_memory2 functions

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22031>

16 months agovulkan: Update XML and headers to 1.3.244
Faith Ekstrand [Mon, 20 Mar 2023 22:02:31 +0000 (17:02 -0500)]
vulkan: Update XML and headers to 1.3.244

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22031>

16 months agozink: convert luminance/alpha clear colors in dynamic texture clear
Mike Blumenkrantz [Mon, 20 Mar 2023 13:00:16 +0000 (09:00 -0400)]
zink: convert luminance/alpha clear colors in dynamic texture clear

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

16 months agozink: split out luminance/alpha clear conversion code for reuse
Mike Blumenkrantz [Mon, 20 Mar 2023 12:50:29 +0000 (08:50 -0400)]
zink: split out luminance/alpha clear conversion code for reuse

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

16 months agoglx: fix memory leak related to __glXCloseDisplay()
Patrick Lerda [Mon, 13 Mar 2023 12:02:10 +0000 (13:02 +0100)]
glx: fix memory leak related to __glXCloseDisplay()

Indeed, the unbind function is not called which could lead
to an unbalanced refcount state for the "drawable" object.

For instance, with "piglit/bin/glx-fbo-binding -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22024>

16 months agoamd/common: fix a typo
Lang Yu [Sat, 18 Mar 2023 01:20:37 +0000 (09:20 +0800)]
amd/common: fix a typo

Fixes: 35f053ba8cd ("radv: Fix corrupted mipmap copies on GFX9+")

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22000>

16 months agoradv/rt: Handle load_constant instructions when inlining shaders
Konstantin Seurer [Sat, 18 Mar 2023 11:57:04 +0000 (12:57 +0100)]
radv/rt: Handle load_constant instructions when inlining shaders

Fixes the following tests:
dEQP-VK.ray_query.builtin.rayqueryterminate.ahit.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.ahit.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.call.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.call.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.chit.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.chit.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.miss.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.miss.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.rgen.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.rgen.triangles,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.sect.aabbs,Fail
dEQP-VK.ray_query.builtin.rayqueryterminate.sect.triangles,Fail

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8647
Fixes: fda262f ("radv/rt: move Ray Tracing shader creation into separate file")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22002>

16 months agozink: further eliminate zs implicit feedback loops for read-only access
Mike Blumenkrantz [Fri, 17 Mar 2023 16:22:26 +0000 (12:22 -0400)]
zink: further eliminate zs implicit feedback loops for read-only access

if all access is read-only then there is no feedback loop

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

16 months agozink: explicitly eliminate feedback loops for unused zsbufs
Mike Blumenkrantz [Fri, 17 Mar 2023 13:51:53 +0000 (09:51 -0400)]
zink: explicitly eliminate feedback loops for unused zsbufs

this avoids a GENERAL/FEEDBACK_LOOP layout transition where possible

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

16 months agozink: rename add_implicit_color_feedback_loop()
Mike Blumenkrantz [Fri, 17 Mar 2023 13:49:39 +0000 (09:49 -0400)]
zink: rename add_implicit_color_feedback_loop()

this is used for zs too

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

16 months agozink: allow zink_is_zsbuf_used() without tc / rp optimizing
Mike Blumenkrantz [Fri, 17 Mar 2023 13:47:56 +0000 (09:47 -0400)]
zink: allow zink_is_zsbuf_used() without tc / rp optimizing

this info should be up-to-date and usable now in all cases

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

16 months agozink: don't flag rp layout check on next draw when rp optimizing
Mike Blumenkrantz [Fri, 17 Mar 2023 17:00:56 +0000 (13:00 -0400)]
zink: don't flag rp layout check on next draw when rp optimizing

this will always be a no-op, so save the cpu cycles

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

16 months agozink: improve no-oping of write -> readonly zsbuf layouts
Mike Blumenkrantz [Fri, 17 Mar 2023 16:56:43 +0000 (12:56 -0400)]
zink: improve no-oping of write -> readonly zsbuf layouts

if descriptor binds exist this will have to change layouts anyway,
so allow readonly since it might be a more compatible layout

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

16 months agozink: add a fixup case for readonly zsbuf clears
Mike Blumenkrantz [Fri, 17 Mar 2023 16:55:00 +0000 (12:55 -0400)]
zink: add a fixup case for readonly zsbuf clears

this shouldn't currently be possible to hit, but in the future it may

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