xref: /netbsd-src/external/mit/xorg/lib/libglsl.old.mk (revision 9ad12609efc259bdf8130b8259f881d2fd29f5d4)
1#	$NetBSD: libglsl.old.mk,v 1.2 2021/07/11 20:53:35 mrg Exp $
2
3LIBGLSL_GENERATED_CXX_FILES = \
4	glsl_lexer.cpp \
5	glsl_parser.cpp
6
7#COPTS.glsl_lexer.cpp+=	-Wno-deprecated-register
8COPTS.vtn_glsl450.c+=	${${ACTIVE_CC} == "clang":? -Wno-error=enum-conversion :}
9
10CPPFLAGS+=	-I${X11SRCDIR.Mesa}/src/compiler \
11		-I${X11SRCDIR.Mesa}/../src/compiler \
12		-I${X11SRCDIR.Mesa}/src/compiler/nir \
13		-I${X11SRCDIR.Mesa}/../src/compiler/nir \
14		-I${X11SRCDIR.Mesa}/src/compiler/glsl \
15		-I${X11SRCDIR.Mesa}/../src/compiler/glsl \
16		-I${X11SRCDIR.Mesa}/src/compiler/glsl/glcpp \
17		-I${X11SRCDIR.Mesa}/../src/compiler/glsl/glcpp \
18		-I${X11SRCDIR.Mesa}/src/compiler/spirv
19
20LIBGLSL_FILES = \
21	ast_array_index.cpp \
22	ast_expr.cpp \
23	ast_function.cpp \
24	ast_to_hir.cpp \
25	ast_type.cpp \
26	builtin_functions.cpp \
27	builtin_types.cpp \
28	builtin_variables.cpp \
29	generate_ir.cpp \
30	gl_nir_lower_atomics.c \
31	gl_nir_link_atomics.c \
32	gl_nir_link_uniform_initializers.c \
33	gl_nir_link_uniforms.c \
34	gl_nir_link_xfb.c \
35	gl_nir_linker.c \
36	gl_nir_lower_bindless_images.c \
37	gl_nir_lower_buffers.c \
38	gl_nir_lower_samplers.c \
39	gl_nir_lower_samplers_as_deref.c \
40	glsl_parser_extras.cpp \
41	glsl_symbol_table.cpp \
42	glsl_to_nir.cpp \
43	hir_field_selection.cpp \
44	ir.cpp \
45	ir_array_refcount.cpp \
46	ir_basic_block.cpp \
47	ir_builder.cpp \
48	ir_clone.cpp \
49	ir_constant_expression.cpp \
50	ir_equals.cpp \
51	ir_expression_flattening.cpp \
52	ir_function.cpp \
53	ir_function_can_inline.cpp \
54	ir_function_detect_recursion.cpp \
55	ir_hierarchical_visitor.cpp \
56	ir_hv_accept.cpp \
57	ir_print_visitor.cpp \
58	ir_reader.cpp \
59	ir_rvalue_visitor.cpp \
60	ir_set_program_inouts.cpp \
61	ir_validate.cpp \
62	ir_variable_refcount.cpp \
63	linker.cpp \
64	linker_util.cpp \
65	link_atomics.cpp \
66	link_functions.cpp \
67	link_interface_blocks.cpp \
68	link_uniforms.cpp \
69	link_uniform_initializers.cpp \
70	link_uniform_block_active_visitor.cpp \
71	link_uniform_block_active_visitor.h \
72	link_uniform_blocks.cpp \
73	link_varyings.cpp \
74	loop_analysis.cpp \
75	loop_unroll.cpp \
76	lower_blend_equation_advanced.cpp \
77	lower_buffer_access.cpp \
78	lower_const_arrays_to_uniforms.cpp \
79	lower_cs_derived.cpp \
80	lower_discard.cpp \
81	lower_discard_flow.cpp \
82	lower_distance.cpp \
83	lower_if_to_cond_assign.cpp \
84	lower_instructions.cpp \
85	lower_int64.cpp \
86	lower_jumps.cpp \
87	lower_mat_op_to_vec.cpp \
88	lower_noise.cpp \
89	lower_offset_array.cpp \
90	lower_packed_varyings.cpp \
91	lower_named_interface_blocks.cpp \
92	lower_packing_builtins.cpp \
93	lower_subroutine.cpp \
94	lower_tess_level.cpp \
95	lower_texture_projection.cpp \
96	lower_variable_index_to_cond_assign.cpp \
97	lower_vec_index_to_cond_assign.cpp \
98	lower_vec_index_to_swizzle.cpp \
99	lower_vector.cpp \
100	lower_vector_derefs.cpp \
101	lower_vector_insert.cpp \
102	lower_vertex_id.cpp \
103	lower_output_reads.cpp \
104	lower_shared_reference.cpp \
105	lower_ubo_reference.cpp \
106	opt_algebraic.cpp \
107	opt_array_splitting.cpp \
108	opt_conditional_discard.cpp \
109	opt_constant_folding.cpp \
110	opt_constant_propagation.cpp \
111	opt_constant_variable.cpp \
112	opt_copy_propagation_elements.cpp \
113	opt_dead_builtin_variables.cpp \
114	opt_dead_builtin_varyings.cpp \
115	opt_dead_code.cpp \
116	opt_dead_code_local.cpp \
117	opt_dead_functions.cpp \
118	opt_flatten_nested_if_blocks.cpp \
119	opt_flip_matrices.cpp \
120	opt_function_inlining.cpp \
121	opt_if_simplification.cpp \
122	opt_minmax.cpp \
123	opt_rebalance_tree.cpp \
124	opt_redundant_jumps.cpp \
125	opt_structure_splitting.cpp \
126	opt_swizzle.cpp \
127	opt_tree_grafting.cpp \
128	opt_vectorize.cpp \
129	propagate_invariance.cpp \
130	s_expression.cpp \
131	string_to_uint_map.cpp \
132	serialize.cpp \
133	shader_cache.cpp \
134	blob.c \
135	glsl_types.cpp \
136	nir_types.cpp \
137	shader_enums.c
138
139# XXX
140.if ${MACHINE} == "vax"
141COPTS.ir_constant_expression.cpp+=	-O0
142COPTS.ir.cpp+=	-O0
143COPTS.nir_constant_expressions.c+=	-O0
144.endif
145
146LIBGLCPP_GENERATED_FILES = \
147	glcpp-lex.c \
148	glcpp-parse.c
149
150LIBGLCPP_FILES = \
151	pp.c
152
153NIR_GENERATED_FILES = \
154	nir_constant_expressions.c \
155	nir_intrinsics.c \
156	nir_opcodes.c \
157	nir_opt_algebraic.c
158
159NIR_FILES = \
160	nir.c \
161	nir_builtin_builder.c \
162	nir_clone.c \
163	nir_control_flow.c \
164	nir_deref.c \
165	nir_dominance.c \
166	nir_from_ssa.c \
167	nir_gather_info.c \
168	nir_gather_xfb_info.c \
169	nir_gs_count_vertices.c \
170	nir_inline_functions.c \
171	nir_instr_set.c \
172	nir_linking_helpers.c \
173	nir_liveness.c \
174	nir_loop_analyze.c \
175	nir_lower_alpha_test.c \
176	nir_lower_alu.c \
177	nir_lower_alu_to_scalar.c \
178	nir_lower_array_deref_of_vec.c \
179	nir_lower_atomics_to_ssbo.c \
180	nir_lower_bit_size.c \
181	nir_lower_bitmap.c \
182	nir_lower_bool_to_int32.c \
183	nir_lower_clamp_color_outputs.c \
184	nir_lower_clip.c \
185	nir_lower_clip_cull_distance_arrays.c \
186	nir_lower_constant_initializers.c \
187	nir_lower_double_ops.c \
188	nir_lower_drawpixels.c \
189	nir_lower_global_vars_to_local.c \
190	nir_lower_gs_intrinsics.c \
191	nir_lower_idiv.c \
192	nir_lower_indirect_derefs.c \
193	nir_lower_int64.c \
194	nir_lower_io.c \
195	nir_lower_io_arrays_to_elements.c \
196	nir_lower_io_to_scalar.c \
197	nir_lower_io_to_vector.c \
198	nir_lower_io_to_temporaries.c \
199	nir_lower_load_const_to_scalar.c \
200	nir_lower_locals_to_regs.c \
201	nir_lower_packing.c \
202	nir_lower_passthrough_edgeflags.c \
203	nir_lower_patch_vertices.c \
204	nir_lower_phis_to_scalar.c \
205	nir_lower_regs_to_ssa.c \
206	nir_lower_returns.c \
207	nir_lower_subgroups.c \
208	nir_lower_system_values.c \
209	nir_lower_tex.c \
210	nir_lower_to_source_mods.c \
211	nir_lower_two_sided_color.c \
212	nir_lower_uniforms_to_ubo.c \
213	nir_lower_var_copies.c \
214	nir_lower_vars_to_ssa.c \
215	nir_lower_vec_to_movs.c \
216	nir_lower_wpos_center.c \
217	nir_lower_wpos_ytransform.c \
218	nir_metadata.c \
219	nir_move_load_const.c \
220	nir_move_vec_src_uses_to_dest.c \
221	nir_normalize_cubemap_coords.c \
222	nir_opt_combine_stores.c \
223	nir_opt_comparison_pre.c \
224	nir_opt_conditional_discard.c \
225	nir_opt_constant_folding.c \
226	nir_opt_copy_prop_vars.c \
227	nir_opt_copy_propagate.c \
228	nir_opt_cse.c \
229	nir_opt_dce.c \
230	nir_opt_dead_cf.c \
231	nir_opt_dead_write_vars.c \
232	nir_opt_find_array_copies.c \
233	nir_opt_gcm.c \
234	nir_opt_idiv_const.c \
235	nir_opt_if.c \
236	nir_opt_intrinsics.c \
237	nir_opt_large_constants.c \
238	nir_opt_loop_unroll.c \
239	nir_opt_move_comparisons.c \
240	nir_opt_move_load_ubo.c \
241	nir_opt_peephole_select.c \
242	nir_opt_remove_phis.c \
243	nir_opt_shrink_load.c \
244	nir_opt_trivial_continues.c \
245	nir_opt_undef.c \
246	nir_phi_builder.c \
247	nir_print.c \
248	nir_propagate_invariant.c \
249	nir_remove_dead_variables.c \
250	nir_repair_ssa.c \
251	nir_search.c \
252	nir_serialize.c \
253	nir_split_per_member_structs.c \
254	nir_split_var_copies.c \
255	nir_split_vars.c \
256	nir_strip.c \
257	nir_sweep.c \
258	nir_to_lcssa.c \
259	nir_validate.c \
260	nir_worklist.c
261
262SPIRV_GENERATED_FILES = \
263	spirv_info.c \
264	vtn_gather_types.c
265
266SPIRV_FILES = \
267	gl_spirv.c \
268	spirv_to_nir.c \
269	vtn_alu.c \
270	vtn_amd.c \
271	vtn_cfg.c \
272	vtn_glsl450.c \
273	vtn_opencl.c \
274	vtn_subgroup.c \
275	vtn_variables.c
276
277
278.PATH:	${X11SRCDIR.Mesa}/src/compiler
279.PATH:	${X11SRCDIR.Mesa}/src/compiler/glsl
280.PATH:	${X11SRCDIR.Mesa}/../src/compiler/glsl
281.PATH:	${X11SRCDIR.Mesa}/src/compiler/glsl/glcpp
282.PATH:	${X11SRCDIR.Mesa}/../src/compiler/glsl/glcpp
283.PATH:	${X11SRCDIR.Mesa}/src/compiler/nir
284.PATH:	${X11SRCDIR.Mesa}/../src/compiler/nir
285.PATH:	${X11SRCDIR.Mesa}/src/compiler/spirv
286.PATH:	${X11SRCDIR.Mesa}/../src/compiler/spirv
287
288SRCS+=	${LIBGLSL_GENERATED_CXX_FILES} \
289	${LIBGLSL_FILES} \
290	${LIBGLCPP_GENERATED_FILES} \
291	${LIBGLCPP_FILES} \
292	${NIR_GENERATED_FILES} \
293	${NIR_FILES} \
294	${SPIRV_GENERATED_FILES} \
295	${SPIRV_FILES}
296