Skip to content

SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE with Slang + RTX Neural Shaders #323

@volt176

Description

@volt176

I’m using the Slang compiler with RTX Neural Shaders (rtxns) to generate SPIR-V compute shaders. The SPIR-V runs correctly in Vulkan, but reflection via SPIRV-Reflect fails with: SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE

The error is returned inside SPIRV-Reflect from ParseTypes(), which is invoked internally by spvReflectCreateShaderModule:

if (result == SPV_REFLECT_RESULT_SUCCESS) {
    result = ParseTypes(&parser, p_module);
    SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
}

Here is the SPIR-V file (renamed as a .txt) for testing:
Training.txt

The source code for the shader can be found here: RTXNS ShaderTraining sample

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions