platform/upstream/mesa.git
16 months agoradeonsi: don't print the base non-view texture format for AMD_TEST=computeblit
Marek Olšák [Mon, 7 Nov 2022 02:44:06 +0000 (21:44 -0500)]
radeonsi: don't print the base non-view texture format for AMD_TEST=computeblit

it's confusing in the output and it affects nothing

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

16 months agoradeonsi: add AMD_DEBUG=nowcstream to enable caching for stream_uploader
Marek Olšák [Sun, 12 Mar 2023 22:13:31 +0000 (18:13 -0400)]
radeonsi: add AMD_DEBUG=nowcstream to enable caching for stream_uploader

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

16 months agoradeonsi: rework MSAA resolve averaging to exploit instruction-level parallelism
Marek Olšák [Mon, 6 Mar 2023 18:28:42 +0000 (13:28 -0500)]
radeonsi: rework MSAA resolve averaging to exploit instruction-level parallelism

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

16 months agoradeonsi: remove duplicated gfx11 check in si_msaa_resolve_blit_via_CB
Marek Olšák [Mon, 6 Mar 2023 18:36:25 +0000 (13:36 -0500)]
radeonsi: remove duplicated gfx11 check in si_msaa_resolve_blit_via_CB

The function really does that twice. You'll find the same code a few lines
above this change.

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

16 months agoradeonsi: replace nonir,noir,noasm,preoptir options with new reworked options
Marek Olšák [Sat, 11 Mar 2023 02:55:08 +0000 (21:55 -0500)]
radeonsi: replace nonir,noir,noasm,preoptir options with new reworked options

New options depending on what you want to print:
- initnir  = initial NIR of shader CSOs
- nir      = final NIR of variants after all lowering
- initllvm = LLVM IR before optimizations
- llvm     = final LLVM IR
- asm      = asm

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

16 months agoradeonsi: dump shader stats only if dumping asm shaders
Marek Olšák [Sat, 11 Mar 2023 02:53:28 +0000 (21:53 -0500)]
radeonsi: dump shader stats only if dumping asm shaders

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

16 months agoradeonsi: remove unused TCS/TES SGPR fields
Marek Olšák [Sat, 11 Mar 2023 01:48:21 +0000 (20:48 -0500)]
radeonsi: remove unused TCS/TES SGPR fields

We stopped using them when we switched to ac_nir_lower_hs_outputs_to_mem.

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

16 months agoradv: set RADEON_SURF_NO_TEXTURE flag in radv_get_surface_flags()
Yogesh Mohan Marimuthu [Tue, 21 Feb 2023 10:26:35 +0000 (15:56 +0530)]
radv: set RADEON_SURF_NO_TEXTURE flag in radv_get_surface_flags()

In vkCreateImage() if block comrpessed format and VK_IMAGE_TILING_LINEAR is
used, then the app crashes in vega gpu.

This is because addrlib does not support BC + linear as from function
ValidateSwModeParams(). From Marek Olšák the addrlib behaviour is correct.

In pal driver, flags.texture is not set in DetermineSurfaceFlags() function
if BC + linear. pal driver does it because it is expected that the
BC + linear image is only used as transfer resource.

This patch sets RADEON_SURF_NO_TEXTURE flag if usage is not
VK_IMAGE_USAGE_SAMPLED_BIT and and VK_IMAGE_USAGE_STORAGE_BIT.
flags.texture flag is not set if RADEON_SURF_NO_TEXTURE and this fixes
the crash.

v1: set NO_TEXTURE if not SAMPLED or STORAGE (Marek Olšák)

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

16 months agoamd/surface: add RADEON_SURF_NO_TEXTURE flag
Yogesh Mohan Marimuthu [Tue, 21 Feb 2023 09:27:49 +0000 (14:57 +0530)]
amd/surface: add RADEON_SURF_NO_TEXTURE flag

Block compressed + linear format is not supported in addrlib. But these
surface can be used as transfer resource. RADEON_SURF_NO_TEXTURE flag
indicates not to set flags.texture flag in gfx9_compute_surface().

This will help to fix the vkCreateImage() crash where block
compressed + linear format image is requested.

v2: combine RADEON_SURF_NO_TEXTURE to below line (Marek Olšák)
v1: add RADEON_SURF_NO_TEXTURE flag (Marek Olšák)

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

16 months agoanv: break out of the loop when the first color attachment is found
Rohan Garg [Tue, 14 Mar 2023 10:12:06 +0000 (11:12 +0100)]
anv: break out of the loop when the first color attachment is found

Fixes: 2bd304bc ("anv: Skip the RT flush when doing depth-only rendering")
Signed-off-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/21903>

16 months agovbo: fix current attribs not updating gallium vertex elements
Marek Olšák [Thu, 9 Mar 2023 02:59:35 +0000 (21:59 -0500)]
vbo: fix current attribs not updating gallium vertex elements

An initial workaround that helped discover this was written by:
Illia Polishchuk illia.a.polishchuk@globallogic.com

Closes: #8440
Fixes: a18b9d07 ("st/mesa: optimize uploading zero-stride vertex attribs")

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

16 months agoasahi: Fix occlusion query lifetime
Alyssa Rosenzweig [Sat, 11 Mar 2023 21:19:43 +0000 (16:19 -0500)]
asahi: Fix occlusion query lifetime

