[Mesa-dev] [PATCH 2/2] i965: Put the gt and slice count in the features macro
Ben Widawsky
benjamin.widawsky at intel.com
Tue Dec 29 10:14:15 PST 2015
This saves a bit of typing for fields which we are obvious and always required
to be entered by the structure which is defining a platform. This is unlike
fields like URB sizes where the defaults might be fine.
Doing this also makes it easy and obvious to keep around preliminary hardware
information like we have for BXT.
This patch is just a preference of mine, so if people are opposed it doesn't
need to get merged.
Signed-off-by: Ben Widawsky <benjamin.widawsky at intel.com>
---
src/mesa/drivers/dri/i965/brw_device_info.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c
index 21494b7..41accc3 100644
--- a/src/mesa/drivers/dri/i965/brw_device_info.c
+++ b/src/mesa/drivers/dri/i965/brw_device_info.c
@@ -342,30 +342,27 @@ static const struct brw_device_info brw_device_info_chv = {
.max_gs_entries = 640, \
}
-#define GEN9_FEATURES \
+#define GEN9_FEATURES(_gt, _slices) \
GEN8_FEATURES, \
- GEN9_HW_INFO
+ GEN9_HW_INFO, \
+ .gt = _gt, .num_slices = _slices
static const struct brw_device_info brw_device_info_skl_gt1 = {
- GEN9_FEATURES, .gt = 1,
- .num_slices = 1,
- .urb.size = 192,
+ GEN9_FEATURES(1, 1),
+ .urb.size = 192
};
static const struct brw_device_info brw_device_info_skl_gt2 = {
- GEN9_FEATURES, .gt = 2,
- .num_slices = 1,
+ GEN9_FEATURES(2, 1)
};
static const struct brw_device_info brw_device_info_skl_gt3 = {
- GEN9_FEATURES, .gt = 3,
- .num_slices = 2,
+ GEN9_FEATURES(3, 2)
};
static const struct brw_device_info brw_device_info_skl_gt4 = {
- GEN9_FEATURES, .gt = 4,
- .num_slices = 3,
+ GEN9_FEATURES(4, 3),
/* From the "L3 Allocation and Programming" documentation:
*
* "URB is limited to 1008KB due to programming restrictions. This is not a
@@ -374,17 +371,15 @@ static const struct brw_device_info brw_device_info_skl_gt4 = {
* allocation of the L3 data array to provide 3*384KB=1152KB for URB, but
* only 1008KB of this will be used."
*/
- .urb.size = 1008 / 3,
+ .urb.size = 1008 / 3
};
static const struct brw_device_info brw_device_info_bxt = {
- GEN9_FEATURES,
+ GEN9_FEATURES(1, 1),
.is_broxton = 1,
- .gt = 1,
.has_llc = false,
/* XXX: These are preliminary thread counts and URB sizes. */
- .num_slices = 1,
.max_vs_threads = 56,
.max_hs_threads = 56,
.max_ds_threads = 56,
--
2.6.4
More information about the mesa-dev
mailing list