[Mesa-dev] [PATCH 2/2] i965: compute scratch space size correctly for Gen9
Rogovin, Kevin
kevin.rogovin at intel.com
Tue Dec 12 12:05:38 UTC 2017
Ahh futz this was the wrong one!! it should just be
subslices += 4 * brw->screen->devinfo.num_slices;
Sighs (too many terminals open with too many branches :P )
I need to post a v2; I will post it shortly.
-Kevin
-----Original Message-----
From: Rogovin, Kevin
Sent: Tuesday, December 12, 2017 12:05 PM
To: mesa-dev at lists.freedesktop.org
Cc: Rogovin, Kevin <kevin.rogovin at intel.com>
Subject: [PATCH 2/2] i965: compute scratch space size correctly for Gen9
From: Kevin Rogovin <kevin.rogovin at intel.com>
Signed-off-by: Kevin Rogovin <kevin.rogovin at intel.com>
---
src/mesa/drivers/dri/i965/brw_program.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 6aa41009e7..7bfcad9a65 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -368,9 +368,17 @@ brw_alloc_stage_scratch(struct brw_context *brw,
*
* According to the other driver team, this applies to compute shaders
* as well. This is not currently documented at all.
+ *
+ * brw->screen->subslice_total is the TOTAL number of subslices
+ * and we wish to view that there are 4 subslices per slice
+ * instead of the actaul number of subslices per slice.
*/
- if (devinfo->gen >= 9)
- subslices = 4;
+ if (devinfo->gen >= 9) {
+ subslices = 0;
+ for (int i = 0; i < brw->screen->devinfo.num_slices; ++i) {
+ subslices += 4 * brw->screen->devinfo.num_subslices[i];
+ }
+ }
/* WaCSScratchSize:hsw
*
--
2.15.0
More information about the mesa-dev
mailing list