Files
packages/anda/lib/mesa/12633.patch
T
Raboneko bac18ff6dd fix: Add patch for Intel Battlemage + Valve Gamescope (#3420) (#3421)
(cherry picked from commit 1238fbddad)

Co-authored-by: Kyle Gospodnetich <me@kylegospodneti.ch>
2025-02-18 12:09:18 +08:00

27 lines
1.2 KiB
Diff

commit d0279e717ee740746f0770c5a9870d752108e756 (HEAD -> makepkg)
Author: Maarten Lankhorst <maarten.lankhorst@intel.com>
Date: Mon Feb 17 14:55:29 2025 -0800
HACK: drm/xe gamescope fix
Workaround gamescope DRM issues on Xe by allocating ANV_BO_ALLOC_SCANOUT
when using VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4292#note_2784316
Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 1884932bbc7..cbc1b4aad87 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1533,6 +1533,9 @@ VkResult anv_AllocateMemory(
dedicated_info->image != VK_NULL_HANDLE) {
ANV_FROM_HANDLE(anv_image, image, dedicated_info->image);
+ if (image->vk.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
+ alloc_flags |= ANV_BO_ALLOC_SCANOUT;
+
/* Apply implicit sync to be compatible with clients relying on
* implicit fencing. This matches the behavior in iris i915_batch
* submit. An example client is VA-API (iHD), so only dedicated