| 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 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 const GLint GLES2DecoderTestBase::kBadAttribIndex; | 1590 const GLint GLES2DecoderTestBase::kBadAttribIndex; |
| 1591 | 1591 |
| 1592 const GLint GLES2DecoderTestBase::kMaxUniformLength; | 1592 const GLint GLES2DecoderTestBase::kMaxUniformLength; |
| 1593 const GLint GLES2DecoderTestBase::kUniform1Size; | 1593 const GLint GLES2DecoderTestBase::kUniform1Size; |
| 1594 const GLint GLES2DecoderTestBase::kUniform2Size; | 1594 const GLint GLES2DecoderTestBase::kUniform2Size; |
| 1595 const GLint GLES2DecoderTestBase::kUniform3Size; | 1595 const GLint GLES2DecoderTestBase::kUniform3Size; |
| 1596 const GLint GLES2DecoderTestBase::kUniform4Size; | 1596 const GLint GLES2DecoderTestBase::kUniform4Size; |
| 1597 const GLint GLES2DecoderTestBase::kUniform5Size; | 1597 const GLint GLES2DecoderTestBase::kUniform5Size; |
| 1598 const GLint GLES2DecoderTestBase::kUniform6Size; | 1598 const GLint GLES2DecoderTestBase::kUniform6Size; |
| 1599 const GLint GLES2DecoderTestBase::kUniform7Size; | 1599 const GLint GLES2DecoderTestBase::kUniform7Size; |
| 1600 const GLint GLES2DecoderTestBase::kUniform8Size; |
| 1600 const GLint GLES2DecoderTestBase::kUniform1RealLocation; | 1601 const GLint GLES2DecoderTestBase::kUniform1RealLocation; |
| 1601 const GLint GLES2DecoderTestBase::kUniform2RealLocation; | 1602 const GLint GLES2DecoderTestBase::kUniform2RealLocation; |
| 1602 const GLint GLES2DecoderTestBase::kUniform2ElementRealLocation; | 1603 const GLint GLES2DecoderTestBase::kUniform2ElementRealLocation; |
| 1603 const GLint GLES2DecoderTestBase::kUniform3RealLocation; | 1604 const GLint GLES2DecoderTestBase::kUniform3RealLocation; |
| 1604 const GLint GLES2DecoderTestBase::kUniform4RealLocation; | 1605 const GLint GLES2DecoderTestBase::kUniform4RealLocation; |
| 1605 const GLint GLES2DecoderTestBase::kUniform5RealLocation; | 1606 const GLint GLES2DecoderTestBase::kUniform5RealLocation; |
| 1606 const GLint GLES2DecoderTestBase::kUniform6RealLocation; | 1607 const GLint GLES2DecoderTestBase::kUniform6RealLocation; |
| 1607 const GLint GLES2DecoderTestBase::kUniform7RealLocation; | 1608 const GLint GLES2DecoderTestBase::kUniform7RealLocation; |
| 1609 const GLint GLES2DecoderTestBase::kUniform8RealLocation; |
| 1608 const GLint GLES2DecoderTestBase::kUniform1FakeLocation; | 1610 const GLint GLES2DecoderTestBase::kUniform1FakeLocation; |
| 1609 const GLint GLES2DecoderTestBase::kUniform2FakeLocation; | 1611 const GLint GLES2DecoderTestBase::kUniform2FakeLocation; |
| 1610 const GLint GLES2DecoderTestBase::kUniform2ElementFakeLocation; | 1612 const GLint GLES2DecoderTestBase::kUniform2ElementFakeLocation; |
| 1611 const GLint GLES2DecoderTestBase::kUniform3FakeLocation; | 1613 const GLint GLES2DecoderTestBase::kUniform3FakeLocation; |
| 1612 const GLint GLES2DecoderTestBase::kUniform4FakeLocation; | 1614 const GLint GLES2DecoderTestBase::kUniform4FakeLocation; |
| 1613 const GLint GLES2DecoderTestBase::kUniform5FakeLocation; | 1615 const GLint GLES2DecoderTestBase::kUniform5FakeLocation; |
| 1614 const GLint GLES2DecoderTestBase::kUniform6FakeLocation; | 1616 const GLint GLES2DecoderTestBase::kUniform6FakeLocation; |
| 1615 const GLint GLES2DecoderTestBase::kUniform7FakeLocation; | 1617 const GLint GLES2DecoderTestBase::kUniform7FakeLocation; |
| 1618 const GLint GLES2DecoderTestBase::kUniform8FakeLocation; |
| 1616 const GLint GLES2DecoderTestBase::kUniform1DesiredLocation; | 1619 const GLint GLES2DecoderTestBase::kUniform1DesiredLocation; |
| 1617 const GLint GLES2DecoderTestBase::kUniform2DesiredLocation; | 1620 const GLint GLES2DecoderTestBase::kUniform2DesiredLocation; |
| 1618 const GLint GLES2DecoderTestBase::kUniform3DesiredLocation; | 1621 const GLint GLES2DecoderTestBase::kUniform3DesiredLocation; |
| 1619 const GLint GLES2DecoderTestBase::kUniform4DesiredLocation; | 1622 const GLint GLES2DecoderTestBase::kUniform4DesiredLocation; |
| 1620 const GLint GLES2DecoderTestBase::kUniform5DesiredLocation; | 1623 const GLint GLES2DecoderTestBase::kUniform5DesiredLocation; |
| 1621 const GLint GLES2DecoderTestBase::kUniform6DesiredLocation; | 1624 const GLint GLES2DecoderTestBase::kUniform6DesiredLocation; |
| 1622 const GLint GLES2DecoderTestBase::kUniform7DesiredLocation; | 1625 const GLint GLES2DecoderTestBase::kUniform7DesiredLocation; |
| 1626 const GLint GLES2DecoderTestBase::kUniform8DesiredLocation; |
| 1623 const GLenum GLES2DecoderTestBase::kUniform1Type; | 1627 const GLenum GLES2DecoderTestBase::kUniform1Type; |
| 1624 const GLenum GLES2DecoderTestBase::kUniform2Type; | 1628 const GLenum GLES2DecoderTestBase::kUniform2Type; |
| 1625 const GLenum GLES2DecoderTestBase::kUniform3Type; | 1629 const GLenum GLES2DecoderTestBase::kUniform3Type; |
| 1626 const GLenum GLES2DecoderTestBase::kUniform4Type; | 1630 const GLenum GLES2DecoderTestBase::kUniform4Type; |
| 1627 const GLenum GLES2DecoderTestBase::kUniform5Type; | 1631 const GLenum GLES2DecoderTestBase::kUniform5Type; |
| 1628 const GLenum GLES2DecoderTestBase::kUniform6Type; | 1632 const GLenum GLES2DecoderTestBase::kUniform6Type; |
| 1629 const GLenum GLES2DecoderTestBase::kUniform7Type; | 1633 const GLenum GLES2DecoderTestBase::kUniform7Type; |
| 1634 const GLenum GLES2DecoderTestBase::kUniform8Type; |
| 1630 const GLenum GLES2DecoderTestBase::kUniformCubemapType; | 1635 const GLenum GLES2DecoderTestBase::kUniformCubemapType; |
| 1631 const GLint GLES2DecoderTestBase::kInvalidUniformLocation; | 1636 const GLint GLES2DecoderTestBase::kInvalidUniformLocation; |
| 1632 const GLint GLES2DecoderTestBase::kBadUniformIndex; | 1637 const GLint GLES2DecoderTestBase::kBadUniformIndex; |
| 1633 const GLint GLES2DecoderTestBase::kOutputVariable1Size; | 1638 const GLint GLES2DecoderTestBase::kOutputVariable1Size; |
| 1634 const GLenum GLES2DecoderTestBase::kOutputVariable1Type; | 1639 const GLenum GLES2DecoderTestBase::kOutputVariable1Type; |
| 1635 const GLuint GLES2DecoderTestBase::kOutputVariable1ColorName; | 1640 const GLuint GLES2DecoderTestBase::kOutputVariable1ColorName; |
| 1636 const GLuint GLES2DecoderTestBase::kOutputVariable1Index; | 1641 const GLuint GLES2DecoderTestBase::kOutputVariable1Index; |
| 1637 #endif | 1642 #endif |
| 1638 | 1643 |
| 1639 const char* GLES2DecoderTestBase::kAttrib1Name = "attrib1"; | 1644 const char* GLES2DecoderTestBase::kAttrib1Name = "attrib1"; |
| 1640 const char* GLES2DecoderTestBase::kAttrib2Name = "attrib2"; | 1645 const char* GLES2DecoderTestBase::kAttrib2Name = "attrib2"; |
| 1641 const char* GLES2DecoderTestBase::kAttrib3Name = "attrib3"; | 1646 const char* GLES2DecoderTestBase::kAttrib3Name = "attrib3"; |
| 1642 const char* GLES2DecoderTestBase::kUniform1Name = "uniform1"; | 1647 const char* GLES2DecoderTestBase::kUniform1Name = "uniform1"; |
| 1643 const char* GLES2DecoderTestBase::kUniform2Name = "uniform2[0]"; | 1648 const char* GLES2DecoderTestBase::kUniform2Name = "uniform2[0]"; |
| 1644 const char* GLES2DecoderTestBase::kUniform3Name = "uniform3[0]"; | 1649 const char* GLES2DecoderTestBase::kUniform3Name = "uniform3[0]"; |
| 1645 const char* GLES2DecoderTestBase::kUniform4Name = "uniform4"; | 1650 const char* GLES2DecoderTestBase::kUniform4Name = "uniform4"; |
| 1646 const char* GLES2DecoderTestBase::kUniform5Name = "uniform5"; | 1651 const char* GLES2DecoderTestBase::kUniform5Name = "uniform5"; |
| 1647 const char* GLES2DecoderTestBase::kUniform6Name = "uniform6"; | 1652 const char* GLES2DecoderTestBase::kUniform6Name = "uniform6"; |
| 1648 const char* GLES2DecoderTestBase::kUniform7Name = "uniform7"; | 1653 const char* GLES2DecoderTestBase::kUniform7Name = "uniform7"; |
| 1654 const char* GLES2DecoderTestBase::kUniform8Name = "uniform8"; |
| 1649 | 1655 |
| 1650 const char* GLES2DecoderTestBase::kOutputVariable1Name = "gl_FragColor"; | 1656 const char* GLES2DecoderTestBase::kOutputVariable1Name = "gl_FragColor"; |
| 1651 const char* GLES2DecoderTestBase::kOutputVariable1NameESSL3 = "color"; | 1657 const char* GLES2DecoderTestBase::kOutputVariable1NameESSL3 = "color"; |
| 1652 | 1658 |
| 1653 void GLES2DecoderTestBase::SetupDefaultProgram() { | 1659 void GLES2DecoderTestBase::SetupDefaultProgram() { |
| 1654 { | 1660 { |
| 1655 static AttribInfo attribs[] = { | 1661 static AttribInfo attribs[] = { |
| 1656 { kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, }, | 1662 { kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, }, |
| 1657 { kAttrib2Name, kAttrib2Size, kAttrib2Type, kAttrib2Location, }, | 1663 { kAttrib2Name, kAttrib2Size, kAttrib2Type, kAttrib2Location, }, |
| 1658 { kAttrib3Name, kAttrib3Size, kAttrib3Type, kAttrib3Location, }, | 1664 { kAttrib3Name, kAttrib3Size, kAttrib3Type, kAttrib3Location, }, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1672 kUniform4DesiredLocation }, | 1678 kUniform4DesiredLocation }, |
| 1673 { kUniform5Name, kUniform5Size, kUniform5Type, | 1679 { kUniform5Name, kUniform5Size, kUniform5Type, |
| 1674 kUniform5FakeLocation, kUniform5RealLocation, | 1680 kUniform5FakeLocation, kUniform5RealLocation, |
| 1675 kUniform5DesiredLocation }, | 1681 kUniform5DesiredLocation }, |
| 1676 { kUniform6Name, kUniform6Size, kUniform6Type, | 1682 { kUniform6Name, kUniform6Size, kUniform6Type, |
| 1677 kUniform6FakeLocation, kUniform6RealLocation, | 1683 kUniform6FakeLocation, kUniform6RealLocation, |
| 1678 kUniform6DesiredLocation }, | 1684 kUniform6DesiredLocation }, |
| 1679 { kUniform7Name, kUniform7Size, kUniform7Type, | 1685 { kUniform7Name, kUniform7Size, kUniform7Type, |
| 1680 kUniform7FakeLocation, kUniform7RealLocation, | 1686 kUniform7FakeLocation, kUniform7RealLocation, |
| 1681 kUniform7DesiredLocation }, | 1687 kUniform7DesiredLocation }, |
| 1688 { kUniform8Name, kUniform8Size, kUniform8Type, |
| 1689 kUniform8FakeLocation, kUniform8RealLocation, |
| 1690 kUniform8DesiredLocation }, |
| 1682 }; | 1691 }; |
| 1683 SetupShader(attribs, arraysize(attribs), uniforms, arraysize(uniforms), | 1692 SetupShader(attribs, arraysize(attribs), uniforms, arraysize(uniforms), |
| 1684 client_program_id_, kServiceProgramId, | 1693 client_program_id_, kServiceProgramId, |
| 1685 client_vertex_shader_id_, kServiceVertexShaderId, | 1694 client_vertex_shader_id_, kServiceVertexShaderId, |
| 1686 client_fragment_shader_id_, kServiceFragmentShaderId); | 1695 client_fragment_shader_id_, kServiceFragmentShaderId); |
| 1687 } | 1696 } |
| 1688 | 1697 |
| 1689 { | 1698 { |
| 1690 EXPECT_CALL(*gl_, UseProgram(kServiceProgramId)) | 1699 EXPECT_CALL(*gl_, UseProgram(kServiceProgramId)) |
| 1691 .Times(1) | 1700 .Times(1) |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 SetupDefaultProgram(); | 2123 SetupDefaultProgram(); |
| 2115 } | 2124 } |
| 2116 | 2125 |
| 2117 // Include the auto-generated part of this file. We split this because it means | 2126 // Include the auto-generated part of this file. We split this because it means |
| 2118 // we can easily edit the non-auto generated parts right here in this file | 2127 // we can easily edit the non-auto generated parts right here in this file |
| 2119 // instead of having to edit some template or the code generator. | 2128 // instead of having to edit some template or the code generator. |
| 2120 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2129 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 2121 | 2130 |
| 2122 } // namespace gles2 | 2131 } // namespace gles2 |
| 2123 } // namespace gpu | 2132 } // namespace gpu |
| OLD | NEW |