MCPcopy Create free account
hub / github.com/carbonengine/trinity / Resolve

Method Resolve

trinityal/stub/Tr2TextureALStub.cpp:303–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303ALResult 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
338uintptr_t Tr2TextureAL::GetSharedHandle() const
339{

Callers

nothing calls this directly

Calls 9

IsWritableFunction · 0.85
HasFlagFunction · 0.70
IsValidFunction · 0.50
CopySubresourceRegionMethod · 0.45
IsValidMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45
GetFormatMethod · 0.45

Tested by

no test coverage detected