Commit graph

196797 commits

Author SHA1 Message Date
Frank Binns
fa889ffec7 pvr: fix use of uninitialised value when setting up tex info swizzle
Resolves the following valgrind issue when running GLES CTS:

  ==8318== Conditional jump or move depends on uninitialised value(s)
  ==8318==    at 0x72AE91C: vk_format_to_pipe_format (vk_format.c:263)
  ==8318==    by 0x7051EE7: vk_format_description (vk_format.h:176)
  ==8318==    by 0x7052CFB: pvr_get_format_swizzle (pvr_formats.c:701)
  ==8318==    by 0x708CC2F: pvr_init_tex_info (pvr_query_compute.c:454)
  ==8318==    by 0x708D887: pvr_add_query_program (pvr_query_compute.c:663)
  ==8318==    by 0x708B9BB: pvr_CmdCopyQueryPoolResults (pvr_query.c:535)
  ==8318==    by 0x607E68F: copy_pool_results_to_buffer (zink_query.c:782)
  ==8318==    by 0x607EB37: update_qbo (zink_query.c:853)
  ==8318==    by 0x607FA17: zink_get_query_result (zink_query.c:1145)
  ==8318==    by 0x5E82987: tc_get_query_result (u_threaded_context.c:1283)
  ==8318==    by 0x59A7543: get_query_result (queryobj.c:297)
  ==8318==    by 0x59A78A7: _mesa_check_query (queryobj.c:388)

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Luigi Santivetti
1b67637fa0 pvr: fix calculation for textures z position fractional part
The fractional part of the z position will only be used with linear or bi-linear
filtering. Otherwise it is safe to discard the original fractional value and
reset it to 0.5.

Fixes: 480bdff4b5 ("pvr: Add support to process transfer and blit cmds")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
c1bd0deb97 pvr: fix bo refcounting for imported buffers
When importing the same dma-buf multiple times, the kernel will return us the
same GEM handle each time. This means that if we close the GEM handle for one BO
we'll end up making the handle invalid for all BOs. The driver wasn't taking
this into account and was therefore creating a new BO each time a dma-buf was
imported, meaning we could end up with multiple BOs with the same GEM
handle. Fix this by creating a single BO per GEM handle and taking an additional
reference on a BO when the kernel returns an existing GEM handle.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
5ef9c552b2 pvr: fix image size calculation when mipLevels is 1
When calculating the size of an image, the driver was always factoring in space
for a full mip chain. However, this isn't necessary when mipLevels is 1 and this
resulted in applications needing to allocate more memory for these images than
is strictly necessary. Fix this by calculating the size of additional mip levels
(those greater than mipLevels) when more than 1 mip level has been requested.

Fixes: 2a3aa6da50 ("pvr: Fix cubemap layer stride")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
ba6a5b0354 pvr: drop 'Imagination' from deviceName
This is to align the device naming with the closed source driver.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Vlad Schiller
490bd13b5c pvr: Minor code refactor
The local_size and global_size arguments have been reordered to make them more
consistent.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
e23123b7f6 pvr: Handle DISABLE_PIXELMERGE
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Matt Coster
13e85fa911 pvr: Use vk_buffer_view base
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
1dc37f650a pvr: fix texture address offset when base level >0
Base level offseting only needs to be applied when creating non-compressed view
of a compressed image. Additionally the logic when patching offset, did not fix
up the rest of image state.

Seen in:
  dEQP-VK.pipeline.monolithic.image_view.view_type.2d.format.r32_uint.subresource_range.lod_base_mip_level_array_layer_last

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Matt Coster
fbca3d64ad pvr: Fix reordering of sub-cmds when performing ds subtile alignment
The use of list_move_to() meant that the first transfer sub-command wasn't being
correctly placed before the target graphics sub-command.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Matt Coster
6ba3c5263d pvr: Fix ds subtile alignment NULL pointer dereference
pvr_cmd_buffer_end_sub_cmd() sets the current sub-command to NULL. This was
causing list_move_to(), which is called immediately after this, to access a NULL
pointer. Fix this by storing the current sub command before calling
pve_cmd_buffer_end_sub_cmd() so that this can be used instead when modifying the
list.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Donald Robson
a324a028a9 pvr: Fixed creation of waits in queue submission
Waits were not previously being created for job dependencies in
pvr_driver_queue_submit() because the pvr_stage_mask() was being called in place
of pvr_stage_mask_dst(), and the former does not handle the top-of-pipe bit.

Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Donald Robson
f29ddf4817 pvr: Stop creating waits when there are no waits
This prevents the creation of unused syncobjs in the kernel by not processing
waits when there aren't any waits given in the submit info.

Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
019281fb0d pvr: Regenerate all descriptor program data sections
The descriptor set code will undergo a rework fairly soon so instead of trying
to fixup `per_stage_descriptor_masks` and deal with possible side effects of
that, for now let's always regenerate all descriptor program data sections no
matter the stage mask.

