Pass the RenderTarget, not the D3D surface, up the Renderbuffer heirarchy.

TRAC #22094

Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1449 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index ec68f00..af003f1 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -2145,7 +2145,7 @@
         mask &= ~GL_STENCIL_BUFFER_BIT;
         if (framebufferObject->getStencilbufferType() != GL_NONE)
         {
-            IDirect3DSurface9 *depthStencil = framebufferObject->getStencilbuffer()->getDepthStencil();
+            IDirect3DSurface9 *depthStencil = framebufferObject->getStencilbuffer()->getDepthStencil()->getSurface();
             if (!depthStencil)
             {
                 ERR("Depth stencil pointer unexpectedly null.");