diff --git a/renderdoc/driver/ihv/amd/amd_isa_devices.h b/renderdoc/driver/ihv/amd/amd_isa_devices.h index 0e30b8e2d..30b558df3 100644 --- a/renderdoc/driver/ihv/amd/amd_isa_devices.h +++ b/renderdoc/driver/ihv/amd/amd_isa_devices.h @@ -36,6 +36,7 @@ struct asic }; const int legacyAsicCount = 20; +const int AMDILIndex = 24; const int asicCount = 31; extern const asic asicInfo[]; diff --git a/renderdoc/driver/ihv/amd/amd_isa_win32.cpp b/renderdoc/driver/ihv/amd/amd_isa_win32.cpp index 48585b014..5090b8221 100644 --- a/renderdoc/driver/ihv/amd/amd_isa_win32.cpp +++ b/renderdoc/driver/ihv/amd/amd_isa_win32.cpp @@ -32,9 +32,11 @@ #include "amd_isa_devices.h" #if ENABLED(RDOC_X64) -#define DLL_NAME "atidxx64.dll" +#define OLD_DLL_NAME "atidxx64.dll" +#define NEW_DLL_NAME "amdxx64.dll" #else -#define DLL_NAME "atidxx32.dll" +#define OLD_DLL_NAME "atidxx32.dll" +#define NEW_DLL_NAME "amdxx32.dll" #endif namespace GCNISA @@ -43,12 +45,23 @@ extern rdcstr pluginPath; static HMODULE GetAMDModule() { + HMODULE module = NULL; + // first try in the plugin locations - HMODULE module = LoadLibraryA(LocatePluginFile(GCNISA::pluginPath, DLL_NAME).c_str()); + if(module == NULL) + module = LoadLibraryA(LocatePluginFile(GCNISA::pluginPath, NEW_DLL_NAME).c_str()); // if that failed then try checking for it just in the default search path if(module == NULL) - module = LoadLibraryA(DLL_NAME); + module = LoadLibraryA(NEW_DLL_NAME); + + // next try old dll name in the plugin locations + if(module == NULL) + module = LoadLibraryA(LocatePluginFile(GCNISA::pluginPath, OLD_DLL_NAME).c_str()); + + // if that failed then try checking for it just in the default search path + if(module == NULL) + module = LoadLibraryA(OLD_DLL_NAME); return module; } @@ -160,9 +173,10 @@ rdcstr DisassembleDXBC(const bytebuf &shaderBytes, const rdcstr &target) HMODULE mod = GetAMDModule(); if(mod == NULL) - return "; Error loading " DLL_NAME R"(. + return "; Error loading " NEW_DLL_NAME R"(. -; Currently )" DLL_NAME R"( from AMD's driver package is required for GCN disassembly and it cannot be +; Currently )" NEW_DLL_NAME + R"( from AMD's driver package is required for GCN disassembly and it cannot be ; distributed with RenderDoc. ; To see instructions on how to download and configure it on your system, go to: @@ -201,8 +215,8 @@ rdcstr DisassembleDXBC(const bytebuf &shaderBytes, const rdcstr &target) bool amdil = false; if(target == "AMDIL") { - in.chipFamily = asicInfo[legacyAsicCount].chipFamily; - in.chipRevision = asicInfo[legacyAsicCount].chipRevision; + in.chipFamily = asicInfo[AMDILIndex].chipFamily; + in.chipRevision = asicInfo[AMDILIndex].chipRevision; amdil = true; }