| 301 | } |
| 302 | |
| 303 | ALResult Tr2TextureAL::Resolve( Tr2TextureAL& destination, Tr2RenderContextAL& renderContext ) |
| 304 | { |
| 305 | if( m_msaa.samples <= 1 ) |
| 306 | { |
| 307 | return destination.CopySubresourceRegion( Tr2TextureSubresource(), *this, Tr2TextureSubresource(), renderContext ); |
| 308 | } |
| 309 | |
| 310 | if( !IsValid() || !renderContext.IsValid() ) |
| 311 | { |
| 312 | return E_INVALIDCALL; |
| 313 | } |
| 314 | if( !destination.IsValid() ) |
| 315 | { |
| 316 | return E_INVALIDARG; |
| 317 | } |
| 318 | if( !HasFlag( destination.m_cpuUsage, Tr2CpuUsage::WRITE ) && !IsWritable( destination.m_gpuUsage ) ) |
| 319 | { |
| 320 | return E_INVALIDARG; |
| 321 | } |
| 322 | if( m_desc.GetWidth() != destination.m_desc.GetWidth() || m_desc.GetHeight() != destination.m_desc.GetHeight() ) |
| 323 | { |
| 324 | return E_INVALIDARG; |
| 325 | } |
| 326 | if( m_desc.GetFormat() != destination.m_desc.GetFormat() ) |
| 327 | { |
| 328 | return E_INVALIDARG; |
| 329 | } |
| 330 | if( destination.m_msaa.samples > 1 ) |
| 331 | { |
| 332 | return E_INVALIDARG; |
| 333 | } |
| 334 | |
| 335 | return S_OK; |
| 336 | } |
| 337 | |
| 338 | uintptr_t Tr2TextureAL::GetSharedHandle() const |
| 339 | { |
nothing calls this directly
no test coverage detected