Repository navigation
Runtime: full bindless set on Intel Xe-LP via vkGetDescriptorSetLayoutSupport (D3D-219) - #1787
Conversation
… (D3D-219) d3d12_descriptor failed every run on an Intel UHD 770 (101.7092) for two reasons, both from the driver taking an option the Vulkan spec allows: - VK_EXT_image_view_min_lod: the driver selects levels with minLodInteger = floor(minLod), the spec's "alternative", so a 0.75 or 1.75 ResourceMinLODClamp read one mip too detailed. On Intel integrated GPUs bind_image now passes the clamp rounded to the nearest level, which point mip filtering selects exactly. LEONIDA_MIN_LOD_INTEGER=1/0 forces it either way. - The bindless set stayed at its default counts (4096 2D images, 1024 samplers) because the driver reports maxPerSetDescriptors = 6159 with every other limit at 1048576. size_bindings now takes an optional layout_supported callback, and past maxPerSetDescriptors the device asks vkGetDescriptorSetLayoutSupport about the grown layout. bindless::SetLayout describes set 0 once for create_layout and that query. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rounding the view's minLod to the nearest level fixed point-filtered samples on drivers that use minLodInteger, but integer texel fetches and gathers use floor(minLod) on every driver, as D3D11.3 5.8 also requires for ld and gather4. With a 0.75 clamp the rounded view gave 1.0, so a Load of mip 0 would read zero. No single view value is right for both, so the sampling fix belongs in the translator (a MinLod image operand on sample ops only). This keeps the bindless capacity fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Update: 0a43f80 removes the minimum-LOD rounding. This PR now only changes the bindless set size. Why the rounding was wrong. Vonsek pointed out in #1725 that point sampling, linear mip filtering and integer loads need separate controls. I checked both specs, and the rounding breaks
One view-level Retested after the change, on the setup in the PR description:
The PR description has been updated to match. |
Vonsek
left a comment
There was a problem hiding this comment.
I independently ran the CPU-only bindless_sizing CTest on Windows with MSVC 19.44 at 0a43f809400ec814f0974f9c7c33ebb97ef9b917. It passed (1/1). I then restored the old hard cap in the growth predicate while keeping the new tests. CTest failed at the assertion that the layout-support callback is queried. Restoring the published source made it pass again.
I checked that the support query and descriptor set creation use the same bindings and flags, and that candidate counts still pass the per-stage and pool checks before the query. The GPU capacity results above are from the author’s runs. I did not repeat them locally, and the fractional minimum-LOD issue remains separate.
AI-assisted.
|
Tested 0a43f80 on Intel(R) UHD Graphics (Tiger Lake (Xe-LP) iGPU 0x9a78, subgroup 8..32, no mesh), driver 32.0.101.7088, Windows 11, MSVC 14.44: pass The bindless fix works on Gen9 too: the init log reports the full set ("bindless set: 65536 2D images, 3936 samplers, 1024 2D-array, 256 3D, 256 1D, 4096 storage indices in 2D" — was 4096/1024), and the capacity check passes: "the 5001th SRV through the 2100th sampler gave the texture" (no "bindless sampler array is full"). AI-assisted (GLM, operated by the account owner). |
Claimed in the coordination issue as: D3D-219 (claim, from #1725)
What and why
On an Intel UHD 770 (101.7092), the bindless set stayed at its default counts: 4096 2D images and 1024 samplers.
d3d12_descriptorthen failed: the 5001st SRV and the 2100th sampler had no slot ("the bindless sampler array is full"), so it read 0,0,0,0.The cause is the driver's
maxPerSetDescriptors = 6159, while every update-after-bind limit is 1048576.size_bindingscapped growth at 6159. The sizing comment already said that "vkGetDescriptorSetLayoutSupport may allow more". The changes:size_bindingstakes an optionallayout_supportedcallback. PastmaxPerSetDescriptors, growth continues only where the callback accepts the layout.vkGetDescriptorSetLayoutSupporton the grown layout.bindless::SetLayoutnow describes set 0 once, for bothcreate_layoutand that query.maxPerSetDescriptorsis large enough never calls the callback, so NVIDIA is unchanged.The UHD 770 now gets the same set as the RTX: 65536 2D images, 3936 samplers and 4096 storage indices.
Not in this PR: the minimum-LOD part of #1725
The first version also rounded the view's minimum LOD on Intel integrated GPUs. It is removed in 0a43f80, because it would break
Loadand gather (details in the comment below). Images with a minimum LOD still read one mip too detailed on Intel, sod3d12_descriptorstill fails there, at line 2143 (lod_mismatches). The fix for that belongs in the translator, as a follow-up.Tested
Windows 11, MSVC 19.44, Vulkan SDK 1.4.363.0, on
89b047cd+ 0a43f80.d3d12_descriptorcapacity check (5001st SRV through the 2100th sampler)d3d12_descriptoroverallmainVK_LAYER_KHRONOS_validationond3d12_descriptorandd3d12_computebindless_sizing_testThe three new
bindless_sizing_testcases:maxPerSetDescriptorsstill caps growth.Full
ctest: no new failures on either GPU. The remaining failures are pre-existing on89b047cd:d3d12_draw, the bundle blend check from Runtime: carry bundle blend factors back to parent draws #1660 (reported there).d3d12_vulkan_device: D3D-221, d3d12_vulkan_device_test: 0.6 ULP tolerance for placed SRGB-cast clears (D3D-221) #1752.d3d12_descriptor: the minimum-LOD check above.d3d12_copy_xfmt: D3D-220, claimed by someone else.Checklist
docs/design.md, with how it was confirmed. (No translator change;docs/d3d12_vulkan.mdupdated.)AI-assisted (Claude).
🤖 Generated with Claude Code