| 261 | } |
| 262 | |
| 263 | ALResult Tr2TextureAL::CopySubresourceRegion( const Tr2TextureSubresource& destSubresource, Tr2TextureAL& source, const Tr2TextureSubresource& sourceSubresource, Tr2RenderContextAL& renderContext ) |
| 264 | { |
| 265 | if( !IsValid() || !renderContext.IsValid() ) |
| 266 | { |
| 267 | return E_INVALIDCALL; |
| 268 | } |
| 269 | if( !source.IsValid() ) |
| 270 | { |
| 271 | return E_INVALIDARG; |
| 272 | } |
| 273 | if( !HasFlag( m_cpuUsage, Tr2CpuUsage::WRITE ) && !IsWritable( m_gpuUsage ) ) |
| 274 | { |
| 275 | return E_INVALIDCALL; |
| 276 | } |
| 277 | |
| 278 | if( destSubresource.IsSubresourceFull( m_desc ) && sourceSubresource.IsSubresourceFull( source.m_desc ) ) |
| 279 | { |
| 280 | return S_OK; |
| 281 | } |
| 282 | |
| 283 | Tr2TextureSubresource src = sourceSubresource; |
| 284 | Tr2TextureSubresource dst = destSubresource; |
| 285 | |
| 286 | if( !Crop( src, source.m_desc, dst, m_desc ) ) |
| 287 | { |
| 288 | return E_FAIL; |
| 289 | } |
| 290 | |
| 291 | return S_OK; |
| 292 | } |
| 293 | |
| 294 | ALResult Tr2TextureAL::GenerateMipMaps( Tr2RenderContextAL& ) |
| 295 | { |
no test coverage detected