| 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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 5532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5543 case GL_GET_ERROR_QUERY_CHROMIUM: | 5543 case GL_GET_ERROR_QUERY_CHROMIUM: |
| 5544 break; | 5544 break; |
| 5545 case GL_COMMANDS_COMPLETED_CHROMIUM: | 5545 case GL_COMMANDS_COMPLETED_CHROMIUM: |
| 5546 if (!capabilities_.sync_query) { | 5546 if (!capabilities_.sync_query) { |
| 5547 SetGLError( | 5547 SetGLError( |
| 5548 GL_INVALID_OPERATION, "glBeginQueryEXT", | 5548 GL_INVALID_OPERATION, "glBeginQueryEXT", |
| 5549 "not enabled for commands completed queries"); | 5549 "not enabled for commands completed queries"); |
| 5550 return; | 5550 return; |
| 5551 } | 5551 } |
| 5552 break; | 5552 break; |
| 5553 case GL_SAMPLES_PASSED_ARB: |
| 5554 if (!capabilities_.occlusion_query) { |
| 5555 SetGLError( |
| 5556 GL_INVALID_OPERATION, "glBeginQueryEXT", |
| 5557 "not enabled for occlusion queries"); |
| 5558 return; |
| 5559 } |
| 5560 break; |
| 5553 case GL_ANY_SAMPLES_PASSED: | 5561 case GL_ANY_SAMPLES_PASSED: |
| 5554 case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: | 5562 case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: |
| 5555 if (!capabilities_.occlusion_query_boolean) { | 5563 if (!capabilities_.occlusion_query_boolean) { |
| 5556 SetGLError( | 5564 SetGLError( |
| 5557 GL_INVALID_OPERATION, "glBeginQueryEXT", | 5565 GL_INVALID_OPERATION, "glBeginQueryEXT", |
| 5558 "not enabled for occlusion queries"); | 5566 "not enabled for boolean occlusion queries"); |
| 5559 return; | 5567 return; |
| 5560 } | 5568 } |
| 5561 break; | 5569 break; |
| 5562 case GL_TIME_ELAPSED_EXT: | 5570 case GL_TIME_ELAPSED_EXT: |
| 5563 if (!capabilities_.timer_queries) { | 5571 if (!capabilities_.timer_queries) { |
| 5564 SetGLError( | 5572 SetGLError( |
| 5565 GL_INVALID_OPERATION, "glBeginQueryEXT", | 5573 GL_INVALID_OPERATION, "glBeginQueryEXT", |
| 5566 "not enabled for timing queries"); | 5574 "not enabled for timing queries"); |
| 5567 return; | 5575 return; |
| 5568 } | 5576 } |
| (...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7072 CheckGLError(); | 7080 CheckGLError(); |
| 7073 } | 7081 } |
| 7074 | 7082 |
| 7075 // Include the auto-generated part of this file. We split this because it means | 7083 // Include the auto-generated part of this file. We split this because it means |
| 7076 // we can easily edit the non-auto generated parts right here in this file | 7084 // we can easily edit the non-auto generated parts right here in this file |
| 7077 // instead of having to edit some template or the code generator. | 7085 // instead of having to edit some template or the code generator. |
| 7078 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 7086 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 7079 | 7087 |
| 7080 } // namespace gles2 | 7088 } // namespace gles2 |
| 7081 } // namespace gpu | 7089 } // namespace gpu |
| OLD | NEW |