mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Added DXIL::SetResultSSAId() and DXIL::FindSigParameter()
This commit is contained in:
@@ -1619,6 +1619,7 @@ protected:
|
||||
|
||||
const ResourceReference *GetResourceReference(const rdcstr &handleStr) const;
|
||||
rdcstr GetHandleAlias(const rdcstr &handleStr) const;
|
||||
static DXILDebug::Id GetResultSSAId(const DXIL::Instruction &inst);
|
||||
static void MakeResultId(const Instruction &inst, rdcstr &resultId);
|
||||
rdcstr GetArgId(const Instruction &inst, uint32_t arg) const;
|
||||
rdcstr GetArgId(const Value *v) const;
|
||||
@@ -1726,6 +1727,8 @@ bool getival(const Value *v, T &out)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FindSigParameter(const rdcarray<SigParameter> &inputSig,
|
||||
const EntryPointInterface::Signature &dxilParam, SigParameter &sigParam);
|
||||
bool IsSSA(const Value *dxilValue);
|
||||
DXILDebug::Id GetSSAId(const DXIL::Value *value);
|
||||
bool IsDXCNop(const Instruction &inst);
|
||||
|
||||
@@ -138,6 +138,31 @@ DXILDebug::Id DXIL::GetSSAId(const DXIL::Value *value)
|
||||
return DXILDebug::INVALID_ID;
|
||||
}
|
||||
|
||||
bool DXIL::FindSigParameter(const rdcarray<SigParameter> &inputSig,
|
||||
const EntryPointInterface::Signature &dxilParam, SigParameter &sigParam)
|
||||
{
|
||||
for(const SigParameter ¶m : inputSig)
|
||||
{
|
||||
if(dxilParam.startRow == (int32_t)param.regIndex)
|
||||
{
|
||||
const int firstElem = param.regChannelMask & 0x1 ? 0
|
||||
: param.regChannelMask & 0x2 ? 1
|
||||
: param.regChannelMask & 0x4 ? 2
|
||||
: param.regChannelMask & 0x8 ? 3
|
||||
: -1;
|
||||
if(dxilParam.startCol == firstElem)
|
||||
{
|
||||
if(param.semanticName == dxilParam.name)
|
||||
{
|
||||
sigParam = param;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static const char *shaderNames[] = {
|
||||
"Pixel", "Vertex", "Geometry", "Hull", "Domain",
|
||||
"Compute", "Library", "RayGeneration", "Intersection", "AnyHit",
|
||||
@@ -5806,6 +5831,11 @@ rdcstr Program::GetArgId(const Value *v) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
DXILDebug::Id Program::GetResultSSAId(const DXIL::Instruction &inst)
|
||||
{
|
||||
return inst.slot;
|
||||
}
|
||||
|
||||
void Program::MakeResultId(const DXIL::Instruction &inst, rdcstr &resultId)
|
||||
{
|
||||
if(!inst.getName().empty())
|
||||
|
||||
Reference in New Issue
Block a user