Clean up SPIR-V support code in framework
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / framework / vulkan / vkGlslToSpirV.hpp
1 #ifndef _VKGLSLTOSPIRV_HPP
2 #define _VKGLSLTOSPIRV_HPP
3 /*-------------------------------------------------------------------------
4  * Vulkan CTS Framework
5  * --------------------
6  *
7  * Copyright (c) 2015 Google Inc.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and/or associated documentation files (the
11  * "Materials"), to deal in the Materials without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Materials, and to
14  * permit persons to whom the Materials are furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice(s) and this permission notice shall be
18  * included in all copies or substantial portions of the Materials.
19  *
20  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27  *
28  *//*!
29  * \file
30  * \brief GLSL to SPIR-V.
31  *//*--------------------------------------------------------------------*/
32
33 #include "vkDefs.hpp"
34 #include "vkPrograms.hpp"
35 #include "gluShaderProgram.hpp"
36
37 #include <ostream>
38
39 namespace vk
40 {
41
42 /*--------------------------------------------------------------------*//*!
43  * \brief Compile GLSL program to SPIR-V binary
44  * \param src
45  * \param dst
46  * \param buildInfo
47  * \return True if compilation and linking succeeded, false otherwise
48  *
49  * If deqp was built without glslang (and thus compiler is not available)
50  * tcu::NotSupportedError will be thrown instead.
51  *
52  * \note No linking is currently supported so src may contain source
53  *       for only one shader stage.
54  *//*--------------------------------------------------------------------*/
55 bool    compileGlslToSpirV              (const glu::ProgramSources& src, std::vector<deUint32>* dst, glu::ShaderProgramInfo* buildInfo);
56
57 } // vk
58
59 #endif // _VKGLSLTOSPIRV_HPP