Commit Graph

189914 Commits

Author SHA1 Message Date
Samuel Pitoiset
a9f4931a91 ac,radv,radeonsi: a function that sets mutable CB surface fields
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29378>
2024-05-28 08:49:53 +00:00
Tapani Pälli
6836118cd2 anv/android: enable emulated astc for applications
This layer was blocking Android emulated ASTC support as it did not
take "emu_astc_ldr" in to account.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29415>
2024-05-28 08:11:49 +00:00
Konstantin Seurer
28be0cca45 radv: Add locking to radv_replay_shader_arena_block
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29169>
2024-05-28 07:11:02 +00:00
Konstantin Seurer
c31038ef98 llvmpipe: Use a second LLVMContext for compiling sample functions
LLVMContextr is not thread safe. There are many code paths that use
llvmpipe_context::context and adding locking to all of them is
difficult and adds unnecessary overhead. This approach restricts locking
to lp_sampler_matrix, which makes covering all uses of the LLVMContext
easy and only adds overhead when running lavapipe.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29397>
2024-05-28 06:30:58 +00:00
Iago Toral Quiroga
a93b1960af v3dv: emit a default point size when drawing points
Before VK_KHR_maintenance5 point size is undefined unless the
shader explicitly writes it, but this extension changes this and
expects a default point size of 1.0 if none has been written.

We accomplish this by emitting a POINT_SIZE packet with the
default point size the first time we draw with a POINT primitive
in the job. If the shaders used in the draw call doesn't write
point size then the hardware will take the point size from the
state set by the packet. If the shader does write to point size
then the value written in the shader will be used instead.

Passes all tests we support in:
dEQP-VK.rasterization.primitive_size.default_size.points.*
when forcing maintenance5 enabled.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29413>
2024-05-28 05:31:13 +00:00
Iago Toral Quiroga
7e0616ecc5 v3dv: only flag 'shader writes point size' if the shader actually writes it
If the shader writes point size, then the compiler needs to ensure it
writes it in the appropriate vpm output slot and also clamp its value to
expected limits. This is why we have the per_vertex_point_size in the
shader key, so it doesn't really make sense to set this if the shader
doesn't write point size.

If the shader record flags that the shader writes point size then the
hardware will use the shader written value to override point size state
(set with the POINT_SIZE packet), so again, we really only want to set
this in the shader state record if the shader actually writes its value.

While we could also limit this to point primitives, since these are the
only primitives where point size has an effect, this is not really
required, and skipping this allows us to use the same shader with any
primitive type (otherwise we would have to compile 2 different shaders).

Finally, this change makes the vertex shader setup for point size match the
one we had been doing for geometry shaders, so it makes both stages behave
consistently regarding point size behavior.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29413>
2024-05-28 05:31:13 +00:00
Iago Toral Quiroga
c30833f233 broadcom/compiler: check if vertex shader writes point size
The same we already check for geometry shaders. We will use this
shortly.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29413>
2024-05-28 05:31:13 +00:00
Karol Herbst
7c07f1cdfb nouveau: import nvif/ioctl.h file from libdrm_nouveau
Technically this is UAPI and should be moved into the UAPI headers, but
for now let's unbreak users this way.

Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29420>
2024-05-27 22:23:41 +00:00
Konstantin Seurer
9b932aadf4 radv: Remove radv_cmd_dirty_dynamic_bits
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29345>
2024-05-27 20:34:36 +00:00
Sergi Blanch Torne
d963fd596e ci: fix stress counter in run'n'monitor
The stress counter after enable_job(retry), often stores the new status
instead of the job complete. So, the summary printed later doesn't show the
real evolution of the test.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29416>
2024-05-27 20:30:36 +00:00
José Roberto de Souza
a47c5c9eee intel/perf: Add intel_perf_stream_read_samples()
Because of the differences between i915 and Xe KMD this function is
needed to abstract the special handling that Xe KMD needs while
reading perf stream.
This special handling will be implemented in the next patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
9841aeb6ad intel/perf: Add a macro with header + sample length
To be more explicit lets have 2 macros one with sample lenght other
with header and sample length.

This will also help add Xe KMD support as it don't have a header like
i915.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
2f128b2ba5 intel/perf: Replace drm_i915_perf_record_header by intel_perf_record_header
drm_i915_perf_record_header requires i915_drm.h but we want to remove
all i915_drm.h includes from common code, so replacing it by
intel_perf_record_header.

