chromium/third_party/angle/src/tests/compiler_tests/ARB_texture_rectangle_test.cpp

//
// Copyright 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.
//
// ARB_texture_rectangle_test.cpp:
//   Test for the ARB_texture_rectangle extension
//

#include "GLSLANG/ShaderLang.h"
#include "angle_gl.h"
#include "gtest/gtest.h"
#include "tests/test_utils/ShaderCompileTreeTest.h"

usingnamespacesh;

class ARBTextureRectangleTestNoExt : public ShaderCompileTreeTest
{};

class ARBTextureRectangleTest : public ARBTextureRectangleTestNoExt
{};

// Check that if the extension is not supported, trying to use the features without having an
// extension directive fails.
TEST_F(ARBTextureRectangleTestNoExt, NewTypeAndBuiltinsWithoutExtensionDirective)
{}

// Check that if the extension is not supported, trying to use the features fails.
TEST_F(ARBTextureRectangleTestNoExt, NewTypeAndBuiltinsWithExtensionDirective)
{}

// Check that new types and builtins are usable even with the #extension directive
// Issue #15 of ARB_texture_rectangle explains that the extension was specified before the
// #extension mechanism was in place so it doesn't require explicit enabling.
TEST_F(ARBTextureRectangleTest, NewTypeAndBuiltinsWithoutExtensionDirective)
{}

// Test valid usage of the new types and builtins
TEST_F(ARBTextureRectangleTest, NewTypeAndBuiltingsWithExtensionDirective)
{}

// Check that it is not possible to pass a sampler2DRect where sampler2D is expected, and vice versa
TEST_F(ARBTextureRectangleTest, Rect2DVs2DMismatch)
{}

// Disabling ARB_texture_rectangle in GLSL should work, even if it is enabled by default.
// See ARB_texture_rectangle spec: "a shader can still include all variations of #extension
// GL_ARB_texture_rectangle in its source code"
TEST_F(ARBTextureRectangleTest, DisableARBTextureRectangle)
{}

// The compiler option to disable ARB_texture_rectangle should prevent shaders from
// enabling it.
TEST_F(ARBTextureRectangleTest, CompilerOption)
{}

// The compiler option to disable ARB_texture_rectangle should be toggleable.
TEST_F(ARBTextureRectangleTest, ToggleCompilerOption)
{}