Say I have the following:
Texture2D texture : register(t0);
SamplerState sampler : register(s0);
export float4 Sample(float2 uv) { return texture.Sample(sampler, uv); }
export float4 Multiply(float4 lhs, float4 rhs) { return lhs * rhs; }
Can I use such a shader library and shader linking to implement Multiply(Sample_0(uv), Sample_1(uv))
, where Sample_n
is an instance of the Sample
method remapped to use texture and sampler register n
(so each call samples its own texture)?
The issue is that the API exposes resource remapping on ID3D11ModuleInstance
, but the ID3D11FunctionLinkingGraph::CallFunction
function takes a ID3D11Module
as a parameter, so I don't see how two different calls could be associated with two different module instances of the same module but with different remappings.