Commit Graph

165769 Commits

Author SHA1 Message Date
José Roberto de Souza 162695f0b8 intel: Add intel_kmd_type parameter to intel_engine_get_info()
This will be needed to execute proper function to fetch engines from
kernel mode driver.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>
2023-01-25 09:16:55 -08:00
José Roberto de Souza 2c42641994 intel/dev: Detect what is the kernel mode driver loaded
Intel GPUs will have a new kernel mode driver, support for some
platforms will overlap so we will need to detect in runtime what is
the kernel mode driver loaded for each device.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>
2023-01-25 09:16:55 -08:00
Philip Langdale 0504a3b079 radeonsi: correctly declare YUV420_10 RT Format support for AV1
This appears to have been an oversight. AV1 Main profile requires
support for both 8bit and 10bit, and so we should always declare
support for the YUV420_10 RT Format. This support then cascades
into supporting the appropriate surface formats and meets expectations
of vaapi clients (especially ffmpeg based) on how to detect support
for these formats.

Note that the commit [0b02db3007] was also made with the intention of
fixing this problem, but it does so in a non-idiomatic way. With that
change, there is still no declared YUV420_10 RT Format, and instead
the P010 surface format is reported under the YUV420 RT Format. This
is not going to work with all vaapi clients. I recommend that this
commit be reverted.

Signed-off-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20870>
2023-01-25 16:15:25 +00:00
Konstantin Seurer 3eb646efd0 radv: Merge the leaf and internal converter
We have everything we need in the internal one already so we can just
encode leaf nodes there. Since this functionality isn't split anymore,
the shader was renamed to "encode".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20768>
2023-01-25 15:54:03 +00:00
Rhys Perry 883f18f761 radv: skip creation of null TLAS for null winsys
This won't work because there are no memory types.

