MCPcopy Create free account
hub / github.com/LibreVR/Revive / BindFlagsToD3DResourceFlags

Method BindFlagsToD3DResourceFlags

Revive/TextureD3D.cpp:182–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182D3D12_RESOURCE_FLAGS TextureD3D::BindFlagsToD3DResourceFlags(unsigned int flags)
183{
184 D3D12_RESOURCE_FLAGS result = D3D12_RESOURCE_FLAG_NONE;
185 if (flags & ovrTextureBind_DX_RenderTarget)
186 result |= D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
187 if (flags & ovrTextureBind_DX_UnorderedAccess)
188 result |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
189 if (flags & ovrTextureBind_DX_DepthStencil)
190 result |= D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL;
191 return result;
192}
193
194bool TextureD3D::Init(ovrTextureType Type, int Width, int Height, int MipLevels, int SampleCount,
195 int ArraySize, ovrTextureFormat Format, unsigned int MiscFlags, unsigned int BindFlags)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected