mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #2405] d3d12: check sparse buffer memory_types before sharing the tile arena #2405
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2405
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2405
Author: @pepefroge
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/intel-sparse-buffer-heap📝 Commits (1)
f0b86e1d3d12: check sparse buffer memory_types before sharing the tile arena📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
runtime/shims/d3d12_vulkan_device.cpp(+2 -2)📄 Description
Summary
Fixes D3D12→Vulkan sparse buffer tile mappings failing with
ID3D12CommandQueue::UpdateTileMappings: invalid mapping or sparse residency unavailableon Intel Arc (reported in #725).Root Cause
DeviceState::tiles_share_arena()(runtime/shims/d3d12_vulkan_device.cpp:3536) only checks whetherarena.memory_typeoverlaps the device-init probesparse_buffer_memory_types.32.0.101.9150), an actual reserved buffer'srequirements.memoryTypeBitscan excludearena.memory_type(e.g., requiring non-ReBARDEVICE_LOCALmemory rather than the arena'sDEVICE_LOCAL | HOST_VISIBLEtype).Heap::tiles()(line 9625) still took the arena fast-path, causingVulkanQueue::bind_tiles()(runtime/src/vulkan_backend.h:4164) to reject the binding (!(resource->memory_types & (1u << page.heap->memory_type))).Heap::tiles()(line 9636) previously overwrote the caller'smemory_typeswithsparse_buffer_memory_typesunconditionally instead of intersecting when overlapping.Changes
Heap::tiles()(runtime/shims/d3d12_vulkan_device.cpp:9625) with(memory_types & (1u << device_.arena.memory_type)).memory_typesvia&=(line 9636) only when it overlapsdevice_.sparse_buffer_memory_types, preserving the caller'smemoryTypeBitsotherwise.Verification (Intel Arc Pro B60, BMG-G21, Driver
32.0.101.9150)d3d12_buffer_tiles_testfailedUpdateTileMappingson every mapped buffer tile (0/12tiles).f0b86e1): (Note: the subsequent native D3D12 comparison pass ind3d12_buffer_tiles_teststill hits Intel's native D3D12 driverCopyTilesbehavior noted in #725, while the Vulkan replay side now passes 12/12 tiles).Tested on Intel Arc Pro B60 (
0xe211, Windows 11, driver32.0.101.9150); root-cause trace assisted locally via Hermes + Qwen 3.8 27B.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.