Open manuelk opened 8 years ago
A dirty workaround iif this issue is blocking (not the final solution) may be trying get the winSDK interface by specifying it directly?
// declare this out of a function
EXTERN_C CONST DECLSPEC_SELECTANY GUID IID_ID3D11ShaderReflection_WINSDK =
{ 0x8d536ca1, 0x0cca, 0x4956, 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84 }
hr = D3DReflect(computeShaderBuffer->GetBufferPointer(), computeShaderBuffer->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &reflector);
// insert this
if (hr==E_NOINTERFACE || hr==E_INVALIDARG)
{
// IID changes from version to version. Tries the winsdk hardcoded one.
hr = D3DReflect(computeShaderBuffer->GetBufferPointer(), computeShaderBuffer->GetBufferSize(),
IID_ID3D11ShaderReflection_WINSDK, (void**) &reflector);
}
// original code
Filed as internal issue #151667.
The following sanity check can be problematic: https://github.com/PixarAnimationStudios/OpenSubdiv/blob/master/opensubdiv/osd/d3d11ComputeEvaluator.cpp#L258
If a client app links against another version of the DX SDK than OSD was linked with (ex. June 2010 and Windows Kit), then D3DReflect can return a E_NOINTERFACE error, with a null pointer.
Suggest modifying to something like this: