summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-01-10 13:31:48 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-01-10 19:52:53 -0800
commita314fa929fabea56477eca706fe9d8bba813e069 (patch)
treef43bef2213ddaa769174758874e22e24fab2d822
parent91ae8e997fc8645d27815cb59903b44059597bfd (diff)
get the dispatch modes rightilk-fast-clear
(should get cleaned up) appears to be working now (haven't piglited but various apps work). appears to actually be using the repclear shader. but...glxgears is like 9% slower...aquarium seems a bit slower if anything...clearspd looks basically the same...huh.
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c55
1 files changed, 34 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 0dee1f857b..4137856efd 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -95,23 +95,40 @@ brw_upload_wm_unit(struct brw_context *brw)
}
/* BRW_NEW_PROGRAM_CACHE | BRW_NEW_FS_PROG_DATA */
- wm->thread0.grf_reg_count = prog_data->reg_blocks;
- wm->wm9.grf_reg_count_2 = prog_data->reg_blocks_16;
-
- wm->thread0.kernel_start_pointer =
- brw_program_reloc(brw,
- brw->wm.base.state_offset +
- offsetof(struct brw_wm_unit_state, thread0),
- brw->wm.base.prog_offset +
- (wm->thread0.grf_reg_count << 1)) >> 6;
-
- wm->wm9.kernel_start_pointer_2 =
- brw_program_reloc(brw,
- brw->wm.base.state_offset +
- offsetof(struct brw_wm_unit_state, wm9),
- brw->wm.base.prog_offset +
- prog_data->prog_offset_16 +
- (wm->wm9.grf_reg_count_2 << 1)) >> 6;
+ if (prog_data->no_8) {
+ wm->wm5.enable_16_pix = 1;
+ wm->thread0.grf_reg_count = prog_data->reg_blocks_16;
+ wm->thread0.kernel_start_pointer =
+ brw_program_reloc(brw,
+ brw->wm.base.state_offset +
+ offsetof(struct brw_wm_unit_state, thread0),
+ brw->wm.base.prog_offset +
+ prog_data->prog_offset_16 +
+ (prog_data->reg_blocks_16 << 1)) >> 6;
+
+ } else {
+ wm->thread0.grf_reg_count = prog_data->reg_blocks;
+ wm->wm9.grf_reg_count_2 = prog_data->reg_blocks_16;
+
+ wm->wm5.enable_8_pix = 1;
+ if (prog_data->prog_offset_16)
+ wm->wm5.enable_16_pix = 1;
+
+ wm->thread0.kernel_start_pointer =
+ brw_program_reloc(brw,
+ brw->wm.base.state_offset +
+ offsetof(struct brw_wm_unit_state, thread0),
+ brw->wm.base.prog_offset +
+ (wm->thread0.grf_reg_count << 1)) >> 6;
+
+ wm->wm9.kernel_start_pointer_2 =
+ brw_program_reloc(brw,
+ brw->wm.base.state_offset +
+ offsetof(struct brw_wm_unit_state, wm9),
+ brw->wm.base.prog_offset +
+ prog_data->prog_offset_16 +
+ (wm->wm9.grf_reg_count_2 << 1)) >> 6;
+ }
wm->thread1.depth_coef_urb_read_offset = 1;
if (prog_data->base.use_alt_mode)
@@ -172,10 +189,6 @@ brw_upload_wm_unit(struct brw_context *brw)
wm->wm5.program_uses_killpixel =
prog_data->uses_kill || ctx->Color.AlphaEnabled;
- wm->wm5.enable_8_pix = 1;
- if (prog_data->prog_offset_16)
- wm->wm5.enable_16_pix = 1;
-
wm->wm5.max_threads = brw->max_wm_threads - 1;
/* _NEW_BUFFERS | _NEW_COLOR */