Commit Graph

153654 Commits

Author SHA1 Message Date
Emma Anholt 214c774ba6 mesa/st: Remove st_glsl_to_tgsi.
It is no longer called, and can be retired.

Fixes: #1924, #822, #6073

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
2022-05-05 22:25:03 +00:00
Eric Anholt b167203cfe mesa/st: Always generate NIR from GLSL, and use nir_to_tgsi for TGSI drivers.
The NIR path through the frontend is effectively the only one maintained
for a quite a while now.  We can see that effect with !15540, where the
TGSI generation path was regressed to assertion fail on real-world
shaders, and nobody noticed until I came along trying to test the
NIR-to-TGSI transition.

We already have a nir_to_tgsi() call for translating NIR representation
for ARB programs into TGSI before handing them off to the driver.  This
change makes that path get taken for GLSL programs as well.

This is the minimum change to get all the drivers on NIR from GLSL, to
give a simple commit to bisect too.  The dead code removal comes next.

Now every driver benefits from shared NIR optimizations for GLSL, and we
can start retiring GLSL optimizations.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
2022-05-05 22:25:03 +00:00
Emma Anholt 72dba615be ci/iris: Add a bunch of APL and KBL flakes recently.
I got hit by one of them trying to merge !8044.  Just update the list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044>
2022-05-05 22:25:03 +00:00
Mike Blumenkrantz 49b8f72e3d kopper: pass the current context to dri_flush
passing the drawable's context leads to desync and crashing if the app
is using multiple threads and multiple contexts

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16351>
2022-05-05 20:42:41 +00:00
Mike Blumenkrantz 3de78fb3c8 kopper: invalidate drawables when resizing textures in place
this guarantees that swapchains shared between contexts will stay
in sync

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16351>
2022-05-05 20:42:41 +00:00
Rhys Perry 2f0bb39e16 aco: ensure that definitions fixed to operands have matching regclasses
If the operand is not killed, the definition needs to be large enough so
that the new location for the operand does not intersect with the old
location.

Fixes with zink:
KHR-GL45.shader_image_load_store.basic-allTargets-atomicCS
KHR-GL45.shader_image_load_store.basic-allTargets-atomicGS
KHR-GL45.shader_image_load_store.basic-allTargets-atomicVS

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6276
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16106>
2022-05-05 19:56:48 +01:00
Emma Anholt 3c0e4be89b ci/iris: Demote APL deqp to manual-only for now.
it's been flaking with "2022-05-05 16:29:49.055151: [0m[31mERROR - Failure
getting run results: parsing results: Reading from dEQP: timed out waiting
for fd to be ready (See \"//results/c32.r1.log\")" and a pile of missings
since the brief "whoops, HW CI failed to listen to the test exit code"
regression.

The only ways I know of to hit this case would be:

1) The deqp binary abruptly wedges on its own.  This happens with NFS
failures sometimes, but the rest of the run went fine and we never got the
kernel complaining about NFS, so that seems unlikely.

2) The stderr pipe filled up before stdout was completed, and deqp got
wedged trying to output stderr (happens sometimes when you do like
NIR_DEBUG=print in your run).

Both of these seem unlikely, given that we've got a big .qpa file that
made it all the way to writing out test case durations at the end of the
run before abruptly terminating.  Why didn't we have at least some of the
test results parsed?

The next deqp-runner release we integrate will solve #2, and cleans up
these error paths a bunch, so I'm hoping we get more information soon.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16350>
2022-05-05 18:20:12 +00:00
Alyssa Rosenzweig 17c98393f9 panfrost: Increase the maximum tiler heap size
Required to avoid tiler heap out-of-memory condition on Valhall on tests
including:

dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_1200x1200_drawcount_8

This test passes on Bifrost without the fix because varyings are only allocated
from the tiler heap on Valhall.

