Commit graph

184924 commits

Author SHA1 Message Date
Caio Oliveira
8ae528331c intel/compiler: Use "intel" prefix for walk_order enum
Will be used later in non-brw specific code in Iris.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27646>
2024-02-21 00:38:35 +00:00
Timothy Arceri
74534397ac glsl: split var copies before lowering named interfaces
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10593

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27669>
2024-02-20 23:29:17 +00:00
Timothy Arceri
4c11119825 glsl: support array wildcards in lower named interface blocks
Will be required with the change in the following patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27669>
2024-02-20 23:29:17 +00:00
Timothy Arceri
ec240e2cd8 nir: allow gather info to handle nir_deref_type_array_wildcard
Needed for some changes to the glsl nir linker in the following
patches.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27669>
2024-02-20 23:29:17 +00:00
Kenneth Graunke
1497f4e0c2 intel/fs: Don't include sync.nop in instruction count statistics
With the advent of software scoreboarding, we emit sync instructions
in various places to synchronize the execution pipelines.  This results
in assembly being littered with a bunch of sync.nop instructions.  That
means that when you reorder anything in the program, the scoreboarding
changes, and the number of sync.nops can vary wildly - even if the code
isn't really materially better or worse.  This makes it hard to use
tools like shader-db or fossil-db on post-Icelake platforms.

For now, exclude sync.nops from the instruction count statistic.  One
day we may want to consider improving the software scoreboarding pass
to emit fewer redundant sync.nop instructions, at which point tracking
this as a separate stat might be useful.  For now though, it's simply
cluttering and confusing our results.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27701>
2024-02-20 22:26:09 +00:00
Mike Blumenkrantz
83d1241cf5 zink: add checks/compat for low-spec descriptor buffer implementations
for implementations that can only support 1 descriptor buffer:
* prefer templates
* allow db if explicitly requested, but disable bindless (for testing)

fix #10640

