Removes calls from Context to retrieve d3d9 surfaces

TRAC #22094 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1450 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent d186dc7f
...@@ -2145,18 +2145,14 @@ void Context::clear(GLbitfield mask) ...@@ -2145,18 +2145,14 @@ void Context::clear(GLbitfield mask)
mask &= ~GL_STENCIL_BUFFER_BIT; mask &= ~GL_STENCIL_BUFFER_BIT;
if (framebufferObject->getStencilbufferType() != GL_NONE) if (framebufferObject->getStencilbufferType() != GL_NONE)
{ {
IDirect3DSurface9 *depthStencil = framebufferObject->getStencilbuffer()->getDepthStencil()->getSurface(); rx::RenderTarget *depthStencil = framebufferObject->getStencilbuffer()->getDepthStencil();
if (!depthStencil) if (!depthStencil)
{ {
ERR("Depth stencil pointer unexpectedly null."); ERR("Depth stencil pointer unexpectedly null.");
return; return;
} }
D3DSURFACE_DESC desc; unsigned int stencilSize = gl::GetStencilSize(depthStencil->getActualFormat());
depthStencil->GetDesc(&desc);
depthStencil->Release();
unsigned int stencilSize = d3d9_gl::GetStencilSize(desc.Format);
stencilUnmasked = (0x1 << stencilSize) - 1; stencilUnmasked = (0x1 << stencilSize) - 1;
if (stencilUnmasked != 0x0) if (stencilUnmasked != 0x0)
......
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