// // Copyright 2020 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. // // OES_sample_variables_test.cpp: // Test for OES_sample_variables // #include "tests/test_utils/ShaderExtensionTest.h" namespace { const char OESPragma[] = …; // Shader using gl_SampleMask with non-constant index // This shader is in the deqp test // (functional_shaders_sample_variables_sample_mask_discard_half_per_sample_default_framebuffer) const char ESSL310_GLSampleMaskShader[] = …; // Shader using gl_SampleMask with non-constant index // This shader is based on the deqp test on below // (functional_shaders_sample_variables_sample_mask_in_bit_count_per_sample_multisample_texture_2) const char ESSL310_GLSampleMaskInShader[] = …; class OESSampleVariablesTest : public sh::ShaderExtensionTest { … }; // GLES3 needs OES_sample_variables extension class OESSampleVariablesTestES31 : public OESSampleVariablesTest { … }; // Extension flag is required to compile properly. Expect failure when it is // not present. TEST_P(OESSampleVariablesTestES31, CompileFailsWithoutExtension) { … } // Extension directive is required to compile properly. Expect failure when // it is not present. TEST_P(OESSampleVariablesTestES31, CompileFailsWithExtensionWithoutPragma) { … } // With extension flag and extension directive, compiling succeeds. // Also test that the extension directive state is reset correctly. #ifdef ANGLE_ENABLE_VULKAN TEST_P(OESSampleVariablesTestES31, CompileSucceedsWithExtensionAndPragmaOnVulkan) { … } #endif INSTANTIATE_TEST_SUITE_P(…); } // anonymous namespace