Hi,
I am getting the following error whenever I try to set a shader resource view in a compute shader. The calling code is:-
void FVoxelGeometryGenerationShader::SetSeedBuffer(FRHICommandList& InRHICmdList, FShaderResourceViewRHIRef InSeedBufferSRV)
{
check(InSeedBufferSRV);
auto computeShader = GetComputeShader();
check(computeShader.IsValid());
if (this->SeedBufferParam.IsBound())
{
InRHICmdList.SetShaderResourceViewParameter(computeShader, this->SeedBufferParam.GetBaseIndex(), InSeedBufferSRV);
}
}
The above, specifically the call to SetShaderResourceViewParameter results in the following build error:-
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: void __cdecl FRHICommandSetShaderResourceViewParameter<class TRefCountPtr<class FRHIComputeShader> >::Execute(class FRHICommandListBase &)" (__imp_?Execute@?$FRHICommandSetShaderResourceViewParameter@V?$TRefCountPtr@VFRHIComputeShader@@@@@@QEAAXAEAVFRHICommandListBase@@@Z) referenced in function "public: static void __cdecl FRHICommand<struct FRHICommandSetShaderResourceViewParameter<class TRefCountPtr<class FRHIComputeShader> > >::ExecuteAndDestruct(class FRHICommandListBase &,struct FRHICommandBase *)" (?ExecuteAndDestruct@?$FRHICommand@U?$FRHICommandSetShaderResourceViewParameter@V?$TRefCountPtr@VFRHIComputeShader@@@@@@@@SAXAEAVFRHICommandListBase@@PEAUFRHICommandBase@@@Z) VoxelModule C:\Development\ModdedUE4Projects\VoxelModule\Intermediate\ProjectFiles\VoxelGeometryGenerationShader.cpp.obj 1
My module (a plugin) is including the following public module dependencies in its build rules:-
“Core”,
“CoreUObject”,
“Engine”,
“RenderCore”,
“ShaderCore”,
“RHI”
I can set uniform buffers and UAVs fine, but not shader resource views. Anyone know what the problem is?
Thanks.