st/nine: Bind destination for surface/volume uploads
authorAxel Davy <axel.davy@ens.fr>
Sun, 4 Dec 2016 00:10:34 +0000 (01:10 +0100)
committerAxel Davy <axel.davy@ens.fr>
Tue, 20 Dec 2016 22:47:08 +0000 (23:47 +0100)
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@ens.fr>
src/gallium/state_trackers/nine/nine_state.c
src/gallium/state_trackers/nine/nine_state.h
src/gallium/state_trackers/nine/surface9.c
src/gallium/state_trackers/nine/volume9.c

index 8facbae18bfc305ee01e06bb3b80d302789caf1e..7c2605f864c9a54a73523081e1f900e48443e36d 100644 (file)
@@ -2719,6 +2719,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),
@@ -2733,6 +2734,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,
index 96c00d40f5e6f04b266082e9eea95da9b9522b59..acead926414b182aefb3b51591abbf72bdb37175 100644 (file)
@@ -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,
index f7e479a26c4e1dc81762a100267f46ff82a225ae..26c2d69d276ab0725a99db2440247cf0e397d385 100644 (file)
@@ -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,
index e8abfe7f3bca0d9e61128d315a5dbace1f0ee8c0..29a1fcbbd03a7155942c2490948668a7c20df451 100644 (file)
@@ -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,