Mesa (master): i965: Use gen7_upload_constant_state for 3DSTATE_CONSTANT_PS as well.
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Sep 17 01:26:11 UTC 2013
Module: Mesa
Branch: master
Commit: 9ad6dda21e149de021889f224cc98852654d175b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ad6dda21e149de021889f224cc98852654d175b
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Sep 13 14:41:04 2013 -0700
i965: Use gen7_upload_constant_state for 3DSTATE_CONSTANT_PS as well.
Now we use gen7_upload_constant_state() for all three shader stages.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
---
src/mesa/drivers/dri/i965/gen7_wm_state.c | 28 +---------------------------
1 files changed, 1 insertions(+), 27 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c
index e9fe95f..80073cd 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c
@@ -129,33 +129,7 @@ upload_ps_state(struct brw_context *brw)
ADVANCE_BATCH();
/* CACHE_NEW_WM_PROG */
- if (brw->wm.prog_data->nr_params == 0) {
- /* Disable the push constant buffers. */
- BEGIN_BATCH(7);
- OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2));
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- ADVANCE_BATCH();
- } else {
- BEGIN_BATCH(7);
- OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2));
-
- OUT_BATCH(ALIGN(brw->wm.prog_data->nr_params,
- brw->wm.prog_data->dispatch_width) / 8);
- OUT_BATCH(0);
- /* Pointer to the WM constant buffer. Covered by the set of
- * state flags from gen6_upload_wm_push_constants.
- */
- OUT_BATCH(brw->wm.base.push_const_offset | GEN7_MOCS_L3);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- ADVANCE_BATCH();
- }
+ gen7_upload_constant_state(brw, &brw->wm.base, true, _3DSTATE_CONSTANT_PS);
dw2 = dw4 = dw5 = 0;
More information about the mesa-commit
mailing list