Fix checking dimensions of surfaces.

We were only checking depth stencil surface height against
OUTLINE_RESOLUTION. Instead both color buffers and depth stencil
buffers should be checked against the GL implementation's limits.

Change-Id: I3784f80df4ea950760db7273185fb9312802bdd3
Reviewed-on: https://swiftshader-review.googlesource.com/10410
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libEGL/Surface.cpp b/src/OpenGL/libEGL/Surface.cpp
index d195b46..8cb3b39 100644
--- a/src/OpenGL/libEGL/Surface.cpp
+++ b/src/OpenGL/libEGL/Surface.cpp
@@ -78,11 +78,11 @@
 
 	if(libGLES_CM)
 	{
-		backBuffer = libGLES_CM->createBackBuffer(width, height, config);
+		backBuffer = libGLES_CM->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples);
 	}
 	else if(libGLESv2)
 	{
-		backBuffer = libGLESv2->createBackBuffer(width, height, config);
+		backBuffer = libGLESv2->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples);
 	}
 
 	if(!backBuffer)
@@ -96,11 +96,11 @@
 	{
 		if(libGLES_CM)
 		{
-			depthStencil = libGLES_CM->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples, false);
+			depthStencil = libGLES_CM->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples);
 		}
 		else if(libGLESv2)
 		{
-			depthStencil = libGLESv2->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples, false);
+			depthStencil = libGLESv2->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples);
 		}
 
 		if(!depthStencil)