mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Use shader stage to properly disambiguate entry points on vulkan
* It's possible to have two entry points in a SPIR-V module both named "main" as long as they have different stages.
This commit is contained in:
@@ -161,7 +161,7 @@ void ConstantBufferPreviewer::OnEventChanged(uint32_t eventId)
|
||||
m_Ctx.Replay().AsyncInvoke(
|
||||
[this, prevShader, entryPoint, offset, size, wasEmpty](IReplayController *r) {
|
||||
rdcarray<ShaderVariable> vars = r->GetCBufferVariableContents(
|
||||
m_pipe, m_shader, entryPoint, m_slot, m_cbuffer, offset, size);
|
||||
m_pipe, m_shader, m_stage, entryPoint, m_slot, m_cbuffer, offset, size);
|
||||
GUIInvoke::call(this, [this, prevShader, vars, wasEmpty] {
|
||||
|
||||
RDTreeViewExpansionState &prevShaderExpansionState =
|
||||
|
||||
@@ -962,6 +962,7 @@ otherwise.
|
||||
|
||||
:param ResourceId pipeline: The pipeline state object, if applicable, that this shader is bound to.
|
||||
:param ResourceId shader: The id of the shader to use for metadata.
|
||||
:param ShaderStage stage: The shader stage to fetch variables from.
|
||||
:param str entryPoint: The entry point of the shader being used. In some APIs, this is ignored.
|
||||
:param int cbufslot: The index in the :data:`ShaderReflection.constantBlocks` list to look up.
|
||||
:param ResourceId buffer: The id of the buffer to use for data. If
|
||||
@@ -972,7 +973,8 @@ otherwise.
|
||||
:return: The shader variables with their contents.
|
||||
:rtype: List[ShaderVariable]
|
||||
)");
|
||||
virtual rdcarray<ShaderVariable> GetCBufferVariableContents(ResourceId pipeline, ResourceId shader,
|
||||
virtual rdcarray<ShaderVariable> GetCBufferVariableContents(ResourceId pipeline,
|
||||
ResourceId shader, ShaderStage stage,
|
||||
const rdcstr &entryPoint,
|
||||
uint32_t cbufslot, ResourceId buffer,
|
||||
uint64_t offset, uint64_t length) = 0;
|
||||
|
||||
@@ -271,8 +271,9 @@ public:
|
||||
return desc;
|
||||
}
|
||||
rdcarray<CounterResult> FetchCounters(const rdcarray<GPUCounter> &counters) { return {}; }
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
{
|
||||
}
|
||||
void GetBufferData(ResourceId buff, uint64_t offset, uint64_t len, bytebuf &retData) {}
|
||||
|
||||
@@ -846,8 +846,9 @@ CounterDescription ReplayProxy::DescribeCounter(GPUCounter counterID)
|
||||
template <typename ParamSerialiser, typename ReturnSerialiser>
|
||||
void ReplayProxy::Proxied_FillCBufferVariables(ParamSerialiser ¶mser, ReturnSerialiser &retser,
|
||||
ResourceId pipeline, ResourceId shader,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
ShaderStage stage, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
{
|
||||
const ReplayProxyPacket expectedPacket = eReplayProxy_FillCBufferVariables;
|
||||
ReplayProxyPacket packet = eReplayProxy_FillCBufferVariables;
|
||||
@@ -856,6 +857,7 @@ void ReplayProxy::Proxied_FillCBufferVariables(ParamSerialiser ¶mser, Return
|
||||
BEGIN_PARAMS();
|
||||
SERIALISE_ELEMENT(pipeline);
|
||||
SERIALISE_ELEMENT(shader);
|
||||
SERIALISE_ELEMENT(stage);
|
||||
SERIALISE_ELEMENT(entryPoint);
|
||||
SERIALISE_ELEMENT(cbufSlot);
|
||||
SERIALISE_ELEMENT(data);
|
||||
@@ -865,17 +867,17 @@ void ReplayProxy::Proxied_FillCBufferVariables(ParamSerialiser ¶mser, Return
|
||||
{
|
||||
REMOTE_EXECUTION();
|
||||
if(paramser.IsReading() && !paramser.IsErrored() && !m_IsErrored)
|
||||
m_Remote->FillCBufferVariables(pipeline, shader, entryPoint, cbufSlot, outvars, data);
|
||||
m_Remote->FillCBufferVariables(pipeline, shader, stage, entryPoint, cbufSlot, outvars, data);
|
||||
}
|
||||
|
||||
SERIALISE_RETURN(outvars);
|
||||
}
|
||||
|
||||
void ReplayProxy::FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
void ReplayProxy::FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
{
|
||||
PROXY_FUNCTION(FillCBufferVariables, pipeline, shader, entryPoint, cbufSlot, outvars, data);
|
||||
PROXY_FUNCTION(FillCBufferVariables, pipeline, shader, stage, entryPoint, cbufSlot, outvars, data);
|
||||
}
|
||||
|
||||
template <typename ParamSerialiser, typename ReturnSerialiser>
|
||||
@@ -2900,7 +2902,7 @@ bool ReplayProxy::Tick(int type)
|
||||
{
|
||||
rdcarray<ShaderVariable> vars;
|
||||
bytebuf data;
|
||||
FillCBufferVariables(ResourceId(), ResourceId(), "", 0, vars, data);
|
||||
FillCBufferVariables(ResourceId(), ResourceId(), ShaderStage::Count, "", 0, vars, data);
|
||||
break;
|
||||
}
|
||||
case eReplayProxy_InitPostVS: InitPostVSBuffers(0); break;
|
||||
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
const rdcarray<GPUCounter> &counterID);
|
||||
|
||||
IMPLEMENT_FUNCTION_PROXIED(void, FillCBufferVariables, ResourceId pipeline, ResourceId shader,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
ShaderStage stage, rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data);
|
||||
|
||||
IMPLEMENT_FUNCTION_PROXIED(void, GetBufferData, ResourceId buff, uint64_t offset, uint64_t len,
|
||||
|
||||
@@ -2881,9 +2881,9 @@ void D3D11Replay::RenderHighlightBox(float w, float h, float scale)
|
||||
}
|
||||
}
|
||||
|
||||
void D3D11Replay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
void D3D11Replay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
{
|
||||
auto it = WrappedShader::m_ShaderList.find(shader);
|
||||
|
||||
|
||||
@@ -230,8 +230,8 @@ public:
|
||||
|
||||
void RenderHighlightBox(float w, float h, float scale);
|
||||
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data);
|
||||
|
||||
rdcarray<PixelModification> PixelHistory(rdcarray<EventUsage> events, ResourceId target, uint32_t x,
|
||||
|
||||
@@ -2913,9 +2913,9 @@ void D3D12Replay::GetBufferData(ResourceId buff, uint64_t offset, uint64_t lengt
|
||||
GetDebugManager()->GetBufferData(buffer, offset, length, retData);
|
||||
}
|
||||
|
||||
void D3D12Replay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
void D3D12Replay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
{
|
||||
if(shader == ResourceId())
|
||||
return;
|
||||
|
||||
@@ -206,8 +206,8 @@ public:
|
||||
|
||||
void RenderHighlightBox(float w, float h, float scale);
|
||||
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data);
|
||||
|
||||
rdcarray<PixelModification> PixelHistory(rdcarray<EventUsage> events, ResourceId target, uint32_t x,
|
||||
|
||||
@@ -2299,9 +2299,9 @@ void GLReplay::OpenGLFillCBufferVariables(ResourceId shader, GLuint prog, bool b
|
||||
}
|
||||
}
|
||||
|
||||
void GLReplay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
void GLReplay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
{
|
||||
WrappedOpenGL &drv = *m_pDriver;
|
||||
|
||||
|
||||
@@ -220,8 +220,8 @@ public:
|
||||
|
||||
void RenderHighlightBox(float w, float h, float scale);
|
||||
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data);
|
||||
|
||||
rdcarray<PixelModification> PixelHistory(rdcarray<EventUsage> events, ResourceId target, uint32_t x,
|
||||
|
||||
@@ -328,7 +328,7 @@ private:
|
||||
|
||||
DenseIdMap<rdcstr> strings;
|
||||
rdcarray<MemberName> memberNames;
|
||||
std::map<rdcstr, Id> entryLookup;
|
||||
std::map<ShaderEntryPoint, Id> entryLookup;
|
||||
|
||||
SparseIdMap<size_t> idDeathOffset;
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ ShaderDebugTrace *Debugger::BeginDebug(DebugAPIWrapper *api, const ShaderStage s
|
||||
const std::map<size_t, uint32_t> &instructionLines,
|
||||
const SPIRVPatchData &patchData, uint32_t activeIndex)
|
||||
{
|
||||
Id entryId = entryLookup[entryPoint];
|
||||
Id entryId = entryLookup[ShaderEntryPoint(entryPoint, shaderStage)];
|
||||
|
||||
if(entryId == Id())
|
||||
{
|
||||
@@ -2440,7 +2440,8 @@ void Debugger::RegisterOp(Iter it)
|
||||
{
|
||||
OpEntryPoint entryPoint(it);
|
||||
|
||||
entryLookup[entryPoint.name] = entryPoint.entryPoint;
|
||||
entryLookup[ShaderEntryPoint(entryPoint.name, MakeShaderStage(entryPoint.executionModel))] =
|
||||
entryPoint.entryPoint;
|
||||
}
|
||||
else if(opdata.op == Op::Function)
|
||||
{
|
||||
|
||||
@@ -375,11 +375,11 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan,
|
||||
shad.entryPoint = pCreateInfo->pStages[i].pName;
|
||||
shad.stage = ShaderStage(stageIndex);
|
||||
|
||||
ShaderModuleReflectionKey key(shad.entryPoint, ResourceId());
|
||||
ShaderModuleReflectionKey key(shad.stage, shad.entryPoint, ResourceId());
|
||||
|
||||
if(pCreateInfo->pStages[i].pSpecializationInfo)
|
||||
{
|
||||
key = ShaderModuleReflectionKey(shad.entryPoint, id);
|
||||
key = ShaderModuleReflectionKey(shad.stage, shad.entryPoint, id);
|
||||
|
||||
const byte *data = (const byte *)pCreateInfo->pStages[i].pSpecializationInfo->pData;
|
||||
|
||||
@@ -704,11 +704,11 @@ void VulkanCreationInfo::Pipeline::Init(VulkanResourceManager *resourceMan, Vulk
|
||||
shad.module = shadid;
|
||||
shad.entryPoint = pCreateInfo->stage.pName;
|
||||
|
||||
ShaderModuleReflectionKey key(shad.entryPoint, ResourceId());
|
||||
ShaderModuleReflectionKey key(ShaderStage::Compute, shad.entryPoint, ResourceId());
|
||||
|
||||
if(pCreateInfo->stage.pSpecializationInfo)
|
||||
{
|
||||
key = ShaderModuleReflectionKey(shad.entryPoint, id);
|
||||
key = ShaderModuleReflectionKey(ShaderStage::Compute, shad.entryPoint, id);
|
||||
|
||||
const byte *data = (const byte *)pCreateInfo->stage.pSpecializationInfo->pData;
|
||||
|
||||
|
||||
@@ -194,15 +194,22 @@ struct VulkanCreationInfo
|
||||
{
|
||||
struct ShaderModuleReflectionKey
|
||||
{
|
||||
ShaderModuleReflectionKey(const rdcstr &e, ResourceId p) : entryPoint(e), specialisingPipe(p) {}
|
||||
ShaderModuleReflectionKey(ShaderStage s, const rdcstr &e, ResourceId p)
|
||||
: stage(s), entryPoint(e), specialisingPipe(p)
|
||||
{
|
||||
}
|
||||
bool operator<(const ShaderModuleReflectionKey &o) const
|
||||
{
|
||||
if(entryPoint != o.entryPoint)
|
||||
return entryPoint < o.entryPoint;
|
||||
if(stage != o.stage)
|
||||
return stage < o.stage;
|
||||
|
||||
return specialisingPipe < o.specialisingPipe;
|
||||
}
|
||||
|
||||
// stage of the entry point
|
||||
ShaderStage stage;
|
||||
// name of the entry point
|
||||
rdcstr entryPoint;
|
||||
// ID of the pipeline ONLY if it contains specialisation constant data
|
||||
@@ -607,15 +614,15 @@ struct VulkanCreationInfo
|
||||
void Init(VulkanResourceManager *resourceMan, VulkanCreationInfo &info,
|
||||
const VkShaderModuleCreateInfo *pCreateInfo);
|
||||
|
||||
ShaderModuleReflection &GetReflection(const rdcstr &entry, ResourceId pipe)
|
||||
ShaderModuleReflection &GetReflection(ShaderStage stage, const rdcstr &entry, ResourceId pipe)
|
||||
{
|
||||
// look for one from this pipeline specifically, if it was specialised
|
||||
auto it = m_Reflections.find({entry, pipe});
|
||||
auto it = m_Reflections.find({stage, entry, pipe});
|
||||
if(it != m_Reflections.end())
|
||||
return it->second;
|
||||
|
||||
// if not, just return the non-specialised version
|
||||
return m_Reflections[{entry, ResourceId()}];
|
||||
return m_Reflections[{stage, entry, ResourceId()}];
|
||||
}
|
||||
|
||||
rdcspv::Reflector spirv;
|
||||
|
||||
@@ -457,11 +457,11 @@ ShaderReflection *VulkanReplay::GetShader(ResourceId pipeline, ResourceId shader
|
||||
|
||||
// if this shader was never used in a pipeline the reflection won't be prepared. Do that now -
|
||||
// this will be ignored if it was already prepared.
|
||||
shad->second.GetReflection(entry.name, pipeline)
|
||||
shad->second.GetReflection(entry.stage, entry.name, pipeline)
|
||||
.Init(GetResourceManager(), shader, shad->second.spirv, entry.name,
|
||||
VkShaderStageFlagBits(1 << uint32_t(entry.stage)), {});
|
||||
|
||||
return shad->second.GetReflection(entry.name, pipeline).refl;
|
||||
return shad->second.GetReflection(entry.stage, entry.name, pipeline).refl;
|
||||
}
|
||||
|
||||
rdcarray<rdcstr> VulkanReplay::GetDisassemblyTargets(bool withPipeline)
|
||||
@@ -568,7 +568,7 @@ rdcstr VulkanReplay::DisassembleShader(ResourceId pipeline, const ShaderReflecti
|
||||
if(target == SPIRVDisassemblyTarget || target.empty())
|
||||
{
|
||||
VulkanCreationInfo::ShaderModuleReflection &moduleRefl =
|
||||
it->second.GetReflection(refl->entryPoint, pipeline);
|
||||
it->second.GetReflection(refl->stage, refl->entryPoint, pipeline);
|
||||
moduleRefl.PopulateDisassembly(it->second.spirv);
|
||||
|
||||
return moduleRefl.disassembly;
|
||||
@@ -587,8 +587,8 @@ rdcstr VulkanReplay::DisassembleShader(ResourceId pipeline, const ShaderReflecti
|
||||
|
||||
VkPipeline pipe = m_pDriver->GetResourceManager()->GetCurrentHandle<VkPipeline>(pipeline);
|
||||
|
||||
VkShaderStageFlagBits stageBit =
|
||||
VkShaderStageFlagBits(1 << it->second.GetReflection(refl->entryPoint, pipeline).stageIndex);
|
||||
VkShaderStageFlagBits stageBit = VkShaderStageFlagBits(
|
||||
1 << it->second.GetReflection(refl->stage, refl->entryPoint, pipeline).stageIndex);
|
||||
|
||||
size_t size;
|
||||
vt->GetShaderInfoAMD(Unwrap(dev), Unwrap(pipe), stageBit, VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD,
|
||||
@@ -613,8 +613,8 @@ rdcstr VulkanReplay::DisassembleShader(ResourceId pipeline, const ShaderReflecti
|
||||
|
||||
CachePipelineExecutables(pipeline);
|
||||
|
||||
VkShaderStageFlagBits stageBit =
|
||||
VkShaderStageFlagBits(1 << it->second.GetReflection(refl->entryPoint, pipeline).stageIndex);
|
||||
VkShaderStageFlagBits stageBit = VkShaderStageFlagBits(
|
||||
1 << it->second.GetReflection(refl->stage, refl->entryPoint, pipeline).stageIndex);
|
||||
|
||||
const rdcarray<PipelineExecutables> &executables = m_PipelineExecutables[pipeline];
|
||||
|
||||
@@ -2026,9 +2026,9 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanReplay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
void VulkanReplay::FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
{
|
||||
auto it = m_pDriver->m_CreationInfo.m_ShaderModule.find(shader);
|
||||
|
||||
@@ -2038,8 +2038,8 @@ void VulkanReplay::FillCBufferVariables(ResourceId pipeline, ResourceId shader,
|
||||
return;
|
||||
}
|
||||
|
||||
ShaderReflection &refl = *it->second.GetReflection(entryPoint, pipeline).refl;
|
||||
ShaderBindpointMapping &mapping = it->second.GetReflection(entryPoint, pipeline).mapping;
|
||||
ShaderReflection &refl = *it->second.GetReflection(stage, entryPoint, pipeline).refl;
|
||||
ShaderBindpointMapping &mapping = it->second.GetReflection(stage, entryPoint, pipeline).mapping;
|
||||
|
||||
if(cbufSlot >= (uint32_t)refl.constantBlocks.count())
|
||||
{
|
||||
@@ -2095,7 +2095,8 @@ void VulkanReplay::FillCBufferVariables(ResourceId pipeline, ResourceId shader,
|
||||
if(pipeIt != m_pDriver->m_CreationInfo.m_Pipeline.end())
|
||||
{
|
||||
const rdcarray<SpecConstant> &specInfo =
|
||||
pipeIt->second.shaders[it->second.GetReflection(entryPoint, pipeline).stageIndex].specialization;
|
||||
pipeIt->second.shaders[it->second.GetReflection(stage, entryPoint, pipeline).stageIndex]
|
||||
.specialization;
|
||||
|
||||
FillSpecConstantVariables(refl.resourceId, c.variables, outvars, specInfo);
|
||||
}
|
||||
|
||||
@@ -389,8 +389,8 @@ public:
|
||||
|
||||
void RenderHighlightBox(float w, float h, float scale);
|
||||
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data);
|
||||
|
||||
rdcarray<PixelModification> PixelHistory(rdcarray<EventUsage> events, ResourceId target, uint32_t x,
|
||||
|
||||
@@ -1817,7 +1817,7 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
{
|
||||
VulkanCreationInfo::ShaderModule &mod = creationInfo.m_ShaderModule[sh.module];
|
||||
VulkanCreationInfo::ShaderModuleReflection &modrefl =
|
||||
mod.GetReflection(sh.entryPoint, pipe.pipeline);
|
||||
mod.GetReflection(stage, sh.entryPoint, pipe.pipeline);
|
||||
modrefl.PopulateDisassembly(mod.spirv);
|
||||
|
||||
const std::map<size_t, uint32_t> instructionLines = modrefl.instructionLines;
|
||||
|
||||
@@ -3741,7 +3741,7 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
|
||||
const rdcarray<SpecConstant> &spec = pipe.shaders[0].specialization;
|
||||
|
||||
VulkanCreationInfo::ShaderModuleReflection &shadRefl =
|
||||
shader.GetReflection(entryPoint, state.graphics.pipeline);
|
||||
shader.GetReflection(ShaderStage::Vertex, entryPoint, state.graphics.pipeline);
|
||||
|
||||
if(!shadRefl.refl->debugInfo.debuggable)
|
||||
{
|
||||
@@ -3989,7 +3989,7 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_
|
||||
const rdcarray<SpecConstant> &spec = pipe.shaders[4].specialization;
|
||||
|
||||
VulkanCreationInfo::ShaderModuleReflection &shadRefl =
|
||||
shader.GetReflection(entryPoint, state.graphics.pipeline);
|
||||
shader.GetReflection(ShaderStage::Pixel, entryPoint, state.graphics.pipeline);
|
||||
|
||||
if(!shadRefl.refl->debugInfo.debuggable)
|
||||
{
|
||||
@@ -4015,8 +4015,8 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_
|
||||
if(pipe.shaders[3].module != ResourceId())
|
||||
{
|
||||
VulkanCreationInfo::ShaderModuleReflection &gsRefl =
|
||||
c.m_ShaderModule[pipe.shaders[3].module].GetReflection(pipe.shaders[3].entryPoint,
|
||||
state.graphics.pipeline);
|
||||
c.m_ShaderModule[pipe.shaders[3].module].GetReflection(
|
||||
ShaderStage::Geometry, pipe.shaders[3].entryPoint, state.graphics.pipeline);
|
||||
|
||||
// check to see if the shader outputs a primitive ID
|
||||
for(const SigParameter &e : gsRefl.refl->outputSignature)
|
||||
@@ -4670,7 +4670,7 @@ ShaderDebugTrace *VulkanReplay::DebugThread(uint32_t eventId,
|
||||
const rdcarray<SpecConstant> &spec = pipe.shaders[5].specialization;
|
||||
|
||||
VulkanCreationInfo::ShaderModuleReflection &shadRefl =
|
||||
shader.GetReflection(entryPoint, state.compute.pipeline);
|
||||
shader.GetReflection(ShaderStage::Compute, entryPoint, state.compute.pipeline);
|
||||
|
||||
if(!shadRefl.refl->debugInfo.debuggable)
|
||||
{
|
||||
|
||||
@@ -236,9 +236,9 @@ rdcarray<CounterResult> DummyDriver::FetchCounters(const rdcarray<GPUCounter> &c
|
||||
return {};
|
||||
}
|
||||
|
||||
void DummyDriver::FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data)
|
||||
void DummyDriver::FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data)
|
||||
{
|
||||
outvars.clear();
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ public:
|
||||
CounterDescription DescribeCounter(GPUCounter counterID);
|
||||
rdcarray<CounterResult> FetchCounters(const rdcarray<GPUCounter> &counterID);
|
||||
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data);
|
||||
|
||||
rdcarray<PixelModification> PixelHistory(rdcarray<EventUsage> events, ResourceId target, uint32_t x,
|
||||
|
||||
@@ -1674,8 +1674,8 @@ void ReplayController::FreeTrace(ShaderDebugTrace *trace)
|
||||
}
|
||||
|
||||
rdcarray<ShaderVariable> ReplayController::GetCBufferVariableContents(
|
||||
ResourceId pipeline, ResourceId shader, const rdcstr &entryPoint, uint32_t cbufslot,
|
||||
ResourceId buffer, uint64_t offset, uint64_t length)
|
||||
ResourceId pipeline, ResourceId shader, ShaderStage stage, const rdcstr &entryPoint,
|
||||
uint32_t cbufslot, ResourceId buffer, uint64_t offset, uint64_t length)
|
||||
{
|
||||
CHECK_REPLAY_THREAD();
|
||||
|
||||
@@ -1699,7 +1699,7 @@ rdcarray<ShaderVariable> ReplayController::GetCBufferVariableContents(
|
||||
|
||||
if(shader != ResourceId())
|
||||
{
|
||||
m_pDevice->FillCBufferVariables(pipeline, shader, entryPoint, cbufslot, v, data);
|
||||
m_pDevice->FillCBufferVariables(pipeline, shader, stage, entryPoint, cbufslot, v, data);
|
||||
FatalErrorCheck();
|
||||
}
|
||||
|
||||
|
||||
@@ -202,9 +202,9 @@ public:
|
||||
bool SaveTexture(const TextureSave &saveData, const rdcstr &path);
|
||||
|
||||
rdcarray<ShaderVariable> GetCBufferVariableContents(ResourceId pipeline, ResourceId shader,
|
||||
const rdcstr &entryPoint, uint32_t cbufslot,
|
||||
ResourceId buffer, uint64_t offset,
|
||||
uint64_t length);
|
||||
ShaderStage stage, const rdcstr &entryPoint,
|
||||
uint32_t cbufslot, ResourceId buffer,
|
||||
uint64_t offset, uint64_t length);
|
||||
|
||||
rdcarray<WindowingSystem> GetSupportedWindowSystems();
|
||||
|
||||
|
||||
@@ -190,9 +190,9 @@ public:
|
||||
virtual CounterDescription DescribeCounter(GPUCounter counterID) = 0;
|
||||
virtual rdcarray<CounterResult> FetchCounters(const rdcarray<GPUCounter> &counterID) = 0;
|
||||
|
||||
virtual void FillCBufferVariables(ResourceId pipeline, ResourceId shader, rdcstr entryPoint,
|
||||
uint32_t cbufSlot, rdcarray<ShaderVariable> &outvars,
|
||||
const bytebuf &data) = 0;
|
||||
virtual void FillCBufferVariables(ResourceId pipeline, ResourceId shader, ShaderStage stage,
|
||||
rdcstr entryPoint, uint32_t cbufSlot,
|
||||
rdcarray<ShaderVariable> &outvars, const bytebuf &data) = 0;
|
||||
|
||||
virtual rdcarray<PixelModification> PixelHistory(rdcarray<EventUsage> events, ResourceId target,
|
||||
uint32_t x, uint32_t y, const Subresource &sub,
|
||||
|
||||
Reference in New Issue
Block a user