Pass ThreadState to CalculateSampleGather

* This is needed to fetch the values of Id parameters in
  ImageOperandsAndParamDatas
This commit is contained in:
baldurk
2020-04-10 12:57:13 +01:00
parent fc452b7586
commit 9cf265284e
3 changed files with 5 additions and 5 deletions
@@ -1570,7 +1570,7 @@ void ThreadState::StepNext(ShaderDebugState *state,
result.type = resultType.scalar().Type();
if(!debugger.GetAPIWrapper()->CalculateSampleGather(opdata.op, img.GetBinding(),
if(!debugger.GetAPIWrapper()->CalculateSampleGather(*this, opdata.op, img.GetBinding(),
sampler.GetBinding(), uv, ddxCalc, ddyCalc,
compare, gather, operands, result))
{
+3 -3
View File
@@ -44,6 +44,8 @@ enum class GatherChannel : uint8_t
Alpha = 3,
};
struct ThreadState;
class DebugAPIWrapper
{
public:
@@ -56,7 +58,7 @@ public:
virtual void FillInputValue(ShaderVariable &var, ShaderBuiltin builtin, uint32_t location,
uint32_t component) = 0;
virtual bool CalculateSampleGather(rdcspv::Op opcode, BindpointIndex imageBind,
virtual bool CalculateSampleGather(ThreadState &thread, rdcspv::Op opcode, BindpointIndex imageBind,
BindpointIndex samplerBind, const ShaderVariable &uv,
const ShaderVariable &ddxCalc, const ShaderVariable &ddyCalc,
const ShaderVariable &compare, GatherChannel gatherChannel,
@@ -75,8 +77,6 @@ public:
uint32_t component) = 0;
};
struct ThreadState;
typedef ShaderVariable (*ExtInstImpl)(ThreadState &, const rdcarray<Id> &);
struct ExtInstDispatcher
+1 -1
View File
@@ -114,7 +114,7 @@ public:
return DerivativeDeltas();
}
bool CalculateSampleGather(rdcspv::Op opcode, BindpointIndex imageBind,
bool CalculateSampleGather(rdcspv::ThreadState &thread, rdcspv::Op opcode, BindpointIndex imageBind,
BindpointIndex samplerBind, const ShaderVariable &uv,
const ShaderVariable &ddxCalc, const ShaderVariable &ddyCalc,
const ShaderVariable &compare, rdcspv::GatherChannel gatherChannel,