зеркало из https://github.com/AvaloniaUI/angle.git
Use value-paramaterized tests instead of by type.
This should fix our non-standard template use, which causes compile errors for the tests on GCC/Clang. BUG=angleproject:997 Change-Id: Id1bb15231eda445f37e53a5b33d4684ec6618d8e Reviewed-on: https://chromium-review.googlesource.com/269858 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
0ca53786c6
Коммит
fa05f6076e
|
@ -54,6 +54,7 @@
|
|||
'<(angle_path)/src/tests/end2end_tests/UnpackRowLength.cpp',
|
||||
'<(angle_path)/src/tests/end2end_tests/VertexAttributeTest.cpp',
|
||||
'<(angle_path)/src/tests/end2end_tests/ViewportTest.cpp',
|
||||
'<(angle_path)/src/tests/end2end_tests/angle_test_configs.h',
|
||||
'<(angle_path)/src/tests/standalone_tests/EGLQueryContextTest.cpp',
|
||||
'<(angle_path)/src/tests/standalone_tests/EGLSurfaceTest.cpp',
|
||||
'<(angle_path)/src/tests/standalone_tests/EGLThreadTest.cpp',
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
#include "EGLWindow.h"
|
||||
#include "OSWindow.h"
|
||||
|
||||
ANGLETest::ANGLETest(EGLint glesMajorVersion, const EGLPlatformParameters &platform)
|
||||
ANGLETest::ANGLETest()
|
||||
: mEGLWindow(nullptr)
|
||||
{
|
||||
mEGLWindow = new EGLWindow(1280, 720, glesMajorVersion, platform);
|
||||
mEGLWindow = new EGLWindow(1280, 720, GetParam().mClientVersion, GetParam().mEGLPlatformParameters);
|
||||
}
|
||||
|
||||
ANGLETest::~ANGLETest()
|
||||
|
|
|
@ -7,18 +7,14 @@
|
|||
#ifndef ANGLE_TESTS_ANGLE_TEST_H_
|
||||
#define ANGLE_TESTS_ANGLE_TEST_H_
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include "angle_gl.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "angle_gl.h"
|
||||
#include "angle_test_configs.h"
|
||||
#include "common/angleutils.h"
|
||||
#include "shader_utils.h"
|
||||
|
||||
#include "testfixturetypes.h"
|
||||
|
||||
#define EXPECT_GL_ERROR(err) EXPECT_EQ((err), glGetError())
|
||||
#define EXPECT_GL_NO_ERROR() EXPECT_GL_ERROR(GL_NO_ERROR)
|
||||
|
||||
|
@ -56,10 +52,10 @@
|
|||
class EGLWindow;
|
||||
class OSWindow;
|
||||
|
||||
class ANGLETest : public testing::Test
|
||||
class ANGLETest : public ::testing::TestWithParam<angle::PlatformParameters>
|
||||
{
|
||||
protected:
|
||||
ANGLETest(EGLint glesMajorVersion, const EGLPlatformParameters &platform);
|
||||
ANGLETest();
|
||||
~ANGLETest();
|
||||
|
||||
public:
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(BlendMinMaxTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class BlendMinMaxTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
BlendMinMaxTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
BlendMinMaxTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -146,13 +150,13 @@ protected:
|
|||
GLuint mColorRenderbuffer;
|
||||
};
|
||||
|
||||
TYPED_TEST(BlendMinMaxTest, RGBA8)
|
||||
TEST_P(BlendMinMaxTest, RGBA8)
|
||||
{
|
||||
SetUpFramebuffer(GL_RGBA8);
|
||||
runTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(BlendMinMaxTest, RGBA32f)
|
||||
TEST_P(BlendMinMaxTest, RGBA32f)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_OES_texture_float"))
|
||||
{
|
||||
|
@ -164,7 +168,7 @@ TYPED_TEST(BlendMinMaxTest, RGBA32f)
|
|||
runTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(BlendMinMaxTest, RGBA16F)
|
||||
TEST_P(BlendMinMaxTest, RGBA16F)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_OES_texture_half_float"))
|
||||
{
|
||||
|
@ -175,3 +179,6 @@ TYPED_TEST(BlendMinMaxTest, RGBA16F)
|
|||
SetUpFramebuffer(GL_RGBA16F);
|
||||
runTest();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(BlendMinMaxTest, ES2_D3D9(), ES2_D3D11(), ES2_OPENGL());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(BlitFramebufferANGLETest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class BlitFramebufferANGLETest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
BlitFramebufferANGLETest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
BlitFramebufferANGLETest()
|
||||
{
|
||||
setWindowWidth(256);
|
||||
setWindowHeight(256);
|
||||
|
@ -307,7 +311,7 @@ protected:
|
|||
};
|
||||
|
||||
// Draw to user-created framebuffer, blit whole-buffer color to original framebuffer.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitColorToDefault)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitColorToDefault)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -334,7 +338,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitColorToDefault)
|
|||
}
|
||||
|
||||
// Draw to system framebuffer, blit whole-buffer color to user-created framebuffer.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ReverseColorBlit)
|
||||
TEST_P(BlitFramebufferANGLETest, ReverseColorBlit)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mOriginalFBO);
|
||||
|
||||
|
@ -361,7 +365,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ReverseColorBlit)
|
|||
}
|
||||
|
||||
// blit from user-created FBO to system framebuffer, with the scissor test enabled.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ScissoredBlit)
|
||||
TEST_P(BlitFramebufferANGLETest, ScissoredBlit)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -396,7 +400,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ScissoredBlit)
|
|||
}
|
||||
|
||||
// blit from system FBO to user-created framebuffer, with the scissor test enabled.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ReverseScissoredBlit)
|
||||
TEST_P(BlitFramebufferANGLETest, ReverseScissoredBlit)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mOriginalFBO);
|
||||
|
||||
|
@ -431,7 +435,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ReverseScissoredBlit)
|
|||
}
|
||||
|
||||
// blit from user-created FBO to system framebuffer, using region larger than buffer.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, OversizedBlit)
|
||||
TEST_P(BlitFramebufferANGLETest, OversizedBlit)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -461,7 +465,7 @@ TYPED_TEST(BlitFramebufferANGLETest, OversizedBlit)
|
|||
}
|
||||
|
||||
// blit from system FBO to user-created framebuffer, using region larger than buffer.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ReverseOversizedBlit)
|
||||
TEST_P(BlitFramebufferANGLETest, ReverseOversizedBlit)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mOriginalFBO);
|
||||
|
||||
|
@ -490,7 +494,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ReverseOversizedBlit)
|
|||
}
|
||||
|
||||
// blit from user-created FBO to system framebuffer, with depth buffer.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitWithDepth)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitWithDepth)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -527,7 +531,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitWithDepth)
|
|||
}
|
||||
|
||||
// blit from system FBO to user-created framebuffer, with depth buffer.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ReverseBlitWithDepth)
|
||||
TEST_P(BlitFramebufferANGLETest, ReverseBlitWithDepth)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mOriginalFBO);
|
||||
|
||||
|
@ -564,7 +568,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ReverseBlitWithDepth)
|
|||
}
|
||||
|
||||
// blit from one region of the system fbo to another-- this should fail.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitSameBufferOriginal)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitSameBufferOriginal)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mOriginalFBO);
|
||||
|
||||
|
@ -580,7 +584,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitSameBufferOriginal)
|
|||
}
|
||||
|
||||
// blit from one region of the system fbo to another.
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitSameBufferUser)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitSameBufferUser)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -595,7 +599,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitSameBufferUser)
|
|||
EXPECT_GL_ERROR(GL_INVALID_OPERATION);
|
||||
}
|
||||
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitPartialColor)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitPartialColor)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -624,7 +628,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitPartialColor)
|
|||
EXPECT_PIXEL_EQ( getWindowWidth() / 4, 3 * getWindowHeight() / 4, 255, 0, 0, 255);
|
||||
}
|
||||
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitDifferentSizes)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitDifferentSizes)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -652,7 +656,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitDifferentSizes)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitWithMissingAttachments)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitWithMissingAttachments)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mColorOnlyFBO);
|
||||
|
||||
|
@ -690,7 +694,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitWithMissingAttachments)
|
|||
EXPECT_PIXEL_EQ( getWindowWidth() / 4, 3 * getWindowHeight() / 4, 0, 0, 255, 255);
|
||||
}
|
||||
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitStencil)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitStencil)
|
||||
{
|
||||
// TODO(jmadill): Figure out if we can fix this on D3D9.
|
||||
// https://code.google.com/p/angleproject/issues/detail?id=809
|
||||
|
@ -740,7 +744,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitStencil)
|
|||
}
|
||||
|
||||
// make sure that attempting to blit a partial depth buffer issues an error
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitPartialDepthStencil)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitPartialDepthStencil)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -759,7 +763,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitPartialDepthStencil)
|
|||
}
|
||||
|
||||
// Test blit with MRT framebuffers
|
||||
TYPED_TEST(BlitFramebufferANGLETest, BlitMRT)
|
||||
TEST_P(BlitFramebufferANGLETest, BlitMRT)
|
||||
{
|
||||
if (!extensionEnabled("GL_EXT_draw_buffers"))
|
||||
{
|
||||
|
@ -807,7 +811,7 @@ TYPED_TEST(BlitFramebufferANGLETest, BlitMRT)
|
|||
}
|
||||
|
||||
// Make sure that attempts to stretch in a blit call issue an error
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ErrorStretching)
|
||||
TEST_P(BlitFramebufferANGLETest, ErrorStretching)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -826,7 +830,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ErrorStretching)
|
|||
}
|
||||
|
||||
// Make sure that attempts to flip in a blit call issue an error
|
||||
TYPED_TEST(BlitFramebufferANGLETest, ErrorFlipping)
|
||||
TEST_P(BlitFramebufferANGLETest, ErrorFlipping)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -844,7 +848,7 @@ TYPED_TEST(BlitFramebufferANGLETest, ErrorFlipping)
|
|||
EXPECT_GL_ERROR(GL_INVALID_OPERATION);
|
||||
}
|
||||
|
||||
TYPED_TEST(BlitFramebufferANGLETest, Errors)
|
||||
TEST_P(BlitFramebufferANGLETest, Errors)
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
|
||||
|
||||
|
@ -883,3 +887,6 @@ TYPED_TEST(BlitFramebufferANGLETest, Errors)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(BlitFramebufferANGLETest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(BufferDataTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class BufferDataTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
BufferDataTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
BufferDataTest()
|
||||
{
|
||||
setWindowWidth(16);
|
||||
setWindowHeight(16);
|
||||
|
@ -81,7 +85,7 @@ class BufferDataTest : public ANGLETest
|
|||
GLint mAttribLocation;
|
||||
};
|
||||
|
||||
TYPED_TEST(BufferDataTest, NULLData)
|
||||
TEST_P(BufferDataTest, NULLData)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
EXPECT_GL_NO_ERROR();
|
||||
|
@ -104,7 +108,7 @@ TYPED_TEST(BufferDataTest, NULLData)
|
|||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(BufferDataTest, ZeroNonNULLData)
|
||||
TEST_P(BufferDataTest, ZeroNonNULLData)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
EXPECT_GL_NO_ERROR();
|
||||
|
@ -119,7 +123,7 @@ TYPED_TEST(BufferDataTest, ZeroNonNULLData)
|
|||
delete [] zeroData;
|
||||
}
|
||||
|
||||
TYPED_TEST(BufferDataTest, NULLResolvedData)
|
||||
TEST_P(BufferDataTest, NULLResolvedData)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
glBufferData(GL_ARRAY_BUFFER, 128, NULL, GL_DYNAMIC_DRAW);
|
||||
|
@ -134,7 +138,7 @@ TYPED_TEST(BufferDataTest, NULLResolvedData)
|
|||
|
||||
// Tests that a huge allocation returns GL_OUT_OF_MEMORY
|
||||
// TODO(jmadill): Figure out how to test this reliably on the Chromium bots
|
||||
TYPED_TEST(BufferDataTest, DISABLED_HugeSetDataShouldNotCrash)
|
||||
TEST_P(BufferDataTest, DISABLED_HugeSetDataShouldNotCrash)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
EXPECT_GL_NO_ERROR();
|
||||
|
@ -203,14 +207,10 @@ TYPED_TEST(BufferDataTest, DISABLED_HugeSetDataShouldNotCrash)
|
|||
delete[] data;
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(IndexedBufferCopyTest, ES3_D3D11);
|
||||
|
||||
template<typename T>
|
||||
class IndexedBufferCopyTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
IndexedBufferCopyTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
IndexedBufferCopyTest()
|
||||
{
|
||||
setWindowWidth(16);
|
||||
setWindowHeight(16);
|
||||
|
@ -285,7 +285,7 @@ class IndexedBufferCopyTest : public ANGLETest
|
|||
// The following test covers an ANGLE bug where our index ranges
|
||||
// weren't updated from CopyBufferSubData calls
|
||||
// https://code.google.com/p/angleproject/issues/detail?id=709
|
||||
TYPED_TEST(IndexedBufferCopyTest, IndexRangeBug)
|
||||
TEST_P(IndexedBufferCopyTest, IndexRangeBug)
|
||||
{
|
||||
unsigned char vertexData[] = { 255, 0, 0, 0, 0, 0 };
|
||||
unsigned int indexData[] = { 0, 1 };
|
||||
|
@ -332,18 +332,14 @@ TYPED_TEST(IndexedBufferCopyTest, IndexRangeBug)
|
|||
EXPECT_PIXEL_EQ(0, 0, 0, 255, 0, 255);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(BufferDataTestES3, ES3_D3D11);
|
||||
|
||||
template<typename T>
|
||||
class BufferDataTestES3 : public BufferDataTest<T>
|
||||
class BufferDataTestES3 : public BufferDataTest
|
||||
{
|
||||
};
|
||||
|
||||
// The following test covers an ANGLE bug where the buffer storage
|
||||
// is not resized by Buffer11::getLatestBufferStorage when needed.
|
||||
// https://code.google.com/p/angleproject/issues/detail?id=897
|
||||
TYPED_TEST(BufferDataTestES3, BufferResizing)
|
||||
TEST_P(BufferDataTestES3, BufferResizing)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
ASSERT_GL_NO_ERROR();
|
||||
|
@ -403,3 +399,12 @@ TYPED_TEST(BufferDataTestES3, BufferResizing)
|
|||
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(BufferDataTestES3, ES3_D3D11());
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(IndexedBufferCopyTest, ES3_D3D11());
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(BufferDataTest, ES2_D3D9(), ES2_D3D11(), ES2_OPENGL());
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(ClearTest, ES2_D3D9, ES2_D3D11, ES3_D3D11, ES2_OPENGL, ES3_OPENGL);
|
||||
ANGLE_TYPED_TEST_CASE(ClearTestES3, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class ClearTestBase : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
ClearTestBase() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
ClearTestBase()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -67,15 +70,10 @@ class ClearTestBase : public ANGLETest
|
|||
GLuint mFBO;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class ClearTest : public ClearTestBase<T>
|
||||
{};
|
||||
class ClearTest : public ClearTestBase {};
|
||||
class ClearTestES3 : public ClearTestBase {};
|
||||
|
||||
template <typename T>
|
||||
class ClearTestES3 : public ClearTestBase<T>
|
||||
{};
|
||||
|
||||
TYPED_TEST(ClearTest, ClearIssue)
|
||||
TEST_P(ClearTest, ClearIssue)
|
||||
{
|
||||
// TODO(geofflang): Figure out why this is broken on Intel OpenGL
|
||||
if (isIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
|
||||
|
@ -123,7 +121,7 @@ TYPED_TEST(ClearTest, ClearIssue)
|
|||
// Requires ES3
|
||||
// This tests a bug where in a masked clear when calling "ClearBuffer", we would
|
||||
// mistakenly clear every channel (including the masked-out ones)
|
||||
TYPED_TEST(ClearTestES3, MaskedClearBufferBug)
|
||||
TEST_P(ClearTestES3, MaskedClearBufferBug)
|
||||
{
|
||||
unsigned char pixelData[] = { 255, 255, 255, 255 };
|
||||
|
||||
|
@ -162,7 +160,7 @@ TYPED_TEST(ClearTestES3, MaskedClearBufferBug)
|
|||
glDeleteTextures(2, textures);
|
||||
}
|
||||
|
||||
TYPED_TEST(ClearTestES3, BadFBOSerialBug)
|
||||
TEST_P(ClearTestES3, BadFBOSerialBug)
|
||||
{
|
||||
// First make a simple framebuffer, and clear it to green
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
|
||||
|
@ -209,3 +207,7 @@ TYPED_TEST(ClearTestES3, BadFBOSerialBug)
|
|||
glDeleteTextures(2, textures);
|
||||
glDeleteFramebuffers(1, &fbo2);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(ClearTest, ES2_D3D9(), ES2_D3D11(), ES3_D3D11(), ES2_OPENGL(), ES3_OPENGL());
|
||||
ANGLE_INSTANTIATE_TEST(ClearTestES3, ES3_D3D11());
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include "media/pixel.inl"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(CompressedTextureTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3, ES2_OPENGL, ES3_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class CompressedTextureTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
CompressedTextureTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
CompressedTextureTest()
|
||||
{
|
||||
setWindowWidth(512);
|
||||
setWindowHeight(512);
|
||||
|
@ -70,7 +75,7 @@ protected:
|
|||
GLint mTextureUniformLocation;
|
||||
};
|
||||
|
||||
TYPED_TEST(CompressedTextureTest, CompressedTexImage)
|
||||
TEST_P(CompressedTextureTest, CompressedTexImage)
|
||||
{
|
||||
if (!extensionEnabled("GL_EXT_texture_compression_dxt1"))
|
||||
{
|
||||
|
@ -111,7 +116,7 @@ TYPED_TEST(CompressedTextureTest, CompressedTexImage)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(CompressedTextureTest, CompressedTexStorage)
|
||||
TEST_P(CompressedTextureTest, CompressedTexStorage)
|
||||
{
|
||||
if (!extensionEnabled("GL_EXT_texture_compression_dxt1"))
|
||||
{
|
||||
|
@ -168,18 +173,11 @@ TYPED_TEST(CompressedTextureTest, CompressedTexStorage)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(CompressedTextureTestES3, ES3_D3D11);
|
||||
class CompressedTextureTestES3 : public CompressedTextureTest { };
|
||||
|
||||
template<typename T>
|
||||
class CompressedTextureTestES3 : public CompressedTextureTest<T> { };
|
||||
class CompressedTextureTestD3D11 : public CompressedTextureTest { };
|
||||
|
||||
ANGLE_TYPED_TEST_CASE(CompressedTextureTestD3D11, ES2_D3D11, ES3_D3D11, ES2_D3D11_FL9_3);
|
||||
|
||||
template<typename T>
|
||||
class CompressedTextureTestD3D11 : public CompressedTextureTest<T> { };
|
||||
|
||||
TYPED_TEST(CompressedTextureTestES3, PBOCompressedTexImage)
|
||||
TEST_P(CompressedTextureTestES3, PBOCompressedTexImage)
|
||||
{
|
||||
GLuint texture;
|
||||
glGenTextures(1, &texture);
|
||||
|
@ -232,7 +230,7 @@ TYPED_TEST(CompressedTextureTestES3, PBOCompressedTexImage)
|
|||
}
|
||||
|
||||
|
||||
TYPED_TEST(CompressedTextureTestD3D11, PBOCompressedTexStorage)
|
||||
TEST_P(CompressedTextureTestD3D11, PBOCompressedTexStorage)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_EXT_texture_compression_dxt1"))
|
||||
{
|
||||
|
@ -302,3 +300,13 @@ TYPED_TEST(CompressedTextureTestD3D11, PBOCompressedTexStorage)
|
|||
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(
|
||||
CompressedTextureTest,
|
||||
ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3(), ES2_OPENGL(), ES3_OPENGL());
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(CompressedTextureTestES3, ES3_D3D11());
|
||||
|
||||
ANGLE_INSTANTIATE_TEST(CompressedTextureTestD3D11, ES2_D3D11(), ES3_D3D11(), ES2_D3D11_FL9_3());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(CubeMapTextureTest, ES2_D3D11, ES2_D3D11_FL9_3);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class CubeMapTextureTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
CubeMapTextureTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
CubeMapTextureTest()
|
||||
{
|
||||
setWindowWidth(256);
|
||||
setWindowHeight(256);
|
||||
|
@ -71,7 +75,7 @@ protected:
|
|||
};
|
||||
|
||||
// Verify that rendering to the faces of a cube map consecutively will correctly render to each face.
|
||||
TYPED_TEST(CubeMapTextureTest, RenderToFacesConsecutively)
|
||||
TEST_P(CubeMapTextureTest, RenderToFacesConsecutively)
|
||||
{
|
||||
const GLfloat faceColors[] =
|
||||
{
|
||||
|
@ -123,3 +127,6 @@ TYPED_TEST(CubeMapTextureTest, RenderToFacesConsecutively)
|
|||
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(CubeMapTextureTest, ES2_D3D11(), ES2_D3D11_FL9_3());
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(DepthStencilFormatsTest, ES2_D3D9, ES2_D3D11);
|
||||
ANGLE_TYPED_TEST_CASE(DepthStencilFormatsTestES3, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class DepthStencilFormatsTestBase : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
DepthStencilFormatsTestBase() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
DepthStencilFormatsTestBase()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -112,15 +115,13 @@ class DepthStencilFormatsTestBase : public ANGLETest
|
|||
GLint mTextureUniformLocation;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class DepthStencilFormatsTest : public DepthStencilFormatsTestBase<T>
|
||||
class DepthStencilFormatsTest : public DepthStencilFormatsTestBase
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
class DepthStencilFormatsTestES3 : public DepthStencilFormatsTestBase<T>
|
||||
class DepthStencilFormatsTestES3 : public DepthStencilFormatsTestBase
|
||||
{};
|
||||
|
||||
TYPED_TEST(DepthStencilFormatsTest, DepthTexture)
|
||||
TEST_P(DepthStencilFormatsTest, DepthTexture)
|
||||
{
|
||||
bool shouldHaveTextureSupport = extensionEnabled("GL_ANGLE_depth_texture");
|
||||
EXPECT_EQ(shouldHaveTextureSupport, checkTexImageFormatSupport(GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT));
|
||||
|
@ -133,7 +134,7 @@ TYPED_TEST(DepthStencilFormatsTest, DepthTexture)
|
|||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(DepthStencilFormatsTest, PackedDepthStencil)
|
||||
TEST_P(DepthStencilFormatsTest, PackedDepthStencil)
|
||||
{
|
||||
// Expected to fail in D3D9 if GL_OES_packed_depth_stencil is not present.
|
||||
// Expected to fail in D3D11 if GL_OES_packed_depth_stencil or GL_ANGLE_depth_texture is not present.
|
||||
|
@ -151,7 +152,7 @@ TYPED_TEST(DepthStencilFormatsTest, PackedDepthStencil)
|
|||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(DepthStencilFormatsTestES3, DrawWithDepthStencil)
|
||||
TEST_P(DepthStencilFormatsTestES3, DrawWithDepthStencil)
|
||||
{
|
||||
GLushort data[16];
|
||||
for (unsigned int i = 0; i < 16; i++)
|
||||
|
@ -175,3 +176,7 @@ TYPED_TEST(DepthStencilFormatsTestES3, DrawWithDepthStencil)
|
|||
|
||||
EXPECT_PIXEL_NEAR(0, 0, 255, 0, 0, 255, 2.0);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(DepthStencilFormatsTest, ES2_D3D9(), ES2_D3D11());
|
||||
ANGLE_INSTANTIATE_TEST(DepthStencilFormatsTestES3, ES3_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(DrawBuffersTest, ES2_D3D11, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class DrawBuffersTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
DrawBuffersTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
DrawBuffersTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -201,7 +205,7 @@ class DrawBuffersTest : public ANGLETest
|
|||
GLuint mBuffer;
|
||||
};
|
||||
|
||||
TYPED_TEST(DrawBuffersTest, Gaps)
|
||||
TEST_P(DrawBuffersTest, Gaps)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, mTextures[0]);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, mTextures[0], 0);
|
||||
|
@ -225,7 +229,7 @@ TYPED_TEST(DrawBuffersTest, Gaps)
|
|||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
TYPED_TEST(DrawBuffersTest, FirstAndLast)
|
||||
TEST_P(DrawBuffersTest, FirstAndLast)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, mTextures[0]);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mTextures[0], 0);
|
||||
|
@ -258,7 +262,7 @@ TYPED_TEST(DrawBuffersTest, FirstAndLast)
|
|||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
TYPED_TEST(DrawBuffersTest, FirstHalfNULL)
|
||||
TEST_P(DrawBuffersTest, FirstHalfNULL)
|
||||
{
|
||||
bool flags[8] = { false };
|
||||
GLenum bufs[8] = { GL_NONE };
|
||||
|
@ -288,7 +292,7 @@ TYPED_TEST(DrawBuffersTest, FirstHalfNULL)
|
|||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
TYPED_TEST(DrawBuffersTest, UnwrittenOutputVariablesShouldNotCrash)
|
||||
TEST_P(DrawBuffersTest, UnwrittenOutputVariablesShouldNotCrash)
|
||||
{
|
||||
// Bind two render targets but use a shader which writes only to the first one.
|
||||
glBindTexture(GL_TEXTURE_2D, mTextures[0]);
|
||||
|
@ -322,3 +326,6 @@ TYPED_TEST(DrawBuffersTest, UnwrittenOutputVariablesShouldNotCrash)
|
|||
|
||||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(DrawBuffersTest, ES2_D3D11(), ES3_D3D11());
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(FenceNVTest, ES2_D3D9, ES2_D3D11, ES3_D3D11, ES2_OPENGL, ES3_OPENGL);
|
||||
ANGLE_TYPED_TEST_CASE(FenceSyncTest, ES3_D3D11, ES3_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class FenceNVTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
FenceNVTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
FenceNVTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -20,11 +23,10 @@ class FenceNVTest : public ANGLETest
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class FenceSyncTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
FenceSyncTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
FenceSyncTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -37,7 +39,7 @@ protected:
|
|||
};
|
||||
|
||||
// FenceNV objects should respond false to glIsFenceNV until they've been set
|
||||
TYPED_TEST(FenceNVTest, IsFence)
|
||||
TEST_P(FenceNVTest, IsFence)
|
||||
{
|
||||
if (!extensionEnabled("GL_NV_fence"))
|
||||
{
|
||||
|
@ -60,7 +62,7 @@ TYPED_TEST(FenceNVTest, IsFence)
|
|||
}
|
||||
|
||||
// Test error cases for all FenceNV functions
|
||||
TYPED_TEST(FenceNVTest, Errors)
|
||||
TEST_P(FenceNVTest, Errors)
|
||||
{
|
||||
if (!extensionEnabled("GL_NV_fence"))
|
||||
{
|
||||
|
@ -107,7 +109,7 @@ TYPED_TEST(FenceNVTest, Errors)
|
|||
}
|
||||
|
||||
// Test that basic usage works and doesn't generate errors or crash
|
||||
TYPED_TEST(FenceNVTest, BasicOperations)
|
||||
TEST_P(FenceNVTest, BasicOperations)
|
||||
{
|
||||
if (!extensionEnabled("GL_NV_fence"))
|
||||
{
|
||||
|
@ -144,7 +146,7 @@ TYPED_TEST(FenceNVTest, BasicOperations)
|
|||
}
|
||||
|
||||
// FenceSync objects should respond true to IsSync after they are created with glFenceSync
|
||||
TYPED_TEST(FenceSyncTest, IsSync)
|
||||
TEST_P(FenceSyncTest, IsSync)
|
||||
{
|
||||
GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
EXPECT_GL_NO_ERROR();
|
||||
|
@ -154,7 +156,7 @@ TYPED_TEST(FenceSyncTest, IsSync)
|
|||
}
|
||||
|
||||
// Test error cases for all FenceSync function
|
||||
TYPED_TEST(FenceSyncTest, Errors)
|
||||
TEST_P(FenceSyncTest, Errors)
|
||||
{
|
||||
GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
|
||||
|
@ -206,7 +208,7 @@ TYPED_TEST(FenceSyncTest, Errors)
|
|||
}
|
||||
|
||||
// Test usage of glGetSynciv
|
||||
TYPED_TEST(FenceSyncTest, BasicQueries)
|
||||
TEST_P(FenceSyncTest, BasicQueries)
|
||||
{
|
||||
GLsizei length = 0;
|
||||
GLint value = 0;
|
||||
|
@ -226,7 +228,7 @@ TYPED_TEST(FenceSyncTest, BasicQueries)
|
|||
}
|
||||
|
||||
// Test that basic usage works and doesn't generate errors or crash
|
||||
TYPED_TEST(FenceSyncTest, BasicOperations)
|
||||
TEST_P(FenceSyncTest, BasicOperations)
|
||||
{
|
||||
// TODO(geofflang): Figure out why this is broken on Intel OpenGL
|
||||
if (isIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
|
||||
|
@ -258,3 +260,7 @@ TYPED_TEST(FenceSyncTest, BasicOperations)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(FenceNVTest, ES2_D3D9(), ES2_D3D11(), ES3_D3D11(), ES2_OPENGL(), ES3_OPENGL());
|
||||
ANGLE_INSTANTIATE_TEST(FenceSyncTest, ES3_D3D11(), ES3_OPENGL());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(FramebufferFormatsTest, ES2_D3D9, ES2_D3D11, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class FramebufferFormatsTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
FramebufferFormatsTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
FramebufferFormatsTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -66,7 +70,8 @@ protected:
|
|||
|
||||
void testRenderbufferMultisampleFormat(int minESVersion, GLenum attachmentType, GLenum internalFormat)
|
||||
{
|
||||
if (T::GetGlesMajorVersion() < minESVersion)
|
||||
GLint clientVersion = GetParam().mClientVersion;
|
||||
if (clientVersion < minESVersion)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -74,7 +79,7 @@ protected:
|
|||
// Check that multisample is supported with at least two samples (minimum required is 1)
|
||||
bool supports2Samples = false;
|
||||
|
||||
if (T::GetGlesMajorVersion() == 2)
|
||||
if (clientVersion == 2)
|
||||
{
|
||||
if (extensionEnabled("ANGLE_framebuffer_multisample"))
|
||||
{
|
||||
|
@ -85,7 +90,7 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
assert(T::GetGlesMajorVersion() >= 3);
|
||||
assert(clientVersion >= 3);
|
||||
int maxSamples;
|
||||
glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
|
||||
supports2Samples = maxSamples >= 2;
|
||||
|
@ -125,57 +130,60 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RGBA4)
|
||||
TEST_P(FramebufferFormatsTest, RGBA4)
|
||||
{
|
||||
testTextureFormat(GL_RGBA4, 4, 4, 4, 4);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RGB565)
|
||||
TEST_P(FramebufferFormatsTest, RGB565)
|
||||
{
|
||||
testTextureFormat(GL_RGB565, 5, 6, 5, 0);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RGB8)
|
||||
TEST_P(FramebufferFormatsTest, RGB8)
|
||||
{
|
||||
testTextureFormat(GL_RGB8_OES, 8, 8, 8, 0);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, BGRA8)
|
||||
TEST_P(FramebufferFormatsTest, BGRA8)
|
||||
{
|
||||
testTextureFormat(GL_BGRA8_EXT, 8, 8, 8, 8);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RGBA8)
|
||||
TEST_P(FramebufferFormatsTest, RGBA8)
|
||||
{
|
||||
testTextureFormat(GL_RGBA8_OES, 8, 8, 8, 8);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RenderbufferMultisample_DEPTH16)
|
||||
TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH16)
|
||||
{
|
||||
testRenderbufferMultisampleFormat(2, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT16);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RenderbufferMultisample_DEPTH24)
|
||||
TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH24)
|
||||
{
|
||||
testRenderbufferMultisampleFormat(3, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT24);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RenderbufferMultisample_DEPTH32F)
|
||||
TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH32F)
|
||||
{
|
||||
testRenderbufferMultisampleFormat(3, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT32F);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RenderbufferMultisample_DEPTH24_STENCIL8)
|
||||
TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH24_STENCIL8)
|
||||
{
|
||||
testRenderbufferMultisampleFormat(3, GL_DEPTH_STENCIL_ATTACHMENT, GL_DEPTH24_STENCIL8);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RenderbufferMultisample_DEPTH32F_STENCIL8)
|
||||
TEST_P(FramebufferFormatsTest, RenderbufferMultisample_DEPTH32F_STENCIL8)
|
||||
{
|
||||
testRenderbufferMultisampleFormat(3, GL_DEPTH_STENCIL_ATTACHMENT, GL_DEPTH32F_STENCIL8);
|
||||
}
|
||||
|
||||
TYPED_TEST(FramebufferFormatsTest, RenderbufferMultisample_STENCIL_INDEX8)
|
||||
TEST_P(FramebufferFormatsTest, RenderbufferMultisample_STENCIL_INDEX8)
|
||||
{
|
||||
testRenderbufferMultisampleFormat(2, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX8);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(FramebufferFormatsTest, ES2_D3D9(), ES2_D3D11(), ES3_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(FramebufferRenderMipmapTest, ES2_D3D9, ES2_D3D11, ES3_D3D11, ES2_OPENGL, ES3_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class FramebufferRenderMipmapTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
FramebufferRenderMipmapTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
FramebufferRenderMipmapTest()
|
||||
{
|
||||
setWindowWidth(256);
|
||||
setWindowHeight(256);
|
||||
|
@ -72,7 +76,7 @@ protected:
|
|||
|
||||
// Validate that if we are in ES3 or GL_OES_fbo_render_mipmap exists, there are no validation errors
|
||||
// when using a non-zero level in glFramebufferTexture2D.
|
||||
TYPED_TEST(FramebufferRenderMipmapTest, Validation)
|
||||
TEST_P(FramebufferRenderMipmapTest, Validation)
|
||||
{
|
||||
bool renderToMipmapSupported = extensionEnabled("GL_OES_fbo_render_mipmap") || getClientVersion() > 2;
|
||||
|
||||
|
@ -114,7 +118,7 @@ TYPED_TEST(FramebufferRenderMipmapTest, Validation)
|
|||
}
|
||||
|
||||
// Render to various levels of a texture and check that they have the correct color data via ReadPixels
|
||||
TYPED_TEST(FramebufferRenderMipmapTest, RenderToMipmap)
|
||||
TEST_P(FramebufferRenderMipmapTest, RenderToMipmap)
|
||||
{
|
||||
// TODO(geofflang): Figure out why this is broken on Intel OpenGL
|
||||
if (isIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
|
||||
|
@ -186,3 +190,6 @@ TYPED_TEST(FramebufferRenderMipmapTest, RenderToMipmap)
|
|||
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(FramebufferRenderMipmapTest, ES2_D3D9(), ES2_D3D11(), ES3_D3D11(), ES2_OPENGL(), ES3_OPENGL());
|
||||
|
|
|
@ -9,14 +9,12 @@
|
|||
#include "libANGLE/Context.h"
|
||||
#include "libANGLE/Program.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(GLSLTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class GLSLTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
GLSLTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
GLSLTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -349,18 +347,13 @@ protected:
|
|||
}
|
||||
|
||||
std::string mSimpleVSSource;
|
||||
T fixtureType;
|
||||
};
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(GLSLTest_ES3, ES3_D3D11);
|
||||
|
||||
template<typename T>
|
||||
class GLSLTest_ES3 : public GLSLTest<T>
|
||||
class GLSLTest_ES3 : public GLSLTest
|
||||
{
|
||||
};
|
||||
|
||||
TYPED_TEST(GLSLTest, NamelessScopedStructs)
|
||||
TEST_P(GLSLTest, NamelessScopedStructs)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -382,7 +375,7 @@ TYPED_TEST(GLSLTest, NamelessScopedStructs)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, ScopedStructsOrderBug)
|
||||
TEST_P(GLSLTest, ScopedStructsOrderBug)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -414,7 +407,7 @@ TYPED_TEST(GLSLTest, ScopedStructsOrderBug)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, ScopedStructsBug)
|
||||
TEST_P(GLSLTest, ScopedStructsBug)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -446,7 +439,7 @@ TYPED_TEST(GLSLTest, ScopedStructsBug)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, DxPositionBug)
|
||||
TEST_P(GLSLTest, DxPositionBug)
|
||||
{
|
||||
const std::string &vertexShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -475,7 +468,7 @@ TYPED_TEST(GLSLTest, DxPositionBug)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, ElseIfRewriting)
|
||||
TEST_P(GLSLTest, ElseIfRewriting)
|
||||
{
|
||||
const std::string &vertexShaderSource =
|
||||
"attribute vec4 a_position;\n"
|
||||
|
@ -510,7 +503,7 @@ TYPED_TEST(GLSLTest, ElseIfRewriting)
|
|||
EXPECT_PIXEL_EQ(getWindowWidth()-1, 0, 0, 255, 0, 255);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, TwoElseIfRewriting)
|
||||
TEST_P(GLSLTest, TwoElseIfRewriting)
|
||||
{
|
||||
const std::string &vertexShaderSource =
|
||||
"attribute vec4 a_position;\n"
|
||||
|
@ -537,7 +530,7 @@ TYPED_TEST(GLSLTest, TwoElseIfRewriting)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, InvariantVaryingOut)
|
||||
TEST_P(GLSLTest, InvariantVaryingOut)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -557,9 +550,9 @@ TYPED_TEST(GLSLTest, InvariantVaryingOut)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, FrontFacingAndVarying)
|
||||
TEST_P(GLSLTest, FrontFacingAndVarying)
|
||||
{
|
||||
EGLPlatformParameters platform = fixtureType.GetPlatform();
|
||||
EGLPlatformParameters platform = GetParam().mEGLPlatformParameters;
|
||||
|
||||
// Disable this test on D3D11 feature level 9_3, since gl_FrontFacing isn't supported.
|
||||
if (platform.renderer == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
|
||||
|
@ -605,7 +598,7 @@ TYPED_TEST(GLSLTest, FrontFacingAndVarying)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, InvariantVaryingIn)
|
||||
TEST_P(GLSLTest, InvariantVaryingIn)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -625,7 +618,7 @@ TYPED_TEST(GLSLTest, InvariantVaryingIn)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, InvariantVaryingBoth)
|
||||
TEST_P(GLSLTest, InvariantVaryingBoth)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -645,7 +638,7 @@ TYPED_TEST(GLSLTest, InvariantVaryingBoth)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, InvariantGLPosition)
|
||||
TEST_P(GLSLTest, InvariantGLPosition)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -666,7 +659,7 @@ TYPED_TEST(GLSLTest, InvariantGLPosition)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, InvariantAll)
|
||||
TEST_P(GLSLTest, InvariantAll)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -685,7 +678,7 @@ TYPED_TEST(GLSLTest, InvariantAll)
|
|||
EXPECT_NE(0u, program);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec4)
|
||||
TEST_P(GLSLTest, MaxVaryingVec4)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -693,7 +686,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec4)
|
|||
VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings, 0, false, false, false, true);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxMinusTwoVaryingVec4PlusTwoSpecialVariables)
|
||||
TEST_P(GLSLTest, MaxMinusTwoVaryingVec4PlusTwoSpecialVariables)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -702,7 +695,7 @@ TYPED_TEST(GLSLTest, MaxMinusTwoVaryingVec4PlusTwoSpecialVariables)
|
|||
VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings - 2, 0, true, true, false, true);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxMinusTwoVaryingVec4PlusThreeSpecialVariables)
|
||||
TEST_P(GLSLTest, MaxMinusTwoVaryingVec4PlusThreeSpecialVariables)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -711,7 +704,7 @@ TYPED_TEST(GLSLTest, MaxMinusTwoVaryingVec4PlusThreeSpecialVariables)
|
|||
VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings - 2, 0, true, true, true, true);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec4PlusFragCoord)
|
||||
TEST_P(GLSLTest, MaxVaryingVec4PlusFragCoord)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -721,7 +714,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec4PlusFragCoord)
|
|||
VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings, 0, true, false, false, false);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec4PlusPointCoord)
|
||||
TEST_P(GLSLTest, MaxVaryingVec4PlusPointCoord)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -731,7 +724,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec4PlusPointCoord)
|
|||
VaryingTestBase(0, 0, 0, 0, 0, 0, maxVaryings, 0, false, true, false, false);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec3)
|
||||
TEST_P(GLSLTest, MaxVaryingVec3)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -739,7 +732,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec3)
|
|||
VaryingTestBase(0, 0, 0, 0, maxVaryings, 0, 0, 0, false, false, false, true);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec3Array)
|
||||
TEST_P(GLSLTest, MaxVaryingVec3Array)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -748,7 +741,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec3Array)
|
|||
}
|
||||
|
||||
// Disabled because of a failure in D3D9
|
||||
TYPED_TEST(GLSLTest, DISABLED_MaxVaryingVec3AndOneFloat)
|
||||
TEST_P(GLSLTest, DISABLED_MaxVaryingVec3AndOneFloat)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -757,7 +750,7 @@ TYPED_TEST(GLSLTest, DISABLED_MaxVaryingVec3AndOneFloat)
|
|||
}
|
||||
|
||||
// Disabled because of a failure in D3D9
|
||||
TYPED_TEST(GLSLTest, DISABLED_MaxVaryingVec3ArrayAndOneFloatArray)
|
||||
TEST_P(GLSLTest, DISABLED_MaxVaryingVec3ArrayAndOneFloatArray)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -766,7 +759,7 @@ TYPED_TEST(GLSLTest, DISABLED_MaxVaryingVec3ArrayAndOneFloatArray)
|
|||
}
|
||||
|
||||
// Disabled because of a failure in D3D9
|
||||
TYPED_TEST(GLSLTest, DISABLED_TwiceMaxVaryingVec2)
|
||||
TEST_P(GLSLTest, DISABLED_TwiceMaxVaryingVec2)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -775,7 +768,7 @@ TYPED_TEST(GLSLTest, DISABLED_TwiceMaxVaryingVec2)
|
|||
}
|
||||
|
||||
// Disabled because of a failure in D3D9
|
||||
TYPED_TEST(GLSLTest, DISABLED_MaxVaryingVec2Arrays)
|
||||
TEST_P(GLSLTest, DISABLED_MaxVaryingVec2Arrays)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -783,7 +776,7 @@ TYPED_TEST(GLSLTest, DISABLED_MaxVaryingVec2Arrays)
|
|||
VaryingTestBase(0, 0, 0, maxVaryings, 0, 0, 0, 0, false, false, false, true);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxPlusOneVaryingVec3)
|
||||
TEST_P(GLSLTest, MaxPlusOneVaryingVec3)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -791,7 +784,7 @@ TYPED_TEST(GLSLTest, MaxPlusOneVaryingVec3)
|
|||
VaryingTestBase(0, 0, 0, 0, maxVaryings + 1, 0, 0, 0, false, false, false, false);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxPlusOneVaryingVec3Array)
|
||||
TEST_P(GLSLTest, MaxPlusOneVaryingVec3Array)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -799,7 +792,7 @@ TYPED_TEST(GLSLTest, MaxPlusOneVaryingVec3Array)
|
|||
VaryingTestBase(0, 0, 0, 0, 0, maxVaryings / 2 + 1, 0, 0, false, false, false, false);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec3AndOneVec2)
|
||||
TEST_P(GLSLTest, MaxVaryingVec3AndOneVec2)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -807,7 +800,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec3AndOneVec2)
|
|||
VaryingTestBase(0, 0, 1, 0, maxVaryings, 0, 0, 0, false, false, false, false);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxPlusOneVaryingVec2)
|
||||
TEST_P(GLSLTest, MaxPlusOneVaryingVec2)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -815,7 +808,7 @@ TYPED_TEST(GLSLTest, MaxPlusOneVaryingVec2)
|
|||
VaryingTestBase(0, 0, 2 * maxVaryings + 1, 0, 0, 0, 0, 0, false, false, false, false);
|
||||
}
|
||||
|
||||
TYPED_TEST(GLSLTest, MaxVaryingVec3ArrayAndMaxPlusOneFloatArray)
|
||||
TEST_P(GLSLTest, MaxVaryingVec3ArrayAndMaxPlusOneFloatArray)
|
||||
{
|
||||
GLint maxVaryings = 0;
|
||||
glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryings);
|
||||
|
@ -824,7 +817,7 @@ TYPED_TEST(GLSLTest, MaxVaryingVec3ArrayAndMaxPlusOneFloatArray)
|
|||
}
|
||||
|
||||
// Verify shader source with a fixed length that is less than the null-terminated length will compile.
|
||||
TYPED_TEST(GLSLTest, FixedShaderLength)
|
||||
TEST_P(GLSLTest, FixedShaderLength)
|
||||
{
|
||||
GLuint shader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
|
||||
|
@ -841,7 +834,7 @@ TYPED_TEST(GLSLTest, FixedShaderLength)
|
|||
}
|
||||
|
||||
// Verify that a negative shader source length is treated as a null-terminated length.
|
||||
TYPED_TEST(GLSLTest, NegativeShaderLength)
|
||||
TEST_P(GLSLTest, NegativeShaderLength)
|
||||
{
|
||||
GLuint shader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
|
||||
|
@ -856,7 +849,7 @@ TYPED_TEST(GLSLTest, NegativeShaderLength)
|
|||
}
|
||||
|
||||
// Verify that a length array with mixed positive and negative values compiles.
|
||||
TYPED_TEST(GLSLTest, MixedShaderLengths)
|
||||
TEST_P(GLSLTest, MixedShaderLengths)
|
||||
{
|
||||
GLuint shader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
|
||||
|
@ -885,7 +878,7 @@ TYPED_TEST(GLSLTest, MixedShaderLengths)
|
|||
}
|
||||
|
||||
// Verify that zero-length shader source does not affect shader compilation.
|
||||
TYPED_TEST(GLSLTest, ZeroShaderLength)
|
||||
TEST_P(GLSLTest, ZeroShaderLength)
|
||||
{
|
||||
GLuint shader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
|
||||
|
@ -917,7 +910,7 @@ TYPED_TEST(GLSLTest, ZeroShaderLength)
|
|||
|
||||
// Tests that bad index expressions don't crash ANGLE's translator.
|
||||
// https://code.google.com/p/angleproject/issues/detail?id=857
|
||||
TYPED_TEST(GLSLTest, BadIndexBug)
|
||||
TEST_P(GLSLTest, BadIndexBug)
|
||||
{
|
||||
const std::string &fragmentShaderSourceVec =
|
||||
"precision mediump float;\n"
|
||||
|
@ -970,7 +963,7 @@ TYPED_TEST(GLSLTest, BadIndexBug)
|
|||
|
||||
// Tests that using a global static initialized from a varying works as expected.
|
||||
// See: https://code.google.com/p/angleproject/issues/detail?id=878
|
||||
TYPED_TEST(GLSLTest, GlobalStaticAndVarying)
|
||||
TEST_P(GLSLTest, GlobalStaticAndVarying)
|
||||
{
|
||||
const std::string &vertexShaderSource =
|
||||
"attribute vec4 a_position;\n"
|
||||
|
@ -1000,7 +993,7 @@ TYPED_TEST(GLSLTest, GlobalStaticAndVarying)
|
|||
}
|
||||
|
||||
// Tests that using a global static initialized from gl_InstanceID works as expected.
|
||||
TYPED_TEST(GLSLTest_ES3, GlobalStaticAndInstanceID)
|
||||
TEST_P(GLSLTest_ES3, GlobalStaticAndInstanceID)
|
||||
{
|
||||
const std::string &vertexShaderSource =
|
||||
"#version 300 es\n"
|
||||
|
@ -1058,7 +1051,7 @@ TYPED_TEST(GLSLTest_ES3, GlobalStaticAndInstanceID)
|
|||
}
|
||||
|
||||
// Test that structs defined in uniforms are translated correctly.
|
||||
TYPED_TEST(GLSLTest, StructSpecifiersUniforms)
|
||||
TEST_P(GLSLTest, StructSpecifiersUniforms)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -1081,7 +1074,7 @@ TYPED_TEST(GLSLTest, StructSpecifiersUniforms)
|
|||
// beginning with "gl_" are filtered out by our validation logic, we must
|
||||
// bypass the validation to test the behaviour of the implementation.
|
||||
// (note this test is still Impl-independent)
|
||||
TYPED_TEST(GLSLTest, DepthRangeUniforms)
|
||||
TEST_P(GLSLTest, DepthRangeUniforms)
|
||||
{
|
||||
const std::string fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -1113,7 +1106,7 @@ TYPED_TEST(GLSLTest, DepthRangeUniforms)
|
|||
// Covers the WebGL test 'glsl/bugs/pow-of-small-constant-in-user-defined-function'
|
||||
// See https://code.google.com/p/angleproject/issues/detail?id=851
|
||||
// TODO(jmadill): ANGLE constant folding can fix this
|
||||
TYPED_TEST(GLSLTest, DISABLED_PowOfSmallConstant)
|
||||
TEST_P(GLSLTest, DISABLED_PowOfSmallConstant)
|
||||
{
|
||||
const std::string &fragmentShaderSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -1150,3 +1143,9 @@ TYPED_TEST(GLSLTest, DISABLED_PowOfSmallConstant)
|
|||
EXPECT_PIXEL_EQ(0, 0, 0, 255, 0, 255);
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(GLSLTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(GLSLTest_ES3, ES3_D3D11());
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(IncompleteTextureTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class IncompleteTextureTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
IncompleteTextureTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
IncompleteTextureTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -80,7 +84,7 @@ protected:
|
|||
GLint mTextureUniformLocation;
|
||||
};
|
||||
|
||||
TYPED_TEST(IncompleteTextureTest, IncompleteTexture2D)
|
||||
TEST_P(IncompleteTextureTest, IncompleteTexture2D)
|
||||
{
|
||||
GLuint tex;
|
||||
glGenTextures(1, &tex);
|
||||
|
@ -114,7 +118,7 @@ TYPED_TEST(IncompleteTextureTest, IncompleteTexture2D)
|
|||
glDeleteTextures(1, &tex);
|
||||
}
|
||||
|
||||
TYPED_TEST(IncompleteTextureTest, UpdateTexture)
|
||||
TEST_P(IncompleteTextureTest, UpdateTexture)
|
||||
{
|
||||
GLuint tex;
|
||||
glGenTextures(1, &tex);
|
||||
|
@ -157,3 +161,6 @@ TYPED_TEST(IncompleteTextureTest, UpdateTexture)
|
|||
|
||||
glDeleteTextures(1, &tex);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(IncompleteTextureTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
template <typename T, typename IndexType, GLenum IndexTypeName>
|
||||
using namespace angle;
|
||||
|
||||
template <typename IndexType, GLenum IndexTypeName>
|
||||
class IndexedPointsTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
IndexedPointsTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
IndexedPointsTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -123,53 +132,53 @@ protected:
|
|||
static const GLuint mPointCount = 4;
|
||||
};
|
||||
|
||||
typedef IndexedPointsTest<ES2_D3D11, GLubyte, GL_UNSIGNED_BYTE> IndexedPointsTestUByte;
|
||||
typedef IndexedPointsTest<GLubyte, GL_UNSIGNED_BYTE> IndexedPointsTestUByte;
|
||||
|
||||
TEST_F(IndexedPointsTestUByte, UnsignedByteOffset0)
|
||||
TEST_P(IndexedPointsTestUByte, UnsignedByteOffset0)
|
||||
{
|
||||
runTest(0);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUByte, UnsignedByteOffset1)
|
||||
TEST_P(IndexedPointsTestUByte, UnsignedByteOffset1)
|
||||
{
|
||||
runTest(1);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUByte, UnsignedByteOffset2)
|
||||
TEST_P(IndexedPointsTestUByte, UnsignedByteOffset2)
|
||||
{
|
||||
runTest(2);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUByte, UnsignedByteOffset3)
|
||||
TEST_P(IndexedPointsTestUByte, UnsignedByteOffset3)
|
||||
{
|
||||
runTest(3);
|
||||
}
|
||||
|
||||
typedef IndexedPointsTest<ES2_D3D11, GLushort, GL_UNSIGNED_SHORT> IndexedPointsTestUShort;
|
||||
typedef IndexedPointsTest<GLushort, GL_UNSIGNED_SHORT> IndexedPointsTestUShort;
|
||||
|
||||
TEST_F(IndexedPointsTestUShort, UnsignedShortOffset0)
|
||||
TEST_P(IndexedPointsTestUShort, UnsignedShortOffset0)
|
||||
{
|
||||
runTest(0);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUShort, UnsignedShortOffset1)
|
||||
TEST_P(IndexedPointsTestUShort, UnsignedShortOffset1)
|
||||
{
|
||||
runTest(1);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUShort, UnsignedShortOffset2)
|
||||
TEST_P(IndexedPointsTestUShort, UnsignedShortOffset2)
|
||||
{
|
||||
runTest(2);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUShort, UnsignedShortOffset3)
|
||||
TEST_P(IndexedPointsTestUShort, UnsignedShortOffset3)
|
||||
{
|
||||
runTest(3);
|
||||
}
|
||||
|
||||
typedef IndexedPointsTest<ES2_D3D11, GLuint, GL_UNSIGNED_INT> IndexedPointsTestUInt;
|
||||
typedef IndexedPointsTest<GLuint, GL_UNSIGNED_INT> IndexedPointsTestUInt;
|
||||
|
||||
TEST_F(IndexedPointsTestUInt, UnsignedIntOffset0)
|
||||
TEST_P(IndexedPointsTestUInt, UnsignedIntOffset0)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_OES_element_index_uint"))
|
||||
{
|
||||
|
@ -179,7 +188,7 @@ TEST_F(IndexedPointsTestUInt, UnsignedIntOffset0)
|
|||
runTest(0);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUInt, UnsignedIntOffset1)
|
||||
TEST_P(IndexedPointsTestUInt, UnsignedIntOffset1)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_OES_element_index_uint"))
|
||||
{
|
||||
|
@ -189,7 +198,7 @@ TEST_F(IndexedPointsTestUInt, UnsignedIntOffset1)
|
|||
runTest(1);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUInt, UnsignedIntOffset2)
|
||||
TEST_P(IndexedPointsTestUInt, UnsignedIntOffset2)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_OES_element_index_uint"))
|
||||
{
|
||||
|
@ -199,7 +208,7 @@ TEST_F(IndexedPointsTestUInt, UnsignedIntOffset2)
|
|||
runTest(2);
|
||||
}
|
||||
|
||||
TEST_F(IndexedPointsTestUInt, UnsignedIntOffset3)
|
||||
TEST_P(IndexedPointsTestUInt, UnsignedIntOffset3)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_OES_element_index_uint"))
|
||||
{
|
||||
|
@ -208,3 +217,7 @@ TEST_F(IndexedPointsTestUInt, UnsignedIntOffset3)
|
|||
|
||||
runTest(3);
|
||||
}
|
||||
|
||||
ANGLE_INSTANTIATE_TEST(IndexedPointsTestUByte, ES2_D3D11());
|
||||
ANGLE_INSTANTIATE_TEST(IndexedPointsTestUShort, ES2_D3D11());
|
||||
ANGLE_INSTANTIATE_TEST(IndexedPointsTestUInt, ES2_D3D11());
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// We test on D3D9 and D3D11 9_3 because they use special codepaths when attribute zero is instanced, unlike D3D11.
|
||||
ANGLE_TYPED_TEST_CASE(InstancingTestAllConfigs, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3);
|
||||
using namespace angle;
|
||||
|
||||
// TODO(jmadill): Figure out the situation with DrawInstanced on FL 9_3
|
||||
ANGLE_TYPED_TEST_CASE(InstancingTestNo9_3, ES2_D3D9, ES2_D3D11);
|
||||
|
||||
template<typename T>
|
||||
class InstancingTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
InstancingTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
InstancingTest()
|
||||
{
|
||||
setWindowWidth(256);
|
||||
setWindowHeight(256);
|
||||
|
@ -243,15 +243,13 @@ class InstancingTest : public ANGLETest
|
|||
const GLfloat quadRadius = 0.30f;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class InstancingTestAllConfigs : public InstancingTest<T>
|
||||
class InstancingTestAllConfigs : public InstancingTest
|
||||
{
|
||||
protected:
|
||||
InstancingTestAllConfigs() {}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class InstancingTestNo9_3 : public InstancingTest<T>
|
||||
class InstancingTestNo9_3 : public InstancingTest
|
||||
{
|
||||
protected:
|
||||
InstancingTestNo9_3() {}
|
||||
|
@ -260,7 +258,7 @@ class InstancingTestNo9_3 : public InstancingTest<T>
|
|||
// This test uses a vertex shader with the first attribute (attribute zero) instanced.
|
||||
// On D3D9 and D3D11 FL9_3, this triggers a special codepath that rearranges the input layout sent to D3D,
|
||||
// to ensure that slot/stream zero of the input layout doesn't contain per-instance data.
|
||||
TYPED_TEST(InstancingTestAllConfigs, AttributeZeroInstanced)
|
||||
TEST_P(InstancingTestAllConfigs, AttributeZeroInstanced)
|
||||
{
|
||||
const std::string vs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -277,7 +275,7 @@ TYPED_TEST(InstancingTestAllConfigs, AttributeZeroInstanced)
|
|||
|
||||
// Same as AttributeZeroInstanced, but attribute zero is not instanced.
|
||||
// This ensures the general instancing codepath (i.e. without rearranging the input layout) works as expected.
|
||||
TYPED_TEST(InstancingTestAllConfigs, AttributeZeroNotInstanced)
|
||||
TEST_P(InstancingTestAllConfigs, AttributeZeroNotInstanced)
|
||||
{
|
||||
const std::string vs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -294,7 +292,7 @@ TYPED_TEST(InstancingTestAllConfigs, AttributeZeroNotInstanced)
|
|||
|
||||
// Tests that the "first" parameter to glDrawArraysInstancedANGLE is only an offset into
|
||||
// the non-instanced vertex attributes.
|
||||
TYPED_TEST(InstancingTestNo9_3, DrawArraysWithOffset)
|
||||
TEST_P(InstancingTestNo9_3, DrawArraysWithOffset)
|
||||
{
|
||||
const std::string vs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -320,3 +318,10 @@ TYPED_TEST(InstancingTestNo9_3, DrawArraysWithOffset)
|
|||
|
||||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// We test on D3D9 and D3D11 9_3 because they use special codepaths when attribute zero is instanced, unlike D3D11.
|
||||
ANGLE_INSTANTIATE_TEST(InstancingTestAllConfigs, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3());
|
||||
|
||||
// TODO(jmadill): Figure out the situation with DrawInstanced on FL 9_3
|
||||
ANGLE_INSTANTIATE_TEST(InstancingTestNo9_3, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(LineLoopTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class LineLoopTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
LineLoopTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
LineLoopTest()
|
||||
{
|
||||
setWindowWidth(256);
|
||||
setWindowHeight(256);
|
||||
|
@ -130,19 +134,19 @@ protected:
|
|||
GLint mColorLocation;
|
||||
};
|
||||
|
||||
TYPED_TEST(LineLoopTest, LineLoopUByteIndices)
|
||||
TEST_P(LineLoopTest, LineLoopUByteIndices)
|
||||
{
|
||||
static const GLubyte indices[] = { 0, 7, 6, 9, 8, 0 };
|
||||
runTest(GL_UNSIGNED_BYTE, 0, indices + 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(LineLoopTest, LineLoopUShortIndices)
|
||||
TEST_P(LineLoopTest, LineLoopUShortIndices)
|
||||
{
|
||||
static const GLushort indices[] = { 0, 7, 6, 9, 8, 0 };
|
||||
runTest(GL_UNSIGNED_SHORT, 0, indices + 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(LineLoopTest, LineLoopUIntIndices)
|
||||
TEST_P(LineLoopTest, LineLoopUIntIndices)
|
||||
{
|
||||
if (!extensionEnabled("GL_OES_element_index_uint"))
|
||||
{
|
||||
|
@ -153,7 +157,7 @@ TYPED_TEST(LineLoopTest, LineLoopUIntIndices)
|
|||
runTest(GL_UNSIGNED_INT, 0, indices + 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(LineLoopTest, LineLoopUByteIndexBuffer)
|
||||
TEST_P(LineLoopTest, LineLoopUByteIndexBuffer)
|
||||
{
|
||||
static const GLubyte indices[] = { 0, 7, 6, 9, 8, 0 };
|
||||
|
||||
|
@ -167,7 +171,7 @@ TYPED_TEST(LineLoopTest, LineLoopUByteIndexBuffer)
|
|||
glDeleteBuffers(1, &buf);
|
||||
}
|
||||
|
||||
TYPED_TEST(LineLoopTest, LineLoopUShortIndexBuffer)
|
||||
TEST_P(LineLoopTest, LineLoopUShortIndexBuffer)
|
||||
{
|
||||
static const GLushort indices[] = { 0, 7, 6, 9, 8, 0 };
|
||||
|
||||
|
@ -181,7 +185,7 @@ TYPED_TEST(LineLoopTest, LineLoopUShortIndexBuffer)
|
|||
glDeleteBuffers(1, &buf);
|
||||
}
|
||||
|
||||
TYPED_TEST(LineLoopTest, LineLoopUIntIndexBuffer)
|
||||
TEST_P(LineLoopTest, LineLoopUIntIndexBuffer)
|
||||
{
|
||||
if (!extensionEnabled("GL_OES_element_index_uint"))
|
||||
{
|
||||
|
@ -199,3 +203,6 @@ TYPED_TEST(LineLoopTest, LineLoopUIntIndexBuffer)
|
|||
|
||||
glDeleteBuffers(1, &buf);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(LineLoopTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(MaxTextureSizeTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class MaxTextureSizeTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
MaxTextureSizeTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
MaxTextureSizeTest()
|
||||
{
|
||||
setWindowWidth(512);
|
||||
setWindowHeight(512);
|
||||
|
@ -90,7 +94,7 @@ protected:
|
|||
GLint mMaxRenderbufferSize;
|
||||
};
|
||||
|
||||
TYPED_TEST(MaxTextureSizeTest, SpecificationTexImage)
|
||||
TEST_P(MaxTextureSizeTest, SpecificationTexImage)
|
||||
{
|
||||
GLuint tex;
|
||||
glGenTextures(1, &tex);
|
||||
|
@ -145,7 +149,7 @@ TYPED_TEST(MaxTextureSizeTest, SpecificationTexImage)
|
|||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(MaxTextureSizeTest, SpecificationTexStorage)
|
||||
TEST_P(MaxTextureSizeTest, SpecificationTexStorage)
|
||||
{
|
||||
if (getClientVersion() < 3 && (!extensionEnabled("GL_EXT_texture_storage") || !extensionEnabled("GL_OES_rgb8_rgba8")))
|
||||
{
|
||||
|
@ -215,7 +219,7 @@ TYPED_TEST(MaxTextureSizeTest, SpecificationTexStorage)
|
|||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(MaxTextureSizeTest, RenderToTexture)
|
||||
TEST_P(MaxTextureSizeTest, RenderToTexture)
|
||||
{
|
||||
GLuint fbo = 0;
|
||||
GLuint textureId = 0;
|
||||
|
@ -280,3 +284,6 @@ TYPED_TEST(MaxTextureSizeTest, RenderToTexture)
|
|||
glDeleteFramebuffers(1, &fbo);
|
||||
glDeleteTextures(1, &textureId);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(MaxTextureSizeTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// Note: we run these tests against 9_3 on WARP due to hardware driver issues on Win7
|
||||
ANGLE_TYPED_TEST_CASE(MipmapTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3_WARP, ES2_OPENGL, ES3_OPENGL);
|
||||
ANGLE_TYPED_TEST_CASE(MipmapTestES3, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class MipmapTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
MipmapTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
MipmapTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -214,11 +216,10 @@ class MipmapTest : public ANGLETest
|
|||
GLubyte* mLevelTwoInitData;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class MipmapTestES3 : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
MipmapTestES3() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
MipmapTestES3()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -362,7 +363,7 @@ protected:
|
|||
// This test uses init data for the first three levels of the texture. It passes the level 0 data in, then renders, then level 1, then renders, etc.
|
||||
// This ensures that renderers using the zero LOD workaround (e.g. D3D11 FL9_3) correctly pass init data to the mipmapped texture,
|
||||
// even if the the zero-LOD texture is currently in use.
|
||||
TYPED_TEST(MipmapTest, DISABLED_ThreeLevelsInitData)
|
||||
TEST_P(MipmapTest, DISABLED_ThreeLevelsInitData)
|
||||
{
|
||||
// Pass in level zero init data.
|
||||
glBindTexture(GL_TEXTURE_2D, mOffscreenTexture2D);
|
||||
|
@ -468,7 +469,7 @@ TYPED_TEST(MipmapTest, DISABLED_ThreeLevelsInitData)
|
|||
// To do this, D3D11 has to convert the TextureStorage into a renderable one.
|
||||
// This test ensures that the conversion works correctly.
|
||||
// In particular, on D3D11 Feature Level 9_3 it ensures that both the zero LOD workaround texture AND the 'normal' texture are copied during conversion.
|
||||
TYPED_TEST(MipmapTest, GenerateMipmapFromInitDataThenRender)
|
||||
TEST_P(MipmapTest, GenerateMipmapFromInitDataThenRender)
|
||||
{
|
||||
// Pass in initial data so the texture is blue.
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, getWindowWidth(), getWindowHeight(), 0, GL_RGB, GL_UNSIGNED_BYTE, mLevelZeroBlueInitData);
|
||||
|
@ -523,7 +524,7 @@ TYPED_TEST(MipmapTest, GenerateMipmapFromInitDataThenRender)
|
|||
// This test ensures that mips are correctly generated from a rendered image.
|
||||
// In particular, on D3D11 Feature Level 9_3, the clear call will be performed on the zero-level texture, rather than the mipped one.
|
||||
// The test ensures that the zero-level texture is correctly copied into the mipped texture before the mipmaps are generated.
|
||||
TYPED_TEST(MipmapTest, GenerateMipmapFromRenderedImage)
|
||||
TEST_P(MipmapTest, GenerateMipmapFromRenderedImage)
|
||||
{
|
||||
// Bind the offscreen framebuffer/texture.
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mOffscreenFramebuffer);
|
||||
|
@ -554,7 +555,7 @@ TYPED_TEST(MipmapTest, GenerateMipmapFromRenderedImage)
|
|||
|
||||
// Test to ensure that rendering to a mipmapped texture works, regardless of whether mipmaps are enabled or not.
|
||||
// TODO: This test hits a texture rebind bug in the D3D11 renderer. Fix this.
|
||||
TYPED_TEST(MipmapTest, RenderOntoLevelZeroAfterGenerateMipmap)
|
||||
TEST_P(MipmapTest, RenderOntoLevelZeroAfterGenerateMipmap)
|
||||
{
|
||||
// TODO(geofflang): Figure out why this is broken on AMD OpenGL
|
||||
if (isAMD() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
|
||||
|
@ -630,7 +631,7 @@ TYPED_TEST(MipmapTest, RenderOntoLevelZeroAfterGenerateMipmap)
|
|||
|
||||
// This test ensures that the level-zero workaround for TextureCubes (on D3D11 Feature Level 9_3)
|
||||
// works as expected. It tests enabling/disabling mipmaps, generating mipmaps, and rendering to level zero.
|
||||
TYPED_TEST(MipmapTest, TextureCubeGeneralLevelZero)
|
||||
TEST_P(MipmapTest, TextureCubeGeneralLevelZero)
|
||||
{
|
||||
GLfloat vertexLocations[] =
|
||||
{
|
||||
|
@ -704,7 +705,7 @@ TYPED_TEST(MipmapTest, TextureCubeGeneralLevelZero)
|
|||
}
|
||||
|
||||
// This test ensures that rendering to level-zero of a TextureCube works as expected.
|
||||
TYPED_TEST(MipmapTest, TextureCubeRenderToLevelZero)
|
||||
TEST_P(MipmapTest, TextureCubeRenderToLevelZero)
|
||||
{
|
||||
GLfloat vertexLocations[] =
|
||||
{
|
||||
|
@ -756,7 +757,7 @@ TYPED_TEST(MipmapTest, TextureCubeRenderToLevelZero)
|
|||
|
||||
// Creates a mipmapped 2D array texture with three layers, and calls ANGLE's GenerateMipmap.
|
||||
// Then tests if the mipmaps are rendered correctly for all three layers.
|
||||
TYPED_TEST(MipmapTestES3, MipmapsForTextureArray)
|
||||
TEST_P(MipmapTestES3, MipmapsForTextureArray)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -838,7 +839,7 @@ TYPED_TEST(MipmapTestES3, MipmapsForTextureArray)
|
|||
|
||||
// Creates a mipmapped 3D texture with two layers, and calls ANGLE's GenerateMipmap.
|
||||
// Then tests if the mipmaps are rendered correctly for all two layers.
|
||||
TYPED_TEST(MipmapTestES3, MipmapsForTexture3D)
|
||||
TEST_P(MipmapTestES3, MipmapsForTexture3D)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -916,3 +917,8 @@ TYPED_TEST(MipmapTestES3, MipmapsForTexture3D)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
EXPECT_PIXEL_EQ(px, py, 127, 127, 0, 255);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// Note: we run these tests against 9_3 on WARP due to hardware driver issues on Win7
|
||||
ANGLE_INSTANTIATE_TEST(MipmapTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3_WARP(), ES2_OPENGL(), ES3_OPENGL());
|
||||
ANGLE_INSTANTIATE_TEST(MipmapTestES3, ES3_D3D11());
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Needed for Sleep()
|
||||
#include <Windows.h>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(OcclusionQueriesTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class OcclusionQueriesTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
OcclusionQueriesTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
OcclusionQueriesTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -62,7 +66,7 @@ protected:
|
|||
GLuint mProgram;
|
||||
};
|
||||
|
||||
TYPED_TEST(OcclusionQueriesTest, IsOccluded)
|
||||
TEST_P(OcclusionQueriesTest, IsOccluded)
|
||||
{
|
||||
glDepthMask(GL_TRUE);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
@ -102,7 +106,7 @@ TYPED_TEST(OcclusionQueriesTest, IsOccluded)
|
|||
EXPECT_EQ(result, GL_FALSE);
|
||||
}
|
||||
|
||||
TYPED_TEST(OcclusionQueriesTest, IsNotOccluded)
|
||||
TEST_P(OcclusionQueriesTest, IsNotOccluded)
|
||||
{
|
||||
glDepthMask(GL_TRUE);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
@ -129,7 +133,7 @@ TYPED_TEST(OcclusionQueriesTest, IsNotOccluded)
|
|||
EXPECT_EQ(result, GL_TRUE);
|
||||
}
|
||||
|
||||
TYPED_TEST(OcclusionQueriesTest, Errors)
|
||||
TEST_P(OcclusionQueriesTest, Errors)
|
||||
{
|
||||
glDepthMask(GL_TRUE);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
@ -183,3 +187,6 @@ TYPED_TEST(OcclusionQueriesTest, Errors)
|
|||
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(OcclusionQueriesTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(PBOExtensionTest, ES2_D3D11, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class PBOExtensionTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
PBOExtensionTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
PBOExtensionTest()
|
||||
{
|
||||
setWindowWidth(32);
|
||||
setWindowHeight(32);
|
||||
|
@ -76,7 +80,7 @@ protected:
|
|||
GLuint mPositionVBO;
|
||||
};
|
||||
|
||||
TYPED_TEST(PBOExtensionTest, PBOWithOtherTarget)
|
||||
TEST_P(PBOExtensionTest, PBOWithOtherTarget)
|
||||
{
|
||||
if (extensionEnabled("NV_pixel_buffer_object"))
|
||||
{
|
||||
|
@ -104,7 +108,7 @@ TYPED_TEST(PBOExtensionTest, PBOWithOtherTarget)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(PBOExtensionTest, PBOWithExistingData)
|
||||
TEST_P(PBOExtensionTest, PBOWithExistingData)
|
||||
{
|
||||
if (extensionEnabled("NV_pixel_buffer_object"))
|
||||
{
|
||||
|
@ -144,3 +148,6 @@ TYPED_TEST(PBOExtensionTest, PBOWithExistingData)
|
|||
}
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(PBOExtensionTest, ES2_D3D11(), ES3_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(PbufferTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL, ES2_D3D11_WARP, ES2_D3D11_REFERENCE);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class PbufferTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
PbufferTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
PbufferTest()
|
||||
{
|
||||
setWindowWidth(512);
|
||||
setWindowHeight(512);
|
||||
|
@ -109,7 +113,7 @@ class PbufferTest : public ANGLETest
|
|||
};
|
||||
|
||||
// Test clearing a Pbuffer and checking the color is correct
|
||||
TYPED_TEST(PbufferTest, Clearing)
|
||||
TEST_P(PbufferTest, Clearing)
|
||||
{
|
||||
if (!mSupportsPbuffers)
|
||||
{
|
||||
|
@ -145,7 +149,7 @@ TYPED_TEST(PbufferTest, Clearing)
|
|||
}
|
||||
|
||||
// Bind the Pbuffer to a texture and verify it renders correctly
|
||||
TYPED_TEST(PbufferTest, BindTexImage)
|
||||
TEST_P(PbufferTest, BindTexImage)
|
||||
{
|
||||
if (!mSupportsPbuffers)
|
||||
{
|
||||
|
@ -208,7 +212,7 @@ TYPED_TEST(PbufferTest, BindTexImage)
|
|||
|
||||
// Verify that when eglBind/ReleaseTexImage are called, the texture images are freed and their
|
||||
// size information is correctly updated.
|
||||
TYPED_TEST(PbufferTest, TextureSizeReset)
|
||||
TEST_P(PbufferTest, TextureSizeReset)
|
||||
{
|
||||
if (!mSupportsPbuffers)
|
||||
{
|
||||
|
@ -261,3 +265,6 @@ TYPED_TEST(PbufferTest, TextureSizeReset)
|
|||
drawQuad(mTextureProgram, "position", 0.5f);
|
||||
EXPECT_PIXEL_EQ(0, 0, 0, 0, 0, 255);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(PbufferTest, ES2_D3D9(), ES2_D3D11(), ES2_OPENGL(), ES2_D3D11_WARP(), ES2_D3D11_REFERENCE());
|
||||
|
|
|
@ -1,24 +1,21 @@
|
|||
#include "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES
|
||||
// major version) these tests should be run against.
|
||||
//
|
||||
// Copyright 2015 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.
|
||||
//
|
||||
// Some of the pointsprite tests below were ported from Khronos WebGL
|
||||
// conformance test suite.
|
||||
|
||||
//
|
||||
// We test on D3D11 9_3 because the existing D3D11 PointSprite implementation
|
||||
// uses Geometry Shaders which are not supported for 9_3.
|
||||
// D3D9 and D3D11 are also tested to ensure no regressions.
|
||||
ANGLE_TYPED_TEST_CASE(PointSpritesTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3);
|
||||
#include "ANGLETest.h"
|
||||
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class PointSpritesTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
const int windowWidth = 256;
|
||||
const int windowHeight = 256;
|
||||
PointSpritesTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
PointSpritesTest()
|
||||
{
|
||||
setWindowWidth(windowWidth);
|
||||
setWindowHeight(windowHeight);
|
||||
|
@ -41,7 +38,7 @@ class PointSpritesTest : public ANGLETest
|
|||
|
||||
// Checks gl_PointCoord and gl_PointSize
|
||||
// https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/variables/gl-pointcoord.html
|
||||
TYPED_TEST(PointSpritesTest, PointCoordAndPointSizeCompliance)
|
||||
TEST_P(PointSpritesTest, PointCoordAndPointSizeCompliance)
|
||||
{
|
||||
const std::string fs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -146,7 +143,7 @@ TYPED_TEST(PointSpritesTest, PointCoordAndPointSizeCompliance)
|
|||
|
||||
// Verify that drawing a point without enabling any attributes succeeds
|
||||
// https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/point-no-attributes.html
|
||||
TYPED_TEST(PointSpritesTest, PointWithoutAttributesCompliance)
|
||||
TEST_P(PointSpritesTest, PointWithoutAttributesCompliance)
|
||||
{
|
||||
const std::string fs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -181,7 +178,7 @@ TYPED_TEST(PointSpritesTest, PointWithoutAttributesCompliance)
|
|||
|
||||
// This is a regression test for a graphics driver bug affecting end caps on roads in MapsGL
|
||||
// https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html
|
||||
TYPED_TEST(PointSpritesTest, PointCoordRegressionTest)
|
||||
TEST_P(PointSpritesTest, PointCoordRegressionTest)
|
||||
{
|
||||
const std::string fs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -266,7 +263,7 @@ TYPED_TEST(PointSpritesTest, PointCoordRegressionTest)
|
|||
|
||||
// Verify GL_VERTEX_PROGRAM_POINT_SIZE is enabled
|
||||
// https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/point-size.html
|
||||
TYPED_TEST(PointSpritesTest, PointSizeEnabledCompliance)
|
||||
TEST_P(PointSpritesTest, PointSizeEnabledCompliance)
|
||||
{
|
||||
const std::string fs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -390,7 +387,7 @@ TYPED_TEST(PointSpritesTest, PointSizeEnabledCompliance)
|
|||
}
|
||||
|
||||
// Verify that rendering works correctly when gl_PointSize is declared in a shader but isn't used
|
||||
TYPED_TEST(PointSpritesTest, PointSizeDeclaredButUnused)
|
||||
TEST_P(PointSpritesTest, PointSizeDeclaredButUnused)
|
||||
{
|
||||
const std::string vs = SHADER_SOURCE
|
||||
(
|
||||
|
@ -424,3 +421,11 @@ TYPED_TEST(PointSpritesTest, PointSizeDeclaredButUnused)
|
|||
|
||||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES
|
||||
// major version) these tests should be run against.
|
||||
//
|
||||
// We test on D3D11 9_3 because the existing D3D11 PointSprite implementation
|
||||
// uses Geometry Shaders which are not supported for 9_3.
|
||||
// D3D9 and D3D11 are also tested to ensure no regressions.
|
||||
ANGLE_INSTANTIATE_TEST(PointSpritesTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3());
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(ProgramBinaryTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class ProgramBinaryTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
ProgramBinaryTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
ProgramBinaryTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -68,7 +73,7 @@ class ProgramBinaryTest : public ANGLETest
|
|||
|
||||
// This tests the assumption that float attribs of different size
|
||||
// should not internally cause a vertex shader recompile (for conversion).
|
||||
TYPED_TEST(ProgramBinaryTest, FloatDynamicShaderSize)
|
||||
TEST_P(ProgramBinaryTest, FloatDynamicShaderSize)
|
||||
{
|
||||
glUseProgram(mProgram);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
|
@ -96,7 +101,7 @@ TYPED_TEST(ProgramBinaryTest, FloatDynamicShaderSize)
|
|||
}
|
||||
|
||||
// This tests the ability to successfully save and load a program binary.
|
||||
TYPED_TEST(ProgramBinaryTest, SaveAndLoadBinary)
|
||||
TEST_P(ProgramBinaryTest, SaveAndLoadBinary)
|
||||
{
|
||||
GLint programLength = 0;
|
||||
GLint writtenLength = 0;
|
||||
|
@ -152,3 +157,6 @@ TYPED_TEST(ProgramBinaryTest, SaveAndLoadBinary)
|
|||
glDeleteProgram(program2);
|
||||
}
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(ProgramBinaryTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -15,14 +15,12 @@
|
|||
#include "ANGLETest.h"
|
||||
#include "com_utils.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(QueryDisplayAttributeTest, ES2_D3D9, ES2_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class QueryDisplayAttributeTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
QueryDisplayAttributeTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
QueryDisplayAttributeTest()
|
||||
{
|
||||
mQueryDisplayAttribEXT = nullptr;
|
||||
mQueryDeviceAttribEXT = nullptr;
|
||||
|
@ -78,7 +76,7 @@ class QueryDisplayAttributeTest : public ANGLETest
|
|||
// This test attempts to obtain a D3D11 device and a D3D9 device using the eglQueryDeviceAttribEXT function.
|
||||
// If the test is configured to use D3D11 then it should succeed to obtain a D3D11 device.
|
||||
// If the test is confitured to use D3D9, then it should succeed to obtain a D3D9 device.
|
||||
TYPED_TEST(QueryDisplayAttributeTest, QueryDevice)
|
||||
TEST_P(QueryDisplayAttributeTest, QueryDevice)
|
||||
{
|
||||
EGLAttrib device = 0;
|
||||
EGLAttrib angleDevice = 0;
|
||||
|
@ -108,7 +106,7 @@ TYPED_TEST(QueryDisplayAttributeTest, QueryDevice)
|
|||
// a D3D11 configured system using the eglQueryDeviceAttribEXT function.
|
||||
// If the test is configured to use D3D11 then it should fail to obtain a D3D11 device.
|
||||
// If the test is confitured to use D3D9, then it should fail to obtain a D3D9 device.
|
||||
TYPED_TEST(QueryDisplayAttributeTest, QueryDeviceBadAttrbiute)
|
||||
TEST_P(QueryDisplayAttributeTest, QueryDeviceBadAttrbiute)
|
||||
{
|
||||
EGLAttrib device = 0;
|
||||
EGLAttrib angleDevice = 0;
|
||||
|
@ -124,3 +122,6 @@ TYPED_TEST(QueryDisplayAttributeTest, QueryDeviceBadAttrbiute)
|
|||
EXPECT_EQ(EGL_FALSE, mQueryDeviceAttribEXT(reinterpret_cast<EGLDeviceEXT>(angleDevice), EGL_D3D11_DEVICE_ANGLE, &device));
|
||||
}
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(QueryDisplayAttributeTest, ES2_D3D9(), ES2_D3D11());
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(ReadPixelsTest, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
template<typename T>
|
||||
class ReadPixelsTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
ReadPixelsTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
ReadPixelsTest()
|
||||
{
|
||||
setWindowWidth(32);
|
||||
setWindowHeight(32);
|
||||
|
@ -87,7 +91,7 @@ protected:
|
|||
GLuint mPositionVBO;
|
||||
};
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, OutOfBounds)
|
||||
TEST_P(ReadPixelsTest, OutOfBounds)
|
||||
{
|
||||
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
@ -120,7 +124,7 @@ TYPED_TEST(ReadPixelsTest, OutOfBounds)
|
|||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, PBOWithOtherTarget)
|
||||
TEST_P(ReadPixelsTest, PBOWithOtherTarget)
|
||||
{
|
||||
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
@ -145,7 +149,7 @@ TYPED_TEST(ReadPixelsTest, PBOWithOtherTarget)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, PBOWithExistingData)
|
||||
TEST_P(ReadPixelsTest, PBOWithExistingData)
|
||||
{
|
||||
// Clear backbuffer to red
|
||||
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
@ -183,7 +187,7 @@ TYPED_TEST(ReadPixelsTest, PBOWithExistingData)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, PBOAndSubData)
|
||||
TEST_P(ReadPixelsTest, PBOAndSubData)
|
||||
{
|
||||
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
@ -211,7 +215,7 @@ TYPED_TEST(ReadPixelsTest, PBOAndSubData)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, PBOAndSubDataOffset)
|
||||
TEST_P(ReadPixelsTest, PBOAndSubDataOffset)
|
||||
{
|
||||
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
@ -244,7 +248,7 @@ TYPED_TEST(ReadPixelsTest, PBOAndSubDataOffset)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, DrawWithPBO)
|
||||
TEST_P(ReadPixelsTest, DrawWithPBO)
|
||||
{
|
||||
unsigned char data[4] = { 1, 2, 3, 4 };
|
||||
|
||||
|
@ -297,7 +301,7 @@ TYPED_TEST(ReadPixelsTest, DrawWithPBO)
|
|||
EXPECT_EQ(4, data[3]);
|
||||
}
|
||||
|
||||
TYPED_TEST(ReadPixelsTest, MultisampledPBO)
|
||||
TEST_P(ReadPixelsTest, MultisampledPBO)
|
||||
{
|
||||
if (getClientVersion() < 3 && !extensionEnabled("GL_ANGLE_framebuffer_multisample"))
|
||||
{
|
||||
|
@ -340,3 +344,6 @@ TYPED_TEST(ReadPixelsTest, MultisampledPBO)
|
|||
glDeleteRenderbuffers(1, &rbo);
|
||||
glDeleteFramebuffers(1, &fbo);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(ReadPixelsTest, ES3_D3D11());
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
//
|
||||
// Copyright 2015 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.
|
||||
//
|
||||
// RendererTest:
|
||||
// These tests are designed to ensure that the various configurations of the test fixtures work as expected.
|
||||
// If one of these tests fails, then it is likely that some of the other tests are being configured incorrectly.
|
||||
// For example, they might be using the D3D11 renderer when the test is meant to be using the D3D9 renderer.
|
||||
|
||||
#include "ANGLETest.h"
|
||||
|
||||
// These tests are designed to ensure that the various configurations of the test fixtures work as expected.
|
||||
// If one of these tests fails, then it is likely that some of the other tests are being configured incorrectly.
|
||||
// For example, they might be using the D3D11 renderer when the test is meant to be using the D3D9 renderer.
|
||||
using namespace angle;
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
namespace
|
||||
{
|
||||
|
||||
ANGLE_TYPED_TEST_CASE(RendererTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_WARP, ES2_D3D11_REFERENCE, ES3_D3D11, ES3_D3D11_WARP, ES3_D3D11_REFERENCE, ES2_OPENGL,
|
||||
ES2_D3D9_REFERENCE, ES2_D3D11_FL11_0, ES2_D3D11_FL11_0_WARP, ES2_D3D11_FL11_0_REFERENCE, ES3_D3D11_FL11_0, ES3_D3D11_FL11_0_WARP, ES3_D3D11_FL11_0_REFERENCE, ES3_OPENGL,
|
||||
ES2_D3D11_FL10_1, ES2_D3D11_FL10_1_WARP, ES2_D3D11_FL10_1_REFERENCE, ES3_D3D11_FL10_1, ES3_D3D11_FL10_1_WARP, ES3_D3D11_FL10_1_REFERENCE,
|
||||
ES2_D3D11_FL10_0, ES2_D3D11_FL10_0_WARP, ES2_D3D11_FL10_0_REFERENCE, ES3_D3D11_FL10_0, ES3_D3D11_FL10_0_WARP, ES3_D3D11_FL10_0_REFERENCE,
|
||||
ES2_D3D11_FL9_3, ES2_D3D11_FL9_3_WARP, ES2_D3D11_FL9_3_REFERENCE);
|
||||
|
||||
template<typename T>
|
||||
class RendererTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
RendererTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
RendererTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
}
|
||||
|
||||
T fixtureType;
|
||||
};
|
||||
|
||||
TYPED_TEST(RendererTest, RequestedRendererCreated)
|
||||
TEST_P(RendererTest, RequestedRendererCreated)
|
||||
{
|
||||
std::string rendererString = std::string(reinterpret_cast<const char*>(glGetString(GL_RENDERER)));
|
||||
std::transform(rendererString.begin(), rendererString.end(), rendererString.begin(), ::tolower);
|
||||
|
@ -33,7 +33,7 @@ TYPED_TEST(RendererTest, RequestedRendererCreated)
|
|||
std::string versionString = std::string(reinterpret_cast<const char*>(glGetString(GL_VERSION)));
|
||||
std::transform(versionString.begin(), versionString.end(), versionString.begin(), ::tolower);
|
||||
|
||||
EGLPlatformParameters platform = fixtureType.GetPlatform();
|
||||
const EGLPlatformParameters &platform = GetParam().mEGLPlatformParameters;
|
||||
|
||||
// Ensure that the renderer string contains D3D11, if we requested a D3D11 renderer.
|
||||
if (platform.renderer == EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE)
|
||||
|
@ -101,7 +101,7 @@ TYPED_TEST(RendererTest, RequestedRendererCreated)
|
|||
ASSERT_TRUE(found);
|
||||
}
|
||||
|
||||
EGLint glesMajorVersion = fixtureType.GetGlesMajorVersion();
|
||||
EGLint glesMajorVersion = GetParam().mClientVersion;
|
||||
|
||||
// Ensure that the renderer string contains GL ES 3.0, if we requested a GL ES 3.0
|
||||
if (glesMajorVersion == 3)
|
||||
|
@ -117,9 +117,23 @@ TYPED_TEST(RendererTest, RequestedRendererCreated)
|
|||
}
|
||||
|
||||
// Perform a simple operation (clear and read pixels) to verify the device is working
|
||||
TYPED_TEST(RendererTest, SimpleOperation)
|
||||
TEST_P(RendererTest, SimpleOperation)
|
||||
{
|
||||
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
EXPECT_PIXEL_EQ(0, 0, 0, 255, 0, 255);
|
||||
}
|
||||
|
||||
// Select configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
|
||||
ANGLE_INSTANTIATE_TEST(RendererTest,
|
||||
ES2_D3D9(), ES2_D3D9_REFERENCE(),
|
||||
ES2_D3D11(), ES2_D3D11_FL11_0(), ES2_D3D11_FL10_1(), ES2_D3D11_FL10_0(), ES2_D3D11_FL9_3(),
|
||||
ES2_D3D11_WARP(), ES2_D3D11_FL11_0_WARP(), ES2_D3D11_FL10_1_WARP(), ES2_D3D11_FL10_0_WARP(), ES2_D3D11_FL9_3_WARP(),
|
||||
ES2_D3D11_REFERENCE(), ES2_D3D11_FL11_0_REFERENCE(), ES2_D3D11_FL10_1_REFERENCE(), ES2_D3D11_FL10_0_REFERENCE(), ES2_D3D11_FL9_3_REFERENCE(),
|
||||
ES3_D3D11(), ES3_D3D11_FL11_0(), ES3_D3D11_FL10_1(), ES3_D3D11_FL10_0(),
|
||||
ES3_D3D11_WARP(), ES3_D3D11_FL11_0_WARP(), ES3_D3D11_FL10_1_WARP(), ES3_D3D11_FL10_0_WARP(),
|
||||
ES3_D3D11_REFERENCE(), ES3_D3D11_FL11_0_REFERENCE(), ES3_D3D11_FL10_1_REFERENCE(), ES3_D3D11_FL10_0_REFERENCE(),
|
||||
ES2_OPENGL(), ES3_OPENGL());
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(SRGBTextureTest, ES2_D3D9, ES2_D3D11, ES3_D3D11, ES2_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class SRGBTextureTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
SRGBTextureTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
SRGBTextureTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -17,18 +24,18 @@ protected:
|
|||
setConfigAlphaBits(8);
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
ANGLETest::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST(SRGBTextureTest, SRGBValidation)
|
||||
TEST_P(SRGBTextureTest, SRGBValidation)
|
||||
{
|
||||
bool supported = extensionEnabled("GL_EXT_sRGB") || getClientVersion() == 3;
|
||||
|
||||
|
@ -56,7 +63,7 @@ TYPED_TEST(SRGBTextureTest, SRGBValidation)
|
|||
glDeleteTextures(1, &tex);
|
||||
}
|
||||
|
||||
TYPED_TEST(SRGBTextureTest, SRGBAValidation)
|
||||
TEST_P(SRGBTextureTest, SRGBAValidation)
|
||||
{
|
||||
bool supported = extensionEnabled("GL_EXT_sRGB") || getClientVersion() == 3;
|
||||
|
||||
|
@ -91,7 +98,7 @@ TYPED_TEST(SRGBTextureTest, SRGBAValidation)
|
|||
glDeleteTextures(1, &tex);
|
||||
}
|
||||
|
||||
TYPED_TEST(SRGBTextureTest, SRGBARenderbuffer)
|
||||
TEST_P(SRGBTextureTest, SRGBARenderbuffer)
|
||||
{
|
||||
bool supported = extensionEnabled("GL_EXT_sRGB") || getClientVersion() == 3;
|
||||
|
||||
|
@ -135,3 +142,8 @@ TYPED_TEST(SRGBTextureTest, SRGBARenderbuffer)
|
|||
glDeleteFramebuffers(1, &fbo);
|
||||
glDeleteRenderbuffers(1, &rbo);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(SRGBTextureTest, ES2_D3D9(), ES2_D3D11(), ES3_D3D11(), ES2_OPENGL());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
//
|
||||
// Copyright 2015 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.
|
||||
//
|
||||
// SimpleOperationTest:
|
||||
// Basic GL commands such as linking a program, initializing a buffer, etc.
|
||||
|
||||
#include "ANGLETest.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(SimpleOperationTest, ES2_D3D9, ES2_D3D11, ES3_D3D11, ES2_OPENGL, ES3_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class SimpleOperationTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
SimpleOperationTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
SimpleOperationTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -20,7 +29,7 @@ class SimpleOperationTest : public ANGLETest
|
|||
}
|
||||
};
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, CompileVertexShader)
|
||||
TEST_P(SimpleOperationTest, CompileVertexShader)
|
||||
{
|
||||
const std::string source = SHADER_SOURCE
|
||||
(
|
||||
|
@ -38,7 +47,7 @@ TYPED_TEST(SimpleOperationTest, CompileVertexShader)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, CompileFragmentShader)
|
||||
TEST_P(SimpleOperationTest, CompileFragmentShader)
|
||||
{
|
||||
const std::string source = SHADER_SOURCE
|
||||
(
|
||||
|
@ -57,7 +66,7 @@ TYPED_TEST(SimpleOperationTest, CompileFragmentShader)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, LinkProgram)
|
||||
TEST_P(SimpleOperationTest, LinkProgram)
|
||||
{
|
||||
const std::string vsSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -82,7 +91,7 @@ TYPED_TEST(SimpleOperationTest, LinkProgram)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, LinkProgramWithUniforms)
|
||||
TEST_P(SimpleOperationTest, LinkProgramWithUniforms)
|
||||
{
|
||||
const std::string vsSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -113,7 +122,7 @@ TYPED_TEST(SimpleOperationTest, LinkProgramWithUniforms)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, LinkProgramWithAttributes)
|
||||
TEST_P(SimpleOperationTest, LinkProgramWithAttributes)
|
||||
{
|
||||
const std::string vsSource = SHADER_SOURCE
|
||||
(
|
||||
|
@ -143,7 +152,7 @@ TYPED_TEST(SimpleOperationTest, LinkProgramWithAttributes)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, BufferDataWithData)
|
||||
TEST_P(SimpleOperationTest, BufferDataWithData)
|
||||
{
|
||||
GLuint buffer;
|
||||
glGenBuffers(1, &buffer);
|
||||
|
@ -157,7 +166,7 @@ TYPED_TEST(SimpleOperationTest, BufferDataWithData)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, BufferDataWithNoData)
|
||||
TEST_P(SimpleOperationTest, BufferDataWithNoData)
|
||||
{
|
||||
GLuint buffer;
|
||||
glGenBuffers(1, &buffer);
|
||||
|
@ -168,7 +177,7 @@ TYPED_TEST(SimpleOperationTest, BufferDataWithNoData)
|
|||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
TYPED_TEST(SimpleOperationTest, BufferSubData)
|
||||
TEST_P(SimpleOperationTest, BufferSubData)
|
||||
{
|
||||
GLuint buffer;
|
||||
glGenBuffers(1, &buffer);
|
||||
|
@ -188,3 +197,10 @@ TYPED_TEST(SimpleOperationTest, BufferSubData)
|
|||
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(
|
||||
SimpleOperationTest,
|
||||
ES2_D3D9(), ES2_D3D11(), ES3_D3D11(), ES2_OPENGL(), ES3_OPENGL());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(SwizzleTest, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class SwizzleTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
SwizzleTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
SwizzleTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -48,7 +55,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -88,7 +95,7 @@ protected:
|
|||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
glDeleteTextures(1, &mTexture);
|
||||
|
@ -184,77 +191,77 @@ protected:
|
|||
std::vector<swizzlePermutation> mPermutations;
|
||||
};
|
||||
|
||||
TYPED_TEST(SwizzleTest, RGBA8_2D)
|
||||
TEST_P(SwizzleTest, RGBA8_2D)
|
||||
{
|
||||
GLubyte data[] = { 1, 64, 128, 200 };
|
||||
init2DTexture(GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, RGB8_2D)
|
||||
TEST_P(SwizzleTest, RGB8_2D)
|
||||
{
|
||||
GLubyte data[] = { 77, 66, 55 };
|
||||
init2DTexture(GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, RG8_2D)
|
||||
TEST_P(SwizzleTest, RG8_2D)
|
||||
{
|
||||
GLubyte data[] = { 11, 99 };
|
||||
init2DTexture(GL_RG8, GL_RG, GL_UNSIGNED_BYTE, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, R8_2D)
|
||||
TEST_P(SwizzleTest, R8_2D)
|
||||
{
|
||||
GLubyte data[] = { 2 };
|
||||
init2DTexture(GL_R8, GL_RED, GL_UNSIGNED_BYTE, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, RGBA32F_2D)
|
||||
TEST_P(SwizzleTest, RGBA32F_2D)
|
||||
{
|
||||
GLfloat data[] = { 0.25f, 0.5f, 0.75f, 0.8f };
|
||||
init2DTexture(GL_RGBA32F, GL_RGBA, GL_FLOAT, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, RGB32F_2D)
|
||||
TEST_P(SwizzleTest, RGB32F_2D)
|
||||
{
|
||||
GLfloat data[] = { 0.1f, 0.2f, 0.3f };
|
||||
init2DTexture(GL_RGB32F, GL_RGB, GL_FLOAT, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, RG32F_2D)
|
||||
TEST_P(SwizzleTest, RG32F_2D)
|
||||
{
|
||||
GLfloat data[] = { 0.9f, 0.1f };
|
||||
init2DTexture(GL_RG32F, GL_RG, GL_FLOAT, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, R32F_2D)
|
||||
TEST_P(SwizzleTest, R32F_2D)
|
||||
{
|
||||
GLfloat data[] = { 0.5f };
|
||||
init2DTexture(GL_R32F, GL_RED, GL_FLOAT, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, D32F_2D)
|
||||
TEST_P(SwizzleTest, D32F_2D)
|
||||
{
|
||||
GLfloat data[] = { 0.5f };
|
||||
init2DTexture(GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, D16_2D)
|
||||
TEST_P(SwizzleTest, D16_2D)
|
||||
{
|
||||
GLushort data[] = { 0xFF };
|
||||
init2DTexture(GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
TYPED_TEST(SwizzleTest, D24_2D)
|
||||
TEST_P(SwizzleTest, D24_2D)
|
||||
{
|
||||
GLuint data[] = { 0xFFFF };
|
||||
init2DTexture(GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, data);
|
||||
|
@ -263,7 +270,7 @@ TYPED_TEST(SwizzleTest, D24_2D)
|
|||
|
||||
#include "media/pixel.inl"
|
||||
|
||||
TYPED_TEST(SwizzleTest, CompressedDXT_2D)
|
||||
TEST_P(SwizzleTest, CompressedDXT_2D)
|
||||
{
|
||||
if (!extensionEnabled("GL_EXT_texture_compression_dxt1"))
|
||||
{
|
||||
|
@ -273,3 +280,8 @@ TYPED_TEST(SwizzleTest, CompressedDXT_2D)
|
|||
init2DCompressedTexture(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, pixel_0_width, pixel_0_height, pixel_0_size, pixel_0_data);
|
||||
runTest2D();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(SwizzleTest, ES3_D3D11());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(TextureTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class TextureTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
TextureTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
TextureTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -17,7 +24,7 @@ class TextureTest : public ANGLETest
|
|||
setConfigAlphaBits(8);
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
glGenTextures(1, &mTexture2D);
|
||||
|
@ -93,7 +100,7 @@ class TextureTest : public ANGLETest
|
|||
ASSERT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteTextures(1, &mTexture2D);
|
||||
glDeleteTextures(1, &mTextureCube);
|
||||
|
@ -242,7 +249,7 @@ class TextureTest : public ANGLETest
|
|||
GLint mTextureScaleUniformLocation;
|
||||
};
|
||||
|
||||
TYPED_TEST(TextureTest, NegativeAPISubImage)
|
||||
TEST_P(TextureTest, NegativeAPISubImage)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, mTexture2D);
|
||||
EXPECT_GL_ERROR(GL_NO_ERROR);
|
||||
|
@ -252,7 +259,7 @@ TYPED_TEST(TextureTest, NegativeAPISubImage)
|
|||
EXPECT_GL_ERROR(GL_INVALID_VALUE);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, ZeroSizedUploads)
|
||||
TEST_P(TextureTest, ZeroSizedUploads)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, mTexture2D);
|
||||
EXPECT_GL_ERROR(GL_NO_ERROR);
|
||||
|
@ -275,7 +282,7 @@ TYPED_TEST(TextureTest, ZeroSizedUploads)
|
|||
}
|
||||
|
||||
// Test drawing with two texture types, to trigger an ANGLE bug in validation
|
||||
TYPED_TEST(TextureTest, CubeMapBug)
|
||||
TEST_P(TextureTest, CubeMapBug)
|
||||
{
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, mTexture2D);
|
||||
|
@ -295,7 +302,7 @@ TYPED_TEST(TextureTest, CubeMapBug)
|
|||
}
|
||||
|
||||
// Copy of a test in conformance/textures/texture-mips, to test generate mipmaps
|
||||
TYPED_TEST(TextureTest, MipmapsTwice)
|
||||
TEST_P(TextureTest, MipmapsTwice)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -357,7 +364,7 @@ TYPED_TEST(TextureTest, MipmapsTwice)
|
|||
|
||||
// Test creating a FBO with a cube map render target, to test an ANGLE bug
|
||||
// https://code.google.com/p/angleproject/issues/detail?id=849
|
||||
TYPED_TEST(TextureTest, CubeMapFBO)
|
||||
TEST_P(TextureTest, CubeMapFBO)
|
||||
{
|
||||
GLuint fbo;
|
||||
glGenFramebuffers(1, &fbo);
|
||||
|
@ -374,7 +381,7 @@ TYPED_TEST(TextureTest, CubeMapFBO)
|
|||
}
|
||||
|
||||
// Test that glTexSubImage2D works properly when glTexStorage2DEXT has initialized the image with a default color.
|
||||
TYPED_TEST(TextureTest, TexStorage)
|
||||
TEST_P(TextureTest, TexStorage)
|
||||
{
|
||||
int width = getWindowWidth();
|
||||
int height = getWindowHeight();
|
||||
|
@ -419,7 +426,7 @@ TYPED_TEST(TextureTest, TexStorage)
|
|||
}
|
||||
|
||||
// Test that glTexSubImage2D combined with a PBO works properly when glTexStorage2DEXT has initialized the image with a default color.
|
||||
TYPED_TEST(TextureTest, TexStorageWithPBO)
|
||||
TEST_P(TextureTest, TexStorageWithPBO)
|
||||
{
|
||||
if (extensionEnabled("NV_pixel_buffer_object"))
|
||||
{
|
||||
|
@ -470,59 +477,59 @@ TYPED_TEST(TextureTest, TexStorageWithPBO)
|
|||
}
|
||||
|
||||
// See description on testFloatCopySubImage
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_R_R)
|
||||
TEST_P(TextureTest, CopySubImageFloat_R_R)
|
||||
{
|
||||
testFloatCopySubImage(1, 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RG_R)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RG_R)
|
||||
{
|
||||
testFloatCopySubImage(2, 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RG_RG)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RG_RG)
|
||||
{
|
||||
testFloatCopySubImage(2, 2);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGB_R)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGB_R)
|
||||
{
|
||||
testFloatCopySubImage(3, 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGB_RG)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGB_RG)
|
||||
{
|
||||
testFloatCopySubImage(3, 2);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGB_RGB)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGB_RGB)
|
||||
{
|
||||
testFloatCopySubImage(3, 3);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGBA_R)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGBA_R)
|
||||
{
|
||||
testFloatCopySubImage(4, 1);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGBA_RG)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGBA_RG)
|
||||
{
|
||||
testFloatCopySubImage(4, 2);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGBA_RGB)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGBA_RGB)
|
||||
{
|
||||
testFloatCopySubImage(4, 3);
|
||||
}
|
||||
|
||||
TYPED_TEST(TextureTest, CopySubImageFloat_RGBA_RGBA)
|
||||
TEST_P(TextureTest, CopySubImageFloat_RGBA_RGBA)
|
||||
{
|
||||
testFloatCopySubImage(4, 4);
|
||||
}
|
||||
|
||||
// Port of https://www.khronos.org/registry/webgl/conformance-suites/1.0.3/conformance/textures/texture-npot.html
|
||||
// Run against GL_ALPHA/UNSIGNED_BYTE format, to ensure that D3D11 Feature Level 9_3 correctly handles GL_ALPHA
|
||||
TYPED_TEST(TextureTest, TextureNPOT_GL_ALPHA_UBYTE)
|
||||
TEST_P(TextureTest, TextureNPOT_GL_ALPHA_UBYTE)
|
||||
{
|
||||
const int npotTexSize = 5;
|
||||
const int potTexSize = 4; // Should be less than npotTexSize
|
||||
|
@ -602,3 +609,8 @@ TYPED_TEST(TextureTest, TextureNPOT_GL_ALPHA_UBYTE)
|
|||
EXPECT_PIXEL_EQ(getWindowWidth() / 2, getWindowHeight() / 2, 0, 0, 0, 64);
|
||||
EXPECT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(TextureTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(TransformFeedbackTest, ES3_D3D11);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class TransformFeedbackTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
TransformFeedbackTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
TransformFeedbackTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -17,7 +24,7 @@ class TransformFeedbackTest : public ANGLETest
|
|||
setConfigAlphaBits(8);
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -56,7 +63,7 @@ class TransformFeedbackTest : public ANGLETest
|
|||
ASSERT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
glDeleteBuffers(1, &mTransformFeedbackBuffer);
|
||||
|
@ -69,7 +76,7 @@ class TransformFeedbackTest : public ANGLETest
|
|||
GLuint mTransformFeedbackBuffer;
|
||||
};
|
||||
|
||||
TYPED_TEST(TransformFeedbackTest, ZeroSizedViewport)
|
||||
TEST_P(TransformFeedbackTest, ZeroSizedViewport)
|
||||
{
|
||||
// Set the program's transform feedback varyings (just gl_Position)
|
||||
const GLchar* transformFeedbackVaryings[] =
|
||||
|
@ -115,7 +122,7 @@ TYPED_TEST(TransformFeedbackTest, ZeroSizedViewport)
|
|||
}
|
||||
|
||||
// Test that XFB can write back vertices to a buffer and that we can draw from this buffer afterward.
|
||||
TYPED_TEST(TransformFeedbackTest, RecordAndDraw)
|
||||
TEST_P(TransformFeedbackTest, RecordAndDraw)
|
||||
{
|
||||
// Set the program's transform feedback varyings (just gl_Position)
|
||||
const GLchar* transformFeedbackVaryings[] =
|
||||
|
@ -196,7 +203,7 @@ TYPED_TEST(TransformFeedbackTest, RecordAndDraw)
|
|||
}
|
||||
|
||||
// Test that buffer binding happens only on the current transform feedback object
|
||||
TYPED_TEST(TransformFeedbackTest, BufferBinding)
|
||||
TEST_P(TransformFeedbackTest, BufferBinding)
|
||||
{
|
||||
// Reset any state
|
||||
glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, 0);
|
||||
|
@ -252,3 +259,8 @@ TYPED_TEST(TransformFeedbackTest, BufferBinding)
|
|||
glDeleteTransformFeedbacks(1, &transformFeedbackObject);
|
||||
glDeleteBuffers(1, &scratchBuffer);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(TransformFeedbackTest, ES3_D3D11());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(UniformBufferTest, ES3_D3D11, ES3_D3D11_FL11_1, ES3_D3D11_FL11_1_REFERENCE);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class UniformBufferTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
UniformBufferTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
UniformBufferTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -70,7 +77,7 @@ class UniformBufferTest : public ANGLETest
|
|||
// Test that using a UBO with a non-zero offset and size actually works.
|
||||
// The first step of this test renders a color from a UBO with a zero offset.
|
||||
// The second step renders a color from a UBO with a non-zero offset.
|
||||
TYPED_TEST(UniformBufferTest, UniformBufferRange)
|
||||
TEST_P(UniformBufferTest, UniformBufferRange)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -141,7 +148,7 @@ TYPED_TEST(UniformBufferTest, UniformBufferRange)
|
|||
}
|
||||
|
||||
// Test uniform block bindings.
|
||||
TYPED_TEST(UniformBufferTest, UniformBufferBindings)
|
||||
TEST_P(UniformBufferTest, UniformBufferBindings)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -185,7 +192,7 @@ TYPED_TEST(UniformBufferTest, UniformBufferBindings)
|
|||
|
||||
// Test that ANGLE handles used but unbound UBO.
|
||||
// TODO: A test case shouldn't depend on the error code of an undefined behaviour. Move this to unit tests of the validation layer.
|
||||
TYPED_TEST(UniformBufferTest, UnboundUniformBuffer)
|
||||
TEST_P(UniformBufferTest, UnboundUniformBuffer)
|
||||
{
|
||||
glUniformBlockBinding(mProgram, mUniformBufferIndex, 0);
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, 0);
|
||||
|
@ -197,7 +204,7 @@ TYPED_TEST(UniformBufferTest, UnboundUniformBuffer)
|
|||
|
||||
// Update a UBO many time and verify that ANGLE uses the latest version of the data.
|
||||
// https://code.google.com/p/angleproject/issues/detail?id=965
|
||||
TYPED_TEST(UniformBufferTest, UniformBufferManyUpdates)
|
||||
TEST_P(UniformBufferTest, UniformBufferManyUpdates)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -230,7 +237,7 @@ TYPED_TEST(UniformBufferTest, UniformBufferManyUpdates)
|
|||
}
|
||||
|
||||
// Use a large number of buffer ranges (compared to the actual size of the UBO)
|
||||
TYPED_TEST(UniformBufferTest, ManyUniformBufferRange)
|
||||
TEST_P(UniformBufferTest, ManyUniformBufferRange)
|
||||
{
|
||||
int px = getWindowWidth() / 2;
|
||||
int py = getWindowHeight() / 2;
|
||||
|
@ -305,3 +312,10 @@ TYPED_TEST(UniformBufferTest, ManyUniformBufferRange)
|
|||
EXPECT_PIXEL_EQ(px, py, 10 + i, 20 + i, 30 + i, 40 + i);
|
||||
}
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ANGLE, UniformBufferTest,
|
||||
testing::Values(ES3_D3D11(), ES3_D3D11_FL11_1(), ES3_D3D11_FL11_1_REFERENCE()));
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(UniformTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class UniformTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
UniformTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
UniformTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -17,7 +24,7 @@ class UniformTest : public ANGLETest
|
|||
setConfigAlphaBits(8);
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -40,7 +47,7 @@ class UniformTest : public ANGLETest
|
|||
ASSERT_GL_NO_ERROR();
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
ANGLETest::TearDown();
|
||||
|
@ -51,7 +58,7 @@ class UniformTest : public ANGLETest
|
|||
GLint mUniformILocation;
|
||||
};
|
||||
|
||||
TYPED_TEST(UniformTest, GetUniformNoCurrentProgram)
|
||||
TEST_P(UniformTest, GetUniformNoCurrentProgram)
|
||||
{
|
||||
glUseProgram(mProgram);
|
||||
glUniform1f(mUniformFLocation, 1.0f);
|
||||
|
@ -77,7 +84,7 @@ TYPED_TEST(UniformTest, GetUniformNoCurrentProgram)
|
|||
EXPECT_EQ(1, i);
|
||||
}
|
||||
|
||||
TYPED_TEST(UniformTest, UniformArrayLocations)
|
||||
TEST_P(UniformTest, UniformArrayLocations)
|
||||
{
|
||||
// TODO(geofflang): Figure out why this is broken on Intel OpenGL
|
||||
if (isIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
|
||||
|
@ -147,3 +154,8 @@ TYPED_TEST(UniformTest, UniformArrayLocations)
|
|||
|
||||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_INSTANTIATE_TEST(UniformTest, ES2_D3D9(), ES2_D3D11(), ES2_OPENGL());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(UnpackAlignmentTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL, ES3_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class UnpackAlignmentTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
UnpackAlignmentTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
protected:
|
||||
UnpackAlignmentTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -22,7 +29,7 @@ protected:
|
|||
mProgram = 0;
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -54,7 +61,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
|
||||
|
@ -137,7 +144,7 @@ protected:
|
|||
GLuint mProgram;
|
||||
};
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, DefaultAlignment)
|
||||
TEST_P(UnpackAlignmentTest, DefaultAlignment)
|
||||
{
|
||||
GLint defaultAlignment;
|
||||
glGetIntegerv(GL_UNPACK_ALIGNMENT, &defaultAlignment);
|
||||
|
@ -145,165 +152,172 @@ TYPED_TEST(UnpackAlignmentTest, DefaultAlignment)
|
|||
}
|
||||
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1RGBAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1RGBAUByte)
|
||||
{
|
||||
testAlignment(1, 7 * 4, GL_RGBA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1RGBUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1RGBUByte)
|
||||
{
|
||||
testAlignment(1, 7 * 3, GL_RGB, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1RGBAUShort4444)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1RGBAUShort4444)
|
||||
{
|
||||
testAlignment(1, 7 * 2, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1RGBAUShort5551)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1RGBAUShort5551)
|
||||
{
|
||||
testAlignment(1, 7 * 2, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1RGBAUShort565)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1RGBAUShort565)
|
||||
{
|
||||
testAlignment(1, 7 * 2, GL_RGB, GL_UNSIGNED_SHORT_5_6_5);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1LAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1LAUByte)
|
||||
{
|
||||
testAlignment(1, 7 * 2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1LUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1LUByte)
|
||||
{
|
||||
testAlignment(1, 7, GL_LUMINANCE, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment1AUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment1AUByte)
|
||||
{
|
||||
testAlignment(1, 7, GL_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2RGBAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2RGBAUByte)
|
||||
{
|
||||
testAlignment(2, 7 * 4, GL_RGBA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2RGBUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2RGBUByte)
|
||||
{
|
||||
testAlignment(2, 7 * 3 + 1, GL_RGB, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2RGBAUShort4444)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2RGBAUShort4444)
|
||||
{
|
||||
testAlignment(2, 7 * 2, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2RGBAUShort5551)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2RGBAUShort5551)
|
||||
{
|
||||
testAlignment(2, 7 * 2, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2RGBAUShort565)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2RGBAUShort565)
|
||||
{
|
||||
testAlignment(2, 7 * 2, GL_RGB, GL_UNSIGNED_SHORT_5_6_5);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2LAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2LAUByte)
|
||||
{
|
||||
testAlignment(2, 7 * 2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2LAByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2LAByte)
|
||||
{
|
||||
testAlignment(2, 7 + 1, GL_LUMINANCE, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment2AUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment2AUByte)
|
||||
{
|
||||
testAlignment(2, 7 + 1, GL_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4RGBAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4RGBAUByte)
|
||||
{
|
||||
testAlignment(4, 7 * 4, GL_RGBA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4RGBUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4RGBUByte)
|
||||
{
|
||||
testAlignment(4, 7 * 3 + 3, GL_RGB, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4RGBAUShort4444)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4RGBAUShort4444)
|
||||
{
|
||||
testAlignment(4, 7 * 2 + 2, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4RGBAUShort5551)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4RGBAUShort5551)
|
||||
{
|
||||
testAlignment(4, 7 * 2 + 2, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4RGBAUShort565)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4RGBAUShort565)
|
||||
{
|
||||
testAlignment(4, 7 * 2 + 2, GL_RGB, GL_UNSIGNED_SHORT_5_6_5);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4LAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4LAUByte)
|
||||
{
|
||||
testAlignment(4, 7 * 2 + 2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4LUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4LUByte)
|
||||
{
|
||||
testAlignment(4, 7 + 1, GL_LUMINANCE, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment4AUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment4AUByte)
|
||||
{
|
||||
testAlignment(4, 7 + 1, GL_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8RGBAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8RGBAUByte)
|
||||
{
|
||||
testAlignment(8, 7 * 4 + 4, GL_RGBA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8RGBUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8RGBUByte)
|
||||
{
|
||||
testAlignment(8, 7 * 3 + 3, GL_RGB, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8RGBAUShort4444)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8RGBAUShort4444)
|
||||
{
|
||||
testAlignment(8, 7 * 2 + 2, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8RGBAUShort5551)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8RGBAUShort5551)
|
||||
{
|
||||
testAlignment(8, 7 * 2 + 2, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8RGBAUShort565)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8RGBAUShort565)
|
||||
{
|
||||
testAlignment(8, 7 * 2 + 2, GL_RGB, GL_UNSIGNED_SHORT_5_6_5);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8LAUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8LAUByte)
|
||||
{
|
||||
testAlignment(8, 7 * 2 + 2, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8LUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8LUByte)
|
||||
{
|
||||
testAlignment(8, 7 + 1, GL_LUMINANCE, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackAlignmentTest, Alignment8AUByte)
|
||||
TEST_P(UnpackAlignmentTest, Alignment8AUByte)
|
||||
{
|
||||
testAlignment(8, 7 + 1, GL_ALPHA, GL_UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ANGLE, UnpackAlignmentTest,
|
||||
testing::Values(ES2_D3D9(), ES2_D3D11(), ES2_OPENGL(), ES3_OPENGL()));
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
#include "ANGLETest.h"
|
||||
//
|
||||
// Copyright 2015 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.
|
||||
//
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
ANGLE_TYPED_TEST_CASE(UnpackRowLengthTest, ES3_D3D11, ES2_D3D11, ES2_OPENGL, ES3_OPENGL);
|
||||
#include "ANGLETest.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
template<typename T>
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
class UnpackRowLengthTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
UnpackRowLengthTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
UnpackRowLengthTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -22,7 +29,7 @@ class UnpackRowLengthTest : public ANGLETest
|
|||
mProgram = 0;
|
||||
}
|
||||
|
||||
virtual void SetUp() override
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -54,7 +61,7 @@ class UnpackRowLengthTest : public ANGLETest
|
|||
}
|
||||
}
|
||||
|
||||
virtual void TearDown() override
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
|
||||
|
@ -102,12 +109,19 @@ class UnpackRowLengthTest : public ANGLETest
|
|||
GLuint mProgram;
|
||||
};
|
||||
|
||||
TYPED_TEST(UnpackRowLengthTest, RowLength128)
|
||||
TEST_P(UnpackRowLengthTest, RowLength128)
|
||||
{
|
||||
testRowLength(128, 128);
|
||||
}
|
||||
|
||||
TYPED_TEST(UnpackRowLengthTest, RowLength1024)
|
||||
TEST_P(UnpackRowLengthTest, RowLength1024)
|
||||
{
|
||||
testRowLength(128, 1024);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ANGLE, UnpackRowLengthTest,
|
||||
testing::Values(ES3_D3D11(), ES2_D3D11(), ES2_OPENGL(), ES3_OPENGL()));
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// D3D11 Feature Level 9_3 uses different D3D formats for vertex attribs compared to Feature Levels 10_0+, so we should test them separately.
|
||||
ANGLE_TYPED_TEST_CASE(VertexAttributeTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3, ES2_OPENGL, ES3_OPENGL);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class VertexAttributeTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
VertexAttributeTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
VertexAttributeTest()
|
||||
{
|
||||
setWindowWidth(128);
|
||||
setWindowHeight(128);
|
||||
|
@ -70,7 +76,7 @@ class VertexAttributeTest : public ANGLETest
|
|||
}
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -116,7 +122,7 @@ class VertexAttributeTest : public ANGLETest
|
|||
glDisable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
|
||||
|
@ -130,7 +136,7 @@ class VertexAttributeTest : public ANGLETest
|
|||
GLint mExpectedAttrib;
|
||||
};
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, UnsignedByteUnnormalized)
|
||||
TEST_P(VertexAttributeTest, UnsignedByteUnnormalized)
|
||||
{
|
||||
GLubyte inputData[mVertexCount] = { 0, 1, 2, 3, 4, 5, 6, 7, 125, 126, 127, 128, 129, 250, 251, 252, 253, 254, 255 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -143,7 +149,7 @@ TYPED_TEST(VertexAttributeTest, UnsignedByteUnnormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, UnsignedByteNormalized)
|
||||
TEST_P(VertexAttributeTest, UnsignedByteNormalized)
|
||||
{
|
||||
GLubyte inputData[mVertexCount] = { 0, 1, 2, 3, 4, 5, 6, 7, 125, 126, 127, 128, 129, 250, 251, 252, 253, 254, 255 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -156,7 +162,7 @@ TYPED_TEST(VertexAttributeTest, UnsignedByteNormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, ByteUnnormalized)
|
||||
TEST_P(VertexAttributeTest, ByteUnnormalized)
|
||||
{
|
||||
GLbyte inputData[mVertexCount] = { 0, 1, 2, 3, 4, -1, -2, -3, -4, 125, 126, 127, -128, -127, -126 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -169,7 +175,7 @@ TYPED_TEST(VertexAttributeTest, ByteUnnormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, ByteNormalized)
|
||||
TEST_P(VertexAttributeTest, ByteNormalized)
|
||||
{
|
||||
GLbyte inputData[mVertexCount] = { 0, 1, 2, 3, 4, -1, -2, -3, -4, 125, 126, 127, -128, -127, -126 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -182,7 +188,7 @@ TYPED_TEST(VertexAttributeTest, ByteNormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, UnsignedShortUnnormalized)
|
||||
TEST_P(VertexAttributeTest, UnsignedShortUnnormalized)
|
||||
{
|
||||
GLushort inputData[mVertexCount] = { 0, 1, 2, 3, 254, 255, 256, 32766, 32767, 32768, 65533, 65534, 65535 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -195,7 +201,7 @@ TYPED_TEST(VertexAttributeTest, UnsignedShortUnnormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, UnsignedShortNormalized)
|
||||
TEST_P(VertexAttributeTest, UnsignedShortNormalized)
|
||||
{
|
||||
GLushort inputData[mVertexCount] = { 0, 1, 2, 3, 254, 255, 256, 32766, 32767, 32768, 65533, 65534, 65535 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -208,7 +214,7 @@ TYPED_TEST(VertexAttributeTest, UnsignedShortNormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, ShortUnnormalized)
|
||||
TEST_P(VertexAttributeTest, ShortUnnormalized)
|
||||
{
|
||||
GLshort inputData[mVertexCount] = { 0, 1, 2, 3, -1, -2, -3, -4, 32766, 32767, -32768, -32767, -32766 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -221,7 +227,7 @@ TYPED_TEST(VertexAttributeTest, ShortUnnormalized)
|
|||
runTest(data);
|
||||
}
|
||||
|
||||
TYPED_TEST(VertexAttributeTest, ShortNormalized)
|
||||
TEST_P(VertexAttributeTest, ShortNormalized)
|
||||
{
|
||||
GLshort inputData[mVertexCount] = { 0, 1, 2, 3, -1, -2, -3, -4, 32766, 32767, -32768, -32767, -32766 };
|
||||
GLfloat expectedData[mVertexCount];
|
||||
|
@ -233,3 +239,11 @@ TYPED_TEST(VertexAttributeTest, ShortNormalized)
|
|||
TestData data = { GL_SHORT, GL_TRUE, inputData, expectedData };
|
||||
runTest(data);
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// D3D11 Feature Level 9_3 uses different D3D formats for vertex attribs compared to Feature Levels 10_0+, so we should test them separately.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ANGLE, VertexAttributeTest,
|
||||
testing::Values(ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3(), ES2_OPENGL(), ES3_OPENGL()));
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
//
|
||||
// Copyright 2015 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 "ANGLETest.h"
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// D3D11 Feature Level 9 and D3D9 emulate large and negative viewports in the vertex shader. We should test both of these as well as D3D11 Feature Level 10_0+.
|
||||
ANGLE_TYPED_TEST_CASE(ViewportTest, ES2_D3D9, ES2_D3D11, ES2_D3D11_FL9_3);
|
||||
using namespace angle;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class ViewportTest : public ANGLETest
|
||||
{
|
||||
protected:
|
||||
ViewportTest() : ANGLETest(T::GetGlesMajorVersion(), T::GetPlatform())
|
||||
ViewportTest()
|
||||
{
|
||||
setWindowWidth(512);
|
||||
setWindowHeight(512);
|
||||
|
@ -112,7 +118,7 @@ class ViewportTest : public ANGLETest
|
|||
}
|
||||
}
|
||||
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
ANGLETest::SetUp();
|
||||
|
||||
|
@ -152,7 +158,7 @@ class ViewportTest : public ANGLETest
|
|||
glDisable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
virtual void TearDown()
|
||||
void TearDown() override
|
||||
{
|
||||
glDeleteProgram(mProgram);
|
||||
|
||||
|
@ -162,7 +168,7 @@ class ViewportTest : public ANGLETest
|
|||
GLuint mProgram;
|
||||
};
|
||||
|
||||
TYPED_TEST(ViewportTest, QuarterWindow)
|
||||
TEST_P(ViewportTest, QuarterWindow)
|
||||
{
|
||||
glViewport(0, 0, getWindowWidth() / 4, getWindowHeight() / 4);
|
||||
|
||||
|
@ -171,7 +177,7 @@ TYPED_TEST(ViewportTest, QuarterWindow)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, QuarterWindowCentered)
|
||||
TEST_P(ViewportTest, QuarterWindowCentered)
|
||||
{
|
||||
glViewport(getWindowWidth() * 3 / 8, getWindowHeight() * 3 / 8, getWindowWidth() / 4, getWindowHeight() / 4);
|
||||
|
||||
|
@ -180,7 +186,7 @@ TYPED_TEST(ViewportTest, QuarterWindowCentered)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, FullWindow)
|
||||
TEST_P(ViewportTest, FullWindow)
|
||||
{
|
||||
glViewport(0, 0, getWindowWidth(), getWindowHeight());
|
||||
|
||||
|
@ -189,7 +195,7 @@ TYPED_TEST(ViewportTest, FullWindow)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, FullWindowOffCenter)
|
||||
TEST_P(ViewportTest, FullWindowOffCenter)
|
||||
{
|
||||
glViewport(-getWindowWidth() / 2, getWindowHeight() / 2, getWindowWidth(), getWindowHeight());
|
||||
|
||||
|
@ -198,7 +204,7 @@ TYPED_TEST(ViewportTest, FullWindowOffCenter)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, DoubleWindow)
|
||||
TEST_P(ViewportTest, DoubleWindow)
|
||||
{
|
||||
glViewport(0, 0, getWindowWidth() * 2, getWindowHeight() * 2);
|
||||
|
||||
|
@ -207,7 +213,7 @@ TYPED_TEST(ViewportTest, DoubleWindow)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, DoubleWindowCentered)
|
||||
TEST_P(ViewportTest, DoubleWindowCentered)
|
||||
{
|
||||
glViewport(-getWindowWidth() / 2, -getWindowHeight() / 2, getWindowWidth() * 2, getWindowHeight() * 2);
|
||||
|
||||
|
@ -216,7 +222,7 @@ TYPED_TEST(ViewportTest, DoubleWindowCentered)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, DoubleWindowOffCenter)
|
||||
TEST_P(ViewportTest, DoubleWindowOffCenter)
|
||||
{
|
||||
glViewport(-getWindowWidth() * 3 / 4, getWindowHeight() * 3 / 4, getWindowWidth(), getWindowHeight());
|
||||
|
||||
|
@ -225,7 +231,7 @@ TYPED_TEST(ViewportTest, DoubleWindowOffCenter)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, TripleWindow)
|
||||
TEST_P(ViewportTest, TripleWindow)
|
||||
{
|
||||
glViewport(0, 0, getWindowWidth() * 3, getWindowHeight() * 3);
|
||||
|
||||
|
@ -234,7 +240,7 @@ TYPED_TEST(ViewportTest, TripleWindow)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, TripleWindowCentered)
|
||||
TEST_P(ViewportTest, TripleWindowCentered)
|
||||
{
|
||||
glViewport(-getWindowWidth(), -getWindowHeight(), getWindowWidth() * 3, getWindowHeight() * 3);
|
||||
|
||||
|
@ -243,11 +249,17 @@ TYPED_TEST(ViewportTest, TripleWindowCentered)
|
|||
runScissoredTest();
|
||||
}
|
||||
|
||||
TYPED_TEST(ViewportTest, TripleWindowOffCenter)
|
||||
TEST_P(ViewportTest, TripleWindowOffCenter)
|
||||
{
|
||||
glViewport(-getWindowWidth() * 3 / 2, -getWindowHeight() * 3 / 2, getWindowWidth() * 3, getWindowHeight() * 3);
|
||||
|
||||
runNonScissoredTest();
|
||||
|
||||
runScissoredTest();
|
||||
}
|
||||
}
|
||||
|
||||
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
|
||||
// D3D11 Feature Level 9 and D3D9 emulate large and negative viewports in the vertex shader. We should test both of these as well as D3D11 Feature Level 10_0+.
|
||||
ANGLE_INSTANTIATE_TEST(ViewportTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3());
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
//
|
||||
// Copyright (c) 2014 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.
|
||||
//
|
||||
|
||||
#ifndef ANGLE_TEST_CONFIGS_H_
|
||||
#define ANGLE_TEST_CONFIGS_H_
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "EGLWindow.h"
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
struct PlatformParameters
|
||||
{
|
||||
PlatformParameters(EGLint clientVersion,
|
||||
const EGLPlatformParameters &eglPlatformParameters)
|
||||
: mClientVersion(clientVersion),
|
||||
mEGLPlatformParameters(eglPlatformParameters)
|
||||
{
|
||||
}
|
||||
|
||||
EGLint mClientVersion;
|
||||
EGLPlatformParameters mEGLPlatformParameters;
|
||||
|
||||
};
|
||||
|
||||
inline std::ostream &operator<<(std::ostream& stream,
|
||||
const PlatformParameters &pp)
|
||||
{
|
||||
stream << "ES" << pp.mClientVersion << "_";
|
||||
|
||||
switch (pp.mEGLPlatformParameters.renderer)
|
||||
{
|
||||
case EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE:
|
||||
stream << "D3D9";
|
||||
break;
|
||||
case EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE:
|
||||
stream << "D3D11";
|
||||
break;
|
||||
case EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE:
|
||||
stream << "OPENGL";
|
||||
break;
|
||||
case EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE:
|
||||
stream << "GLES";
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
if (pp.mEGLPlatformParameters.majorVersion != EGL_DONT_CARE)
|
||||
{
|
||||
stream << "_" << pp.mEGLPlatformParameters.majorVersion;
|
||||
}
|
||||
|
||||
if (pp.mEGLPlatformParameters.minorVersion != EGL_DONT_CARE)
|
||||
{
|
||||
stream << "_" << pp.mEGLPlatformParameters.minorVersion;
|
||||
}
|
||||
|
||||
switch (pp.mEGLPlatformParameters.deviceType)
|
||||
{
|
||||
case EGL_DONT_CARE:
|
||||
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE:
|
||||
// default
|
||||
break;
|
||||
|
||||
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE:
|
||||
stream << "_REFERENCE";
|
||||
break;
|
||||
|
||||
case EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE:
|
||||
stream << "_WARP";
|
||||
break;
|
||||
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D9()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D9_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL11_0()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL10_1()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL10_0()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL9_3()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
9, 3,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL11_0_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL10_1_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL10_0_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL9_3_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
9, 3,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL11_0_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL10_1_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL10_0_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_D3D11_FL9_3_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
9, 3,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL11_1()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL11_0()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL10_1()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL10_0()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL11_1_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL11_0_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL10_1_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL10_0_WARP()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
EGL_DONT_CARE, EGL_DONT_CARE,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL11_1_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL11_0_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
11, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL10_1_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 1,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_D3D11_FL10_0_REFERENCE()
|
||||
{
|
||||
EGLPlatformParameters eglParams(
|
||||
EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
||||
10, 0,
|
||||
EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_OPENGL()
|
||||
{
|
||||
EGLPlatformParameters eglParams(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES2_OPENGLES()
|
||||
{
|
||||
EGLPlatformParameters eglParams(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
|
||||
return PlatformParameters(2, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_OPENGL()
|
||||
{
|
||||
EGLPlatformParameters eglParams(EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
inline PlatformParameters ES3_OPENGLES()
|
||||
{
|
||||
EGLPlatformParameters eglParams(EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE);
|
||||
return PlatformParameters(3, eglParams);
|
||||
}
|
||||
|
||||
#define ANGLE_INSTANTIATE_TEST(testName, ...) \
|
||||
INSTANTIATE_TEST_CASE_P(, testName, testing::Values(__VA_ARGS__));
|
||||
|
||||
} // namespace angle
|
||||
|
||||
#endif // ANGLE_TEST_CONFIGS_H_
|
|
@ -4,16 +4,18 @@
|
|||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
template <int clientVersion>
|
||||
class EGLQueryContextTest : public testing::Test
|
||||
class EGLQueryContextTest : public testing::TestWithParam<int>
|
||||
{
|
||||
public:
|
||||
virtual void SetUp()
|
||||
void SetUp() override
|
||||
{
|
||||
int clientVersion = GetParam();
|
||||
|
||||
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));
|
||||
EXPECT_TRUE(eglGetPlatformDisplayEXT != NULL);
|
||||
|
||||
|
@ -71,12 +73,7 @@ class EGLQueryContextTest : public testing::Test
|
|||
EGLSurface mSurface;
|
||||
};
|
||||
|
||||
typedef EGLQueryContextTest<2> EGLQueryContextTestES2;
|
||||
|
||||
typedef EGLQueryContextTest<3> EGLQueryContextTestES3;
|
||||
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, GetConfigID)
|
||||
TEST_P(EGLQueryContextTest, GetConfigID)
|
||||
{
|
||||
EGLint configId, contextConfigId;
|
||||
EXPECT_TRUE(eglGetConfigAttrib(mDisplay, mConfig, EGL_CONFIG_ID, &configId) != EGL_FALSE);
|
||||
|
@ -84,28 +81,28 @@ TEST_F(EGLQueryContextTestES2, GetConfigID)
|
|||
EXPECT_TRUE(configId == contextConfigId);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, GetClientType)
|
||||
TEST_P(EGLQueryContextTest, GetClientType)
|
||||
{
|
||||
EGLint clientType;
|
||||
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_TYPE, &clientType) != EGL_FALSE);
|
||||
EXPECT_TRUE(clientType == EGL_OPENGL_ES_API);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, GetClientVersion)
|
||||
TEST_P(EGLQueryContextTest, GetClientVersion)
|
||||
{
|
||||
EGLint clientVersion;
|
||||
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE);
|
||||
EXPECT_TRUE(clientVersion == 2);
|
||||
EXPECT_TRUE(clientVersion == GetParam());
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, GetRenderBufferNoSurface)
|
||||
TEST_P(EGLQueryContextTest, GetRenderBufferNoSurface)
|
||||
{
|
||||
EGLint renderBuffer;
|
||||
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_RENDER_BUFFER, &renderBuffer) != EGL_FALSE);
|
||||
EXPECT_TRUE(renderBuffer == EGL_NONE);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, GetRenderBufferBoundSurface)
|
||||
TEST_P(EGLQueryContextTest, GetRenderBufferBoundSurface)
|
||||
{
|
||||
EGLint renderBuffer, contextRenderBuffer;
|
||||
EXPECT_TRUE(eglQuerySurface(mDisplay, mSurface, EGL_RENDER_BUFFER, &renderBuffer) != EGL_FALSE);
|
||||
|
@ -114,14 +111,14 @@ TEST_F(EGLQueryContextTestES2, GetRenderBufferBoundSurface)
|
|||
EXPECT_TRUE(renderBuffer == contextRenderBuffer);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, BadDisplay)
|
||||
TEST_P(EGLQueryContextTest, BadDisplay)
|
||||
{
|
||||
EGLint val;
|
||||
EXPECT_TRUE(eglQueryContext(EGL_NO_DISPLAY, mContext, EGL_CONTEXT_CLIENT_TYPE, &val) == EGL_FALSE);
|
||||
EXPECT_TRUE(eglGetError() == EGL_BAD_DISPLAY);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, NotInitialized)
|
||||
TEST_P(EGLQueryContextTest, NotInitialized)
|
||||
{
|
||||
EGLint val;
|
||||
TearDown();
|
||||
|
@ -133,23 +130,18 @@ TEST_F(EGLQueryContextTestES2, NotInitialized)
|
|||
mContext = EGL_NO_CONTEXT;
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, BadContext)
|
||||
TEST_P(EGLQueryContextTest, BadContext)
|
||||
{
|
||||
EGLint val;
|
||||
EXPECT_TRUE(eglQueryContext(mDisplay, EGL_NO_CONTEXT, EGL_CONTEXT_CLIENT_TYPE, &val) == EGL_FALSE);
|
||||
EXPECT_TRUE(eglGetError() == EGL_BAD_CONTEXT);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES2, BadAttribute)
|
||||
TEST_P(EGLQueryContextTest, BadAttribute)
|
||||
{
|
||||
EGLint val;
|
||||
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_HEIGHT, &val) == EGL_FALSE);
|
||||
EXPECT_TRUE(eglGetError() == EGL_BAD_ATTRIBUTE);
|
||||
}
|
||||
|
||||
TEST_F(EGLQueryContextTestES3, GetClientVersion)
|
||||
{
|
||||
EGLint clientVersion;
|
||||
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE);
|
||||
EXPECT_TRUE(clientVersion == 3);
|
||||
}
|
||||
INSTANTIATE_TEST_CASE_P(ANGLE, EGLQueryContextTest, testing::Values(2, 3));
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
//
|
||||
// Copyright (c) 2014 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.
|
||||
//
|
||||
|
||||
#ifndef UTIL_TEST_FIXTURE_TYPES_H
|
||||
#define UTIL_TEST_FIXTURE_TYPES_H
|
||||
|
||||
#include "EGLWindow.h"
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
template<EGLint platform, EGLint platformMajorVersion, EGLint platformMinorVersion, EGLint warp>
|
||||
struct Platform
|
||||
{
|
||||
static EGLPlatformParameters GetPlatform()
|
||||
{
|
||||
return EGLPlatformParameters(platform, platformMajorVersion, platformMinorVersion, warp);
|
||||
}
|
||||
};
|
||||
|
||||
// Typedefs of common platform types
|
||||
#define DEFINE_ANGLE_TEST_PLATFORM(name, platform, majorVersion, minorVersion, useWarp) \
|
||||
struct name : public Platform<platform, majorVersion, minorVersion, useWarp> { }
|
||||
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D9, EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D9_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL11_1, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL11_0, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL10_1, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL10_0, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL9_3, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 9, 3, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_WARP, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL11_1_WARP, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL11_0_WARP, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL10_1_WARP, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL10_0_WARP, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL9_3_WARP, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 9, 3, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE);
|
||||
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL11_1_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 1, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL11_0_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 11, 0, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL10_1_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 1, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL10_0_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 10, 0, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(D3D11_FL9_3_REFERENCE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, 9, 3, EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE);
|
||||
|
||||
DEFINE_ANGLE_TEST_PLATFORM(OPENGL, EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
DEFINE_ANGLE_TEST_PLATFORM(OPENGLES, EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE, EGL_DONT_CARE, EGL_DONT_CARE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE);
|
||||
|
||||
#undef DEFINE_ANGLE_TEST_PLATFORM
|
||||
|
||||
// Test Fixture Type
|
||||
template<GLint GLESMajorVersion, typename platformT>
|
||||
struct TestFixture
|
||||
{
|
||||
static EGLint GetGlesMajorVersion()
|
||||
{
|
||||
return GLESMajorVersion;
|
||||
}
|
||||
|
||||
static EGLPlatformParameters GetPlatform()
|
||||
{
|
||||
return platformT::GetPlatform();
|
||||
}
|
||||
};
|
||||
|
||||
// Typedefs of common fixture types
|
||||
typedef TestFixture<2, D3D9> ES2_D3D9;
|
||||
typedef TestFixture<2, D3D9_REFERENCE> ES2_D3D9_REFERENCE;
|
||||
|
||||
typedef TestFixture<2, D3D11> ES2_D3D11;
|
||||
typedef TestFixture<2, D3D11_FL11_0> ES2_D3D11_FL11_0;
|
||||
typedef TestFixture<2, D3D11_FL10_1> ES2_D3D11_FL10_1;
|
||||
typedef TestFixture<2, D3D11_FL10_0> ES2_D3D11_FL10_0;
|
||||
typedef TestFixture<2, D3D11_FL9_3> ES2_D3D11_FL9_3;
|
||||
|
||||
typedef TestFixture<2, D3D11_WARP> ES2_D3D11_WARP;
|
||||
typedef TestFixture<2, D3D11_FL11_0_WARP> ES2_D3D11_FL11_0_WARP;
|
||||
typedef TestFixture<2, D3D11_FL10_1_WARP> ES2_D3D11_FL10_1_WARP;
|
||||
typedef TestFixture<2, D3D11_FL10_0_WARP> ES2_D3D11_FL10_0_WARP;
|
||||
typedef TestFixture<2, D3D11_FL9_3_WARP> ES2_D3D11_FL9_3_WARP;
|
||||
|
||||
typedef TestFixture<2, D3D11_REFERENCE> ES2_D3D11_REFERENCE;
|
||||
typedef TestFixture<2, D3D11_FL11_0_REFERENCE> ES2_D3D11_FL11_0_REFERENCE;
|
||||
typedef TestFixture<2, D3D11_FL10_1_REFERENCE> ES2_D3D11_FL10_1_REFERENCE;
|
||||
typedef TestFixture<2, D3D11_FL10_0_REFERENCE> ES2_D3D11_FL10_0_REFERENCE;
|
||||
typedef TestFixture<2, D3D11_FL9_3_REFERENCE> ES2_D3D11_FL9_3_REFERENCE;
|
||||
|
||||
typedef TestFixture<2, OPENGL> ES2_OPENGL;
|
||||
typedef TestFixture<2, OPENGLES> ES2_OPENGLES;
|
||||
|
||||
typedef TestFixture<3, D3D11> ES3_D3D11;
|
||||
typedef TestFixture<3, D3D11_FL11_1> ES3_D3D11_FL11_1;
|
||||
typedef TestFixture<3, D3D11_FL11_0> ES3_D3D11_FL11_0;
|
||||
typedef TestFixture<3, D3D11_FL10_1> ES3_D3D11_FL10_1;
|
||||
typedef TestFixture<3, D3D11_FL10_0> ES3_D3D11_FL10_0;
|
||||
|
||||
typedef TestFixture<3, D3D11_WARP> ES3_D3D11_WARP;
|
||||
typedef TestFixture<3, D3D11_FL11_0_WARP> ES3_D3D11_FL11_0_WARP;
|
||||
typedef TestFixture<3, D3D11_FL10_1_WARP> ES3_D3D11_FL10_1_WARP;
|
||||
typedef TestFixture<3, D3D11_FL10_0_WARP> ES3_D3D11_FL10_0_WARP;
|
||||
|
||||
typedef TestFixture<3, D3D11_REFERENCE> ES3_D3D11_REFERENCE;
|
||||
typedef TestFixture<3, D3D11_FL11_1_REFERENCE> ES3_D3D11_FL11_1_REFERENCE;
|
||||
typedef TestFixture<3, D3D11_FL11_0_REFERENCE> ES3_D3D11_FL11_0_REFERENCE;
|
||||
typedef TestFixture<3, D3D11_FL10_1_REFERENCE> ES3_D3D11_FL10_1_REFERENCE;
|
||||
typedef TestFixture<3, D3D11_FL10_0_REFERENCE> ES3_D3D11_FL10_0_REFERENCE;
|
||||
|
||||
typedef TestFixture<3, OPENGL> ES3_OPENGL;
|
||||
typedef TestFixture<3, OPENGLES> ES3_OPENGLES;
|
||||
|
||||
#define ANGLE_TYPED_TEST_CASE(testName, ...) \
|
||||
typedef ::testing::Types<__VA_ARGS__> Helper##testName; \
|
||||
TYPED_TEST_CASE(testName, Helper##testName);
|
||||
|
||||
#endif // UTIL_TEST_FIXTURE_TYPES_H
|
|
@ -15,7 +15,6 @@
|
|||
'random_utils.h',
|
||||
'shader_utils.cpp',
|
||||
'shader_utils.h',
|
||||
'testfixturetypes.h',
|
||||
'EGLWindow.cpp',
|
||||
'EGLWindow.h',
|
||||
'Event.h',
|
||||
|
|
Загрузка…
Ссылка в новой задаче