Cube descriptors carry a minimum resource LOD but were excluded when building the sampled Vulkan view. Include them alongside array views so a point sample from a restricted cube cannot select an earlier mip.
4 KiB alignment now counts the 4 KiB tiles covering the top mip of one
slice (at most 16; a volume's depth counts), instead of fitting the whole
image in 64 KiB. Multi-resource totals round up to the largest alignment,
saturate instead of wrapping, and an empty query is {0, 1}. Simultaneous
access with depth-stencil or MSAA, and a depth-stencil volume, are refused.
All measured against the host runtime on an RTX 5070 and WARP.
Set 0's 2D, sampler and storage arrays were constexpr (4096 2D images, 1024
samplers, 256 per storage array): one full D3D12 sampler heap (2048) did
not fit and bind_image/bind_sampler fell back. They are now sized once, when
the device creates the set, from the update-after-bind or plain limits:
today's sizes as the floor, then samplers up to min(4096,
maxSamplerAllocationCount - 64), 2D images up to 65536, storage up to 4096.
Sizing at creation keeps the set layout fixed for the pipelines built on it.
Shaders that build an S# from immediates look it up through the descriptor
hash probe like any other S#, but nothing registered those keys, so they
sampled through the fallback nearest-clamp sampler. register_samplers runs
CreateSampler's path (decode, VkSampler, key in set 0) for each S# without
a heap slot; the call at pipeline creation comes with #291's shader index.
MIN and MAX of either plane, and AVERAGE of the depth plane when Format is
the plane's own format, as the PC runtime accepts them (RTX 5070 and WARP).
Each resolve is a vkCmdBeginRendering scope with no draws: the MSAA plane
is the depth or stencil attachment and the destination plane its resolve
target, checked at record time against D3D12's rules and the device's
supported resolve modes. Colour resolves are unchanged.
Keep-both resolutions per #313's conflict analysis: main's ExecuteIndirect /
acceleration-structure / debug-marker / depth24 / node-mask features alongside
the stack's arena, compute and draw paths. Main's indirect and AS offsets gain
the arena's buffer_offset / heap_base compensation; AS resources on default
heaps get their GENERIC structure over the arena range. Reset clears
stencil_ref_set_ next to reset_state, and OMSetStencilRef sets it. README takes
main's (the crypto-token lines stay deleted).
create_vulkan_device_standalone builds inst_exts with VK_KHR_surface and
VK_KHR_win32_surface for DXGI presentation (D3D-2), then the D3D-24 block
replaced the instance's extension list with VK_EXT_debug_utils alone
whenever the loader has it, which it does wherever the Vulkan SDK is
installed. The device still enabled VK_KHR_swapchain, so validation
reported VUID-vkCreateDevice-ppEnabledExtensionNames-01387, and the
instance had no surface extension for the DXGI swapchain.
Both now go in one list, and VK_KHR_swapchain is enabled only when the
surface extensions are on the instance.
The placed half of D3D-85: CreatePlacedResource1/2 wrap the placed path, and 2 carries NumCastableFormats/pCastableFormats exactly as CreateCommittedResource3 does. The castable list is mapped by a shared helper (also used by the committed path) that refuses unmapped formats and casts whose texel size differs from the resource's, matching the host's E_INVALIDARG and avoiding a size-mismatched VkImageFormatListCreateInfo. A typed UNORM texture with a castable list also accepts an RTV in a listed RGBA8 family format, cleared through the same reinterpretation a typeless RTV uses.
The buffer branch only checked first/count and the texture branch never
looked at Width, Height, DepthOrArraySize or SampleDesc, turning a zero
extent into 1. The PC runtime gives the failure answer (every output all
ones) for these; measured on WARP, and @quackottu's subset on an NVIDIA GPU.
Buffers: Width 0, or any of Height, DepthOrArraySize, MipLevels, Format,
Layout, SampleDesc or Alignment other than its one valid value. Textures:
a zero extent, Count 0, or more than one sample outside a single-mip,
non-ROW_MAJOR 2D render target or depth stencil, or a count that is not a
power of two. Left unchecked because the host accepts them or adapters
differ: Flags on buffers, extra mips, 2D ROW_MAJOR, Quality at one sample,
extent limits, texture alignment, multisample quality and format support.
d3d12_vulkan_device_test: footprint_validity_cases() is compared with the
host runtime when there is one and checked on its own otherwise.
AI-assisted
Keep the creation-time castable list on the resource, reject an SRV format
that is neither the resource format nor listed, and allow listed same-size
cross-family casts such as R8G8B8A8_UINT to R32_UINT.
#895's CBV/SRV/UAV views write placeholder tags (1, 2, 3) into the descriptor heap, and its new check in
d3d12_vulkan_device_test expects an SRV's first dword to be 2. main's SRVs are GFX10 T# words (D3D-72 and the
descriptor table), so the device test failed at line 2211. The PR needs a rebase onto main's descriptor model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NumFeatureLevels 0 returned DXGI_ERROR_UNSUPPORTED, and a null
pFeatureLevelsRequested with a count was read. The host D3D12 runtime
(NVIDIA and WARP) returns E_INVALIDARG for both. When no requested level
is supported the host also writes MaxSupportedFeatureLevel 0 next to
DXGI_ERROR_UNSUPPORTED; the layer left the field as it was.
Blit support comes from vkGetPhysicalDeviceFormatProperties (BLIT_SRC source,
BLIT_DST swapchain, linear filter only with SAMPLED_IMAGE_FILTER_LINEAR), cached
per format. The swapchain encoding is recorded only once the new swapchain
exists, so a failed recreate is retried. The image acquire polls an abort
callback every 50 ms instead of waiting for ever.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VulkanPresenter::present takes an optional source rectangle (stretched to the
window), present_blank clears the swapchain image, the swapchain format follows
the source (an sRGB source gets an sRGB swapchain, every other a UNORM one), and
enable_capture/read_back copy each presented frame to host memory for tests.
Integer, block-compressed and multisampled sources are refused. WindowPresenter
forwards all of it. Also renames the device-extension counters in
create_vulkan_device_standalone that the merge left shadowing each other (C4456).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR 436's translated vertex shaders read BaseVertex/BaseInstance, so the production device
must enable shaderDrawParameters before 436 lands (same lines as 436, so they merge). A GPU
without shaderInt64 cannot load any translated shader (all declare Int64): say so once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A committed RGBA8 typeless image already permits mutable Vulkan views. Let explicit UNORM and sRGB Texture3D SRVs select their formats so shaders can read either interpretation of the same voxels.