OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 4474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4485 } else { | 4485 } else { |
4486 LOCAL_SET_GL_ERROR( | 4486 LOCAL_SET_GL_ERROR( |
4487 GL_INVALID_VALUE, | 4487 GL_INVALID_VALUE, |
4488 "glDisableVertexAttribArray", "index out of range"); | 4488 "glDisableVertexAttribArray", "index out of range"); |
4489 } | 4489 } |
4490 } | 4490 } |
4491 | 4491 |
4492 void GLES2DecoderImpl::DoDiscardFramebufferEXT(GLenum target, | 4492 void GLES2DecoderImpl::DoDiscardFramebufferEXT(GLenum target, |
4493 GLsizei numAttachments, | 4493 GLsizei numAttachments, |
4494 const GLenum* attachments) { | 4494 const GLenum* attachments) { |
4495 if (workarounds().disable_fbo_invalidations) { | |
vmiura
2015/03/25 21:43:11
nit: no need for {} brackets.
David Yen
2015/03/25 21:45:27
Done.
| |
4496 return; | |
4497 } | |
4498 | |
4495 Framebuffer* framebuffer = | 4499 Framebuffer* framebuffer = |
4496 GetFramebufferInfoForTarget(GL_FRAMEBUFFER); | 4500 GetFramebufferInfoForTarget(GL_FRAMEBUFFER); |
4497 | 4501 |
4498 // Validates the attachments. If one of them fails | 4502 // Validates the attachments. If one of them fails |
4499 // the whole command fails. | 4503 // the whole command fails. |
4500 for (GLsizei i = 0; i < numAttachments; ++i) { | 4504 for (GLsizei i = 0; i < numAttachments; ++i) { |
4501 if ((framebuffer && | 4505 if ((framebuffer && |
4502 !validators_->attachment.IsValid(attachments[i])) || | 4506 !validators_->attachment.IsValid(attachments[i])) || |
4503 (!framebuffer && | 4507 (!framebuffer && |
4504 !validators_->backbuffer_attachment.IsValid(attachments[i]))) { | 4508 !validators_->backbuffer_attachment.IsValid(attachments[i]))) { |
(...skipping 7926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12431 } | 12435 } |
12432 } | 12436 } |
12433 | 12437 |
12434 // Include the auto-generated part of this file. We split this because it means | 12438 // Include the auto-generated part of this file. We split this because it means |
12435 // we can easily edit the non-auto generated parts right here in this file | 12439 // we can easily edit the non-auto generated parts right here in this file |
12436 // instead of having to edit some template or the code generator. | 12440 // instead of having to edit some template or the code generator. |
12437 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 12441 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
12438 | 12442 |
12439 } // namespace gles2 | 12443 } // namespace gles2 |
12440 } // namespace gpu | 12444 } // namespace gpu |
OLD | NEW |