microsoft / DirectXShaderCompiler

This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.
Other
3.12k stars 699 forks source link

IDxcResult output enumeration is reporting multiple DXC_OUT_NONE values and missing supported DXC_OUT_ values. #6523

Open coopp opened 7 months ago

coopp commented 7 months ago

Description Calling IDxcResult::GetNumOutputs( ) and enumerating outputs by index is returning incorrect results

Steps to Reproduce

IDxcResult* result; // Obtained from Compile( )

uint32_t numOutputs = result->GetNumOutputs();
std::cout << "Compiled result contains " << numOutputs << " outputs\n";
for (uint32_t i = 0; i < numOutputs; ++i)
{
    std::cout << result->GetOutputByIndex(i) << " found\n";
}

Actual Behavior The total number of supported outputs is correct, but DXC_OUT_NONE is reported multiple times.

Compiled result contains 6 outputs
Primary output is DXC_OUT_OBJECT
DXC_OUT_OBJECT found
DXC_OUT_ERRORS found
DXC_OUT_PDB found
DXC_OUT_HASH found
DXC_OUT_NONE found
DXC_OUT_NONE found

Environment

damyanp commented 7 months ago

@coopp - looks like the "Actual Behavior" section needs to be filled in.

coopp commented 7 months ago

Actual behavior is filled in.