diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-04-18 14:36:42 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-04-18 14:36:42 +0000 |
| commit | f66cee08e82f194d3b95ab0ea77a28f9aea3222c (patch) | |
| tree | d94fe054264df48b5d7aac3bbbb229f56b83dee7 /Graphics/GraphicsEngine | |
| parent | Fixed copying compressed textures in Vulkan back-end (diff) | |
| download | DiligentCore-f66cee08e82f194d3b95ab0ea77a28f9aea3222c.tar.gz DiligentCore-f66cee08e82f194d3b95ab0ea77a28f9aea3222c.zip | |
Fixed handling compressed textures in TextureUploaderGL; fixed non-compressed texture offset in Vk backend
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/interface/GraphicsTypes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index d13a06f5..63cfe7cf 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1622,6 +1622,13 @@ namespace Diligent /// For block-compressed formats, compression block height Uint8 BlockHeight; + /// For non-compressed formats, returns the texel size. + /// For block-compressed formats, returns the block size. + Uint32 GetElementSize() const + { + return Uint32{ComponentSize} * (ComponentType != COMPONENT_TYPE_COMPRESSED ? Uint32{NumComponents} : Uint32{1}); + } + /// Initializes the structure TextureFormatAttribs( const Char* _Name, TEXTURE_FORMAT _Format, |
