Doug Horn | fb0ba20 | 2022-05-19 14:09:21 -0700 | [diff] [blame] | 1 | // Copyright (C) 2022 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | #include <gtest/gtest.h> |
| 16 | |
| 17 | #include "GLEScmContext.h" |
| 18 | #include "GLTestUtils.h" |
| 19 | #include "OpenGLTestContext.h" |
| 20 | |
Jason Macnak | ed0c9e6 | 2023-03-30 15:58:24 -0700 | [diff] [blame] | 21 | namespace gfxstream { |
| 22 | namespace gl { |
| 23 | namespace { |
| 24 | |
Doug Horn | fb0ba20 | 2022-05-19 14:09:21 -0700 | [diff] [blame] | 25 | // b/233094475: GLES1 frustumf crash on cmcontext should not crash when |
| 26 | // core profile is not enabled. |
| 27 | TEST_F(GLTest, TestGlFrustumNoCoreProfile) { |
Yahan Zhou | c633f81 | 2022-05-27 14:06:50 -0700 | [diff] [blame] | 28 | // We cannot test this with GLES2GLES because this mode sits on top of |
| 29 | // GLES2 dispatcher which does not have frustumf. |
| 30 | if (isGles2Gles()) { |
| 31 | GTEST_SKIP(); |
| 32 | } |
Doug Horn | fb0ba20 | 2022-05-19 14:09:21 -0700 | [diff] [blame] | 33 | GLEScmContext context(1, 1, nullptr, nullptr); |
| 34 | context.setCoreProfile(false); |
| 35 | context.frustumf(0, 0, 0, 0, 0, 0); |
| 36 | } |
| 37 | |
Jason Macnak | ed0c9e6 | 2023-03-30 15:58:24 -0700 | [diff] [blame] | 38 | } // namespace |
| 39 | } // namespace gl |
| 40 | } // namespace gfxstream |