2013-07-04 12:11:36 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright © 2013 Intel Corporation
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
*
|
|
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
|
* Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
|
|
* IN THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
2016-08-22 15:01:08 -07:00
|
|
|
#include "gen_device_info.h"
|
2013-07-04 12:11:36 -07:00
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_i965 = {
|
2013-07-04 12:11:36 -07:00
|
|
|
.gen = 4,
|
2013-09-26 11:36:42 -07:00
|
|
|
.has_negative_rhw_bug = true,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 16,
|
|
|
|
|
.max_gs_threads = 2,
|
|
|
|
|
.max_wm_threads = 8 * 4,
|
|
|
|
|
.urb = {
|
|
|
|
|
.size = 256,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_g4x = {
|
2013-07-04 12:11:36 -07:00
|
|
|
.gen = 4,
|
2013-09-26 11:55:36 -07:00
|
|
|
.has_pln = true,
|
|
|
|
|
.has_compr4 = true,
|
2013-10-18 16:14:05 -07:00
|
|
|
.has_surface_tile_offset = true,
|
2013-07-04 12:11:36 -07:00
|
|
|
.is_g4x = true,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 32,
|
|
|
|
|
.max_gs_threads = 2,
|
|
|
|
|
.max_wm_threads = 10 * 5,
|
|
|
|
|
.urb = {
|
|
|
|
|
.size = 384,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_ilk = {
|
2013-07-04 12:11:36 -07:00
|
|
|
.gen = 5,
|
2013-09-26 11:55:36 -07:00
|
|
|
.has_pln = true,
|
|
|
|
|
.has_compr4 = true,
|
|
|
|
|
.has_surface_tile_offset = true,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 72,
|
|
|
|
|
.max_gs_threads = 32,
|
|
|
|
|
.max_wm_threads = 12 * 6,
|
|
|
|
|
.urb = {
|
|
|
|
|
.size = 1024,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_snb_gt1 = {
|
2013-07-04 12:11:36 -07:00
|
|
|
.gen = 6,
|
2014-04-04 12:16:23 -07:00
|
|
|
.gt = 1,
|
2013-07-04 12:11:36 -07:00
|
|
|
.has_hiz_and_separate_stencil = true,
|
|
|
|
|
.has_llc = true,
|
2013-09-26 11:55:36 -07:00
|
|
|
.has_pln = true,
|
|
|
|
|
.has_surface_tile_offset = true,
|
2013-09-26 11:36:42 -07:00
|
|
|
.needs_unlit_centroid_workaround = true,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 24,
|
|
|
|
|
.max_gs_threads = 21, /* conservative; 24 if rendering disabled. */
|
|
|
|
|
.max_wm_threads = 40,
|
|
|
|
|
.urb = {
|
|
|
|
|
.size = 32,
|
|
|
|
|
.min_vs_entries = 24,
|
|
|
|
|
.max_vs_entries = 256,
|
|
|
|
|
.max_gs_entries = 256,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_snb_gt2 = {
|
2013-07-04 12:11:36 -07:00
|
|
|
.gen = 6,
|
|
|
|
|
.gt = 2,
|
|
|
|
|
.has_hiz_and_separate_stencil = true,
|
|
|
|
|
.has_llc = true,
|
2013-09-26 11:55:36 -07:00
|
|
|
.has_pln = true,
|
|
|
|
|
.has_surface_tile_offset = true,
|
2013-09-26 11:36:42 -07:00
|
|
|
.needs_unlit_centroid_workaround = true,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 60,
|
|
|
|
|
.max_gs_threads = 60,
|
|
|
|
|
.max_wm_threads = 80,
|
|
|
|
|
.urb = {
|
|
|
|
|
.size = 64,
|
|
|
|
|
.min_vs_entries = 24,
|
|
|
|
|
.max_vs_entries = 256,
|
|
|
|
|
.max_gs_entries = 256,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define GEN7_FEATURES \
|
|
|
|
|
.gen = 7, \
|
|
|
|
|
.has_hiz_and_separate_stencil = true, \
|
|
|
|
|
.must_use_separate_stencil = true, \
|
2013-09-26 11:36:42 -07:00
|
|
|
.has_llc = true, \
|
2013-09-26 11:55:36 -07:00
|
|
|
.has_pln = true, \
|
2014-06-28 19:18:44 -07:00
|
|
|
.has_surface_tile_offset = true
|
2013-07-04 12:11:36 -07:00
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_ivb_gt1 = {
|
2013-07-04 12:11:36 -07:00
|
|
|
GEN7_FEATURES, .is_ivybridge = true, .gt = 1,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 36,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 36,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 36,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_threads = 36,
|
|
|
|
|
.max_wm_threads = 48,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 36,
|
2013-09-25 17:01:55 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 128,
|
|
|
|
|
.min_vs_entries = 32,
|
|
|
|
|
.max_vs_entries = 512,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 32,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 10,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 288,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_entries = 192,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_ivb_gt2 = {
|
2013-07-04 12:11:36 -07:00
|
|
|
GEN7_FEATURES, .is_ivybridge = true, .gt = 2,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 128,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 128,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 128,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_threads = 128,
|
|
|
|
|
.max_wm_threads = 172,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 64,
|
2013-09-25 17:01:55 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 256,
|
|
|
|
|
.min_vs_entries = 32,
|
|
|
|
|
.max_vs_entries = 704,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 64,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 10,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 448,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_entries = 320,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_byt = {
|
2013-07-04 12:11:36 -07:00
|
|
|
GEN7_FEATURES, .is_baytrail = true, .gt = 1,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-07-04 12:11:36 -07:00
|
|
|
.has_llc = false,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 36,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 36,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 36,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_threads = 36,
|
|
|
|
|
.max_wm_threads = 48,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 32,
|
2013-09-25 17:01:55 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 128,
|
|
|
|
|
.min_vs_entries = 32,
|
|
|
|
|
.max_vs_entries = 512,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 32,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 10,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 288,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_entries = 192,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2015-04-16 17:50:43 -07:00
|
|
|
#define HSW_FEATURES \
|
|
|
|
|
GEN7_FEATURES, \
|
2015-04-16 17:52:03 -07:00
|
|
|
.is_haswell = true, \
|
2013-07-02 11:48:22 -04:00
|
|
|
.supports_simd16_3src = true, \
|
|
|
|
|
.has_resource_streamer = true
|
2015-04-16 17:50:43 -07:00
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_hsw_gt1 = {
|
2015-04-16 17:50:43 -07:00
|
|
|
HSW_FEATURES, .gt = 1,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 70,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 70,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 70,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_threads = 70,
|
|
|
|
|
.max_wm_threads = 102,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 70,
|
2013-09-25 17:01:55 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 128,
|
|
|
|
|
.min_vs_entries = 32,
|
|
|
|
|
.max_vs_entries = 640,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 64,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 10,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 384,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_entries = 256,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_hsw_gt2 = {
|
2015-04-16 17:50:43 -07:00
|
|
|
HSW_FEATURES, .gt = 2,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 280,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 256,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 280,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_threads = 256,
|
|
|
|
|
.max_wm_threads = 204,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 70,
|
2013-09-25 17:01:55 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 256,
|
|
|
|
|
.min_vs_entries = 64,
|
|
|
|
|
.max_vs_entries = 1664,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 128,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 10,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 960,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_entries = 640,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_hsw_gt3 = {
|
2015-04-16 17:50:43 -07:00
|
|
|
HSW_FEATURES, .gt = 3,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 2,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_vs_threads = 280,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 256,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 280,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_threads = 256,
|
|
|
|
|
.max_wm_threads = 408,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 70,
|
2013-09-25 17:01:55 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 512,
|
|
|
|
|
.min_vs_entries = 64,
|
|
|
|
|
.max_vs_entries = 1664,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 128,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 10,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 960,
|
2013-09-25 17:01:55 -07:00
|
|
|
.max_gs_entries = 640,
|
|
|
|
|
},
|
2013-07-04 12:11:36 -07:00
|
|
|
};
|
|
|
|
|
|
2013-11-01 11:44:09 -07:00
|
|
|
#define GEN8_FEATURES \
|
|
|
|
|
.gen = 8, \
|
|
|
|
|
.has_hiz_and_separate_stencil = true, \
|
2013-07-02 11:48:22 -04:00
|
|
|
.has_resource_streamer = true, \
|
2013-11-01 11:44:09 -07:00
|
|
|
.must_use_separate_stencil = true, \
|
|
|
|
|
.has_llc = true, \
|
|
|
|
|
.has_pln = true, \
|
2015-04-16 17:52:03 -07:00
|
|
|
.supports_simd16_3src = true, \
|
2016-07-18 18:06:02 -07:00
|
|
|
.has_surface_tile_offset = true, \
|
2014-05-13 07:20:02 -07:00
|
|
|
.max_vs_threads = 504, \
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 504, \
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 504, \
|
2014-05-13 07:20:02 -07:00
|
|
|
.max_gs_threads = 504, \
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_wm_threads = 384
|
2013-11-01 11:44:09 -07:00
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_bdw_gt1 = {
|
2013-11-01 11:44:09 -07:00
|
|
|
GEN8_FEATURES, .gt = 1,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 42,
|
2014-05-13 07:20:02 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 192,
|
|
|
|
|
.min_vs_entries = 64,
|
|
|
|
|
.max_vs_entries = 2560,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 504,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 34,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 1536,
|
2014-05-13 07:20:02 -07:00
|
|
|
.max_gs_entries = 960,
|
|
|
|
|
}
|
2013-11-01 11:44:09 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_bdw_gt2 = {
|
2013-11-01 11:44:09 -07:00
|
|
|
GEN8_FEATURES, .gt = 2,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 56,
|
2014-05-13 07:20:02 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 384,
|
|
|
|
|
.min_vs_entries = 64,
|
|
|
|
|
.max_vs_entries = 2560,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 504,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 34,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 1536,
|
2014-05-13 07:20:02 -07:00
|
|
|
.max_gs_entries = 960,
|
|
|
|
|
}
|
2013-11-01 11:44:09 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_bdw_gt3 = {
|
2013-11-01 11:44:09 -07:00
|
|
|
GEN8_FEATURES, .gt = 3,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 2,
|
2015-03-13 16:42:40 -07:00
|
|
|
.max_cs_threads = 56,
|
2014-05-13 07:20:02 -07:00
|
|
|
.urb = {
|
|
|
|
|
.size = 384,
|
|
|
|
|
.min_vs_entries = 64,
|
|
|
|
|
.max_vs_entries = 2560,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 504,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 34,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 1536,
|
2014-05-13 07:20:02 -07:00
|
|
|
.max_gs_entries = 960,
|
|
|
|
|
}
|
2013-11-01 11:44:09 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_chv = {
|
2014-02-18 16:39:11 -08:00
|
|
|
GEN8_FEATURES, .is_cherryview = 1, .gt = 1,
|
|
|
|
|
.has_llc = false,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2014-11-02 11:43:24 -08:00
|
|
|
.max_vs_threads = 80,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 80,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 80,
|
2014-11-02 11:43:24 -08:00
|
|
|
.max_gs_threads = 80,
|
2015-01-19 16:08:31 +02:00
|
|
|
.max_wm_threads = 128,
|
2016-02-08 18:11:42 -08:00
|
|
|
.max_cs_threads = 6 * 7,
|
2014-02-18 16:39:11 -08:00
|
|
|
.urb = {
|
2015-01-19 16:08:31 +02:00
|
|
|
.size = 192,
|
2015-01-19 16:09:10 +02:00
|
|
|
.min_vs_entries = 34,
|
2014-02-18 16:39:11 -08:00
|
|
|
.max_vs_entries = 640,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 80,
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 34,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 384,
|
2014-02-18 16:39:11 -08:00
|
|
|
.max_gs_entries = 256,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2014-09-22 04:44:19 -07:00
|
|
|
#define GEN9_FEATURES \
|
|
|
|
|
.gen = 9, \
|
|
|
|
|
.has_hiz_and_separate_stencil = true, \
|
2013-07-02 11:48:22 -04:00
|
|
|
.has_resource_streamer = true, \
|
2014-09-22 04:44:19 -07:00
|
|
|
.must_use_separate_stencil = true, \
|
|
|
|
|
.has_llc = true, \
|
|
|
|
|
.has_pln = true, \
|
2015-07-28 19:52:49 -07:00
|
|
|
.supports_simd16_3src = true, \
|
2016-07-18 18:06:02 -07:00
|
|
|
.has_surface_tile_offset = true, \
|
2015-07-29 12:35:24 -07:00
|
|
|
.max_vs_threads = 336, \
|
|
|
|
|
.max_gs_threads = 336, \
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 336, \
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 336, \
|
2015-07-30 19:16:32 -07:00
|
|
|
.max_cs_threads = 56, \
|
2014-09-22 04:44:19 -07:00
|
|
|
.urb = { \
|
2015-09-10 16:59:12 -07:00
|
|
|
.size = 384, \
|
2014-09-22 04:44:19 -07:00
|
|
|
.min_vs_entries = 64, \
|
2015-07-29 12:35:24 -07:00
|
|
|
.max_vs_entries = 1856, \
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 672, \
|
2015-11-30 15:26:50 -08:00
|
|
|
.min_ds_entries = 34, \
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 1120, \
|
2014-09-22 04:44:19 -07:00
|
|
|
.max_gs_entries = 640, \
|
|
|
|
|
}
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_skl_gt1 = {
|
2015-04-16 17:52:03 -07:00
|
|
|
GEN9_FEATURES, .gt = 1,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2015-09-10 16:59:12 -07:00
|
|
|
.urb.size = 192,
|
2014-09-22 04:44:19 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_skl_gt2 = {
|
2015-04-16 17:52:03 -07:00
|
|
|
GEN9_FEATURES, .gt = 2,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2014-09-22 04:44:19 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_skl_gt3 = {
|
2015-04-16 17:52:03 -07:00
|
|
|
GEN9_FEATURES, .gt = 3,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 2,
|
2014-09-22 04:44:19 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_skl_gt4 = {
|
2015-10-29 17:30:35 -07:00
|
|
|
GEN9_FEATURES, .gt = 4,
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 3,
|
2015-11-06 18:12:27 -08:00
|
|
|
/* From the "L3 Allocation and Programming" documentation:
|
|
|
|
|
*
|
|
|
|
|
* "URB is limited to 1008KB due to programming restrictions. This is not a
|
|
|
|
|
* restriction of the L3 implementation, but of the FF and other clients.
|
|
|
|
|
* Therefore, in a GT4 implementation it is possible for the programmed
|
|
|
|
|
* 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,
|
2015-10-29 17:30:35 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_bxt = {
|
2015-06-17 15:50:11 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.is_broxton = 1,
|
|
|
|
|
.gt = 1,
|
|
|
|
|
.has_llc = false,
|
2015-07-30 19:12:15 -07:00
|
|
|
|
2015-11-25 15:15:20 +02:00
|
|
|
.num_slices = 1,
|
2016-02-12 21:53:34 -08:00
|
|
|
.max_vs_threads = 112,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 112,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 112,
|
2016-02-12 21:53:34 -08:00
|
|
|
.max_gs_threads = 112,
|
|
|
|
|
.max_cs_threads = 6 * 6,
|
2015-06-17 15:50:11 -07:00
|
|
|
.urb = {
|
2016-02-12 21:53:34 -08:00
|
|
|
.size = 192,
|
2015-06-17 15:50:11 -07:00
|
|
|
.min_vs_entries = 34,
|
2016-11-15 00:15:02 -08:00
|
|
|
.min_ds_entries = 34,
|
2016-02-12 21:53:34 -08:00
|
|
|
.max_vs_entries = 704,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 256,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 416,
|
2015-06-17 15:50:11 -07:00
|
|
|
.max_gs_entries = 256,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_bxt_2x6 = {
|
2016-05-26 08:08:29 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.is_broxton = 1,
|
|
|
|
|
.gt = 1,
|
|
|
|
|
.has_llc = false,
|
|
|
|
|
|
|
|
|
|
.num_slices = 1,
|
|
|
|
|
.max_vs_threads = 56, /* XXX: guess */
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_threads = 56, /* XXX: guess */
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_threads = 56,
|
2016-05-26 08:08:29 -07:00
|
|
|
.max_gs_threads = 56,
|
|
|
|
|
.max_cs_threads = 6 * 6,
|
|
|
|
|
.urb = {
|
|
|
|
|
.size = 128,
|
|
|
|
|
.min_vs_entries = 34,
|
2016-11-15 00:15:02 -08:00
|
|
|
.min_ds_entries = 34,
|
2016-05-26 08:08:29 -07:00
|
|
|
.max_vs_entries = 352,
|
2016-10-03 10:39:28 +11:00
|
|
|
.max_tcs_entries = 128,
|
2016-10-03 10:39:29 +11:00
|
|
|
.max_tes_entries = 208,
|
2016-05-26 08:08:29 -07:00
|
|
|
.max_gs_entries = 128,
|
|
|
|
|
}
|
|
|
|
|
};
|
2015-09-21 14:22:53 -07:00
|
|
|
/*
|
|
|
|
|
* Note: for all KBL SKUs, the PRM says SKL for GS entries, not SKL+.
|
|
|
|
|
* There's no KBL entry. Using the default SKL (GEN9) GS entries value.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_kbl_gt1 = {
|
2015-09-21 14:22:53 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.gt = 1,
|
|
|
|
|
|
|
|
|
|
.max_cs_threads = 7 * 6,
|
|
|
|
|
.urb.size = 192,
|
2016-01-08 16:30:20 -08:00
|
|
|
.num_slices = 1,
|
2015-09-21 14:22:53 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_kbl_gt1_5 = {
|
2015-09-21 14:22:53 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.gt = 1,
|
|
|
|
|
|
|
|
|
|
.max_cs_threads = 7 * 6,
|
2016-01-08 16:30:20 -08:00
|
|
|
.num_slices = 1,
|
2015-09-21 14:22:53 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_kbl_gt2 = {
|
2015-09-21 14:22:53 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.gt = 2,
|
|
|
|
|
|
2016-01-08 16:30:20 -08:00
|
|
|
.num_slices = 1,
|
2015-09-21 14:22:53 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_kbl_gt3 = {
|
2015-09-21 14:22:53 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.gt = 3,
|
|
|
|
|
|
2016-01-08 16:30:20 -08:00
|
|
|
.num_slices = 2,
|
2015-09-21 14:22:53 -07:00
|
|
|
};
|
|
|
|
|
|
2016-08-22 15:01:08 -07:00
|
|
|
static const struct gen_device_info gen_device_info_kbl_gt4 = {
|
2015-09-21 14:22:53 -07:00
|
|
|
GEN9_FEATURES,
|
|
|
|
|
.gt = 4,
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* From the "L3 Allocation and Programming" documentation:
|
|
|
|
|
*
|
|
|
|
|
* "URB is limited to 1008KB due to programming restrictions. This
|
|
|
|
|
* is not a restriction of the L3 implementation, but of the FF and
|
|
|
|
|
* other clients. Therefore, in a GT4 implementation it is
|
|
|
|
|
* possible for the programmed 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,
|
2016-01-08 16:30:20 -08:00
|
|
|
.num_slices = 3,
|
2015-09-21 14:22:53 -07:00
|
|
|
};
|
|
|
|
|
|
2016-10-03 09:32:54 +03:00
|
|
|
bool
|
2016-09-22 14:58:11 +03:00
|
|
|
gen_get_device_info(int devid, struct gen_device_info *devinfo)
|
2013-07-04 12:11:36 -07:00
|
|
|
{
|
|
|
|
|
switch (devid) {
|
|
|
|
|
#undef CHIPSET
|
2015-04-16 17:52:03 -07:00
|
|
|
#define CHIPSET(id, family, name) \
|
2016-09-22 14:58:11 +03:00
|
|
|
case id: *devinfo = gen_device_info_##family; break;
|
2013-07-04 12:11:36 -07:00
|
|
|
#include "pci_ids/i965_pci_ids.h"
|
|
|
|
|
default:
|
2014-02-10 01:54:23 -08:00
|
|
|
fprintf(stderr, "i965_dri.so does not support the 0x%x PCI ID.\n", devid);
|
2016-09-22 14:58:11 +03:00
|
|
|
return false;
|
2013-07-04 12:11:36 -07:00
|
|
|
}
|
2015-04-16 17:52:03 -07:00
|
|
|
|
2016-11-07 17:12:54 -08:00
|
|
|
/* From the Skylake PRM, 3DSTATE_PS::Scratch Space Base Pointer:
|
|
|
|
|
*
|
|
|
|
|
* "Scratch Space per slice is computed based on 4 sub-slices. SW must
|
|
|
|
|
* allocate scratch space enough so that each slice has 4 slices allowed."
|
|
|
|
|
*
|
|
|
|
|
* The equivalent internal documentation says that this programming note
|
|
|
|
|
* applies to all Gen9+ platforms.
|
|
|
|
|
*
|
|
|
|
|
* The hardware typically calculates the scratch space pointer by taking
|
|
|
|
|
* the base address, and adding per-thread-scratch-space * thread ID.
|
|
|
|
|
* Extra padding can be necessary depending how the thread IDs are
|
|
|
|
|
* calculated for a particular shader stage.
|
|
|
|
|
*/
|
|
|
|
|
if (devinfo->gen >= 9) {
|
|
|
|
|
devinfo->max_wm_threads = 64 /* threads-per-PSD */
|
|
|
|
|
* devinfo->num_slices
|
|
|
|
|
* 4; /* effective subslices per slice */
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-22 14:58:11 +03:00
|
|
|
return true;
|
2013-07-04 12:11:36 -07:00
|
|
|
}
|
2016-04-04 14:50:03 -07:00
|
|
|
|
|
|
|
|
const char *
|
2016-08-25 16:22:58 -07:00
|
|
|
gen_get_device_name(int devid)
|
2016-04-04 14:50:03 -07:00
|
|
|
{
|
|
|
|
|
switch (devid) {
|
|
|
|
|
#undef CHIPSET
|
|
|
|
|
#define CHIPSET(id, family, name) case id: return name;
|
|
|
|
|
#include "pci_ids/i965_pci_ids.h"
|
|
|
|
|
default:
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|