Mesa (master): nvc0: move nvc0_so_target_save_offset() to its correct location

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Oct 9 12:52:33 UTC 2015


Module: Mesa
Branch: master
Commit: 0678530b9e60479f33eabb62f96a40af46edd714
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0678530b9e60479f33eabb62f96a40af46edd714

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Sun Oct  4 17:43:15 2015 +0200

nvc0: move nvc0_so_target_save_offset() to its correct location

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_query.c |   21 ---------------------
 src/gallium/drivers/nouveau/nvc0/nvc0_query.h |    3 ---
 src/gallium/drivers/nouveau/nvc0/nvc0_state.c |   19 +++++++++++++++++++
 3 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
index 793425b..69e9cdb 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
@@ -596,27 +596,6 @@ nvc0_query_pushbuf_submit(struct nouveau_pushbuf *push,
                         NVC0_IB_ENTRY_1_NO_PREFETCH);
 }
 
-void
-nvc0_so_target_save_offset(struct pipe_context *pipe,
-                           struct pipe_stream_output_target *ptarg,
-                           unsigned index, bool *serialize)
-{
-   struct nvc0_so_target *targ = nvc0_so_target(ptarg);
-
-   if (*serialize) {
-      *serialize = false;
-      PUSH_SPACE(nvc0_context(pipe)->base.pushbuf, 1);
-      IMMED_NVC0(nvc0_context(pipe)->base.pushbuf, NVC0_3D(SERIALIZE), 0);
-
-      NOUVEAU_DRV_STAT(nouveau_screen(pipe->screen), gpu_serialize_count, 1);
-   }
-
-   nvc0_query(targ->pq)->index = index;
-
-   nvc0_query_end(pipe, targ->pq);
-}
-
-
 /* === DRIVER STATISTICS === */
 
 #ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.h b/src/gallium/drivers/nouveau/nvc0/nvc0_query.h
index f3e8946..65240a1 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.h
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.h
@@ -184,8 +184,5 @@ void nvc0_init_query_functions(struct nvc0_context *);
 void nvc0_query_pushbuf_submit(struct nouveau_pushbuf *, struct nvc0_query *,
                                unsigned);
 void nvc0_query_fifo_wait(struct nouveau_pushbuf *, struct nvc0_query *);
-void nvc0_so_target_save_offset(struct pipe_context *,
-                                struct pipe_stream_output_target *, unsigned,
-                                bool *);
 
 #endif
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
index c5bfd03..269c75b 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
@@ -1091,6 +1091,25 @@ nvc0_so_target_create(struct pipe_context *pipe,
 }
 
 static void
+nvc0_so_target_save_offset(struct pipe_context *pipe,
+                           struct pipe_stream_output_target *ptarg,
+                           unsigned index, bool *serialize)
+{
+   struct nvc0_so_target *targ = nvc0_so_target(ptarg);
+
+   if (*serialize) {
+      *serialize = false;
+      PUSH_SPACE(nvc0_context(pipe)->base.pushbuf, 1);
+      IMMED_NVC0(nvc0_context(pipe)->base.pushbuf, NVC0_3D(SERIALIZE), 0);
+
+      NOUVEAU_DRV_STAT(nouveau_screen(pipe->screen), gpu_serialize_count, 1);
+   }
+
+   nvc0_query(targ->pq)->index = index;
+   pipe->end_query(pipe, targ->pq);
+}
+
+static void
 nvc0_so_target_destroy(struct pipe_context *pipe,
                        struct pipe_stream_output_target *ptarg)
 {




More information about the mesa-commit mailing list