mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-20 14:31:42 +00:00
Put some dxc disassembly compatibility options under #ifdef
This commit is contained in:
@@ -567,6 +567,7 @@ const rdcstr &DXBCContainer::GetDisassembly()
|
||||
{
|
||||
m_Disassembly.clear();
|
||||
|
||||
#if DISABLED(DXC_COMPATIBLE_DISASM)
|
||||
if(m_GlobalFlags != GlobalShaderFlags::None)
|
||||
m_Disassembly += globalFlagsString;
|
||||
|
||||
@@ -581,6 +582,7 @@ const rdcstr &DXBCContainer::GetDisassembly()
|
||||
for(size_t i = 0; i < sizeof(m_Hash); i++)
|
||||
m_Disassembly += StringFormat::Fmt("%02x", hashBytes[i]);
|
||||
m_Disassembly += "\n\n";
|
||||
#endif
|
||||
|
||||
m_Disassembly += m_DXILByteCode->GetDisassembly();
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "driver/dx/official/d3dcommon.h"
|
||||
#include "driver/shaders/dxbc/dxbc_common.h"
|
||||
|
||||
#define DXC_COMPATIBLE_DISASM OPTION_OFF
|
||||
|
||||
namespace LLVMBC
|
||||
{
|
||||
struct BlockOrRecord;
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
#include "dxil_bytecode.h"
|
||||
#include "dxil_common.h"
|
||||
|
||||
#define DXC_COMPATIBLE_DISASM OPTION_OFF
|
||||
|
||||
#if ENABLED(DXC_COMPATIBLE_DISASM) && ENABLED(RDOC_RELEASE)
|
||||
|
||||
#error "DXC compatible disassembly should only be enabled in debug builds for testing"
|
||||
@@ -368,8 +366,11 @@ void Program::MakeDisassemblyString()
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
m_Disassembly = StringFormat::Fmt("; %s Shader, compiled under SM%u.%u\n\n",
|
||||
shaderName[int(m_Type)], m_Major, m_Minor);
|
||||
m_Disassembly.clear();
|
||||
#if DISABLED(DXC_COMPATIBLE_DISASM)
|
||||
m_Disassembly += StringFormat::Fmt("; %s Shader, compiled under SM%u.%u\n\n",
|
||||
shaderName[int(m_Type)], m_Major, m_Minor);
|
||||
#endif
|
||||
m_Disassembly += StringFormat::Fmt("target datalayout = \"%s\"\n", m_Datalayout.c_str());
|
||||
m_Disassembly += StringFormat::Fmt("target triple = \"%s\"\n\n", m_Triple.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user