@@ -710,6 +710,11 @@ void CRender::addShaderOption(const char* name, const char* value)
710710 m_ShaderOptions.push_back (macro);
711711}
712712
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+
713718template <typename T>
714719static HRESULT create_shader (
715720 LPCSTR const pTarget,
@@ -724,7 +729,7 @@ static HRESULT create_shader (
724729
725730 ID3DShaderReflection *pReflection = 0 ;
726731
727- HRESULT const _hr = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
732+ HRESULT const _hr = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
728733 if (SUCCEEDED (_hr) && pReflection)
729734 {
730735 // Parse constant table data
@@ -766,7 +771,7 @@ static HRESULT create_shader (
766771 ID3DShaderReflection *pReflection = 0 ;
767772
768773#ifdef USE_DX11
769- _result = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
774+ _result = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
770775#else
771776 _result = D3D10ReflectShader ( buffer, buffer_size, &pReflection);
772777#endif
@@ -802,7 +807,7 @@ static HRESULT create_shader (
802807
803808 ID3DShaderReflection *pReflection = 0 ;
804809#ifdef USE_DX11
805- _result = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
810+ _result = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
806811#else
807812 _result = D3D10ReflectShader ( buffer, buffer_size, &pReflection);
808813#endif
@@ -850,7 +855,7 @@ static HRESULT create_shader (
850855 ID3DShaderReflection *pReflection = 0 ;
851856
852857#ifdef USE_DX11
853- _result = D3DReflect ( buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
858+ _result = D3DReflect ( buffer, buffer_size, guidShaderReflection , (void **)&pReflection);
854859#else
855860 _result = D3D10ReflectShader ( buffer, buffer_size, &pReflection);
856861#endif
0 commit comments