2 * Copyright © 2013 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26 #include "brw_device_info.h"
28 static const struct brw_device_info brw_device_info_i965
= {
30 .has_negative_rhw_bug
= true,
33 .max_wm_threads
= 8 * 4,
39 static const struct brw_device_info brw_device_info_g4x
= {
43 .has_surface_tile_offset
= true,
47 .max_wm_threads
= 10 * 5,
53 static const struct brw_device_info brw_device_info_ilk
= {
57 .has_surface_tile_offset
= true,
60 .max_wm_threads
= 12 * 6,
66 static const struct brw_device_info brw_device_info_snb_gt1
= {
69 .has_hiz_and_separate_stencil
= true,
72 .has_surface_tile_offset
= true,
73 .needs_unlit_centroid_workaround
= true,
75 .max_gs_threads
= 21, /* conservative; 24 if rendering disabled. */
80 .max_vs_entries
= 256,
81 .max_gs_entries
= 256,
85 static const struct brw_device_info brw_device_info_snb_gt2
= {
88 .has_hiz_and_separate_stencil
= true,
91 .has_surface_tile_offset
= true,
92 .needs_unlit_centroid_workaround
= true,
99 .max_vs_entries
= 256,
100 .max_gs_entries
= 256,
104 #define GEN7_FEATURES \
106 .has_hiz_and_separate_stencil = true, \
107 .must_use_separate_stencil = true, \
110 .has_surface_tile_offset = true
112 static const struct brw_device_info brw_device_info_ivb_gt1
= {
113 GEN7_FEATURES
, .is_ivybridge
= true, .gt
= 1,
114 .needs_unlit_centroid_workaround
= true,
115 .max_vs_threads
= 36,
116 .max_hs_threads
= 36,
117 .max_ds_threads
= 36,
118 .max_gs_threads
= 36,
119 .max_wm_threads
= 48,
120 .max_cs_threads
= 36,
123 .min_vs_entries
= 32,
124 .max_vs_entries
= 512,
125 .max_hs_entries
= 32,
126 .min_ds_entries
= 10,
127 .max_ds_entries
= 288,
128 .max_gs_entries
= 192,
132 static const struct brw_device_info brw_device_info_ivb_gt2
= {
133 GEN7_FEATURES
, .is_ivybridge
= true, .gt
= 2,
134 .needs_unlit_centroid_workaround
= true,
135 .max_vs_threads
= 128,
136 .max_hs_threads
= 128,
137 .max_ds_threads
= 128,
138 .max_gs_threads
= 128,
139 .max_wm_threads
= 172,
140 .max_cs_threads
= 64,
143 .min_vs_entries
= 32,
144 .max_vs_entries
= 704,
145 .max_hs_entries
= 64,
146 .min_ds_entries
= 10,
147 .max_ds_entries
= 448,
148 .max_gs_entries
= 320,
152 static const struct brw_device_info brw_device_info_byt
= {
153 GEN7_FEATURES
, .is_baytrail
= true, .gt
= 1,
154 .needs_unlit_centroid_workaround
= true,
156 .max_vs_threads
= 36,
157 .max_hs_threads
= 36,
158 .max_ds_threads
= 36,
159 .max_gs_threads
= 36,
160 .max_wm_threads
= 48,
161 .max_cs_threads
= 32,
164 .min_vs_entries
= 32,
165 .max_vs_entries
= 512,
166 .max_hs_entries
= 32,
167 .min_ds_entries
= 10,
168 .max_ds_entries
= 288,
169 .max_gs_entries
= 192,
173 #define HSW_FEATURES \
175 .is_haswell = true, \
176 .supports_simd16_3src = true, \
177 .has_resource_streamer = true
179 static const struct brw_device_info brw_device_info_hsw_gt1
= {
180 HSW_FEATURES
, .gt
= 1,
181 .max_vs_threads
= 70,
182 .max_hs_threads
= 70,
183 .max_ds_threads
= 70,
184 .max_gs_threads
= 70,
185 .max_wm_threads
= 102,
186 .max_cs_threads
= 70,
189 .min_vs_entries
= 32,
190 .max_vs_entries
= 640,
191 .max_hs_entries
= 64,
192 .min_ds_entries
= 10,
193 .max_ds_entries
= 384,
194 .max_gs_entries
= 256,
198 static const struct brw_device_info brw_device_info_hsw_gt2
= {
199 HSW_FEATURES
, .gt
= 2,
200 .max_vs_threads
= 280,
201 .max_hs_threads
= 256,
202 .max_ds_threads
= 280,
203 .max_gs_threads
= 256,
204 .max_wm_threads
= 204,
205 .max_cs_threads
= 70,
208 .min_vs_entries
= 64,
209 .max_vs_entries
= 1664,
210 .max_hs_entries
= 128,
211 .min_ds_entries
= 10,
212 .max_ds_entries
= 960,
213 .max_gs_entries
= 640,
217 static const struct brw_device_info brw_device_info_hsw_gt3
= {
218 HSW_FEATURES
, .gt
= 3,
219 .max_vs_threads
= 280,
220 .max_hs_threads
= 256,
221 .max_ds_threads
= 280,
222 .max_gs_threads
= 256,
223 .max_wm_threads
= 408,
224 .max_cs_threads
= 70,
227 .min_vs_entries
= 64,
228 .max_vs_entries
= 1664,
229 .max_hs_entries
= 128,
230 .min_ds_entries
= 10,
231 .max_ds_entries
= 960,
232 .max_gs_entries
= 640,
236 #define GEN8_FEATURES \
238 .has_hiz_and_separate_stencil = true, \
239 .has_resource_streamer = true, \
240 .must_use_separate_stencil = true, \
243 .supports_simd16_3src = true, \
244 .max_vs_threads = 504, \
245 .max_hs_threads = 504, \
246 .max_ds_threads = 504, \
247 .max_gs_threads = 504, \
248 .max_wm_threads = 384
250 static const struct brw_device_info brw_device_info_bdw_gt1
= {
251 GEN8_FEATURES
, .gt
= 1,
252 .max_cs_threads
= 42,
255 .min_vs_entries
= 64,
256 .max_vs_entries
= 2560,
257 .max_hs_entries
= 504,
258 .min_ds_entries
= 34,
259 .max_ds_entries
= 1536,
260 .max_gs_entries
= 960,
264 static const struct brw_device_info brw_device_info_bdw_gt2
= {
265 GEN8_FEATURES
, .gt
= 2,
266 .max_cs_threads
= 56,
269 .min_vs_entries
= 64,
270 .max_vs_entries
= 2560,
271 .max_hs_entries
= 504,
272 .min_ds_entries
= 34,
273 .max_ds_entries
= 1536,
274 .max_gs_entries
= 960,
278 static const struct brw_device_info brw_device_info_bdw_gt3
= {
279 GEN8_FEATURES
, .gt
= 3,
280 .max_cs_threads
= 56,
283 .min_vs_entries
= 64,
284 .max_vs_entries
= 2560,
285 .max_hs_entries
= 504,
286 .min_ds_entries
= 34,
287 .max_ds_entries
= 1536,
288 .max_gs_entries
= 960,
292 static const struct brw_device_info brw_device_info_chv
= {
293 GEN8_FEATURES
, .is_cherryview
= 1, .gt
= 1,
295 .max_vs_threads
= 80,
296 .max_hs_threads
= 80,
297 .max_ds_threads
= 80,
298 .max_gs_threads
= 80,
299 .max_wm_threads
= 128,
300 .max_cs_threads
= 28,
303 .min_vs_entries
= 34,
304 .max_vs_entries
= 640,
305 .max_hs_entries
= 80,
306 .min_ds_entries
= 34,
307 .max_ds_entries
= 384,
308 .max_gs_entries
= 256,
312 #define GEN9_FEATURES \
314 .has_hiz_and_separate_stencil = true, \
315 .has_resource_streamer = true, \
316 .must_use_separate_stencil = true, \
319 .supports_simd16_3src = true, \
320 .max_vs_threads = 336, \
321 .max_gs_threads = 336, \
322 .max_hs_threads = 336, \
323 .max_ds_threads = 336, \
324 .max_wm_threads = 64 * 9, \
325 .max_cs_threads = 56, \
328 .min_vs_entries = 64, \
329 .max_vs_entries = 1856, \
330 .max_hs_entries = 672, \
331 .min_ds_entries = 34, \
332 .max_ds_entries = 1120, \
333 .max_gs_entries = 640, \
336 static const struct brw_device_info brw_device_info_skl_gt1
= {
337 GEN9_FEATURES
, .gt
= 1,
341 static const struct brw_device_info brw_device_info_skl_gt2
= {
342 GEN9_FEATURES
, .gt
= 2,
345 static const struct brw_device_info brw_device_info_skl_gt3
= {
346 GEN9_FEATURES
, .gt
= 3,
349 static const struct brw_device_info brw_device_info_skl_gt4
= {
350 GEN9_FEATURES
, .gt
= 4,
351 /* From the "L3 Allocation and Programming" documentation:
353 * "URB is limited to 1008KB due to programming restrictions. This is not a
354 * restriction of the L3 implementation, but of the FF and other clients.
355 * Therefore, in a GT4 implementation it is possible for the programmed
356 * allocation of the L3 data array to provide 3*384KB=1152KB for URB, but
357 * only 1008KB of this will be used."
359 .urb
.size
= 1008 / 3,
362 static const struct brw_device_info brw_device_info_bxt
= {
368 /* XXX: These are preliminary thread counts and URB sizes. */
369 .max_vs_threads
= 56,
370 .max_hs_threads
= 56,
371 .max_ds_threads
= 56,
372 .max_gs_threads
= 56,
373 .max_wm_threads
= 32,
374 .max_cs_threads
= 28,
377 .min_vs_entries
= 34,
378 .max_vs_entries
= 640,
379 .max_hs_entries
= 80,
380 .max_ds_entries
= 80,
381 .max_gs_entries
= 256,
385 const struct brw_device_info
*
386 brw_get_device_info(int devid
)
388 const struct brw_device_info
*devinfo
;
391 #define CHIPSET(id, family, name) \
392 case id: devinfo = &brw_device_info_##family; break;
393 #include "pci_ids/i965_pci_ids.h"
395 fprintf(stderr
, "i965_dri.so does not support the 0x%x PCI ID.\n", devid
);