Mesa (master): ilo: allow one-off flags to be specified for CP
Chia-I Wu
olv at kemper.freedesktop.org
Wed May 1 09:38:33 UTC 2013
Module: Mesa
Branch: master
Commit: 440557db4e51fcf15343fef759cc36f1207dc81f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=440557db4e51fcf15343fef759cc36f1207dc81f
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Mon Apr 29 07:22:00 2013 +0800
ilo: allow one-off flags to be specified for CP
It will be used for SOL_RESET on GEN7.
---
src/gallium/drivers/ilo/ilo_cp.c | 4 ++++
src/gallium/drivers/ilo/ilo_cp.h | 11 +++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c
index e0e53d9..41473c0 100644
--- a/src/gallium/drivers/ilo/ilo_cp.c
+++ b/src/gallium/drivers/ilo/ilo_cp.c
@@ -191,11 +191,15 @@ ilo_cp_exec_bo(struct ilo_cp *cp)
break;
}
+ flags |= cp->one_off_flags;
+
if (likely(do_exec))
err = cp->bo->exec(cp->bo, cp->used * 4, cp->hw_ctx, flags);
else
err = 0;
+ cp->one_off_flags = 0;
+
return err;
}
diff --git a/src/gallium/drivers/ilo/ilo_cp.h b/src/gallium/drivers/ilo/ilo_cp.h
index 8f3bda4..2ecd832 100644
--- a/src/gallium/drivers/ilo/ilo_cp.h
+++ b/src/gallium/drivers/ilo/ilo_cp.h
@@ -61,6 +61,7 @@ struct ilo_cp {
enum ilo_cp_ring ring;
bool no_implicit_flush;
int reserve_for_pre_flush;
+ unsigned one_off_flags;
struct {
ilo_cp_hook_func func;
@@ -179,6 +180,16 @@ ilo_cp_reserve_for_pre_flush(struct ilo_cp *cp, int reserve)
}
/**
+ * Set one-off flags. They will be cleared after flushing.
+ */
+static inline void
+ilo_cp_set_one_off_flags(struct ilo_cp *cp, unsigned flags)
+{
+ cp->one_off_flags |= flags;
+}
+
+
+/**
* Set a command parser hook.
*/
static inline void
More information about the mesa-commit
mailing list