| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 is auto-generated from | 5 // This file is auto-generated from |
| 6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
| 7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
| 8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
| 9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
| 10 | 10 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12, | 226 COMPILE_ASSERT(sizeof(BindRenderbuffer) == 12, |
| 227 Sizeof_BindRenderbuffer_is_not_12); | 227 Sizeof_BindRenderbuffer_is_not_12); |
| 228 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0, | 228 COMPILE_ASSERT(offsetof(BindRenderbuffer, header) == 0, |
| 229 OffsetOf_BindRenderbuffer_header_not_0); | 229 OffsetOf_BindRenderbuffer_header_not_0); |
| 230 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4, | 230 COMPILE_ASSERT(offsetof(BindRenderbuffer, target) == 4, |
| 231 OffsetOf_BindRenderbuffer_target_not_4); | 231 OffsetOf_BindRenderbuffer_target_not_4); |
| 232 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8, | 232 COMPILE_ASSERT(offsetof(BindRenderbuffer, renderbuffer) == 8, |
| 233 OffsetOf_BindRenderbuffer_renderbuffer_not_8); | 233 OffsetOf_BindRenderbuffer_renderbuffer_not_8); |
| 234 | 234 |
| 235 struct BindSampler { |
| 236 typedef BindSampler ValueType; |
| 237 static const CommandId kCmdId = kBindSampler; |
| 238 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 239 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 240 |
| 241 static uint32_t ComputeSize() { |
| 242 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 243 } |
| 244 |
| 245 void SetHeader() { header.SetCmd<ValueType>(); } |
| 246 |
| 247 void Init(GLuint _unit, GLuint _sampler) { |
| 248 SetHeader(); |
| 249 unit = _unit; |
| 250 sampler = _sampler; |
| 251 } |
| 252 |
| 253 void* Set(void* cmd, GLuint _unit, GLuint _sampler) { |
| 254 static_cast<ValueType*>(cmd)->Init(_unit, _sampler); |
| 255 return NextCmdAddress<ValueType>(cmd); |
| 256 } |
| 257 |
| 258 gpu::CommandHeader header; |
| 259 uint32_t unit; |
| 260 uint32_t sampler; |
| 261 }; |
| 262 |
| 263 COMPILE_ASSERT(sizeof(BindSampler) == 12, Sizeof_BindSampler_is_not_12); |
| 264 COMPILE_ASSERT(offsetof(BindSampler, header) == 0, |
| 265 OffsetOf_BindSampler_header_not_0); |
| 266 COMPILE_ASSERT(offsetof(BindSampler, unit) == 4, |
| 267 OffsetOf_BindSampler_unit_not_4); |
| 268 COMPILE_ASSERT(offsetof(BindSampler, sampler) == 8, |
| 269 OffsetOf_BindSampler_sampler_not_8); |
| 270 |
| 235 struct BindTexture { | 271 struct BindTexture { |
| 236 typedef BindTexture ValueType; | 272 typedef BindTexture ValueType; |
| 237 static const CommandId kCmdId = kBindTexture; | 273 static const CommandId kCmdId = kBindTexture; |
| 238 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 274 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 239 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
| 240 | 276 |
| 241 static uint32_t ComputeSize() { | 277 static uint32_t ComputeSize() { |
| 242 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 243 } | 279 } |
| 244 | 280 |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 int32_t n; | 1660 int32_t n; |
| 1625 }; | 1661 }; |
| 1626 | 1662 |
| 1627 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8, | 1663 COMPILE_ASSERT(sizeof(DeleteRenderbuffersImmediate) == 8, |
| 1628 Sizeof_DeleteRenderbuffersImmediate_is_not_8); | 1664 Sizeof_DeleteRenderbuffersImmediate_is_not_8); |
| 1629 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0, | 1665 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, header) == 0, |
| 1630 OffsetOf_DeleteRenderbuffersImmediate_header_not_0); | 1666 OffsetOf_DeleteRenderbuffersImmediate_header_not_0); |
| 1631 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4, | 1667 COMPILE_ASSERT(offsetof(DeleteRenderbuffersImmediate, n) == 4, |
| 1632 OffsetOf_DeleteRenderbuffersImmediate_n_not_4); | 1668 OffsetOf_DeleteRenderbuffersImmediate_n_not_4); |
| 1633 | 1669 |
| 1670 struct DeleteSamplersImmediate { |
| 1671 typedef DeleteSamplersImmediate ValueType; |
| 1672 static const CommandId kCmdId = kDeleteSamplersImmediate; |
| 1673 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 1674 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 1675 |
| 1676 static uint32_t ComputeDataSize(GLsizei n) { |
| 1677 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
| 1678 } |
| 1679 |
| 1680 static uint32_t ComputeSize(GLsizei n) { |
| 1681 return static_cast<uint32_t>(sizeof(ValueType) + |
| 1682 ComputeDataSize(n)); // NOLINT |
| 1683 } |
| 1684 |
| 1685 void SetHeader(GLsizei n) { |
| 1686 header.SetCmdByTotalSize<ValueType>(ComputeSize(n)); |
| 1687 } |
| 1688 |
| 1689 void Init(GLsizei _n, const GLuint* _samplers) { |
| 1690 SetHeader(_n); |
| 1691 n = _n; |
| 1692 memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n)); |
| 1693 } |
| 1694 |
| 1695 void* Set(void* cmd, GLsizei _n, const GLuint* _samplers) { |
| 1696 static_cast<ValueType*>(cmd)->Init(_n, _samplers); |
| 1697 const uint32_t size = ComputeSize(_n); |
| 1698 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 1699 } |
| 1700 |
| 1701 gpu::CommandHeader header; |
| 1702 int32_t n; |
| 1703 }; |
| 1704 |
| 1705 COMPILE_ASSERT(sizeof(DeleteSamplersImmediate) == 8, |
| 1706 Sizeof_DeleteSamplersImmediate_is_not_8); |
| 1707 COMPILE_ASSERT(offsetof(DeleteSamplersImmediate, header) == 0, |
| 1708 OffsetOf_DeleteSamplersImmediate_header_not_0); |
| 1709 COMPILE_ASSERT(offsetof(DeleteSamplersImmediate, n) == 4, |
| 1710 OffsetOf_DeleteSamplersImmediate_n_not_4); |
| 1711 |
| 1634 struct DeleteShader { | 1712 struct DeleteShader { |
| 1635 typedef DeleteShader ValueType; | 1713 typedef DeleteShader ValueType; |
| 1636 static const CommandId kCmdId = kDeleteShader; | 1714 static const CommandId kCmdId = kDeleteShader; |
| 1637 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1715 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 1638 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1716 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 1639 | 1717 |
| 1640 static uint32_t ComputeSize() { | 1718 static uint32_t ComputeSize() { |
| 1641 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1719 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 1642 } | 1720 } |
| 1643 | 1721 |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2450 int32_t n; | 2528 int32_t n; |
| 2451 }; | 2529 }; |
| 2452 | 2530 |
| 2453 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8, | 2531 COMPILE_ASSERT(sizeof(GenRenderbuffersImmediate) == 8, |
| 2454 Sizeof_GenRenderbuffersImmediate_is_not_8); | 2532 Sizeof_GenRenderbuffersImmediate_is_not_8); |
| 2455 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0, | 2533 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, header) == 0, |
| 2456 OffsetOf_GenRenderbuffersImmediate_header_not_0); | 2534 OffsetOf_GenRenderbuffersImmediate_header_not_0); |
| 2457 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4, | 2535 COMPILE_ASSERT(offsetof(GenRenderbuffersImmediate, n) == 4, |
| 2458 OffsetOf_GenRenderbuffersImmediate_n_not_4); | 2536 OffsetOf_GenRenderbuffersImmediate_n_not_4); |
| 2459 | 2537 |
| 2538 struct GenSamplersImmediate { |
| 2539 typedef GenSamplersImmediate ValueType; |
| 2540 static const CommandId kCmdId = kGenSamplersImmediate; |
| 2541 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 2542 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 2543 |
| 2544 static uint32_t ComputeDataSize(GLsizei n) { |
| 2545 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
| 2546 } |
| 2547 |
| 2548 static uint32_t ComputeSize(GLsizei n) { |
| 2549 return static_cast<uint32_t>(sizeof(ValueType) + |
| 2550 ComputeDataSize(n)); // NOLINT |
| 2551 } |
| 2552 |
| 2553 void SetHeader(GLsizei n) { |
| 2554 header.SetCmdByTotalSize<ValueType>(ComputeSize(n)); |
| 2555 } |
| 2556 |
| 2557 void Init(GLsizei _n, GLuint* _samplers) { |
| 2558 SetHeader(_n); |
| 2559 n = _n; |
| 2560 memcpy(ImmediateDataAddress(this), _samplers, ComputeDataSize(_n)); |
| 2561 } |
| 2562 |
| 2563 void* Set(void* cmd, GLsizei _n, GLuint* _samplers) { |
| 2564 static_cast<ValueType*>(cmd)->Init(_n, _samplers); |
| 2565 const uint32_t size = ComputeSize(_n); |
| 2566 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 2567 } |
| 2568 |
| 2569 gpu::CommandHeader header; |
| 2570 int32_t n; |
| 2571 }; |
| 2572 |
| 2573 COMPILE_ASSERT(sizeof(GenSamplersImmediate) == 8, |
| 2574 Sizeof_GenSamplersImmediate_is_not_8); |
| 2575 COMPILE_ASSERT(offsetof(GenSamplersImmediate, header) == 0, |
| 2576 OffsetOf_GenSamplersImmediate_header_not_0); |
| 2577 COMPILE_ASSERT(offsetof(GenSamplersImmediate, n) == 4, |
| 2578 OffsetOf_GenSamplersImmediate_n_not_4); |
| 2579 |
| 2460 struct GenTexturesImmediate { | 2580 struct GenTexturesImmediate { |
| 2461 typedef GenTexturesImmediate ValueType; | 2581 typedef GenTexturesImmediate ValueType; |
| 2462 static const CommandId kCmdId = kGenTexturesImmediate; | 2582 static const CommandId kCmdId = kGenTexturesImmediate; |
| 2463 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 2583 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 2464 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 2584 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 2465 | 2585 |
| 2466 static uint32_t ComputeDataSize(GLsizei n) { | 2586 static uint32_t ComputeDataSize(GLsizei n) { |
| 2467 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | 2587 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT |
| 2468 } | 2588 } |
| 2469 | 2589 |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 OffsetOf_GetRenderbufferParameteriv_header_not_0); | 3374 OffsetOf_GetRenderbufferParameteriv_header_not_0); |
| 3255 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4, | 3375 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, target) == 4, |
| 3256 OffsetOf_GetRenderbufferParameteriv_target_not_4); | 3376 OffsetOf_GetRenderbufferParameteriv_target_not_4); |
| 3257 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8, | 3377 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, pname) == 8, |
| 3258 OffsetOf_GetRenderbufferParameteriv_pname_not_8); | 3378 OffsetOf_GetRenderbufferParameteriv_pname_not_8); |
| 3259 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12, | 3379 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_id) == 12, |
| 3260 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12); | 3380 OffsetOf_GetRenderbufferParameteriv_params_shm_id_not_12); |
| 3261 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16, | 3381 COMPILE_ASSERT(offsetof(GetRenderbufferParameteriv, params_shm_offset) == 16, |
| 3262 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16); | 3382 OffsetOf_GetRenderbufferParameteriv_params_shm_offset_not_16); |
| 3263 | 3383 |
| 3384 struct GetSamplerParameterfv { |
| 3385 typedef GetSamplerParameterfv ValueType; |
| 3386 static const CommandId kCmdId = kGetSamplerParameterfv; |
| 3387 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 3388 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 3389 |
| 3390 typedef SizedResult<GLfloat> Result; |
| 3391 |
| 3392 static uint32_t ComputeSize() { |
| 3393 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 3394 } |
| 3395 |
| 3396 void SetHeader() { header.SetCmd<ValueType>(); } |
| 3397 |
| 3398 void Init(GLuint _sampler, |
| 3399 GLenum _pname, |
| 3400 uint32_t _params_shm_id, |
| 3401 uint32_t _params_shm_offset) { |
| 3402 SetHeader(); |
| 3403 sampler = _sampler; |
| 3404 pname = _pname; |
| 3405 params_shm_id = _params_shm_id; |
| 3406 params_shm_offset = _params_shm_offset; |
| 3407 } |
| 3408 |
| 3409 void* Set(void* cmd, |
| 3410 GLuint _sampler, |
| 3411 GLenum _pname, |
| 3412 uint32_t _params_shm_id, |
| 3413 uint32_t _params_shm_offset) { |
| 3414 static_cast<ValueType*>(cmd) |
| 3415 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset); |
| 3416 return NextCmdAddress<ValueType>(cmd); |
| 3417 } |
| 3418 |
| 3419 gpu::CommandHeader header; |
| 3420 uint32_t sampler; |
| 3421 uint32_t pname; |
| 3422 uint32_t params_shm_id; |
| 3423 uint32_t params_shm_offset; |
| 3424 }; |
| 3425 |
| 3426 COMPILE_ASSERT(sizeof(GetSamplerParameterfv) == 20, |
| 3427 Sizeof_GetSamplerParameterfv_is_not_20); |
| 3428 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, header) == 0, |
| 3429 OffsetOf_GetSamplerParameterfv_header_not_0); |
| 3430 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, sampler) == 4, |
| 3431 OffsetOf_GetSamplerParameterfv_sampler_not_4); |
| 3432 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, pname) == 8, |
| 3433 OffsetOf_GetSamplerParameterfv_pname_not_8); |
| 3434 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, params_shm_id) == 12, |
| 3435 OffsetOf_GetSamplerParameterfv_params_shm_id_not_12); |
| 3436 COMPILE_ASSERT(offsetof(GetSamplerParameterfv, params_shm_offset) == 16, |
| 3437 OffsetOf_GetSamplerParameterfv_params_shm_offset_not_16); |
| 3438 |
| 3439 struct GetSamplerParameteriv { |
| 3440 typedef GetSamplerParameteriv ValueType; |
| 3441 static const CommandId kCmdId = kGetSamplerParameteriv; |
| 3442 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 3443 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 3444 |
| 3445 typedef SizedResult<GLint> Result; |
| 3446 |
| 3447 static uint32_t ComputeSize() { |
| 3448 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 3449 } |
| 3450 |
| 3451 void SetHeader() { header.SetCmd<ValueType>(); } |
| 3452 |
| 3453 void Init(GLuint _sampler, |
| 3454 GLenum _pname, |
| 3455 uint32_t _params_shm_id, |
| 3456 uint32_t _params_shm_offset) { |
| 3457 SetHeader(); |
| 3458 sampler = _sampler; |
| 3459 pname = _pname; |
| 3460 params_shm_id = _params_shm_id; |
| 3461 params_shm_offset = _params_shm_offset; |
| 3462 } |
| 3463 |
| 3464 void* Set(void* cmd, |
| 3465 GLuint _sampler, |
| 3466 GLenum _pname, |
| 3467 uint32_t _params_shm_id, |
| 3468 uint32_t _params_shm_offset) { |
| 3469 static_cast<ValueType*>(cmd) |
| 3470 ->Init(_sampler, _pname, _params_shm_id, _params_shm_offset); |
| 3471 return NextCmdAddress<ValueType>(cmd); |
| 3472 } |
| 3473 |
| 3474 gpu::CommandHeader header; |
| 3475 uint32_t sampler; |
| 3476 uint32_t pname; |
| 3477 uint32_t params_shm_id; |
| 3478 uint32_t params_shm_offset; |
| 3479 }; |
| 3480 |
| 3481 COMPILE_ASSERT(sizeof(GetSamplerParameteriv) == 20, |
| 3482 Sizeof_GetSamplerParameteriv_is_not_20); |
| 3483 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, header) == 0, |
| 3484 OffsetOf_GetSamplerParameteriv_header_not_0); |
| 3485 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, sampler) == 4, |
| 3486 OffsetOf_GetSamplerParameteriv_sampler_not_4); |
| 3487 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, pname) == 8, |
| 3488 OffsetOf_GetSamplerParameteriv_pname_not_8); |
| 3489 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, params_shm_id) == 12, |
| 3490 OffsetOf_GetSamplerParameteriv_params_shm_id_not_12); |
| 3491 COMPILE_ASSERT(offsetof(GetSamplerParameteriv, params_shm_offset) == 16, |
| 3492 OffsetOf_GetSamplerParameteriv_params_shm_offset_not_16); |
| 3493 |
| 3264 struct GetShaderiv { | 3494 struct GetShaderiv { |
| 3265 typedef GetShaderiv ValueType; | 3495 typedef GetShaderiv ValueType; |
| 3266 static const CommandId kCmdId = kGetShaderiv; | 3496 static const CommandId kCmdId = kGetShaderiv; |
| 3267 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3497 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 3268 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 3498 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 3269 | 3499 |
| 3270 typedef SizedResult<GLint> Result; | 3500 typedef SizedResult<GLint> Result; |
| 3271 | 3501 |
| 3272 static uint32_t ComputeSize() { | 3502 static uint32_t ComputeSize() { |
| 3273 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3503 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4315 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, Sizeof_IsRenderbuffer_is_not_16); | 4545 COMPILE_ASSERT(sizeof(IsRenderbuffer) == 16, Sizeof_IsRenderbuffer_is_not_16); |
| 4316 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0, | 4546 COMPILE_ASSERT(offsetof(IsRenderbuffer, header) == 0, |
| 4317 OffsetOf_IsRenderbuffer_header_not_0); | 4547 OffsetOf_IsRenderbuffer_header_not_0); |
| 4318 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4, | 4548 COMPILE_ASSERT(offsetof(IsRenderbuffer, renderbuffer) == 4, |
| 4319 OffsetOf_IsRenderbuffer_renderbuffer_not_4); | 4549 OffsetOf_IsRenderbuffer_renderbuffer_not_4); |
| 4320 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8, | 4550 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_id) == 8, |
| 4321 OffsetOf_IsRenderbuffer_result_shm_id_not_8); | 4551 OffsetOf_IsRenderbuffer_result_shm_id_not_8); |
| 4322 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12, | 4552 COMPILE_ASSERT(offsetof(IsRenderbuffer, result_shm_offset) == 12, |
| 4323 OffsetOf_IsRenderbuffer_result_shm_offset_not_12); | 4553 OffsetOf_IsRenderbuffer_result_shm_offset_not_12); |
| 4324 | 4554 |
| 4555 struct IsSampler { |
| 4556 typedef IsSampler ValueType; |
| 4557 static const CommandId kCmdId = kIsSampler; |
| 4558 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 4559 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 4560 |
| 4561 typedef uint32_t Result; |
| 4562 |
| 4563 static uint32_t ComputeSize() { |
| 4564 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 4565 } |
| 4566 |
| 4567 void SetHeader() { header.SetCmd<ValueType>(); } |
| 4568 |
| 4569 void Init(GLuint _sampler, |
| 4570 uint32_t _result_shm_id, |
| 4571 uint32_t _result_shm_offset) { |
| 4572 SetHeader(); |
| 4573 sampler = _sampler; |
| 4574 result_shm_id = _result_shm_id; |
| 4575 result_shm_offset = _result_shm_offset; |
| 4576 } |
| 4577 |
| 4578 void* Set(void* cmd, |
| 4579 GLuint _sampler, |
| 4580 uint32_t _result_shm_id, |
| 4581 uint32_t _result_shm_offset) { |
| 4582 static_cast<ValueType*>(cmd) |
| 4583 ->Init(_sampler, _result_shm_id, _result_shm_offset); |
| 4584 return NextCmdAddress<ValueType>(cmd); |
| 4585 } |
| 4586 |
| 4587 gpu::CommandHeader header; |
| 4588 uint32_t sampler; |
| 4589 uint32_t result_shm_id; |
| 4590 uint32_t result_shm_offset; |
| 4591 }; |
| 4592 |
| 4593 COMPILE_ASSERT(sizeof(IsSampler) == 16, Sizeof_IsSampler_is_not_16); |
| 4594 COMPILE_ASSERT(offsetof(IsSampler, header) == 0, |
| 4595 OffsetOf_IsSampler_header_not_0); |
| 4596 COMPILE_ASSERT(offsetof(IsSampler, sampler) == 4, |
| 4597 OffsetOf_IsSampler_sampler_not_4); |
| 4598 COMPILE_ASSERT(offsetof(IsSampler, result_shm_id) == 8, |
| 4599 OffsetOf_IsSampler_result_shm_id_not_8); |
| 4600 COMPILE_ASSERT(offsetof(IsSampler, result_shm_offset) == 12, |
| 4601 OffsetOf_IsSampler_result_shm_offset_not_12); |
| 4602 |
| 4325 struct IsShader { | 4603 struct IsShader { |
| 4326 typedef IsShader ValueType; | 4604 typedef IsShader ValueType; |
| 4327 static const CommandId kCmdId = kIsShader; | 4605 static const CommandId kCmdId = kIsShader; |
| 4328 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 4606 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 4329 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 4607 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 4330 | 4608 |
| 4331 typedef uint32_t Result; | 4609 typedef uint32_t Result; |
| 4332 | 4610 |
| 4333 static uint32_t ComputeSize() { | 4611 static uint32_t ComputeSize() { |
| 4334 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 4612 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4789 }; | 5067 }; |
| 4790 | 5068 |
| 4791 COMPILE_ASSERT(sizeof(SampleCoverage) == 12, Sizeof_SampleCoverage_is_not_12); | 5069 COMPILE_ASSERT(sizeof(SampleCoverage) == 12, Sizeof_SampleCoverage_is_not_12); |
| 4792 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0, | 5070 COMPILE_ASSERT(offsetof(SampleCoverage, header) == 0, |
| 4793 OffsetOf_SampleCoverage_header_not_0); | 5071 OffsetOf_SampleCoverage_header_not_0); |
| 4794 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4, | 5072 COMPILE_ASSERT(offsetof(SampleCoverage, value) == 4, |
| 4795 OffsetOf_SampleCoverage_value_not_4); | 5073 OffsetOf_SampleCoverage_value_not_4); |
| 4796 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8, | 5074 COMPILE_ASSERT(offsetof(SampleCoverage, invert) == 8, |
| 4797 OffsetOf_SampleCoverage_invert_not_8); | 5075 OffsetOf_SampleCoverage_invert_not_8); |
| 4798 | 5076 |
| 5077 struct SamplerParameterf { |
| 5078 typedef SamplerParameterf ValueType; |
| 5079 static const CommandId kCmdId = kSamplerParameterf; |
| 5080 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 5081 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5082 |
| 5083 static uint32_t ComputeSize() { |
| 5084 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 5085 } |
| 5086 |
| 5087 void SetHeader() { header.SetCmd<ValueType>(); } |
| 5088 |
| 5089 void Init(GLuint _sampler, GLenum _pname, GLfloat _param) { |
| 5090 SetHeader(); |
| 5091 sampler = _sampler; |
| 5092 pname = _pname; |
| 5093 param = _param; |
| 5094 } |
| 5095 |
| 5096 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLfloat _param) { |
| 5097 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param); |
| 5098 return NextCmdAddress<ValueType>(cmd); |
| 5099 } |
| 5100 |
| 5101 gpu::CommandHeader header; |
| 5102 uint32_t sampler; |
| 5103 uint32_t pname; |
| 5104 float param; |
| 5105 }; |
| 5106 |
| 5107 COMPILE_ASSERT(sizeof(SamplerParameterf) == 16, |
| 5108 Sizeof_SamplerParameterf_is_not_16); |
| 5109 COMPILE_ASSERT(offsetof(SamplerParameterf, header) == 0, |
| 5110 OffsetOf_SamplerParameterf_header_not_0); |
| 5111 COMPILE_ASSERT(offsetof(SamplerParameterf, sampler) == 4, |
| 5112 OffsetOf_SamplerParameterf_sampler_not_4); |
| 5113 COMPILE_ASSERT(offsetof(SamplerParameterf, pname) == 8, |
| 5114 OffsetOf_SamplerParameterf_pname_not_8); |
| 5115 COMPILE_ASSERT(offsetof(SamplerParameterf, param) == 12, |
| 5116 OffsetOf_SamplerParameterf_param_not_12); |
| 5117 |
| 5118 struct SamplerParameterfvImmediate { |
| 5119 typedef SamplerParameterfvImmediate ValueType; |
| 5120 static const CommandId kCmdId = kSamplerParameterfvImmediate; |
| 5121 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 5122 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5123 |
| 5124 static uint32_t ComputeDataSize() { |
| 5125 return static_cast<uint32_t>(sizeof(GLfloat) * 1); // NOLINT |
| 5126 } |
| 5127 |
| 5128 static uint32_t ComputeSize() { |
| 5129 return static_cast<uint32_t>(sizeof(ValueType) + |
| 5130 ComputeDataSize()); // NOLINT |
| 5131 } |
| 5132 |
| 5133 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } |
| 5134 |
| 5135 void Init(GLuint _sampler, GLenum _pname, const GLfloat* _params) { |
| 5136 SetHeader(); |
| 5137 sampler = _sampler; |
| 5138 pname = _pname; |
| 5139 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize()); |
| 5140 } |
| 5141 |
| 5142 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLfloat* _params) { |
| 5143 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params); |
| 5144 const uint32_t size = ComputeSize(); |
| 5145 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 5146 } |
| 5147 |
| 5148 gpu::CommandHeader header; |
| 5149 uint32_t sampler; |
| 5150 uint32_t pname; |
| 5151 }; |
| 5152 |
| 5153 COMPILE_ASSERT(sizeof(SamplerParameterfvImmediate) == 12, |
| 5154 Sizeof_SamplerParameterfvImmediate_is_not_12); |
| 5155 COMPILE_ASSERT(offsetof(SamplerParameterfvImmediate, header) == 0, |
| 5156 OffsetOf_SamplerParameterfvImmediate_header_not_0); |
| 5157 COMPILE_ASSERT(offsetof(SamplerParameterfvImmediate, sampler) == 4, |
| 5158 OffsetOf_SamplerParameterfvImmediate_sampler_not_4); |
| 5159 COMPILE_ASSERT(offsetof(SamplerParameterfvImmediate, pname) == 8, |
| 5160 OffsetOf_SamplerParameterfvImmediate_pname_not_8); |
| 5161 |
| 5162 struct SamplerParameteri { |
| 5163 typedef SamplerParameteri ValueType; |
| 5164 static const CommandId kCmdId = kSamplerParameteri; |
| 5165 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 5166 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5167 |
| 5168 static uint32_t ComputeSize() { |
| 5169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 5170 } |
| 5171 |
| 5172 void SetHeader() { header.SetCmd<ValueType>(); } |
| 5173 |
| 5174 void Init(GLuint _sampler, GLenum _pname, GLint _param) { |
| 5175 SetHeader(); |
| 5176 sampler = _sampler; |
| 5177 pname = _pname; |
| 5178 param = _param; |
| 5179 } |
| 5180 |
| 5181 void* Set(void* cmd, GLuint _sampler, GLenum _pname, GLint _param) { |
| 5182 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _param); |
| 5183 return NextCmdAddress<ValueType>(cmd); |
| 5184 } |
| 5185 |
| 5186 gpu::CommandHeader header; |
| 5187 uint32_t sampler; |
| 5188 uint32_t pname; |
| 5189 int32_t param; |
| 5190 }; |
| 5191 |
| 5192 COMPILE_ASSERT(sizeof(SamplerParameteri) == 16, |
| 5193 Sizeof_SamplerParameteri_is_not_16); |
| 5194 COMPILE_ASSERT(offsetof(SamplerParameteri, header) == 0, |
| 5195 OffsetOf_SamplerParameteri_header_not_0); |
| 5196 COMPILE_ASSERT(offsetof(SamplerParameteri, sampler) == 4, |
| 5197 OffsetOf_SamplerParameteri_sampler_not_4); |
| 5198 COMPILE_ASSERT(offsetof(SamplerParameteri, pname) == 8, |
| 5199 OffsetOf_SamplerParameteri_pname_not_8); |
| 5200 COMPILE_ASSERT(offsetof(SamplerParameteri, param) == 12, |
| 5201 OffsetOf_SamplerParameteri_param_not_12); |
| 5202 |
| 5203 struct SamplerParameterivImmediate { |
| 5204 typedef SamplerParameterivImmediate ValueType; |
| 5205 static const CommandId kCmdId = kSamplerParameterivImmediate; |
| 5206 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 5207 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 5208 |
| 5209 static uint32_t ComputeDataSize() { |
| 5210 return static_cast<uint32_t>(sizeof(GLint) * 1); // NOLINT |
| 5211 } |
| 5212 |
| 5213 static uint32_t ComputeSize() { |
| 5214 return static_cast<uint32_t>(sizeof(ValueType) + |
| 5215 ComputeDataSize()); // NOLINT |
| 5216 } |
| 5217 |
| 5218 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } |
| 5219 |
| 5220 void Init(GLuint _sampler, GLenum _pname, const GLint* _params) { |
| 5221 SetHeader(); |
| 5222 sampler = _sampler; |
| 5223 pname = _pname; |
| 5224 memcpy(ImmediateDataAddress(this), _params, ComputeDataSize()); |
| 5225 } |
| 5226 |
| 5227 void* Set(void* cmd, GLuint _sampler, GLenum _pname, const GLint* _params) { |
| 5228 static_cast<ValueType*>(cmd)->Init(_sampler, _pname, _params); |
| 5229 const uint32_t size = ComputeSize(); |
| 5230 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 5231 } |
| 5232 |
| 5233 gpu::CommandHeader header; |
| 5234 uint32_t sampler; |
| 5235 uint32_t pname; |
| 5236 }; |
| 5237 |
| 5238 COMPILE_ASSERT(sizeof(SamplerParameterivImmediate) == 12, |
| 5239 Sizeof_SamplerParameterivImmediate_is_not_12); |
| 5240 COMPILE_ASSERT(offsetof(SamplerParameterivImmediate, header) == 0, |
| 5241 OffsetOf_SamplerParameterivImmediate_header_not_0); |
| 5242 COMPILE_ASSERT(offsetof(SamplerParameterivImmediate, sampler) == 4, |
| 5243 OffsetOf_SamplerParameterivImmediate_sampler_not_4); |
| 5244 COMPILE_ASSERT(offsetof(SamplerParameterivImmediate, pname) == 8, |
| 5245 OffsetOf_SamplerParameterivImmediate_pname_not_8); |
| 5246 |
| 4799 struct Scissor { | 5247 struct Scissor { |
| 4800 typedef Scissor ValueType; | 5248 typedef Scissor ValueType; |
| 4801 static const CommandId kCmdId = kScissor; | 5249 static const CommandId kCmdId = kScissor; |
| 4802 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 5250 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 4803 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 5251 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 4804 | 5252 |
| 4805 static uint32_t ComputeSize() { | 5253 static uint32_t ComputeSize() { |
| 4806 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 5254 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 4807 } | 5255 } |
| 4808 | 5256 |
| (...skipping 5671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10480 } | 10928 } |
| 10481 | 10929 |
| 10482 gpu::CommandHeader header; | 10930 gpu::CommandHeader header; |
| 10483 }; | 10931 }; |
| 10484 | 10932 |
| 10485 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); | 10933 COMPILE_ASSERT(sizeof(BlendBarrierKHR) == 4, Sizeof_BlendBarrierKHR_is_not_4); |
| 10486 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, | 10934 COMPILE_ASSERT(offsetof(BlendBarrierKHR, header) == 0, |
| 10487 OffsetOf_BlendBarrierKHR_header_not_0); | 10935 OffsetOf_BlendBarrierKHR_header_not_0); |
| 10488 | 10936 |
| 10489 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 10937 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
| OLD | NEW |