Implemented Renderer11::getDepthTextureSupport.

TRAC #22587 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1953 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 42832a65
...@@ -368,6 +368,29 @@ EGLint Renderer11::initialize() ...@@ -368,6 +368,29 @@ EGLint Renderer11::initialize()
mDXT5TextureSupport = false; mDXT5TextureSupport = false;
} }
// Check depth texture support
DXGI_FORMAT depthTextureFormats[] =
{
DXGI_FORMAT_D16_UNORM,
DXGI_FORMAT_D24_UNORM_S8_UINT,
};
static const unsigned int requiredDepthTextureFlags = D3D11_FORMAT_SUPPORT_DEPTH_STENCIL |
D3D11_FORMAT_SUPPORT_TEXTURE2D;
mDepthTextureSupport = true;
for (unsigned int i = 0; i < ArraySize(depthTextureFormats); i++)
{
if (SUCCEEDED(mDevice->CheckFormatSupport(depthTextureFormats[i], &formatSupport)))
{
mDepthTextureSupport = mDepthTextureSupport && ((formatSupport & requiredDepthTextureFlags) == requiredDepthTextureFlags);
}
else
{
mDepthTextureSupport = false;
}
}
return EGL_SUCCESS; return EGL_SUCCESS;
} }
...@@ -2026,9 +2049,7 @@ bool Renderer11::getDXT5TextureSupport() ...@@ -2026,9 +2049,7 @@ bool Renderer11::getDXT5TextureSupport()
bool Renderer11::getDepthTextureSupport() const bool Renderer11::getDepthTextureSupport() const
{ {
// TODO return mDepthTextureSupport;
// UNIMPLEMENTED();
return false;
} }
bool Renderer11::getFloat32TextureSupport(bool *filtering, bool *renderable) bool Renderer11::getFloat32TextureSupport(bool *filtering, bool *renderable)
......
...@@ -222,6 +222,8 @@ class Renderer11 : public Renderer ...@@ -222,6 +222,8 @@ class Renderer11 : public Renderer
bool mDXT3TextureSupport; bool mDXT3TextureSupport;
bool mDXT5TextureSupport; bool mDXT5TextureSupport;
bool mDepthTextureSupport;
// Multisample format support // Multisample format support
struct MultisampleSupportInfo 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