Skip to content

Commit

Permalink
dxgitrace: Search for more recent versions d3dcompiler_xx.dll.
Browse files Browse the repository at this point in the history
And warn if none is found.
  • Loading branch information
jrfonseca committed Oct 2, 2014
1 parent 01e5c85 commit 96f2963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/d3dshader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ DisassembleShader(const void *pShaderBytecode, SIZE_T BytecodeLength, IDisassemb
char szFilename[MAX_PATH];
HMODULE hModule = NULL;
int version;
for (version = 44; version >= 33; --version) {
for (version = 47; version >= 33; --version) {
_snprintf(szFilename, sizeof(szFilename), "d3dcompiler_%i.dll", version);
hModule = LoadLibraryA(szFilename);
if (hModule) {
Expand All @@ -154,6 +154,8 @@ DisassembleShader(const void *pShaderBytecode, SIZE_T BytecodeLength, IDisassemb
}
}
if (!pfnD3DDisassemble) {
os::log("apitrace: warning: failed to load d3dcompiler_xx.dll\n");

/*
* Fallback to D3D10DisassembleShader, which should be always present.
*/
Expand Down

0 comments on commit 96f2963

Please sign in to comment.