MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / rtvFromSrv

Function rtvFromSrv

src/dll/resourceUtil.cpp:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58CComPtr<ID3D11RenderTargetView> rtvFromSrv(const CComPtr<ID3D11ShaderResourceView>& texView) {
59 CComPtr<ID3D11Resource> res = nullptr;
60 texView->GetResource(&res);
61
62 D3D11_RESOURCE_DIMENSION resType;
63 res->GetType(&resType);
64
65 if (resType != D3D11_RESOURCE_DIMENSION_TEXTURE2D) {
66 DebugBreak();
67 }
68
69 CComPtr<ID3D11Texture2D> tex = (ID3D11Texture2D*)res.p;
70 return rtvFromTex(tex);
71}
72
73CComPtr<ID3D11ShaderResourceView> srvFromTex(const CComPtr<ID3D11Texture2D>& tex) {
74 decltype(textureToSrvMap)::iterator it = textureToSrvMap.find(tex);

Callers

nothing calls this directly

Calls 1

rtvFromTexFunction · 0.85

Tested by

no test coverage detected