@@ -710,6 +710,11 @@ void CRender::addShaderOption(const char* name, const char* value)
710
710
m_ShaderOptions.push_back (macro);
711
711
}
712
712
713
+ // XXX nitrocaster: workaround to eliminate conflict between different GUIDs from DXSDK/Windows SDK
714
+ // 0a233719-3960-4578-9d7c-203b8b1d9cc1
715
+ static const GUID guidShaderReflection =
716
+ {0x0a233719 , 0x3960 , 0x4578 , {0x9d , 0x7c , 0x20 , 0x3b , 0x8b , 0x1d , 0x9c , 0xc1 }};
717
+
713
718
template <typename T>
714
719
static HRESULT create_shader (
715
720
LPCSTR const pTarget,
@@ -724,7 +729,7 @@ static HRESULT create_shader (
724
729
725
730
ID3DShaderReflection *pReflection = 0 ;
726
731
727
- HRESULT const _hr = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
732
+ HRESULT const _hr = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
728
733
if (SUCCEEDED (_hr) && pReflection)
729
734
{
730
735
// Parse constant table data
@@ -766,7 +771,7 @@ static HRESULT create_shader (
766
771
ID3DShaderReflection *pReflection = 0 ;
767
772
768
773
#ifdef USE_DX11
769
- _result = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
774
+ _result = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
770
775
#else
771
776
_result = D3D10ReflectShader ( buffer, buffer_size, &pReflection);
772
777
#endif
@@ -802,7 +807,7 @@ static HRESULT create_shader (
802
807
803
808
ID3DShaderReflection *pReflection = 0 ;
804
809
#ifdef USE_DX11
805
- _result = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
810
+ _result = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
806
811
#else
807
812
_result = D3D10ReflectShader ( buffer, buffer_size, &pReflection);
808
813
#endif
@@ -850,7 +855,7 @@ static HRESULT create_shader (
850
855
ID3DShaderReflection *pReflection = 0 ;
851
856
852
857
#ifdef USE_DX11
853
- _result = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
858
+ _result = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
854
859
#else
855
860
_result = D3D10ReflectShader ( buffer, buffer_size, &pReflection);
856
861
#endif
0 commit comments