microsoft / microsoft/DirectXShaderCompiler

[SPIR-V] SPV_EXT_descriptor_heap: StructuredBuffer<T> from ResourceDescriptorHeap yields incorrect error: UAV support not implemented with non-emulated heaps

Open
#8,806 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage spirv
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

Description
When using SPV_EXT_descriptor_heap and SPV_KHR_untyped_pointers SPIR-V extensions attempting to acquire StructuredBuffer from ResourceDescriptorHeap results in compile error: UAV support not implemented with non-emulated heaps.

Steps to Reproduce
Does not matter if ResourceDescriptorHeap index is non-uniform or constant:

StructuredBuffer<Foo> foo_buffer = ResourceDescriptorHeap[0]; // Results in compile error

Compilation flags:

const WCHAR* args[] = {
    L"-HV",
    L"2021",
    L"-I",
    <dir>,
    L"-E",
    <entry_point>,
    L"-T",
    L"vs_6_6",
    DXC_ARG_PACK_MATRIX_COLUMN_MAJOR,
    DXC_ARG_WARNINGS_ARE_ERRORS,
    DXC_ARG_ALL_RESOURCES_BOUND,
    L"-spirv",
    L"-fspv-target-env=vulkan1.3",
    L"-fspv-extension=SPV_EXT_descriptor_heap",
    L"-fspv-extension=SPV_KHR_untyped_pointers",
    L"-fspv-use-descriptor-heap",
    L"-fvk-use-scalar-layout",
    DXC_ARG_DEBUG,
    DXC_ARG_SKIP_OPTIMIZATIONS,
};

Actual Behavior
error: UAV support not implemented with non-emulated heaps.

Environment

  • DXC version: 1.9(5402-0d3ee6b5)(1.9.0.5402) - 1.9.0.5402 (0d3ee6b55-dirty)
  • Host Operating System: Windows 11 Pro 26200.9168

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the StructuredBuffer assignment from ResourceDescriptorHeap[0] with the listed SPIR-V flags, then trace the SPIR-V descriptor-heap handling that emits the non-emulated-heap UAV error. Done means this valid use compiles without that error, with coverage for both constant and non-uniform heap indices if the existing test structure supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.