[Mesa-dev] [PATCH 78/84] st/nine: Bind destination for surface/volume uploads

Axel Davy axel.davy at ens.fr
Wed Dec 7 22:55:51 UTC 2016


Will enable to use the bind count as an information for
whether the surface/volume is used in the worker thread.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_state.c | 4 ++++
 src/gallium/state_trackers/nine/nine_state.h | 1 +
 src/gallium/state_trackers/nine/surface9.c   | 2 ++
 src/gallium/state_trackers/nine/volume9.c    | 2 ++
 4 files changed, 9 insertions(+)

diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 10ec404..1333d25 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -2723,6 +2723,7 @@ CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_range_upload,
 }
 
 CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_box_upload,
+                               ARG_BIND_REF(struct NineUnknown, dst),
                                ARG_BIND_RES(struct pipe_resource, res),
                                ARG_VAL(unsigned, level),
                                ARG_COPY_REF(struct pipe_box, dst_box),
@@ -2737,6 +2738,9 @@ CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_box_upload,
     struct pipe_transfer *transfer = NULL;
     uint8_t *map;
 
+    /* We just bind dst for the bind count */
+    (void)dst;
+
     map = pipe->transfer_map(pipe,
                              res,
                              level,
diff --git a/src/gallium/state_trackers/nine/nine_state.h b/src/gallium/state_trackers/nine/nine_state.h
index 96c00d4..acead92 100644
--- a/src/gallium/state_trackers/nine/nine_state.h
+++ b/src/gallium/state_trackers/nine/nine_state.h
@@ -557,6 +557,7 @@ nine_context_range_upload(struct NineDevice9 *device,
 void
 nine_context_box_upload(struct NineDevice9 *device,
                         unsigned *counter,
+                        struct NineUnknown *dst,
                         struct pipe_resource *res,
                         unsigned level,
                         const struct pipe_box *dst_box,
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index f7e479a..26c2d69 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -628,6 +628,7 @@ NineSurface9_CopyMemToDefault( struct NineSurface9 *This,
 
     nine_context_box_upload(This->base.base.device,
                             &From->pending_uploads_counter,
+                            (struct NineUnknown *)This,
                             r_dst,
                             This->level,
                             &dst_box,
@@ -719,6 +720,7 @@ NineSurface9_UploadSelf( struct NineSurface9 *This,
 
     nine_context_box_upload(This->base.base.device,
                             &This->pending_uploads_counter,
+                            (struct NineUnknown *)This,
                             res,
                             This->level,
                             &box,
diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers/nine/volume9.c
index e8abfe7..29a1fcb 100644
--- a/src/gallium/state_trackers/nine/volume9.c
+++ b/src/gallium/state_trackers/nine/volume9.c
@@ -435,6 +435,7 @@ NineVolume9_CopyMemToDefault( struct NineVolume9 *This,
 
     nine_context_box_upload(This->base.device,
                             &From->pending_uploads_counter,
+                            (struct NineUnknown *)This,
                             r_dst,
                             This->level,
                             &dst_box,
@@ -489,6 +490,7 @@ NineVolume9_UploadSelf( struct NineVolume9 *This,
 
     nine_context_box_upload(This->base.device,
                             &This->pending_uploads_counter,
+                            (struct NineUnknown *)This,
                             res,
                             This->level,
                             &box,
-- 
2.10.2



More information about the mesa-dev mailing list