The matching descriptor table could be: DescriptorTable( CBV(b1), UAV(u0, numDescriptors = 4), SRV(t0, numDescriptors=unbounded) An unbounded array in HLSL does match a fixed number set with numDescriptors in the descriptor table , and a fixed size in the HLSL does match an unbounded declaration in the descriptor table.
, u4 and u5 are aliased to the same descriptor in a heap; The HLSL root signature language closely corresponds to the C++ root signature APIs and has equivalent expressive power.
The root signature is specified as a sequence of clauses, separated by comma.
This is similar to the descriptor table CBV entry, except the specified range is for.
, #p Level Acceleration Structures () This adds support for local root signatures/shader records with descriptor table handles as the parameter.
This removes the need for the app having to do it’s own bindless indexing to associate a ClosestHit shader with a texture.
, The hlsl may like this.
Texture2D gDiffuseMap : register(t0); Texture2DArray gDiffuseMaps : register(t1); I create a descriptor range which has 2 descriptors.
CD3DX12_ DESCRIPTOR _RANGE texTable; texTable.
Init(D3D12_ DESCRIPTOR _RANGE_TYPE_SRV, 2, 0); But I don’t know how to bind the descriptors to registers.
, 28/08/2015 So I do not entirely grasp the flexibility guarrantees of a Descriptor Table.
From the docs I read that it is supposed to describe the access patterns that will be used by HLSL shaders on a Descriptor Heap.
So I try to create a this table with two ranges,.
, A descriptor table is logically an array of descriptors.
Each descriptor table stores descriptors of one or more types – SRVs, UAVs, CBs and Samplers.
The graphics and compute pipelines gain access to resources by referencing into descriptor tables by index.
A descriptor table is actually just a subrange of a descriptor heap.
, Using descriptor tables , you are able to use as many descriptors as you want.
The disadvantage is the extra indirection.
Descriptor tables take 2 indirections to get to the resource data.
The descriptor table points to a descriptor inside a descriptor heap, which points to the actual resource data.
, -Pools have both a set count and descriptor count limit #Updating-Updates must happen outside of command record and execution-E.
No updating after vkCmdBindDescriptorSets #Shader Bindings-Each descriptor binding maps to a single resource binding in a shader-Including descriptors that are arrays (this differs from DX) Descriptors Refresher