Hash :
785353fd
Author :
Date :
2022-05-24T12:40:16
Support Desktop OpenGL context creation in end2end tests Validation of Desktop GL versions and profile masks is unimplemented. Bug: angleproject:7360 Change-Id: Ifae94215b6aada895c2b02318a1d05c9515e9b96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664916 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "test_utils/ANGLETest.h"
#include "test_utils/gl_raii.h"
#include "util/shader_utils.h"
namespace angle
{
class DesktopGLSLTest : public ANGLETest<>
{
protected:
DesktopGLSLTest()
{
setWindowWidth(128);
setWindowHeight(128);
setConfigRedBits(8);
setConfigGreenBits(8);
setConfigBlueBits(8);
setConfigAlphaBits(8);
}
};
// Simple test case of compiling a desktop OpenGL shader to verify that the shader compiler
// initializes.
TEST_P(DesktopGLSLTest, BasicCompilation)
{
const char kVS[] = R"(#version 150
in vec4 position;
void main()
{
gl_Position = position;
})";
const char kFS[] = R"(#version 150
out vec4 fragColor;
void main()
{
fragColor = vec4(1.0, 0.5, 0.2, 1.0);
})";
ANGLE_GL_PROGRAM(testProgram, kVS, kFS);
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(DesktopGLSLTest);
ANGLE_INSTANTIATE_TEST_GL32_CORE(DesktopGLSLTest);
} // namespace angle