• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
21 namespace gfxstream {
22 namespace gl {
23 namespace {
24 
25 // b/233094475: GLES1 frustumf crash on cmcontext should not crash when
26 // core profile is not enabled.
TEST_F(GLTest,TestGlFrustumNoCoreProfile)27 TEST_F(GLTest, TestGlFrustumNoCoreProfile) {
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     }
33     GLEScmContext context(1, 1, nullptr, nullptr);
34     context.setCoreProfile(false);
35     context.frustumf(0, 0, 0, 0, 0, 0);
36 }
37 
38 }  // namespace
39 }  // namespace gl
40 }  // namespace gfxstream