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 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 } | 1374 } |
1375 if (params == NULL) { | 1375 if (params == NULL) { |
1376 return error::kOutOfBounds; | 1376 return error::kOutOfBounds; |
1377 } | 1377 } |
1378 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetBooleanv"); | 1378 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetBooleanv"); |
1379 // Check that the client initialized the result. | 1379 // Check that the client initialized the result. |
1380 if (result->size != 0) { | 1380 if (result->size != 0) { |
1381 return error::kInvalidArguments; | 1381 return error::kInvalidArguments; |
1382 } | 1382 } |
1383 DoGetBooleanv(pname, params); | 1383 DoGetBooleanv(pname, params); |
1384 GLenum error = glGetError(); | 1384 GLenum error = LOCAL_PEEK_GL_ERROR("GetBooleanv"); |
1385 if (error == GL_NO_ERROR) { | 1385 if (error == GL_NO_ERROR) { |
1386 result->SetNumResults(num_values); | 1386 result->SetNumResults(num_values); |
1387 } else { | |
1388 LOCAL_SET_GL_ERROR(error, "GetBooleanv", ""); | |
1389 } | 1387 } |
1390 return error::kNoError; | 1388 return error::kNoError; |
1391 } | 1389 } |
1392 | 1390 |
1393 error::Error GLES2DecoderImpl::HandleGetBufferParameteriv( | 1391 error::Error GLES2DecoderImpl::HandleGetBufferParameteriv( |
1394 uint32_t immediate_data_size, | 1392 uint32_t immediate_data_size, |
1395 const void* cmd_data) { | 1393 const void* cmd_data) { |
1396 const gles2::cmds::GetBufferParameteriv& c = | 1394 const gles2::cmds::GetBufferParameteriv& c = |
1397 *static_cast<const gles2::cmds::GetBufferParameteriv*>(cmd_data); | 1395 *static_cast<const gles2::cmds::GetBufferParameteriv*>(cmd_data); |
1398 (void)c; | 1396 (void)c; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 } | 1454 } |
1457 if (params == NULL) { | 1455 if (params == NULL) { |
1458 return error::kOutOfBounds; | 1456 return error::kOutOfBounds; |
1459 } | 1457 } |
1460 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFloatv"); | 1458 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFloatv"); |
1461 // Check that the client initialized the result. | 1459 // Check that the client initialized the result. |
1462 if (result->size != 0) { | 1460 if (result->size != 0) { |
1463 return error::kInvalidArguments; | 1461 return error::kInvalidArguments; |
1464 } | 1462 } |
1465 DoGetFloatv(pname, params); | 1463 DoGetFloatv(pname, params); |
1466 GLenum error = glGetError(); | 1464 GLenum error = LOCAL_PEEK_GL_ERROR("GetFloatv"); |
1467 if (error == GL_NO_ERROR) { | 1465 if (error == GL_NO_ERROR) { |
1468 result->SetNumResults(num_values); | 1466 result->SetNumResults(num_values); |
1469 } else { | |
1470 LOCAL_SET_GL_ERROR(error, "GetFloatv", ""); | |
1471 } | 1467 } |
1472 return error::kNoError; | 1468 return error::kNoError; |
1473 } | 1469 } |
1474 | 1470 |
1475 error::Error GLES2DecoderImpl::HandleGetFramebufferAttachmentParameteriv( | 1471 error::Error GLES2DecoderImpl::HandleGetFramebufferAttachmentParameteriv( |
1476 uint32_t immediate_data_size, | 1472 uint32_t immediate_data_size, |
1477 const void* cmd_data) { | 1473 const void* cmd_data) { |
1478 const gles2::cmds::GetFramebufferAttachmentParameteriv& c = | 1474 const gles2::cmds::GetFramebufferAttachmentParameteriv& c = |
1479 *static_cast<const gles2::cmds::GetFramebufferAttachmentParameteriv*>( | 1475 *static_cast<const gles2::cmds::GetFramebufferAttachmentParameteriv*>( |
1480 cmd_data); | 1476 cmd_data); |
(...skipping 24 matching lines...) Expand all Loading... |
1505 } | 1501 } |
1506 if (params == NULL) { | 1502 if (params == NULL) { |
1507 return error::kOutOfBounds; | 1503 return error::kOutOfBounds; |
1508 } | 1504 } |
1509 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFramebufferAttachmentParameteriv"); | 1505 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetFramebufferAttachmentParameteriv"); |
1510 // Check that the client initialized the result. | 1506 // Check that the client initialized the result. |
1511 if (result->size != 0) { | 1507 if (result->size != 0) { |
1512 return error::kInvalidArguments; | 1508 return error::kInvalidArguments; |
1513 } | 1509 } |
1514 DoGetFramebufferAttachmentParameteriv(target, attachment, pname, params); | 1510 DoGetFramebufferAttachmentParameteriv(target, attachment, pname, params); |
1515 GLenum error = glGetError(); | 1511 GLenum error = LOCAL_PEEK_GL_ERROR("GetFramebufferAttachmentParameteriv"); |
1516 if (error == GL_NO_ERROR) { | 1512 if (error == GL_NO_ERROR) { |
1517 result->SetNumResults(num_values); | 1513 result->SetNumResults(num_values); |
1518 } else { | |
1519 LOCAL_SET_GL_ERROR(error, "GetFramebufferAttachmentParameteriv", ""); | |
1520 } | 1514 } |
1521 return error::kNoError; | 1515 return error::kNoError; |
1522 } | 1516 } |
1523 | 1517 |
1524 error::Error GLES2DecoderImpl::HandleGetInteger64v(uint32_t immediate_data_size, | 1518 error::Error GLES2DecoderImpl::HandleGetInteger64v(uint32_t immediate_data_size, |
1525 const void* cmd_data) { | 1519 const void* cmd_data) { |
1526 if (!unsafe_es3_apis_enabled()) | 1520 if (!unsafe_es3_apis_enabled()) |
1527 return error::kUnknownCommand; | 1521 return error::kUnknownCommand; |
1528 const gles2::cmds::GetInteger64v& c = | 1522 const gles2::cmds::GetInteger64v& c = |
1529 *static_cast<const gles2::cmds::GetInteger64v*>(cmd_data); | 1523 *static_cast<const gles2::cmds::GetInteger64v*>(cmd_data); |
1530 (void)c; | 1524 (void)c; |
1531 GLenum pname = static_cast<GLenum>(c.pname); | 1525 GLenum pname = static_cast<GLenum>(c.pname); |
1532 typedef cmds::GetInteger64v::Result Result; | 1526 typedef cmds::GetInteger64v::Result Result; |
1533 GLsizei num_values = 0; | 1527 GLsizei num_values = 0; |
1534 GetNumValuesReturnedForGLGet(pname, &num_values); | 1528 GetNumValuesReturnedForGLGet(pname, &num_values); |
1535 Result* result = GetSharedMemoryAs<Result*>( | 1529 Result* result = GetSharedMemoryAs<Result*>( |
1536 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); | 1530 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); |
1537 GLint64* params = result ? result->GetData() : NULL; | 1531 GLint64* params = result ? result->GetData() : NULL; |
1538 if (params == NULL) { | 1532 if (params == NULL) { |
1539 return error::kOutOfBounds; | 1533 return error::kOutOfBounds; |
1540 } | 1534 } |
1541 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64v"); | 1535 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64v"); |
1542 // Check that the client initialized the result. | 1536 // Check that the client initialized the result. |
1543 if (result->size != 0) { | 1537 if (result->size != 0) { |
1544 return error::kInvalidArguments; | 1538 return error::kInvalidArguments; |
1545 } | 1539 } |
1546 DoGetInteger64v(pname, params); | 1540 DoGetInteger64v(pname, params); |
1547 GLenum error = glGetError(); | 1541 GLenum error = LOCAL_PEEK_GL_ERROR("GetInteger64v"); |
1548 if (error == GL_NO_ERROR) { | 1542 if (error == GL_NO_ERROR) { |
1549 result->SetNumResults(num_values); | 1543 result->SetNumResults(num_values); |
1550 } else { | |
1551 LOCAL_SET_GL_ERROR(error, "GetInteger64v", ""); | |
1552 } | 1544 } |
1553 return error::kNoError; | 1545 return error::kNoError; |
1554 } | 1546 } |
1555 | 1547 |
1556 error::Error GLES2DecoderImpl::HandleGetIntegeri_v(uint32_t immediate_data_size, | 1548 error::Error GLES2DecoderImpl::HandleGetIntegeri_v(uint32_t immediate_data_size, |
1557 const void* cmd_data) { | 1549 const void* cmd_data) { |
1558 if (!unsafe_es3_apis_enabled()) | 1550 if (!unsafe_es3_apis_enabled()) |
1559 return error::kUnknownCommand; | 1551 return error::kUnknownCommand; |
1560 const gles2::cmds::GetIntegeri_v& c = | 1552 const gles2::cmds::GetIntegeri_v& c = |
1561 *static_cast<const gles2::cmds::GetIntegeri_v*>(cmd_data); | 1553 *static_cast<const gles2::cmds::GetIntegeri_v*>(cmd_data); |
1562 (void)c; | 1554 (void)c; |
1563 GLenum pname = static_cast<GLenum>(c.pname); | 1555 GLenum pname = static_cast<GLenum>(c.pname); |
1564 GLuint index = static_cast<GLuint>(c.index); | 1556 GLuint index = static_cast<GLuint>(c.index); |
1565 typedef cmds::GetIntegeri_v::Result Result; | 1557 typedef cmds::GetIntegeri_v::Result Result; |
1566 GLsizei num_values = 0; | 1558 GLsizei num_values = 0; |
1567 GetNumValuesReturnedForGLGet(pname, &num_values); | 1559 GetNumValuesReturnedForGLGet(pname, &num_values); |
1568 Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, | 1560 Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, |
1569 Result::ComputeSize(num_values)); | 1561 Result::ComputeSize(num_values)); |
1570 GLint* data = result ? result->GetData() : NULL; | 1562 GLint* data = result ? result->GetData() : NULL; |
1571 if (data == NULL) { | 1563 if (data == NULL) { |
1572 return error::kOutOfBounds; | 1564 return error::kOutOfBounds; |
1573 } | 1565 } |
1574 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegeri_v"); | 1566 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegeri_v"); |
1575 // Check that the client initialized the result. | 1567 // Check that the client initialized the result. |
1576 if (result->size != 0) { | 1568 if (result->size != 0) { |
1577 return error::kInvalidArguments; | 1569 return error::kInvalidArguments; |
1578 } | 1570 } |
1579 glGetIntegeri_v(pname, index, data); | 1571 glGetIntegeri_v(pname, index, data); |
1580 GLenum error = glGetError(); | 1572 GLenum error = LOCAL_PEEK_GL_ERROR("GetIntegeri_v"); |
1581 if (error == GL_NO_ERROR) { | 1573 if (error == GL_NO_ERROR) { |
1582 result->SetNumResults(num_values); | 1574 result->SetNumResults(num_values); |
1583 } else { | |
1584 LOCAL_SET_GL_ERROR(error, "GetIntegeri_v", ""); | |
1585 } | 1575 } |
1586 return error::kNoError; | 1576 return error::kNoError; |
1587 } | 1577 } |
1588 | 1578 |
1589 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( | 1579 error::Error GLES2DecoderImpl::HandleGetInteger64i_v( |
1590 uint32_t immediate_data_size, | 1580 uint32_t immediate_data_size, |
1591 const void* cmd_data) { | 1581 const void* cmd_data) { |
1592 if (!unsafe_es3_apis_enabled()) | 1582 if (!unsafe_es3_apis_enabled()) |
1593 return error::kUnknownCommand; | 1583 return error::kUnknownCommand; |
1594 const gles2::cmds::GetInteger64i_v& c = | 1584 const gles2::cmds::GetInteger64i_v& c = |
1595 *static_cast<const gles2::cmds::GetInteger64i_v*>(cmd_data); | 1585 *static_cast<const gles2::cmds::GetInteger64i_v*>(cmd_data); |
1596 (void)c; | 1586 (void)c; |
1597 GLenum pname = static_cast<GLenum>(c.pname); | 1587 GLenum pname = static_cast<GLenum>(c.pname); |
1598 GLuint index = static_cast<GLuint>(c.index); | 1588 GLuint index = static_cast<GLuint>(c.index); |
1599 typedef cmds::GetInteger64i_v::Result Result; | 1589 typedef cmds::GetInteger64i_v::Result Result; |
1600 GLsizei num_values = 0; | 1590 GLsizei num_values = 0; |
1601 GetNumValuesReturnedForGLGet(pname, &num_values); | 1591 GetNumValuesReturnedForGLGet(pname, &num_values); |
1602 Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, | 1592 Result* result = GetSharedMemoryAs<Result*>(c.data_shm_id, c.data_shm_offset, |
1603 Result::ComputeSize(num_values)); | 1593 Result::ComputeSize(num_values)); |
1604 GLint64* data = result ? result->GetData() : NULL; | 1594 GLint64* data = result ? result->GetData() : NULL; |
1605 if (data == NULL) { | 1595 if (data == NULL) { |
1606 return error::kOutOfBounds; | 1596 return error::kOutOfBounds; |
1607 } | 1597 } |
1608 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64i_v"); | 1598 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInteger64i_v"); |
1609 // Check that the client initialized the result. | 1599 // Check that the client initialized the result. |
1610 if (result->size != 0) { | 1600 if (result->size != 0) { |
1611 return error::kInvalidArguments; | 1601 return error::kInvalidArguments; |
1612 } | 1602 } |
1613 glGetInteger64i_v(pname, index, data); | 1603 glGetInteger64i_v(pname, index, data); |
1614 GLenum error = glGetError(); | 1604 GLenum error = LOCAL_PEEK_GL_ERROR("GetInteger64i_v"); |
1615 if (error == GL_NO_ERROR) { | 1605 if (error == GL_NO_ERROR) { |
1616 result->SetNumResults(num_values); | 1606 result->SetNumResults(num_values); |
1617 } else { | |
1618 LOCAL_SET_GL_ERROR(error, "GetInteger64i_v", ""); | |
1619 } | 1607 } |
1620 return error::kNoError; | 1608 return error::kNoError; |
1621 } | 1609 } |
1622 | 1610 |
1623 error::Error GLES2DecoderImpl::HandleGetIntegerv(uint32_t immediate_data_size, | 1611 error::Error GLES2DecoderImpl::HandleGetIntegerv(uint32_t immediate_data_size, |
1624 const void* cmd_data) { | 1612 const void* cmd_data) { |
1625 const gles2::cmds::GetIntegerv& c = | 1613 const gles2::cmds::GetIntegerv& c = |
1626 *static_cast<const gles2::cmds::GetIntegerv*>(cmd_data); | 1614 *static_cast<const gles2::cmds::GetIntegerv*>(cmd_data); |
1627 (void)c; | 1615 (void)c; |
1628 GLenum pname = static_cast<GLenum>(c.pname); | 1616 GLenum pname = static_cast<GLenum>(c.pname); |
1629 typedef cmds::GetIntegerv::Result Result; | 1617 typedef cmds::GetIntegerv::Result Result; |
1630 GLsizei num_values = 0; | 1618 GLsizei num_values = 0; |
1631 GetNumValuesReturnedForGLGet(pname, &num_values); | 1619 GetNumValuesReturnedForGLGet(pname, &num_values); |
1632 Result* result = GetSharedMemoryAs<Result*>( | 1620 Result* result = GetSharedMemoryAs<Result*>( |
1633 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); | 1621 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); |
1634 GLint* params = result ? result->GetData() : NULL; | 1622 GLint* params = result ? result->GetData() : NULL; |
1635 if (!validators_->g_l_state.IsValid(pname)) { | 1623 if (!validators_->g_l_state.IsValid(pname)) { |
1636 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetIntegerv", pname, "pname"); | 1624 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetIntegerv", pname, "pname"); |
1637 return error::kNoError; | 1625 return error::kNoError; |
1638 } | 1626 } |
1639 if (params == NULL) { | 1627 if (params == NULL) { |
1640 return error::kOutOfBounds; | 1628 return error::kOutOfBounds; |
1641 } | 1629 } |
1642 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegerv"); | 1630 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetIntegerv"); |
1643 // Check that the client initialized the result. | 1631 // Check that the client initialized the result. |
1644 if (result->size != 0) { | 1632 if (result->size != 0) { |
1645 return error::kInvalidArguments; | 1633 return error::kInvalidArguments; |
1646 } | 1634 } |
1647 DoGetIntegerv(pname, params); | 1635 DoGetIntegerv(pname, params); |
1648 GLenum error = glGetError(); | 1636 GLenum error = LOCAL_PEEK_GL_ERROR("GetIntegerv"); |
1649 if (error == GL_NO_ERROR) { | 1637 if (error == GL_NO_ERROR) { |
1650 result->SetNumResults(num_values); | 1638 result->SetNumResults(num_values); |
1651 } else { | |
1652 LOCAL_SET_GL_ERROR(error, "GetIntegerv", ""); | |
1653 } | 1639 } |
1654 return error::kNoError; | 1640 return error::kNoError; |
1655 } | 1641 } |
1656 | |
1657 error::Error GLES2DecoderImpl::HandleGetInternalformativ( | |
1658 uint32_t immediate_data_size, | |
1659 const void* cmd_data) { | |
1660 if (!unsafe_es3_apis_enabled()) | |
1661 return error::kUnknownCommand; | |
1662 const gles2::cmds::GetInternalformativ& c = | |
1663 *static_cast<const gles2::cmds::GetInternalformativ*>(cmd_data); | |
1664 (void)c; | |
1665 GLenum target = static_cast<GLenum>(c.target); | |
1666 GLenum format = static_cast<GLenum>(c.format); | |
1667 GLenum pname = static_cast<GLenum>(c.pname); | |
1668 GLsizei bufSize = static_cast<GLsizei>(c.bufSize); | |
1669 typedef cmds::GetInternalformativ::Result Result; | |
1670 GLsizei num_values = 0; | |
1671 GetNumValuesReturnedForGLGet(pname, &num_values); | |
1672 Result* result = GetSharedMemoryAs<Result*>( | |
1673 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); | |
1674 GLint* params = result ? result->GetData() : NULL; | |
1675 if (params == NULL) { | |
1676 return error::kOutOfBounds; | |
1677 } | |
1678 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetInternalformativ"); | |
1679 // Check that the client initialized the result. | |
1680 if (result->size != 0) { | |
1681 return error::kInvalidArguments; | |
1682 } | |
1683 glGetInternalformativ(target, format, pname, bufSize, params); | |
1684 GLenum error = glGetError(); | |
1685 if (error == GL_NO_ERROR) { | |
1686 result->SetNumResults(num_values); | |
1687 } else { | |
1688 LOCAL_SET_GL_ERROR(error, "GetInternalformativ", ""); | |
1689 } | |
1690 return error::kNoError; | |
1691 } | |
1692 | 1642 |
1693 error::Error GLES2DecoderImpl::HandleGetProgramiv(uint32_t immediate_data_size, | 1643 error::Error GLES2DecoderImpl::HandleGetProgramiv(uint32_t immediate_data_size, |
1694 const void* cmd_data) { | 1644 const void* cmd_data) { |
1695 const gles2::cmds::GetProgramiv& c = | 1645 const gles2::cmds::GetProgramiv& c = |
1696 *static_cast<const gles2::cmds::GetProgramiv*>(cmd_data); | 1646 *static_cast<const gles2::cmds::GetProgramiv*>(cmd_data); |
1697 (void)c; | 1647 (void)c; |
1698 GLuint program = c.program; | 1648 GLuint program = c.program; |
1699 GLenum pname = static_cast<GLenum>(c.pname); | 1649 GLenum pname = static_cast<GLenum>(c.pname); |
1700 typedef cmds::GetProgramiv::Result Result; | 1650 typedef cmds::GetProgramiv::Result Result; |
1701 GLsizei num_values = 0; | 1651 GLsizei num_values = 0; |
1702 GetNumValuesReturnedForGLGet(pname, &num_values); | 1652 GetNumValuesReturnedForGLGet(pname, &num_values); |
1703 Result* result = GetSharedMemoryAs<Result*>( | 1653 Result* result = GetSharedMemoryAs<Result*>( |
1704 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); | 1654 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); |
1705 GLint* params = result ? result->GetData() : NULL; | 1655 GLint* params = result ? result->GetData() : NULL; |
1706 if (!validators_->program_parameter.IsValid(pname)) { | 1656 if (!validators_->program_parameter.IsValid(pname)) { |
1707 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetProgramiv", pname, "pname"); | 1657 LOCAL_SET_GL_ERROR_INVALID_ENUM("glGetProgramiv", pname, "pname"); |
1708 return error::kNoError; | 1658 return error::kNoError; |
1709 } | 1659 } |
1710 if (params == NULL) { | 1660 if (params == NULL) { |
1711 return error::kOutOfBounds; | 1661 return error::kOutOfBounds; |
1712 } | 1662 } |
1713 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetProgramiv"); | 1663 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetProgramiv"); |
1714 // Check that the client initialized the result. | 1664 // Check that the client initialized the result. |
1715 if (result->size != 0) { | 1665 if (result->size != 0) { |
1716 return error::kInvalidArguments; | 1666 return error::kInvalidArguments; |
1717 } | 1667 } |
1718 DoGetProgramiv(program, pname, params); | 1668 DoGetProgramiv(program, pname, params); |
1719 GLenum error = glGetError(); | 1669 GLenum error = LOCAL_PEEK_GL_ERROR("GetProgramiv"); |
1720 if (error == GL_NO_ERROR) { | 1670 if (error == GL_NO_ERROR) { |
1721 result->SetNumResults(num_values); | 1671 result->SetNumResults(num_values); |
1722 } else { | |
1723 LOCAL_SET_GL_ERROR(error, "GetProgramiv", ""); | |
1724 } | 1672 } |
1725 return error::kNoError; | 1673 return error::kNoError; |
1726 } | 1674 } |
1727 | 1675 |
1728 error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv( | 1676 error::Error GLES2DecoderImpl::HandleGetRenderbufferParameteriv( |
1729 uint32_t immediate_data_size, | 1677 uint32_t immediate_data_size, |
1730 const void* cmd_data) { | 1678 const void* cmd_data) { |
1731 const gles2::cmds::GetRenderbufferParameteriv& c = | 1679 const gles2::cmds::GetRenderbufferParameteriv& c = |
1732 *static_cast<const gles2::cmds::GetRenderbufferParameteriv*>(cmd_data); | 1680 *static_cast<const gles2::cmds::GetRenderbufferParameteriv*>(cmd_data); |
1733 (void)c; | 1681 (void)c; |
(...skipping 17 matching lines...) Expand all Loading... |
1751 } | 1699 } |
1752 if (params == NULL) { | 1700 if (params == NULL) { |
1753 return error::kOutOfBounds; | 1701 return error::kOutOfBounds; |
1754 } | 1702 } |
1755 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetRenderbufferParameteriv"); | 1703 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetRenderbufferParameteriv"); |
1756 // Check that the client initialized the result. | 1704 // Check that the client initialized the result. |
1757 if (result->size != 0) { | 1705 if (result->size != 0) { |
1758 return error::kInvalidArguments; | 1706 return error::kInvalidArguments; |
1759 } | 1707 } |
1760 DoGetRenderbufferParameteriv(target, pname, params); | 1708 DoGetRenderbufferParameteriv(target, pname, params); |
1761 GLenum error = glGetError(); | 1709 GLenum error = LOCAL_PEEK_GL_ERROR("GetRenderbufferParameteriv"); |
1762 if (error == GL_NO_ERROR) { | 1710 if (error == GL_NO_ERROR) { |
1763 result->SetNumResults(num_values); | 1711 result->SetNumResults(num_values); |
1764 } else { | |
1765 LOCAL_SET_GL_ERROR(error, "GetRenderbufferParameteriv", ""); | |
1766 } | 1712 } |
1767 return error::kNoError; | 1713 return error::kNoError; |
1768 } | 1714 } |
1769 | 1715 |
1770 error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv( | 1716 error::Error GLES2DecoderImpl::HandleGetSamplerParameterfv( |
1771 uint32_t immediate_data_size, | 1717 uint32_t immediate_data_size, |
1772 const void* cmd_data) { | 1718 const void* cmd_data) { |
1773 if (!unsafe_es3_apis_enabled()) | 1719 if (!unsafe_es3_apis_enabled()) |
1774 return error::kUnknownCommand; | 1720 return error::kUnknownCommand; |
1775 const gles2::cmds::GetSamplerParameterfv& c = | 1721 const gles2::cmds::GetSamplerParameterfv& c = |
(...skipping 14 matching lines...) Expand all Loading... |
1790 // Check that the client initialized the result. | 1736 // Check that the client initialized the result. |
1791 if (result->size != 0) { | 1737 if (result->size != 0) { |
1792 return error::kInvalidArguments; | 1738 return error::kInvalidArguments; |
1793 } | 1739 } |
1794 if (!group_->GetSamplerServiceId(sampler, &sampler)) { | 1740 if (!group_->GetSamplerServiceId(sampler, &sampler)) { |
1795 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSamplerParameterfv", | 1741 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSamplerParameterfv", |
1796 "invalid sampler id"); | 1742 "invalid sampler id"); |
1797 return error::kNoError; | 1743 return error::kNoError; |
1798 } | 1744 } |
1799 glGetSamplerParameterfv(sampler, pname, params); | 1745 glGetSamplerParameterfv(sampler, pname, params); |
1800 GLenum error = glGetError(); | 1746 GLenum error = LOCAL_PEEK_GL_ERROR("GetSamplerParameterfv"); |
1801 if (error == GL_NO_ERROR) { | 1747 if (error == GL_NO_ERROR) { |
1802 result->SetNumResults(num_values); | 1748 result->SetNumResults(num_values); |
1803 } else { | |
1804 LOCAL_SET_GL_ERROR(error, "GetSamplerParameterfv", ""); | |
1805 } | 1749 } |
1806 return error::kNoError; | 1750 return error::kNoError; |
1807 } | 1751 } |
1808 | 1752 |
1809 error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv( | 1753 error::Error GLES2DecoderImpl::HandleGetSamplerParameteriv( |
1810 uint32_t immediate_data_size, | 1754 uint32_t immediate_data_size, |
1811 const void* cmd_data) { | 1755 const void* cmd_data) { |
1812 if (!unsafe_es3_apis_enabled()) | 1756 if (!unsafe_es3_apis_enabled()) |
1813 return error::kUnknownCommand; | 1757 return error::kUnknownCommand; |
1814 const gles2::cmds::GetSamplerParameteriv& c = | 1758 const gles2::cmds::GetSamplerParameteriv& c = |
(...skipping 14 matching lines...) Expand all Loading... |
1829 // Check that the client initialized the result. | 1773 // Check that the client initialized the result. |
1830 if (result->size != 0) { | 1774 if (result->size != 0) { |
1831 return error::kInvalidArguments; | 1775 return error::kInvalidArguments; |
1832 } | 1776 } |
1833 if (!group_->GetSamplerServiceId(sampler, &sampler)) { | 1777 if (!group_->GetSamplerServiceId(sampler, &sampler)) { |
1834 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSamplerParameteriv", | 1778 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSamplerParameteriv", |
1835 "invalid sampler id"); | 1779 "invalid sampler id"); |
1836 return error::kNoError; | 1780 return error::kNoError; |
1837 } | 1781 } |
1838 glGetSamplerParameteriv(sampler, pname, params); | 1782 glGetSamplerParameteriv(sampler, pname, params); |
1839 GLenum error = glGetError(); | 1783 GLenum error = LOCAL_PEEK_GL_ERROR("GetSamplerParameteriv"); |
1840 if (error == GL_NO_ERROR) { | 1784 if (error == GL_NO_ERROR) { |
1841 result->SetNumResults(num_values); | 1785 result->SetNumResults(num_values); |
1842 } else { | |
1843 LOCAL_SET_GL_ERROR(error, "GetSamplerParameteriv", ""); | |
1844 } | 1786 } |
1845 return error::kNoError; | 1787 return error::kNoError; |
1846 } | 1788 } |
1847 | 1789 |
1848 error::Error GLES2DecoderImpl::HandleGetShaderiv(uint32_t immediate_data_size, | 1790 error::Error GLES2DecoderImpl::HandleGetShaderiv(uint32_t immediate_data_size, |
1849 const void* cmd_data) { | 1791 const void* cmd_data) { |
1850 const gles2::cmds::GetShaderiv& c = | 1792 const gles2::cmds::GetShaderiv& c = |
1851 *static_cast<const gles2::cmds::GetShaderiv*>(cmd_data); | 1793 *static_cast<const gles2::cmds::GetShaderiv*>(cmd_data); |
1852 (void)c; | 1794 (void)c; |
1853 GLuint shader = c.shader; | 1795 GLuint shader = c.shader; |
(...skipping 10 matching lines...) Expand all Loading... |
1864 } | 1806 } |
1865 if (params == NULL) { | 1807 if (params == NULL) { |
1866 return error::kOutOfBounds; | 1808 return error::kOutOfBounds; |
1867 } | 1809 } |
1868 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetShaderiv"); | 1810 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetShaderiv"); |
1869 // Check that the client initialized the result. | 1811 // Check that the client initialized the result. |
1870 if (result->size != 0) { | 1812 if (result->size != 0) { |
1871 return error::kInvalidArguments; | 1813 return error::kInvalidArguments; |
1872 } | 1814 } |
1873 DoGetShaderiv(shader, pname, params); | 1815 DoGetShaderiv(shader, pname, params); |
1874 GLenum error = glGetError(); | 1816 GLenum error = LOCAL_PEEK_GL_ERROR("GetShaderiv"); |
1875 if (error == GL_NO_ERROR) { | 1817 if (error == GL_NO_ERROR) { |
1876 result->SetNumResults(num_values); | 1818 result->SetNumResults(num_values); |
1877 } else { | |
1878 LOCAL_SET_GL_ERROR(error, "GetShaderiv", ""); | |
1879 } | 1819 } |
1880 return error::kNoError; | 1820 return error::kNoError; |
1881 } | 1821 } |
1882 | 1822 |
1883 error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size, | 1823 error::Error GLES2DecoderImpl::HandleGetSynciv(uint32_t immediate_data_size, |
1884 const void* cmd_data) { | 1824 const void* cmd_data) { |
1885 if (!unsafe_es3_apis_enabled()) | 1825 if (!unsafe_es3_apis_enabled()) |
1886 return error::kUnknownCommand; | 1826 return error::kUnknownCommand; |
1887 const gles2::cmds::GetSynciv& c = | 1827 const gles2::cmds::GetSynciv& c = |
1888 *static_cast<const gles2::cmds::GetSynciv*>(cmd_data); | 1828 *static_cast<const gles2::cmds::GetSynciv*>(cmd_data); |
(...skipping 13 matching lines...) Expand all Loading... |
1902 // Check that the client initialized the result. | 1842 // Check that the client initialized the result. |
1903 if (result->size != 0) { | 1843 if (result->size != 0) { |
1904 return error::kInvalidArguments; | 1844 return error::kInvalidArguments; |
1905 } | 1845 } |
1906 GLsync service_sync = 0; | 1846 GLsync service_sync = 0; |
1907 if (!group_->GetSyncServiceId(sync, &service_sync)) { | 1847 if (!group_->GetSyncServiceId(sync, &service_sync)) { |
1908 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSynciv", "invalid sync id"); | 1848 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glGetSynciv", "invalid sync id"); |
1909 return error::kNoError; | 1849 return error::kNoError; |
1910 } | 1850 } |
1911 glGetSynciv(service_sync, pname, num_values, nullptr, values); | 1851 glGetSynciv(service_sync, pname, num_values, nullptr, values); |
1912 GLenum error = glGetError(); | 1852 GLenum error = LOCAL_PEEK_GL_ERROR("GetSynciv"); |
1913 if (error == GL_NO_ERROR) { | 1853 if (error == GL_NO_ERROR) { |
1914 result->SetNumResults(num_values); | 1854 result->SetNumResults(num_values); |
1915 } else { | |
1916 LOCAL_SET_GL_ERROR(error, "GetSynciv", ""); | |
1917 } | 1855 } |
1918 return error::kNoError; | 1856 return error::kNoError; |
1919 } | 1857 } |
1920 | 1858 |
1921 error::Error GLES2DecoderImpl::HandleGetTexParameterfv( | 1859 error::Error GLES2DecoderImpl::HandleGetTexParameterfv( |
1922 uint32_t immediate_data_size, | 1860 uint32_t immediate_data_size, |
1923 const void* cmd_data) { | 1861 const void* cmd_data) { |
1924 const gles2::cmds::GetTexParameterfv& c = | 1862 const gles2::cmds::GetTexParameterfv& c = |
1925 *static_cast<const gles2::cmds::GetTexParameterfv*>(cmd_data); | 1863 *static_cast<const gles2::cmds::GetTexParameterfv*>(cmd_data); |
1926 (void)c; | 1864 (void)c; |
(...skipping 15 matching lines...) Expand all Loading... |
1942 } | 1880 } |
1943 if (params == NULL) { | 1881 if (params == NULL) { |
1944 return error::kOutOfBounds; | 1882 return error::kOutOfBounds; |
1945 } | 1883 } |
1946 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetTexParameterfv"); | 1884 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetTexParameterfv"); |
1947 // Check that the client initialized the result. | 1885 // Check that the client initialized the result. |
1948 if (result->size != 0) { | 1886 if (result->size != 0) { |
1949 return error::kInvalidArguments; | 1887 return error::kInvalidArguments; |
1950 } | 1888 } |
1951 DoGetTexParameterfv(target, pname, params); | 1889 DoGetTexParameterfv(target, pname, params); |
1952 GLenum error = glGetError(); | 1890 GLenum error = LOCAL_PEEK_GL_ERROR("GetTexParameterfv"); |
1953 if (error == GL_NO_ERROR) { | 1891 if (error == GL_NO_ERROR) { |
1954 result->SetNumResults(num_values); | 1892 result->SetNumResults(num_values); |
1955 } else { | |
1956 LOCAL_SET_GL_ERROR(error, "GetTexParameterfv", ""); | |
1957 } | 1893 } |
1958 return error::kNoError; | 1894 return error::kNoError; |
1959 } | 1895 } |
1960 | 1896 |
1961 error::Error GLES2DecoderImpl::HandleGetTexParameteriv( | 1897 error::Error GLES2DecoderImpl::HandleGetTexParameteriv( |
1962 uint32_t immediate_data_size, | 1898 uint32_t immediate_data_size, |
1963 const void* cmd_data) { | 1899 const void* cmd_data) { |
1964 const gles2::cmds::GetTexParameteriv& c = | 1900 const gles2::cmds::GetTexParameteriv& c = |
1965 *static_cast<const gles2::cmds::GetTexParameteriv*>(cmd_data); | 1901 *static_cast<const gles2::cmds::GetTexParameteriv*>(cmd_data); |
1966 (void)c; | 1902 (void)c; |
(...skipping 15 matching lines...) Expand all Loading... |
1982 } | 1918 } |
1983 if (params == NULL) { | 1919 if (params == NULL) { |
1984 return error::kOutOfBounds; | 1920 return error::kOutOfBounds; |
1985 } | 1921 } |
1986 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetTexParameteriv"); | 1922 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetTexParameteriv"); |
1987 // Check that the client initialized the result. | 1923 // Check that the client initialized the result. |
1988 if (result->size != 0) { | 1924 if (result->size != 0) { |
1989 return error::kInvalidArguments; | 1925 return error::kInvalidArguments; |
1990 } | 1926 } |
1991 DoGetTexParameteriv(target, pname, params); | 1927 DoGetTexParameteriv(target, pname, params); |
1992 GLenum error = glGetError(); | 1928 GLenum error = LOCAL_PEEK_GL_ERROR("GetTexParameteriv"); |
1993 if (error == GL_NO_ERROR) { | 1929 if (error == GL_NO_ERROR) { |
1994 result->SetNumResults(num_values); | 1930 result->SetNumResults(num_values); |
1995 } else { | |
1996 LOCAL_SET_GL_ERROR(error, "GetTexParameteriv", ""); | |
1997 } | 1931 } |
1998 return error::kNoError; | 1932 return error::kNoError; |
1999 } | 1933 } |
2000 | 1934 |
2001 error::Error GLES2DecoderImpl::HandleGetVertexAttribfv( | 1935 error::Error GLES2DecoderImpl::HandleGetVertexAttribfv( |
2002 uint32_t immediate_data_size, | 1936 uint32_t immediate_data_size, |
2003 const void* cmd_data) { | 1937 const void* cmd_data) { |
2004 const gles2::cmds::GetVertexAttribfv& c = | 1938 const gles2::cmds::GetVertexAttribfv& c = |
2005 *static_cast<const gles2::cmds::GetVertexAttribfv*>(cmd_data); | 1939 *static_cast<const gles2::cmds::GetVertexAttribfv*>(cmd_data); |
2006 (void)c; | 1940 (void)c; |
(...skipping 11 matching lines...) Expand all Loading... |
2018 } | 1952 } |
2019 if (params == NULL) { | 1953 if (params == NULL) { |
2020 return error::kOutOfBounds; | 1954 return error::kOutOfBounds; |
2021 } | 1955 } |
2022 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribfv"); | 1956 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribfv"); |
2023 // Check that the client initialized the result. | 1957 // Check that the client initialized the result. |
2024 if (result->size != 0) { | 1958 if (result->size != 0) { |
2025 return error::kInvalidArguments; | 1959 return error::kInvalidArguments; |
2026 } | 1960 } |
2027 DoGetVertexAttribfv(index, pname, params); | 1961 DoGetVertexAttribfv(index, pname, params); |
2028 GLenum error = glGetError(); | 1962 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribfv"); |
2029 if (error == GL_NO_ERROR) { | 1963 if (error == GL_NO_ERROR) { |
2030 result->SetNumResults(num_values); | 1964 result->SetNumResults(num_values); |
2031 } else { | |
2032 LOCAL_SET_GL_ERROR(error, "GetVertexAttribfv", ""); | |
2033 } | 1965 } |
2034 return error::kNoError; | 1966 return error::kNoError; |
2035 } | 1967 } |
2036 | 1968 |
2037 error::Error GLES2DecoderImpl::HandleGetVertexAttribiv( | 1969 error::Error GLES2DecoderImpl::HandleGetVertexAttribiv( |
2038 uint32_t immediate_data_size, | 1970 uint32_t immediate_data_size, |
2039 const void* cmd_data) { | 1971 const void* cmd_data) { |
2040 const gles2::cmds::GetVertexAttribiv& c = | 1972 const gles2::cmds::GetVertexAttribiv& c = |
2041 *static_cast<const gles2::cmds::GetVertexAttribiv*>(cmd_data); | 1973 *static_cast<const gles2::cmds::GetVertexAttribiv*>(cmd_data); |
2042 (void)c; | 1974 (void)c; |
(...skipping 11 matching lines...) Expand all Loading... |
2054 } | 1986 } |
2055 if (params == NULL) { | 1987 if (params == NULL) { |
2056 return error::kOutOfBounds; | 1988 return error::kOutOfBounds; |
2057 } | 1989 } |
2058 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribiv"); | 1990 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribiv"); |
2059 // Check that the client initialized the result. | 1991 // Check that the client initialized the result. |
2060 if (result->size != 0) { | 1992 if (result->size != 0) { |
2061 return error::kInvalidArguments; | 1993 return error::kInvalidArguments; |
2062 } | 1994 } |
2063 DoGetVertexAttribiv(index, pname, params); | 1995 DoGetVertexAttribiv(index, pname, params); |
2064 GLenum error = glGetError(); | 1996 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribiv"); |
2065 if (error == GL_NO_ERROR) { | 1997 if (error == GL_NO_ERROR) { |
2066 result->SetNumResults(num_values); | 1998 result->SetNumResults(num_values); |
2067 } else { | |
2068 LOCAL_SET_GL_ERROR(error, "GetVertexAttribiv", ""); | |
2069 } | 1999 } |
2070 return error::kNoError; | 2000 return error::kNoError; |
2071 } | 2001 } |
2072 | 2002 |
2073 error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv( | 2003 error::Error GLES2DecoderImpl::HandleGetVertexAttribIiv( |
2074 uint32_t immediate_data_size, | 2004 uint32_t immediate_data_size, |
2075 const void* cmd_data) { | 2005 const void* cmd_data) { |
2076 if (!unsafe_es3_apis_enabled()) | 2006 if (!unsafe_es3_apis_enabled()) |
2077 return error::kUnknownCommand; | 2007 return error::kUnknownCommand; |
2078 const gles2::cmds::GetVertexAttribIiv& c = | 2008 const gles2::cmds::GetVertexAttribIiv& c = |
2079 *static_cast<const gles2::cmds::GetVertexAttribIiv*>(cmd_data); | 2009 *static_cast<const gles2::cmds::GetVertexAttribIiv*>(cmd_data); |
2080 (void)c; | 2010 (void)c; |
2081 GLuint index = static_cast<GLuint>(c.index); | 2011 GLuint index = static_cast<GLuint>(c.index); |
2082 GLenum pname = static_cast<GLenum>(c.pname); | 2012 GLenum pname = static_cast<GLenum>(c.pname); |
2083 typedef cmds::GetVertexAttribIiv::Result Result; | 2013 typedef cmds::GetVertexAttribIiv::Result Result; |
2084 GLsizei num_values = 0; | 2014 GLsizei num_values = 0; |
2085 GetNumValuesReturnedForGLGet(pname, &num_values); | 2015 GetNumValuesReturnedForGLGet(pname, &num_values); |
2086 Result* result = GetSharedMemoryAs<Result*>( | 2016 Result* result = GetSharedMemoryAs<Result*>( |
2087 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); | 2017 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); |
2088 GLint* params = result ? result->GetData() : NULL; | 2018 GLint* params = result ? result->GetData() : NULL; |
2089 if (params == NULL) { | 2019 if (params == NULL) { |
2090 return error::kOutOfBounds; | 2020 return error::kOutOfBounds; |
2091 } | 2021 } |
2092 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribIiv"); | 2022 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribIiv"); |
2093 // Check that the client initialized the result. | 2023 // Check that the client initialized the result. |
2094 if (result->size != 0) { | 2024 if (result->size != 0) { |
2095 return error::kInvalidArguments; | 2025 return error::kInvalidArguments; |
2096 } | 2026 } |
2097 DoGetVertexAttribIiv(index, pname, params); | 2027 DoGetVertexAttribIiv(index, pname, params); |
2098 GLenum error = glGetError(); | 2028 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribIiv"); |
2099 if (error == GL_NO_ERROR) { | 2029 if (error == GL_NO_ERROR) { |
2100 result->SetNumResults(num_values); | 2030 result->SetNumResults(num_values); |
2101 } else { | |
2102 LOCAL_SET_GL_ERROR(error, "GetVertexAttribIiv", ""); | |
2103 } | 2031 } |
2104 return error::kNoError; | 2032 return error::kNoError; |
2105 } | 2033 } |
2106 | 2034 |
2107 error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv( | 2035 error::Error GLES2DecoderImpl::HandleGetVertexAttribIuiv( |
2108 uint32_t immediate_data_size, | 2036 uint32_t immediate_data_size, |
2109 const void* cmd_data) { | 2037 const void* cmd_data) { |
2110 if (!unsafe_es3_apis_enabled()) | 2038 if (!unsafe_es3_apis_enabled()) |
2111 return error::kUnknownCommand; | 2039 return error::kUnknownCommand; |
2112 const gles2::cmds::GetVertexAttribIuiv& c = | 2040 const gles2::cmds::GetVertexAttribIuiv& c = |
2113 *static_cast<const gles2::cmds::GetVertexAttribIuiv*>(cmd_data); | 2041 *static_cast<const gles2::cmds::GetVertexAttribIuiv*>(cmd_data); |
2114 (void)c; | 2042 (void)c; |
2115 GLuint index = static_cast<GLuint>(c.index); | 2043 GLuint index = static_cast<GLuint>(c.index); |
2116 GLenum pname = static_cast<GLenum>(c.pname); | 2044 GLenum pname = static_cast<GLenum>(c.pname); |
2117 typedef cmds::GetVertexAttribIuiv::Result Result; | 2045 typedef cmds::GetVertexAttribIuiv::Result Result; |
2118 GLsizei num_values = 0; | 2046 GLsizei num_values = 0; |
2119 GetNumValuesReturnedForGLGet(pname, &num_values); | 2047 GetNumValuesReturnedForGLGet(pname, &num_values); |
2120 Result* result = GetSharedMemoryAs<Result*>( | 2048 Result* result = GetSharedMemoryAs<Result*>( |
2121 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); | 2049 c.params_shm_id, c.params_shm_offset, Result::ComputeSize(num_values)); |
2122 GLuint* params = result ? result->GetData() : NULL; | 2050 GLuint* params = result ? result->GetData() : NULL; |
2123 if (params == NULL) { | 2051 if (params == NULL) { |
2124 return error::kOutOfBounds; | 2052 return error::kOutOfBounds; |
2125 } | 2053 } |
2126 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribIuiv"); | 2054 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("GetVertexAttribIuiv"); |
2127 // Check that the client initialized the result. | 2055 // Check that the client initialized the result. |
2128 if (result->size != 0) { | 2056 if (result->size != 0) { |
2129 return error::kInvalidArguments; | 2057 return error::kInvalidArguments; |
2130 } | 2058 } |
2131 DoGetVertexAttribIuiv(index, pname, params); | 2059 DoGetVertexAttribIuiv(index, pname, params); |
2132 GLenum error = glGetError(); | 2060 GLenum error = LOCAL_PEEK_GL_ERROR("GetVertexAttribIuiv"); |
2133 if (error == GL_NO_ERROR) { | 2061 if (error == GL_NO_ERROR) { |
2134 result->SetNumResults(num_values); | 2062 result->SetNumResults(num_values); |
2135 } else { | |
2136 LOCAL_SET_GL_ERROR(error, "GetVertexAttribIuiv", ""); | |
2137 } | 2063 } |
2138 return error::kNoError; | 2064 return error::kNoError; |
2139 } | 2065 } |
2140 | 2066 |
2141 error::Error GLES2DecoderImpl::HandleHint(uint32_t immediate_data_size, | 2067 error::Error GLES2DecoderImpl::HandleHint(uint32_t immediate_data_size, |
2142 const void* cmd_data) { | 2068 const void* cmd_data) { |
2143 const gles2::cmds::Hint& c = *static_cast<const gles2::cmds::Hint*>(cmd_data); | 2069 const gles2::cmds::Hint& c = *static_cast<const gles2::cmds::Hint*>(cmd_data); |
2144 (void)c; | 2070 (void)c; |
2145 GLenum target = static_cast<GLenum>(c.target); | 2071 GLenum target = static_cast<GLenum>(c.target); |
2146 GLenum mode = static_cast<GLenum>(c.mode); | 2072 GLenum mode = static_cast<GLenum>(c.mode); |
(...skipping 2950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5097 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; | 5023 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; |
5098 return true; | 5024 return true; |
5099 } | 5025 } |
5100 return false; | 5026 return false; |
5101 default: | 5027 default: |
5102 NOTREACHED(); | 5028 NOTREACHED(); |
5103 return false; | 5029 return false; |
5104 } | 5030 } |
5105 } | 5031 } |
5106 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5032 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |