Change the max reported viewport size to be the same as the maximum texture size in D3D11.

This fixes a regression in the WebGL conformance test "drawingbuffer-test". TRAC #22582 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1912 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent cfdfd463
...@@ -2185,14 +2185,18 @@ float Renderer11::getMaxPointSize() const ...@@ -2185,14 +2185,18 @@ float Renderer11::getMaxPointSize() const
int Renderer11::getMaxViewportDimension() const int Renderer11::getMaxViewportDimension() const
{ {
// Clamp viewport width/height to half of the maximum right/bottom edge // Maximum viewport size must be at least as large as the largest render buffer (or larger).
// In our case return the maximum texture size, which is the maximum render buffer size.
META_ASSERT(D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION * 2 - 1 <= D3D11_VIEWPORT_BOUNDS_MAX);
META_ASSERT(D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION * 2 - 1 <= D3D10_VIEWPORT_BOUNDS_MAX);
switch (mFeatureLevel) switch (mFeatureLevel)
{ {
case D3D_FEATURE_LEVEL_11_0: case D3D_FEATURE_LEVEL_11_0:
return D3D11_VIEWPORT_BOUNDS_MAX - D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384 return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384
case D3D_FEATURE_LEVEL_10_1: case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: case D3D_FEATURE_LEVEL_10_0:
return D3D10_VIEWPORT_BOUNDS_MAX - D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192 return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192
default: UNREACHABLE(); default: UNREACHABLE();
return 0; return 0;
} }
......
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