Theoretical lifetime issue, now easy to hit with the batch sync changes. Fixes
memory badness.

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

16 months agoci/iris: Add skips for slow tests on APL.
Emma Anholt [Mon, 13 Mar 2023 16:58:39 +0000 (09:58 -0700)]
ci/iris: Add skips for slow tests on APL.

These get reported as flakes for timing out before passing when the shader
cache is hot.

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

16 months agoci/turnip: Extend a630 vk full timeout to 3 hours.
Emma Anholt [Wed, 8 Mar 2023 19:42:05 +0000 (11:42 -0800)]
ci/turnip: Extend a630 vk full timeout to 3 hours.

With the CTS coverage and tu featureset extending, these jobs have been
reliably timing out for a while.  I've updated the xfails based on a
single run, we'll see how that goes in the upcoming nightlies.

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

16 months agoci/zink: Update TGL xfails/flakes based on the last nightly pipelines.
Emma Anholt [Wed, 8 Mar 2023 19:37:15 +0000 (11:37 -0800)]
ci/zink: Update TGL xfails/flakes based on the last nightly pipelines.

The 2f8073f87cb95c21db1f6c39d95ffd4d021c93e3 fix changed some results, qbo
changed a week or so ago, and spec@ext_texture_array@compressed
texsubimage pbo has been crashing for a long time.

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

16 months agoradeonsi: fix memory leak related to ureg_get_tokens()
Patrick Lerda [Wed, 8 Mar 2023 16:20:22 +0000 (17:20 +0100)]
radeonsi: fix memory leak related to ureg_get_tokens()

Indeed, ureg_get_tokens() returns an allocated string that should be
freed using ureg_free_tokens().

For instance, with "piglit/bin/arb_shader_image_load_store-invalid -auto -fbo"
Direct leak of 768 byte(s) in 2 object(s) allocated from:
    #0 0x7fa819a78b48 in __interceptor_realloc (/usr/lib64/libasan.so.6+0xb1b48)
    #1 0x7fa80e189e04 in tokens_expand ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:239
    #2 0x7fa80e189e04 in get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:262
    #3 0x7fa80e191f6e in copy_instructions ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2079
    #4 0x7fa80e191f6e in ureg_finalize ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2129
    #5 0x7fa80e19447b in ureg_get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2206
    #6 0x7fa80ec68b91 in si_create_fmask_expand_cs ../src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c:564

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21871>

16 months agoradv/trace: don't attempt to emit trace on non-graphics/compute queues
Dave Airlie [Tue, 14 Mar 2023 04:12:49 +0000 (14:12 +1000)]
radv/trace: don't attempt to emit trace on non-graphics/compute queues

This will just break on video queues

