[Mesa-dev] [PATCH 3/5] intel/dev: Add devinfo cs_scratch_ids_per_subslice field
Jordan Justen
jordan.l.justen at intel.com
Wed Mar 7 08:16:28 UTC 2018
Suggested-by: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/intel/dev/gen_device_info.c | 13 ++++++++-----
src/intel/dev/gen_device_info.h | 8 ++++++++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index 1773009d33c..de018c6a692 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -284,11 +284,13 @@ static const struct gen_device_info gen_device_info_byt = {
},
};
-#define HSW_FEATURES \
- GEN7_FEATURES, \
- .is_haswell = true, \
- .supports_simd16_3src = true, \
- .has_resource_streamer = true
+#define HSW_FEATURES \
+ GEN7_FEATURES, \
+ .is_haswell = true, \
+ .supports_simd16_3src = true, \
+ .has_resource_streamer = true, \
+ /* WaCSScratchSize:hsw */ \
+ .cs_scratch_ids_per_subslice = 16 * 8
static const struct gen_device_info gen_device_info_hsw_gt1 = {
HSW_FEATURES, .gt = 1,
@@ -476,6 +478,7 @@ static const struct gen_device_info gen_device_info_chv = {
.max_gs_threads = 80,
.max_wm_threads = 128,
.max_cs_threads = 6 * 7,
+ .cs_scratch_ids_per_subslice = 8 * 7,
.urb = {
.size = 192,
.min_entries = {
diff --git a/src/intel/dev/gen_device_info.h b/src/intel/dev/gen_device_info.h
index b8044d00032..fa6b38f19ec 100644
--- a/src/intel/dev/gen_device_info.h
+++ b/src/intel/dev/gen_device_info.h
@@ -148,6 +148,14 @@ struct gen_device_info
*/
unsigned max_cs_threads;
+ /**
+ * The range of scratch addresses may differ from the number of EUs
+ * available for compute programs. This requires allocating a larger
+ * scratch buffer. For affected hardware, this will be set. If this is not
+ * set, then max_cs_threads should be used instead.
+ */
+ unsigned cs_scratch_ids_per_subslice;
+
struct {
/**
* Hardware default URB size.
--
2.16.1
More information about the mesa-dev
mailing list