Fixes: b8b51d96b0 ("zink: delete maxDescriptorBufferBindings checks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27696>
2024-02-20 21:43:15 +00:00
Caio Oliveira
60cf1ede4f iris: Remove no-ops from storage image lowering
The atomics lowering only applies to Gfx <= 7.5.
The get_size lowering only applies to Gfx <= 8.

Note: the lower_store still applies for Gfx9+, to perform color
conversion.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27638>
2024-02-20 19:47:07 +00:00
Caio Oliveira
078dbc4d33 anv: Remove lower_atomics from storage image lowering opts
The code only applies to Gfx <= 7.5, so it is a no-op.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27638>
2024-02-20 19:47:07 +00:00
Mike Blumenkrantz
1ab94ca17b mesa: add more driver support checks for more format queries
fixes #10641

cc: mesa-stable

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27698>
2024-02-20 18:27:10 +00:00
Mike Blumenkrantz
1e849b12f5 vk/wsi/x11/sw: use swapchain depth for putimage
this is otherwise broken for 32bit depth windows

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27605>
2024-02-20 15:47:45 +00:00
Mike Blumenkrantz
198719e80e drisw/egl: delete unused buffer age handling
age is never used here

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554>
2024-02-20 15:12:38 +00:00
Mike Blumenkrantz
81ecb21d50 drisw: hook up EXT_buffer_age
drisw only has a single drawable, which means the buffer age is always 1

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554>
2024-02-20 15:12:38 +00:00
Mike Blumenkrantz
9eb4b86e76 egl/x11/swrast: deduplicate ANGLE_sync_control_rate enablement
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554>
2024-02-20 15:12:37 +00:00
Lionel Landwerlin
0eb3c850c6 intel/clc: workaround LLVM17 opaque pointers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27637>
2024-02-20 14:41:43 +00:00
Lionel Landwerlin
62baa4df5f intel/clc: lower temp function/shader variables together
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 4fd7495c69 ("intel/clc: add ability to output NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27637>
2024-02-20 14:41:43 +00:00
Lionel Landwerlin
19aeb274e6 genxml: generate opencl temporary variables with private qualifier
To avoid generic pointers, makes the NIR prints a bit more readable.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 41b2ed65 ("genxml: generate opencl packing headers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27637>
2024-02-20 14:41:43 +00:00
Gert Wollny
a95a2e4d3f zink/nir_to_spirv: emit ViewportIndex cap also for inputs
This fixes validation error VUID-VkShaderModuleCreateInfo-pCode-08737 for
piglits:

  spec@oes_viewport_array@viewport-gs-write-simple
  spec@oes_viewport_array@viewport-gs-writes-in-range
  spec@arb_fragment_layer_viewport@viewport-gs-no-write
  spec@arb_fragment_layer_viewport@viewport-gs-write-simple
  spec@arb_fragment_layer_viewport@viewport-gs-writes-in-range
  spec@arb_fragment_layer_viewport@viewport-no-gs
  spec@arb_fragment_layer_viewport@viewport-vs-write-gs-no-write-simple
  spec@arb_fragment_layer_viewport@viewport-vs-write-simple

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27694>
2024-02-20 13:39:34 +00:00
Lionel Landwerlin
96ab1d65cc anv: fix emission of Wa_14015055625
When moving the static part, I missed that the
pipeline->primitive_id_override field isn't set yet when we check it
to emit 3DSTATE_TE.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1e081bd680 ("anv: split 3DSTATE_TE packing between static & dynamic parts")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27692>
2024-02-20 09:49:00 +00:00
Oskar Viljasaar
68f80f9b0f vulkan/properties: Start looping from the next member in GPDP2
We don't need to start iterating from `pProperties`, as the first member
is already handled in vk_common_GetPhysicalDeviceProperties2. Eliminate
this iteration by starting from pProperties->pNext.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27671>
2024-02-20 09:16:23 +00:00
Samuel Pitoiset
a5bdc4b19a radv: fix a compilation warning in radv_bind_graphics_shaders()
../src/amd/vulkan/radv_cmd_buffer.c: In function ‘radv_bind_graphics_shaders’:
../src/amd/vulkan/radv_cmd_buffer.c:9366:65: warning: array subscript -1 is below array bounds of ‘struct radv_shader *[14]’ [-Warray-bounds=]
 9366 |    cmd_buffer->state.last_vgt_shader = cmd_buffer->state.shaders[last_vgt_api_stage];

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27670>
2024-02-20 08:47:18 +00:00
Guilherme Gallo
41cd32d10e ci/lava: Broader R8152 error handling
The r8152 error detection is now considering any order of the known
patterns to detect variations of the r8152 issues during the test phase.
This includes a small refactoring for eventual new issues.

Additionally, adjusted the timing for setting the `start_time` in
`test_lava_job_submitter.py` to ensure consistency and reliability in
test execution, aligning the start time closer to the job submission
process.

With this fix, the bad state shown in the following job will be
detected:
https://gitlab.freedesktop.org/drm/msm/-/jobs/55033953

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27688>
2024-02-20 00:48:24 +00:00
Mike Blumenkrantz
c6635c09d0 zink: avoid infinite recursion on (very) small BAR systems in bo alloc
this should only try a full reclaim if possible, not unconditionally

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
817ca5147e zink: compute bo unique_id on use, not creation
this avoids wasting ids in suballocated slabs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
8c3adf749d zink: add an assert for dummy fb surface creation
add some info in the improbable case that this fails

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
8bad4205c6 zink: validate sample count on image create
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
386450b10e zink: pre-check formats for samplecount support
this should allow frontends to accurately detect unsupported format+sample
combinations instead of just failing at resource creation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:15 +00:00
Mike Blumenkrantz
f827055cb4 zink: flag the use_img as unsync access with buf2img copies, not the swapchain
these are not the same

Fixes: a0510b23f6f ("zink: add automatic swapchain readback using heuristics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:15 +00:00
Mike Blumenkrantz
b8b51d96b0 zink: delete maxDescriptorBufferBindings checks
only one descriptor buffer is used now

Fixes: 13c6ad0038 ("zink: use a single descriptor buffer for all non-bindless types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27685>
2024-02-19 17:12:37 +00:00
Samuel Pitoiset
2deaf632e2 radv: use radv_shader_info for computing NGG LDS layout
This should be similar.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
21577bfacb radv: store the number of outputs for VS/TES as NGG
To compute NGG info without relying on NIR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
5e1da1d10f radv: determine the number of invocations only for VS/TES as NGG
To make it clear that this doesn't depend on GS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
12b5c3f00e radv: set radv_vgt_shader_key::ngg_streamout for ESO
Not used yet, but will be needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
9f660d8c72 radv: prefix radv_vgt_shader_key::streamout with ngg
This is only for NGG streamout (GFX11).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
b98a7abcd6 radv: determine the ES stage for merged NGG shaders compiled separately
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
eea75777be radv: pass the ES stage when emitting geometry shader with ESO
Not used yet, but will be needed for NGG support.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Karol Herbst
9dcc20bccc meson/rusticl: import rust instead of unstable-rust
The rust module has been stabilized since meson 1.0 and we require 1.3.1

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10627
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27679>
2024-02-19 15:44:59 +00:00
Mike Blumenkrantz
fba34ae5f5 zink: add a750 baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27683>
2024-02-19 15:27:48 +00:00
Corentin Noël
dd6decfaba zink: do not use undefined stage mask if on missing KHR_synchronization2
VK_PIPELINE_STAGE_NONE can only be set as dstStageMask if KHR_synchronization2
is defined.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27682>
2024-02-19 15:04:04 +00:00
Corentin Noël
7cafe65ea1 zink: use symbolic values instead of 0
Just make it easier to remember which parameter is accepting which type.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27682>
2024-02-19 15:04:04 +00:00
Patrick Lerda
3b90c46bdf r300: fix vertex_buffer related refcnt imbalance
Indeed, vertex_buffer was not properly freed.

For instance, this issue is triggered with:
"piglit/bin/fcc-read-after-clear blit rb -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 8a963d122d ("r300g/swtcl: don't do stuff which is only for HWTCL")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27678>
2024-02-19 14:48:18 +00:00
Mike Blumenkrantz
fb97141131 zink: always enable glsl_correct_derivatives_after_discard
this matches radeonsi behavior and eliminates the driconf handling

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27489>
2024-02-19 14:26:49 +00:00
Lionel Landwerlin
63676ed502 anv: fix Wa_16013994831 macros
The commit that switched to the WA framework forgot to update one of
the ifdef section.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e6e320fc79 ("anv: make Wa_16013994831 to use intel_needs_workaround")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27676>
2024-02-19 12:48:33 +00:00
Lionel Landwerlin
682c23aa06 anv: remove unused definition
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
27a7c5447d anv: reenable ANV_ALWAYS_BINDLESS
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
dbee85713f anv: factor out descriptor buffer flushing
Take the opportunity to fix the flush of the descriptor buffer surface
when needed. Previously we would only flush it if the shader used one
of the push descriptor.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
cf193af762 anv: fixup push descriptor shader analysis
There are a couple mistakes here :

   - using a bitfield as an index to generate a bitfield...

   - in anv_nir_push_desc_ubo_fully_promoted(), confusing binding
     table access of the descriptor buffer with actual descriptors

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ff91c5ca42 ("anv: add analysis for push descriptor uses and store it in shader cache")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Joshua Ashton
735fe243a7 android: Use system = 'android' in crossfile
Fixes the following libarchive error when building with the libarchive wrap subproject:

In file included from ../subprojects/libarchive-3.7.2/libarchive/archive_write_open_memory.c:33:
../subprojects/libarchive-3.7.2/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found

This also removes the version suffixes from the .so's that are referenced
in the mesa3d_cross.mk file as those are not present on the Android target.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27648>
2024-02-19 08:42:26 +00:00
Samuel Pitoiset
10b8e52780 radv: disable conditional rendering if enabled when preprocessing DGC
vkCmdPreprocessGeneratedCommandsNV() shouldn't be affected by
conditional rendering. Confirmed with Ricardo after writing some
tests against NVIDIA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27658>
2024-02-19 08:07:41 +01:00
Samuel Pitoiset
5b0e4dd6e8 radv: stop using conditional rendering internally when preprocessing DGC
Preprocess and execute can be executed on different queue families. If
preprocess is executed on GFX and the indirect count optimization is
enabled, this will generate an empty cmdbuf. Expect GPU hangs if this
DGC IB is then executed on ACE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27658>
2024-02-19 08:05:13 +01:00
Mike Blumenkrantz
893780b362 mesa: check driver format support for certain GetInternalformativ queries
according to spec, these should return NONE if the format is
not supported for a given texture target, but mesa was incorrectly
returning a hardcoded value for all cases without checking the driver

instead, check whether the driver can create a texture for a given
format to correctly handle this non-support case

cc: mesa-stable

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27621>
2024-02-17 16:27:20 +00:00