swr: mark rgb9_e5 as unrenderable
[mesa.git] / src / gallium / drivers / swr / Makefile.am
1 # Copyright (C) 2015 Intel Corporation. All Rights Reserved.
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 include Makefile.sources
23 include $(top_srcdir)/src/gallium/Automake.inc
24
25 AM_CXXFLAGS = $(GALLIUM_DRIVER_CFLAGS) $(SWR_CXX11_CXXFLAGS)
26
27 noinst_LTLIBRARIES = libmesaswr.la
28
29 libmesaswr_la_SOURCES = $(LOADER_SOURCES)
30
31 COMMON_CXXFLAGS = \
32 -fno-strict-aliasing \
33 $(GALLIUM_DRIVER_CFLAGS) \
34 $(LLVM_CXXFLAGS) \
35 $(SWR_CXX11_CXXFLAGS) \
36 -I$(builddir)/rasterizer/scripts \
37 -I$(builddir)/rasterizer/jitter \
38 -I$(builddir)/rasterizer/archrast \
39 -I$(srcdir)/rasterizer \
40 -I$(srcdir)/rasterizer/core \
41 -I$(srcdir)/rasterizer/scripts \
42 -I$(srcdir)/rasterizer/jitter \
43 -I$(srcdir)/rasterizer/archrast
44
45 COMMON_SOURCES = \
46 $(CXX_SOURCES) \
47 $(ARCHRAST_CXX_SOURCES) \
48 $(COMMON_CXX_SOURCES) \
49 $(CORE_CXX_SOURCES) \
50 $(JITTER_CXX_SOURCES) \
51 $(MEMORY_CXX_SOURCES) \
52 $(BUILT_SOURCES)
53
54 BUILT_SOURCES = \
55 swr_context_llvm.h \
56 rasterizer/scripts/gen_knobs.cpp \
57 rasterizer/scripts/gen_knobs.h \
58 rasterizer/jitter/state_llvm.h \
59 rasterizer/jitter/builder_x86.h \
60 rasterizer/jitter/builder_x86.cpp \
61 rasterizer/archrast/gen_ar_event.h \
62 rasterizer/archrast/gen_ar_event.cpp \
63 rasterizer/archrast/gen_ar_eventhandler.h \
64 rasterizer/archrast/gen_ar_eventhandlerfile.h
65
66 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
67 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
68 swr_context_llvm.h: rasterizer/jitter/scripts/gen_llvm_types.py swr_context.h
69 $(PYTHON_GEN) \
70 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_types.py \
71 --input $(srcdir)/swr_context.h \
72 --output swr_context_llvm.h
73
74 rasterizer/scripts/gen_knobs.cpp rasterizer/scripts/gen_knobs.h: rasterizer/scripts/gen_knobs.py rasterizer/scripts/knob_defs.py rasterizer/scripts/templates/knobs.template
75 $(MKDIR_GEN)
76 $(PYTHON_GEN) \
77 $(srcdir)/rasterizer/scripts/gen_knobs.py \
78 rasterizer/scripts
79
80 rasterizer/jitter/state_llvm.h: rasterizer/jitter/scripts/gen_llvm_types.py rasterizer/core/state.h
81 $(MKDIR_GEN)
82 $(PYTHON_GEN) \
83 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_types.py \
84 --input $(srcdir)/rasterizer/core/state.h \
85 --output rasterizer/jitter/state_llvm.h
86
87 rasterizer/jitter/builder_gen.h: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
88 $(MKDIR_GEN)
89 $(PYTHON_GEN) \
90 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
91 --input $(LLVM_INCLUDEDIR)/llvm/IR/IRBuilder.h \
92 --output rasterizer/jitter/builder_gen.h \
93 --gen_h
94
95 rasterizer/jitter/builder_gen.cpp: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
96 $(MKDIR_GEN)
97 $(PYTHON_GEN) \
98 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
99 --input $(LLVM_INCLUDEDIR)/llvm/IR/IRBuilder.h \
100 --output rasterizer/jitter/builder_gen.cpp \
101 --gen_cpp
102
103 rasterizer/jitter/builder_x86.h: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
104 $(MKDIR_GEN)
105 $(PYTHON_GEN) \
106 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
107 --output rasterizer/jitter/builder_x86.h \
108 --gen_x86_h
109
110 rasterizer/jitter/builder_x86.cpp: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
111 $(MKDIR_GEN)
112 $(PYTHON_GEN) \
113 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
114 --output rasterizer/jitter/builder_x86.cpp \
115 --gen_x86_cpp
116
117 rasterizer/archrast/gen_ar_event.h: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_event_h.template rasterizer/archrast/events.proto
118 $(MKDIR_GEN)
119 $(PYTHON_GEN) \
120 $(srcdir)/rasterizer/scripts/gen_archrast.py \
121 --proto $(srcdir)/rasterizer/archrast/events.proto \
122 --output rasterizer/archrast/gen_ar_event.h \
123 --gen_event_h
124
125 rasterizer/archrast/gen_ar_event.cpp: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_event_cpp.template rasterizer/archrast/events.proto
126 $(MKDIR_GEN)
127 $(PYTHON_GEN) \
128 $(srcdir)/rasterizer/scripts/gen_archrast.py \
129 --proto $(srcdir)/rasterizer/archrast/events.proto \
130 --output rasterizer/archrast/gen_ar_event.cpp \
131 --gen_event_cpp
132
133 rasterizer/archrast/gen_ar_eventhandler.h: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_eventhandler_h.template rasterizer/archrast/events.proto
134 $(MKDIR_GEN)
135 $(PYTHON_GEN) \
136 $(srcdir)/rasterizer/scripts/gen_archrast.py \
137 --proto $(srcdir)/rasterizer/archrast/events.proto \
138 --output rasterizer/archrast/gen_ar_eventhandler.h \
139 --gen_eventhandler_h
140
141 rasterizer/archrast/gen_ar_eventhandlerfile.h: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_eventhandlerfile_h.template rasterizer/archrast/events.proto
142 $(MKDIR_GEN)
143 $(PYTHON_GEN) \
144 $(srcdir)/rasterizer/scripts/gen_archrast.py \
145 --proto $(srcdir)/rasterizer/archrast/events.proto \
146 --output rasterizer/archrast/gen_ar_eventhandlerfile.h \
147 --gen_eventhandlerfile_h
148
149 COMMON_LIBADD = \
150 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
151 $(top_builddir)/src/mesa/libmesagallium.la \
152 $(LLVM_LIBS)
153
154 COMMON_LDFLAGS = \
155 -shared \
156 -module \
157 -no-undefined \
158 $(GC_SECTIONS) \
159 $(NO_UNDEFINED) \
160 $(LLVM_LDFLAGS)
161
162
163 # XXX: As we cannot use BUILT_SOURCES (the files will end up in the dist
164 # tarball) just annotate the dependency directly.
165 # As the single direct user of builder_gen.h is a header (builder.h) trace all
166 # the translusive users (one that use the latter header).
167 rasterizer/jitter/blend_jit.cpp: rasterizer/jitter/builder_gen.h
168 rasterizer/jitter/builder.cpp: rasterizer/jitter/builder_gen.h
169 rasterizer/jitter/builder_gen.cpp: rasterizer/jitter/builder_gen.h
170 rasterizer/jitter/builder_x86.cpp: rasterizer/jitter/builder_gen.h
171 rasterizer/jitter/builder_misc.cpp: rasterizer/jitter/builder_gen.h
172 rasterizer/jitter/fetch_jit.cpp: rasterizer/jitter/builder_gen.h
173 rasterizer/jitter/streamout_jit.cpp: rasterizer/jitter/builder_gen.h
174 swr_shader.cpp: rasterizer/jitter/builder_gen.h
175
176 CLEANFILES = \
177 rasterizer/jitter/builder_gen.h \
178 rasterizer/jitter/builder_gen.cpp
179
180 # XXX: Due to the funky dependencies above, the builder_x86.cpp file gets
181 # generated (copied) into builddir when building from release tarball.
182 # Add a temporary workaround to remove it, until the above issue is resolved.
183 distclean-local:
184 ( test $(top_srcdir) != $(top_builddir) && \
185 rm $(builddir)/rasterizer/jitter/builder_x86.cpp ) || true
186
187 lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
188
189 libswrAVX_la_CXXFLAGS = \
190 $(SWR_AVX_CXXFLAGS) \
191 -DKNOB_ARCH=KNOB_ARCH_AVX \
192 $(COMMON_CXXFLAGS)
193
194 libswrAVX_la_SOURCES = \
195 $(COMMON_SOURCES)
196
197 # XXX: Don't ship these generated sources for now, since they are specific
198 # to the LLVM version they are generated from. Thus a release tarball
199 # containing the said files, generated against eg. LLVM 3.8 will fail to build
200 # on systems with other versions of LLVM eg. 3.7 or 3.6.
201 # Move these back to BUILT_SOURCES once that is resolved.
202 nodist_libswrAVX_la_SOURCES = \
203 rasterizer/jitter/builder_gen.h \
204 rasterizer/jitter/builder_gen.cpp
205
206 libswrAVX_la_LIBADD = \
207 $(COMMON_LIBADD)
208
209 libswrAVX_la_LDFLAGS = \
210 $(COMMON_LDFLAGS)
211
212 libswrAVX2_la_CXXFLAGS = \
213 $(SWR_AVX2_CXXFLAGS) \
214 -DKNOB_ARCH=KNOB_ARCH_AVX2 \
215 $(COMMON_CXXFLAGS)
216
217 libswrAVX2_la_SOURCES = \
218 $(COMMON_SOURCES)
219
220 # XXX: Don't ship these generated sources for now, since they are specific
221 # to the LLVM version they are generated from. Thus a release tarball
222 # containing the said files, generated against eg. LLVM 3.8 will fail to build
223 # on systems with other versions of LLVM eg. 3.7 or 3.6.
224 # Move these back to BUILT_SOURCES once that is resolved.
225 nodist_libswrAVX2_la_SOURCES = \
226 rasterizer/jitter/builder_gen.h \
227 rasterizer/jitter/builder_gen.cpp
228
229 libswrAVX2_la_LIBADD = \
230 $(COMMON_LIBADD)
231
232 libswrAVX2_la_LDFLAGS = \
233 $(COMMON_LDFLAGS)
234
235 include $(top_srcdir)/install-gallium-links.mk
236
237 EXTRA_DIST = \
238 rasterizer/archrast/events.proto \
239 rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
240 rasterizer/jitter/scripts/gen_llvm_types.py \
241 rasterizer/scripts/gen_archrast.py \
242 rasterizer/scripts/gen_knobs.py \
243 rasterizer/scripts/knob_defs.py \
244 rasterizer/scripts/mako/ast.py \
245 rasterizer/scripts/mako/_ast_util.py \
246 rasterizer/scripts/mako/cache.py \
247 rasterizer/scripts/mako/cmd.py \
248 rasterizer/scripts/mako/codegen.py \
249 rasterizer/scripts/mako/compat.py \
250 rasterizer/scripts/mako/exceptions.py \
251 rasterizer/scripts/mako/filters.py \
252 rasterizer/scripts/mako/__init__.py \
253 rasterizer/scripts/mako/lexer.py \
254 rasterizer/scripts/mako/lookup.py \
255 rasterizer/scripts/mako/parsetree.py \
256 rasterizer/scripts/mako/pygen.py \
257 rasterizer/scripts/mako/pyparser.py \
258 rasterizer/scripts/mako/runtime.py \
259 rasterizer/scripts/mako/template.py \
260 rasterizer/scripts/mako/util.py \
261 rasterizer/scripts/templates/knobs.template \
262 rasterizer/scripts/templates/ar_event_h.template \
263 rasterizer/scripts/templates/ar_event_cpp.template \
264 rasterizer/scripts/templates/ar_eventhandler_h.template \
265 rasterizer/scripts/templates/ar_eventhandlerfile_h.template