blob: 174ccf22534e2fae3b48d7b80465aedc63dab82c [file] [log] [blame]
Doug Hornfb0ba202022-05-19 14:09:21 -07001// 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 Macnaked0c9e62023-03-30 15:58:24 -070021namespace gfxstream {
22namespace gl {
23namespace {
24
Doug Hornfb0ba202022-05-19 14:09:21 -070025// b/233094475: GLES1 frustumf crash on cmcontext should not crash when
26// core profile is not enabled.
27TEST_F(GLTest, TestGlFrustumNoCoreProfile) {
Yahan Zhouc633f812022-05-27 14:06:50 -070028 // 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 Hornfb0ba202022-05-19 14:09:21 -070033 GLEScmContext context(1, 1, nullptr, nullptr);
34 context.setCoreProfile(false);
35 context.frustumf(0, 0, 0, 0, 0, 0);
36}
37
Jason Macnaked0c9e62023-03-30 15:58:24 -070038} // namespace
39} // namespace gl
40} // namespace gfxstream