| 178 | } |
| 179 | |
| 180 | void DX11Texture::CopyGpuToGpu(ID3D11DeviceContext* context, |
| 181 | ID3D11Resource* target, uint32_t sri) |
| 182 | { |
| 183 | Texture* texture = GetTexture(); |
| 184 | LogAssert(sri < texture->GetNumSubresources(), "Subresource index out of range."); |
| 185 | |
| 186 | // Copy from GPU memory to staging texture. |
| 187 | ID3D11Resource* dxTexture = GetDXResource(); |
| 188 | context->CopySubresourceRegion(target, sri, 0, 0, 0, dxTexture, sri, nullptr); |
| 189 | } |
| 190 | |
| 191 | void DX11Texture::CopyGpuToGpu(ID3D11DeviceContext* context, ID3D11Resource* target) |
| 192 | { |
nothing calls this directly
no test coverage detected