No changes in behavior expected as the structs and enums are identical.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
da43bf3f2e intel/perf: Allocate sseu in heap memory
This is a i915 specific struct and Xe KMD will not need anything like
that so lets allocate it in heap memory.
This will help us remove the i915_drm.h includes from common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
e1c2847b81 intel/perf: Move i915 specific code to load configurations to i915 file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
30f97a7242 intel/perf: Move i915 specific code from common code
More code will be moved to i915 specific files in the next patches.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
8ad56247c3 intel/perf: Move code that will be shared by both KMDs
More code will be shared in the next patches.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
b601e4a18f intel/perf: Replace I915_OA_FORMAT_* usage by platform check
Removing more i915_drm.h usage from common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
3d2c3dc62b anv: Nuke perf_query_pass from anv_execbuf
It is set but not read.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
José Roberto de Souza
0442803eee intel/perf: Fix return of read_oa_samples_until()
read_oa_samples_until() was returning OA_READ_STATUS_ERROR even
if already read samples, then it tried again and KMD returned 0/empty
or EAGAIN(as the read would block).

This is not causing any issue because read_oa_samples_for_query()
FALLTHROUGH OA_READ_STATUS_ERROR to OA_READ_STATUS_FINISHED
but that I think it is worthy to fix it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
2024-05-27 19:34:06 +00:00
Yusuf Khan
42ee8d80d9 zink/query: begin time elapsed queries even if we arent in a rp
If we arent in a renderpass, but still wanna start the time elapsed
query(eg. to figure out how long some random operation will take) then
this seems to fix that case.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29411>
2024-05-27 18:47:34 +00:00
Italo Nicola
62c8e58f39 nir: add {load,store}_global_etna intrinsics
Acked-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29402>
2024-05-27 17:58:51 +00:00
Tomeu Vizoso
7e7ee6a604 etnaviv: handle missing alu conversion opcodes
Acked-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29402>
2024-05-27 17:58:51 +00:00
Samuel Pitoiset
348ea02801 radeonsi: use the common helper for initializing CB surfaces
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29342>
2024-05-27 17:04:27 +02:00
Samuel Pitoiset
07c6fdb878 radv: use the common helper for initializing CB surfaces
This adds GFX12 support implicitly.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29342>
2024-05-27 17:04:26 +02:00
Samuel Pitoiset
3f7a36a9fb amd/common: add a function to initialize cb surface
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29342>
2024-05-27 17:04:26 +02:00
Samuel Pitoiset
1935e63545 radv: align DCC control settings to RadeonSI for GFX8
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29342>
2024-05-27 17:04:26 +02:00
David Rosca
103da56fba radeonsi/vcn: Avoid copy when resizing bitstream buffer
The copy from old buffer is only needed when appending (when
decode_bitstream is called more than once in one frame).
This avoids map old buffer -> memcpy to new buffer which can get
expensive with large buffers.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29318>
2024-05-27 13:28:54 +00:00
Danylo Piliaiev
0954afff5d turnip/msm: Do rd dump only when there are commands in submission
Dumping per-submission RDs when replaying d3d11 capture resulted in a
surprising number of empty RDs.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29359>
2024-05-27 12:29:32 +00:00
Rhys Perry
c9f5152ddd radv: malloc graphics pipeline stages
This uses a lot of stack, which is apparently a problem for musl libc.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29379>
2024-05-27 10:22:45 +00:00
Samuel Pitoiset
139bc6b813 radeonsi: use common build buffer descriptor helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29385>
2024-05-27 08:17:58 +02:00
Samuel Pitoiset
3c5173aabf ac,radv: add a stride parameter to ac_build_attr_ring_descriptor()
For RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29385>
2024-05-27 08:17:58 +02:00
Samuel Pitoiset
bb623b6144 amd/common: add a helper to set the third word of buffer descriptor
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29385>
2024-05-27 08:17:58 +02:00
David Rosca
cc03f2ea5a frontends/va: Fix leak when destroying VAEncCodedBufferType
Fixes: be4287c3aa ("pipe: Extend get_feedback with additional metadata")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29217>
2024-05-27 05:55:00 +00:00
David Heidelberg
19a875f7dc ci/freedreno: document new failure after piglit update
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29407>
2024-05-26 22:30:39 -07:00
Cong Liu
62b490fa92 nir: Fix out-of-bounds access in ntt_emit_store_output()
This patch resolves the problem by modifying the for loop condition
to ensure that it stays within the bounds of the array (i.e., i < 4)

