Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index e7be28a03bc3b55679882e6bb429ca75230e5f8e..f7dbbbf31693b4bd66aaf29bf11f9f55914a7166 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -5959,7 +5959,13 @@ void GLES2DecoderImpl::InvalidateFramebufferImpl( |
| validated_attachments[validated_count++] = attachment; |
| } |
| if (invalidate_depth && invalidate_stencil) { |
| - validated_attachments[validated_count++] = GL_DEPTH_STENCIL_ATTACHMENT; |
| + if (op != kFramebufferDiscard || gl_version_info().is_es3) { |
| + validated_attachments[validated_count++] = GL_DEPTH_STENCIL_ATTACHMENT; |
| + } else { |
| + // DEPTH_STENCIL is not a valid token for glDiscardFramebufferEXT |
| + validated_attachments[validated_count++] = GL_DEPTH_ATTACHMENT; |
| + validated_attachments[validated_count++] = GL_STENCIL_ATTACHMENT; |
|
Zhenyao Mo
2016/12/19 17:53:48
It's easier to always split to DEPTH_ATTACHMENT an
jbriance
2016/12/19 19:40:45
Done in patch set 3
|
| + } |
| } |
| // If the default framebuffer is bound but we are still rendering to an |