Skip to content

Commit

Permalink
st/nine: Dirty MANAGED buffers at Lock time
Browse files Browse the repository at this point in the history
Tests suggest MANAGED buffers are made dirty
at Lock time, not at Unlock time.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
  • Loading branch information
Axel Davy committed Dec 20, 2016
1 parent bad7f7c commit 0ec4e5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gallium/state_trackers/nine/buffer9.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
nine_csmt_process(This->base.base.device);
} else
u_box_union_2d(&This->managed.dirty_box, &This->managed.dirty_box, &box);
/* Tests trying to draw while the buffer is locked show that
* MANAGED buffers are made dirty at Lock time */
BASEBUF_REGISTER_UPDATE(This);
}
*ppbData = (char *)This->managed.data + OffsetToLock;
DBG("returning pointer %p\n", *ppbData);
Expand Down Expand Up @@ -412,8 +415,6 @@ NineBuffer9_Unlock( struct NineBuffer9 *This )
nine_context_get_pipe_release(device);
} else if (This->maps[This->nmaps].should_destroy_buf)
nine_upload_release_buffer(device->buffer_upload, This->maps[This->nmaps].buf);
} else {
BASEBUF_REGISTER_UPDATE(This);
}
return D3D_OK;
}
Expand Down

0 comments on commit 0ec4e5f

Please sign in to comment.