Handle opening vulkan shaders that are not in a pipeline.

* Previously we were relying on the pipeline info create to initialise
  the reflection for an entry point, now we do it on demand wherever it
  is needed.
This commit is contained in:
baldurk
2018-02-09 19:03:55 +00:00
parent 387de2527e
commit d3bf628394
21 changed files with 96 additions and 84 deletions
+9 -4
View File
@@ -609,12 +609,17 @@ void ShaderViewer::updateWindowTitle()
{
if(m_ShaderDetails)
{
QString shaderName = m_Ctx.GetResourceName(m_ShaderDetails->resourceId);
// if the shader is currently bound, look up the name through the pipeline state. This is purely
// for the benefit of D3D12 which doesn't have separate shader objects
if(m_Ctx.CurPipelineState().GetShader(m_Stage) == m_ShaderDetails->resourceId)
shaderName = m_Ctx.CurPipelineState().GetShaderName(m_Stage);
if(m_Trace)
setWindowTitle(QFormatStr("Debugging %1 - %2")
.arg(m_Ctx.CurPipelineState().GetShaderName(m_Stage))
.arg(m_DebugContext));
setWindowTitle(QFormatStr("Debugging %1 - %2").arg(shaderName).arg(m_DebugContext));
else
setWindowTitle(m_Ctx.CurPipelineState().GetShaderName(m_Stage));
setWindowTitle(shaderName);
}
}
+2
View File
@@ -646,6 +646,8 @@ DECLARE_REFLECTION_STRUCT(ShaderResource);
DOCUMENT("Describes an entry point in a shader.");
struct ShaderEntryPoint
{
ShaderEntryPoint() = default;
ShaderEntryPoint(const rdcstr &n, ShaderStage s) : name(n), stage(s) {}
DOCUMENT("");
bool operator==(const ShaderEntryPoint &o) const { return name == o.name && stage == o.stage; }
bool operator<(const ShaderEntryPoint &o) const
+1 -1
View File
@@ -207,7 +207,7 @@ public:
return ResourceId();
}
rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader) { return {}; }
ShaderReflection *GetShader(ResourceId shader, string entryPoint) { return NULL; }
ShaderReflection *GetShader(ResourceId shader, ShaderEntryPoint entry) { return NULL; }
vector<string> GetDisassemblyTargets() { return {"N/A"}; }
string DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const string &target)
{
+18 -15
View File
@@ -817,12 +817,12 @@ rdcarray<ShaderEntryPoint> ReplayProxy::GetShaderEntryPoints(ResourceId id)
template <typename ParamSerialiser, typename ReturnSerialiser>
ShaderReflection *ReplayProxy::Proxied_GetShader(ParamSerialiser &paramser, ReturnSerialiser &retser,
ResourceId id, std::string entryPoint)
ResourceId id, ShaderEntryPoint entry)
{
const ReplayProxyPacket packet = eReplayProxy_GetShader;
ShaderReflection *ret = NULL;
ShaderReflKey key(id, entryPoint);
ShaderReflKey key(id, entry);
if(retser.IsReading() && m_ShaderReflectionCache.find(key) != m_ShaderReflectionCache.end())
return m_ShaderReflectionCache[key];
@@ -830,12 +830,12 @@ ShaderReflection *ReplayProxy::Proxied_GetShader(ParamSerialiser &paramser, Retu
{
BEGIN_PARAMS();
SERIALISE_ELEMENT(id);
SERIALISE_ELEMENT(entryPoint);
SERIALISE_ELEMENT(entry);
END_PARAMS();
}
if(paramser.IsReading() && !paramser.IsErrored() && !m_IsErrored)
ret = m_Remote->GetShader(id, entryPoint);
ret = m_Remote->GetShader(id, entry);
{
ReturnSerialiser &ser = retser;
@@ -855,9 +855,9 @@ ShaderReflection *ReplayProxy::Proxied_GetShader(ParamSerialiser &paramser, Retu
return m_ShaderReflectionCache[key];
}
ShaderReflection *ReplayProxy::GetShader(ResourceId id, std::string entryPoint)
ShaderReflection *ReplayProxy::GetShader(ResourceId id, ShaderEntryPoint entry)
{
PROXY_FUNCTION(GetShader, id, entryPoint);
PROXY_FUNCTION(GetShader, id, entry);
}
template <typename ParamSerialiser, typename ReturnSerialiser>
@@ -868,13 +868,14 @@ std::string ReplayProxy::Proxied_DisassembleShader(ParamSerialiser &paramser,
{
const ReplayProxyPacket packet = eReplayProxy_DisassembleShader;
ResourceId Shader;
std::string EntryPoint;
ShaderEntryPoint EntryPoint;
std::string ret;
if(refl)
{
Shader = refl->resourceId;
EntryPoint = refl->entryPoint;
EntryPoint.name = refl->entryPoint;
EntryPoint.stage = refl->stage;
}
{
@@ -1229,11 +1230,11 @@ void ReplayProxy::Proxied_SavePipelineState(ParamSerialiser &paramser, ReturnSer
for(int i = 0; i < 6; i++)
if(stages[i]->resourceId != ResourceId())
stages[i]->reflection = GetShader(GetLiveID(stages[i]->resourceId), "");
stages[i]->reflection = GetShader(GetLiveID(stages[i]->resourceId), ShaderEntryPoint());
if(m_D3D11PipelineState.inputAssembly.resourceId != ResourceId())
m_D3D11PipelineState.inputAssembly.bytecode =
GetShader(GetLiveID(m_D3D11PipelineState.inputAssembly.resourceId), "");
m_D3D11PipelineState.inputAssembly.bytecode = GetShader(
GetLiveID(m_D3D11PipelineState.inputAssembly.resourceId), ShaderEntryPoint());
}
else if(m_APIProps.pipelineType == GraphicsAPI::D3D12)
{
@@ -1245,7 +1246,7 @@ void ReplayProxy::Proxied_SavePipelineState(ParamSerialiser &paramser, ReturnSer
for(int i = 0; i < 6; i++)
if(stages[i]->resourceId != ResourceId())
stages[i]->reflection = GetShader(GetLiveID(stages[i]->resourceId), "");
stages[i]->reflection = GetShader(GetLiveID(stages[i]->resourceId), ShaderEntryPoint());
}
else if(m_APIProps.pipelineType == GraphicsAPI::OpenGL)
{
@@ -1257,7 +1258,8 @@ void ReplayProxy::Proxied_SavePipelineState(ParamSerialiser &paramser, ReturnSer
for(int i = 0; i < 6; i++)
if(stages[i]->shaderResourceId != ResourceId())
stages[i]->reflection = GetShader(GetLiveID(stages[i]->shaderResourceId), "");
stages[i]->reflection =
GetShader(GetLiveID(stages[i]->shaderResourceId), ShaderEntryPoint());
}
else if(m_APIProps.pipelineType == GraphicsAPI::Vulkan)
{
@@ -1270,7 +1272,8 @@ void ReplayProxy::Proxied_SavePipelineState(ParamSerialiser &paramser, ReturnSer
for(int i = 0; i < 6; i++)
if(stages[i]->resourceId != ResourceId())
stages[i]->reflection =
GetShader(GetLiveID(stages[i]->resourceId), stages[i]->entryPoint);
GetShader(GetLiveID(stages[i]->resourceId),
ShaderEntryPoint(stages[i]->entryPoint, stages[i]->stage));
}
}
}
@@ -2012,7 +2015,7 @@ bool ReplayProxy::Tick(int type)
case eReplayProxy_GetBuffers: GetBuffers(); break;
case eReplayProxy_GetBuffer: GetBuffer(ResourceId()); break;
case eReplayProxy_GetShaderEntryPoints: GetShaderEntryPoints(ResourceId()); break;
case eReplayProxy_GetShader: GetShader(ResourceId(), ""); break;
case eReplayProxy_GetShader: GetShader(ResourceId(), ShaderEntryPoint()); break;
case eReplayProxy_GetDebugMessages: GetDebugMessages(); break;
case eReplayProxy_GetBufferData:
{
+4 -4
View File
@@ -473,7 +473,7 @@ public:
IMPLEMENT_FUNCTION_PROXIED(rdcarray<ShaderEntryPoint>, GetShaderEntryPoints, ResourceId shader);
IMPLEMENT_FUNCTION_PROXIED(ShaderReflection *, GetShader, ResourceId shader,
std::string entryPoint);
ShaderEntryPoint entry);
IMPLEMENT_FUNCTION_PROXIED(std::vector<std::string>, GetDisassemblyTargets);
IMPLEMENT_FUNCTION_PROXIED(std::string, DisassembleShader, ResourceId pipeline,
@@ -597,15 +597,15 @@ private:
struct ShaderReflKey
{
ShaderReflKey() {}
ShaderReflKey(ResourceId i, string e) : id(i), entryPoint(e) {}
ShaderReflKey(ResourceId i, ShaderEntryPoint e) : id(i), entry(e) {}
ResourceId id;
string entryPoint;
ShaderEntryPoint entry;
bool operator<(const ShaderReflKey &o) const
{
if(id != o.id)
return id < o.id;
return entryPoint < o.entryPoint;
return entry < o.entry;
}
};
+2 -2
View File
@@ -370,7 +370,7 @@ rdcarray<ShaderEntryPoint> D3D11Replay::GetShaderEntryPoints(ResourceId shader)
return {{"main", ret.stage}};
}
ShaderReflection *D3D11Replay::GetShader(ResourceId shader, string entryPoint)
ShaderReflection *D3D11Replay::GetShader(ResourceId shader, ShaderEntryPoint entry)
{
auto it = WrappedShader::m_ShaderList.find(shader);
@@ -590,7 +590,7 @@ void D3D11Replay::SavePipelineState()
ResourceId layoutId = GetIDForResource(rs->IA.Layout);
ret.inputAssembly.resourceId = rm->GetOriginalID(layoutId);
ret.inputAssembly.bytecode = GetShader(layoutId, "");
ret.inputAssembly.bytecode = GetShader(layoutId, ShaderEntryPoint());
ret.inputAssembly.layouts.resize(vec.size());
for(size_t i = 0; i < vec.size(); i++)
+1 -1
View File
@@ -116,7 +116,7 @@ public:
vector<DebugMessage> GetDebugMessages();
rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader);
ShaderReflection *GetShader(ResourceId shader, string entryPoint);
ShaderReflection *GetShader(ResourceId shader, ShaderEntryPoint entry);
vector<string> GetDisassemblyTargets();
string DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const string &target);
+1 -1
View File
@@ -306,7 +306,7 @@ rdcarray<ShaderEntryPoint> D3D12Replay::GetShaderEntryPoints(ResourceId shader)
return {{"main", ret.stage}};
}
ShaderReflection *D3D12Replay::GetShader(ResourceId shader, string entryPoint)
ShaderReflection *D3D12Replay::GetShader(ResourceId shader, ShaderEntryPoint entry)
{
WrappedID3D12Shader *sh =
m_pDevice->GetResourceManager()->GetCurrentAs<WrappedID3D12Shader>(shader);
+1 -1
View File
@@ -71,7 +71,7 @@ public:
vector<DebugMessage> GetDebugMessages();
rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader);
ShaderReflection *GetShader(ResourceId shader, string entryPoint);
ShaderReflection *GetShader(ResourceId shader, ShaderEntryPoint entry);
vector<string> GetDisassemblyTargets();
string DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const string &target);
+2 -2
View File
@@ -69,7 +69,7 @@ void GLReplay::SetupOverlayPipeline(GLuint Program, GLuint Pipeline, GLuint frag
if(i == 0)
{
CopyProgramAttribBindings(gl.GetHookset(), progsrc, progdst,
GetShader(pipeDetails.stageShaders[i], ""));
GetShader(pipeDetails.stageShaders[i], ShaderEntryPoint()));
gl.glLinkProgram(progdst);
}
@@ -94,7 +94,7 @@ void GLReplay::SetupOverlayPipeline(GLuint Program, GLuint Pipeline, GLuint frag
if(i == 0)
{
CopyProgramAttribBindings(gl.GetHookset(), Program, progdst,
GetShader(progDetails.stageShaders[i], ""));
GetShader(progDetails.stageShaders[i], ShaderEntryPoint()));
gl.glLinkProgram(progdst);
}
+6 -6
View File
@@ -100,7 +100,7 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
if(pipeDetails.stageShaders[0] != ResourceId())
{
vsRefl = GetShader(pipeDetails.stageShaders[0], "");
vsRefl = GetShader(pipeDetails.stageShaders[0], ShaderEntryPoint());
vsProg = m_pDriver->m_Shaders[pipeDetails.stageShaders[0]].prog;
vsProgSrc = rm->GetCurrentResource(pipeDetails.stagePrograms[0]).name;
}
@@ -111,13 +111,13 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
}
if(pipeDetails.stageShaders[2] != ResourceId())
{
tesRefl = GetShader(pipeDetails.stageShaders[2], "");
tesRefl = GetShader(pipeDetails.stageShaders[2], ShaderEntryPoint());
tesProg = m_pDriver->m_Shaders[pipeDetails.stageShaders[2]].prog;
tesProgSrc = rm->GetCurrentResource(pipeDetails.stagePrograms[2]).name;
}
if(pipeDetails.stageShaders[3] != ResourceId())
{
gsRefl = GetShader(pipeDetails.stageShaders[3], "");
gsRefl = GetShader(pipeDetails.stageShaders[3], ShaderEntryPoint());
gsProg = m_pDriver->m_Shaders[pipeDetails.stageShaders[3]].prog;
gsProgSrc = rm->GetCurrentResource(pipeDetails.stagePrograms[3]).name;
}
@@ -129,7 +129,7 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
if(progDetails.stageShaders[0] != ResourceId())
{
vsRefl = GetShader(progDetails.stageShaders[0], "");
vsRefl = GetShader(progDetails.stageShaders[0], ShaderEntryPoint());
vsProg = m_pDriver->m_Shaders[progDetails.stageShaders[0]].prog;
}
if(progDetails.stageShaders[1] != ResourceId())
@@ -138,12 +138,12 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId)
}
if(progDetails.stageShaders[2] != ResourceId())
{
tesRefl = GetShader(progDetails.stageShaders[2], "");
tesRefl = GetShader(progDetails.stageShaders[2], ShaderEntryPoint());
tesProg = m_pDriver->m_Shaders[progDetails.stageShaders[2]].prog;
}
if(progDetails.stageShaders[3] != ResourceId())
{
gsRefl = GetShader(progDetails.stageShaders[3], "");
gsRefl = GetShader(progDetails.stageShaders[3], ShaderEntryPoint());
gsProg = m_pDriver->m_Shaders[progDetails.stageShaders[3]].prog;
}
+4 -3
View File
@@ -603,7 +603,7 @@ rdcarray<ShaderEntryPoint> GLReplay::GetShaderEntryPoints(ResourceId shader)
return {{"main", MakeShaderStage(shaderDetails.type)}};
}
ShaderReflection *GLReplay::GetShader(ResourceId shader, string entryPoint)
ShaderReflection *GLReplay::GetShader(ResourceId shader, ShaderEntryPoint entry)
{
auto &shaderDetails = m_pDriver->m_Shaders[shader];
@@ -881,7 +881,8 @@ void GLReplay::SavePipelineState()
if(pipeDetails.stageShaders[i] != ResourceId())
{
curProg = rm->GetCurrentResource(pipeDetails.stagePrograms[i]).name;
stages[i]->reflection = refls[i] = GetShader(pipeDetails.stageShaders[i], "");
stages[i]->reflection = refls[i] =
GetShader(pipeDetails.stageShaders[i], ShaderEntryPoint());
GetBindpointMapping(gl.GetHookset(), curProg, (int)i, refls[i],
stages[i]->bindpointMapping);
mappings[i] = &stages[i]->bindpointMapping;
@@ -907,7 +908,7 @@ void GLReplay::SavePipelineState()
{
if(progDetails.stageShaders[i] != ResourceId())
{
stages[i]->reflection = refls[i] = GetShader(progDetails.stageShaders[i], "");
stages[i]->reflection = refls[i] = GetShader(progDetails.stageShaders[i], ShaderEntryPoint());
GetBindpointMapping(gl.GetHookset(), curProg, (int)i, refls[i], stages[i]->bindpointMapping);
mappings[i] = &stages[i]->bindpointMapping;
+1 -1
View File
@@ -103,7 +103,7 @@ public:
TextureDescription GetTexture(ResourceId id);
rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader);
ShaderReflection *GetShader(ResourceId shader, string entryPoint);
ShaderReflection *GetShader(ResourceId shader, ShaderEntryPoint entry);
vector<string> GetDisassemblyTargets();
string DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const string &target);
@@ -137,7 +137,7 @@ struct SPVModule
ShaderStage StageForEntry(const string &entryPoint) const;
void MakeReflection(ShaderStage stage, const string &entryPoint, ShaderReflection &reflection,
ShaderBindpointMapping &mapping, SPIRVPatchData &patchData);
ShaderBindpointMapping &mapping, SPIRVPatchData &patchData) const;
};
string CompileSPIRV(const SPIRVCompilationSettings &settings, const vector<string> &sources,
@@ -3924,7 +3924,7 @@ ShaderStage SPVModule::StageForEntry(const string &entryPoint) const
void SPVModule::MakeReflection(ShaderStage stage, const string &entryPoint,
ShaderReflection &reflection, ShaderBindpointMapping &mapping,
SPIRVPatchData &patchData)
SPIRVPatchData &patchData) const
{
vector<SigParameter> inputs;
vector<SigParameter> outputs;
+27 -33
View File
@@ -138,23 +138,8 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan, Vulk
ShaderModule::Reflection &reflData = info.m_ShaderModule[id].m_Reflections[shad.entryPoint];
if(reflData.entryPoint.empty())
{
SPVModule &spv = info.m_ShaderModule[id].spirv;
spv.MakeReflection(ShaderStage(reflData.stage), shad.entryPoint, reflData.refl,
reflData.mapping, reflData.patchData);
reflData.entryPoint = shad.entryPoint;
reflData.stage = stageIndex;
reflData.refl.resourceId = resourceMan->GetOriginalID(id);
if(!spv.spirv.empty())
{
const std::vector<uint32_t> &spirv = spv.spirv;
reflData.refl.encoding = ShaderEncoding::SPIRV;
reflData.refl.rawBytes.assign((byte *)spirv.data(), spirv.size() * sizeof(uint32_t));
}
}
reflData.Init(resourceMan, id, info.m_ShaderModule[id].spirv, shad.entryPoint,
pCreateInfo->pStages[i].stage);
if(pCreateInfo->pStages[i].pSpecializationInfo)
{
@@ -364,22 +349,8 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan, Vulk
ShaderModule::Reflection &reflData = info.m_ShaderModule[id].m_Reflections[shad.entryPoint];
if(reflData.entryPoint.empty())
{
reflData.entryPoint = shad.entryPoint;
reflData.stage = StageIndex(pCreateInfo->stage.stage);
SPVModule &spv = info.m_ShaderModule[id].spirv;
spv.MakeReflection(ShaderStage::Compute, shad.entryPoint, reflData.refl, reflData.mapping,
reflData.patchData);
reflData.refl.resourceId = resourceMan->GetOriginalID(id);
if(!spv.spirv.empty())
{
const vector<uint32_t> &spirv = spv.spirv;
reflData.refl.encoding = ShaderEncoding::SPIRV;
reflData.refl.rawBytes.assign((byte *)spirv.data(), spirv.size() * sizeof(uint32_t));
}
}
reflData.Init(resourceMan, id, info.m_ShaderModule[id].spirv, shad.entryPoint,
pCreateInfo->stage.stage);
if(pCreateInfo->stage.pSpecializationInfo)
{
@@ -638,3 +609,26 @@ void VulkanCreationInfo::ShaderModule::Init(VulkanResourceManager *resourceMan,
ParseSPIRV((uint32_t *)pCreateInfo->pCode, pCreateInfo->codeSize / sizeof(uint32_t), spirv);
}
}
void VulkanCreationInfo::ShaderModule::Reflection::Init(VulkanResourceManager *resourceMan,
ResourceId id, const SPVModule &spv,
const std::string &entry,
VkShaderStageFlagBits stage)
{
if(entryPoint.empty())
{
entryPoint = entry;
stageIndex = StageIndex(stage);
spv.MakeReflection(ShaderStage(stageIndex), entryPoint, refl, mapping, patchData);
refl.resourceId = resourceMan->GetOriginalID(id);
refl.entryPoint = entryPoint;
if(!spv.spirv.empty())
{
refl.encoding = ShaderEncoding::SPIRV;
refl.rawBytes.assign((byte *)spv.spirv.data(), spv.spirv.size() * sizeof(uint32_t));
}
}
}
+4 -1
View File
@@ -355,12 +355,15 @@ struct VulkanCreationInfo
struct Reflection
{
uint32_t stage;
uint32_t stageIndex;
string entryPoint;
string disassembly;
ShaderReflection refl;
ShaderBindpointMapping mapping;
SPIRVPatchData patchData;
void Init(VulkanResourceManager *resourceMan, ResourceId id, const SPVModule &spv,
const std::string &entry, VkShaderStageFlagBits stage);
};
map<string, Reflection> m_Reflections;
};
+8 -4
View File
@@ -318,7 +318,7 @@ rdcarray<ShaderEntryPoint> VulkanReplay::GetShaderEntryPoints(ResourceId shader)
return ret;
}
ShaderReflection *VulkanReplay::GetShader(ResourceId shader, string entryPoint)
ShaderReflection *VulkanReplay::GetShader(ResourceId shader, ShaderEntryPoint entry)
{
auto shad = m_pDriver->m_CreationInfo.m_ShaderModule.find(shader);
@@ -328,7 +328,11 @@ ShaderReflection *VulkanReplay::GetShader(ResourceId shader, string entryPoint)
return NULL;
}
return &shad->second.m_Reflections[entryPoint].refl;
shad->second.m_Reflections[entry.name].Init(GetResourceManager(), shader, shad->second.spirv,
entry.name,
VkShaderStageFlagBits(1 << uint32_t(entry.stage)));
return &shad->second.m_Reflections[entry.name].refl;
}
vector<string> VulkanReplay::GetDisassemblyTargets()
@@ -383,7 +387,7 @@ string VulkanReplay::DisassembleShader(ResourceId pipeline, const ShaderReflecti
VkPipeline pipe = m_pDriver->GetResourceManager()->GetLiveHandle<VkPipeline>(pipeline);
VkShaderStageFlagBits stageBit =
VkShaderStageFlagBits(1 << it->second.m_Reflections[refl->entryPoint.c_str()].stage);
VkShaderStageFlagBits(1 << it->second.m_Reflections[refl->entryPoint.c_str()].stageIndex);
size_t size;
vt->GetShaderInfoAMD(Unwrap(dev), Unwrap(pipe), stageBit, VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD,
@@ -1636,7 +1640,7 @@ void VulkanReplay::FillCBufferVariables(ResourceId shader, string entryPoint, ui
if(pipeIt != m_pDriver->m_CreationInfo.m_Pipeline.end())
{
auto specInfo =
pipeIt->second.shaders[it->second.m_Reflections[entryPoint].stage].specialization;
pipeIt->second.shaders[it->second.m_Reflections[entryPoint].stageIndex].specialization;
// find any actual values specified
for(size_t i = 0; i < specInfo.size(); i++)
+1 -1
View File
@@ -194,7 +194,7 @@ public:
TextureDescription GetTexture(ResourceId id);
rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader);
ShaderReflection *GetShader(ResourceId shader, string entryPoint);
ShaderReflection *GetShader(ResourceId shader, ShaderEntryPoint entry);
vector<string> GetDisassemblyTargets();
string DisassembleShader(ResourceId pipeline, const ShaderReflection *refl, const string &target);
+1 -1
View File
@@ -333,7 +333,7 @@ rdcarray<ShaderEntryPoint> ReplayController::GetShaderEntryPoints(ResourceId sha
ShaderReflection *ReplayController::GetShader(ResourceId shader, ShaderEntryPoint entry)
{
return m_pDevice->GetShader(m_pDevice->GetLiveID(shader), entry.name);
return m_pDevice->GetShader(m_pDevice->GetLiveID(shader), entry);
}
rdcarray<EventUsage> ReplayController::GetUsage(ResourceId id)
+1 -1
View File
@@ -101,7 +101,7 @@ public:
virtual vector<DebugMessage> GetDebugMessages() = 0;
virtual rdcarray<ShaderEntryPoint> GetShaderEntryPoints(ResourceId shader) = 0;
virtual ShaderReflection *GetShader(ResourceId shader, string entryPoint) = 0;
virtual ShaderReflection *GetShader(ResourceId shader, ShaderEntryPoint entry) = 0;
virtual vector<string> GetDisassemblyTargets() = 0;
virtual string DisassembleShader(ResourceId pipeline, const ShaderReflection *refl,