Minimal perf or memory usage impacted is expected, as even old versions of
panfrost.ko support growable memory.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16330>
2022-05-05 15:27:56 +00:00
Iago Toral Quiroga 7c5b242aec docs/features: flag VK_KHR_timeline_semaphore as implemented
We got this implemented for v3dv when Jason ported the submit code
to the common submit framework.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16344>
2022-05-05 10:41:57 +00:00
Iago Toral Quiroga 1442d77bc5 v3dv: trivially implement VK_KHR_separate_depth_stencil_layouts
We don't currently benefit from seeing barriers and layout
transitions that affect just the depth or stencil aspects,
so we don't expose this feature.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16344>
2022-05-05 10:41:57 +00:00
Iago Toral Quiroga 32223ac67f v3dv: implement VK_EXT_separate_stencil_usage
We don't care about the depth/stencil usage other than to determine
if an image format is supported for that usage.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16344>
2022-05-05 10:41:57 +00:00
Iago Toral Quiroga 44791ba825 v3dv: check input attachment usage as sampled usage
Since we implement input attachments as textures we should check
support for input attachment usage the same way we check support
for sampled images.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16344>
2022-05-05 10:41:57 +00:00
Karmjit Mahil e7351178aa pvr: Update pvrsrvkm to fw 1.17 .
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16238>
2022-05-05 10:35:35 +00:00
Iago Toral Quiroga 184a48197f v3dv: use wait stage for wait semaphores to decide about binning syncs
If the wait stage for a semaphore doesn't involve geometry stages we
don't need a binning sync.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16322>
2022-05-05 09:06:50 +00:00
Iago Toral Quiroga a981ac0539 v3dv: skip binning sync if binning shaders don't access external resources
Until now we have been enabling binning sync if we found a barrier
involving geometry stages (a bcl barrier), however, if the actual
binning shaders involved with the job don't access any external
buffers or images there is no reason to sync at the binning stage.

In this patch we don't immediately consume the bcl barrier flag from
the command buffer state when we create a new job. Instead, we check
this state when we are about to emit a draw call by checking if the
shaders involved with binning may access external resources, such as
vertex buffers, UBOs, or textures. If none of the draw calls in the
job use binning shaders that access external resources then we never
enable binning sync for the job.

It is possible that a binning shader uses resources that are not
synchronized through a barrier though, so we keep track of the
access masks used with barriers for both buffers and images separately
to better identify if the binning shader is affected by the barrier.

If a serialized job never consumes the bcl barrier flag because none
of its draw calls ever required a bcl sync, then the flag will be
cleared when the job is finished.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16322>
2022-05-05 09:06:50 +00:00
Iago Toral Quiroga 46dd903cc6 v3dv: flag BCL barriers for all-graphics and all-commands stages
Since these also include geometry stages in the pipeline.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16322>
2022-05-05 09:06:50 +00:00
Iago Toral Quiroga 1571954be9 v3dv: drop default sampler states if not used
If a shader doesn't use any samplers (including default sampler states),
make sure we drop them so other parts of the driver can recognize that
the program doesn't actually use any samplers at all.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16322>
2022-05-05 09:06:50 +00:00
Samuel Pitoiset 9348620946 radv: disable instance packing to fix pipeline query stats
RDNA2 is affected by a hardware bug when instance packing is enabled
for adjacent primitive topologies and instance_count > 1, pipeline
stats generated by GE are incorrect. It needs to be applied for
indexed and non-indexed draws.

This is based on PAL waDisableInstancePacking.

This fixes KHR-GL46.pipeline_statistics_query_tests_ARB.* with Zink.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6257
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15877>
2022-05-05 09:39:23 +02:00
Guilherme Gallo 7a6d85299c ci: Fix tests expectations
For some days, the CI was bypassing LAVA and bare-metal jobs due to an
issue in the init-stage2.sh script. After the fix some tests
crashed/failed. This commit updates the expectations for them.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16325>
2022-05-04 23:39:15 +00:00
Guilherme Gallo 57f21b5039 ci: Update trace after CI fix
For some days, the CI was bypassing LAVA and bare-metal jobs due to an
issue in the init-stage2.sh script. After the fix the neverball trace on
panfrost-t860 is producing a different image, due to a bugfix in
Mesa itself driver. This commit updates the neverball trace on that
device.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16325>
2022-05-04 23:39:15 +00:00
Guilherme Gallo ea85f6cfda ci: Fix init-stage2 exit code
After a LAVA job submitter rework, the init-stage2.sh was changed to be
compatible with new LAVA job definitions, but the result from the script
represented by `HWCI_TEST_SCRIPT` variable is obfuscated by the `set -e`
command. So when the test script fails, `set` will override the exit
code and the jobs will pass when they should fail.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16325>
2022-05-04 23:39:15 +00:00
Dylan Baker 681abdcc57 docs: Add sh256sum for mesa 20.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:22 -07:00
Dylan Baker 6eb129f108 docs: add release notes for 22.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:22 -07:00
Dylan Baker 9b94ef5697 docs: update calendar for 22.1.0-rc4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:22 -07:00
Dylan Baker e83a8b1d10 docs: update calendar for 22.1.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:21 -07:00
Dylan Baker 9543fc1011 docs: Extend calendar entries for 22.1 by 1 releases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:21 -07:00
Dylan Baker 2876359dce docs: update calendar and link releases notes for 22.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:21 -07:00
Dylan Baker 9e8f516e92 docs: Extend calendar entries for 22.0 by 1 releases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16336>
2022-05-04 15:55:21 -07:00
Vinson Lee 7f91e8fad9 zink: Fix memory leak on error path.
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable sampler_view going out of scope leaks the storage it points to.