Fixes the following:
  dEQP-VK.pipeline.monolithic.dynamic_offset.graphics
    .{multi,single_}set.{storage,uniform}_buffer.numcmdbuffers_1
    .sameorder.numdescriptorsetbindings_2.numdynamicbindings_1
    .numnondynamicbindings_0

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
8a92ee673e pvr: fix msaa setup for resolve TQs
Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
1ed8fb9cc3 pvr: Use a pixel size of 0 for invalid pbe accum formats
In `pvr_create_renderpass_hwsetup()` we use the size of the pbe accum format to
setup a mask for the valid parts of the output regs.

For formats such as `E5B9G9R9_UFLOAT_PACK32` which aren't supported as colour
attachments, `vkCreateRenderPass()` can still be called so to avoid undefined
behavior we use `0` as the bitsize.

Fixes `Unknown pbe accum format. Implementation error` for:
  dEQP-VK.api.granularity.in_render_pass.e5b9g9r9_ufloat_pack32
  dEQP-VK.api.granularity.multi.e5b9g9r9_ufloat_pack32
  dEQP-VK.api.granularity.random.e5b9g9r9_ufloat_pack32
  dEQP-VK.api.granularity.random.r32g32b32_uint
  dEQP-VK.api.granularity.random.r32g32b32a32_sint
  dEQP-VK.api.granularity.single.e5b9g9r9_ufloat_pack32

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
9a94a28bf4 pvr: cleanup 2101010 int format handling
There is an actual PBE accum format for this, so use that.

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
972dd866ad pvr: fix intermediate size when configuring mrt setup
The accumulation format must be used here, not the final PBE emitted format.

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
ab2be6a224 pvr: Fix barier->barrier typo
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Simon Perretta
fda6904060 pvr: Add missing feature check in compute cmd stream
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
bd8c8e4af9 pvr: minor vulkan driver formatting fixes
clang-format the code.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:33 +00:00
Samuel Pitoiset
9fda96db5b ci: uprev vkd3d-proton to 59d6d4b5ed23766e69fe252408a3401d2fd52ce8
It contains few fixes for recent DGC tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31796>
2024-10-23 15:47:54 +00:00
Sviatoslav Peleshko
ebd6738260 intel/elk/chv: Implement WaClearArfDependenciesBeforeEot
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/31746>
2024-10-23 15:02:27 +00:00
Sviatoslav Peleshko
2a4efe21c5 intel/brw/gfx9: Implement WaClearArfDependenciesBeforeEot
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11928
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/31746>
2024-10-23 15:02:27 +00:00
Daniel Schürmann
e8472d484f aco/spill: use float division for score() calculation rather than integers
This was the original intention and should result in more fine-grained
and thus better decisions.

Totals from 63 (0.08% of 79395) affected shaders: (Navi31)
Instrs: 3173500 -> 3174012 (+0.02%); split: -0.01%, +0.02%
CodeSize: 16345348 -> 16349288 (+0.02%); split: -0.01%, +0.03%
Latency: 18528036 -> 18526082 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 3619125 -> 3618709 (-0.01%); split: -0.02%, +0.01%
VClause: 82654 -> 82648 (-0.01%)
SClause: 61256 -> 61257 (+0.00%); split: -0.00%, +0.01%
Copies: 250037 -> 250158 (+0.05%); split: -0.06%, +0.11%
Branches: 101302 -> 101303 (+0.00%)
VALU: 1791447 -> 1791435 (-0.00%); split: -0.00%, +0.00%
SALU: 401898 -> 402007 (+0.03%); split: -0.03%, +0.06%
VOPD: 730 -> 741 (+1.51%)

Totals from 40 (0.06% of 63053) affected shaders: (Vega10)

