mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Be more specific about the 'invalid' bindpoint we want to ignore
This commit is contained in:
@@ -61,6 +61,8 @@ static bool ContainsNaNInf(const ShaderVariable &val)
|
||||
|
||||
namespace rdcspv
|
||||
{
|
||||
const BindpointIndex DebugAPIWrapper::invalidBind = BindpointIndex(-12345, -12345, ~0U);
|
||||
|
||||
ThreadState::ThreadState(uint32_t workgroupIdx, Debugger &debug, const GlobalState &globalState)
|
||||
: debugger(debug), global(globalState)
|
||||
{
|
||||
@@ -2187,7 +2189,7 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
|
||||
|
||||
result.type = resultType.scalar().Type();
|
||||
|
||||
BindpointIndex samplerIndex = BindpointIndex(-1, -1, ~0U);
|
||||
BindpointIndex samplerIndex = DebugAPIWrapper::invalidBind;
|
||||
if(sampler.type == VarType::Sampler || sampler.type == VarType::ReadOnlyResource)
|
||||
samplerIndex = sampler.GetBinding();
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ public:
|
||||
Buffer_Texture = 0x10,
|
||||
};
|
||||
|
||||
static const BindpointIndex invalidBind;
|
||||
|
||||
virtual bool CalculateSampleGather(ThreadState &lane, Op opcode, TextureType texType,
|
||||
BindpointIndex imageBind, BindpointIndex samplerBind,
|
||||
const ShaderVariable &uv, const ShaderVariable &ddxCalc,
|
||||
|
||||
@@ -506,15 +506,14 @@ public:
|
||||
const bool sintTex = (texType & DebugAPIWrapper::SInt_Texture) != 0;
|
||||
|
||||
// fetch the right type of descriptor depending on if we're buffer or not
|
||||
BindpointIndex invalidIndex(-1, -1, ~0U);
|
||||
bool valid = true;
|
||||
rdcstr access = StringFormat::Fmt("performing %s operation", ToStr(opcode).c_str());
|
||||
const VkDescriptorImageInfo &imageInfo =
|
||||
buffer ? GetDescriptor<VkDescriptorImageInfo>(access, invalidIndex, valid)
|
||||
buffer ? GetDescriptor<VkDescriptorImageInfo>(access, invalidBind, valid)
|
||||
: GetDescriptor<VkDescriptorImageInfo>(access, imageBind, valid);
|
||||
const VkBufferView &bufferView = buffer
|
||||
? GetDescriptor<VkBufferView>(access, imageBind, valid)
|
||||
: GetDescriptor<VkBufferView>(access, invalidIndex, valid);
|
||||
: GetDescriptor<VkBufferView>(access, invalidBind, valid);
|
||||
|
||||
// fetch the sampler (if there's no sampler, this will silently return dummy data without
|
||||
// marking invalid
|
||||
@@ -1234,13 +1233,13 @@ private:
|
||||
{
|
||||
static T dummy = {};
|
||||
|
||||
if(index.bindset < 0)
|
||||
if(index == invalidBind)
|
||||
{
|
||||
// invalid index, return a dummy data but don't mark as invalid
|
||||
return dummy;
|
||||
}
|
||||
|
||||
if(index.bindset >= m_DescSets.count())
|
||||
if(index.bindset < 0 || index.bindset >= m_DescSets.count())
|
||||
{
|
||||
m_pDriver->AddDebugMessage(
|
||||
MessageCategory::Execution, MessageSeverity::High, MessageSource::RuntimeWarning,
|
||||
|
||||
Reference in New Issue
Block a user