Hash :
073b6510
Author :
Date :
2024-01-11T07:40:32
Add missing GLES1 glGetBooleanv() enums In OpenGL ES 1, capabilities that can be queried using glIsEnabled() can also be queried using glGetBooleanv(). As such, some valid glGetBooleanv() calls were returning "Invalid pname" error. Added support for the missing enums in glGetBooleanv(). Bug: angleproject:8481 Tests: GLES1 - QueryTest* Change-Id: Ic3a50eda4eae5855cd9491dbf217b5f69c1669b4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5188456 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
//
// Copyright 2024 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.
//
// QueryTest.cpp: Tests basic boolean query of GLES1 enums.
#include "test_utils/ANGLETest.h"
#include <stdint.h>
using namespace angle;
class QueryTest : public ANGLETest<>
{
protected:
QueryTest()
{
setWindowWidth(32);
setWindowHeight(32);
setConfigRedBits(8);
setConfigGreenBits(8);
setConfigBlueBits(8);
setConfigAlphaBits(8);
setConfigDepthBits(24);
}
};
// Test that glGetBooleanv works for GLES1 enums
TEST_P(QueryTest, Basic)
{
std::vector<GLenum> pnames = {GL_ALPHA_TEST,
GL_CLIP_PLANE0,
GL_CLIP_PLANE1,
GL_CLIP_PLANE2,
GL_CLIP_PLANE3,
GL_CLIP_PLANE4,
GL_CLIP_PLANE5,
GL_COLOR_ARRAY,
GL_COLOR_LOGIC_OP,
GL_COLOR_MATERIAL,
GL_FOG,
GL_LIGHT0,
GL_LIGHT1,
GL_LIGHT2,
GL_LIGHT3,
GL_LIGHT4,
GL_LIGHT5,
GL_LIGHT6,
GL_LIGHT7,
GL_LIGHTING,
GL_LINE_SMOOTH,
GL_NORMAL_ARRAY,
GL_NORMALIZE,
GL_POINT_SIZE_ARRAY_OES,
GL_POINT_SMOOTH,
GL_POINT_SPRITE_OES,
GL_RESCALE_NORMAL,
GL_TEXTURE_2D,
GL_TEXTURE_CUBE_MAP,
GL_TEXTURE_COORD_ARRAY,
GL_VERTEX_ARRAY};
for (GLenum pname : pnames)
{
GLboolean data = GL_FALSE;
glGetBooleanv(pname, &data);
EXPECT_GL_NO_ERROR();
}
}
ANGLE_INSTANTIATE_TEST_ES1(QueryTest);