Ah ok, so this is an external texture. Well, thanks to this guy for posting his code. For a UTexture*, this seems to work for me:
//UTexture2D* InputTexture = a UPROPERTY'd UTexture2D* attached to an AActor
FSceneRenderTargetItem TextureItem;
TextureItem.TargetableTexture = InputTexture->GetResource()->GetTexture2DRHI();
TextureItem.ShaderResourceTexture = InputTexture->GetResource()->GetTexture2DRHI();
FPooledRenderTargetDesc RenderTargetDesc = FPooledRenderTargetDesc::Create2DDesc(FIntPoint(InputTexture->GetSizeX(), InputTexture->GetSizeY()), InputTexture->GetPixelFormat(), FClearValueBinding::None, TexCreate_None, TexCreate_ShaderResource | TexCreate_UAV, false);
TRefCountPtr<IPooledRenderTarget> PooledRenderTarget;
GRenderTargetPool.CreateUntrackedElement(RenderTargetDesc, PooledRenderTarget, TextureItem);
FRDGTextureRef RenderTargetRDG = GraphBuilder.RegisterExternalTexture(PooledRenderTarget, TEXT("InputTexture"));
// My shader Parameters struct has an entry of:
// SHADER_PARAMETER_RDG_TEXTURE(Texture2D<FVector4>, InputTexture)
TestParams->InputTexture = RenderTargetRDG;