summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Schlomoff <gregschlom@google.com>2022-04-05 01:14:40 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-05 01:14:40 +0000
commit7549c561602d06326d8e429921481d4bb44ffcff (patch)
tree8924aa9f492d1659195136d4e0e1420dc5c1ab85
parent59ca2abe586cd25c8df7c28b0df170da8a6aa183 (diff)
parent15e2bf44a6ed5dbb005592fe650dc0b8c915863b (diff)
downloadvulkan-cereal-7549c561602d06326d8e429921481d4bb44ffcff.tar.gz
Merge "Minor fix to OpenGL test:" am: 557d8cd687 am: 15e2bf44a6
Original change: https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/2055226 Change-Id: I5a6116dc427884dabf4131e9c69f9c3098446369 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--stream-servers/tests/GLSnapshotRasterization_unittest.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/stream-servers/tests/GLSnapshotRasterization_unittest.cpp b/stream-servers/tests/GLSnapshotRasterization_unittest.cpp
index 9719dc34..ce507e57 100644
--- a/stream-servers/tests/GLSnapshotRasterization_unittest.cpp
+++ b/stream-servers/tests/GLSnapshotRasterization_unittest.cpp
@@ -85,8 +85,7 @@ INSTANTIATE_TEST_SUITE_P(GLES2SnapshotRasterization,
::testing::ValuesIn(kGLES2FrontFaceModes));
class SnapshotGlPolygonOffsetTest
- : public SnapshotSetValueTest<GLfloat*>,
- public ::testing::WithParamInterface<const GLfloat*> {
+ : public SnapshotSetValueTest<GLfloat*> {
void stateCheck(GLfloat* expected) override {
EXPECT_TRUE(compareGlobalGlFloat(gl, GL_POLYGON_OFFSET_FACTOR,
expected[0]));
@@ -94,19 +93,16 @@ class SnapshotGlPolygonOffsetTest
compareGlobalGlFloat(gl, GL_POLYGON_OFFSET_UNITS, expected[1]));
}
void stateChange() override {
- gl->glPolygonOffset(GetParam()[0], GetParam()[1]);
+ gl->glPolygonOffset(0.5f, 0.5f);
}
};
-TEST_P(SnapshotGlPolygonOffsetTest, SetPolygonOffset) {
+TEST_F(SnapshotGlPolygonOffsetTest, SetPolygonOffset) {
GLfloat defaultOffset[2] = {0.0f, 0.0f};
- GLfloat testOffset[2] = {GetParam()[0], GetParam()[1]};
+ GLfloat testOffset[2] = {0.5f, 0.5f};
setExpectedValues(defaultOffset, testOffset);
doCheckedSnapshot();
}
-INSTANTIATE_TEST_SUITE_P(GLES2SnapshotRasterization,
- SnapshotGlPolygonOffsetTest,
- ::testing::Values(kGLES2TestPolygonOffset));
} // namespace emugl