diff options
| author | kraibse <33869366+kraibse@users.noreply.github.com> | 2026-10-31 15:53:50 +0100 |
|---|---|---|
| committer | kraibse <33869366+kraibse@users.noreply.github.com> | 2026-11-01 17:29:56 +0100 |
| commit | a855e8373f5575fddd172ec7ffc56a8c3904c3fb (patch) | |
| tree | f486d7e29a6d72b16af773bafdf7c38394ed8047 /src/video_core/vulkan_common/vulkan_device.h | |
| parent | 139b7e5efb7c4181f14e987706eef26ca1f327c0 (diff) | |
vulkan: back large sparse images normally on AMD
Lazy Switch 2 sparse regions made the texture cache create large images
with no memory bound and sample them. AMD's drivers crash shortly after
the first such draw (builds 49+). Skip the unbacked-image paths on AMD
drivers; images get regular backing as in build 47.
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.h')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index d8524f6575..abd31ad904 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -326,6 +326,14 @@ public: return IsSparseBindingSupported() && features.features.sparseResidencyImage2D; } + /// Whether images with no memory bound may be sampled and used as attachments. AMD's drivers + /// fault on it (the GPU hangs shortly after the first such draw), so large images there are + /// backed normally. + bool CanUseUnbackedSparseImages() const { + const VkDriverIdKHR id = GetDriverID(); + return id != VK_DRIVER_ID_AMD_PROPRIETARY && id != VK_DRIVER_ID_AMD_OPEN_SOURCE; + } + /// Returns true for tile-based deferred renderers. bool IsTiler() const { switch (GetDriverID()) { |
