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>
v2 (Sid): Handle image and ssbo atomics having only one component in
ir3, glsl, pco, and zink
Co-authored-by: Sid Pranjale <sidpranjale127@protonmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37888>
VK_IMAGE_USAGE_TRANSFER_DST_BIT is needed to recognize a surface as a
destination in get_blorp_surf_for_anv_image(). Set this image usage for
HiZ operations to correct the MOCS programming on gfx12.0.
Fixes: 08e82b28e8 ("anv: use the correct MOCS for depth destinations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42122>
Xe3P will allow us to reduce the number of anv_state_pool in use, this will
improve performance as it will result in less uAPI calls to allocate memory
and less memory waste in anv_state_pool with not much use.
As this will be a run-time decision, here I'm adding a function to get each
anv_state_pool, then we can just change the function and all the callers will
use the correct anv_state_pool.
Next patches will replace directly access to each anv_state_pool by
a function call in the next patches.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42133>
If a GLXPixmap is created without GLX_TEXTURE_TARGET_EXT,
textureTarget remains 0. Calling glXBindTexImageEXT on such a
drawable would pass 0 to _mesa_get_current_tex_object(), triggering
an internal implementation error and a null-pointer segfault.
Return early when textureTarget is 0 - the drawable was never set
up for texturing, so bind is a no-op.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Assisted-by: DeepSeek V4 Flash
Closes: #58
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42093>
VCN supports one tile only, but with multiple slice segments.
Cc: mesa-stable
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42136>