xref: /aosp_15_r20/external/swiftshader/src/Pipeline/BUILD.gn (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1# Copyright 2019 The SwiftShader Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../swiftshader.gni")
16
17swiftshader_source_set("Pipeline_headers") {
18  sources = [
19    "ComputeProgram.hpp",
20    "Constants.hpp",
21    "PixelProgram.hpp",
22    "PixelRoutine.hpp",
23    "SamplerCore.hpp",
24    "SetupRoutine.hpp",
25    "ShaderCore.hpp",
26    "SpirvBinary.hpp",
27    "SpirvProfiler.hpp",
28    "SpirvShader.hpp",
29    "SpirvShaderDebug.hpp",
30    "VertexProgram.hpp",
31    "VertexRoutine.hpp",
32  ]
33}
34
35swiftshader_source_set("Pipeline") {
36  sources = [
37    "ComputeProgram.cpp",
38    "Constants.cpp",
39    "PixelProgram.cpp",
40    "PixelRoutine.cpp",
41    "SamplerCore.cpp",
42    "SetupRoutine.cpp",
43    "ShaderCore.cpp",
44    "SpirvBinary.cpp",
45    "SpirvProfiler.cpp",
46    "SpirvShader.cpp",
47    "SpirvShaderArithmetic.cpp",
48    "SpirvShaderControlFlow.cpp",
49    "SpirvShaderDebugger.cpp",
50    "SpirvShaderGLSLstd450.cpp",
51    "SpirvShaderGroup.cpp",
52    "SpirvShaderImage.cpp",
53    "SpirvShaderInstructions.cpp",
54    "SpirvShaderMemory.cpp",
55    "SpirvShaderSampling.cpp",
56    "SpirvShaderSpec.cpp",
57    "VertexProgram.cpp",
58    "VertexRoutine.cpp",
59  ]
60
61  include_dirs = [
62    "..",
63    "../../include",
64    "../../third_party/SPIRV-Headers/include",
65    "../../third_party/SPIRV-Tools/include",
66  ]
67
68  defines = [
69     "SWIFTSHADER_LEGACY_PRECISION=true",  # TODO(chromium:1299047)
70  ]
71
72  deps = [
73    "../../third_party/SPIRV-Tools:spvtools_headers",
74    "../../third_party/marl:Marl_headers",
75    "../Device:Device_headers",
76    "../System:System_headers",
77    "../Vulkan:swiftshader_libvulkan_headers",
78  ]
79
80  public_deps = [
81    ":Pipeline_headers",
82  ]
83}
84