i965: Calculate thread_count in brw_alloc_stage_scratch
[mesa.git] / src / mesa / drivers / dri / i965 / meson.build
1 # Copyright © 2017 Intel Corporation
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 files_i965 = files(
22 'brw_binding_tables.c',
23 'brw_blorp.c',
24 'brw_blorp.h',
25 'brw_bufmgr.c',
26 'brw_bufmgr.h',
27 'brw_clear.c',
28 'brw_clip.c',
29 'brw_compute.c',
30 'brw_conditional_render.c',
31 'brw_context.c',
32 'brw_context.h',
33 'brw_cs.c',
34 'brw_cs.h',
35 'brw_curbe.c',
36 'brw_defines.h',
37 'brw_draw.c',
38 'brw_draw.h',
39 'brw_draw_upload.c',
40 'brw_ff_gs.c',
41 'brw_ff_gs_emit.c',
42 'brw_ff_gs.h',
43 'brw_formatquery.c',
44 'brw_gs.c',
45 'brw_gs.h',
46 'brw_gs_surface_state.c',
47 'brw_link.cpp',
48 'brw_meta_util.c',
49 'brw_meta_util.h',
50 'brw_misc_state.c',
51 'brw_multisample_state.h',
52 'brw_nir_uniforms.cpp',
53 'brw_object_purgeable.c',
54 'brw_pipe_control.c',
55 'brw_performance_query.h',
56 'brw_performance_query.c',
57 'brw_program.c',
58 'brw_program.h',
59 'brw_program_cache.c',
60 'brw_primitive_restart.c',
61 'brw_queryobj.c',
62 'brw_reset.c',
63 'brw_sf.c',
64 'brw_state.h',
65 'brw_state_upload.c',
66 'brw_structs.h',
67 'brw_surface_formats.c',
68 'brw_sync.c',
69 'brw_tcs.c',
70 'brw_tcs_surface_state.c',
71 'brw_tes.c',
72 'brw_tes_surface_state.c',
73 'brw_urb.c',
74 'brw_util.c',
75 'brw_util.h',
76 'brw_vs.c',
77 'brw_vs.h',
78 'brw_vs_surface_state.c',
79 'brw_wm.c',
80 'brw_wm.h',
81 'brw_wm_surface_state.c',
82 'gen4_blorp_exec.h',
83 'gen6_clip_state.c',
84 'gen6_constant_state.c',
85 'gen6_depth_state.c',
86 'gen6_multisample_state.c',
87 'gen6_queryobj.c',
88 'gen6_sampler_state.c',
89 'gen6_sol.c',
90 'gen6_urb.c',
91 'gen7_l3_state.c',
92 'gen7_misc_state.c',
93 'gen7_sol_state.c',
94 'gen7_urb.c',
95 'gen8_depth_state.c',
96 'gen8_multisample_state.c',
97 'hsw_queryobj.c',
98 'hsw_sol.c',
99 'intel_batchbuffer.c',
100 'intel_batchbuffer.h',
101 'intel_blit.c',
102 'intel_blit.h',
103 'intel_buffer_objects.c',
104 'intel_buffer_objects.h',
105 'intel_buffers.c',
106 'intel_buffers.h',
107 'intel_copy_image.c',
108 'intel_extensions.c',
109 'intel_fbo.c',
110 'intel_fbo.h',
111 'intel_image.h',
112 'intel_mipmap_tree.c',
113 'intel_mipmap_tree.h',
114 'intel_pixel_bitmap.c',
115 'intel_pixel.c',
116 'intel_pixel_copy.c',
117 'intel_pixel_draw.c',
118 'intel_pixel.h',
119 'intel_pixel_read.c',
120 'intel_screen.c',
121 'intel_screen.h',
122 'intel_state.c',
123 'intel_tex.c',
124 'intel_tex_copy.c',
125 'intel_tex.h',
126 'intel_tex_image.c',
127 'intel_tex_obj.h',
128 'intel_tex_validate.c',
129 'intel_tiled_memcpy.c',
130 'intel_tiled_memcpy.h',
131 'intel_upload.c',
132 'libdrm_macros.h',
133 )
134
135 i965_gen_libs = []
136 foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100']
137 _lib = static_library(
138 'libi965_gen@0@'.format(v),
139 ['genX_blorp_exec.c', 'genX_state_upload.c', nir_opcodes_h, gen_xml_pack],
140 include_directories : [inc_common, inc_intel, inc_dri_common],
141 c_args : [c_vis_args, no_override_init_args, '-msse2',
142 '-DGEN_VERSIONx10=@0@'.format(v)],
143 dependencies : [dep_libdrm],
144 )
145 i965_gen_libs += _lib
146 endforeach
147
148 oa_generator = generator(
149 prog_python2,
150 arguments : ['@CURRENT_SOURCE_DIR@/brw_oa.py', '@INPUT@',
151 '--chipset', '@EXTRA_ARGS@', '--code', '@OUTPUT0@',
152 '--header', '@OUTPUT1@'],
153 output : ['@BASENAME@.c', '@BASENAME@.h'],
154 )
155
156 i965_oa_sources = []
157 foreach hw : ['hsw', 'bdw', 'chv', 'sklgt2', 'sklgt3', 'sklgt4', 'bxt',
158 'kblgt2', 'kblgt3', 'glk']
159 _xml = 'brw_oa_@0@.xml'.format(hw)
160 i965_oa_sources += oa_generator.process(_xml, extra_args : hw)
161 endforeach
162
163 libi965 = static_library(
164 'i965',
165 [files_i965, i965_oa_sources, nir_opcodes_h, ir_expression_operation_h,
166 xmlpool_options_h],
167 include_directories : [inc_common, inc_intel, inc_dri_common, inc_util,
168 inc_drm_uapi, inc_nir],
169 c_args : [c_vis_args, no_override_init_args, '-msse2'],
170 cpp_args : [cpp_vis_args, '-msse2'],
171 link_with : [i965_gen_libs, libintel_common, libisl, libintel_compiler,
172 libblorp],
173 dependencies : [dep_libdrm, dep_valgrind],
174 )
175
176 dri_drivers += libi965
177 dri_link += 'i965_dri.so'