| 234 | } |
| 235 | |
| 236 | ALResult Tr2TextureAL::UpdateSubresource( const Tr2TextureSubresource& region, const void*, uint32_t, uint32_t, Tr2RenderContextAL& renderContext ) |
| 237 | { |
| 238 | if( HasFlag( m_cpuUsage, Tr2CpuUsage::WRITE_OFTEN ) ) |
| 239 | { |
| 240 | return E_INVALIDCALL; |
| 241 | } |
| 242 | if( !HasFlag( m_cpuUsage, Tr2CpuUsage::WRITE ) && !IsWritable( m_gpuUsage ) ) |
| 243 | { |
| 244 | return E_INVALIDCALL; |
| 245 | } |
| 246 | |
| 247 | if( !IsValid() || !renderContext.IsValid() ) |
| 248 | { |
| 249 | return E_INVALIDCALL; |
| 250 | } |
| 251 | |
| 252 | if( !region.IsValidForBitmap( m_desc ) ) |
| 253 | { |
| 254 | return E_INVALIDARG; |
| 255 | } |
| 256 | if( !region.IsSingleSubresource() ) |
| 257 | { |
| 258 | return E_INVALIDARG; |
| 259 | } |
| 260 | return S_OK; |
| 261 | } |
| 262 | |
| 263 | ALResult Tr2TextureAL::CopySubresourceRegion( const Tr2TextureSubresource& destSubresource, Tr2TextureAL& source, const Tr2TextureSubresource& sourceSubresource, Tr2RenderContextAL& renderContext ) |
| 264 | { |
nothing calls this directly
no test coverage detected