[PR #849] [CLOSED] d3d12: fall back to staging copies when host-transfer image has no memory type #886

Closed
opened 2026-11-26 20:19:23 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/849
Author: @kotekompotek
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: work/d3d12-host-image-copy-fix


📝 Commits (1)

  • 0c862ea d3d12: fall back to staging copies when host-transfer image has no memory type

📊 Changes

2 files changed (+23 additions, -3 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+2 -0)
📝 runtime/shims/d3d12_vulkan_device.cpp (+21 -3)

📄 Description

Claimed in the coordination issue as: coordination issue #14

What and why

  • Rebased onto current main.
  • When creating a HOST_TRANSFER image returns memoryTypeBits == 0 in vkGetImageMemoryRequirements on drivers with identicalMemoryTypeRequirements = false, destroy the probe image, log once via log_once, clear VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT, and fall back to staging copies; synced docs/d3d12_vulkan.md.

Tested

  • CTest d3d12_com (Passed, 0.61s), d3d12_d24_support (Passed, 0.39s), d3d12_shader_cache (Passed, 1.06s), and d3d12_subresource_copy (Passed, 0.79s) -> 4/4 Passed.
  • In d3d12_vulkan_device_test: both WriteToSubresource/ReadFromSubresource (host image copy) and (staging copy) matched ([rt] d3d12: host-transfer image had no usable memory type; falling back to staging copies, usage 4194311); pre-existing unrelated invalid arguments heap mismatch at line 7317 fails on this Windows host.

GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/849 **Author:** [@kotekompotek](https://github.com/kotekompotek) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `work/d3d12-host-image-copy-fix` --- ### 📝 Commits (1) - [`0c862ea`](https://github.com/ubiquitarianism/leonida/commit/0c862ea6ee999943ca2b309cdda84369643e49ed) d3d12: fall back to staging copies when host-transfer image has no memory type ### 📊 Changes **2 files changed** (+23 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+2 -0) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+21 -3) </details> ### 📄 Description Claimed in the coordination issue as: coordination issue #14 ### What and why - Rebased onto current `main`. - When creating a `HOST_TRANSFER` image returns `memoryTypeBits == 0` in `vkGetImageMemoryRequirements` on drivers with `identicalMemoryTypeRequirements = false`, destroy the probe image, log once via `log_once`, clear `VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT`, and fall back to staging copies; synced `docs/d3d12_vulkan.md`. ### Tested - CTest `d3d12_com` (`Passed`, 0.61s), `d3d12_d24_support` (`Passed`, 0.39s), `d3d12_shader_cache` (`Passed`, 1.06s), and `d3d12_subresource_copy` (`Passed`, 0.79s) -> `4/4 Passed`. - In `d3d12_vulkan_device_test`: both `WriteToSubresource/ReadFromSubresource (host image copy)` and `(staging copy)` matched (`[rt] d3d12: host-transfer image had no usable memory type; falling back to staging copies, usage 4194311`); pre-existing unrelated `invalid arguments heap` mismatch at line 7317 fails on this Windows host. GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:23 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#886
No description provided.