Instrs: 161584 -> 161567 (-0.01%); split: -0.04%, +0.03%
CodeSize: 891168 -> 891004 (-0.02%); split: -0.04%, +0.03%
Latency: 3550766 -> 3549770 (-0.03%); split: -0.05%, +0.03%
InvThroughput: 2627028 -> 2626484 (-0.02%); split: -0.03%, +0.01%
VClause: 2970 -> 2971 (+0.03%)
SClause: 4203 -> 4205 (+0.05%); split: -0.26%, +0.31%
Copies: 19923 -> 19893 (-0.15%); split: -0.44%, +0.29%
VALU: 116045 -> 116054 (+0.01%); split: -0.01%, +0.02%
SALU: 22100 -> 22066 (-0.15%); split: -0.39%, +0.24%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31769>
2024-10-23 14:35:29 +00:00
Daniel Schürmann
30d85b23ef aco/spill: fix faulty assertions
By unintentionally using integer division for score(), these
assertions were likely to be raised by accident.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31769>
2024-10-23 14:35:29 +00:00
Boris Brezillon
1a9b504e57 pan/bi: Add support for nir_texop_lod
The TEXC(GRDESC) instruction returns the LOD for a given texture
coordinates. Use it to implement nir_texop_lod.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Boris Brezillon
e317136536 pan/va: Add support for nir_texop_lod
The TEX_GRADIENT instruction returns the LOD for a given texture
coordinates. Use it to implement nir_texop_lod.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Constantine Shablia
ec0646a0b3 pan/va: Define the TEX_GRADIENT instruction
Define the TEX_GRADIENT instruction in valhall/ISA.xml, and add the
necessary bits to the compiler to expose it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Boris Brezillon
9ad80a86c9 pan/va: Don't set bit 26:27 on texture instructions
These bits are reserved in the spec. Even if setting them is harmless,
we'd rather keep them zero just in case.

Suggested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Boris Brezillon
c80e182019 panvk: Fix the maximum sampler LOD bias
The LOD bias in encoded in a signed 8.8 fixed point, meaning the valid
range is [-128,+127.966] not [-255,+255]. Since .maxSamplerLodBias
encodes an absolute value not a range, we make it [-127.996,+127,996].

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Daniel Schürmann
d5581b1124 aco/live_var_analysis: check isFixed() for definitions in order to set needs_vcc
In rare cases, it could happen that during post-RA validation,
live-var-analysis sets needs_vcc = false after if was true
before register allocation.

