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

Method UpdateSubresource

trinityal/stub/Tr2TextureALStub.cpp:236–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236ALResult 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
263ALResult Tr2TextureAL::CopySubresourceRegion( const Tr2TextureSubresource& destSubresource, Tr2TextureAL& source, const Tr2TextureSubresource& sourceSubresource, Tr2RenderContextAL& renderContext )
264{

Callers

nothing calls this directly

Calls 6

IsWritableFunction · 0.85
IsValidForBitmapMethod · 0.80
IsSingleSubresourceMethod · 0.80
HasFlagFunction · 0.70
IsValidFunction · 0.50
IsValidMethod · 0.45

Tested by

no test coverage detected