| 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 // This file defines the GLES2 command buffer commands. | 5 // This file defines the GLES2 command buffer commands. |
| 6 | 6 |
| 7 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 7 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
| 8 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 8 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
| 9 | 9 |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 typedef unsigned char GLubyte; | 35 typedef unsigned char GLubyte; |
| 36 typedef unsigned short GLushort; | 36 typedef unsigned short GLushort; |
| 37 typedef unsigned long GLulong; | 37 typedef unsigned long GLulong; |
| 38 typedef float GLfloat; | 38 typedef float GLfloat; |
| 39 typedef float GLclampf; | 39 typedef float GLclampf; |
| 40 typedef double GLdouble; | 40 typedef double GLdouble; |
| 41 typedef double GLclampd; | 41 typedef double GLclampd; |
| 42 typedef void GLvoid; | 42 typedef void GLvoid; |
| 43 typedef khronos_intptr_t GLintptr; | 43 typedef khronos_intptr_t GLintptr; |
| 44 typedef khronos_ssize_t GLsizeiptr; | 44 typedef khronos_ssize_t GLsizeiptr; |
| 45 typedef struct __GLsync *GLsync; |
| 45 | 46 |
| 46 namespace gpu { | 47 namespace gpu { |
| 47 namespace gles2 { | 48 namespace gles2 { |
| 48 | 49 |
| 49 // Command buffer is GPU_COMMAND_BUFFER_ENTRY_ALIGNMENT byte aligned. | 50 // Command buffer is GPU_COMMAND_BUFFER_ENTRY_ALIGNMENT byte aligned. |
| 50 #pragma pack(push, GPU_COMMAND_BUFFER_ENTRY_ALIGNMENT) | 51 #pragma pack(push, GPU_COMMAND_BUFFER_ENTRY_ALIGNMENT) |
| 51 | 52 |
| 52 namespace id_namespaces { | 53 namespace id_namespaces { |
| 53 | 54 |
| 54 // These are used when contexts share resources. | 55 // These are used when contexts share resources. |
| 55 enum IdNamespaces { | 56 enum IdNamespaces { |
| 56 kBuffers, | 57 kBuffers, |
| 57 kFramebuffers, | 58 kFramebuffers, |
| 58 kProgramsAndShaders, | 59 kProgramsAndShaders, |
| 59 kRenderbuffers, | 60 kRenderbuffers, |
| 60 kTextures, | 61 kTextures, |
| 61 kQueries, | 62 kQueries, |
| 62 kVertexArrays, | 63 kVertexArrays, |
| 63 kValuebuffers, | 64 kValuebuffers, |
| 64 kSamplers, | 65 kSamplers, |
| 65 kTransformFeedbacks, | 66 kTransformFeedbacks, |
| 67 kSyncs, |
| 66 kNumIdNamespaces | 68 kNumIdNamespaces |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 // These numbers must not change | 71 // These numbers must not change |
| 70 static_assert(kBuffers == 0, "kBuffers should equal 0"); | 72 static_assert(kBuffers == 0, "kBuffers should equal 0"); |
| 71 static_assert(kFramebuffers == 1, "kFramebuffers should equal 1"); | 73 static_assert(kFramebuffers == 1, "kFramebuffers should equal 1"); |
| 72 static_assert(kProgramsAndShaders == 2, "kProgramsAndShaders should equal 2"); | 74 static_assert(kProgramsAndShaders == 2, "kProgramsAndShaders should equal 2"); |
| 73 static_assert(kRenderbuffers == 3, "kRenderbuffers should equal 3"); | 75 static_assert(kRenderbuffers == 3, "kRenderbuffers should equal 3"); |
| 74 static_assert(kTextures == 4, "kTextures should equal 4"); | 76 static_assert(kTextures == 4, "kTextures should equal 4"); |
| 75 | 77 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); | 277 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); |
| 276 | 278 |
| 277 | 279 |
| 278 #pragma pack(pop) | 280 #pragma pack(pop) |
| 279 | 281 |
| 280 } // namespace cmd | 282 } // namespace cmd |
| 281 } // namespace gles2 | 283 } // namespace gles2 |
| 282 } // namespace gpu | 284 } // namespace gpu |
| 283 | 285 |
| 284 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 286 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
| OLD | NEW |