Commit graph

195624 commits

Author SHA1 Message Date
Mike Blumenkrantz
dbfa597544 zink: stop passing modifier pointers internally
this is confusing and unnecessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
4bd8daa24c zink: simplify some confusing modifier code
this makes passing modifiers more intelligible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
d754425644 zink: add HIC back if suboptimal check fails
this should be checked again at every fallback

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
77ba1ad9f2 zink: delete redundant HIC usage check
this is the whole point of suboptimal_check_ici()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
8ca6549500 zink: fix some indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
be3424dee8 zink: init format props dynamically
this amortizes the (significant) cost of gathering format properties
across driver use and avoids checking props for formats that are never used

it cuts around 5% off init

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
8ce4951bf7 zink: wrap all access to format_props and modifier_props
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
086791ade8 zink: zink_modifier_prop -> zink_modifier_props
for consistency

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
1ca68ab87e zink: only use DISJOINT for planar images
minor typo

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
d1f6e52de2 zink: check HAVE_LIBDRM for xf86drm.h include
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31408>
2024-09-27 12:58:00 +00:00
Daniel Svensson
55e1a596f6 zink: add spirv_info_h dep to libzink.
Build dependency of zink_compiler.c.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11926
Fixes: a09c5d55ed ("spirv: Auto-generate spirv_info.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31407>
2024-09-27 12:30:17 +00:00
Sviatoslav Peleshko
57344052b6 intel/brw: Don't apply discard_if condition opt if it can change results
We can't just always negate the alu instruction's cmod, because negating
it can produce different results when the argument is NaN float. We can
still do that if the condition is == or !=.

Fixes: 0ba9497e ("intel/fs: Improve discard_if code generation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11800
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31042>
2024-09-27 11:52:27 +00:00
Rhys Perry
93372ea9af aco: do not use inline constants for 16-bit pseudo scalar trancendentals
Like https://github.com/llvm/llvm-project/pull/104395

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30729>
2024-09-27 11:11:42 +00:00
Caio Oliveira
93c3780bc1 intel/brw: Skip per-primitive inputs when computing flat input mask
The per-primitive have their own separate section in the FS thread
payload, and are not considered when setting the mask in
3STATE_SBE's ConstantInterpolationEnable.

This is also consistent with what is done for brw_interp_reg().

Fixes
- dEQP-VK.mesh_shader.ext.misc.clip_geom_provoking_last
- dEQP-VK.mesh_shader.ext.misc.clip_geom_and_task_shader_provoking_last

Backport-to: 24.2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11844
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31417>
2024-09-27 08:15:18 +00:00
Juan A. Suarez Romero
cc66268817 v3d/ci: add new flakes and timeouts
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31403>
2024-09-27 07:45:01 +00:00
Samuel Pitoiset
ad95cc1a5c radv: simplify determining conformant products
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31367>
2024-09-27 06:29:16 +00:00
Georg Lehmann
2ddffab33d vc4/ci: documment new failure
No idea how this can be caused by my MR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
bb7e8d51b6 nir: delete nir_opt_reuse_constants
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
5ccee0fe83 radv: remove nir_opt_reuse_constants call
aco now rematerializes constants per block, so this nir pass
no longer does anything meaningful besides adding noise:

Foz-DB Navi31:
Totals from 4674 (5.89% of 79395) affected shaders:
Instrs: 11497431 -> 11497335 (-0.00%); split: -0.02%, +0.02%
CodeSize: 60720620 -> 60725904 (+0.01%); split: -0.02%, +0.03%
VGPRs: 294440 -> 294428 (-0.00%)
SpillSGPRs: 3486 -> 3488 (+0.06%); split: -0.06%, +0.11%
Latency: 109298610 -> 109319617 (+0.02%); split: -0.02%, +0.04%
InvThroughput: 18606377 -> 18640872 (+0.19%); split: -0.01%, +0.19%
VClause: 232602 -> 232622 (+0.01%); split: -0.00%, +0.01%
SClause: 299675 -> 299746 (+0.02%); split: -0.01%, +0.04%
Copies: 840683 -> 840105 (-0.07%); split: -0.14%, +0.07%
Branches: 304581 -> 304646 (+0.02%); split: -0.00%, +0.03%
PreSGPRs: 233651 -> 233611 (-0.02%); split: -0.02%, +0.00%
VALU: 6624760 -> 6625051 (+0.00%); split: -0.00%, +0.01%
SALU: 1236841 -> 1236103 (-0.06%); split: -0.12%, +0.06%
VOPD: 2993 -> 2970 (-0.77%); split: +0.17%, -0.94%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
60776f87c3 nir/opt_remove_phis: rematerialize constants
Foz-DB Navi31:
Totals from 749 (0.94% of 79395) affected shaders:
Instrs: 1224359 -> 1223722 (-0.05%); split: -0.07%, +0.02%
CodeSize: 6468392 -> 6466296 (-0.03%); split: -0.06%, +0.03%
Latency: 9764410 -> 9766457 (+0.02%); split: -0.01%, +0.03%
InvThroughput: 1017401 -> 1017380 (-0.00%); split: -0.03%, +0.03%
VClause: 19902 -> 19873 (-0.15%); split: -0.16%, +0.02%
SClause: 38441 -> 38424 (-0.04%); split: -0.05%, +0.01%
Copies: 86880 -> 86304 (-0.66%); split: -0.73%, +0.06%
Branches: 34206 -> 34159 (-0.14%); split: -0.14%, +0.01%
PreSGPRs: 45557 -> 45527 (-0.07%); split: -0.08%, +0.01%
PreVGPRs: 32406 -> 32408 (+0.01%)
VALU: 671633 -> 671533 (-0.01%); split: -0.02%, +0.01%
SALU: 155284 -> 154675 (-0.39%); split: -0.40%, +0.00%
VMEM: 27303 -> 27271 (-0.12%)
SMEM: 67490 -> 67455 (-0.05%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
40fc85c15b nir: make nir_instr_clone usable with load_const and undef
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
a9f8089240 nir: replace nir_opt_remove_phis_block with a single source version
This is what callers actually want, and it simplifies nir_opt_remove_phis
because we can assume dominance meta data is valid.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Iván Briano
a4cbc903a8 anv: allocate sparse descriptor buffers from the correct heap
When allocating a buffer normally, this flag gets to the allocator from
the memory requirements, but when sparse bindings are created we were
checking for them but never setting them.
Fixes sparse descriptor buffers on Xe2.
Makes the failure on TRTT more obvious.

Fixes: c6a91f1695 ("anv: add new heap/pool for descriptor buffers")
Fixes: 692e1ab2c1 ("anv: get rid of the second dynamic state heap")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31372>
2024-09-27 04:49:22 +00:00
Paulo Zanoni
fe59044f47 anv/trtt: mark vk_sync_get_value()'s value as defined for Valgrind
Valgrind doesn't seem to know that drmSyncobjQuery() writes to the
variable that we pass as 'last_value'. This gets rid of:

==6275== Conditional jump or move depends on uninitialised value(s)
==6275==    at 0x5308370: anv_sparse_trtt_garbage_collect_batches (anv_sparse.c:540)
==6275==    by 0x53091E2: anv_sparse_bind_trtt (anv_sparse.c:825)
==6275==    by 0x5309771: anv_sparse_bind (anv_sparse.c:953)
==6275==    by 0x5309A3B: anv_free_sparse_bindings (anv_sparse.c:1041)
==6275==    by 0x529FF21: anv_DestroyBuffer (anv_buffer.c:248)
==6275==    by 0x932ADBD: ??? (in /usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
==6275==    by 0x127AA2: MyVkBuffer::~MyVkBuffer() (sparse.cpp:364)
==6275==    by 0x12B2D4: MyApp::test1_trivial_sparse() (sparse.cpp:1421)
==6275==    by 0x13E01A: MyApp::run_test(int) (sparse.cpp:6594)
==6275==    by 0x13E3B0: main (sparse.cpp:6656)
==6275==  Uninitialised value was created by a stack allocation
==6275==    at 0x53082D3: anv_sparse_trtt_garbage_collect_batches (anv_sparse.c:525)

An alternative to these Valgrind macros would simply have been to
zero-intialize last_value.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31332>
2024-09-27 04:10:12 +00:00
Paulo Zanoni
ab91106d4f anv: fix compute engines when using ANV_QUEUE_OVERRIDE
I just noticed that my custom sparse program was not working correctly
when I used ANV_QUEUE_OVERRIDE (instead of enabling the compute queue
by default or using INTEL_ENGINE_CLASS_COMPUTE, which was removed by
commit 600d88ab3c ("intel: Remove INTEL_ENGINE_CLASS_COMPUTE and
INTEL_ENGINE_CLASS_COPY parameters").

It turns out we were not setting the same engine class type when using
ANV_QUEUE_OVERRIDE vs the other cases. Move the code around so the
behavior can stay the same.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31332>
2024-09-27 04:10:12 +00:00
Matt Turner
75f02ed4b5 anv: Set shader_spilling_rate=15 by default
This avoids massively long shader compile times when there is lots of
spilling, at a minor cost of a few more spills/fills. Choose 15 as it is
already the default used by the Cyberpunk 2077 driconf workaround.

Surprisingly the number of additional spills/fills are miniscule in
fossil-db:

  Instructions in all programs: 152680595 -> 152681525 (+0.0%)
  SENDs in all programs: 7672789 -> 7672789 (+0.0%)
  Loops in all programs: 48469 -> 48469 (+0.0%)
  Cycles in all programs: 11981743456 -> 11984228708 (+0.0%)
  Spills in all programs: 42989 -> 42779 (-0.5%)
  Fills in all programs: 76380 -> 76776 (+0.5%)

partly because of the chaotic unpredictability that the choice of
registe to spill has on a shader. For example, this patch massively
helps some shaders in terms of spills/fills:

  Spills helped fossils/fossil-db/steam-native/red_dead_redemption2.vk-g6.foz/4101ff9c9b83bf22/SIMD8 fragment: 3208 -> 2894 (-9.8%)
  Fills helped fossils/fossil-db/steam-native/red_dead_redemption2.vk-g6.foz/4101ff9c9b83bf22/SIMD8 fragment: 7258 -> 6795 (-6.4%)
  Spills helped fossils/q2rtx/q2rtx-rt-pipeline.976f4ab1c0fee975.1.foz/c496e8a549f6b4bf/compute: 109 -> 92 (-15.6%)

Related: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31133
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9241
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11709
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11844
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31269>
2024-09-27 03:43:52 +00:00
Serdar Kocdemir
27295ca4d0 gfxstream: Handle tmp folder explicitly on codegen
Avoid getting different relative folders for tmp folder when the
code is generated from different checkout locations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31400>
2024-09-27 03:20:07 +00:00
Serdar Kocdemir
73ac603f9d gfxstream: Add VkPrivateDataSlot handle type
Private data slot types are required to support VK_EXT_private_data
extension. Some additional changes for handle remapping over uint64_t
types will be submitted later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31400>
2024-09-27 03:20:06 +00:00
Caio Oliveira
4e559077e4 intel/executor: Dump both pre-processed source and assembly
Having the actual generated assembly is helpful when trying to figure
out if the code emission and disassembly are implemented correctly.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31305>
2024-09-27 02:46:28 +00:00
Caio Oliveira
2455e2765a intel/brw: Add DUMP flag to brw_assemble
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31305>
2024-09-27 02:46:28 +00:00
Lionel Landwerlin
50cc738a6d blorp: convert fast clear color for unsupported formats
This tests is asserting on LNL like :

  dEQP-VK.pipeline.monolithic.sampler.border_swizzle.r8_srgb.gbar.custom.gather_1.no_swizzle_hint
  dEQP-VK.api.image_clearing.core.clear_color_image.2d.optimal.single_layer.e5b9g9r9_ufloat_pack32

Because blorp tries, for example, to setup a render target with
L8_UNORM_SRGB (which is mapped to the R8_UNORM_SRGB of Vulkan) but is
not supported for rendering.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1c7fe9ad1b ("anv: Support fast clears in anv_CmdClearColorImage")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31357>
2024-09-27 00:37:25 +00:00
Mary Guillemard
10282ee079 panvk/ci: Increase panfrost-g52-vk fraction
premerge have a time limit of 15 min, those jobs takes between 20 to 33
min with a fraction of 8 right now.

Additionally, we only have 7 VIM3 and could be trying to queue 8 jobs.

Let's fraction to 32 for now and revert back to 2 runners.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 2f54228da5 ("panvk/ci: Update to run full CTS on G52")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31404>
2024-09-26 23:48:05 +00:00
Caio Oliveira
28ef0de250 intel/brw: Add SWSB MATH pipe to assembler
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31336>
2024-09-26 20:40:28 +00:00
Eric Engestrom
df1a89b9e1 ci/deqp: make sure the git commit hash of deqp is stable across rebuilds
This makes it much easier to verify whether two jobs are running the same deqp build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31397>
2024-09-26 19:46:08 +00:00
Eric Engestrom
a942ed351e mr-label-maker: add gfxstream
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31402>
2024-09-26 18:53:58 +00:00
Faith Ekstrand
83b220f833 nvk: Advertise VK_EXT_device_generated_commands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
347e6b493b nvk: Handle indirect dispatch in pipeline barriers
Preprocess writes need to flush the data cache and indirect reads now
need to invalidate the constant cache and the QMD cache.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
976f22a5da nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
78e0adbfe1 nvk: Expose an nvk_cmd_flush_cs_qmd() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
341dca8eaf nvk: Export graphics state flushing helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
2dfd1b9151 nvk: Move flush_push_descriptors to the front of flush_state()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
e1404ffd11 nvk: Track and dump device-generated commands if possible
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
7b6b2f9501 nvk/nvkmd: Add a mechanism to track and look up nvkmd_mems
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
f63ec91b52 nvk/nvkmd: Always map read/write for internal maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
10b3222522 nvk: Add an implementation of VkIndirectExecutionSetEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
09ed607a37 nvk: Disable CBuf pushing when INDIRECT_BINDABLE_BIT is set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
0e1545586d nvk: Use VkShaderStageFlags for shaders_dirty
This requires a bit more juggling of shader enums but it also cleans
things up a bit since we're no longer using a bitfield which isn't
VkShaderStageFlags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
a5f20591eb nvk: Fill out shader push data at compile time
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
5ebcb71e94 vulkan/pipeline: Patch through INDIRECT_BINDABLE_BIT
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
4ae2882bc1 vulkan: Add a vk_pipeline_ops::get_shader method
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00