Fix D3D11InitialContents overloads so wrong types don't get cast

* ID3D11DeviceChild* is too broad and can accept a RTV or DSV if there's a bug.
This commit is contained in:
baldurk
2019-01-09 11:04:12 +00:00
parent 21e056e5b8
commit 48d6e94891
+3 -2
View File
@@ -202,11 +202,12 @@ struct D3D11InitialContents
ClearDSV,
UAVCount,
};
D3D11InitialContents(D3D11ResourceType t, ID3D11DeviceChild *r)
D3D11InitialContents(D3D11ResourceType t, ID3D11Resource *r)
: resourceType(t), tag(Copy), resource(r), resource2(NULL), uavCount(0)
{
}
D3D11InitialContents(D3D11ResourceType t, ID3D11RenderTargetView *r, ID3D11RenderTargetView *r2)
D3D11InitialContents(D3D11ResourceType t, ID3D11RenderTargetView *r,
ID3D11RenderTargetView *r2 = NULL)
: resourceType(t), tag(ClearRTV), resource(r), resource2(r2), uavCount(0)
{
}