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

2017-07-25 Thread Gregory Hainaut
xplain why ppbo 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 --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/glapi/gen/ARB_robustne

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

2017-07-25 Thread Gregory Hainaut
lookup the BufferObjects hash directly. Signed-off-by: Gregory Hainaut --- 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 1914b5..285a46457d 100644 --- a/src

[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 --- 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 | 8 4 files changed

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

2017-07-25 Thread Gregory Hainaut
e shadow hash table and rename pixel_*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

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

2017-06-29 Thread Gregory Hainaut
remove shadow hash table and rename pixel_*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 bind

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

2017-06-29 Thread Gregory Hainaut
xplain why ppbo 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 --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/glapi/gen/ARB_robustne

[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 --- 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 | 8 4 files changed, 59

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

2017-06-29 Thread Gregory Hainaut
lookup the BufferObjects hash directly. Signed-off-by: Gregory Hainaut --- 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 abb565191a..ba1841064b 100644 --- a/src

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" a écrit : > On Thursday 22 June 2017, Timothy Arceri wrote: > > From: Gregory Hainaut > >

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 wrote: > On 29 May 2017 at 15:45, Dieter Nützel wrote: > > Hi Gregory, > > > > there isn't currently a copy of this on Mesa-Patchwork. > > Can you please send one over there? > > > > And maybe an updated version of: > > [PATCH v5 0/3] asynchronous

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

2017-05-29 Thread Gregory Hainaut
st regards, 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_glthrea

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

2017-05-29 Thread Gregory Hainaut
ed on Emil feedbacks Properly check the function pointer Signed-off-by: Gregory Hainaut --- 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 b/src/gallium/state_tr

[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 --- src/egl/drivers/dri2/egl_dri2.c | 34

[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 --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 12 +++- 2 files changed, 25 insertions(

[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 --- 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/dri_interface.h +++ b/incl

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

2017-05-21 Thread Gregory Hainaut
DIA OpenGL 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 --- include/GL/internal/dri_interface.h | 11 +++ 1 f

[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-b

[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 --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 12 +++- 2 files changed, 25 insertions(

[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 --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src

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

2017-05-21 Thread Gregory Hainaut
prove 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 check

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

2017-05-21 Thread Gregory Hainaut
jumped right away to v4... V4: 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 regar

[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 --- 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

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

2017-05-21 Thread Gregory Hainaut
xplain why ppbo isn't impacted by the variable_params issue Signed-off-by: Gregory Hainaut --- 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 + src/mapi/

[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 --- src/egl/drivers/dri2/egl_dri2.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/egl

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 wrote: > Gregory Hainaut writes: > > > On 5/8/17, Emil Velikov wrote: > [...] > > > > Hello Emil, > > > > Yes you're right. And potentially it can be back-ported to stable > > branch. Beside

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

2017-05-09 Thread Gregory Hainaut
ix 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 wrote: > gregory hainaut writes: > >> On Fri, 5 May 2017 17:45:01 +0200 >> Axel Davy wrote: >> >>> Hi, >>> >>> There should

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 wrote: > On 5 May 2017 at 17:58, gregory hainaut wrote: > > On Fri, 5 May 2017 17:45:01 +0200 > > Axel Davy wrote: > > > [...] > > > > Hello Axel, > > > > Yes it is another possibility. It woul

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

2017-05-05 Thread gregory hainaut
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 > > > > A check was added to ensure

[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 --- src/glx/dri2_glx.c | 15 ++- src/glx/dri3_glx.c | 15 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/glx/dri2_glx.c b/src/glx

[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 --- src/egl/drivers/dri2/egl_dri2.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/egl

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

2017-05-05 Thread Gregory Hainaut
prove 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: impl

[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-b

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

2017-05-05 Thread Gregory Hainaut
DIA OpenGL 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 --- include/GL/internal/dri_interface.h | 11 +++ 1 f

[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 --- src/gallium/state_trackers/dri/dri_context.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/dri/dri_context.c

[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
d 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 ---

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

2017-05-03 Thread Gregory Hainaut
n Use 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

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

2017-04-28 Thread Gregory Hainaut
d 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 --- include/GL/internal/dri_interface.h | 9 + src/egl/drivers/dri2/egl_dri2.

[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 --- 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_trackers/dri/dri_context.c index 92d79849c4

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

2017-04-28 Thread Gregory Hainaut
at 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 pla

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 wrote: > On 26/04/17 07:06 PM, Gregory Hainaut wrote: > > On 4/26/17, Michel Dänzer wrote: > [...] > [...] > [...] > > > > I didn't test it (yet). But I think it is safe to call XCB from > > v

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 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 >> previously invalidated due to v

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

2017-04-26 Thread Gregory Hainaut
On 4/26/17, Michel Dänzer 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. > > How so? I didn't test i

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 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 all DRI3 drivers > > sh

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

2017-04-26 Thread Gregory Hainaut
er to handle new backbuffer allocation. When the old backbuffer was previously invalidated due to vsync. Signed-off-by: Gregory Hainaut --- src/glx/dri2.c | 118 - src/glx/dri2.h | 25 src/glx/dri2_glx.c

[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,

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

2017-04-25 Thread Gregory Hainaut
gt; >> Marek > > > Gregory? > > For the series: > > Tested-by: Dieter Nützel > > On Turks XT (6670). > > Dieter > >> On Apr 21, 2017 4:22 AM, "Michel Dänzer" wrote: >> >>> On 21/04/17 09:01 AM, Marek Olšák wrote: >>>&

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 wrote: > On Thu, Apr 20, 2017 at 6:53 PM, gregory hainaut > wrote: > > On Thu, 20 Apr 2017 11:57:08 +0200 > > Marek Olšák wrote: > > > >> On Thu, Apr 20, 2017 at 10:28 AM, gregory hainaut > >> 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 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 fix. > > > >

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 wrote: > On Thu, Apr 20, 2017 at 10:28 AM, gregory hainaut > wrote: > > On Thu, 20 Apr 2017 12:29:11 +0900 > > Michel Dänzer wrote: > > > >> On 20/04/17 01:54 AM, Gregory Hainaut wrote: > >> > Hello,

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 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 review/ack it. > >

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

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

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

2017-04-19 Thread Gregory Hainaut
xplain why ppbo isn't impacted by the variable_params issue Signed-off-by: Gregory Hainaut --- 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 + src/mapi/

[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 --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src

[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 --- 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

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

2017-04-19 Thread gregory hainaut
t; > Marek > > On Apr 18, 2017 10:43 AM, "Gregory Hainaut" > wrote: > > 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. >

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 wrote: > On 18/04/17 05:04 PM, gregory hainaut wrote: >> On Tue,

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 wrote: > On Mon, 17 Apr 2017 11:17:42 +0900 > Michel Dänzer wrote: > > > On 15/04/17 05:08 PM, gregory hainaut wrote: > > > On Sat, 15 Apr 2017 00:50:15 +0200 > > > Dieter Nützel wrote: > > > &

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

2017-04-17 Thread gregory hainaut
On Mon, 17 Apr 2017 11:17:42 +0900 Michel Dänzer wrote: > On 15/04/17 05:08 PM, gregory hainaut wrote: > > On Sat, 15 Apr 2017 00:50:15 +0200 > > Dieter Nützel wrote: > > > >> Am 14.04.2017 07:53, schrieb gregory hainaut: > >>> On Fri, 14 Apr 2017

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 wrote: > Am 14.04.2017 07:53, schrieb gregory hainaut: > > On Fri, 14 Apr 2017 05:20:38 +0200 > > Dieter Nützel 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 07:53:06 +0200 gregory hainaut wrote: > On Fri, 14 Apr 2017 05:20:38 +0200 > Dieter Nützel wrote: > > > Am 14.04.2017 02:06, schrieb Dieter Nützel: > > > Hello Gregory, > > > > > > have you tested this with Mesa-demos/tests/pbo

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

2017-04-13 Thread gregory hainaut
> PID USER PR NIVIRTRESSHR S %CPU %MEM TIME+ > > COMMAND > > 19380 dieter20 0 3259764 2,911g 22472 S 100,3 12,37 2:28.48 > > pbo > > 27937 dieter20 0 4029572 570236 166116 S 5,980 2,310 9:45.53 > > konqueror > > 13432 diet

[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 --- src/mesa/main/marshal.c | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src

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

2017-04-13 Thread Gregory Hainaut
: Gregory Hainaut --- 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 + src/mesa/main/marshal.h

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

2017-04-13 Thread Gregory Hainaut
xplain why ppbo isn't impacted by the variable_params issue Signed-off-by: Gregory Hainaut --- 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 + src/mapi/

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

2017-04-13 Thread Gregory Hainaut
away to v4... V4: improve 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.x

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 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 wrote: > > Still, I believe there is the following bug in the series: > > > glGenBuffers(1, &pbo); > > glBindBuffer(..., pbo); > > glDeleteBuffers(1, &pbo); > > glTexSubImage2D(...); // will b

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

2017-04-11 Thread Gregory Hainaut
least 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 --- src/mesa/program/prog_parameter.c | 2 +- 1 file changed, 1 insertion

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 wrote: > On Wed, 5 Apr 2017 14:22:00 -0400 > Ilia Mirkin wrote: > > > On Wed, Apr 5, 2017 at 1:12 PM, Gregory Hainaut > > wrote: > > > Context: > > > Nouveau uses NULL strings for unnamed parameter

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 wrote: > On Wed, Apr 5, 2017 at 1:12 PM, Gregory Hainaut > wrote: > > Context: > > Nouveau uses NULL strings for unnamed parameter of texture gather > > offsets opcode. > > To be clear, this isn't a "nou

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

2017-04-05 Thread Gregory Hainaut
andle null pointer string. Add an assert in blob_write_string to ease debug Signed-off-by: Gregory Hainaut --- src/compiler/glsl/blob.c | 33 + src/compiler/glsl/blob.h | 27 +++ src/compiler/glsl/shader_cache.cpp | 4 ++-

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

2017-04-05 Thread Gregory Hainaut
nerated first is still bound!) And yes I confirm, 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 wrote: > On 01.04.2017 11:42, Gregory Hainaut wrote: >> Hello, >> >> Please

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

2017-04-05 Thread Gregory Hainaut
# Classify fixed and variable parameters. self.fixed_params = [] self.variable_params = [] for p in self.parameters: if p.is_padding: continue -if p.is_variable_length(): +if se

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

2017-04-04 Thread gregory hainaut
On Wed, 5 Apr 2017 09:09:45 +1000 Timothy Arceri 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 crashes of the 'texturegatheroffse

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

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

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

2017-04-04 Thread Gregory Hainaut
re handled transparently for Mesa. Signed-off-by: Gregory Hainaut --- 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/compiler/glsl/blob.c +++ b/sr

[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

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

2017-04-04 Thread Gregory Hainaut
: Gregory Hainaut --- 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 + src/mesa/main/marshal.h

[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 --- 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

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 wrote: > On Fri, Mar 31, 2017 at 6:12 AM, Gregory Hainaut > wrote: > >> Others have reported this crashing on Nouveau. I haven't seen the problem > >> on radeonsi or i965. > > > > Hello Timothy (sorry for

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 wrote: > > > On 31/03/17 18:00, gregory hainaut wrote: > > On Fri, 31 Mar 2017 08:24:36 +0200 > > Nicolai Hähnle wrote: > > > > Hello Nicolai > > > >> On 30.03.2017 21:55, Gregory Hainaut wrote

[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 o

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 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_write_string is called fr

[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

[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 --- src/compiler/glsl/blob.c | 5 +++

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 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 Hähnle wrote: > > On 20.03.2017 14:33

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 wrote: > On 20.03.2017 14:33, Markus Wick wrote: >> Am 2017-03-20 14:21, schrieb Nicolai Hähnle: >>> On 17.03.2017 18:5

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

2017-03-27 Thread Gregory Hainaut
Hello Timothy, 2 small questions: Will it work for DSA equivalent function, namely glClearNamedFramebufferfv ? Would it be interesting to also do the equivalent for glClearBufferiv/glClearBufferuiv ? Note the *uiv variant could be easier as the size is always 4 INT, so it can be done with a scal

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

2017-03-27 Thread Gregory Hainaut
> > >>* + variable_data += size; > *>>* And here, and below. > * > This code is mostly a copy from the generated code, which adds these for > some reason (possibly a bug in generation, but it may be used by other > functions and just excess here). > > Hello, As I already looked into the python l

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 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/marshal.c > &

[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 --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 +++ src/mapi/glapi/gen/ARB_robustness.xml | 2 +- src

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

2017-03-09 Thread gregory hainaut
> Without doing some additional tracking, we won't know whether the data > will be immediate user data, or will be loaded from a PBO. The normal > teximage functions will be sync by default because they don't know up > front what the size of their image data is. But for compressed teximage, > we

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

2017-03-07 Thread Gregory Hainaut
ory On 3/6/17, Timothy Arceri wrote: > > > On 04/03/17 04:41, gregory hainaut wrote: >> On Fri, 3 Mar 2017 16:46:24 +0100 >> Marek Olšák wrote: >> >>> On Fri, Mar 3, 2017 at 10:19 AM, Timothy Arceri >>> wrote: >>>> On 02/03/17 22:18

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

2017-03-03 Thread gregory hainaut
On Fri, 3 Mar 2017 16:46:24 +0100 Marek Olšák wrote: > On Fri, Mar 3, 2017 at 10:19 AM, Timothy Arceri wrote: > > On 02/03/17 22:18, Marek Olšák wrote: > >> > >> The bad news is my involvement is currently on hold due to other > >> projects and responsibilities. > > > > > > I can probably spend

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 wrote: > On 26 February 2017 at 21:58, Gregory Hainaut > wrote: >> On 2/25/17, Edward O'Callaghan wrote: >>> Acked-by: Edward O'Callaghan >>> >>> On 02/25/2017 07:45 AM, Gr

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

2017-03-02 Thread Gregory Hainaut
Hello Dieter, I sent all my patches to Marek. You can find latest code in his branch https://cgit.freedesktop.org/~mareko/mesa/?h=glthread Status: * all crashes are fixed * major piglit bug are fixed * asynchronous PBO transfer are done too (useful with persistent PBO) * I don't know if there i

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 wrote: > Acked-by: Edward O'Callaghan > > On 02/25/2017 07:45 AM, Gregory Hainaut wrote: >> At least, the extension is exported (gallium capability >> PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT is 1) >> >> Signed-off-by: Gr

[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 --- docs/features.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index d9528e9..9d3a460 100644

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 wrote: > On Mon, Feb 13, 2017 at 4:14 PM, Gregory Hainaut > wrote: > > If I remember correctly I got something like 4K-8K fails (total is 40K > > tests) when I broke the GL1 restore dispatch function. So it is > > around 10

  1   2   >