[Mesa-dev] [PATCH v8 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-07-25 Thread Gregory Hainaut
isn't impacted by the variable_params issue v7: rebase (update const handling) s/GLint pixel_pack_buffer_bound/GLuint bound_pixel_pack_buffer/ Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/gla

[Mesa-dev] [PATCH v8 2/3] mesa/glthread: add tracking of PBO binding

2017-07-25 Thread Gregory Hainaut
to lookup the BufferObjects hash directly. Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/marshal.c b/src/mesa/main/marshal.c index 1914

[Mesa-dev] [PATCH v8 1/3] mesa/glthread: track buffer destruction

2017-07-25 Thread Gregory Hainaut
for GenBuffers/CreateBuffers v8: rebase Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/gl_API.xml | 2 +- src/mesa/main/glthread.h | 10 ++ src/mesa/main/marshal.c | 40 src/mesa/main/mar

[Mesa-dev] [PATCH v8 0/3] asynchronous pbo transfer with glthread

2017-07-25 Thread Gregory Hainaut
ixel_*pack_buffer_bound variables) I rebased the code on latest master, it got extra conflict (gl_marshal.py) since the resent from Timothy v8: rebase on latest master Best regards, Gregory Hainaut (3): mesa/glthread: track buffer destruction mesa/glthread: add tracking of PBO binding mapi/g

[Mesa-dev] [PATCH v7 0/3] asynchronous pbo transfer with glthread

2017-06-29 Thread Gregory Hainaut
ixel_*pack_buffer_bound variables) I rebased the code on latest master, it got extra conflict (gl_marshal.py) since the resent from Timothy Best regards, Gregory Hainaut (3): mesa/glthread: track buffer destruction mesa/glthread: add tracking of PBO binding mapi/glthread: g

[Mesa-dev] [PATCH v7 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-06-29 Thread Gregory Hainaut
isn't impacted by the variable_params issue v7: rebase (update const handling) s/GLint pixel_pack_buffer_bound/GLuint bound_pixel_pack_buffer/ Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/gla

[Mesa-dev] [PATCH v7 1/3] mesa/glthread: track buffer destruction

2017-06-29 Thread Gregory Hainaut
for GenBuffers/CreateBuffers Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/gl_API.xml | 2 +- src/mesa/main/glthread.h | 10 ++ src/mesa/main/marshal.c | 40 src/mesa/main/marshal.h

[Mesa-dev] [PATCH v7 2/3] mesa/glthread: add tracking of PBO binding

2017-06-29 Thread Gregory Hainaut
to lookup the BufferObjects hash directly. Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/marshal.c b/src/mesa/main/marshal.c index abb5

Re: [Mesa-dev] [PATCH 1/3] mesa/glthread: track buffer creation/destruction

2017-06-25 Thread Gregory Hainaut
Hello Fredrik, Yes the shadow hash feels useless now. I will update the patch in a couple of days (vacation currently). Cheers, Gregory Le 22 juin 2017 2:24 PM, "Fredrik Höglund" <fred...@kde.org> a écrit : > On Thursday 22 June 2017, Timothy Arceri wrote: > &

Re: [Mesa-dev] [PATCH v5 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-30 Thread gregory hainaut
On Mon, 29 May 2017 17:12:05 +0100 Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 29 May 2017 at 15:45, Dieter Nützel <die...@nuetzel-hh.de> wrote: > > Hi Gregory, > > > > there isn't currently a copy of this on Mesa-Patchwork. > > Can you please

[Mesa-dev] [PATCH v5 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-29 Thread Gregory Hainaut
, Gregory Hainaut (4): dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety glx: implement __DRIbackgroundCallableExtension.isThreadSafe egl: implement __DRIbackgroundCallableExtension.isThreadSafe glthread/gallium: require safe_glthread to start

[Mesa-dev] [PATCH v5 3/4] egl: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-29 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) Include X11/Xlibint.h protected by ifdef v5: based on Daniel feedback Move non X11 code outside of X11 define Always return true for Wayland Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- s

[Mesa-dev] [PATCH v5 4/4] glthread/gallium: require safe_glthread to start glthread

2017-05-29 Thread Gregory Hainaut
feedbacks Properly check the function pointer Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/gallium/state_trackers/dri/dri_context.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/gallium/state_trackers/dri/dri_context.c

[Mesa-dev] [PATCH v5 2/4] glx: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-29 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) v4: DRI3 doesn't hit X through GL call so it is always safe Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 12 +++- 2 files c

[Mesa-dev] [PATCH v5 1/4] dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety

2017-05-29 Thread Gregory Hainaut
Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- include/GL/internal/dri_interface.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index c83056aa70..ffe99499fc 100644 --- a/include/GL/internal

[Mesa-dev] [PATCH v4 1/4] dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety

2017-05-21 Thread Gregory Hainaut
penGL driver library should also achieve the desired result." v2: based on Nicolai and Matt feedback Use C style comment v3: based on Emil feedback split the patch in 3 s/isGlThreadSafe/isThreadSafe/ Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- include/GL/internal/dri_

[Mesa-dev] [PATCH v4 4/4] glthread/gallium: require safe_glthread to start glthread

2017-05-21 Thread Gregory Hainaut
Print an error message for the user if the requirement isn't met, or we're not thread safe. v2: based on Nicolai feedbacks Check the DRI extension version v3: based on Emil feedbacks improve commit and error messages. use backgroundCallable variable to improve readability Signed-off-by: Gregory

[Mesa-dev] [PATCH v4 2/4] glx: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-21 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) v4: DRI3 doesn't hit X through GL call so it is always safe Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 12 +++- 2 files c

