aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-09-26 13:12:32 +0100
committerBen Murdoch <benm@google.com>2014-09-26 13:12:32 +0100
commitf682e5933bcdff5955289e0cab66a8c59f9526e4 (patch)
tree7a03695c07926846857204a162a325782e7352d1 /src
parent7279bdb042e129dda9d23ce826b5e8424c312561 (diff)
parentb5af678b07f7424b41d5045a4dcde1c7cccbaa8b (diff)
downloadangle-f682e5933bcdff5955289e0cab66a8c59f9526e4.tar.gz
Merge third_party/angle from https://chromium.googlesource.com/angle/angle.git at b5af678b07f7424b41d5045a4dcde1c7cccbaa8b
This commit was generated by merge_from_chromium.py. Change-Id: I303a5d565350c182710c435e520aceffa6f560ab
Diffstat (limited to 'src')
-rw-r--r--src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp b/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp
index 8e13b2e5..e90bb904 100644
--- a/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp
+++ b/src/libGLESv2/renderer/d3d/d3d9/formatutils9.cpp
@@ -223,8 +223,17 @@ static D3D9FormatMap BuildD3D9FormatMap()
// | Internal format | Texture format | Render format | Load function |
InsertD3D9FormatInfo(&map, GL_NONE, D3DFMT_NULL, D3DFMT_NULL, UnreachableLoad );
+ // We choose to downsample the GL_DEPTH_COMPONENT32_OES format to a 24-bit format because D3DFMT_D32 is not widely
+ // supported. We're allowed to do this because:
+ // - The ES spec 2.0.25 sec 3.7.1 states that we're allowed to store texture formats with internal format
+ // resolutions of our own choosing.
+ // - OES_depth_texture states that downsampling of the depth formats is allowed.
+ // - ANGLE_depth_texture does not state minimum required resolutions of the depth texture formats it
+ // introduces.
+ // In ES3 however, there are minimum resolutions for the texture formats and this would not be allowed.
+
InsertD3D9FormatInfo(&map, GL_DEPTH_COMPONENT16, D3DFMT_INTZ, D3DFMT_D24S8, UnreachableLoad );
- InsertD3D9FormatInfo(&map, GL_DEPTH_COMPONENT32_OES, D3DFMT_INTZ, D3DFMT_D32, UnreachableLoad );
+ InsertD3D9FormatInfo(&map, GL_DEPTH_COMPONENT32_OES, D3DFMT_INTZ, D3DFMT_D24X8, UnreachableLoad );
InsertD3D9FormatInfo(&map, GL_DEPTH24_STENCIL8_OES, D3DFMT_INTZ, D3DFMT_D24S8, UnreachableLoad );
InsertD3D9FormatInfo(&map, GL_STENCIL_INDEX8, D3DFMT_UNKNOWN, D3DFMT_D24S8, UnreachableLoad ); // TODO: What's the texture format?