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_gs_threads
= 36,
117 .max_wm_threads
= 48,
120 .min_vs_entries
= 32,
121 .max_vs_entries
= 512,
122 .max_gs_entries
= 192,
126 static const struct brw_device_info brw_device_info_ivb_gt2
= {
127 GEN7_FEATURES
, .is_ivybridge
= true, .gt
= 2,
128 .needs_unlit_centroid_workaround
= true,
129 .max_vs_threads
= 128,
130 .max_gs_threads
= 128,
131 .max_wm_threads
= 172,
134 .min_vs_entries
= 32,
135 .max_vs_entries
= 704,
136 .max_gs_entries
= 320,
140 static const struct brw_device_info brw_device_info_byt
= {
141 GEN7_FEATURES
, .is_baytrail
= true, .gt
= 1,
142 .needs_unlit_centroid_workaround
= true,
144 .max_vs_threads
= 36,
145 .max_gs_threads
= 36,
146 .max_wm_threads
= 48,
149 .min_vs_entries
= 32,
150 .max_vs_entries
= 512,
151 .max_gs_entries
= 192,
155 static const struct brw_device_info brw_device_info_hsw_gt1
= {
156 GEN7_FEATURES
, .is_haswell
= true, .gt
= 1,
157 .max_vs_threads
= 70,
158 .max_gs_threads
= 70,
159 .max_wm_threads
= 102,
162 .min_vs_entries
= 32,
163 .max_vs_entries
= 640,
164 .max_gs_entries
= 256,
168 static const struct brw_device_info brw_device_info_hsw_gt2
= {
169 GEN7_FEATURES
, .is_haswell
= true, .gt
= 2,
170 .max_vs_threads
= 280,
171 .max_gs_threads
= 256,
172 .max_wm_threads
= 204,
175 .min_vs_entries
= 64,
176 .max_vs_entries
= 1664,
177 .max_gs_entries
= 640,
181 static const struct brw_device_info brw_device_info_hsw_gt3
= {
182 GEN7_FEATURES
, .is_haswell
= true, .gt
= 3,
183 .max_vs_threads
= 280,
184 .max_gs_threads
= 256,
185 .max_wm_threads
= 408,
188 .min_vs_entries
= 64,
189 .max_vs_entries
= 1664,
190 .max_gs_entries
= 640,
194 #define GEN8_FEATURES \
196 .has_hiz_and_separate_stencil = true, \
197 .must_use_separate_stencil = true, \
200 .max_vs_threads = 504, \
201 .max_gs_threads = 504, \
202 .max_wm_threads = 384 \
204 static const struct brw_device_info brw_device_info_bdw_gt1 = {
205 GEN8_FEATURES
, .gt
= 1,
208 .min_vs_entries
= 64,
209 .max_vs_entries
= 2560,
210 .max_gs_entries
= 960,
214 static const struct brw_device_info brw_device_info_bdw_gt2
= {
215 GEN8_FEATURES
, .gt
= 2,
218 .min_vs_entries
= 64,
219 .max_vs_entries
= 2560,
220 .max_gs_entries
= 960,
224 static const struct brw_device_info brw_device_info_bdw_gt3
= {
225 GEN8_FEATURES
, .gt
= 3,
228 .min_vs_entries
= 64,
229 .max_vs_entries
= 2560,
230 .max_gs_entries
= 960,
234 /* Thread counts and URB limits are placeholders, and may not be accurate.
235 * These were copied from Haswell GT1, above.
237 static const struct brw_device_info brw_device_info_chv
= {
238 GEN8_FEATURES
, .is_cherryview
= 1, .gt
= 1,
240 .max_vs_threads
= 80,
241 .max_gs_threads
= 80,
242 .max_wm_threads
= 102,
245 .min_vs_entries
= 64,
246 .max_vs_entries
= 640,
247 .max_gs_entries
= 256,
251 /* Thread counts and URB limits are placeholders, and may not be accurate. */
252 #define GEN9_FEATURES \
254 .has_hiz_and_separate_stencil = true, \
255 .must_use_separate_stencil = true, \
258 .max_vs_threads = 280, \
259 .max_gs_threads = 256, \
260 .max_wm_threads = 408, \
263 .min_vs_entries = 64, \
264 .max_vs_entries = 1664, \
265 .max_gs_entries = 640, \
268 static const struct brw_device_info brw_device_info_skl_gt1
= {
269 GEN9_FEATURES
, .gt
= 1
272 static const struct brw_device_info brw_device_info_skl_gt2
= {
273 GEN9_FEATURES
, .gt
= 2
276 static const struct brw_device_info brw_device_info_skl_gt3
= {
277 GEN9_FEATURES
, .gt
= 3
280 const struct brw_device_info
*
281 brw_get_device_info(int devid
)
285 #define CHIPSET(id, family, name) case id: return &brw_device_info_##family;
286 #include "pci_ids/i965_pci_ids.h"
288 fprintf(stderr
, "i965_dri.so does not support the 0x%x PCI ID.\n", devid
);