Fixes: bb5eace0dc ('aco/live_var_analysis: check for isPrecolored flag rather than isFixed')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31791>
2024-10-23 09:42:26 +00:00
Georg Lehmann
1f9b82bb2a nir/opt_algebraic: optimize -0.0 + a
Foz-DB Navi21:
Totals from 428 (0.54% of 79395) affected shaders:
MaxWaves: 8510 -> 8512 (+0.02%)
Instrs: 731062 -> 729665 (-0.19%); split: -0.19%, +0.00%
CodeSize: 3735788 -> 3728324 (-0.20%); split: -0.20%, +0.00%
VGPRs: 27328 -> 27336 (+0.03%); split: -0.03%, +0.06%
SpillSGPRs: 315 -> 314 (-0.32%)
Latency: 3872986 -> 3873236 (+0.01%); split: -0.08%, +0.09%
InvThroughput: 971001 -> 970056 (-0.10%); split: -0.17%, +0.08%
VClause: 11954 -> 11956 (+0.02%); split: -0.02%, +0.03%
SClause: 17361 -> 17358 (-0.02%)
Copies: 59038 -> 59045 (+0.01%); split: -0.22%, +0.24%
Branches: 17685 -> 17656 (-0.16%)
PreSGPRs: 26103 -> 26102 (-0.00%)
PreVGPRs: 23220 -> 23206 (-0.06%)
VALU: 515293 -> 513963 (-0.26%); split: -0.26%, +0.00%
SALU: 91591 -> 91544 (-0.05%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31770>
2024-10-23 08:58:34 +00:00
Christian Gmeiner
7dccaf6c3e etnaviv: isa: Add img_store instruction
Blob generates such img_write's for piglit's tests/cl/program/execute/image-write-2d.cl

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31774>
2024-10-23 07:58:04 +00:00
Samuel Pitoiset
3a5d40b152 radv: fix enabling/disabling user sample locations
When user sample locations are disabled dynamically, the driver should
re-emit the standard sample locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31786>
2024-10-23 06:28:20 +00:00
Marek Olšák
0226922384 nir: add nir_gather_tcs_info, new gathering/analysis pass
This does shader analysis that is more niche than regular shader info.

It's planned to be used by nir_restructure_tcs_flow as discussed here:
    https://gitlab.freedesktop.org/mesa/mesa/-/issues/11910

It's also useful for driver-specific passes.

The code for gathering "all_invocations_define_tess_levels" is copied
from radeonsi. The rest is new.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31447>
2024-10-23 03:17:16 +00:00
Russell Greene
a871eabced wsi/wayland/perfetto: supply presentation clock to perfetto
Perfetto is allowed to choose it's own default clock, and before this we just assumed the presentation times reported by the compositor are the same as perfetto's internal clock, which is not always the case. I got a nasty trace where all the wayland presents were in the wrong location. This fixes that by asking the compositor which clock it uses, then passing that along to perfetto.

A workaround for my compositor was setting use_monotonic_clock=true in the perfetto config, as my compositor (and I suspect most others) use the monotonic clock for presentation timestamps. However, asking the compositor is definitely the most correct solution.

I added a clock param to `MESA_TRACE_TIMESTAMP_{BEGIN,END}`, as it's only use that I could see was in wsi_common_wayland, and in general it seems good to be careful about which clock tracing timestamps come from.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31779>
2024-10-22 21:16:40 +00:00
Rohan Garg
2a34b492d8 anv: Xe2+ doesn't need the special flush for sparse
Fixes: 4aa3b2d ('anv: LNL+ doesn't need the special flush for sparse')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31737>
2024-10-22 20:49:07 +00:00
Tapani Pälli
dddd765553 anv: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31759>
2024-10-22 20:19:48 +00:00
Tapani Pälli
9465d6e3d7 iris: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31759>
2024-10-22 20:19:48 +00:00
David Heidelberg
562b80cf69 ci/build: Do not do LTO on any pre-merge job
Running LTO on pre-merge can be time-consuming,
especially on (over)loaded CI.

Let's keep it in nightly jobs to ensure coverage without causing
timeouts in pre-merge pipelines.

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31790>
2024-10-22 19:51:34 +00:00
David Heidelberg
72b5e4045b ci/fedora: add workaround for buggy GCC warning triggered by r600
In function 'r600_init_resource_fields',
    inlined from 'r600_buffer_create' at ../src/gallium/drivers/r600/r600_buffer_common.c:561:2:
../src/gallium/drivers/r600/r600_buffer_common.c:121:48: error: array subscript 'struct r600_texture[0]' is partly outside array bounds of 'unsigned char[256]' [-Werror=array-bounds=]
  121 |         if ((res->b.b.target != PIPE_BUFFER && !rtex->surface.is_linear) ||
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/util/os_memory.h:37

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31790>
2024-10-22 19:51:34 +00:00
Chia-I Wu
c23f7a2562 panvk: fix descriptor set layout hash
Save the hash to layout->vk.blake3, rather than the unused layout->hash.

Fixes: 73518dc169 ("panvk: Add Valhall DescriptorSetLayout implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31773>
2024-10-22 19:21:29 +00:00
Chia-I Wu
382e078659 panvk: remove unused is_sampler and is_texture
There is no user.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31773>
2024-10-22 19:21:28 +00:00
Gurchetan Singh
ceefcbecd5 gfxstream: move generate-gfxstream-vulkan.sh script
This moves the generate-gfxstream-vulkan.sh script
to upstream Mesa too.  Right now, Mesa is the source
of truth for both guest and host codegen.

There needs to be a simple way to invoke genvk.py
for users.  The script assumes the AOSP directory
structure to find gfxstream host, but the user may
also pass the path to gfxstream as the first argument.

Please run this from the src/gfxstream/codegen directory.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31775>
2024-10-22 18:36:16 +00:00
Serdar Kocdemir
b318fbbd42 gfxstream: Check metal extension for external memory
Enable guest side support for external memory on host devices
with VK_EXT_external_memory_metal extension.
Keeping old moltenvk extension check for backwards compatibility.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31775>
2024-10-22 18:36:16 +00:00
Georg Lehmann
5da34ebee4 aco/insert_exec: remove get_exec_op
We used to only store Temps in the stack, so undef meant exec.
Then the stack was changed to operands, and some places started storing exec
directly, drop the undef handling by replacing everything with Operand(exec, lm)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
8d148401cb aco/ir: rework Operand equality to return true for equal fixed non-temp ops
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
6716fb08d8 aco/insert_exec: remove unused includes
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
23fb0883eb aco/insert_exec: untangle add_branch_code control flow
All of the single ifs with return hide that this is effectively almost an
if-else chain, so convert it to one for real.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00