Mary Guillemard
791c2b604a
nak: move folding logic to Src::fold_imm
...
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635 >
2024-04-05 16:58:04 +00:00
Mary Guillemard
02873c4745
nak: Support unaligned swizzles in 8/16 bits vec srcs
...
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27635 >
2024-04-05 16:58:03 +00:00
Lucas Fryzek
c2ec0111b2
venus/ci: Add patch for modifiers test to check import/export bits
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
e84b6255d8
docs: update lavapipe features
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Lucas Fryzek
0507988f41
lavapipe: EXT_image_drm_format_modifier
...
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
d6cb3c5793
lavapipe: handle drm image imports
...
this creates the unbacked image with the metadata expected for use
with imports, then applies the import offset when binding memory
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Lucas Fryzek
bd4f69a0fe
lavapipe: check drm modifier info during image create
...
not doing anything except validation
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
97331d1ed4
lavapipe: handle drm image format queries
...
only LINEAR is supported, so this is easy
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Lucas Fryzek
a4290558df
lavapipe: include drm_fourcc.h
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
18c345d840
lavapipe: rework mem handle type assert to handle dmabuf
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
6df7cf4cfc
lavapipe: EXT_queue_family_foreign
...
no-op for us
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Lucas Fryzek
b3d3239fc1
llvmpipe: make it possible to import and bind unbacked resources
...
this reworks the existing import to just set some metadata and then
apply the memory region during bind with the assumption that something
else is doing the import
Also adjust ci failures for llvmpipe to represent multiplanar surfaces as
not supported
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
bfd8c12406
winsys: add more stride members to winsys_handle
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Mike Blumenkrantz
3727457884
winsys: add WINSYS_HANDLE_TYPE_UNBACKED
...
for use with lavapipe imports
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Lucas Fryzek
07f25aa785
lavapipe: EXT_external_memory_dma_buf
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:21 +00:00
Lucas Fryzek
c1657de63c
lavapipe: support VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
...
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
eb64f56b59
lavapipe: add a function for asserting external memory handle types
...
easier to expand upon
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Lucas Fryzek
ce3851d469
llvmpipe: conditionally export PIPE_CAP_DMABUF
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Lucas Fryzek
715b29d032
drisw: reuse kopper image extension vtable if modifiers/dmabuf is supported
...
this is handier than copying the same vtable again
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Lucas Fryzek
d74ea2c117
llvmpipe: Implement dmabuf handling
...
For export this is handled through the use of the udmabuf driver to
allocate a dmabuf we can control from userspace. For import this is
handled through mmap-ing a dmabuf handle. Please note that you can
only mmap a dmabuf handle if its linear and the dmabuf handle was
created with matching read and write permissions.
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Lucas Fryzek
7e5c5d313b
gallium: Add dmabuf arg to memory fd allocation API
...
Modify the memory fd allocation API to provide an argument to specify
if the allocating fd should be a dmabuf.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
e4ae665f93
winsys/drisw: implement dmabuf handling
...
this comes in two variants:
* util/memfd stuff with a header for metadata
* raw fd passing
for imports, both have to be tried since the import might be from a hw
device, but only the latter needs to be handled in winsys here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
17abe3ecbd
winsys/drisw: implement displaytarget_create_mapped
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
73d75971ab
winsys/null: implement displaytarget_create_mapped
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
23206844eb
sw_winsys: add displaytarget_create_mapped
...
this is for creating displaytargets from already-imported fds
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Mike Blumenkrantz
6e43fbdb11
drisw: reorder image extensions
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Lucas Fryzek
2b4e56ca27
llvmpipe: explicitly reject (most) yuv formats
...
use gallium fallbacks here
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805 >
2024-04-05 16:05:20 +00:00
Gert Wollny
0f97c2ec51
ntv: simplify increasing the number of dest componnets for sparse tex
...
store_def doesn't use the number of components, so we can drop the
checks for is_shador and simpliy increment the number of components.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502 >
2024-04-05 15:28:12 +00:00
Gert Wollny
0aa6c4437c
ntv: pass def->index to store_def
...
The full definition is not needed, only the index.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502 >
2024-04-05 15:28:12 +00:00
Gert Wollny
f73dc77cc7
ntv: remove store_ssa_def
...
move the code to store_def and drop store_ssa_def.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502 >
2024-04-05 15:28:12 +00:00
Gert Wollny
5415abe396
ntv: remove store_def_raw
...
it was only forwarding to store_ssa_def
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502 >
2024-04-05 15:28:12 +00:00
José Roberto de Souza
77c004f7ca
anv: Create protected engine context when i915 supports vm control
...
When has_vm_control is supported it takes a different code path and
creates one context per engine and in this code path we were not
setting the protected context flag.
The lack of this is not causing any test to fail in our CI but it is
better do what we are supposed to do.
Fixes: fd40134487
("anv: allow protected GEM context creation")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
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/28299 >
2024-04-05 15:00:24 +00:00
Timur Kristóf
f0a354a7a5
radv: Don't set driver locations for last pre-rasterization stage.
...
They were already unused, just don't set them.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:25:32 +02:00
Timur Kristóf
0dbf6e7582
radv: Don't set driver locations for FS outputs.
...
They were already unused, just don't set them.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:25:24 +02:00
Timur Kristóf
450c8f159b
radv: Don't set driver locations for mesh shaders.
...
They were already unused, just don't set them.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:25:15 +02:00
Timur Kristóf
a554e44eae
radv: Use NIR IO semantics for VS input location mapping.
...
The IO semantics already contain all the information needed
for VS inputs, so there is no need use driver locations.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:24:43 +02:00
Timur Kristóf
124202469f
ac/nir/ngg: Rename confusing driver_location variable in mesh shader lowering.
...
Mesh shader lowering never used the actual driver location
because it uses custom mapping for the I/O variables, but
it had some variables with this name, which is confusing.
Rename them to mapped_location.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:24:37 +02:00
Timur Kristóf
580baaf1e1
ac/nir/ngg: Use IO semantics for determining instance rate inputs.
...
This used the driver location by accident, which is wrong.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:24:14 +02:00
Timur Kristóf
11ced35e0a
ac/nir/ngg: Don't create dummy output variable for primitive ID.
...
This was needed by RADV in the past, but not anymore.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:23:28 +02:00
Samuel Pitoiset
14ba56718f
radv: make sure the heap budget is less than or equal to the heap size
...
Reported by Hans-Kristian.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28575 >
2024-04-05 12:43:09 +00:00
Samuel Pitoiset
a29fda1ba0
radv: move radv_printf_data to radv_printf.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
9223b80086
radv: remove old comment in radv_cs.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
6428270408
radv: move radv_queue_family_to_ring() to radv_queue.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
6e4f26827c
radv: move radv_get_user_sgpr() to radv_shader.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
80683c220b
radv: make radv_get_vgt_index_size() static
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Rhys Perry
be8b8722f9
radv: memset radv_pipeline_cache_object data
...
This silences Valgrind warnings.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28549 >
2024-04-05 11:56:25 +00:00
Rhys Perry
c3c138b10f
radv: optimize msad_4x8 to mqsad_4x8
...
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/26251 >
2024-04-05 11:01:39 +00:00
Rhys Perry
e5976bebed
amd: set has_shfr32=true
...
This appears in some FSR3 shaders and will be used for the MQSAD
optimization.
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/26251 >
2024-04-05 11:01:39 +00:00
Rhys Perry
35f9318cee
ac/llvm: implement mqsad_4x8 and shfr
...
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/26251 >
2024-04-05 11:01:39 +00:00
Rhys Perry
6b301eae36
aco: implement mqsad_4x8 and shfr
...
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/26251 >
2024-04-05 11:01:39 +00:00