diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 18:08:00 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 18:08:00 +0000 |
commit | 71ee3647e2a1aa84f8a72ff13cfcfa24a2471fe9 (patch) | |
tree | 3334de88a949cb2939cf6de7b1f53b973fe1a0ec /gpu | |
parent | 39abdb1be0742cda417e36aa387cc0ff6a5e2315 (diff) | |
download | chromium_src-71ee3647e2a1aa84f8a72ff13cfcfa24a2471fe9.zip chromium_src-71ee3647e2a1aa84f8a72ff13cfcfa24a2471fe9.tar.gz chromium_src-71ee3647e2a1aa84f8a72ff13cfcfa24a2471fe9.tar.bz2 |
Use packed depth/stencil format if available.
WebGL context creation attributes are requests, not requirements. The command buffer needs to be more conservative in its format choices. As separate stencil buffers are not generally supported, pick packed buffers if possible.
BUG=58966
TEST=https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/context-attributes-alpha-depth-stencil-antialias.html
Review URL: http://codereview.chromium.org/3746001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 99a159f..6859c85 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1791,7 +1791,8 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, } else { LOG(INFO) << "GL_OES_packed_depth_stencil not supported."; } - if (attrib_parser.depth_size_ > 0 && depth24_stencil8_supported) { + if ((attrib_parser.depth_size_ > 0 || attrib_parser.stencil_size_ > 0) && + depth24_stencil8_supported) { offscreen_target_depth_format_ = GL_DEPTH24_STENCIL8; offscreen_target_stencil_format_ = 0; } else { @@ -1817,7 +1818,8 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, LOG(INFO) << "GL_EXT_packed_depth_stencil not supported."; } - if (attrib_parser.depth_size_ > 0 && depth24_stencil8_supported) { + if ((attrib_parser.depth_size_ > 0 || attrib_parser.stencil_size_ > 0) && + depth24_stencil8_supported) { offscreen_target_depth_format_ = GL_DEPTH24_STENCIL8; offscreen_target_stencil_format_ = 0; } else { |