[Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread
Dieter Nützel
Dieter at nuetzel-hh.de
Wed May 17 02:46:37 UTC 2017
Hello Gregory,
time for an update/rebase (after Timothy's GREAT work on 'no error').
Your Patchwork series (v5-x-y) didn't apply anylonger after commit
f96edf7.
Greetings,
Dieter
Am 19.04.2017 18:54, schrieb Gregory Hainaut:
> Hello,
>
> Please find the latest version that include a small fix for hash
> deletion. I
> think the series is good now. Please review/ack it.
>
> Allow to handle this kind of case:
> genBuffer(&pbo);
> BindBuffer(pbo)
> DeleteBuffer(pbo);
> BindBuffer(rand_pbo)
> TexSubImage2D(user_memory_pointer); // Data transfer will be
> synchronous
>
> There are various subtely to handle multi threaded shared context. In
> order to
> keep the code sane, I've considered a buffer invalid when it is deleted
> by a
> context even it is still bound to others contexts. It will force a
> synchronous
> transfer which is always safe.
>
> An example could be
> Ctx A: glGenBuffers(1, &pbo);
> Ctx A: glBindBuffer(PIXEL_UNPACK_BUFFER, pbo);
> Ctx B: glDeleteBuffers(1, &pbo);
> Ctx A: glTexSubImage2D(...); // will be synchronous, even though it
> _could_ be asynchronous (because the PBO that was generated first is
> still bound!)
>
> V3: I mixed up the number so I jumped right away to v4...
> V4: improve commments based on Nicolai feedback
> V5: Properly delete element of the new hash (first patch)
>
> Best regards,
>
> Gregory Hainaut (3):
> mesa/glthread: track buffer creation/destruction
> mesa/glthread: add tracking of PBO binding
> mapi/glthread: generate asynchronous code for PBO transfer
>
> src/mapi/glapi/gen/ARB_direct_state_access.xml | 18 +--
> src/mapi/glapi/gen/ARB_robustness.xml | 2 +-
> src/mapi/glapi/gen/gl_API.dtd | 10 +-
> src/mapi/glapi/gen/gl_API.xml | 32 +++---
> src/mapi/glapi/gen/gl_marshal.py | 23 +++-
> src/mapi/glapi/gen/marshal_XML.py | 21 +++-
> src/mesa/main/glthread.h | 10 ++
> src/mesa/main/marshal.c | 149
> ++++++++++++++++++++++++-
> src/mesa/main/marshal.h | 24 ++++
> src/mesa/main/mtypes.h | 5 +
> src/mesa/main/shared.c | 14 +++
> 11 files changed, 269 insertions(+), 39 deletions(-)
More information about the mesa-dev
mailing list