Implemented Renderer11:getDXT1/3/5TextureSupport.

TRAC #22422 Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1916 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7ae9e7fc
......@@ -310,6 +310,36 @@ EGLint Renderer11::initialize()
}
}
// Check compressed texture support
const unsigned int requiredCompressedTextureFlags = D3D11_FORMAT_SUPPORT_TEXTURE2D;
if (SUCCEEDED(mDevice->CheckFormatSupport(DXGI_FORMAT_BC1_UNORM, &formatSupport)))
{
mDXT1TextureSupport = (formatSupport & requiredCompressedTextureFlags) == requiredCompressedTextureFlags;
}
else
{
mDXT1TextureSupport = false;
}
if (SUCCEEDED(mDevice->CheckFormatSupport(DXGI_FORMAT_BC3_UNORM, &formatSupport)))
{
mDXT3TextureSupport = (formatSupport & requiredCompressedTextureFlags) == requiredCompressedTextureFlags;
}
else
{
mDXT3TextureSupport = false;
}
if (SUCCEEDED(mDevice->CheckFormatSupport(DXGI_FORMAT_BC5_UNORM, &formatSupport)))
{
mDXT5TextureSupport = (formatSupport & requiredCompressedTextureFlags) == requiredCompressedTextureFlags;
}
else
{
mDXT5TextureSupport = false;
}
return EGL_SUCCESS;
}
......@@ -1952,23 +1982,17 @@ bool Renderer11::getBGRATextureSupport() const
bool Renderer11::getDXT1TextureSupport()
{
// TODO
// UNIMPLEMENTED();
return false;
return mDXT1TextureSupport;
}
bool Renderer11::getDXT3TextureSupport()
{
// TODO
// UNIMPLEMENTED();
return false;
return mDXT3TextureSupport;
}
bool Renderer11::getDXT5TextureSupport()
{
// TODO
// UNIMPLEMENTED();
return false;
return mDXT5TextureSupport;
}
bool Renderer11::getDepthTextureSupport() const
......
......@@ -225,6 +225,10 @@ class Renderer11 : public Renderer
bool mFloat32FilterSupport;
bool mFloat32RenderSupport;
bool mDXT1TextureSupport;
bool mDXT3TextureSupport;
bool mDXT5TextureSupport;
// Multisample format support
struct MultisampleSupportInfo
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment