The TfLiteRegistration.async_kernel field is missing initialization. Rather
than add explicit init for it, clear the whole struct to avoid future
issues. Newer versions of TFLite have added more fields.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42160>
When rounding the largest FP8 denorm up, the code ignored the updated
exponent and returned zero instead of the minimum normal value. Pack
the updated exponent in those cases.
Fixes: 2237c022a2 ("util: add float8 conversion functions")
Assisted-by: Pi coding agent (GPT-5.5)
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42155>
We were allowing a possible merge of operation across VA mappings.
This is not a valid usage and will cause a ENOSPC to be returned by the
kernel side.
This fixes Forza Horizon 6 device lost when trying to enter in-game or
benchmark mode with VK_EXT_descriptor_heap MR.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 053b7f0f30 ("nvk/nvkmd: Implement nvkmd_ctx for nouveau")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42183>
Map the format AHARDWAREBUFFER_FORMAT_Y8 directly to
VK_FORMAT_R8_UNORM.
Y8 was previously missing from the mapping list, forcing it to be
imported as an external format. This routed MSAA resolves through
the External Format Resolve path, causing driver assertions due
to missing YCbCr metadata.
Direct mapping allows Y8 to be imported as a standard color format,
bypassing EFR and using the standard color resolve path instead.
Signed-off-by: Allen Ballway <ballway@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42057>
Unlike for v_pk_fmac_f16 and v_dual_dot2acc_f32_f16, opsel_hi is
implicitly true even for inline constants operands of v_dot2c_f32_f16 on GFX11.
Fixes: 3238e64d3c ("aco/ra: create v_dot2c_f32_f16")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42151>
Just overrided the needed entrypoint.
GFXBench 5.0 uses VK_IMAGE_LAYOUT_PREINITIALIZED as the old
layout when transitioning optimally-tiled depth images. Per the Vulkan
spec, PREINITIALIZED is only meaningful for linear tiling and is
semantically equivalent to UNDEFINED for optimal tiling. Replace it with
VK_IMAGE_LAYOUT_UNDEFINED to avoid hitting unhandled layout cases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41943>
Color clears may happen via different paths: BLIT_EVENT_CLEAR, R2D, or a
draw call. And which path to take may depend sysmem/gmem selection.
The "Appendix I: Invariance" of the Vulkan spec encourages implementations
to produce the same results for the same operation.
Unfortunately I haven't found any ready-made packing functions in
the common utils.
Tested by writing edge-case color values through Vulkan ways of
clearing color, and from fragment shader.
E5B9G9R9, B10G11R11, B5G5R5, A2R10G10B10 are not handled due to
complexity.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Assisted-by: OpenAI Codex (GPT-5.5)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41972>
Depth clears may happen via different paths: BLIT_EVENT_CLEAR, R2D, or a
draw call. And which path to take may depend sysmem/gmem selection.
The "Appendix I: Invariance" of the Vulkan spec encourages implementations
to produce the same results for the same operation.
Color clears have the same issue, but with depth it's much easier to
imagine a case where this may visibly affect rendering.
Note, depth and color values have different rounding rules.
Unfortunately I haven't found any ready-made packing functions in
the common utils.
Tested by writing edge-case depth values through Vulkan ways of
clearing depth, and from vertex shader.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Assisted-by: OpenAI Codex (GPT-5.5)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41972>
Fix a Meson warning when building etnaviv without etnaviv tools:
WARNING: Build target etnaviv_isa_rs has no sources. This was never supposed to be allowed but did because of a bug, support will be removed in a future release of Meson
Arrays passed to the executable() link_with parameter are
flattened, so setting libetnaviv_isa_rs to an empty array
allows to link the etnaviv_disasm executable in the
etnaviv_isa_disasm test against only libetnaviv_encode,
as intended, but without the warning.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/11626
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42173>
When _eglNativePlatformDetectNativeDisplay fails to recognize a non-NULL
nativeDisplay pointer (e.g. an X11 Display* when Mesa was built without
HAVE_X11_PLATFORM), the old code unconditionally fell back to the
build-time _EGL_NATIVE_PLATFORM default. This could select a platform
that does not match the actual native display (e.g. Wayland for an X11
pointer), causing a crash when the wrong DRI driver tries to use the
native display as its own type.
Restructure the logic so that:
- For EGL_DEFAULT_DISPLAY: fall back to the build-time _EGL_NATIVE_PLATFORM
- For non-default displays that can't be detected: return _EGL_INVALID_PLATFORM
so that eglGetDisplay returns EGL_NO_DISPLAY instead of crashing
Assisted-by: DeepSeek V4 Flash
Closes#151
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42130>
There is no requirement that imported compressed memory is tied to an
image.
In practice it's unlikely to happen since unless drirc
anv_enable_buffer_comp is enabled we don't list the compressed memory
typed for anything but images. But you can build a case hitting the
assert without even creating an image.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 5a05a39e56 ("anv: Limit the SCANOUT flag to color images")
Fixes: b7f7f1c74f ("anv: Treat imported compressed buffers as displayable (xe2)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15578
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42121>
This splits DataType in two: A PartialDataType, which can have some
members unspecified, and DataType, which is always fully specified.
Eventually, we may want separate SrcType and DstType but for now we'll
leave them together. The important thing here, though, is that, once
you get a DataType, you no longer need to check if various bits of it
actually exist. bits() and comps() now always return non-zero values
which don't need to be wrapped in Option.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42154>
Enables support for device fault extensions if scratch page is disabled.
The address infos include the list of VM faults queried from the logical
device. Due to limitations in the API, atomic faults will always have an
addressType of write. Extra details about addresses are provided through
the "description" field when the KHR extension is used.
The vendor fault infos include status codes to differentiate between
physical hardware loss or a banned queue. If the fault is related to a
specific queue, the family index, queue index, and flags of the faulted
queue are provided through a vendor fault code and can be used to find
the queue handle using vkGetDeviceQueue.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
Prints the page faults to STDERR whenever a banned queue is detected for
added visibility to developers.
Currently, the only way to get this information without using the device
fault extension is to increase the kernel logging verbosity and check dmesg
after a lost device. In my opinion its a lot more convenient for all parties
involved if the driver could just print this directly to the log instead.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
Adds function to get the list of page faults, returns NULL if the KMD
is too old or if there was an error retrieving the data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
Adds some data types and functions for getting the list of page faults
from the KMD using the intel common library.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>
The KMDs don't give us a way to query most failure types, we have to track
the error code that was returned by the failing IOCTL to figure out when we
have a PXP invalidation or if the device got disconnected.
These hooks will also give us a place to make the driver to automatically
dump some details about a lost device to the console (such as page fault
addresses) for more visibility to developers.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41318>