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 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 DoGetFramebufferAttachmentParameteriv(target, attachment, pname, params); | 1485 DoGetFramebufferAttachmentParameteriv(target, attachment, pname, params); |
1486 GLenum error = glGetError(); | 1486 GLenum error = glGetError(); |
1487 if (error == GL_NO_ERROR) { | 1487 if (error == GL_NO_ERROR) { |
1488 result->SetNumResults(num_values); | 1488 result->SetNumResults(num_values); |
1489 } else { | 1489 } else { |
1490 LOCAL_SET_GL_ERROR(error, "GetFramebufferAttachmentParameteriv", ""); | 1490 LOCAL_SET_GL_ERROR(error, "GetFramebufferAttachmentParameteriv", ""); |
1491 } | 1491 } |
1492 return error::kNoError; | 1492 return error::kNoError; |
1493 } | 1493 } |
1494 | 1494 |
| 1495 error::Error GLES2DecoderImpl::HandleGetInteger64v(uint32_t immediate_data_size, |
| 1496 const void* cmd_data) { |
| 1497 if (!unsafe_es3_apis_enabled()) |
| 1498 return error::kUnknownCommand; |
| 1499 const gles2::cmds::GetInteger64v& c = |
| 1500 *static_cast<const gles2::cmds::GetInteger64v*>(cmd_data); |
| 1501 (void)c; |
| 1502 GLenum pname = static_cast<GLenum>(c.pname); |
| 1503 typedef cmds::GetInteger64v::Result Result; |
| 1504 GLsizei num_values = 0; |
| 1505 GetNumValuesReturnedForGLGet(pname, &num_values); |
| 1506 Result* result = GetSharedMemoryAs<Result*>( |
| 1507 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); |
| 1508 GLint64* params = result ? result->GetData() : NULL; |
| 1509 if (params == NULL) { |
| 1510 return error::kOutOfBounds; |
| 1511 } |
| 1512 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64v"); |
| 1513 // Check that the client initialized the result. |
| 1514 if (result->size != 0) { |
| 1515 return error::kInvalidArguments; |
| 1516 } |
| 1517 DoGetInteger64v(pname, params); |
| 1518 GLenum error = glGetError(); |
| 1519 if (error == GL_NO_ERROR) { |
| 1520 result->SetNumResults(num_values); |
| 1521 } else { |
| 1522 LOCAL_SET_GL_ERROR(error, "GetInteger64v", ""); |
| 1523 } |
| 1524 return error::kNoError; |
| 1525 } |
| 1526 |
| 1527 error::Error GLES2DecoderImpl::HandleGetIntegeri_v(uint32_t immediate_data_size, |
| 1528 const void* cmd_data) { |
| 1529 if (!unsafe_es3_apis_enabled()) |
| 1530 return error::kUnknownCommand; |
| 1531 const gles2::cmds::GetIntegeri_v& c = |
| 1532 *static_cast<const gles2::cmds::GetIntegeri_v*>(cmd_data); |
| 1533 (void)c; |
| 1534 GLenum pname = static_cast<GLenum>(c.pname); |
| 1535 GLuint index = static_cast<GLuint>(c.index); |
| 1536 typedef cmds::GetIntegeri_v::Result Result; |
| 1537 GLsizei num_values = 0; |
| 1538 GetNumValuesReturnedForGLGet(pname, &num_values); |
| 1539 Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, |
| 1540 Result::ComputeSize(num_values)); |
| 1541 GLint* data = result ? result->GetData() : NULL; |
| 1542 if (data == NULL) { |
| 1543 return error::kOutOfBounds; |
| 1544 } |
| 1545 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegeri_v"); |
| 1546 // Check that the client initialized the result. |
| 1547 if (result->size != 0) { |
| 1548 return error::kInvalidArguments; |
| 1549 } |
| 1550 glGetIntegeri_v(pname, index, data); |
| 1551 GLenum error = glGetError(); |
| 1552 if (error == GL_NO_ERROR) { |
| 1553 result->SetNumResults(num_values); |
| 1554 } else { |
| 1555 LOCAL_SET_GL_ERROR(error, "GetIntegeri_v", ""); |
| 1556 } |
| 1557 return error::kNoError; |
| 1558 } |
| 1559 |
| 1560 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( |
| 1561 uint32_t immediate_data_size, |
| 1562 const void* cmd_data) { |
| 1563 if (!unsafe_es3_apis_enabled()) |
| 1564 return error::kUnknownCommand; |
| 1565 const gles2::cmds::GetInteger64i_v& c = |
| 1566 *static_cast<const gles2::cmds::GetInteger64i_v*>(cmd_data); |
| 1567 (void)c; |
| 1568 GLenum pname = static_cast<GLenum>(c.pname); |
| 1569 GLuint index = static_cast<GLuint>(c.index); |
| 1570 typedef cmds::GetInteger64i_v::Result Result; |
| 1571 GLsizei num_values = 0; |
| 1572 GetNumValuesReturnedForGLGet(pname, &num_values); |
| 1573 Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, |
| 1574 Result::ComputeSize(num_values)); |
| 1575 GLint64* data = result ? result->GetData() : NULL; |
| 1576 if (data == NULL) { |
| 1577 return error::kOutOfBounds; |
| 1578 } |
| 1579 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64i_v"); |
| 1580 // Check that the client initialized the result. |
| 1581 if (result->size != 0) { |
| 1582 return error::kInvalidArguments; |
| 1583 } |
| 1584 glGetInteger64i_v(pname, index, data); |
| 1585 GLenum error = glGetError(); |
| 1586 if (error == GL_NO_ERROR) { |
| 1587 result->SetNumResults(num_values); |
| 1588 } else { |
| 1589 LOCAL_SET_GL_ERROR(error, "GetInteger64i_v", ""); |
| 1590 } |
| 1591 return error::kNoError; |
| 1592 } |
| 1593 |
1495 error::Error GLES2DecoderImpl::HandleGetIntegerv(uint32_t immediate_data_size, | 1594 error::Error GLES2DecoderImpl::HandleGetIntegerv(uint32_t immediate_data_size, |
1496 const void* cmd_data) { | 1595 const void* cmd_data) { |
1497 const gles2::cmds::GetIntegerv& c = | 1596 const gles2::cmds::GetIntegerv& c = |
1498 *static_cast<const gles2::cmds::GetIntegerv*>(cmd_data); | 1597 *static_cast<const gles2::cmds::GetIntegerv*>(cmd_data); |
1499 (void)c; | 1598 (void)c; |
1500 GLenum pname = static_cast<GLenum>(c.pname); | 1599 GLenum pname = static_cast<GLenum>(c.pname); |
1501 typedef cmds::GetIntegerv::Result Result; | 1600 typedef cmds::GetIntegerv::Result Result; |
1502 GLsizei num_values = 0; | 1601 GLsizei num_values = 0; |
1503 GetNumValuesReturnedForGLGet(pname, &num_values); | 1602 GetNumValuesReturnedForGLGet(pname, &num_values); |
1504 Result* result = GetSharedMemoryAs<Result*>( | 1603 Result* result = GetSharedMemoryAs<Result*>( |
(...skipping 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4872 } | 4971 } |
4873 return false; | 4972 return false; |
4874 case GL_RASTERIZER_DISCARD: | 4973 case GL_RASTERIZER_DISCARD: |
4875 state_.enable_flags.rasterizer_discard = enabled; | 4974 state_.enable_flags.rasterizer_discard = enabled; |
4876 if (state_.enable_flags.cached_rasterizer_discard != enabled || | 4975 if (state_.enable_flags.cached_rasterizer_discard != enabled || |
4877 state_.ignore_cached_state) { | 4976 state_.ignore_cached_state) { |
4878 state_.enable_flags.cached_rasterizer_discard = enabled; | 4977 state_.enable_flags.cached_rasterizer_discard = enabled; |
4879 return true; | 4978 return true; |
4880 } | 4979 } |
4881 return false; | 4980 return false; |
| 4981 case GL_PRIMITIVE_RESTART_FIXED_INDEX: |
| 4982 state_.enable_flags.primitive_restart_fixed_index = enabled; |
| 4983 if (state_.enable_flags.cached_primitive_restart_fixed_index != enabled || |
| 4984 state_.ignore_cached_state) { |
| 4985 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; |
| 4986 return true; |
| 4987 } |
| 4988 return false; |
4882 default: | 4989 default: |
4883 NOTREACHED(); | 4990 NOTREACHED(); |
4884 return false; | 4991 return false; |
4885 } | 4992 } |
4886 } | 4993 } |
4887 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 4994 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |