Implement larger bounds for viewports and scissor rectangles in D3D11.
This fixes a bug where we would not allow the application to draw outside the viewport, which is valid.
TRAC #22497
Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1875 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Renderer9.cpp b/src/libGLESv2/renderer/Renderer9.cpp
index 7a4d31c..3846abe 100644
--- a/src/libGLESv2/renderer/Renderer9.cpp
+++ b/src/libGLESv2/renderer/Renderer9.cpp
@@ -2307,6 +2307,13 @@
return getMajorShaderModel() == 3 ? mDeviceCaps.MaxPointSize : 1.0f;
}
+int Renderer9::getMaxViewportDimension() const
+{
+ int maxTextureDimension = std::min(std::min(getMaxTextureWidth(), getMaxTextureHeight()),
+ (int)gl::IMPLEMENTATION_MAX_TEXTURE_SIZE);
+ return maxTextureDimension;
+}
+
int Renderer9::getMaxTextureWidth() const
{
return (int)mDeviceCaps.MaxTextureWidth;