mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Pass ThreadState to CalculateSampleGather
* This is needed to fetch the values of Id parameters in ImageOperandsAndParamDatas
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user