Fixes fossilize replay with NULL winsys.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Fixes: 31ca19589f ("radv: Create a null TLAS as meta state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20878>
2023-01-25 14:16:54 +00:00
Martin Roukala (né Peres) 345d41155f ci/b2c: uprev to b2c v0.9.9
No functional change expected, just a minor reduction in size compared
to the previous version and updated components.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20806>
2023-01-25 12:37:57 +00:00
Helen Koike 7b51a583ed ci/android: add android to the ci
Add android to the ci, so we can test mesa on it.

Add debian/x86_test-android and test-android jobs.
One build the container to run tests, and the other execute the tests.

Android is executed on top of cuttlefish VM with virgl.
Mesa libs are replaced on the cuttlefish image, and deqp and deqp-runner
are used to execute tests.

Co-developed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:26 -03:00
Helen Koike 068dc91317 ci: export artifacts from debian-android
export mesa build from this job, so it can be picked up by an android
testing job.

Co-developed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike 3cb7a8537b ci: debian-android compile virgl
compile virgl so we can test android on a vm.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike e42ef902de ci: compile deqp-runner for android
To allow testing mesa on android, we need deqp-runner compiled for it,
so we can add android on the ci.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike 54a46c594e ci: compile deqp for android
To allow testing mesa on android, we need deqp compiled for it, so we
can add android on the ci.

Add patch that redirect logs to stdout instead of logcat.
Compile deqp to allow running it directly from command line instead of
Android activity.

Co-developed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Tomeu Vizoso d024af8d00 ci: Use NDK 25b to build for the Android ABI level 33
25b is the currently supported NDK, as per the below:

https://github.com/android/ndk/wiki

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike d66cfe6a3e ci/android: move sdk version and ndk to a job variable
make it easier to update sdk version and ndk without the need to make
changes all over the code.

Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Tomeu Vizoso bdcbf7dcf8 ci: Build for Android with libbacktrace=false
This is needed for using this build inside Android systems with VNDK
enabled, as in recent versions of it libbacktrace isn't available to
libraries in /vendor.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Tomeu Vizoso a5c96cb705 android: Cleanup unneeded headers from the sync stub
These were probably copy pasted from the previous unified stub.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Tomeu Vizoso b1bd6aa21a android: Make libbacktrace optional again
For the same reason why we used to have USE_LIBBACKTRACE with the old
Android makefiles, allow to build Mesa without linking to it.

In recent VNDK versions, libbacktrace isn't available.

When building without linking libbacktrace, for some reason some symbols
related to C++ exception handling are exposed. Allow them in the symbols
check script.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike 0e286d0dbc android: allow system = 'android' on cross file
Allow building with system = 'android' on the cross file.
This avoids creating symlinks for the libs.

Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike 87e6703b67 ci: move patches to patches directory
Group all patches in a directory.
Improve organization to organize the current and future patches.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike 388b49d150 ci/debian-android: move pkgconfig paths to the cross file
Move pkgconfig paths out of the job script into the cross file.
Use pkg_config_libdir on the cross file instead.
Which makes more sense and cleaner code.

Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Italo Nicola 6c446377ff panfrost: fix off-by-one when exporting format modifiers
`count` should not be incremented before the check, because it causes
the modifiers array to be filled starting from position 1 instead of 0.

This bug causes one less format modifier to be available than would
otherwise be expected, which could then lead to a dmabuf query failing
in situations where a supported modifier wouldn't be advertised.

It also causes garbage data to be advertised as a modifier in position 0
of the array, although this is not very likely to cause issues.

Fixes: 2a1217513 ("panfrost: Implement panfrost_query_dmabuf_modifiers")
Cc: mesa-stable
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20879>
2023-01-25 09:24:50 +00:00
Samuel Pitoiset 7b76d46e38 radv: fix RADV_DEBUG=hang with multiple cmdbuffer per submission
With RADV_DEBUG=hang, there is only one cmdbuffer per submission and
this has been broken recently.

This fixes a segfault when generating GPU hang reports.

Fixes: 76deaa1b1a ("radv: Refactor command buffer handling in radv_queue_submit_normal.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20860>
2023-01-25 09:05:11 +00:00
Bas Nieuwenhuizen 75ae391375 radv: Reduce descriptor pool allocation for alignment.
Since we can now rely on this due to the stricter layout code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20847>
2023-01-25 08:45:50 +00:00
Bas Nieuwenhuizen 6a16d3b312 radv: Strictly limit alignment needed within a descriptor set.
By doing two passes we limit the number of times we need to have a gap
after a 16-byte descriptor to align for an image descriptor.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20847>
2023-01-25 08:45:50 +00:00
Pierre-Eric Pelloux-Prayer f73cdda983 radeonsi/gfx11: fix ge_cntl programming
gfx11 renamed PRIM_GRP_SIZE to VERTS_PER_SUBGRP but another change was
was missed.

Update our code based on PAL's UniversalCmdBuffer::CalcGeCntl function
(especially useVgtOnchipCntlForTess being false for gfx11).

Fixes: 25a66477d0 ("radeonsi/gfx11: register changes")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
2023-01-25 08:09:13 +00:00
Pierre-Eric Pelloux-Prayer 014a0bf0b6 radeonsi/gfx11: clamp PRIM_GRP_SIZE
Legal range of values is [1, 256].

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
2023-01-25 08:09:13 +00:00
Pierre-Eric Pelloux-Prayer f2ef663d08 winsys/amdgpu: use DMA_BUF_SET_NAME_B if available
Give a name to dma-buf. This name appears in /sys/kernel/debug/dma_buf/bufinfo
and could be useful to debug dma-buf:

Dma-buf Objects:
size    	flags   	mode    	count   	exp_name	ino     	name
00606208	00000002	00080007	00000003	drm	00192014	2321705-glxgears

The name is only added to non-shared buffer, to avoid overwriting
an existing name when exporting an imported buffer (otherwise all
dma-buf will pretend to be created by XWayland).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
2023-01-25 08:09:13 +00:00
Pierre-Eric Pelloux-Prayer 3ed75027b7 drm-uapi/dma-buf.h: use __u32/__u64 types
Otherwise we might get build errors: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/34886940

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20728>
2023-01-25 08:09:13 +00:00
Kenneth Graunke bd8e8d204d iris: Add missing untyped data port flush on PIPELINE_SELECT
This is needed when switching away from GPGPU mode.  See the previous
commit for anv.  This is not likely to make a practical difference for
iris because it never switches back and forth between modes like anv.

Fixes: 172e0b0ebf ("iris: Update PIPELINE_CONTROL flush when switching pipeline mode in TGL+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20774>
2023-01-25 07:08:55 +00:00
Kenneth Graunke a8108f1d44 anv: Add missing untyped data port flush on PIPELINE_SELECT
See the comments in emit_apply_pipe_flushes().  Flushing HDC is not
sufficient in GPGPU mode, and we need to set the untyped data port flush
bit as well.

Fixes many dEQP-VK failures with INTEL_COMPUTE_CLASS=1 on Alchemist.

Fixes: 1067ec90a5 ("anv: Update PIPELINE_CONTROL flush when switching pipeline mode in TGL+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20774>
2023-01-25 07:08:55 +00:00
Yogesh Mohan Marimuthu bc07b1a0bf radeonsi: remove some shadow reg optimization for bf1 game
This patch removes below shadow reg optimization. This is done for
Vega64 battlefield 1 crash when shadow regs enabled.

  + reset only dirty states with buffers in si_pm4_reset_emitted()
  + various draw states in si_begin_new_gfx_cs()

v2: remove first_cs parameter from si_pm4_reset_emitted() (Marek Olšák)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu 44f25792d5 radv: allow NULL initial_preamble_cs in radv_amdgpu_winsys_cs_submit_sysmem()
In case of mcbp, shadowed_regs is initialized early in radv_queue_init()
function by submitting the command buffer. The command buffer is submitted in
radv_init_shadowed_regs_buffer_state() function. When RADV_DEBUG=noibs is used
radv_amdgpu_winsys_cs_submit_sysmem() function is used to submit command buffer.
radv_amdgpu_winsys_cs_submit_sysmem() crashes here because initial_preamble_cs
is NULL. This patch fixes the radv_amdgpu_winsys_cs_submit_sysmem() function
to support NULL initial_preamble_cs.

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu c6702e1530 radv: fence complete struct is 4 qw size
also libdrm function amdgpu_cs_chunk_fence_info_to_data() has qw multiplier
and hence need not do it in radv_amdgpu_cs_submit().

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu b11f49f069 radv: INDEX_TYPE and NUM_INSTANCES PKT3 are not shadowed
INDEX_TYPE and NUM_INSTANCES PKT3 should be always written
if shadowing is enabled since they are not shadowed.

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu 2258090c73 radv: set preemp flag and pre_ena bit for shadowregs
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu 97b9b2cf40 radv: add support for register shadowing
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu db61db7f67 radv: add shadowregs variable to RADV_DEBUG environment variable
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18301>
2023-01-25 04:53:34 +00:00
Yogesh Mohan Marimuthu 5f0fcc05c2 ac,radeonsi: move shadow regs create ib preamble function to amd common
The si_create_shadowing_ib_preamble() function can be reused from radv also.
Hence it is moved.

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-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/18301>
2023-01-25 04:53:34 +00:00
Emma Anholt ab5dd2467f ci/freedreno: Mark max-texture-size as a flake.
It's been a popular spurious fail in merges in the last week.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20894>
2023-01-25 01:06:00 +00:00
Jakub Kulík 677a3053ff mesa: Fix format transform on big endian platforms
Reviewed-by: Emma Anholt <emma@anholt.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6001
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19051>
2023-01-24 23:30:33 +00:00
Emma Anholt 5d5cc7525d ci/zink: Update radv xfails for the recent shadow fixes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt 656f62a801 ci/zink: Update TGL full-run xfails.
arb_shader_texture_lod-texgradcube was a fail incorrectly removed in the
sahdow changes.  line-smooth-* is new piglit coverage.

Haven't pinpointed when the rest were fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt 512f1c160a ci/zink: Add coverage using the vulkan validation layer on lvp.
Let's make sure we aren't introducing new validation failures as
development proceeds.  Basically, we record the current set of known
validation failures from the CTS, and for any validation failure we have
the layer log it and abort.

I had started encoding xfails from piglit, but it turns out that piglit
and the validation layer fight about the teardown process, producing
use-after-frees.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt 4286633eec zink: Re-emit the SpvBuiltInSampleMask access chain each load.
Otherwise, the access chain you emitted last time may not dominate the
current use.

Fixes the following validation failure in
dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.bits_unique_per_sample.multisample_texture_2:

  UNASSIGNED-CoreValidation-Shader-InconsistentSpirv(ERROR / SPEC):
  msgNum: 7060244 - Validation Error: [
  UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle =
  0x55cf3cea2c60, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 |
  SPIR-V module not valid: ID '67[%67]' defined in block '23[%23]' does
  not dominate its use in block '31[%31]'

Fixes: 8899f6a198 ("zink: fix gl_SampleMaskIn spirv generation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt 1e4deb3b89 zink: Fix up mismatches of memory model vs addressing model.
MemoryModelVulkan was left out for CSes using it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt adf81044d4 zink: Fix validation failure for maxLod < minLod.
GL lets you set a silly state, so do something plausible instead of
undefined.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt 2a33d509ca zink: Add missing Flat decorations on some inputs.
Fixes validation failures:

Test case 'dEQP-GLES31.functional.android_extension_pack.shaders.es32.extension_directive.oes_sample_variables'..
MESA: error: Validation Error: [
UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle =
0x563a1838b790, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 |
SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment
OpEntryPoint operand 31 with Input interfaces with integer or float type
must have a Flat decoration for Entry Point id 4.
%gl_SampleId = OpVariable %_ptr_Input_uint Input

Test case 'KHR-GL46.shader_ballot_tests.ShaderBallotAvailability'..
MESA: error: Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x5558e12f17e0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment OpEntryPoint operand 28 with Input interfaces with integer or float type must have a Flat decoration for Entry Point id 4.
  %gl_SubgroupLocalInvocationId = OpVariable %_ptr_Input_uint Input

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:13 +00:00
Emma Anholt 7b6a5e3e24 zink: Fatal error if requesting validation and we fail to load the layer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
2023-01-24 20:56:12 +00:00
Jesse Natalie 81b5f6a3fd dzn: Use core feature matching logic instead of rolling our own
This will print nice messages on unsupported features

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
2023-01-24 11:00:05 -08:00
Jesse Natalie db083070f0 dzn: Implement subgroup size control extension
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
2023-01-24 11:00:05 -08:00
Jesse Natalie a041cd48f4 dzn: Support more subgroup/quad ops
See the comment around supported shader stages - to avoid
introducing CTS failures, vertex/geometry support for
subgroups are turned off since they cannot support quads.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20801>
2023-01-24 11:00:05 -08:00