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

Function texFromView

src/dll/resourceUtil.cpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13extern ID3D11Device* g_device;
14
15CComPtr<ID3D11Texture2D> texFromView(const CComPtr<ID3D11ShaderResourceView>& texView) {
16 CComPtr<ID3D11Resource> res = nullptr;
17 texView->GetResource(&res.p);
18
19 D3D11_RESOURCE_DIMENSION resType;
20 res->GetType(&resType);
21
22 if (resType != D3D11_RESOURCE_DIMENSION_TEXTURE2D) {
23 DebugBreak();
24 }
25
26 ID3D11Texture2D *const tex = (ID3D11Texture2D*)res.p;
27 return CComPtr<ID3D11Texture2D>(tex);
28}
29
30CComPtr<ID3D11RenderTargetView> rtvFromTex(const CComPtr<ID3D11Texture2D>& tex) {
31 decltype(textureToRtvMap)::iterator it = textureToRtvMap.find(tex);

Callers 1

taaOnDrawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected