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,
31 .needs_unlit_centroid_workaround
= true,
34 .max_wm_threads
= 8 * 4,
40 static const struct brw_device_info brw_device_info_g4x
= {
44 .has_surface_tile_offset
= true,
45 .needs_unlit_centroid_workaround
= true,
49 .max_wm_threads
= 10 * 5,
55 static const struct brw_device_info brw_device_info_ilk
= {
59 .has_surface_tile_offset
= true,
60 .needs_unlit_centroid_workaround
= true,
63 .max_wm_threads
= 12 * 6,
69 static const struct brw_device_info brw_device_info_snb_gt1
= {
72 .has_hiz_and_separate_stencil
= true,
75 .has_surface_tile_offset
= true,
76 .needs_unlit_centroid_workaround
= true,
78 .max_gs_threads
= 21, /* conservative; 24 if rendering disabled. */
83 .max_vs_entries
= 256,
84 .max_gs_entries
= 256,
88 static const struct brw_device_info brw_device_info_snb_gt2
= {
91 .has_hiz_and_separate_stencil
= true,
94 .has_surface_tile_offset
= true,
95 .needs_unlit_centroid_workaround
= true,
101 .min_vs_entries
= 24,
102 .max_vs_entries
= 256,
103 .max_gs_entries
= 256,
107 #define GEN7_FEATURES \
109 .has_hiz_and_separate_stencil = true, \
110 .must_use_separate_stencil = true, \
113 .has_surface_tile_offset = true, \
114 .needs_unlit_centroid_workaround = true
116 static const struct brw_device_info brw_device_info_ivb_gt1
= {
117 GEN7_FEATURES
, .is_ivybridge
= true, .gt
= 1,
118 .max_vs_threads
= 36,
119 .max_gs_threads
= 36,
120 .max_wm_threads
= 48,
123 .min_vs_entries
= 32,
124 .max_vs_entries
= 512,
125 .max_gs_entries
= 192,
129 static const struct brw_device_info brw_device_info_ivb_gt2
= {
130 GEN7_FEATURES
, .is_ivybridge
= true, .gt
= 2,
131 .max_vs_threads
= 128,
132 .max_gs_threads
= 128,
133 .max_wm_threads
= 172,
136 .min_vs_entries
= 32,
137 .max_vs_entries
= 704,
138 .max_gs_entries
= 320,
142 static const struct brw_device_info brw_device_info_byt
= {
143 GEN7_FEATURES
, .is_baytrail
= true, .gt
= 1,
145 .max_vs_threads
= 36,
146 .max_gs_threads
= 36,
147 .max_wm_threads
= 48,
150 .min_vs_entries
= 32,
151 .max_vs_entries
= 512,
152 .max_gs_entries
= 192,
156 static const struct brw_device_info brw_device_info_hsw_gt1
= {
157 GEN7_FEATURES
, .is_haswell
= true, .gt
= 1,
158 .max_vs_threads
= 70,
159 .max_gs_threads
= 70,
160 .max_wm_threads
= 102,
163 .min_vs_entries
= 32,
164 .max_vs_entries
= 640,
165 .max_gs_entries
= 256,
169 static const struct brw_device_info brw_device_info_hsw_gt2
= {
170 GEN7_FEATURES
, .is_haswell
= true, .gt
= 2,
171 .max_vs_threads
= 280,
172 .max_gs_threads
= 256,
173 .max_wm_threads
= 204,
176 .min_vs_entries
= 64,
177 .max_vs_entries
= 1664,
178 .max_gs_entries
= 640,
182 static const struct brw_device_info brw_device_info_hsw_gt3
= {
183 GEN7_FEATURES
, .is_haswell
= true, .gt
= 3,
184 .max_vs_threads
= 280,
185 .max_gs_threads
= 256,
186 .max_wm_threads
= 408,
189 .min_vs_entries
= 64,
190 .max_vs_entries
= 1664,
191 .max_gs_entries
= 640,
195 #define GEN8_FEATURES \
197 .has_hiz_and_separate_stencil = true, \
198 .must_use_separate_stencil = true, \
201 .max_vs_threads = 504, \
202 .max_gs_threads = 504, \
203 .max_wm_threads = 384 \
205 static const struct brw_device_info brw_device_info_bdw_gt1 = {
206 GEN8_FEATURES
, .gt
= 1,
209 .min_vs_entries
= 64,
210 .max_vs_entries
= 2560,
211 .max_gs_entries
= 960,
215 static const struct brw_device_info brw_device_info_bdw_gt2
= {
216 GEN8_FEATURES
, .gt
= 2,
219 .min_vs_entries
= 64,
220 .max_vs_entries
= 2560,
221 .max_gs_entries
= 960,
225 static const struct brw_device_info brw_device_info_bdw_gt3
= {
226 GEN8_FEATURES
, .gt
= 3,
229 .min_vs_entries
= 64,
230 .max_vs_entries
= 2560,
231 .max_gs_entries
= 960,
235 /* Thread counts and URB limits are placeholders, and may not be accurate.
236 * These were copied from Haswell GT1, above.
238 static const struct brw_device_info brw_device_info_chv
= {
239 GEN8_FEATURES
, .is_cherryview
= 1, .gt
= 1,
241 .max_vs_threads
= 70,
242 .max_gs_threads
= 70,
243 .max_wm_threads
= 102,
246 .min_vs_entries
= 64,
247 .max_vs_entries
= 640,
248 .max_gs_entries
= 256,
252 const struct brw_device_info
*
253 brw_get_device_info(int devid
)
257 #define CHIPSET(id, family, name) case id: return &brw_device_info_##family;
258 #include "pci_ids/i965_pci_ids.h"
260 fprintf(stderr
, "i965_dri.so does not support the 0x%x PCI ID.\n", devid
);