[Mesa-dev] [PATCH v6 2/3] mesa/glthread: add tracking of PBO binding

2017-05-21 Thread Gregory Hainaut
In gl core, buffer must be reserved first by CreateBuffers/GenBuffers to be valid. v4: update comments based on Nicolai review Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions

[Mesa-dev] [PATCH v4 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-21 Thread Gregory Hainaut
code readability Just include libX11 on EGL protected by ifdef v4: based on Eric feedback, I marked DRI3 as always thread safe Thanks you for all the review comments. Best regards, Gregory Hainaut (4): dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks

[Mesa-dev] [PATCH v6 0/3] asynchronous pbo transfer with glthread

2017-05-21 Thread Gregory Hainaut
: improve commments based on Nicolai feedback V5: Properly delete element of the new hash (first patch) v6: Rebase on latest master Note: crash related to unsafe X call will be handled by "Disable glthread if libX11 isn't thread-safe" series Best regards, Gregory Hainaut (3): mesa/glthr

[Mesa-dev] [PATCH v6 1/3] mesa/glthread: track buffer creation/destruction

2017-05-21 Thread Gregory Hainaut
hash element with the help of _mesa_HashDeleteAll v6: rebase Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/glthread.h

[Mesa-dev] [PATCH v6 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-05-21 Thread Gregory Hainaut
isn't impacted by the variable_params issue Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/glapi/gen/ARB_robustness.xml | 2 +- src/mapi/glapi/gen/gl_API.dtd | 10 +---

[Mesa-dev] [PATCH v4 3/4] egl: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-21 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) Include X11/Xlibint.h protected by ifdef Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.c | 28 +++- 1 file changed, 27 insertions(+), 1 de

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-09 Thread gregory hainaut
On Tue, 09 May 2017 09:31:18 -0700 Eric Anholt <e...@anholt.net> wrote: > Gregory Hainaut <gregory.hain...@gmail.com> writes: > > > On 5/8/17, Emil Velikov <emil.l.veli...@gmail.com> wrote: > [...] > > > > Hello Emil, > > > > Yes you'

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-09 Thread Gregory Hainaut
lly app owners can fix the issue too. By the way, I don't have commit access so feel free to push the series :) On 5/8/17, Eric Anholt <e...@anholt.net> wrote: > gregory hainaut <gregory.hain...@gmail.com> writes: > >> On Fri, 5 May 2017 17:45:01 +0200 >> Axel Davy <axel.d.

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread gregory hainaut
On Fri, 5 May 2017 18:17:22 +0100 Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 5 May 2017 at 17:58, gregory hainaut <gregory.hain...@gmail.com> wrote: > > On Fri, 5 May 2017 17:45:01 +0200 > > Axel Davy <axel.d...@normalesup.org> wrote: > > >

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread gregory hainaut
th the help of constructor attribute. Cheers, Gregory > On 05/05/2017 17:37, Gregory Hainaut wrote: > > Hello Mesa developers, > > > > Following the discussion from > > https://lists.freedesktop.org/archives/mesa-dev/2017-April/153137.html > > > >

[Mesa-dev] [PATCH v3 2/4] glx: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-05 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 15 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/s

[Mesa-dev] [PATCH v3 3/4] egl: implement __DRIbackgroundCallableExtension.isThreadSafe

2017-05-05 Thread Gregory Hainaut
v2: bump version v3: Add code comment s/IsGlThread/IsThread/ (and variation) Include X11/Xlibint.h protected by ifdef Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/egl/drivers/dri2/egl_dri2.c | 28 +++- 1 file changed, 27 insertions(+), 1 de

[Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread Gregory Hainaut
code readability Just include libX11 on EGL protected by ifdef Thanks you for all the review comments. Best regards, Gregory Hainaut (4): dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety glx: implement

[Mesa-dev] [PATCH v3 4/4] glthread/gallium: require safe_glthread to start glthread

2017-05-05 Thread Gregory Hainaut
Print an error message for the user if the requirement isn't met, or we're not thread safe. v2: based on Nicolai feedbacks Check the DRI extension version v3: based on Emil feedbacks improve commit and error messages. use backgroundCallable variable to improve readability Signed-off-by: Gregory

[Mesa-dev] [PATCH v3 1/4] dri: Extend __DRIbackgroundCallableExtensionRec to include a callback that checks for thread safety

2017-05-05 Thread Gregory Hainaut
penGL driver library should also achieve the desired result." v2: based on Nicolai and Matt feedback Use C style comment v3: based on Emil feedback split the patch in 3 s/isGlThreadSafe/isThreadSafe/ Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- include/GL/internal/dri_

[Mesa-dev] [PATCH v2 2/2] glthread/gallium: require safe_glthread to start glthread

2017-05-03 Thread Gregory Hainaut
Otherwise print a warning v2: based on Nicolai feedback Check the DRI extension version Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/gallium/state_trackers/dri/dri_context.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/g

[Mesa-dev] [PATCH v2 1/2] glx|egl: allow to test if glthread is safe enough on X11 platform

2017-05-03 Thread Gregory Hainaut
the code will assume that it is safe if X11 isn't used or there is no display (i.e. 100% XCB) The new function will be used in the next commit v2: based on Nicolai and Matt feedback Use C style comment Bump __DRIbackgroundCallableExtension version Signed-off-by: Gregory Hainaut <gregory.h

[Mesa-dev] [PATCH v2 0/2 Disable glthread is libX11 isn't thread-safe]

2017-05-03 Thread Gregory Hainaut
C comments :) Best regards, Gregory Hainaut (2): glx|egl: allow to test if glthread is safe enough on X11 platform glthread/gallium: require safe_glthread to start glthread include/GL/internal/dri_interface.h | 10 src/egl/drivers/dri2/egl_dri2.c | 34

[Mesa-dev] [RFC 1/2] glx|egl: allow to test if glthread is safe enough on X11 platform

2017-04-28 Thread Gregory Hainaut
the code will assume that it is safe if X11 isn't used or there is no display (i.e. 100% XCB) The new function will be used in the next commit Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- include/GL/internal/dri_interface.h | 9 + src/egl/drivers/dri2/egl_dri2.c

[Mesa-dev] [RFC 2/2] glthread/gallium: require safe_glthread to start glthread

2017-04-28 Thread Gregory Hainaut
Otherwise print a warning Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/gallium/state_trackers/dri/dri_context.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_tracke

[Mesa-dev] [RFC 0/2] Disable glthread is libX11 isn't thread-safe

2017-04-28 Thread Gregory Hainaut
that it is really thread safe. EGL case is more tricky so the pair (X11/libX11) is marked as unsafe. I think it is fine because modern EGL application should rely on XCB (on the X11 platform). Best regards, Gregory Hainaut (2): glx|egl: allow to test if glthread is safe enough on X11 platform

Re: [Mesa-dev] [RFC 0/1] Port dri2GetBuffersWithFormat/dri2GetBuffers to XCB

2017-04-28 Thread gregory hainaut
On Thu, 27 Apr 2017 17:11:30 +0900 Michel Dänzer <mic...@daenzer.net> wrote: > On 26/04/17 07:06 PM, Gregory Hainaut wrote: > > On 4/26/17, Michel Dänzer <mic...@daenzer.net> wrote: > [...] > [...] > [...] > > > > I didn't test it (yet

Re: [Mesa-dev] [RFC 1/1] glx: port dri2GetBuffers/dri2GetBuffersWithFormat to XCB

2017-04-26 Thread Gregory Hainaut
On 4/26/17, Michel Dänzer <mic...@daenzer.net> wrote: > On 26/04/17 05:07 PM, Gregory Hainaut wrote: >> >> Note: those dri2* functions are typically called by gallium/mesa state >> tracker to handle new backbuffer allocation. When the old backbuffer was >> pr

Re: [Mesa-dev] [RFC 0/1] Port dri2GetBuffersWithFormat/dri2GetBuffers to XCB

2017-04-26 Thread Gregory Hainaut
On 4/26/17, Michel Dänzer <mic...@daenzer.net> wrote: > On 26/04/17 05:07 PM, Gregory Hainaut wrote: >> Following the discussion in "[PATCH v4 0/3] asynchronous pbo transfer with >> glthread" >> >> It will help apps that are ported to XCB. >

Re: [Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-26 Thread gregory hainaut
On Wed, 26 Apr 2017 11:03:11 +0900 Michel Dänzer <mic...@daenzer.net> wrote: > On 25/04/17 06:14 PM, Gregory Hainaut wrote: > > Hello, > > > > I did more tests on my side. DRI3 + recent stack is fine. Older > > (Debian Jessie, ~2y old) XCB hangs/deadlock. So al

[Mesa-dev] [RFC 1/1] glx: port dri2GetBuffers/dri2GetBuffersWithFormat to XCB

2017-04-26 Thread Gregory Hainaut
to handle new backbuffer allocation. When the old backbuffer was previously invalidated due to vsync. Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/glx/dri2.c | 118 - src/glx/dri2.h | 25 src/glx/dri2

[Mesa-dev] [RFC 0/1] Port dri2GetBuffersWithFormat/dri2GetBuffers to XCB

2017-04-26 Thread Gregory Hainaut
es * Won't fix. DRI3/XCB is the future * Enable thread safe Xlib by default (which would make sense in multicore CPU era) * Track gl call that will use X11 API to force a sync Note: I don't know if xcb_dri2_get_buffers_buffers can return a NULL so I added a check in doubt. Best Regards, Gregory

Re: [Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-25 Thread Gregory Hainaut
that it might not be possible to use XCB. Best Regads, Gregory On 4/25/17, Dieter Nützel <die...@nuetzel-hh.de> wrote: > Am 21.04.2017 12:11, schrieb Marek Olšák: >> FWIW, I think this series can land, because glthread is not enabled by >> default, and the libX11 issue is unrelated. >

Re: [Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-20 Thread gregory hainaut
On Thu, 20 Apr 2017 20:01:00 +0200 Marek Olšák <mar...@gmail.com> wrote: > On Thu, Apr 20, 2017 at 6:53 PM, gregory hainaut > <gregory.hain...@gmail.com> wrote: > > On Thu, 20 Apr 2017 11:57:08 +0200 > > Marek Olšák <mar...@gmail.com> wrote: > > >

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-20 Thread gregory hainaut
On Thu, 20 Apr 2017 10:56:34 +0900 Michel Dänzer <mic...@daenzer.net> wrote: > On 20/04/17 01:43 AM, gregory hainaut wrote: > > Hello All, > > > > I ported PCSX2 to xcb (at least the non-glx part). Crash is gone :) > > So I can send the v5 with the hash delete

Re: [Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-20 Thread gregory hainaut
On Thu, 20 Apr 2017 11:57:08 +0200 Marek Olšák <mar...@gmail.com> wrote: > On Thu, Apr 20, 2017 at 10:28 AM, gregory hainaut > <gregory.hain...@gmail.com> wrote: > > On Thu, 20 Apr 2017 12:29:11 +0900 > > Michel Dänzer <mic...@daenzer.net> wrote: > >

Re: [Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-20 Thread gregory hainaut
On Thu, 20 Apr 2017 12:29:11 +0900 Michel Dänzer <mic...@daenzer.net> wrote: > On 20/04/17 01:54 AM, Gregory Hainaut wrote: > > Hello, > > > > Please find the latest version that include a small fix for hash deletion. I > > think the series is good now. Please

[Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-19 Thread Gregory Hainaut
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

[Mesa-dev] [PATCH v5 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-04-19 Thread Gregory Hainaut
isn't impacted by the variable_params issue Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/glapi/gen/ARB_robustness.xml | 2 +- src/mapi/glapi/gen/gl_API.dtd | 10 +---

[Mesa-dev] [PATCH v5 2/3] mesa/glthread: add tracking of PBO binding

2017-04-19 Thread Gregory Hainaut
In gl core, buffer must be reserved first by CreateBuffers/GenBuffers to be valid. v4: update comments based on Nicolai review Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions

[Mesa-dev] [PATCH v5 1/3] mesa/glthread: track buffer creation/destruction

2017-04-19 Thread Gregory Hainaut
hash element with the help of _mesa_HashDeleteAll Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/glthread.h | 10 +++ src/mes

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-19 Thread gregory hainaut
enable the XInitThread mode by default on the X11 library. If performance of X11 is critical, it would be better to switch to xcb anyway. Cheers, Gregory On Tue, 18 Apr 2017 15:35:59 +0200 Marek Olšák <mar...@gmail.com> wrote: > All GL calls that might use libX11 must not be asynchrono

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-18 Thread Gregory Hainaut
Hello Michel, As yes, I completely forgot about XInitThreads that must be it. I don't know how Nvidia manage to solve/force it. Anyway, I will fix my application. Thanks you for the info. On 4/18/17, Michel Dänzer <mic...@daenzer.net> wrote: > On 18/04/17 05:04 PM, gregory hain

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-18 Thread gregory hainaut
On Tue, 18 Apr 2017 08:51:24 +0200 gregory hainaut <gregory.hain...@gmail.com> wrote: > On Mon, 17 Apr 2017 11:17:42 +0900 > Michel Dänzer <mic...@daenzer.net> wrote: > > > On 15/04/17 05:08 PM, gregory hainaut wrote: > > > On Sat, 15 Apr 2017 00:50:15 +0200

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-18 Thread gregory hainaut
On Mon, 17 Apr 2017 11:17:42 +0900 Michel Dänzer <mic...@daenzer.net> wrote: > On 15/04/17 05:08 PM, gregory hainaut wrote: > > On Sat, 15 Apr 2017 00:50:15 +0200 > > Dieter Nützel <die...@nuetzel-hh.de> wrote: > > > >> Am 14.04.2017 07:53, schrieb gre

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-15 Thread gregory hainaut
On Sat, 15 Apr 2017 00:50:15 +0200 Dieter Nützel <die...@nuetzel-hh.de> wrote: > Am 14.04.2017 07:53, schrieb gregory hainaut: > > On Fri, 14 Apr 2017 05:20:38 +0200 > > Dieter Nützel <die...@nuetzel-hh.de> wrote: > > > >> Am 14.04.2017 02:06, s

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-14 Thread gregory hainaut
On Fri, 14 Apr 2017 07:53:06 +0200 gregory hainaut <gregory.hain...@gmail.com> wrote: > On Fri, 14 Apr 2017 05:20:38 +0200 > Dieter Nützel <die...@nuetzel-hh.de> wrote: > > > Am 14.04.2017 02:06, schrieb Dieter Nützel: > > > Hello Gregory, > > > >

Re: [Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-13 Thread gregory hainaut
On Fri, 14 Apr 2017 05:20:38 +0200 Dieter Nützel <die...@nuetzel-hh.de> wrote: > Am 14.04.2017 02:06, schrieb Dieter Nützel: > > Hello Gregory, > > > > have you tested this with Mesa-demos/tests/pbo 'b' (benchmark)? > > It result in crazy numbers and do n

[Mesa-dev] [PATCH v4 2/3] mesa/glthread: add tracking of PBO binding

2017-04-13 Thread Gregory Hainaut
In gl core, buffer must be reserved first by CreateBuffers/GenBuffers to be valid. v4: update comments based on Nicolai review Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions

[Mesa-dev] [PATCH v4 1/3] mesa/glthread: track buffer creation/destruction

2017-04-13 Thread Gregory Hainaut
-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/glthread.h | 10 +++ src/mesa/main/marshal.c| 113

[Mesa-dev] [PATCH v4 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-04-13 Thread Gregory Hainaut
isn't impacted by the variable_params issue Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/glapi/gen/ARB_robustness.xml | 2 +- src/mapi/glapi/gen/gl_API.dtd | 10 +---

[Mesa-dev] [PATCH v4 0/3] asynchronous pbo transfer with glthread

2017-04-13 Thread Gregory Hainaut
commments based on Nicolai feedback 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

Re: [Mesa-dev] [PATCH v2 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-04-13 Thread gregory hainaut
On Thu, 13 Apr 2017 18:31:06 +0200 Nicolai Hähnle <nhaeh...@gmail.com> wrote: > On 05.04.2017 12:30, Gregory Hainaut wrote: > > # Classify fixed and variable parameters. > > self.fixed_params = [] > > self.variable_params

Re: [Mesa-dev] [PATCH v2 0/3] asynchronous pbo transfer with glthread

2017-04-13 Thread gregory hainaut
On Wed, 5 Apr 2017 12:52:03 +0200 Gregory Hainaut <gregory.hain...@gmail.com> wrote: > > Still, I believe there is the following bug in the series: > > > glGenBuffers(1, ); > > glBindBuffer(..., pbo); > > glDeleteBuffers(1, ); > > glTexSubImage2D(...); // w

[Mesa-dev] [PATCH v4] glsl/blob: avoid NULL ptr in prog parameter name

2017-04-11 Thread Gregory Hainaut
shader cache, st_nir_lookup_parameter_index and some printfs Issue found by piglit 'texturegatheroffsets' tests on Nouveau v4: new patch based on Nicolai/Timothy/ilia discussion Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/program/prog_parameter.c | 2 +- 1 file chan

Re: [Mesa-dev] [PATCH v3] glsl/blob: avoid NULL ptr in blob_write_string/blob_read_string

2017-04-07 Thread gregory hainaut
On Thu, 6 Apr 2017 00:21:19 +0200 gregory hainaut <gregory.hain...@gmail.com> wrote: > On Wed, 5 Apr 2017 14:22:00 -0400 > Ilia Mirkin <imir...@alum.mit.edu> wrote: > > > On Wed, Apr 5, 2017 at 1:12 PM, Gregory Hainaut > > <gregory.hain...@gmail.com> wrote:

Re: [Mesa-dev] [PATCH v3] glsl/blob: avoid NULL ptr in blob_write_string/blob_read_string

2017-04-05 Thread gregory hainaut
On Wed, 5 Apr 2017 14:22:00 -0400 Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Wed, Apr 5, 2017 at 1:12 PM, Gregory Hainaut > <gregory.hain...@gmail.com> wrote: > > Context: > > Nouveau uses NULL strings for unnamed parameter of texture gather > > offsets

[Mesa-dev] [PATCH v3] glsl/blob: avoid NULL ptr in blob_write_string/blob_read_string

2017-04-05 Thread Gregory Hainaut
pointer string. Add an assert in blob_write_string to ease debug Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/compiler/glsl/blob.c | 33 + src/compiler/glsl/blob.h | 27 +++ src/compile

Re: [Mesa-dev] [PATCH v2 0/3] asynchronous pbo transfer with glthread

2017-04-05 Thread Gregory Hainaut
it isn't optimal. I did it on purpose because it is much safer/easier and as you said it is a crazy case. Cheers, Gregory On 4/5/17, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > On 01.04.2017 11:42, Gregory Hainaut wrote: >> Hello, >> >> Please find a new version

Re: [Mesa-dev] [PATCH v2 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-04-05 Thread Gregory Hainaut
py code. However PPBO will copy from GPU to user pointer. There is no data associated with the pointer so the pointer isn't "used" by glthread, only transferred to GL. I think the code would love an extra comment. Cheers, Gregory __

Re: [Mesa-dev] [PATCH v2] glsl/blob: handle NULL ptr in blob_write_string/blob_read_string

2017-04-05 Thread gregory hainaut
On Wed, 5 Apr 2017 09:09:45 +1000 Timothy Arceri <tarc...@itsqueeze.com> wrote: > On 05/04/17 02:29, Gregory Hainaut wrote: > > Context: > > Nouveau uses NULL strings for unnamed parameter of texture gather > > offsets opcode. > > > > Fix piglit cras

[Mesa-dev] [PATCH v2 0/3] asynchronous pbo transfer with glthread

2017-04-04 Thread Gregory Hainaut
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. Gregory Hainaut (3): mesa/glthread: track buffer creation/destruction mesa/glthread: add

[Mesa-dev] [PATCH v2] glsl/blob: handle NULL ptr in blob_write_string/blob_read_string

2017-04-04 Thread Gregory Hainaut
transparently for Mesa. Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/compiler/glsl/blob.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/blob.c b/src/compiler/glsl/blob.c index 769ebf1..b520044 100644 --- a/src/compile

[Mesa-dev] [PATCH v2 3/3] mapi/glthread: generate asynchronous code for PBO transfer

2017-04-04 Thread Gregory Hainaut
Improve speed on PCSX2 v2: Add ppbo/ubpo status in XML file Disable variable parameter (as the pointer would be a fixed offset) v3: split buffer tracking into separate patches. use 'goto fallback_to_sync' when asynchronous transfer isn't supported Signed-off-by: Gregory Hainaut <gregory.h

[Mesa-dev] [PATCH v2 1/3] mesa/glthread: track buffer creation/destruction

2017-04-04 Thread Gregory Hainaut
-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/glthread.h | 10 +++ src/mesa/main/marshal.c| 113

[Mesa-dev] [PATCH v2 2/3] mesa/glthread: add tracking of PBO binding

2017-04-04 Thread Gregory Hainaut
In gl core, buffer must be reserved first by CreateBuffers/GenBuffers to be valid. Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/mes

Re: [Mesa-dev] Fwd: [PATCH 1/1] glsl/blob: handle copy of NULL ptr in blob_write_string

2017-03-31 Thread gregory hainaut
On Fri, 31 Mar 2017 12:53:47 -0400 Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Fri, Mar 31, 2017 at 6:12 AM, Gregory Hainaut > <gregory.hain...@gmail.com> wrote: > >> Others have reported this crashing on Nouveau. I haven't seen the problem > >> on rad

Re: [Mesa-dev] [PATCH 1/1] glsl/blob: handle copy of NULL ptr in blob_write_string

2017-03-31 Thread gregory hainaut
On Fri, 31 Mar 2017 19:16:10 +1100 Timothy Arceri <tarc...@itsqueeze.com> wrote: > > > On 31/03/17 18:00, gregory hainaut wrote: > > On Fri, 31 Mar 2017 08:24:36 +0200 > > Nicolai Hähnle <nhaeh...@gmail.com> wrote: > > > > Hello Nicolai > &

[Mesa-dev] Fwd: [PATCH 1/1] glsl/blob: handle copy of NULL ptr in blob_write_string

2017-03-31 Thread Gregory Hainaut
> Others have reported this crashing on Nouveau. I haven't seen the problem on > radeonsi or i965. Hello Timothy (sorry for the double mail, email is a complex tool:) ) Hum, tbh. I was quite surprised to hit this bug. I guess you save a pre-optimized shader in the cache. So it could depends on

Re: [Mesa-dev] [PATCH 1/1] glsl/blob: handle copy of NULL ptr in blob_write_string

2017-03-31 Thread gregory hainaut
On Fri, 31 Mar 2017 08:24:36 +0200 Nicolai Hähnle <nhaeh...@gmail.com> wrote: Hello Nicolai > On 30.03.2017 21:55, Gregory Hainaut wrote: > > Typically happen when we want to copy an unnamed shader parameter > > in the shader cache. > > So this happens only when blob_

[Mesa-dev] [PATCH 0/1] NULL pointer in blob_write_string

2017-03-30 Thread Gregory Hainaut
Hello, Fix a crash on Nouveau + Shader cache. I don't know if it could impact current stable version As a remainder I don't have commit access. Best regards, Gregory Hainaut (1): glsl/blob: handle copy of NULL ptr in blob_write_string src/compiler/glsl/blob.c | 5

[Mesa-dev] [PATCH 1/1] glsl/blob: handle copy of NULL ptr in blob_write_string

2017-03-30 Thread Gregory Hainaut
Typically happen when we want to copy an unnamed shader parameter in the shader cache. Note: it is safer to copy an empty string so we can read it back safely. Fix piglit crashes of the 'texturegatheroffsets' tests Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/co

Re: [Mesa-dev] [PATCH] mesa glthread: allow asynchronous pixel transfer operation when a buffer is bound

2017-03-28 Thread gregory hainaut
On Mon, 27 Mar 2017 16:10:32 +0200 Gregory Hainaut <gregory.hain...@gmail.com> wrote: > Hello, > > Sorry I was in vacation. I will update my patch with a hash map to > trace buffer creation/destruction. > > Cheers, > Gregory > > On 3/20/17, Nicolai

Re: [Mesa-dev] [PATCH] mesa glthread: allow asynchronous pixel transfer operation when a buffer is bound

2017-03-27 Thread Gregory Hainaut
Hello, Sorry I was in vacation. I will update my patch with a hash map to trace buffer creation/destruction. Cheers, Gregory On 3/20/17, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > On 20.03.2017 14:33, Markus Wick wrote: >> Am 2017-03-20 14:21, schrieb Nicolai Hähnle: >>

Re: [Mesa-dev] [PATCH] mesa/glthread: add custom marshalling for ClearBufferfv()

2017-03-27 Thread Gregory Hainaut
with a scale attribute on the XML. Cheers, Gregory ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Mesa (master): mesa/marshal: add custom BufferData/ BufferSubData marshalling

2017-03-27 Thread Gregory Hainaut
o, As I already looked into the python last week, it is due to loop unrolling behavior to prepare next variable parameter. Of course, most of the time, there is only a single variable parameter so it is useless. Actually it is useless for last variable parameter. Cheers, Gregory _

Re: [Mesa-dev] [PATCH] mesa glthread: allow asynchronous pixel transfer operation when a buffer is bound

2017-03-17 Thread gregory hainaut
On Fri, 17 Mar 2017 13:11:31 +0100 Markus Wick <mar...@selfnet.de> wrote: > Hi gregory, > > Am 2017-03-17 10:25, schrieb Gregory Hainaut: > > diff --git a/src/mesa/main/marshal.c b/src/mesa/main/marshal.c > > index f8cad30..43a70d4 100644 > > --- a/src/mesa/main/

[Mesa-dev] [PATCH] Faster glthread with persistant PBO

2017-03-17 Thread Gregory Hainaut
offset. PS: Timothy you can discard the patch that I sent you on your old collabora mail. I forgot to update my alias ;) Gregory Hainaut (1): mesa glthread: allow asynchronous pixel transfer operation when a buffer is bound src/mapi/glapi/gen/ARB_direct_state_access.xml | 16

[Mesa-dev] [PATCH] mesa glthread: allow asynchronous pixel transfer operation when a buffer is bound

2017-03-17 Thread Gregory Hainaut
Improve speed on PCSX2 v2: Add ppbo/ubpo status in XML file Disable variable parameter (as the pointer would be a fixed offset) Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/gla

Re: [Mesa-dev] [PATCH 07/25] glapi: Mark compressed teximage functions as sync.

2017-03-09 Thread gregory hainaut
> -- > 2.9.3 Hello, It is expected/normal that CompressedTexSubImage1D got a default marshal value (async) instead of sync ? * CompressedTexSubImage1D: async * CompressedTexSubImage2D: sync * CompressedTexSubImage3D: sync * CompressedTexImage1D: sync * CompressedTexImage2D: sync * CompressedTexImage3D: sync Gregory ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Any updates on threaded GL dispatch?

2017-03-07 Thread Gregory Hainaut
Hello Tim, > Ignoring the attributes in XML files during generation just seems hacky to > me. Are you able to take you reg expression and apply it to sed in some way > to actually update the XML? Ok. I will update the XML files. I will try to send you a patch Thursday. Cheers, Greg

Re: [Mesa-dev] Any updates on threaded GL dispatch?

2017-03-03 Thread gregory hainaut
ntly on hold due to other > >> projects and responsibilities. > > > > > > I can probably spend some time on this. Seems like Gregory has taken care of > > most of the problems and it just needs someone to push it over the line. > > There are also plenty of unresolved rev

Re: [Mesa-dev] [PATCH] doc: GL_ARB_buffer_storage is supported on llvmpipe/swr

2017-03-02 Thread Gregory Hainaut
Thanks you. Ok for the no commit access hint. On 3/2/17, Emil Velikov <emil.l.veli...@gmail.com> wrote: > On 26 February 2017 at 21:58, Gregory Hainaut <gregory.hain...@gmail.com> > wrote: >> On 2/25/17, Edward O'Callaghan <funfunc...@folklore1984.net> wrote: &g

Re: [Mesa-dev] Any updates on threaded GL dispatch?

2017-03-02 Thread Gregory Hainaut
* sizeof(uniform data) >= INT_MAX. Best regards, Gregory On 3/2/17, Dieter Nützel <die...@nuetzel-hh.de> wrote: > Hello Gregory and Marek, > > are there any updates on threaded GL dispatch? > I mean this: > > [-] >> As a quick summary: >> * there are now only

Re: [Mesa-dev] [PATCH] doc: GL_ARB_buffer_storage is supported on llvmpipe/swr

2017-02-26 Thread Gregory Hainaut
On 2/25/17, Edward O'Callaghan <funfunc...@folklore1984.net> wrote: > Acked-by: Edward O'Callaghan <funfunc...@folklore1984.net> > > On 02/25/2017 07:45 AM, Gregory Hainaut wrote: >> At least, the extension is exported (gallium capability >> PIPE_CAP_BU

[Mesa-dev] [PATCH] doc: GL_ARB_buffer_storage is supported on llvmpipe/swr

2017-02-24 Thread Gregory Hainaut
At least, the extension is exported (gallium capability PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT is 1) Signed-off-by: Gregory Hainaut <gregory.hain...@gmail.com> --- docs/features.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt

Re: [Mesa-dev] Time to merge threaded GL dispatch? (aka glthread)

2017-02-13 Thread gregory hainaut
On Mon, 13 Feb 2017 17:04:01 +0100 Marek Olšák <mar...@gmail.com> wrote: > On Mon, Feb 13, 2017 at 4:14 PM, Gregory Hainaut > <gregory.hain...@gmail.com> wrote: > > If I remember correctly I got something like 4K-8K fails (total is 40K > > tests) when I broke the

  1   2   >