Skip to content

d3d12: support R9G9B9E5_SHAREDEXP & B5G5R5A1_UNORM UAVs via castable formats - #188

Merged
brcly merged 2 commits into
brcly:mainfrom
Vladimir-Human:d3d12/geforce-r9g9b9e5-uav
Nov 25, 2026
Merged

brcly merged 2 commits into
brcly:mainfrom
Vladimir-Human:d3d12/geforce-r9g9b9e5-uav

Conversation

@Vladimir-Human

Copy link
Copy Markdown
Contributor

AI-assisted PR.

Summary

Adds native-gated castable-format UAV support for DXGI_FORMAT_R9G9B9E5_SHAREDEXP (aliased to R32_UINT) and DXGI_FORMAT_B5G5R5A1_UNORM (aliased to R16_UINT) so typed UAVs on packed formats work cleanly on GPUs without native typed UAV support for those formats (for example NVIDIA GeForce 10de:2783 where yped_uav: R9G9B9E5=0 B5G5R5A1=0), while preserving the native path on adapters/drivers that support them directly (such as WARP 1414:008c).

Key Changes

  • Native adapter gating: Checks native typed-UAV capability across resource creation, heap allocation, placement, reserved resources, memory copies, and UAV view creation (
    untime/d3d12/src/device/dxgi.rs, �llocation.rs,
    esources.rs, heap.rs, placement.rs,
    eserved.rs, copy_memory.rs, �iews.rs).
  • Castable legacy-timeline creation: Uses D3D12_BARRIER_LAYOUT_COMMON resource creation combined with lazy per-device legacy InitTransition (COMMON -> host_initial when non-COMMON and non-simultaneous), keeping COPY-queue copies, implicit promotion/decay after UAV -> COMMON, reserved resources, placed aliased resources, and SIMULTANEOUS_ACCESS|UAV on D3D12's native legacy state timeline.
  • Buffer & null UAV handling: Handles non-null buffer typed UAVs before �yte_view and native CreateUnorderedAccessView (�iews/creation.rs, �iews/addressed.rs).
  • Tests: Added regression and live GPU/WARP allocation & view tests ( ests/device/allocation.rs, ests/device/allocation_regressions.rs, ests/device/views.rs).

Verification (91a9de2)

@brcly
brcly merged commit b5ed526 into brcly:main Nov 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants