Commit Graph

179407 Commits

Author SHA1 Message Date
Mike Blumenkrantz 09eae187dd glx: use __GLXDRIdrawable more broadly instead of display type drawables
most of this usage was to get at the __DRIdrawable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 46c3bc3365 glx: move/add __DRIdrawable struct to __GLXDRIdrawable
this makes access simpler

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 476b4581d9 glx: flatten out getBufferAge a bit
more flattening to come

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 1908794023 glx: simplify kopper_get_buffer_age
these checks are pointless

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 9042e9a8c0 dri: rework drawable creation
this consolidates all the creation code into the dri frontend,
enabling a single caller from the loader

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 374f204e1e kopper: delete some redundant code
this is already done in the base dri_create_drawable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz d9027b9e7f kopper: call kopper_create_drawable directly
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz baae0940e3 dri: collapse some modifier/dmabuf checks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 140ebeaad4 dri: guard dmabuf support by loader's dmabuf support
this is sort of already implicit through checks elsewhere

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 764e17eb03 dri: further collapse dri_screen creation
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz af6d3fdf6e dri: pass has_multibuffers through from the loader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 576015f735 egl: check x11 multibuffer support before screen create
no functional changes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz ac41da32b3 glx: always set swapInterval in drisw
this isn't (currently) used by pure sw, but guarding it in a conditional
is pointless

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz b5fa2d6448 kopper: reuse loader_dri3_get_pixmap_buffer
delete more code

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 00f810c31b dri: break out get_pixmap_buffer
no functional changes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 7f8a60758e kopper: reuse dri_image_fence_sync
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz c5f55ee126 dri: rename and move handle_in_fence to dri_helpers
make this reusable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz f14ef0ee0a kopper: reuse dri3 functions
these were copied because of dependency hell and can now be consolidated

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 8cc95baf7b dri: merge in loader_dri3
this simplifies dependencies

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz 8f29aa28a5 kopper: reuse drisw_update_tex_buffer to delete some code
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz af3df1133b egl: initialize dri error code variables
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz a3de3a4501 dri: set __DRI_IMAGE_ERROR_BAD_PARAMETER if driver doesn't support dmabuf import
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Eric Engestrom 69c9bf948e turnip/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom b200a38def turnip/ci: skip timing out tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom b8358ee614 turnip/ci: document regressions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom ef88cb643a nvk/ci: document regressions
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/11736

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom 6b460189f4 nvk+zink/ci: mark spec@arb_sample_shading@samplemask .*@0\..* partition as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom 397bdb944d llvmpipe/ci: mark now-skipping test as no longer failing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Alyssa Rosenzweig 8c501a121f nak: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30573>
2024-08-19 16:35:49 +00:00
Faith Ekstrand 185379ba81 nvk: Stop leaking the descriptor table in-use set
Fixes: ef9d9b70a6 ("nvk/descriptor_table: Add support for requesting a specific index")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30724>
2024-08-19 16:17:13 +00:00
Valentine Burley f984ff40fe tu: Remove redundant bits override from lower_tex_ycbcr
This isn't needed anymore, because vk_format_get_component_bits now accesses the proper
pipe formats and therefore returns the correct bit count since the following commit:

57c81bab04 ("vulkan/format: Translate two 420_UNORM formats properly")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30493>
2024-08-19 15:36:49 +00:00
Mike Blumenkrantz 694478025d egl/glx: make detecting explicit modifier support more explicit
explicit modifier usage is different from general modifier capability

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11652, https://gitlab.freedesktop.org/mesa/mesa/-/issues/11663
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662>
2024-08-19 15:00:51 +00:00
Mike Blumenkrantz c20d6a9197 egl: make dmabuf/modifier display bools a bit more precise/intelligible
'has_modifiers' was misleading and not actually useful

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662>
2024-08-19 15:00:51 +00:00
Konstantin Seurer a77f1d04d2 llvmpipe: Use derivative intrinsics
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30584>
2024-08-19 14:09:11 +00:00
Adam Jackson e497f81603 rusticl: Add clCreateSubDevices stub
unified-runtime tries to call this unconditionally. It handles errors
correctly, but calling None here isn't an error, it's a crash. Just
return CL_INVALID_VALUE so we don't crash.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30699>
2024-08-19 13:35:40 +00:00
Thomas H.P. Andersen de0f226f84 nvk: do not overwrite test cases
without this the second test case was just overwritten by the following
cases

Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30719>
2024-08-19 13:20:30 +00:00
Konstantin Seurer d3ff76d27b radv: Synchronize shader dumping
When RADV_DEBUG=shaders is set, printing e.g. different NIR shaders from
different threads at the same time makes the output unreadable. Use a mutex
to synchronize shader dumping so that all shaders get printed in once piece.

