Rename dxbc_inspect.* to dxbc_container.*, and DXBCFile -> DXBCContainer

This commit is contained in:
baldurk
2019-10-18 20:57:35 +01:00
parent 2a1baae8a9
commit cd020007d2
30 changed files with 97 additions and 105 deletions
-4
View File
@@ -203,10 +203,6 @@ enum class RDCDriver : uint32_t
DECLARE_REFLECTION_ENUM(RDCDriver);
namespace DXBC
{
class DXBCFile;
}
namespace Callstack
{
class StackResolver;
+2 -2
View File
@@ -115,9 +115,9 @@ public:
void PixelHistoryCopyPixel(CopyPixelParams &params, uint32_t x, uint32_t y);
ShaderDebug::State CreateShaderDebugState(ShaderDebugTrace &trace, int quadIdx,
DXBC::DXBCFile *dxbc, const ShaderReflection &refl,
DXBC::DXBCContainer *dxbc, const ShaderReflection &refl,
bytebuf *cbufData);
void CreateShaderGlobalState(ShaderDebug::GlobalState &global, DXBC::DXBCFile *dxbc,
void CreateShaderGlobalState(ShaderDebug::GlobalState &global, DXBC::DXBCContainer *dxbc,
uint32_t UAVStartSlot, ID3D11UnorderedAccessView **UAVs,
ID3D11ShaderResourceView **SRVs);
+4 -4
View File
@@ -204,11 +204,11 @@ void D3D11Replay::InitPostVSBuffers(uint32_t eventId)
((drawcall->flags & DrawFlags::Instanced) && drawcall->numInstances == 0))
return;
DXBC::DXBCFile *dxbcVS = wrappedVS->GetDXBC();
DXBC::DXBCContainer *dxbcVS = wrappedVS->GetDXBC();
RDCASSERT(dxbcVS);
DXBC::DXBCFile *dxbcGS = NULL;
DXBC::DXBCContainer *dxbcGS = NULL;
if(gs)
{
@@ -226,7 +226,7 @@ void D3D11Replay::InitPostVSBuffers(uint32_t eventId)
RDCASSERT(dxbcGS);
}
DXBC::DXBCFile *dxbcDS = NULL;
DXBC::DXBCContainer *dxbcDS = NULL;
if(ds)
{
@@ -661,7 +661,7 @@ void D3D11Replay::InitPostVSBuffers(uint32_t eventId)
posidx = -1;
numPosComponents = 0;
DXBC::DXBCFile *lastShader = dxbcGS;
DXBC::DXBCContainer *lastShader = dxbcGS;
if(dxbcDS)
lastShader = dxbcDS;
+3 -3
View File
@@ -1182,7 +1182,7 @@ bool D3D11RenderState::Shader::Used_CB(uint32_t slot) const
if(shad == NULL)
return false;
DXBC::DXBCFile *dxbc = shad->GetDXBC();
DXBC::DXBCContainer *dxbc = shad->GetDXBC();
// have to assume it's used if there's no DXBC
if(dxbc == NULL)
@@ -1205,7 +1205,7 @@ bool D3D11RenderState::Shader::Used_SRV(uint32_t slot) const
if(shad == NULL)
return false;
DXBC::DXBCFile *dxbc = shad->GetDXBC();
DXBC::DXBCContainer *dxbc = shad->GetDXBC();
// have to assume it's used if there's no DXBC
if(dxbc == NULL)
@@ -1225,7 +1225,7 @@ bool D3D11RenderState::Shader::Used_UAV(uint32_t slot) const
if(shad == NULL)
return false;
DXBC::DXBCFile *dxbc = shad->GetDXBC();
DXBC::DXBCContainer *dxbc = shad->GetDXBC();
// have to assume it's used if there's no DXBC
if(dxbc == NULL)
+1 -1
View File
@@ -479,7 +479,7 @@ std::string D3D11Replay::DisassembleShader(ResourceId pipeline, const ShaderRefl
if(it == WrappedShader::m_ShaderList.end())
return "; Invalid Shader Specified";
DXBC::DXBCFile *dxbc = it->second->GetDXBC();
DXBC::DXBCContainer *dxbc = it->second->GetDXBC();
if(target == DXBCDisassemblyTarget || target.empty())
return dxbc->GetDisassembly();
+4 -4
View File
@@ -74,13 +74,13 @@ const GUID RENDERDOC_ID3D11ShaderGUID_ShaderDebugMagicValue = RENDERDOC_ShaderDe
void WrappedShader::ShaderEntry::TryReplaceOriginalByteCode()
{
if(!DXBC::DXBCFile::CheckForDebugInfo((const void *)&m_Bytecode[0], m_Bytecode.size()))
if(!DXBC::DXBCContainer::CheckForDebugInfo((const void *)&m_Bytecode[0], m_Bytecode.size()))
{
std::string originalPath = m_DebugInfoPath;
if(originalPath.empty())
originalPath =
DXBC::DXBCFile::GetDebugBinaryPath((const void *)&m_Bytecode[0], m_Bytecode.size());
DXBC::DXBCContainer::GetDebugBinaryPath((const void *)&m_Bytecode[0], m_Bytecode.size());
if(!originalPath.empty())
{
@@ -166,8 +166,8 @@ void WrappedShader::ShaderEntry::TryReplaceOriginalByteCode()
memcpy(&originalBytecode[0], &decompressed[0], originalBytecode.size());
}
if(DXBC::DXBCFile::CheckForDebugInfo((const void *)&originalBytecode[0],
originalBytecode.size()))
if(DXBC::DXBCContainer::CheckForDebugInfo((const void *)&originalBytecode[0],
originalBytecode.size()))
{
m_Bytecode.swap(originalBytecode);
}
+5 -5
View File
@@ -28,7 +28,7 @@
#include <algorithm>
#include "driver/d3d11/d3d11_device.h"
#include "driver/d3d11/d3d11_manager.h"
#include "driver/shaders/dxbc/dxbc_inspect.h"
#include "driver/shaders/dxbc/dxbc_container.h"
D3D11ResourceType IdentifyTypeByPtr(IUnknown *ptr);
ResourceId GetIDForDeviceChild(ID3D11DeviceChild *ptr);
@@ -921,12 +921,12 @@ public:
}
void SetDebugInfoPath(const std::string &path) { m_DebugInfoPath = path; }
DXBC::DXBCFile *GetDXBC()
DXBC::DXBCContainer *GetDXBC()
{
if(m_DXBCFile == NULL && !m_Bytecode.empty())
{
TryReplaceOriginalByteCode();
m_DXBCFile = new DXBC::DXBCFile((const void *)&m_Bytecode[0], m_Bytecode.size());
m_DXBCFile = new DXBC::DXBCContainer((const void *)&m_Bytecode[0], m_Bytecode.size());
}
return m_DXBCFile;
}
@@ -962,7 +962,7 @@ public:
std::vector<byte> m_Bytecode;
bool m_Built = false;
DXBC::DXBCFile *m_DXBCFile;
DXBC::DXBCContainer *m_DXBCFile;
ShaderReflection m_Details;
ShaderBindpointMapping m_Mapping;
};
@@ -992,7 +992,7 @@ public:
}
}
DXBC::DXBCFile *GetDXBC()
DXBC::DXBCContainer *GetDXBC()
{
SCOPED_LOCK(m_ShaderListLock);
return m_ShaderList[m_ID]->GetDXBC();
@@ -25,7 +25,7 @@
#include "d3d11_shader_cache.h"
#include "common/shader_cache.h"
#include "driver/dx/official/d3dcompiler.h"
#include "driver/shaders/dxbc/dxbc_inspect.h"
#include "driver/shaders/dxbc/dxbc_container.h"
#include "strings/string_utils.h"
#include "d3d11_device.h"
#include "d3d11_resources.h"
+9 -9
View File
@@ -243,7 +243,7 @@ static void FlattenVariables(const rdcarray<ShaderConstant> &constants,
class D3D11DebugAPIWrapper : public ShaderDebug::DebugAPIWrapper
{
public:
D3D11DebugAPIWrapper(WrappedID3D11Device *device, DXBC::DXBCFile *dxbc,
D3D11DebugAPIWrapper(WrappedID3D11Device *device, DXBC::DXBCContainer *dxbc,
const ShaderDebug::GlobalState &globalState);
void SetCurrentInstruction(uint32_t instruction) { m_instruction = instruction; }
@@ -268,12 +268,12 @@ public:
private:
D3D11_ShaderType GetShaderType() { return m_dxbc ? m_dxbc->m_Type : D3D11_ShaderType_Pixel; }
WrappedID3D11Device *m_pDevice;
DXBC::DXBCFile *m_dxbc;
DXBC::DXBCContainer *m_dxbc;
const ShaderDebug::GlobalState &m_globalState;
uint32_t m_instruction;
};
D3D11DebugAPIWrapper::D3D11DebugAPIWrapper(WrappedID3D11Device *device, DXBC::DXBCFile *dxbc,
D3D11DebugAPIWrapper::D3D11DebugAPIWrapper(WrappedID3D11Device *device, DXBC::DXBCContainer *dxbc,
const ShaderDebug::GlobalState &globalState)
: m_pDevice(device), m_dxbc(dxbc), m_globalState(globalState), m_instruction(0)
{
@@ -1603,7 +1603,7 @@ bool D3D11DebugAPIWrapper::CalculateMathIntrinsic(DXBC::OpcodeType opcode,
}
ShaderDebug::State D3D11DebugManager::CreateShaderDebugState(ShaderDebugTrace &trace, int quadIdx,
DXBC::DXBCFile *dxbc,
DXBC::DXBCContainer *dxbc,
const ShaderReflection &refl,
bytebuf *cbufData)
{
@@ -1768,7 +1768,7 @@ ShaderDebug::State D3D11DebugManager::CreateShaderDebugState(ShaderDebugTrace &t
}
void D3D11DebugManager::CreateShaderGlobalState(ShaderDebug::GlobalState &global,
DXBC::DXBCFile *dxbc, uint32_t UAVStartSlot,
DXBC::DXBCContainer *dxbc, uint32_t UAVStartSlot,
ID3D11UnorderedAccessView **UAVs,
ID3D11ShaderResourceView **SRVs)
{
@@ -2125,7 +2125,7 @@ ShaderDebugTrace D3D11Replay::DebugVertex(uint32_t eventId, uint32_t vertid, uin
if(!vs)
return empty;
DXBCFile *dxbc = vs->GetDXBC();
DXBCContainer *dxbc = vs->GetDXBC();
const ShaderReflection &refl = vs->GetDetails();
if(!dxbc)
@@ -2545,7 +2545,7 @@ ShaderDebugTrace D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
D3D11RenderState *rs = m_pImmediateContext->GetCurrentPipelineState();
DXBCFile *dxbc = ps->GetDXBC();
DXBCContainer *dxbc = ps->GetDXBC();
const ShaderReflection &refl = ps->GetDetails();
if(!dxbc)
@@ -2553,7 +2553,7 @@ ShaderDebugTrace D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
dxbc->GetDisassembly();
DXBCFile *prevdxbc = NULL;
DXBCContainer *prevdxbc = NULL;
if(prevdxbc == NULL && gs != NULL)
prevdxbc = gs->GetDXBC();
@@ -3810,7 +3810,7 @@ ShaderDebugTrace D3D11Replay::DebugThread(uint32_t eventId, const uint32_t group
if(!cs)
return empty;
DXBCFile *dxbc = cs->GetDXBC();
DXBCContainer *dxbc = cs->GetDXBC();
const ShaderReflection &refl = cs->GetDetails();
if(!dxbc)
+8 -8
View File
@@ -396,8 +396,8 @@ bool WrappedID3D12Device::Serialise_CreateGraphicsPipelineState(
{
if(shaders[i]->BytecodeLength > 0 && shaders[i]->pShaderBytecode)
{
if(!DXBC::DXBCFile::CheckForShaderCode(shaders[i]->pShaderBytecode,
shaders[i]->BytecodeLength))
if(!DXBC::DXBCContainer::CheckForShaderCode(shaders[i]->pShaderBytecode,
shaders[i]->BytecodeLength))
{
RDCERR(
"No shader code found in %s bytecode in pipeline state. "
@@ -532,8 +532,8 @@ HRESULT WrappedID3D12Device::CreateGraphicsPipelineState(const D3D12_GRAPHICS_PI
{
if(shaders[i]->BytecodeLength > 0 && shaders[i]->pShaderBytecode)
{
if(!DXBC::DXBCFile::CheckForShaderCode(shaders[i]->pShaderBytecode,
shaders[i]->BytecodeLength))
if(!DXBC::DXBCContainer::CheckForShaderCode(shaders[i]->pShaderBytecode,
shaders[i]->BytecodeLength))
{
RDCERR(
"No shader code found in %s bytecode in pipeline state. "
@@ -654,8 +654,8 @@ bool WrappedID3D12Device::Serialise_CreateComputePipelineState(
// check for bytecode - if the user is wrongly using DXIL we will hard-fail instead of producing
// a corrupted capture.
if(!DXBC::DXBCFile::CheckForShaderCode(unwrappedDesc.CS.pShaderBytecode,
unwrappedDesc.CS.BytecodeLength))
if(!DXBC::DXBCContainer::CheckForShaderCode(unwrappedDesc.CS.pShaderBytecode,
unwrappedDesc.CS.BytecodeLength))
{
RDCERR(
"No shader code found in CS bytecode in pipeline state. "
@@ -719,8 +719,8 @@ HRESULT WrappedID3D12Device::CreateComputePipelineState(const D3D12_COMPUTE_PIPE
{
// check for bytecode - if the user is wrongly using DXIL we will hard-fail instead of producing
// a corrupted capture.
if(!DXBC::DXBCFile::CheckForShaderCode(unwrappedDesc.CS.pShaderBytecode,
unwrappedDesc.CS.BytecodeLength))
if(!DXBC::DXBCContainer::CheckForShaderCode(unwrappedDesc.CS.pShaderBytecode,
unwrappedDesc.CS.BytecodeLength))
{
RDCERR(
"No shader code found in CS bytecode in pipeline state. "
+4 -4
View File
@@ -192,11 +192,11 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
if(drawcall->numIndices == 0 || drawcall->numInstances == 0)
return;
DXBC::DXBCFile *dxbcVS = vs->GetDXBC();
DXBC::DXBCContainer *dxbcVS = vs->GetDXBC();
RDCASSERT(dxbcVS);
DXBC::DXBCFile *dxbcGS = NULL;
DXBC::DXBCContainer *dxbcGS = NULL;
WrappedID3D12Shader *gs = origPSO->GS();
@@ -207,7 +207,7 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
RDCASSERT(dxbcGS);
}
DXBC::DXBCFile *dxbcDS = NULL;
DXBC::DXBCContainer *dxbcDS = NULL;
WrappedID3D12Shader *ds = origPSO->DS();
@@ -779,7 +779,7 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId)
posidx = -1;
numPosComponents = 0;
DXBC::DXBCFile *lastShader = dxbcGS;
DXBC::DXBCContainer *lastShader = dxbcGS;
if(dxbcDS)
lastShader = dxbcDS;
@@ -526,7 +526,7 @@ bool D3D12Replay::RenderTextureInternal(D3D12_CPU_DESCRIPTOR_HANDLE rtv, Texture
if(FAILED(hr))
return false;
DXBC::DXBCFile *dxbc = shader->GetDXBC();
DXBC::DXBCContainer *dxbc = shader->GetDXBC();
RDCASSERT(dxbc);
RDCASSERT(dxbc->m_Type == D3D11_ShaderType_Pixel);
+1 -1
View File
@@ -504,7 +504,7 @@ std::string D3D12Replay::DisassembleShader(ResourceId pipeline, const ShaderRefl
if(!sh)
return "; Invalid Shader Specified";
DXBC::DXBCFile *dxbc = sh->GetDXBC();
DXBC::DXBCContainer *dxbc = sh->GetDXBC();
if(target == DXBCDisassemblyTarget || target.empty())
return dxbc->GetDisassembly();
+4 -4
View File
@@ -36,13 +36,13 @@ const GUID RENDERDOC_ID3D12ShaderGUID_ShaderDebugMagicValue = RENDERDOC_ShaderDe
void WrappedID3D12Shader::TryReplaceOriginalByteCode()
{
if(!DXBC::DXBCFile::CheckForDebugInfo((const void *)&m_Bytecode[0], m_Bytecode.size()))
if(!DXBC::DXBCContainer::CheckForDebugInfo((const void *)&m_Bytecode[0], m_Bytecode.size()))
{
std::string originalPath = m_DebugInfoPath;
if(originalPath.empty())
originalPath =
DXBC::DXBCFile::GetDebugBinaryPath((const void *)&m_Bytecode[0], m_Bytecode.size());
DXBC::DXBCContainer::GetDebugBinaryPath((const void *)&m_Bytecode[0], m_Bytecode.size());
if(!originalPath.empty())
{
@@ -128,8 +128,8 @@ void WrappedID3D12Shader::TryReplaceOriginalByteCode()
memcpy(&originalBytecode[0], &decompressed[0], originalBytecode.size());
}
if(DXBC::DXBCFile::CheckForDebugInfo((const void *)&originalBytecode[0],
originalBytecode.size()))
if(DXBC::DXBCContainer::CheckForDebugInfo((const void *)&originalBytecode[0],
originalBytecode.size()))
{
m_Bytecode.swap(originalBytecode);
}
+5 -5
View File
@@ -24,7 +24,7 @@
#pragma once
#include "driver/shaders/dxbc/dxbc_inspect.h"
#include "driver/shaders/dxbc/dxbc_container.h"
#include "d3d12_device.h"
#include "d3d12_manager.h"
@@ -639,7 +639,7 @@ public:
DXBCKey(const D3D12_SHADER_BYTECODE &byteCode)
{
byteLen = (uint32_t)byteCode.BytecodeLength;
DXBC::DXBCFile::GetHash(hash, byteCode.pShaderBytecode, byteCode.BytecodeLength);
DXBC::DXBCContainer::GetHash(hash, byteCode.pShaderBytecode, byteCode.BytecodeLength);
}
// assume that byte length + hash is enough to uniquely identify a shader bytecode
@@ -750,12 +750,12 @@ public:
return ret;
}
DXBC::DXBCFile *GetDXBC()
DXBC::DXBCContainer *GetDXBC()
{
if(m_DXBCFile == NULL && !m_Bytecode.empty())
{
TryReplaceOriginalByteCode();
m_DXBCFile = new DXBC::DXBCFile((const void *)&m_Bytecode[0], m_Bytecode.size());
m_DXBCFile = new DXBC::DXBCContainer((const void *)&m_Bytecode[0], m_Bytecode.size());
}
return m_DXBCFile;
}
@@ -790,7 +790,7 @@ public:
std::vector<byte> m_Bytecode;
bool m_Built;
DXBC::DXBCFile *m_DXBCFile;
DXBC::DXBCContainer *m_DXBCFile;
ShaderReflection m_Details;
ShaderBindpointMapping m_Mapping;
@@ -25,7 +25,7 @@
#include "d3d12_shader_cache.h"
#include "common/shader_cache.h"
#include "driver/dx/official/d3dcompiler.h"
#include "driver/shaders/dxbc/dxbc_inspect.h"
#include "driver/shaders/dxbc/dxbc_container.h"
#include "strings/string_utils.h"
typedef HRESULT(WINAPI *pD3DCreateBlob)(SIZE_T Size, ID3DBlob **ppBlob);
-5
View File
@@ -27,11 +27,6 @@
#include <vector>
#include "api/replay/renderdoc_replay.h"
namespace DXBC
{
class DXBCFile;
};
namespace GCNISA
{
void GetTargets(GraphicsAPI api, std::vector<std::string> &targets);
@@ -23,7 +23,7 @@
* THE SOFTWARE.
******************************************************************************/
#include "dxbc_inspect.h"
#include "dxbc_container.h"
#include <algorithm>
#include "api/app/renderdoc_app.h"
#include "common/common.h"
@@ -354,7 +354,8 @@ std::string TypeName(CBufferVariableType::Descriptor desc)
return ret;
}
CBufferVariableType DXBCFile::ParseRDEFType(RDEFHeader *h, char *chunkContents, uint32_t typeOffset)
CBufferVariableType DXBCContainer::ParseRDEFType(RDEFHeader *h, char *chunkContents,
uint32_t typeOffset)
{
if(m_Variables.find(typeOffset) != m_Variables.end())
return m_Variables[typeOffset];
@@ -451,7 +452,7 @@ CBufferVariableType DXBCFile::ParseRDEFType(RDEFHeader *h, char *chunkContents,
return ret;
}
void DXBCFile::GetHash(uint32_t hash[4], const void *ByteCode, size_t BytecodeLength)
void DXBCContainer::GetHash(uint32_t hash[4], const void *ByteCode, size_t BytecodeLength)
{
if(BytecodeLength < sizeof(FileHeader))
{
@@ -464,7 +465,7 @@ void DXBCFile::GetHash(uint32_t hash[4], const void *ByteCode, size_t BytecodeLe
memcpy(hash, header->hashValue, sizeof(header->hashValue));
}
bool DXBCFile::CheckForDebugInfo(const void *ByteCode, size_t ByteCodeLength)
bool DXBCContainer::CheckForDebugInfo(const void *ByteCode, size_t ByteCodeLength)
{
FileHeader *header = (FileHeader *)ByteCode;
@@ -495,7 +496,7 @@ bool DXBCFile::CheckForDebugInfo(const void *ByteCode, size_t ByteCodeLength)
return false;
}
bool DXBCFile::CheckForShaderCode(const void *ByteCode, size_t ByteCodeLength)
bool DXBCContainer::CheckForShaderCode(const void *ByteCode, size_t ByteCodeLength)
{
FileHeader *header = (FileHeader *)ByteCode;
@@ -520,7 +521,7 @@ bool DXBCFile::CheckForShaderCode(const void *ByteCode, size_t ByteCodeLength)
return false;
}
std::string DXBCFile::GetDebugBinaryPath(const void *ByteCode, size_t ByteCodeLength)
std::string DXBCContainer::GetDebugBinaryPath(const void *ByteCode, size_t ByteCodeLength)
{
std::string debugPath;
FileHeader *header = (FileHeader *)ByteCode;
@@ -559,7 +560,7 @@ std::string DXBCFile::GetDebugBinaryPath(const void *ByteCode, size_t ByteCodeLe
return debugPath;
}
DXBCFile::DXBCFile(const void *ByteCode, size_t ByteCodeLength)
DXBCContainer::DXBCContainer(const void *ByteCode, size_t ByteCodeLength)
{
m_DebugInfo = NULL;
@@ -1308,7 +1309,7 @@ DXBCFile::DXBCFile(const void *ByteCode, size_t ByteCodeLength)
}
}
void DXBCFile::GuessResources()
void DXBCContainer::GuessResources()
{
char buf[64] = {0};
@@ -338,11 +338,11 @@ ShaderCompileFlags EncodeFlags(const uint32_t flags);
// declare one of these and pass in your shader bytecode, then inspect
// the members that are populated with the shader information.
class DXBCFile
class DXBCContainer
{
public:
DXBCFile(const void *ByteCode, size_t ByteCodeLength);
~DXBCFile() { SAFE_DELETE(m_DebugInfo); }
DXBCContainer(const void *ByteCode, size_t ByteCodeLength);
~DXBCContainer() { SAFE_DELETE(m_DebugInfo); }
D3D11_ShaderType m_Type;
struct
{
@@ -396,8 +396,8 @@ public:
static std::string GetDebugBinaryPath(const void *ByteCode, size_t ByteCodeLength);
private:
DXBCFile(const DXBCFile &o);
DXBCFile &operator=(const DXBCFile &o);
DXBCContainer(const DXBCContainer &o);
DXBCContainer &operator=(const DXBCContainer &o);
void FetchComputeProperties();
void FetchTypeVersion();
+1 -1
View File
@@ -26,7 +26,7 @@
#include "dxbc_debug.h"
#include <algorithm>
#include "maths/formatpacking.h"
#include "dxbc_inspect.h"
#include "dxbc_container.h"
using namespace DXBC;
+3 -3
View File
@@ -31,7 +31,7 @@
namespace DXBC
{
class DXBCFile;
class DXBCContainer;
struct CBufferVariable;
}
@@ -208,7 +208,7 @@ public:
dxbc = NULL;
RDCEraseEl(semantics);
}
State(int quadIdx, const ShaderDebugTrace *t, DXBC::DXBCFile *f)
State(int quadIdx, const ShaderDebugTrace *t, DXBC::DXBCContainer *f)
{
quadIndex = quadIdx;
nextInstruction = 0;
@@ -268,7 +268,7 @@ private:
VarType OperationType(const DXBC::OpcodeType &op) const;
bool OperationFlushing(const DXBC::OpcodeType &op) const;
DXBC::DXBCFile *dxbc;
DXBC::DXBCContainer *dxbc;
const ShaderDebugTrace *trace;
};
@@ -29,7 +29,7 @@
#include "core/core.h"
#include "serialise/serialiser.h"
#include "strings/string_utils.h"
#include "dxbc_inspect.h"
#include "dxbc_container.h"
namespace DXBC
{
@@ -281,7 +281,7 @@ bool ASMOperand::operator==(const ASMOperand &o) const
return true;
}
void DXBCFile::FetchTypeVersion()
void DXBCContainer::FetchTypeVersion()
{
if(m_HexDump.empty())
return;
@@ -294,7 +294,7 @@ void DXBCFile::FetchTypeVersion()
m_Version.Minor = VersionToken::MinorVersion.Get(cur[0]);
}
void DXBCFile::FetchComputeProperties()
void DXBCContainer::FetchComputeProperties()
{
if(m_HexDump.empty())
return;
@@ -375,7 +375,7 @@ void DXBCFile::FetchComputeProperties()
}
}
void DXBCFile::DisassembleHexDump()
void DXBCContainer::DisassembleHexDump()
{
if(m_Disassembled)
return;
@@ -470,7 +470,7 @@ void DXBCFile::DisassembleHexDump()
m_Instructions.push_back(implicitRet);
}
void DXBCFile::MakeDisassemblyString()
void DXBCContainer::MakeDisassemblyString()
{
DisassembleHexDump();
@@ -633,7 +633,7 @@ void DXBCFile::MakeDisassemblyString()
}
}
bool DXBCFile::IsDeclaration(OpcodeType op)
bool DXBCContainer::IsDeclaration(OpcodeType op)
{
// isDecl means not a real instruction, just a declaration type token
bool isDecl = false;
@@ -646,7 +646,7 @@ bool DXBCFile::IsDeclaration(OpcodeType op)
return isDecl;
}
bool DXBCFile::ExtractOperand(uint32_t *&tokenStream, ToString flags, ASMOperand &retOper)
bool DXBCContainer::ExtractOperand(uint32_t *&tokenStream, ToString flags, ASMOperand &retOper)
{
uint32_t OperandToken0 = tokenStream[0];
@@ -837,7 +837,7 @@ const CBufferVariable *FindCBufferVar(const uint32_t minOffset, const uint32_t m
return NULL;
}
std::string ASMOperand::toString(DXBCFile *dxbc, ToString flags) const
std::string ASMOperand::toString(DXBCContainer *dxbc, ToString flags) const
{
std::string str, regstr;
@@ -1287,7 +1287,7 @@ std::string ASMOperand::toString(DXBCFile *dxbc, ToString flags) const
return str;
}
bool DXBCFile::ExtractDecl(uint32_t *&tokenStream, ASMDecl &retDecl, bool friendlyName)
bool DXBCContainer::ExtractDecl(uint32_t *&tokenStream, ASMDecl &retDecl, bool friendlyName)
{
uint32_t *begin = tokenStream;
uint32_t OpcodeToken0 = tokenStream[0];
@@ -2149,7 +2149,7 @@ bool DXBCFile::ExtractDecl(uint32_t *&tokenStream, ASMDecl &retDecl, bool friend
return true;
}
bool DXBCFile::ExtractOperation(uint32_t *&tokenStream, ASMOperation &retOp, bool friendlyName)
bool DXBCContainer::ExtractOperation(uint32_t *&tokenStream, ASMOperation &retOp, bool friendlyName)
{
uint32_t *begin = tokenStream;
uint32_t OpcodeToken0 = tokenStream[0];
@@ -2427,7 +2427,7 @@ bool DXBCFile::ExtractOperation(uint32_t *&tokenStream, ASMOperation &retOp, boo
// see http://msdn.microsoft.com/en-us/library/windows/desktop/bb219840(v=vs.85).aspx
// for details of these opcodes
size_t DXBCFile::NumOperands(OpcodeType op)
size_t DXBCContainer::NumOperands(OpcodeType op)
{
switch(op)
{
@@ -682,7 +682,7 @@ enum ComponentType
// Main structures
/////////////////////////////////////////////////////////////////////////
class DXBCFile;
class DXBCContainer;
struct ASMIndex;
struct ASMDecl;
@@ -721,7 +721,7 @@ struct ASMOperand
bool operator==(const ASMOperand &o) const;
std::string toString(DXBCFile *dxbc, ToString flags) const;
std::string toString(DXBCContainer *dxbc, ToString flags) const;
///////////////////////////////////////
@@ -25,7 +25,7 @@
#include "dxbc_reflect.h"
#include "api/replay/renderdoc_replay.h"
#include "core/core.h"
#include "dxbc_inspect.h"
#include "dxbc_container.h"
static ShaderConstant MakeConstantBufferVariable(const DXBC::CBufferVariable &var);
@@ -99,7 +99,7 @@ static ShaderConstant MakeConstantBufferVariable(const DXBC::CBufferVariable &va
return ret;
}
static void MakeResourceList(bool srv, DXBC::DXBCFile *dxbc,
static void MakeResourceList(bool srv, DXBC::DXBCContainer *dxbc,
const std::vector<DXBC::ShaderInputBind> &in,
rdcarray<Bindpoint> &mapping, rdcarray<ShaderResource> &refl)
{
@@ -195,7 +195,7 @@ static void MakeResourceList(bool srv, DXBC::DXBCFile *dxbc,
}
}
void MakeShaderReflection(DXBC::DXBCFile *dxbc, ShaderReflection *refl,
void MakeShaderReflection(DXBC::DXBCContainer *dxbc, ShaderReflection *refl,
ShaderBindpointMapping *mapping)
{
if(dxbc == NULL || !RenderDoc::Inst().IsReplayApp())
+2 -2
View File
@@ -26,7 +26,7 @@
namespace DXBC
{
class DXBCFile;
class DXBCContainer;
}
struct ShaderReflection;
@@ -34,5 +34,5 @@ struct ShaderBindpointMapping;
#define D3Dx_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT 32
void MakeShaderReflection(DXBC::DXBCFile *dxbc, ShaderReflection *refl,
void MakeShaderReflection(DXBC::DXBCContainer *dxbc, ShaderReflection *refl,
ShaderBindpointMapping *mapping);
+1 -1
View File
@@ -23,7 +23,7 @@
* THE SOFTWARE.
******************************************************************************/
#include "dxbc_inspect.h"
#include "dxbc_container.h"
#include "dxbc_sdbg.h"
+2 -2
View File
@@ -24,7 +24,7 @@
******************************************************************************/
#include <algorithm>
#include "dxbc_inspect.h"
#include "dxbc_container.h"
#include "official/cvinfo.h"
#include "dxbc_spdb.h"
@@ -40,7 +40,7 @@ namespace DXBC
{
static const uint32_t FOURCC_SPDB = MAKE_FOURCC('S', 'P', 'D', 'B');
SPDBChunk::SPDBChunk(DXBCFile *dxbc, void *chunk)
SPDBChunk::SPDBChunk(DXBCContainer *dxbc, void *chunk)
{
m_HasDebugInfo = false;
+1 -1
View File
@@ -259,7 +259,7 @@ struct LocalMapping
class SPDBChunk : public DXBCDebugChunk
{
public:
SPDBChunk(DXBCFile *dxbc, void *data);
SPDBChunk(DXBCContainer *dxbc, void *data);
SPDBChunk(const SPDBChunk &) = delete;
SPDBChunk &operator=(const SPDBChunk &o) = delete;
@@ -102,7 +102,7 @@
<ClCompile Include="dxbc_compile.cpp" />
<ClCompile Include="dxbc_debug.cpp" />
<ClCompile Include="dxbc_disassemble.cpp" />
<ClCompile Include="dxbc_inspect.cpp" />
<ClCompile Include="dxbc_container.cpp" />
<ClCompile Include="dxbc_reflect.cpp" />
<ClCompile Include="dxbc_sdbg.cpp" />
<ClCompile Include="dxbc_spdb.cpp" />
@@ -114,7 +114,7 @@
<ClInclude Include="dxbc_compile.h" />
<ClInclude Include="dxbc_debug.h" />
<ClInclude Include="dxbc_disassemble.h" />
<ClInclude Include="dxbc_inspect.h" />
<ClInclude Include="dxbc_container.h" />
<ClInclude Include="dxbc_reflect.h" />
<ClInclude Include="dxbc_sdbg.h" />
<ClInclude Include="dxbc_spdb.h" />
@@ -3,7 +3,6 @@
<ItemGroup>
<ClCompile Include="dxbc_debug.cpp" />
<ClCompile Include="dxbc_disassemble.cpp" />
<ClCompile Include="dxbc_inspect.cpp" />
<ClCompile Include="dxbc_compile.cpp" />
<ClCompile Include="precompiled.cpp">
<Filter>PCH</Filter>
@@ -11,11 +10,11 @@
<ClCompile Include="dxbc_reflect.cpp" />
<ClCompile Include="dxbc_spdb.cpp" />
<ClCompile Include="dxbc_sdbg.cpp" />
<ClCompile Include="dxbc_container.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="dxbc_debug.h" />
<ClInclude Include="dxbc_disassemble.h" />
<ClInclude Include="dxbc_inspect.h" />
<ClInclude Include="dxbc_sdbg.h" />
<ClInclude Include="dxbc_spdb.h" />
<ClInclude Include="dxbc_compile.h" />
@@ -29,6 +28,7 @@
<ClInclude Include="official\cvinfo.h">
<Filter>official</Filter>
</ClInclude>
<ClInclude Include="dxbc_container.h" />
</ItemGroup>
<ItemGroup>
<Filter Include="PCH">