Skip to content

Commit

Permalink
Remove workaround for IID_ID3D11ShaderReflection.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Jan 8, 2018
1 parent 84239fd commit 08a3d68
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Layers/xrRenderPC_R4/r4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,10 +795,6 @@ void CRender::addShaderOption(const char* name, const char* value)
m_ShaderOptions.push_back(macro);
}

// XXX nitrocaster: workaround to eliminate conflict between different GUIDs from DXSDK/Windows SDK
// 0a233719-3960-4578-9d7c-203b8b1d9cc1
static const GUID guidShaderReflection = {0x0a233719, 0x3960, 0x4578, {0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1}};

template <typename T>
static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 const buffer_size, LPCSTR const file_name,
T*& result, bool const disasm)
Expand All @@ -807,7 +803,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons

ID3DShaderReflection* pReflection = 0;

HRESULT const _hr = D3DReflect(buffer, buffer_size, guidShaderReflection, (void**)&pReflection);
HRESULT const _hr = D3DReflect(buffer, buffer_size, IID_ID3D11ShaderReflection, (void**)&pReflection);
if (SUCCEEDED(_hr) && pReflection)
{
// Parse constant table data
Expand Down Expand Up @@ -845,7 +841,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
ID3DShaderReflection* pReflection = 0;

#ifdef USE_DX11
_result = D3DReflect(buffer, buffer_size, guidShaderReflection, (void**)&pReflection);
_result = D3DReflect(buffer, buffer_size, IID_ID3D11ShaderReflection, (void**)&pReflection);
#else
_result = D3D10ReflectShader(buffer, buffer_size, &pReflection);
#endif
Expand Down Expand Up @@ -883,7 +879,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons

ID3DShaderReflection* pReflection = 0;
#ifdef USE_DX11
_result = D3DReflect(buffer, buffer_size, guidShaderReflection, (void**)&pReflection);
_result = D3DReflect(buffer, buffer_size, IID_ID3D11ShaderReflection, (void**)&pReflection);
#else
_result = D3D10ReflectShader(buffer, buffer_size, &pReflection);
#endif
Expand Down Expand Up @@ -934,7 +930,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
ID3DShaderReflection* pReflection = 0;

#ifdef USE_DX11
_result = D3DReflect(buffer, buffer_size, guidShaderReflection, (void**)&pReflection);
_result = D3DReflect(buffer, buffer_size, IID_ID3D11ShaderReflection, (void**)&pReflection);
#else
_result = D3D10ReflectShader(buffer, buffer_size, &pReflection);
#endif
Expand Down

0 comments on commit 08a3d68

Please sign in to comment.