mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #2223] d3d12: enforce Vulkan BC image-view compatibility classes #2227
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#2227
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/2223
Author: @GGandCo
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/bc-image-view-classes📝 Commits (3)
d296896d3d12: keep compressed image views within Vulkan BC classesc93cb1adocs: describe compressed-view constraints and skip unsupported bindless devices348901fMerge commit 'a73a57e133' into fix/bc-image-view-classes📊 Changes
6 files changed (+126 additions, -4 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+8 -0)📝
runtime/CMakeLists.txt(+2 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+28 -2)📝
runtime/src/gfx10_descriptors.h(+14 -1)📝
runtime/test/d3d12_existing_heap_test.cpp(+55 -1)📝
runtime/test/gfx10_descriptors_test.cpp(+19 -0)📄 Description
Claim: RT-BC-VIEW-COMPATIBILITY (#1608, https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172872105).
Same-sized compressed blocks were treated as compatible Vulkan image views. In particular, BC6H could enter a BC7 image's format list, and matching channel order could resolve BC7 to a BC1 view. These violate Vulkan compatibility classes even when the block footprint matches.
Restrict BC view resolution and castable lists to each codec's Vulkan compatibility class. Numeric twins within a codec use mutable images. CPU-filled streamed textures requested in another same-footprint BC codec get a replacement image in that requested codec, retaining their original console layout for byte addressing and removing retired codecs from the new format list. Existing uncompressed casts remain unchanged.
Validation:
db1a22d29header with the new synthetic descriptor test) fails the BC class invariant; the fixed test passes.gfx10_descriptorsandd3d12_bc_stream_viewspass withLEONIDA_VK_VALIDATION=1on Intel UHD Graphics, driver 32.0.101.6314, Windows 11. The stream fixture registers BC7 sRGB, BC6H unsigned/signed, then BC7 linear at one synthetic allocation, checks nonzero descriptor indices, and retires the images without validation errors.git diff --checkandcheck_no_game_data.pypassed.Limits: the new stream fixture checks native view registration and lifetime, not sampled pixel readback. No main-menu, audio, frame-rate or playability claim. No game data included. The full runtime/translator suites were not run for this C++ image-view change.
GPUs tested: Intel UHD Graphics (32.0.101.6314), Windows 11.
AI-assisted with OpenAI Codex.
Updated onto main
a73a57e133in348901f79. Focused clean-tree tests repeated: 2/2 pass with Vulkan validation. Preserves upstream asynchronous mapped-plane fixture. Draft only because the repository limits non-maintainers to one ready-for-review PR; #2072 currently occupies that slot.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.