Fixes: 625457caaf ("zink: handle swapchain acquire failures more directly")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16258>
2022-05-04 22:41:48 +00:00
Jason Ekstrand 6214251c03 vulkan/wsi: Add signal_fence/semaphore_for_image helpers
These operations are about to get a bit more complex so let's add a
couple nice helpers to keep things clean.

Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-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/16333>
2022-05-04 22:09:02 +00:00
Jason Ekstrand 233be8ee59 vulkan/wsi: Set the right stage flags for semaphore waits
This is currently technically broken for compute.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16333>
2022-05-04 22:09:02 +00:00
Jason Ekstrand 5f4ee14895 vulkan/wsi: Reset the image fence right before vkQueueSubmit
Instead of resetting at the top of the loop, we create the fence in the
signaled state and then unconditionally reset it before vkQueueSubmit.
This gives us a bit more flexibility with how we handle the fence in the
case where the client provides zero semaphores.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16333>
2022-05-04 22:09:02 +00:00
Jason Ekstrand 5576e8b735 vulkan/wsi: Hang on to file descriptors
Instead of closing the dma-buf file descriptors immediately after
handing them to the window system, hang on to them.  We want to be able
to use them for synchronization.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16333>
2022-05-04 22:09:02 +00:00
Jason Ekstrand 17fb3ad94f vulkan/wsi: Only use a single fd per wsi_image
The only thing this was helping was X11 where the protocol requires that
we pass in an array of images.  We can move all the dup() code to the
X11 back-end and leave the others a bit cleaner.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16333>
2022-05-04 22:09:02 +00:00
Jason Ekstrand c72ff19a9e vulkan/wsi: Close file descriptors in wsi_destroy_image
Most of the time, this is a non-issue because the WSI back-end closes
them as part of handing them to the window-system and sets fds[*] to -1.
The one exception here was Wayland which was closing them but leaving
fds[*] pointing to bogus file descriptors.  Having wsi_destroy_image
close them makes clean-up easier and more reliable.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16333>
2022-05-04 22:09:01 +00:00
Mihai Preda ae6d32c938 gallium: refactor a channel loop in draw_llvm.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda ccbee20f6b gallivm: LLVM opaque pointers small changes
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 051f588bfe gallivm: use LLVM opaque pointers in lp_bld_tgsi_aos.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 32a55651cf gallivm: use LLVM opaque pointers in lp_bld_tgsi_soa.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda c8520c2a8f gallivm: use LLVM opaque pointers in lp_bld_struct.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 1f636e7fb2 gallivm: use LLVM opaque pointers in lp_bld_sample_soa.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 12cac07fe6 gallivm: use LLVM opaque pointers in lp_bld_sample.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 2a59fdb96d gallivm: use LLVM opaque pointers in lp_bld_nir_soa.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 36c45736ce gallivm: use LLVM opaque pointers in lp_bld_gather.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 61da78c311 gallivm: use LLVM opaque pointers in lp_bld_format_s3tc.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 84ba15ac06 gallivm: use LLVM opaque pointers in lp_bld_intr.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 3143f871ac gallivm: use LLVM opaque pointers in lp_bld_flow.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 1e0ddda796 gallivm: use LLVM opaque pointers in lp_bld_printf.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda 2a6e9d13fb gallivm: use LLVM opaque pointers in lp_bld_coro.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00
Mihai Preda f1fc0bb567 gallivm: use LLVM opaque pointers in lp_bld_conv.c
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
2022-05-04 20:00:33 +00:00