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

Method IsSubresourceFull

trinityal/Tr2HalHelperStructures.cpp:102–129  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Check if subresource covers the entire textures (all slices and all mip levels). Arguments: texture - Texture to check against Return Value: true If subresource data covers the entire texture false Otherwise --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

100// false Otherwise
101// --------------------------------------------------------------------------------------
102bool Tr2TextureSubresource::IsSubresourceFull( const Tr2BitmapDimensions& texture ) const
103{
104 if( m_startFace > 0 || m_endFace < texture.GetArraySize() )
105 {
106 return false;
107 }
108 if( m_startMipLevel > 0 )
109 {
110 return false;
111 }
112 if( m_endMipLevel < texture.GetTrueMipCount() )
113 {
114 return false;
115 }
116 if( HasBox() )
117 {
118 if( m_box.left > 0 || m_box.top > 0 || m_box.front > 0 )
119 {
120 return false;
121 }
122 if( m_box.right < texture.GetWidth() || m_box.bottom < texture.GetHeight() || m_box.back < texture.GetDepth() )
123 {
124 return false;
125 }
126 }
127
128 return true;
129}
130
131bool Tr2TextureSubresource::IsValidForBitmap( const Tr2BitmapDimensions& bitmap ) const
132{

Callers 4

CopySubresourceRegionMethod · 0.80
CopySubresourceRegionMethod · 0.80
TESTFunction · 0.80
CopySubresourceRegionMethod · 0.80

Calls 5

GetTrueMipCountMethod · 0.80
GetArraySizeMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45
GetDepthMethod · 0.45

Tested by 1

TESTFunction · 0.64