Skip to content

Is vulkan backend support mutiple bindless descriptor set? #109

@HuazyYang

Description

@HuazyYang

I use two different dynamic decriptor tables to arrange scene resources(textures/buffers) and render pass associated resources. HLSL resource binding profile are as following:

// Scene Bindless Resources
VK_BINDING(0, 1) ByteAddressBuffer SceneBuffers[] : register(t0, space1);
VK_BINDING(1, 1) Texture2D SceneTex2D[] : register(t0, space2);

// Fixed Bindless Resources
// ---------------------------------------------------------------------------------------
VK_BINDING(0, 2) Texture2D<float4> FixedTex2D[]: register(t0, space3);
VK_BINDING(1, 2) Texture2DArray<float4> FixedTex2DArray[]: register(t0, space4);
VK_BINDING(2, 2) RWTexture2D<float4> FixedRWTex2D[]: register(u0, space1);
VK_BINDING(3, 2) RWTexture2DArray<float4> FixedRWTex2DArray[]: register(u0, space2);

In C++ program side, two bindless layouts are created as following;

    nvrhi::BindlessLayoutDesc bindlessLayoutDesc;
    bindlessLayoutDesc.visibility = nvrhi::ShaderType::All;
    bindlessLayoutDesc.firstSlot = 0;
    bindlessLayoutDesc.maxCapacity = 1024;
    bindlessLayoutDesc.registerSpaces = {nvrhi::BindingLayoutItem::RawBuffer_SRV(1),
                                         nvrhi::BindingLayoutItem::Texture_SRV(2)};
    BindlessLayout = Device->createBindlessLayout(bindlessLayoutDesc);

    bindlessLayoutDesc.registerSpaces = {nvrhi::BindingLayoutItem::Texture_SRV(3),
                                         nvrhi::BindingLayoutItem::Texture_SRV(4),
                                         nvrhi::BindingLayoutItem::Texture_UAV(1),
                                         nvrhi::BindingLayoutItem::Texture_UAV(2)};
    FixedBindlessLayout = Device->createBindlessLayout(bindlessLayoutDesc);

and use two descriptor tables to map resource to bindless layout in rendering loop.

For D3D12 backend, it works fine, but vulkan backend does not. So my question is whether more than one descriptor table is allowed for vulkan backend?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions