Prepare Crocus code for addition of virtio native context support by
open-coding drm prime ioctls instead of using libdrm helpers and using the
intel_ioctl() helper. This is needed by virtio to be able to override the
ioctls implementation.
Suggested-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
Add virtio-gpu native context support to ANV driver.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
Prepare Iris code for addition of virtio native context support by
open-coding drm prime ioctls instead of using libdrm helpers. This
is needed by virtio to be able to override the ioctls implementation.
Suggested-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
Add virtio-intel native DRM context base preparatory code. Virtio-intel
works by passing ioctl's from guest to host for execution, utilizing
available VirtIO-GPU infrastructure.
This patch adds initial experimental native context support using i915
KMD UAPI.
Compile Mesa with -Dintel-virtio-experimental=true to enable virtio-intel
native context support.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
Check whether userptr UAPI presents and disable userptr features if not.
Kernel i915 driver has config option that disables userptr ioctl. The
ioctl also may not present in a case of virtio native context driver.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
Here we speedup nir_find_inlinable_uniforms() by making sure we only
check a src is inlinable once.
If we have a bunch of nested if-statements where the conditions keep
building on the alu chains of previous conditions we can end up
with exponential processing times due to repeatedly processing the
same srcs over and over.
A big cause of the exponential grow seems to be instructions like
`ffma %594, %594, %599` or `fmul %600, %600` where each essentially
causes us to process the entire previous part of the chain
twice.
Shaders such as that in issue #14663 took multiple minutes to
compile previously, calling collect_src_uniforms billions of times
and now compile within a second with this change.
Closes: mesa/mesa#14663
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39664>
Since glibc-2.43:
For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.
https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html
Resolves the following warnings:
src/mesa/glapi/glapi/gen/enums.c: In function '_mesa_enum_to_string':
src/mesa/glapi/glapi/gen/enums.c:7799:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
7799 | elt = bsearch(& nr, enum_string_table_offsets,
| ^
../src/egl/main/egldispatchstubs.c: In function 'FindProcIndex':
../src/egl/main/egldispatchstubs.c:52:7: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
52 | bsearch(name, __EGL_DISPATCH_FUNC_NAMES, __EGL_DISPATCH_COUNT,
| ^~~~~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39707>
Commit cf4bd2e412 added a fast path for handling no-command submits to
accommodate a kernel behavior quirk. Sparse support was complete before
that change but landed afterwards, leaving sparse submits that don't have
command buffers but do have sparse bind commands to take that fast path,
leaving the bind commands unhandled. The condition for the fast path is
fixed to address that.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 71ef46717c ("tu/kgsl: Add support for sparse binding")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39695>
After successful initialization of images, `result` is `VK_SUCCESS`. But
there are still a few failure paths, in which cases
x11_surface_create_swapchain will return `VK_SUCCESS` but not actually
allocate a swapchain.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37800>
Fixes a race condition where a BVH will be dumped before its command buffer is
actually submitted if a different command buffer completes between the time the
BVH dump is recorded and the time the command buffer is actually submitted.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Fixes: 1b55f101 ("anv/bvh: Dump BVH synchronously upon command buffer completion")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39599>
We are having problem establishing connections to
gitlab.freedesktop.org, even though performance once the link is
established is perfectly fine (10+ MB/s)... so let's disable the
farm until we can figure it out.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39719>
This change only addresses the clear of one channel via the TQ for DS
formats. This is exercised by VK_KHR_depth_stencil_resolve in two ways:
resolve depth and clear stencil, or resolve stencil and clear depth.
When resolving, we need to propagate source and destination format if the
DS format is combined because we need either combination of both for cases
where the DSMERGE and PICKD flags are set.
- Resolve op
+ For combined DS formats
1. resolve the stencil from the source merging it with the depth of the
destination. Leave source depth unchanged.
2. resolve the depth from the source merging it with the stencil of the
destination. Leave the source stencil untouched.
+ For non-combined formats
1. we can use the source for all aspects / channels, this ensures the
size to blit the source to is compatible with the destination. Note
that the TQ doesn't require src/dst to be single channel formats.
- Non resolve op
+ Not part of this change.
Fix for deqp:
dEQP-VK.renderpass2.depth_stencil_resolve.*.*.d24_unorm_s8_uint.compatibility*
dEQP-VK.renderpass2.depth_stencil_resolve.*.*.d32_sfloat_s8_uint.compatibility*
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Co-authored-by: Leon Perianu <leon.perianu@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39654>
In order to set DSMERGE, and eventually PICKD-epth, both the source and
the destination have to be combined D/S formats.
Removed tests that now currently pass
Fix for deqp:
dEQP-VK.renderpass2.depth_stencil_resolve.*.*.d32_sfloat_s8_uint.*
dEQP-VK.renderpass2.depth_stencil_resolve.*.*.d24_unorm_s8_uint.*
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39654>
Fix loop condition in pvr_isp_ctrl_stream to reset fill_blit
when processing fill blits with sources.
Fix for deqp:
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_17_1.*.d24_unorm_s8_uint.*
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.*.d24_unorm_s8_uint.*
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_5_1.*.d24_unorm_s8_uint.*
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_8_32.*.d24_unorm_s8_uint.*
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_8_32.*.d24_unorm_s8_uint.*
Signed-off-by: Leon Perianu <leon.perianu@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39654>
Since d95423686f ("pan/format: Add PAN_BIND_STORAGE_IMAGE flag"), we
have a separate flag for PAN_BIND_STORAGE_IMAGE, and can now also
properly check for this.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39686>
There's no good reason we need to keep these separated, they're the same
feature from a HW point-of-view.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39686>
This is to make sure early culling related Wa_16020518922 is enabled
properly.
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/39712>