mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-16 00:59:22 +00:00
Move the GCN disassembly to the replay controller
* This way it's uniformly supported, so e.g. we can still get it when the replay itself is running on android. * To do this we just pass the 'raw' bytes, which contains the whole blob needed for disassembly. This means a little extra work to disassemble D3D blobs by doing a tiny parse of the DXBC.
This commit is contained in:
10 files changed
+163
-74
No files matched your search
@@ -27,6 +27,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "common/dds_readwrite.h"
|
||||
#include "driver/ihv/amd/amd_isa.h"
|
||||
#include "jpeg-compressor/jpgd.h"
|
||||
#include "jpeg-compressor/jpge.h"
|
||||
#include "maths/formatpacking.h"
|
||||
@@ -249,12 +250,19 @@ rdcarray<rdcstr> ReplayController::GetDisassemblyTargets()
|
||||
for(const std::string &t : targets)
|
||||
ret.push_back(t);
|
||||
|
||||
for(const std::string &t : m_GCNTargets)
|
||||
ret.push_back(t);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
rdcstr ReplayController::DisassembleShader(ResourceId pipeline, const ShaderReflection *refl,
|
||||
const char *target)
|
||||
{
|
||||
for(const std::string &t : m_GCNTargets)
|
||||
if(t == target)
|
||||
return GCNISA::Disassemble(refl->encoding, refl->stage, refl->rawBytes, target);
|
||||
|
||||
return m_pDevice->DisassembleShader(pipeline, refl, target);
|
||||
}
|
||||
|
||||
@@ -1594,6 +1602,11 @@ ReplayStatus ReplayController::PostCreateInit(IReplayDriver *device, RDCFile *rd
|
||||
|
||||
FetchPipelineState();
|
||||
|
||||
m_APIProps = m_pDevice->GetAPIProperties();
|
||||
|
||||
// fetch GCN ISA targets
|
||||
GCNISA::GetTargets(m_APIProps.pipelineType, m_GCNTargets);
|
||||
|
||||
{
|
||||
std::vector<ResourceId> ids = m_pDevice->GetBuffers();
|
||||
|
||||
|
||||
Reference in new issue
Block a user