blob: 5f0d7831cbdf61702de5a32a1d279e461d821da7 [file] [log] [blame]
Alexis Hetu91f10e32016-06-07 19:53:42 -04001# Copyright 2016 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
15# Need a separate config to ensure the warnings are added to the end.
16config("swiftshader_renderer_private_config") {
Alexis Hetu03b67af2016-08-31 17:25:40 -040017 if (is_win) {
18 cflags = [
Alexis Hetud6d10f92016-11-22 13:47:04 -050019 "/wd4201", # nameless struct/union
20 "/wd4324", # structure was padded due to alignment specifier
Alexis Hetu03b67af2016-08-31 17:25:40 -040021 ]
Alexis Hetu03b67af2016-08-31 17:25:40 -040022 } else {
Alexis Hetu91f10e32016-06-07 19:53:42 -040023 cflags = [
24 "-DLOG_TAG=\"swiftshader_renderer\"",
Alexis Hetu91f10e32016-06-07 19:53:42 -040025 "-msse2",
26 "-Wno-sign-compare",
27 ]
Alexis Hetu91f10e32016-06-07 19:53:42 -040028 }
29}
30
31source_set("swiftshader_renderer") {
Alexis Hetud6d10f92016-11-22 13:47:04 -050032 deps = [
33 "../Shader:swiftshader_shader",
34 ]
Alexis Hetu91f10e32016-06-07 19:53:42 -040035
36 sources = [
37 "Blitter.cpp",
38 "Clipper.cpp",
39 "Color.cpp",
40 "Context.cpp",
41 "ETC_Decoder.cpp",
42 "Matrix.cpp",
43 "PixelProcessor.cpp",
44 "Plane.cpp",
45 "Point.cpp",
46 "QuadRasterizer.cpp",
47 "Renderer.cpp",
48 "Sampler.cpp",
49 "SetupProcessor.cpp",
50 "Surface.cpp",
51 "TextureStage.cpp",
52 "Vector.cpp",
53 "VertexProcessor.cpp",
54 ]
55
Alexis Hetu8be41102016-09-12 17:45:55 -040056 if (is_win) {
57 configs -= [ "//build/config/win:unicode" ]
Alexis Hetu46c1b912016-06-23 11:06:46 -040058 }
59
Alexis Hetu8be41102016-09-12 17:45:55 -040060 configs += [ ":swiftshader_renderer_private_config" ]
Alexis Hetu91f10e32016-06-07 19:53:42 -040061
62 include_dirs = [
63 ".",
64 "..",
65 "../Common",
66 "../Main",
67 "../Shader",
68 ]
Alexis Hetud6d10f92016-11-22 13:47:04 -050069}