Since we're writing everything to a file or terminal anyway, the
performance impact of forcing singlethreaded compilation is negligible.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25215>
2024-08-19 12:29:59 +00:00
Boris Brezillon d6d8bb8657 util/hexdump: Squeeze repeated patterns instead of zero-ed chunks
Our u_hexdump() squeezes 16-byte chunks filled of zeros, where the unix
hexdump squeezes repeated 16-byte chunks. Turns out panfrost/panvk dumps
can be pretty big when when VM dump is requested
(PANVK_DEBUG/PAN_MESA_DEBUG=dump) and memory regions are
filled with repeated non-zero patterns (like a Z16_UNORM buffer cleared
to 1.0, AKA 0xffff).

Avoiding the repetition of such non-zero patterns in dumps significantly
reduces the size of the dumps. It also clears any confusion for people
used to the original hexdump semantics where a star means the previous
line is repeated.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30692>
2024-08-19 11:28:18 +00:00
Lionel Landwerlin e10cbb59a5 anv: add assert to detect problematic instruction merges
We stick to a rule in the driver that each field is only set in a
single place in the driver. Therefore when merging instructions, we
should never have any bit set to 1 from both sides.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin 982106e676 anv: only set 3DSTATE_CLIP::MaximumVPIndex once
Currently we can end up merging 2 prepacked 3DSTATE_CLIP instructions
where 2 different places in the driver fill the MaximumVPIndex.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin 7c73346549 anv: remove unused macro
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin 9eff285a46 anv: fix extended buffer flags usages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bcc0ec8e6c ("anv: enable KHR_maintenance5")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
2024-08-19 10:13:09 +00:00
Lionel Landwerlin eacb8f85a2 vulkan/runtime: fix GetBufferMemoryRequirements2 for maintenance4
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2649ee0724 ("vulkan/runtime: implement vkGetBufferMemoryRequirements2()")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
2024-08-19 10:13:09 +00:00
Job Noorman e80c6d0f00 ir3: fix calling ir3_const_state_mut in the binning VS
lower_driver_param_to_ubo would call ir3_const_state_mut
unconditionally. However, since 850f2aab03 ("ir3, tu: Use a UBO for VS
primitive params on a750+"), it can be called for the binning VS,
causing an assert. This commit makes sure to only call
ir3_const_state_mut when it's really necessary to have mutable access to
the const state.

Fixes: 2c47ad7774 ("ir3: make ir3_const_state less error-prone to use")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30718>
2024-08-19 09:54:45 +02:00
GKraats 0311159bed i915g: fix count of buffers at i915_drm_batchbuffer_validate_buffers
This commit contains the fix with num_of_buffers at validation-call
at i915_drm_batchbuffer_validate_buffers.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
2024-08-18 20:19:44 +00:00
GKraats ed2123158d i915g: Screen corruption with ENOBUFS caused by fence register shortage
This commit solves the shortage-problem at the blit-functions by
checking the number of fence-registers after updating the batch.
If too many registers are used,
the batch-entries and relocs for the current blit function are
removed by setting batch->ptr and reloc_count to value before
the blit call and calling drm_intel_gem_bo_clear_relocs.
This truncated batch is flushed,
and the batch is updated again for the current blit function.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
2024-08-18 20:19:44 +00:00
Karol Herbst 93e96da945 rusticl: do not use CL vector types in bindings and code
Bindgen seems to miscompile them and I kinda thought I've done this
already in the past, but apparently not.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11722
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30710>
2024-08-18 09:23:22 +00:00
Caio Oliveira 40f77b6936 intel/brw: Avoid modifying the shader in assign_curb_setup if not needed
If there are no uniforms to push, don't emit the AND or invalidate the
shader analysis.  This affects only compute shaders.

Not a significant impact since lots of shaders end up pushing
uniforms.  Fossil-db numbers (restricted to compute pipelines only) for DG2

```
Totals:
Instrs: 3071016 -> 3070894 (-0.00%)
Cycle count: 8320268863 -> 8320264519 (-0.00%)

Totals from 122 (2.70% of 4520) affected shaders:
Instrs: 10675 -> 10553 (-1.14%)
Cycle count: 2060003 -> 2055659 (-0.21%)
```

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30631>
2024-08-17 16:25:01 -07:00
Faith Ekstrand 6a84d5439d nvk: Move the ANTI_ALIAS_CONTROL logic to the MME
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand 574798a9a8 nvk: Add macros to sort out tess parameters
We need to flip trianges from CW to CCW based on the domain origin
specified as dynamic state.  Instead of tracking all this on the CPU,
add a scratch register and do the conversion in the MME.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00