mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #1810] [CLOSED] d3d12: support LEONIDA_HOST_IMAGE_COPY=0 to force staging texture copies (RT-HOST-IMAGE-COPY-ENV) #1823
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#1823
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/1810
Author: @abnalstlll-byte
Created: 11/25/2026
Status: ❌ Closed
Base:
main← Head:feat/rt-host-image-copy-env📝 Commits (1)
b7980d3d3d12: support LEONIDA_HOST_IMAGE_COPY=0 to force staging texture copies (RT-HOST-IMAGE-COPY-ENV)📊 Changes
4 files changed (+35 additions, -1 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+3 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+11 -1)📝
runtime/test/d3d12_vulkan_device_test.cpp(+14 -0)📝
runtime/test/vk_test_device.h(+7 -0)📄 Description
Description
This PR implements the
LEONIDA_HOST_IMAGE_COPY=0(oroff) environment variable switch, enabling community testers and CI to disableVK_EXT_host_image_copyand route all CPU texture transfers through the existing staging submit path.Context & Finding
VK_EXT_host_image_copyis the direct trigger for the fatalWRITE_INVALIDdevice loss during the transition to the first world frame (crashing at ~6,570 commands).Changes
runtime/shims/d3d12_vulkan_device.cpp:LEONIDA_HOST_IMAGE_COPYviagetenv_s. If set to"0"or"off", setinfo.host_image_copy = falseand log[rt] d3d12: LEONIDA_HOST_IMAGE_COPY=0; CPU texture copies use a staging submit.host_copyfrom the Vulkan 1.3pNextchain, omitsVK_EXT_host_image_copyfromdevice_extensions, and skips entry point loading.runtime/test/vk_test_device.h:LEONIDA_HOST_IMAGE_COPY=0inTestDevicefor consistent test harness behavior.runtime/test/d3d12_vulkan_device_test.cpp:_putenv_s("LEONIDA_HOST_IMAGE_COPY", "0")disablesmade->host_image_copyon standalone device creation and successfully executes CPU texture copies through the staging path.docs/d3d12_vulkan.md:LEONIDA_HOST_IMAGE_COPY=0under subresource copy options.Verification
python -I scripts/check_no_game_data.py: Clean-room confirmed, 0 violations.python -I tests/test_text_write_line_endings.py: 3/3 tests passed.Claimed in #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162191969).
AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.