feat(d3d12_x): create Vulkan image views and samplers from D3D12 view and sampler descriptions #50
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!50
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/50/head"
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?
@Dark3581 on GitHub · 2026-11-22 21:43 UTC · original
Dark3581:feat/views-samplers→main· +1017 −6 · 9 files · 1 commits · merged 2026-11-22 21:47 UTCWhat
resources/ViewDesc.cpp:ShaderResourceView,UnorderedAccessView,RenderTargetViewandDepthStencilViewturn a texture's view description (or none, for the default view) into aVkImageViewCreateInfo:-1meaning the rest, checked against the texture;Shader4ComponentMappingdecoded into a swizzle (components and forced 0 or 1), and alpha read as 1 forB8G8R8X8views;R32_FLOAT_X8X24_TYPELESSdepth,X32_TYPELESS_G8X24_UINTstencil with plane slice 1);TranslateSampler: filters (point, linear, anisotropic up to 16), comparison samplers, min and max reduction, the five address modes, the three preset border colors, the mip LOD bias and the LOD range (D3D12_FLOAT32_MAXas no clamp).imageCubeArray,samplerAnisotropy,samplerFilterMinmaxandsamplerMirrorClampToEdgewhen offered; views and samplers record what they need.How these views relate to the console descriptor words a title writes into its descriptor heaps is not known yet; the debt fragment says so.
Tested
Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer.
pso_probe views-selftest: component mappings (identity, forced values, invalid), 17 view cases translated and 12 checked field by field, 21 view refusals, 5 samplers checked field by field and 6 sampler refusals. Writing it found that the default shader resource view of a single 2D texture filled the array member of the union (its array size read as a minimum LOD clamp); fixed.pso_probe views-gpu --validate: the 17 views on real images (bound to memory) and the 5 samplers: 22 created, 0 validation errors. Both run in thepipeline_statetest.ctest: 66 of 66. Thed3d12_xtargets also build with MSVC 2022 (which caught anumeric_limits<...>::max()hit by the<windows.h>macro; fixed).python tools/check_conventions.pyanddebt_fold.py --check: ok.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md