Fixes: 9477f117f4d4 ("radv/video: add initial frameworking.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671>

16 months agoradv/video: fix h265 decoding sizes.
Dave Airlie [Thu, 9 Mar 2023 05:06:05 +0000 (15:06 +1000)]
radv/video: fix h265 decoding sizes.

Fixes the misrendering/hangs on hevc content.

Fixes: 6c3c242361da778 ("radv/video: add h265 decode UVD support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671>

16 months agoradv/video: fix used for reference flags.
Dave Airlie [Fri, 3 Mar 2023 04:26:05 +0000 (14:26 +1000)]
radv/video: fix used for reference flags.

These weren't getting programmed properly for interlaced videos

Fixes: 3e2c768aa860 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671>

16 months agoradv/video: fix h264 frame heights when field images are in use
Dave Airlie [Fri, 3 Mar 2023 02:57:16 +0000 (12:57 +1000)]
radv/video: fix h264 frame heights when field images are in use

This was breaking MBAFF decoding.

Fixes: 8a29291dbe6c ("radv/video: add h264 support for uvd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671>

16 months agoci: Update trace expectations for GLSL constant prop removal.
Emma Anholt [Tue, 7 Mar 2023 17:10:18 +0000 (09:10 -0800)]
ci: Update trace expectations for GLSL constant prop removal.

Somewhere along the way there were minor pixel value changes.

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

16 months agoglsl: Delete constant-variables pass.
Emma Anholt [Fri, 3 Mar 2023 00:02:17 +0000 (16:02 -0800)]
glsl: Delete constant-variables pass.

Now that we don't do GLSL IR constant propagation or constant folding, we
can leave constant variable detection and handling to NIR.  This also
avoids some OOB array access in GLSL IR in a piglit test!

Freedreno stats again look like noise:

total instructions in shared programs: 2718412 -> 2718746 (0.01%)
instructions in affected programs: 80497 -> 80831 (0.41%)
total last-baryf in shared programs: 110015 -> 110510 (0.45%)
last-baryf in affected programs: 35263 -> 35758 (1.40%)
total full in shared programs: 189486 -> 189480 (<.01%)
full in affected programs: 52 -> 46 (-11.54%)
total constlen in shared programs: 494540 -> 494496 (<.01%)
constlen in affected programs: 452 -> 408 (-9.73%)
total sstall in shared programs: 198297 -> 197928 (-0.19%)
sstall in affected programs: 3691 -> 3322 (-10.00%)
total systall in shared programs: 432150 -> 431799 (-0.08%)
systall in affected programs: 6070 -> 5719 (-5.78%)
total waves in shared programs: 435098 -> 435110 (<.01%)
waves in affected programs: 92 -> 104 (13.04%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>

16 months agoglsl: Delete constant folding pass.
Emma Anholt [Thu, 2 Mar 2023 23:44:38 +0000 (15:44 -0800)]
glsl: Delete constant folding pass.

NIR is happy to take care of constant folding for us, and it's easier to
do in SSA.

This required adjusting of lower_precision unit tests to have un-folded
constants.

freedreno results look like noise.  Some excerpts:

total instructions in shared programs: 2718343 -> 2718412 (<.01%)
instructions in affected programs: 6847 -> 6916 (1.01%)
total last-baryf in shared programs: 109992 -> 110015 (0.02%)
last-baryf in affected programs: 117 -> 140 (19.66%)
total sstall in shared programs: 198312 -> 198297 (<.01%)
sstall in affected programs: 148 -> 133 (-10.14%)
total systall in shared programs: 432163 -> 432150 (<.01%)
systall in affected programs: 1016 -> 1003 (-1.28%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>

16 months agoglsl: Delete constant propagation pass.
Emma Anholt [Thu, 2 Mar 2023 23:40:20 +0000 (15:40 -0800)]
glsl: Delete constant propagation pass.

freedreno results look like noise.  Excerpts:

total instructions in shared programs: 2718355 -> 2718343 (<.01%)
instructions in affected programs: 2001 -> 1989 (-0.60%)
total last-baryf in shared programs: 109960 -> 109992 (0.03%)
last-baryf in affected programs: 789 -> 821 (4.06%)
total sstall in shared programs: 198273 -> 198312 (0.02%)
sstall in affected programs: 140 -> 179 (27.86%)
total systall in shared programs: 432224 -> 432163 (-0.01%)
systall in affected programs: 241 -> 180 (-25.31%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>

16 months agoglsl_to_nir: Use a variable's constant_value if it wasn't const-propped out.
Emma Anholt [Tue, 7 Mar 2023 00:26:14 +0000 (16:26 -0800)]
glsl_to_nir: Use a variable's constant_value if it wasn't const-propped out.

glsl has been constant-propagating out references to ir->constant_value
(the value of a variable declared as const), but we can get rid of that
whole pass if we just have glsl-to-nir hand the constant propagating
problem off to NIR.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>

16 months agoglsl/nir: Include early glsl-to-nir output in NIR_DEBUG=print.
Emma Anholt [Tue, 7 Mar 2023 00:15:16 +0000 (16:15 -0800)]
glsl/nir: Include early glsl-to-nir output in NIR_DEBUG=print.

These passes were missing the macros to handle debug output and extra
validation.  But also, for working on GLSL, it's nice to see the raw
output of glsl-to-nir before you move on.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>

16 months agoiris: Move iris_bufmgr_init_global_vm() to i915/iris_bufmgr.c and prepare for Xe KMD
José Roberto de Souza [Tue, 1 Nov 2022 15:31:16 +0000 (08:31 -0700)]
iris: Move iris_bufmgr_init_global_vm() to i915/iris_bufmgr.c and prepare for Xe KMD

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

16 months agoiris: Drop usage of i915 EXEC_OBJECT_WRITE
José Roberto de Souza [Wed, 7 Dec 2022 20:30:45 +0000 (12:30 -0800)]
iris: Drop usage of i915 EXEC_OBJECT_WRITE

The whole usage of this flag is to call iris_use_pinned_bo() with
writable argument, for that we don't need any i915_drm.h specific type.
IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE could have any other value but
keeping the same as i915_drm.h.

With this we can drop 2 i915_drm.h imports from generic Iris code.

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

16 months agoiris: Drop I915_EXEC_FENCE types
José Roberto de Souza [Wed, 7 Dec 2022 20:11:03 +0000 (12:11 -0800)]
iris: Drop I915_EXEC_FENCE types

Those are i915_drm.h specific types and should not be in code paths
shared by i915 and Xe KMD.

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

16 months agoglthread: align small buffer uploads to 4 bytes
Mike Blumenkrantz [Mon, 13 Mar 2023 15:29:08 +0000 (11:29 -0400)]
glthread: align small buffer uploads to 4 bytes

some apps (e.g., supertuxkart) use a ton of 4 byte subdata calls, and
this halves their memory consumption

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

16 months agoanv: remove GetBufferMemoryRequirements2()
Mohamed Ahmed [Tue, 14 Mar 2023 12:13:54 +0000 (14:13 +0200)]
anv: remove GetBufferMemoryRequirements2()

Signed-off-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21898>

16 months agovulkan/runtime: implement vkGetBufferMemoryRequirements2()
Mohamed Ahmed [Tue, 14 Mar 2023 12:12:16 +0000 (14:12 +0200)]
vulkan/runtime: implement vkGetBufferMemoryRequirements2()

Signed-off-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21898>

16 months agovulkan/runtime: move common buffer related entrypoints to vk_buffer.c
Mohamed Ahmed [Tue, 14 Mar 2023 11:57:40 +0000 (13:57 +0200)]
vulkan/runtime: move common buffer related entrypoints to vk_buffer.c

Signed-off-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21898>

16 months agoci: Allow to use crosvm-runner before deqp-runner
Corentin Noël [Fri, 3 Mar 2023 13:20:19 +0000 (14:20 +0100)]
ci: Allow to use crosvm-runner before deqp-runner

Since the addition of unified sections, many scripts need to be aware of the content
of the setup-test-env.sh file. The use of bash is also mandatory to have exports of
function declarations.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21900>

16 months agoci: Setup XDG_RUNTIME_DIR in crosvm-init
Corentin Noël [Tue, 14 Mar 2023 14:55:13 +0000 (15:55 +0100)]
ci: Setup XDG_RUNTIME_DIR in crosvm-init

This environment variable has to be set to use the wayland platform.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21900>

16 months agopanfrost: Note glDrawRangeElements underflow
Alyssa Rosenzweig [Tue, 14 Mar 2023 18:11:33 +0000 (14:11 -0400)]
panfrost: Note glDrawRangeElements underflow

Hopefully this helps someone wiring up robustness later on.

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

16 months agopanfrost/ci: Remove fbo-mrt-new-bind fail+flake
Alyssa Rosenzweig [Tue, 14 Mar 2023 03:15:35 +0000 (23:15 -0400)]
panfrost/ci: Remove fbo-mrt-new-bind fail+flake

Seems to pass reliably now.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost/ci: Add some Piglit skips
Alyssa Rosenzweig [Tue, 14 Mar 2023 00:48:53 +0000 (20:48 -0400)]
panfrost/ci: Add some Piglit skips

Skip heavyweight crashing tests that have the potential to take down not just
themselves but also other Piglit tests running concurrently via piglit-runner
(which would otherwise become piglit-runner level flakes).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost/ci: Identify some Piglit flakes
Alyssa Rosenzweig [Tue, 14 Mar 2023 00:48:47 +0000 (20:48 -0400)]
panfrost/ci: Identify some Piglit flakes

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost/ci: Skip draw_buffers_indexed.random.* on Midgard
Alyssa Rosenzweig [Tue, 14 Mar 2023 01:28:21 +0000 (21:28 -0400)]
panfrost/ci: Skip draw_buffers_indexed.random.* on Midgard

These are (have always been) quite broken. Given that the whole section is
already in the flakes.txt, and there's no plan for improving this (I've tried
and fails), I'd rather just skip the section and reduce the noise in
the #panfrost-ci channel.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost: Handle null textures robustly
Alyssa Rosenzweig [Tue, 14 Mar 2023 02:58:56 +0000 (22:58 -0400)]
panfrost: Handle null textures robustly

This is really dumb.

But this fixes arb_shader_language_420pack-active-sampler-conflict on v7 which
otherwise dereferences a null pointer trying to access the nonexistant texture
arrays, or DATA_INVALID_FAULTs if you give it a texture array filled with
zeroes. But it seems happy if you bind in null textures. This is dumb but less
faults in Piglit is good for reducing flakes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost: Defeature 24-bit textures
Alyssa Rosenzweig [Tue, 14 Mar 2023 02:15:36 +0000 (22:15 -0400)]
panfrost: Defeature 24-bit textures

mesa/st doesn't like to use 24-bit textures, preferring RGBX over true RGB even
for texture views where this isn't valid. Given how silly true RGB is in
practice, I'd rather drop support and fix texture views than go against the
grain and risk more issues down the line since nobody else in tree is testing
these paths and apps really shouldn't be caring.

Fixes page faults in arb_texture_view-rendering-formats_gles3 which tries to
sample an R8G8B8_UINT texture with a R8G8B8X8_UNORM view in one subcase. That
test is now passing reliably.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost: Assert that we don't see unsupported vertex formats
Alyssa Rosenzweig [Tue, 14 Mar 2023 02:12:46 +0000 (22:12 -0400)]
panfrost: Assert that we don't see unsupported vertex formats

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopanfrost: Identify "Base vertex offset" signedness
Alyssa Rosenzweig [Tue, 14 Mar 2023 01:22:20 +0000 (21:22 -0400)]
panfrost: Identify "Base vertex offset" signedness

This is signed, not unsigned. We were already passing negatives and silently
relying on 2's complement and C to do the right thing. But that's silly. We
should just, actually do the right thing.

Found while struggling to debug primitive-restart-draw-mode.

v2: Update the other architectures too, including a decode_csf.c change for the
v10 incarnation of this v4-era field.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net> [v1]
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agopan/bi: Ignore signedness in vertex fetch
Alyssa Rosenzweig [Tue, 14 Mar 2023 02:31:28 +0000 (22:31 -0400)]
pan/bi: Ignore signedness in vertex fetch

We just want a bit-exact transfer for integers. Using .auto32 accomplishes this
without any clamping shenanigans. Fixes gl-3.0-vertexattribipointer.

Note we can't use .auto32 unconditionally, since reading a uint vertex as float
is supposed to convert (or something like that, gl-2.0-vertexattribpointer tests
the bad case at any rate).

Fixes: 482cc273af5 ("pan/bi: Implement load attribute with the builder")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agoutil/prim_convert: Don't set index_bounds_valid
Alyssa Rosenzweig [Tue, 14 Mar 2023 03:16:43 +0000 (23:16 -0400)]
util/prim_convert: Don't set index_bounds_valid

draw->index_bounds_valid tells drivers that the values of min_index/max_index
are set correctly and can be used e.g. to allocate memory for varyings. If set
incorrectly, the GL promises badness.

But, with primconvert, we go mucking with index buffers and then never update
the bounds. So it doesn't matter if the original index bounds were valid, we
can't promise the original bounds are *still* valid. If we were trying to
optimize CPU overhead, we could try to preserve the new min/max index but seeing
as only older Mali cares about this flag, and if you're using primconvert you're
already screwed, I'm not too inclined to go rework primconvert.

Fixes* page faults in primitive-restart-draw-mode on Mali-G52 for GL_QUAD_STRIPS
and GL_POLYGON, which hit the primconvert path. The full dmesg splat looks like:

[ 5438.811727] panfrost ffe40000.gpu: Unhandled Page fault in AS0 at VA 0x000000100A16BAC0
             Reason: TODO
             raw fault status: 0x25002C1
             decoded fault status: SLAVE FAULT
             exception type 0xC1: TRANSLATION_FAULT_1
             access type 0x2: READ
             source id 0x250

Notice that a high bit is randomly set in the address, this is trying to read
a varying from the actual varying buffer in the vicinity of 0xa16bac0. What's
actually happening is that we're trying to read index #0 despite promising the
driver a minimum index of 2, causing an integer underflow as we try to read
index -2, or as the hardware sees, 4294967294.

As long as we stop lying to panfrost about the bounds being correct, panfrost is
able to calculate the real (post-primconverted) bounds on its own, fixing the
test.

* Alternatively, maybe Panfrost should just ignore this bit, in which I don't
  know why we have it in Gallium, since it's probably not conformant to fault on
  out-of-range glDrawRangeElements.

Fixes: 72ff53098c6 ("gallium: add pipe_draw_info::index_bounds_valid")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>

16 months agozink: fix copy box iteration
Mike Blumenkrantz [Tue, 14 Mar 2023 17:32:49 +0000 (13:32 -0400)]
zink: fix copy box iteration

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

16 months agotu: don't set startup debug on debug builds
Mike Blumenkrantz [Thu, 9 Mar 2023 12:07:32 +0000 (07:07 -0500)]
tu: don't set startup debug on debug builds

this is incredibly annoying on normal linux systems

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

16 months agopvr: Fix segfaults when pDepthStencilAttachment is NULL
Jarred Davies [Tue, 31 Jan 2023 19:24:30 +0000 (19:24 +0000)]
pvr: Fix segfaults when pDepthStencilAttachment is NULL

depth_stencil_attachment has been changed from a pointer to the attachment idx
to just the attachment idx, as this avoids the driver having to check for NULL
when comparing attachments indexes with depth_stencil_attachment.

Anyplace that relies on depth_stencil_attachment being a valid index must
already check that depth_stencil_attachment is not VK_ATTACHMENT_UNUSED, so
this change avoids having to check both the pointer and the index for the same
information.

Noticed when running 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/21690>

16 months agoci: group RESULT logic in a single place
Eric Engestrom [Mon, 6 Mar 2023 16:16:12 +0000 (16:16 +0000)]
ci: group RESULT logic in a single place

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

16 months agoci/rustfmt: print which files are checked
Eric Engestrom [Mon, 13 Mar 2023 19:32:29 +0000 (19:32 +0000)]
ci/rustfmt: print which files are checked

And how long that took, in case it ever becomes a problem.

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

16 months agoci/rustfmt: simplify getting all the rust files
Eric Engestrom [Mon, 13 Mar 2023 19:32:29 +0000 (19:32 +0000)]
ci/rustfmt: simplify getting all the rust files

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

16 months agoci: drop redundant .no_scheduled_pipelines-rules + .core-rules since the latter alrea...
Eric Engestrom [Mon, 13 Mar 2023 19:31:36 +0000 (19:31 +0000)]
ci: drop redundant .no_scheduled_pipelines-rules + .core-rules since the latter already includes it

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

16 months agoci/broadcom: move rare failure to the flakes
Eric Engestrom [Tue, 14 Mar 2023 14:38:09 +0000 (14:38 +0000)]
ci/broadcom: move rare failure to the flakes

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

16 months agovenus: make external fence and semaphore export async
Yiwei Zhang [Wed, 8 Mar 2023 03:49:31 +0000 (19:49 -0800)]
venus: make external fence and semaphore export async

This also makes vn_QueueSignalReleaseImageANDROID async since it makes
use of a queue submit followed by an external fence export internally.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agovenus: refactor to add vn_sync_payload_external
Yiwei Zhang [Wed, 8 Mar 2023 01:53:28 +0000 (17:53 -0800)]
venus: refactor to add vn_sync_payload_external

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agovenus: make common wsi bo submission async
Yiwei Zhang [Sun, 5 Mar 2023 05:24:34 +0000 (21:24 -0800)]
venus: make common wsi bo submission async

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agovenus: let vn_instance_submit_command track ring seqno
Yiwei Zhang [Fri, 3 Mar 2023 01:13:55 +0000 (17:13 -0800)]
venus: let vn_instance_submit_command track ring seqno

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agovenus: make vn_instance_wait_roundtrip asynchronous
Yiwei Zhang [Fri, 3 Mar 2023 07:33:00 +0000 (23:33 -0800)]
venus: make vn_instance_wait_roundtrip asynchronous

vn_instance_roundtrip does 2 things:
1. vn_instance_submit_roundtrip
   - before: encode a cmd to write vq seqno to ring extra field
   - after: encode a cmd to update vq seqno against a ring
   - submit the encoded cmd via vq
2. vn_instance_wait_roundtrip
   - before: wait until ring extra field has the vq seqno
   - after: let renderer ring thread wait for the vq seqno

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agovenus: switch to use 64bit roundtrip seqno
Yiwei Zhang [Mon, 13 Mar 2023 03:24:55 +0000 (20:24 -0700)]
venus: switch to use 64bit roundtrip seqno

This is to prepare for later async roundtrip waiting while seamlessly
compatible with legacy way.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agovenus: sync to latest protocol for asyncRoundtrip
Yiwei Zhang [Wed, 8 Mar 2023 08:19:35 +0000 (00:19 -0800)]
venus: sync to latest protocol for asyncRoundtrip

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21716>

16 months agoci/valve-farm-rules: allow running jobs from outside the mesa namespace
Martin Roukala (né Peres) [Tue, 14 Mar 2023 09:36:15 +0000 (11:36 +0200)]
ci/valve-farm-rules: allow running jobs from outside the mesa namespace

This has been requested as it breaks the stress and uprev tools, so
the requirement was dropped in the Valve farms. This commit mirrors
the change in Mesa.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21872>

16 months agoci: bring back the valve farm online
Martin Roukala (né Peres) [Mon, 13 Mar 2023 12:36:06 +0000 (14:36 +0200)]
ci: bring back the valve farm online

All the farms have been updated, and the `out of files` error has been
fixed, and I also believe that the vast majority of the
`file could not be opened successfully` should also be fixed with this
update.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21872>

16 months agoci/b2c: move away from the hand-rolled initscript
Martin Roukala (né Peres) [Tue, 14 Mar 2023 07:51:20 +0000 (09:51 +0200)]
ci/b2c: move away from the hand-rolled initscript

Up until now, we have been handrolling part of the init-stage2.sh in
the b2c command line. Let's stop doing that and instead use the same
script as every other HW farms.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21872>

16 months agoci/init-stage2: always set XDG_RUNTIME_DIR
Martin Roukala (né Peres) [Tue, 14 Mar 2023 08:48:41 +0000 (10:48 +0200)]
ci/init-stage2: always set XDG_RUNTIME_DIR

This seems to be needed now that we compile mesa with wayland support.

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

16 months agoci/init-stage2: allow sourcing the job env vars from the CWD
Martin Roukala (né Peres) [Tue, 14 Mar 2023 08:17:48 +0000 (10:17 +0200)]
ci/init-stage2: allow sourcing the job env vars from the CWD

This will make it easier for the b2c jobs to use this script, as I
don't think I should extract the job folder to /.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21872>

16 months agozink: rename shadow key to zs swizzle
SoroushIMG [Mon, 27 Feb 2023 13:23:59 +0000 (13:23 +0000)]
zink: rename shadow key to zs swizzle

No functional change.

The shadow shader swizzle pass has been extended to optionally
include all z/s textures.
Rename the structs/variables to reflect this now.

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

16 months agozink: workaround undefined swizzle 1 for z/s textures
SoroushIMG [Sat, 25 Feb 2023 22:24:00 +0000 (22:24 +0000)]
zink: workaround undefined swizzle 1 for z/s textures

using swizzle 1 with z/s textures returns undefined data
on some Imagination hardware.
Work around this by using the same shader swizzling used for
shadow samplers.

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

16 months agozink: add depth/stencil needs shader swizzle workaround field
SoroushIMG [Fri, 24 Feb 2023 10:04:39 +0000 (10:04 +0000)]
zink: add depth/stencil needs shader swizzle workaround field

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

16 months agozink: extend shadow swizzle pass to all zs textures
SoroushIMG [Sun, 26 Feb 2023 17:48:53 +0000 (17:48 +0000)]
zink: extend shadow swizzle pass to all zs textures

if needs_zs_shader_swizzle is used, apply constant swizzles to all
depth/stencil textures and not just shadow samplers.

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

16 months agozink: add needs_zs_shader_swizzle shader key
SoroushIMG [Fri, 24 Feb 2023 13:55:12 +0000 (13:55 +0000)]
zink: add needs_zs_shader_swizzle shader key

This will be used later, but for now it should always be disabled.

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

16 months agozink: minor formatting change
SoroushIMG [Tue, 28 Feb 2023 10:09:46 +0000 (10:09 +0000)]
zink: minor formatting change

that line was becoming too long.

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

16 months agozink: track shadow swizzle for all shader stages
SoroushIMG [Sat, 25 Feb 2023 22:27:30 +0000 (22:27 +0000)]
zink: track shadow swizzle for all shader stages

this will be used later on to enable the pass in all
shader stages.

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

16 months agozink: fix shadow mask change logic when binding sampler views
SoroushIMG [Sat, 25 Feb 2023 22:19:49 +0000 (22:19 +0000)]
zink: fix shadow mask change logic when binding sampler views

First make sure shadow mask change sets dirty state.
Second move shadow mask bit removal to unbind_samplerview which
is cleaner and correctly clears the shadow bit when binding buffer texture.

Fixes: 5193f4f712b ("zink: add a fs shader key member to indicate depth texturing mode")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21571>

16 months agozink: fix stale point sprite mode state
SoroushIMG [Fri, 10 Mar 2023 16:24:46 +0000 (16:24 +0000)]
zink: fix stale point sprite mode state

Fixes: cf8ca77be10 ("zink: handle point sprite")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21840>

16 months agozink: super reorder buffer copies
Mike Blumenkrantz [Mon, 27 Feb 2023 22:56:09 +0000 (17:56 -0500)]
zink: super reorder buffer copies

usually zink_get_cmdbuf() is enough for reordering operations, but
with new technology, it becomes possible to promote even the most stubborn
buffers to the unordered cmdbuf

first, check the src buffer to ensure that there's no pending writes in
the main cmdbuf that would prohibit reordering

second, apply a TRANSFER_DST to the dst buffer using the util function
to determine whether it can be reordered

if both the src and dst can be reordered for their respective regions
and read/write usage, then the entire op can be promoted regardless of
the unordered_read/unordered_write flags

this optimizes out patterns like
upload index buffer (offset=0)
draw
upload index buffer (offset=128)
draw
upload index buffer (offset=256)
draw
...

so that the uploads and draws can be separated and batched

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

16 months agozink: rename zink_check_transfer_dst_barrier()
Mike Blumenkrantz [Thu, 9 Mar 2023 12:11:07 +0000 (07:11 -0500)]
zink: rename zink_check_transfer_dst_barrier()

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

16 months agozink: unify image TRANSFER_DST barrier checks
Mike Blumenkrantz [Tue, 28 Feb 2023 18:19:36 +0000 (13:19 -0500)]
zink: unify image TRANSFER_DST barrier checks

this should be consistent with buffers

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

16 months agozink: return the unordered state from zink_resource_buffer_transfer_dst_barrier()
Mike Blumenkrantz [Mon, 27 Feb 2023 22:52:16 +0000 (17:52 -0500)]
zink: return the unordered state from zink_resource_buffer_transfer_dst_barrier()

convenience usage

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

16 months agozink: rework zink_resource::valid_buffer_range
Mike Blumenkrantz [Tue, 28 Feb 2023 00:39:48 +0000 (19:39 -0500)]
zink: rework zink_resource::valid_buffer_range

this is now the valid buffer region for the "main" command buffer,
and all transfer ops store their regions in the copy boxes

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

16 months agoci: fix LVP_POISON_MEMORY usage
Mike Blumenkrantz [Fri, 10 Mar 2023 19:20:10 +0000 (14:20 -0500)]
ci: fix LVP_POISON_MEMORY usage

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

16 months agolavapipe: beef up LVP_POISON_MEMORY
Mike Blumenkrantz [Thu, 9 Mar 2023 15:29:42 +0000 (10:29 -0500)]
lavapipe: beef up LVP_POISON_MEMORY

this makes lavapipe behave more like a tiler and completely annihilate
any existing data for DONTCARE load/store ops

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

16 months agovulkan/wsi: add a headless swapchain implementation/option
Lionel Landwerlin [Mon, 3 Aug 2020 10:05:09 +0000 (13:05 +0300)]
vulkan/wsi: add a headless swapchain implementation/option

I wanted to find slow pieces of code in our Anv driver using our
drm-shim stub.

The last bit of code still talking to the compositor was the WSI
swapchain code and failing because none of the submissions are taking
place (because of the stub).

This change introduces a new variable MESA_VK_WSI_HEADLESS_SWAPCHAIN
which when set turns every swapchain creation into a headless
swapchain. This swapchain does not present anything, allowing the
application to spin as many frames as possible. Thus helping to
identify slow spots in command buffer building path.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6156>

16 months agoanv: fix image height for field pictures.
Dave Airlie [Thu, 9 Mar 2023 05:23:04 +0000 (15:23 +1000)]
anv: fix image height for field pictures.

Fixes: 98c58a16ef1ab2 ("anv: add initial video decode support for h264.)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21807>

16 months agointel/fs: fix subgroup invocation read bounds checking
Lionel Landwerlin [Fri, 10 Mar 2023 20:57:36 +0000 (22:57 +0200)]
intel/fs: fix subgroup invocation read bounds checking

nir->info.subgroup_size can be set to an enum :
  SUBGROUP_SIZE_VARYING = 0
  SUBGROUP_SIZE_UNIFORM = 1
  SUBGROUP_SIZE_API_CONSTANT = 2
  SUBGROUP_SIZE_FULL_SUBGROUPS = 3

So compute the API subgroup size value and compare it to the dispatch
size to determine whether we need some bound checking.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ac192d79d ("intel/fs: bound subgroup invocation read to dispatch size")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21856>

16 months agoradv/rt: Fix any_hit scratch variables.
Daniel Schürmann [Mon, 13 Mar 2023 15:59:16 +0000 (16:59 +0100)]
radv/rt: Fix any_hit scratch variables.

We have to make sure not to change call_data locations as well.

Fixes: 481f78ab93e2f2169c53a7c8494b488d45b60def ('radv/rt: place any-hit scratch vars after intersection scratch vars')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21876>

16 months agoci: Re-enable some swrast testing using fd.o's shared runners for now.
Emma Anholt [Mon, 13 Mar 2023 17:59:25 +0000 (10:59 -0700)]
ci: Re-enable some swrast testing using fd.o's shared runners for now.

I'm not planning to stand mesa-swrast back up until we get Kata set up, so
turn the testing back on at a reduced fraction on so that
venus/llvmpipe/etc. dev can still get some coverage.

I haven't turned lavapipe back on, because it is now unstable in memory
model / atomics tests.

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

16 months agointel/fs: prevent large vector ops generated by peephole_ffma
Lionel Landwerlin [Thu, 9 Mar 2023 10:12:54 +0000 (12:12 +0200)]
intel/fs: prevent large vector ops generated by peephole_ffma

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21782>

16 months agointel/fs: add MOV source count validation
Lionel Landwerlin [Tue, 7 Mar 2023 16:02:03 +0000 (18:02 +0200)]
intel/fs: add MOV source count validation

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

16 months agointel/fs: fixup sources number from opt_algebraic
Lionel Landwerlin [Tue, 7 Mar 2023 15:54:16 +0000 (17:54 +0200)]
intel/fs: fixup sources number from opt_algebraic

Fixes issues with register_coalesce :

fossilize-replay: brw_fs_register_coalesce.cpp:297: bool fs_visitor::register_coalesce(): Assertion `mov[i]->sources == 1' failed.

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

16 months agointel/fs: fix nir_opt_peephole_ffma max vec assumption
Lionel Landwerlin [Tue, 7 Mar 2023 11:08:36 +0000 (13:08 +0200)]
intel/fs: fix nir_opt_peephole_ffma max vec assumption

There can be larger vec than vec4.

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

16 months agointel/fs: don't SEND messages as partial writes
Lionel Landwerlin [Fri, 10 Mar 2023 14:11:56 +0000 (16:11 +0200)]
intel/fs: don't SEND messages as partial writes

For instance, to load uniform data with the LSC we usually rely on
tranpose messages which have to execute in SIMD1. Those end up being
considered as partial writes so within loops their life span spread to
the whole loop, increasing register pressure.

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

16 months agoanv: more formats for acceleration structure vertices
Lionel Landwerlin [Thu, 9 Mar 2023 15:34:17 +0000 (17:34 +0200)]
anv: more formats for acceleration structure vertices

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21821>

16 months agoanv/video: disable picture id reampping.
Dave Airlie [Mon, 20 Feb 2023 19:59:41 +0000 (05:59 +1000)]
anv/video: disable picture id reampping.

This isn't needed at the hw level with vulkan

Fixes: 98c58a16ef1a ("anv: add initial video decode support for h264.")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21433>

16 months agoanv/video: fix chroma qp to be a integer value.
Dave Airlie [Mon, 20 Feb 2023 03:38:45 +0000 (13:38 +1000)]
anv/video: fix chroma qp to be a integer value.

This is just a cleanup to the genxml

Fixes: 98c58a16ef1a ("anv: add initial video decode support for h264.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21433>

16 months agolavapipe: add command debugging
Mike Blumenkrantz [Fri, 15 Jul 2022 14:23:15 +0000 (10:23 -0400)]
lavapipe: add command debugging

I keep adding this in locally. it's great for debugging

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

16 months agolavapipe: set render_condition_enabled=false for vkCmdClearDepthStencilImage
Mike Blumenkrantz [Thu, 9 Mar 2023 14:32:34 +0000 (09:32 -0500)]
lavapipe: set render_condition_enabled=false for vkCmdClearDepthStencilImage

this command ignores conditional rendering

fixes:
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_host_memory_expect_noop
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_host_memory_secondary_buffer_expect_noop
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_host_memory_secondary_buffer_expect_noop_inverted
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_host_memory_secondary_buffer_inherited_expect_noop
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_local_memory_expect_noop_inverted
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_local_memory_secondary_buffer_expect_noop
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_local_memory_secondary_buffer_expect_noop_inverted
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_local_memory_secondary_buffer_inherited_expect_noop

Fixes: fe53c222949 ("lavapipe: fix only clearing depth or stencil paths.")

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

16 months agolavapipe: fix dynamic depth clamping
Mike Blumenkrantz [Thu, 9 Mar 2023 13:53:43 +0000 (08:53 -0500)]
lavapipe: fix dynamic depth clamping

on pipeline bind with dynamic state, depth_clip_near needs to either be set by
* applying the dynamic state
* using the pipeline state

the previous code always used the pipeline state

fixes:
dEQP-VK.pipeline.*.extended_dynamic_state.between_pipelines.depth_clamp_enable

Fixes: 650880105e6 ("vulkan,lavapipe: Use a tri-state enum for depth clip enable")

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

16 months agoci: uprev virglrenderer and crosvm
Corentin Noël [Wed, 8 Mar 2023 16:15:46 +0000 (17:15 +0100)]
ci: uprev virglrenderer and crosvm

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

16 months agodocs: update Anv features support
Lionel Landwerlin [Mon, 13 Mar 2023 11:59:07 +0000 (13:59 +0200)]
docs: update Anv features support

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21870>