| 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 |
| 11 #include <KHR/khrplatform.h> | 11 #include <KHR/khrplatform.h> |
| 12 | 12 |
| 13 #include <stddef.h> |
| 13 #include <stdint.h> | 14 #include <stdint.h> |
| 14 #include <string.h> | 15 #include <string.h> |
| 15 | 16 |
| 16 #include "base/atomicops.h" | 17 #include "base/atomicops.h" |
| 17 #include "base/logging.h" | 18 #include "base/logging.h" |
| 18 #include "base/macros.h" | 19 #include "base/macros.h" |
| 19 #include "gpu/command_buffer/common/bitfield_helpers.h" | 20 #include "gpu/command_buffer/common/bitfield_helpers.h" |
| 20 #include "gpu/command_buffer/common/cmd_buffer_common.h" | 21 #include "gpu/command_buffer/common/cmd_buffer_common.h" |
| 21 #include "gpu/command_buffer/common/constants.h" | 22 #include "gpu/command_buffer/common/constants.h" |
| 22 #include "gpu/command_buffer/common/gles2_cmd_ids.h" | 23 #include "gpu/command_buffer/common/gles2_cmd_ids.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 311 |
| 311 #include "../common/gles2_cmd_format_autogen.h" | 312 #include "../common/gles2_cmd_format_autogen.h" |
| 312 | 313 |
| 313 // These are hand written commands. | 314 // These are hand written commands. |
| 314 // TODO(gman): Attempt to make these auto-generated. | 315 // TODO(gman): Attempt to make these auto-generated. |
| 315 | 316 |
| 316 struct GenMailboxCHROMIUM { | 317 struct GenMailboxCHROMIUM { |
| 317 typedef GenMailboxCHROMIUM ValueType; | 318 typedef GenMailboxCHROMIUM ValueType; |
| 318 static const CommandId kCmdId = kGenMailboxCHROMIUM; | 319 static const CommandId kCmdId = kGenMailboxCHROMIUM; |
| 319 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 320 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 320 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 321 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 321 CommandHeader header; | 322 CommandHeader header; |
| 322 }; | 323 }; |
| 323 | 324 |
| 324 struct InsertSyncPointCHROMIUM { | 325 struct InsertSyncPointCHROMIUM { |
| 325 typedef InsertSyncPointCHROMIUM ValueType; | 326 typedef InsertSyncPointCHROMIUM ValueType; |
| 326 static const CommandId kCmdId = kInsertSyncPointCHROMIUM; | 327 static const CommandId kCmdId = kInsertSyncPointCHROMIUM; |
| 327 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 328 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 328 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 329 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 329 CommandHeader header; | 330 CommandHeader header; |
| 330 }; | 331 }; |
| 331 | 332 |
| 332 struct CreateAndConsumeTextureCHROMIUMImmediate { | 333 struct CreateAndConsumeTextureCHROMIUMImmediate { |
| 333 typedef CreateAndConsumeTextureCHROMIUMImmediate ValueType; | 334 typedef CreateAndConsumeTextureCHROMIUMImmediate ValueType; |
| 334 static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUMImmediate; | 335 static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUMImmediate; |
| 335 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 336 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 336 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 337 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
| 337 | 338 |
| 338 static uint32_t ComputeDataSize() { | 339 static uint32_t ComputeDataSize() { |
| 339 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT | 340 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT |
| 340 } | 341 } |
| 341 | 342 |
| 342 static uint32_t ComputeSize() { | 343 static uint32_t ComputeSize() { |
| 343 return static_cast<uint32_t>(sizeof(ValueType) + | 344 return static_cast<uint32_t>(sizeof(ValueType) + |
| 344 ComputeDataSize()); // NOLINT | 345 ComputeDataSize()); // NOLINT |
| 345 } | 346 } |
| 346 | 347 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); | 383 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); |
| 383 | 384 |
| 384 | 385 |
| 385 #pragma pack(pop) | 386 #pragma pack(pop) |
| 386 | 387 |
| 387 } // namespace cmd | 388 } // namespace cmd |
| 388 } // namespace gles2 | 389 } // namespace gles2 |
| 389 } // namespace gpu | 390 } // namespace gpu |
| 390 | 391 |
| 391 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 392 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
| OLD | NEW |