| 180 | } |
| 181 | |
| 182 | D3D12_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 | |
| 194 | bool TextureD3D::Init(ovrTextureType Type, int Width, int Height, int MipLevels, int SampleCount, |
| 195 | int ArraySize, ovrTextureFormat Format, unsigned int MiscFlags, unsigned int BindFlags) |
nothing calls this directly
no outgoing calls
no test coverage detected