Mesa (master): ilo: create u_upload_mgr last

Chia-I Wu olv at kemper.freedesktop.org
Wed Feb 26 03:34:14 UTC 2014


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Wed Feb 26 11:29:18 2014 +0800

ilo: create u_upload_mgr last

Similar to u_blitter, u_upload_mgr is now a client of the pipe context.  Its
creation needs to be delayed until the context has been (almost) initialized.

---

 src/gallium/drivers/ilo/ilo_context.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c
index 1f8aa23..faf29c2 100644
--- a/src/gallium/drivers/ilo/ilo_context.c
+++ b/src/gallium/drivers/ilo/ilo_context.c
@@ -145,13 +145,6 @@ ilo_context_create(struct pipe_screen *screen, void *priv)
       return NULL;
    }
 
-   ilo->uploader = u_upload_create(&ilo->base, 1024 * 1024, 16,
-         PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_INDEX_BUFFER);
-   if (!ilo->uploader) {
-      ilo_context_destroy(&ilo->base);
-      return NULL;
-   }
-
    ilo_cp_set_flush_callback(ilo->cp,
          ilo_context_cp_flushed, (void *) ilo);
 
@@ -171,7 +164,17 @@ ilo_context_create(struct pipe_screen *screen, void *priv)
 
    ilo_init_states(ilo);
 
-   /* this must be called last as u_blitter is a client of the pipe context */
+   /*
+    * These must be called last as u_upload/u_blitter are clients of the pipe
+    * context.
+    */
+   ilo->uploader = u_upload_create(&ilo->base, 1024 * 1024, 16,
+         PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_INDEX_BUFFER);
+   if (!ilo->uploader) {
+      ilo_context_destroy(&ilo->base);
+      return NULL;
+   }
+
    ilo->blitter = ilo_blitter_create(ilo);
    if (!ilo->blitter) {
       ilo_context_destroy(&ilo->base);




More information about the mesa-commit mailing list