diff options
author | CrystalPT <CrystalPT@svn> | 2010-09-10 23:49:14 +0000 |
---|---|---|
committer | CrystalPT <CrystalPT@svn> | 2010-09-10 23:49:14 +0000 |
commit | 19987ae58df8c369d0963358e01e1be00df6c1f3 (patch) | |
tree | 7fe976e7f436ca7f78b67ea3cacec924ba0c3761 /guilib | |
parent | 466b4eb034d45caf14884052ee83d683dbe7ea95 (diff) |
[WIN32] workaround Intel compressed texture issue
(cherry picked from commit 00452071d88d55e7a5b77f4d6a739b63dd3b89c9)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33672 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r-- | guilib/Texture.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/guilib/Texture.cpp b/guilib/Texture.cpp index a45dc5fb1f..3f2a5b22dd 100644 --- a/guilib/Texture.cpp +++ b/guilib/Texture.cpp @@ -53,15 +53,17 @@ void CBaseTexture::Allocate(unsigned int width, unsigned int height, unsigned in m_format = format; m_orientation = 0; + m_textureWidth = m_imageWidth; + m_textureHeight = m_imageHeight; + + if (m_format & XB_FMT_DXT_MASK) + while (GetPitch() < g_Windowing.GetMinDXTPitch()) + m_textureWidth += GetBlockSize(); + if (!g_Windowing.SupportsNPOT((m_format & XB_FMT_DXT_MASK) != 0)) { - m_textureWidth = PadPow2(m_imageWidth); - m_textureHeight = PadPow2(m_imageHeight); - } - else - { - m_textureWidth = m_imageWidth; - m_textureHeight = m_imageHeight; + m_textureWidth = PadPow2(m_textureWidth); + m_textureHeight = PadPow2(m_textureHeight); } if (m_format & XB_FMT_DXT_MASK) { // DXT textures must be a multiple of 4 in width and height |