aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen8_gs_state.c
diff options
context:
space:
mode:
authorBen Widawsky <[email protected]>2014-12-03 15:53:29 -0800
committerKristian Høgsberg <[email protected]>2014-12-08 16:33:59 -0800
commit9404494b9be5d44e6b858c482021b3edcaf87b7a (patch)
treecc425a5acf3b428c2fd7b1087e34410d99ac5757 /src/mesa/drivers/dri/i965/gen8_gs_state.c
parentd20235f79a4b2786c984175b502b97ac73648781 (diff)
i965/skl: Fix GS thread count location
SKL moves the GS threadcount to dw8 from dw7, and no longer does the divide by 2 thing. Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Tested-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen8_gs_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_gs_state.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_gs_state.c b/src/mesa/drivers/dri/i965/gen8_gs_state.c
index 526a8267e4a..efe490ca206 100644
--- a/src/mesa/drivers/dri/i965/gen8_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_gs_state.c
@@ -79,20 +79,27 @@ gen8_upload_gs_state(struct brw_context *brw)
(prog_data->base.dispatch_grf_start_reg <<
GEN6_GS_DISPATCH_START_GRF_SHIFT));
+ uint32_t dw7 = (brw->gs.prog_data->control_data_header_size_hwords <<
+ GEN7_GS_CONTROL_DATA_HEADER_SIZE_SHIFT) |
+ brw->gs.prog_data->dispatch_mode |
+ GEN6_GS_STATISTICS_ENABLE |
+ (brw->gs.prog_data->include_primitive_id ?
+ GEN7_GS_INCLUDE_PRIMITIVE_ID : 0) |
+ GEN7_GS_REORDER_TRAILING |
+ GEN7_GS_ENABLE;
+ uint32_t dw8 = brw->gs.prog_data->control_data_format <<
+ HSW_GS_CONTROL_DATA_FORMAT_SHIFT;
+
+ if (brw->gen < 9)
+ dw7 |= (brw->max_gs_threads / 2 - 1) << HSW_GS_MAX_THREADS_SHIFT;
+ else
+ dw8 |= brw->max_gs_threads - 1;
+
/* DW7 */
- OUT_BATCH(((brw->max_gs_threads / 2 - 1) << HSW_GS_MAX_THREADS_SHIFT) |
- (brw->gs.prog_data->control_data_header_size_hwords <<
- GEN7_GS_CONTROL_DATA_HEADER_SIZE_SHIFT) |
- brw->gs.prog_data->dispatch_mode |
- GEN6_GS_STATISTICS_ENABLE |
- (brw->gs.prog_data->include_primitive_id ?
- GEN7_GS_INCLUDE_PRIMITIVE_ID : 0) |
- GEN7_GS_REORDER_TRAILING |
- GEN7_GS_ENABLE);
+ OUT_BATCH(dw7);
/* DW8 */
- OUT_BATCH(brw->gs.prog_data->control_data_format <<
- HSW_GS_CONTROL_DATA_FORMAT_SHIFT);
+ OUT_BATCH(dw8);
/* DW9 / _NEW_TRANSFORM */
OUT_BATCH((ctx->Transform.ClipPlanesEnabled <<