st/nine: Call GetPipe for implicit pipe usages
authorAxel Davy <axel.davy@ens.fr>
Sun, 18 Dec 2016 09:59:53 +0000 (10:59 +0100)
committerAxel Davy <axel.davy@ens.fr>
Tue, 20 Dec 2016 22:44:23 +0000 (23:44 +0100)
With csmt, every usage of the pipe in the main thread
has to be protected by calling GetPipe.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/swapchain9.c

index 8f5f117951f6a237363c2d51c6f7c3dcc657fae5..dce908e7f8f9f93c6ab5fdec7f7efdc013c3af79 100644 (file)
@@ -2821,6 +2821,8 @@ NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
     vtxbuf.user_buffer = pVertexStreamZeroData;
 
     if (!This->driver_caps.user_vbufs) {
+        /* Implicit use of context pipe */
+        (void)NineDevice9_GetPipe(This);
         u_upload_data(This->vertex_uploader,
                       0,
                       (prim_count_to_vertex_count(PrimitiveType, PrimitiveCount)) * VertexStreamZeroStride, /* XXX */
@@ -2884,6 +2886,8 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
 
     if (!This->driver_caps.user_vbufs) {
         const unsigned base = MinVertexIndex * VertexStreamZeroStride;
+        /* Implicit use of context pipe */
+        (void)NineDevice9_GetPipe(This);
         u_upload_data(This->vertex_uploader,
                       base,
                       NumVertices * VertexStreamZeroStride, /* XXX */
@@ -2897,6 +2901,8 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
         vbuf.user_buffer = NULL;
     }
     if (!This->driver_caps.user_ibufs) {
+        /* Implicit use of context pipe */
+        (void)NineDevice9_GetPipe(This);
         u_upload_data(This->index_uploader,
                       0,
                       (prim_count_to_vertex_count(PrimitiveType, PrimitiveCount)) * ibuf.index_size,
index 502736c2216b4f52ef0a30109ecca185f7e661ab..51aab066a56ed8f36862754c1c7a20b992546750 100644 (file)
@@ -603,6 +603,8 @@ handle_draw_cursor_and_hud( struct NineSwapChain9 *This, struct pipe_resource *r
     }
 
     if (device->hud && resource) {
+        /* Implicit use of context pipe */
+        (void)NineDevice9_GetPipe(This->base.device);
         hud_draw(device->hud, resource); /* XXX: no offset */
         /* HUD doesn't clobber stipple */
         nine_state_restore_non_cso(device);