// // Copyright 2021 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. // // Precise_test.cpp: // Test that precise produces the right number of NoContraction decorations in the generated // SPIR-V. // #include "GLSLANG/ShaderLang.h" #include "angle_gl.h" #include "common/spirv/spirv_instruction_parser_autogen.h" #include "gtest/gtest.h" spirv; namespace { class PreciseTest : public testing::TestWithParam<bool> { … }; // Parse the SPIR-V and verify that there are as many NoContraction decorations as expected. void PreciseTest::ValidateDecorations(const spirv::Blob &blob, size_t expectedNoContractionDecorationCount) { … } // Test that precise on a local variable works. TEST_F(PreciseTest, LocalVariable) { … } // Test that precise on gl_Position works. TEST_F(PreciseTest, Position) { … } // Test that precise on function parameters and return value works. TEST_F(PreciseTest, Functions) { … } } // anonymous namespace