You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bindless resources. Unbounded resource arrays (Texture2D Tex[] : register(t0, space1); also samplers, structured, byte-address, constant buffers and read-write textures) and the Shader Model 6.6 heaps ResourceDescriptorHeap[i] / SamplerDescriptorHeap[i] compile on SPIR-V and Metal; before, unbounded arrays were error OSH0350. SPIR-V: runtime descriptor arrays with RuntimeDescriptorArray and SPV_EXT_descriptor_indexing, NonUniform decorations on the index, the access chain, the loaded descriptor and the data loaded through it, and DXC's default heap mapping (each resource type read from a heap is an unbounded array; the resource heap takes the first unused binding of set 0, the sampler heap the next; CompileOptions.ResourceHeapBinding/SamplerHeapBinding and the CLI's -fvk-bind-resource-heap/-fvk-bind-sampler-heap choose them). A heap element becomes a resource where it is assigned to a resource variable, cast, or passed to a function; misuse is OSH0336. Metal: each unbounded array or heap is one argument buffer of 8-byte descriptors (a texture's or sampler's gpuResourceID, a buffer's gpuAddress) at one buffer index, read through constant T_entry*; needs argument buffers tier 2 and Metal 3. WGSL: an error at the declaration or first use (OSH5202), only when WGSL is a selected target. Non-bindless output on every target is unchanged.
Reflection: ResourceInfo.IsUnbounded (Count 0), Heap (DescriptorHeaps) and HeapKinds; EntryPointInfo.DescriptorHeaps; DeviceFeatures.RuntimeDescriptorArray, NonUniformIndexing and MutableDescriptorType (also in EntryLayout/PipelineLayout/PipelineLayoutInfo.RequiredFeatures). The serialized form gets optional heap/heapkinds attributes and a heaps child; the tool's JSON gets unbounded, heap, heapKinds, descriptorHeaps and requiredFeatures.
OneShader.Layouts: ResourceLayout.IsUnbounded, Heap, HeapKinds. ToVulkan gives an unbounded binding a maximum descriptor count (VulkanLayoutOptions.UnboundedMaxCount, default 4096, per binding UnboundedCounts), PartiallyBound and, on the highest binding of a set, VariableDescriptorCount (options PartiallyBound, VariableDescriptorCount, UpdateAfterBind; DescriptorSetLayoutBindingInfo.BindingFlags, DescriptorSetLayoutInfo.CreateFlags), and a heap read as several kinds a Mutable descriptor with MutableTypes. DescriptorSetLayoutInfo.HasVariableCount tells which sets need the variable-count allocation info. TryToMetal reports MetalArgument.IsArgumentBuffer, DescriptorStride 8, ElementKinds, Encoding. TryToWebGpu returns a LayoutError.
Generated bindings: Bindings.<Name>.IsUnbounded (and Heap for a heap), ResourceBinding.IsUnbounded; the generated Layout carries the heap data; variants work.
The corpus gains bindless_textures, bindless_buffers and bindless_heap; the parity harness creates partially bound, update-after-bind, variable-count and mutable descriptor bindings, and the Metal runner executes argument-buffer cases.
PipelineLayout.ToBindings describes unbounded arrays and heaps: BindingDescription.Count is 0 with IsUnbounded, Heap and HeapKinds for a descriptor heap, PartiallyBound (true for every unbounded binding) and HasVariableCount (the highest binding of its set). Union layouts merge equal unbounded slots and refuse an unbounded slot against a sized one.
A scalar texel offset on a 2D or 3D texture (Sample(s, uv, 1)) applies to every axis, as in DXC; before, it produced invalid SPIR-V.