// // Copyright 2016 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. // // SamplerMultisample_test.cpp: // Tests compiling shaders that use gsampler2DMS types // #include "GLSLANG/ShaderLang.h" #include "angle_gl.h" #include "gtest/gtest.h" #include "tests/test_utils/ShaderCompileTreeTest.h" usingnamespacesh; class SamplerMultisampleTest : public ShaderCompileTreeTest { … }; class SamplerMultisampleArrayTest : public ShaderCompileTreeTest { … }; // Checks whether compiler has parsed the gsampler2DMS, texelfetch correctly. TEST_F(SamplerMultisampleTest, TexelFetchSampler2DMS) { … } // Checks whether compiler has parsed the gsampler2DMS, textureSize correctly. TEST_F(SamplerMultisampleTest, TextureSizeSampler2DMS) { … } // Check that sampler2DMS has no default precision. TEST_F(SamplerMultisampleTest, NoPrecisionSampler2DMS) { … } // Check that isampler2DMS has no default precision. TEST_F(SamplerMultisampleTest, NoPrecisionISampler2DMS) { … } // Check that usampler2DMS has no default precision. TEST_F(SamplerMultisampleTest, NoPrecisionUSampler2DMS) { … } // Negative test: checks that sampler2DMS is not usable in ESSL 3.00. TEST_F(SamplerMultisampleTest, Sampler2DMSESSL300) { … } // Negative test: checks that isampler2DMS is not usable in ESSL 3.00. TEST_F(SamplerMultisampleTest, ISampler2DMSESSL300) { … } // Negative test: checks that usampler2DMS is not usable in ESSL 3.00. TEST_F(SamplerMultisampleTest, USampler2DMSESSL300) { … } // Negative test: checks that sampler2DMSArray is not usable in ESSL 3.10 without extensions. TEST_F(SamplerMultisampleTest, Sampler2DMSArrayNotSupported) { … } // Negative test: checks that isampler2DMSArray is not usable in ESSL 3.10 without extensions. TEST_F(SamplerMultisampleTest, ISampler2DMSArrayNotSupported) { … } // Negative test: checks that usampler2DMSArray is not usable in ESSL 3.10 without extensions. TEST_F(SamplerMultisampleTest, USampler2DMSArrayNotSupported) { … } // Checks whether compiler has parsed the gsampler2DMSArray, texelfetch correctly. TEST_F(SamplerMultisampleArrayTest, TexelFetchSampler2DMSArray) { … } // Checks whether compiler has parsed the gsampler2DMSArray, textureSize correctly. TEST_F(SamplerMultisampleArrayTest, TextureSizeSampler2DMSArray) { … } // Check that sampler2DMSArray has no default precision. TEST_F(SamplerMultisampleArrayTest, NoPrecisionSampler2DMSArray) { … } // Check that isampler2DMSArray has no default precision. TEST_F(SamplerMultisampleArrayTest, NoPrecisionISampler2DMSArray) { … } // Check that usampler2DMSArray has no default precision. TEST_F(SamplerMultisampleArrayTest, NoPrecisionUSampler2DMSArray) { … } class SamplerMultisampleEXTTest : public SamplerMultisampleTest { … }; // checks ANGLE_texture_multisample is supported in es 3.0 TEST_F(SamplerMultisampleEXTTest, TextureMultisampleEXTEnabled) { … } // checks that multisample texture is not supported without ANGLE_texture_multisample in es 3.0 TEST_F(SamplerMultisampleEXTTest, TextureMultisampleEXTDisabled) { … }