Signed-off-by: Cong Liu <liucong2@kylinos.cn>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25446>
2024-05-27 09:13:04 +08:00
Valentine Burley
d93d989e5d wsi: Guard DRM-dependent function implementations with HAVE_LIBDRM
Adress an implicit function declaration error by ensuring that DRM-dependent
functions are only compiled when HAVE_LIBDRM is set.

Fixes: 59813ae468 ("wsi: Add common infrastructure for explicit sync")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29267>
2024-05-26 19:48:16 +00:00
Rob Clark
930e4fa283 vulkan/android: Fix suggestedYcbcrModel with !mapper4
Only mapper4 supports u_gralloc_get_buffer_color_info(), other gralloc
implementations do not.  So add a fallback, so that we aren't telling
the app that the suggestedYcbcrModel is RGB_IDENTITY.  We only go down
this path for YUV formats.

Fixes android.graphics.cts.BasicVulkanGpuTest#testBasicBufferImportAndRenderingExternalFormat

Fixes: 8732a619f1 ("vulkan/android: Add common vkGetAndroidHardwareBufferPropertiesANDROID")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29391>
2024-05-25 14:52:54 +00:00
Faith Ekstrand
67a3c81286 nak: Encode LDC directly
This instruction is so restricted that encode_alu() really isn't gaining
us much so we may as well just type it out.  Also, the bindless version
is quite a bit different and doesn't follow the ALU patterns so it'll
make more sense to do it this way long-term.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29393>
2024-05-25 13:26:38 +00:00
Faith Ekstrand
4366d4d181 nak: Don't emit a plop3 for immediate shift sources
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29393>
2024-05-25 13:26:38 +00:00
Faith Ekstrand
d8b2d25052 nak: Add with -0 for fabs()
Adding with +0 is technically fine because the other source has abs()
applied and a non-negative value added to +0 is a no-op.  However, copy
propagation won't detect that properly as of a43e6addca ("nak: Fix
fneg to do fadd(-0, x)")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29393>
2024-05-25 13:26:38 +00:00
Faith Ekstrand
8061ed728a nak: Emit !PT for carries on IADD3
They seem to be ignored by the hardware but the blob emits them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29393>
2024-05-25 13:26:38 +00:00
Valentine Burley
c1a4fcbb4a freedreno/ci: Update expectations
Created by ci-collate from the following pipeline:
https://gitlab.freedesktop.org/Valentine/mesa/-/pipelines/1184168

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29373>
2024-05-25 09:05:40 +00:00
David Heidelberg
890222fb5b ci/lava: move wayland-protocols to the main section
Since Piglit buildsystem changes, we know it's already available
in all images anyway as we build with Wayland by default.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29370>
2024-05-25 06:28:45 +00:00
David Heidelberg
97a081d41a ci/lava: do not build Vulkan for armhf images
No hardware running armhf images has Vulkan at this moment,
rather ship smaller images.

Do not build VK-CTS for armhf (behind BUILD_VK flag now).

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29370>
2024-05-25 06:28:45 +00:00
David Heidelberg
61c07cc1d9 ci/lava: enable Piglit OpenCL tests so we can test rusticl on the HW
THe CI job will follow in separate MR.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29370>
2024-05-25 06:28:45 +00:00
David Heidelberg
a14e91981a ci/piglit: be explicit about what we building
Now CI will easily fail build, when needed dependency is not present,
instead of building without it.

Shortens build for VK container, where we use only replayer.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29370>
2024-05-25 06:28:45 +00:00
David Heidelberg
312b50da5c ci: do not build Nine in debian-build-testing
Since we started testing on machines, it's already in debian-testing,
and we want to have these builds fast.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28648>
2024-05-24 21:39:57 +00:00
David Heidelberg
f7cf53a0b1 ci: re-enable shader-db for nouveau
As we have separate jobs, failure won't trigger an extra 20m of waiting.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28648>
2024-05-24 21:39:57 +00:00
Martin Roukala (né Peres)
addeb5ca9a radv/ci: add a bunch of flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29381>
2024-05-24 21:05:46 +00:00