[Mesa-dev] [RFC 2/4] glsl IR: only allow optimization of interstage variable

2015-10-13 Thread Gregory Hainaut
test: arb_separate_shader_object-rendezvous_by_name Signed-off-by: Gregory Hainaut --- src/glsl/opt_dead_code.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp index 071485a..37329f6 100644 --- a/src/glsl/opt_dead_code.cpp +++ b/src

[Mesa-dev] [RFC 0/4] V3: Improve GLSL support of GL_ARB_separate_shader_objects

2015-10-13 Thread Gregory Hainaut
mit 4 was tested on the PCSX2 application. I need to implement a new test. Gregory Hainaut (4): glsl IR: add always_active_io attribute to ir_variable glsl IR: only allow optimization of interstage variable glsl: avoid linker and user varying location to overlap glsl: don't sort varyi

[Mesa-dev] [RFC 3/4] glsl: avoid linker and user varying location to overlap

2015-10-13 Thread Gregory Hainaut
VARYING_SLOT_VAR1 by the linker piglit: arb_separate_shader_object-rendezvous_by_name Signed-off-by: Gregory Hainaut --- src/glsl/link_varyings.cpp | 46 +++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/glsl/link_varyings.cpp b/src

[Mesa-dev] [RFC 4/4] glsl: don't sort varying in separate shader mode

2015-10-13 Thread Gregory Hainaut
in SSO with the help of GL_ARB_enhanced_layouts Signed-off-by: Gregory Hainaut --- src/glsl/link_varyings.cpp | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 6d6e9b5..31efee7

[Mesa-dev] [RFC 1/4] glsl IR: add always_active_io attribute to ir_variable

2015-10-13 Thread Gregory Hainaut
e the foreach IR code in the linker file Signed-off-by: Gregory Hainaut --- src/glsl/ir.cpp | 1 + src/glsl/ir.h | 7 + src/glsl/linker.cpp | 73 + 3 files changed, 81 insertions(+) diff --git a/src/glsl/ir.cpp b/src/glsl/i

[Mesa-dev] [RFC 2/4] glsl IR: only allow optimization of interstage variable

2015-10-25 Thread Gregory Hainaut
test: arb_separate_shader_object-rendezvous_by_name Signed-off-by: Gregory Hainaut --- src/glsl/opt_dead_code.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp index c5be166..fef5e92 100644 --- a/src/glsl/opt_dead_code.cpp +++ b/src

[Mesa-dev] [RFC 1/4] glsl IR: add always_active_io attribute to ir_variable

2015-10-25 Thread Gregory Hainaut
e the foreach IR code in the linker file v4: * Fix variable name in assert Signed-off-by: Gregory Hainaut --- src/glsl/ir.cpp | 1 + src/glsl/ir.h | 7 + src/glsl/linker.cpp | 73 + 3 files changed, 81 insertions(+) diff --git

[Mesa-dev] [RFC 0/4] V4: Improve GLSL support of GL_ARB_separate_shader_objects

2015-10-25 Thread Gregory Hainaut
test: arb_separate_shader_object-rendezvous_by_name posted on piglit ML Commit 4 was tested on the PCSX2 application. Gregory Hainaut (4): glsl IR: add always_active_io attribute to ir_variable glsl IR: only allow optimization of interstage variable glsl: avoid linker and user varying locatio

[Mesa-dev] [RFC 3/4] glsl: avoid linker and user varying location to overlap

2015-10-25 Thread Gregory Hainaut
VARYING_SLOT_VAR1 by the linker piglit: arb_separate_shader_object-rendezvous_by_name v4: * Fix variable name in assert Signed-off-by: Gregory Hainaut --- src/glsl/link_varyings.cpp | 46 +++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff

[Mesa-dev] [RFC 4/4] glsl: don't sort varying in separate shader mode

2015-10-25 Thread Gregory Hainaut
in SSO with the help of GL_ARB_enhanced_layouts Signed-off-by: Gregory Hainaut --- src/glsl/link_varyings.cpp | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 67d04cb..f1794c3

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

2017-02-06 Thread Gregory Hainaut
Hello, > A note on synchronizations. Borderlands 2 has 170 thread syncs per > frame. That means the app thread has to stop and wait 170x per frame. > Despite that, it still has 70% higher performance in some cases. My > theory is that if you have a lot of draw calls, you can have a lot of > syncs,

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

2017-02-07 Thread Gregory Hainaut
> > Hi, > > On Mon, 2017-02-06 at 13:43 +0100, Jan Ziak wrote: > >* Shadow of Mordor benchmark: 30 FPS w/o glthread -> 20 FPS with > *>* glthread > *> > For what it is worth, all the Feral games have a dispatch thread that > primarily calls GL functions. > > James > > Hello James, Did you have th

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

2017-02-08 Thread Gregory Hainaut
> > >* Hello James, > *> > >* Did you have the opportunity to compare Feral's dispatcher threading > *>* implementation versus Nvidia's threading option. If yes, is there any > *>* performance difference? In other word, did you implement it because > *>* some (most) drivers miss this optimization o

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

2017-02-08 Thread gregory hainaut
> Regresses performance: > * Shadow of Mordor (with multiple game gfx settings & driver/HW?) > * PCSX2 emulator As Marek said the code still miss some optimization opportunities. FWIW, PCSX2 uses persistant PBO for texture transfer so it can be done without any sync. I removed the sync (with a h

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

2017-02-10 Thread gregory hainaut
Hello, I ran piglit (glthread false vs true) on the Marek branch and Nouveau driver. Of course we can still debate, if piglit is good enough to detect multi threading issue. I spot a small typo that generate ~400 fails (*mat2x4* uniform got 6 scalar instead of 8). piglit status with the typo p

Re: [Mesa-dev] [PATCH 14/26] mesa: Connect the generated GL command marshalling code to the build.

2017-02-12 Thread gregory hainaut
> >> > void > >> > _mesa_glthread_init(struct gl_context *ctx) > >> > { > >> > struct glthread_state *glthread = calloc(1, sizeof(*glthread)); > >> > > >> > if (!glthread) > >> >return; > >> > > >> > + /* The marshalling dispatch table isn't integrated with the > >> > Begin/End

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

2017-02-13 Thread Gregory Hainaut
> > On 11/02/17 06:36 AM, gregory hainaut wrote: > > >* On GLX side, I can explain some crashes (didn't debug all neither fail) > *>* and I suspect there are related to the previous report. > *> >* At the context creation a glthread dispatcher is c

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

2017-02-13 Thread Gregory Hainaut
All those tests will disable glthread in the middle. In the current state, piglit is far from ideal to test glthread. Maybe CTS could help to increase the coverage. I will give it a shot. Gregory On 2/13/17, Marek Olšák wrote: > On Mon, Feb 13, 2017 at 11:10 AM, Gregory Hainaut > wrote: >&

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

2017-02-13 Thread Gregory Hainaut
Olšák wrote: > On Mon, Feb 13, 2017 at 3:56 PM, Gregory Hainaut > wrote: >> Hum, I need to check it. I think I disabled EGL because I didn't have >> latest waffle on my Debian (and Nvidia didn't support fully EGL back >> then). >> >> However, I forgot

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

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

Re: [Mesa-dev] [PATCH 01/12] sso: Create extensions entry points

2013-07-27 Thread gregory hainaut
On Fri, 24 May 2013 16:27:59 -0700 Ian Romanick wrote: > I'm finally getting off my lazy behind and reviewing this series. I'll > probably only be able to review one or two patches today, but I should > be able to get through the rest shortly. > > So far, it's just little stuff. > Hello. Di

[Mesa-dev] Status of GL_ARB_separate_shader_objects? I would like to help.

2013-03-22 Thread gregory hainaut
Hello, I would like to run PCSX2 on mesa drivers but unfortunately it miss a couple of features, mostly the GL_ARB_separate_shader_objects extension. I think I can help to implement this extension at least the opengl (ie not glsl) plumbering part (with some piglit tests). The extension GL_EXT_sep

Re: [Mesa-dev] Status of GL_ARB_separate_shader_objects? I would like to help.

2013-03-23 Thread gregory hainaut
On Fri, 22 Mar 2013 15:44:07 -0700 Matt Turner wrote: > On Fri, Mar 22, 2013 at 1:00 PM, gregory hainaut > wrote: > > * GenProgramPipelines doesn't create object! > > ... Spec extract: > > These names are marked as used, for the purposes of GenBuffers only, > &

Re: [Mesa-dev] [Piglit] [RFC] ARB_separate_shader_objects test v2

2013-03-28 Thread gregory hainaut
gramPipeline > (results piglit output attached) > > On Tue, Mar 26, 2013 at 12:56 PM, gregory hainaut > wrote: > > Plese find below my (really too big) patch. > > It's not really big at all, but I think the piglit-shader changes need > to be a separate commit/patch. >

[Mesa-dev] [PATCH 1/3] piglit util: new functions piglit_program_pipeline_check_status/quiet

2013-03-28 Thread gregory hainaut
Equivalent to piglit_link_check_status/quiet but with program object pipeline --- tests/util/piglit-shader.c | 50 tests/util/piglit-shader.h |2 ++ 2 files changed, 52 insertions(+) diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-sha

[Mesa-dev] [PATCH 2/3] add 3 news tests for arb_separate_shader_objects

2013-03-28 Thread gregory hainaut
-git a/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c b/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c new file mode 100644 index 000..81f6978 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c @@ -0,0 +1,279 @@ +/* + * Copyright © 20

[Mesa-dev] [PATCH 3/3] update EXT_transform_feedback error detection

2013-03-28 Thread gregory hainaut
program pipeline add new INVALID_OPERATION (spec chapter 13.2.2) Note: FGLRX don't report any of the expected errors... --- tests/all.tests|4 +- tests/spec/ext_transform_feedback/api-errors.c | 84 +++- 2 files changed, 85 insertions(+),

Re: [Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions

2013-04-06 Thread gregory hainaut
On Fri, 05 Apr 2013 14:44:54 -0700 Ian Romanick wrote: > On 04/05/2013 02:25 PM, gregory wrote: > > Hello, > > > > Please find an implementation of the ARB_separate_shader_objects > > extensions. I concentrate mostly on the state part of > > the extensions aka the pipeline object. I think GLSL a

Re: [Mesa-dev] [PATCH 05/12] sso: replace Shader binding point with _Shader

2013-04-11 Thread gregory hainaut
On Sat, 06 Apr 2013 08:52:35 -0600 Brian Paul wrote: > One more comment for now below. I may not get to review the rest for > a few days. > > -Brian Thanks very much for the review. I redid properly my patch and rebase my work on a more recent mesa version. I want to do a piglit non regressio

Re: [Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions V2

2013-04-12 Thread gregory hainaut
On Fri, 12 Apr 2013 09:39:15 -0700 (PDT) Jose Fonseca wrote: > - Original Message - > > From: "gregory" > > To: "gregory hainaut" > > FWIW, your emails BCC'ing the list are a bit of a pain. They manage elude > most of my mail filteri

Re: [Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions V2

2013-04-12 Thread gregory hainaut
On Fri, 12 Apr 2013 19:02:47 +0200 gregory hainaut wrote: > On Fri, 12 Apr 2013 09:39:15 -0700 (PDT) > Jose Fonseca wrote: > > > - Original Message - > > > From: "gregory" > > > To: "gregory hainaut" > > > > FWIW, yo

Re: [Mesa-dev] [PATCH 01/12] sso: Create extensions entry points

2013-04-12 Thread gregory hainaut
On Fri, 12 Apr 2013 12:38:19 -0700 Eric Anholt wrote: > Please, patches for Mesa have to actually be addressed to Mesa. What do you mean? The github tree (was requested by Jordan)? Or because the mail header doesn't contains mesa address (mail client setup issue that it is now fixed) ? > I'm

Re: [Mesa-dev] [PATCH 01/12] sso: Create extensions entry points

2013-05-02 Thread gregory hainaut
On Fri, 12 Apr 2013 13:52:46 -0700 Eric Anholt wrote: > gregory hainaut writes: > > > On Fri, 12 Apr 2013 12:38:19 -0700 > > Eric Anholt wrote: > > > >> Please, patches for Mesa have to actually be addressed to Mesa. > > > > What do you mean?

[Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions V3

2013-05-03 Thread Gregory Hainaut
se done on ac1118d53c0b22db8dcd6fcdcd2d1a245037dbc1 Gregory Hainaut (12): sso: Create extensions entry points sso: Add pipeline container/state sso: add support of GL_PROGRAM_SEPARABLE and CreateShaderProgramv sso: implement ActiveShaderProgram & GetProgramPipelineiv sso: replace Shader binding poin

[Mesa-dev] [PATCH 02/12] sso: Add pipeline container/state

2013-05-03 Thread Gregory Hainaut
V1: * Extend gl_shader_state as pipeline object state * Add a new container gl_pipeline_shader_state that contains binding point of the previous object * Update mesa init/free shader state due to the extension of the attibute * Add an init/free pipeline function for the context * Implement GenP

[Mesa-dev] [PATCH 03/12] sso: add support of GL_PROGRAM_SEPARABLE and CreateShaderProgramv

2013-05-03 Thread Gregory Hainaut
V1: CreateShaderProgramv is similar as CreateShaderProgramEXT. The 2 differences are 1/ it an array of strings 2/ it support the GL_PROGRAM_SEPARABLE (aka SeparateShader) flag V2: Formatting improvement --- src/mesa/main/mtypes.h|5 +++ src/mesa/main/shaderapi.c | 94 +++

[Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram & GetProgramPipelineiv

2013-05-03 Thread Gregory Hainaut
V2: * Rename object * Formatting improvement --- src/mesa/main/pipelineobj.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index d81bd0e..ffbeeae 100644 --- a/src/mesa/main/pipelineobj.c

[Mesa-dev] [PATCH 06/12] sso: rename Shader to the pointer _Shader

2013-05-03 Thread Gregory Hainaut
Basically a sed but shaderapi.c and get.c. get.c => GL_CURRENT_PROGAM always refer to the "old" UseProgram behavior shaderapi.c => the old api stil update the Shader object directly V2: formatting improvement --- src/mesa/drivers/common/meta.c | 10 ++-- src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 07/12] sso: update meta state

2013-05-03 Thread Gregory Hainaut
save and restore _Shader/Pipeline binding point. Rational we don't want any conflict when the program will be unattached. V2: formatting improvement --- src/mesa/drivers/common/meta.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/mesa/dri

[Mesa-dev] [PATCH 05/12] sso: replace Shader binding point with _Shader

2013-05-03 Thread Gregory Hainaut
To avoid NULL pointer check a default pipeline object is installed in _Shader when no program is current The spec say that UseProgram/UseShaderProgramEXT/ActiveProgramEXT got an higher priority over the pipeline object. When default program is uninstall, the pipeline is used if any was bound. N

[Mesa-dev] [PATCH 08/12] sso: Implement _mesa_UseProgramStages

2013-05-03 Thread Gregory Hainaut
Implement _mesa_UseProgramStages => arb_separate_shader_object-GetProgramPipelineiv is now pass :) Extend use_shader_program to support a different target. Allow to reuse the function to update the pipeline state. Note I bypass the flush when target isn't current. Maybe it would be better to cr

[Mesa-dev] [PATCH 09/12] sso: implement BindProgramPipeline

2013-05-03 Thread Gregory Hainaut
Test become green in piglit: The updated ext_transform_feedback-api-errors:useprogstage_noactive useprogstage_active bind_pipeline arb_separate_shader_object-GetProgramPipelineiv arb_separate_shader_object-IsProgramPipeline For the moment I reuse Driver.UseProgram but I guess it will be better to

[Mesa-dev] [PATCH 10/12] sso: update glGet: GL_PROGRAM_PIPELINE_BINDING

2013-05-03 Thread Gregory Hainaut
--- src/mesa/main/get.c |9 + src/mesa/main/get_hash_params.py |3 +++ 2 files changed, 12 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 54159c0..6cbb7db 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -369,6 +369,7 @@ EXTRA_

[Mesa-dev] [PATCH 11/12] sso: implement ValidateProgramPipeline and GetProgramPipelineInfoLog

2013-05-03 Thread Gregory Hainaut
Implementation note: I don't use context for ralloc (don't know how). The check on PROGRAM_SEPARABLE flags is also done when the pipeline isn't bound. It doesn't make any sense in a DSA style API. Maybe we could replace _mesa_validate_program_pipeline by _mesa_validate_program_pipeline. For exa

[Mesa-dev] [PATCH 12/12] sso: Finally enable the extension on Gallium

2013-05-03 Thread Gregory Hainaut
Note: it probably work on others drivers. --- src/mesa/state_tracker/st_extensions.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index f986480..4ce74f2 100644 --- a/src/mesa/state_tracker/st_extensions.c ++

Re: [Mesa-dev] [PATCH 10/12] sso: update glGet: GL_PROGRAM_PIPELINE_BINDING

2013-05-04 Thread gregory hainaut
On Fri, 3 May 2013 12:04:48 -0700 Matt Turner wrote: > On Fri, May 3, 2013 at 10:44 AM, Gregory Hainaut > wrote: > > --- > > src/mesa/main/get.c |9 + > > src/mesa/main/get_hash_params.py |3 +++ > > 2 files changed, 12 insertions(+)

Re: [Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram & GetProgramPipelineiv

2013-05-04 Thread gregory hainaut
On Fri, 3 May 2013 11:56:39 -0700 Matt Turner wrote: > On Fri, May 3, 2013 at 10:44 AM, Gregory Hainaut > wrote: > > V2: > > * Rename object > > * Formatting improvement > > --- > > src/mesa/main/pipelineobj.c | 77 > > +

Re: [Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram & GetProgramPipelineiv

2013-05-04 Thread gregory hainaut
On Sat, 04 May 2013 12:37:05 -0700 Kenneth Graunke wrote: > On 05/03/2013 10:44 AM, Gregory Hainaut wrote: > > V2: > > * Rename object > > * Formatting improvement > > --- > > src/mesa/main/pipelineobj.c | 77 > > +

Re: [Mesa-dev] [PATCH 10/12] sso: update glGet: GL_PROGRAM_PIPELINE_BINDING

2013-05-24 Thread gregory hainaut
On Sat, 4 May 2013 11:35:22 +0200 gregory hainaut wrote: > On Fri, 3 May 2013 12:04:48 -0700 > Matt Turner wrote: > > > On Fri, May 3, 2013 at 10:44 AM, Gregory Hainaut > > wrote: > > > --- > > > src/mesa/main/get.c |9 + > &g

Re: [Mesa-dev] [PATCH 02/12] sso: Add pipeline container/state

2013-05-28 Thread gregory hainaut
On Tue, 28 May 2013 12:30:56 -0700 Ian Romanick wrote: > On 05/03/2013 10:44 AM, Gregory Hainaut wrote: > > V1: > > * Extend gl_shader_state as pipeline object state > > * Add a new container gl_pipeline_shader_state that contains > >binding point of the previo

[Mesa-dev] [PATCH] gallium egl: mark KHR_create_context as supported

2013-06-08 Thread Gregory Hainaut
Don't know why it was not already activated! Code seem to be common between dri2 and gallium. Piglit tested on r600 gallium. --- src/gallium/state_trackers/egl/common/egl_g3d.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/st

[Mesa-dev] [PATCH 3/3] glsl/opt: disable optimization of varying input

2015-09-20 Thread Gregory Hainaut
bug 79783 and likely any application that uses GL_ARB_separate_shader_objects extension. Signed-off-by: Gregory Hainaut --- src/glsl/opt_dead_code.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp index e4bf874..9852

[Mesa-dev] [PATCH 1/3] glsl/link: don't consider unused variable as read variable.

2015-09-20 Thread Gregory Hainaut
Current checks rely on the optimization phase to remove deadcode varying. Therefore remaining varying are used. Deadcode Optimizations won't be possible anymore with the support of GL_ARB_separate_shader_objects. So it requires to check the used flag of the varying. Signed-off-by: Gr

[Mesa-dev] [PATCH 2/3] glsl/ast2hir: add a new flag attribute_input for VS input

2015-09-20 Thread Gregory Hainaut
GL_ARB_separate_shader_objects requires that all inputs varying remains active. This flag allow to distinguish input attribute from the input varying. Flag will be used on next commit. Signed-off-by: Gregory Hainaut --- src/glsl/ast_to_hir.cpp | 4 src/glsl/ir.h | 9

[Mesa-dev] [PATCH 0/3][RFC] Improve GLSL support of GL_ARB_separate_shader_objects

2015-09-20 Thread Gregory Hainaut
s the best solutions. Piglit test done on older Mesa/Nouveau (8276ba260) due to libdrm newer requirement. [30454/30454] crash: 29, fail: 221, pass: 20749, skip: 9451, warn: 4 - The fix was validated on the PCSX2 application. I will try to create a piglit tests of the above situation. Gregory

Re: [Mesa-dev] [PATCH 0/3][RFC] Improve GLSL support of GL_ARB_separate_shader_objects

2015-09-30 Thread gregory hainaut
On Fri, 25 Sep 2015 16:40:31 -0700 Ian Romanick wrote: > On 09/20/2015 01:15 PM, Gregory Hainaut wrote: > > Current GLSL badly optimizes the code making it incompatible with the > > GL_ARB_separate_shader_objects extension. > > > > Typical example of the current beh

Re: [Mesa-dev] [PATCH 0/3][RFC] Improve GLSL support of GL_ARB_separate_shader_objects

2015-09-30 Thread gregory hainaut
On Wed, 30 Sep 2015 21:18:43 +0200 gregory hainaut wrote: > On Fri, 25 Sep 2015 16:40:31 -0700 > Ian Romanick wrote: > > > On 09/20/2015 01:15 PM, Gregory Hainaut wrote: > > > Current GLSL badly optimizes the code making it incompatible with the > > > GL_ARB_

[Mesa-dev] [RFC 1/3] glsl IR: add not_interstage attribute to ir_variable

2015-10-03 Thread Gregory Hainaut
The negative form was used to keep interstage as the default value Note: I put the ir_set_not_interstage_io function in opt_dead_code because it will be used to disable deadcode optimization. Feel free to point me a better place if it exists. Signed-off-by: Gregory Hainaut --- src/glsl/ir.h

[Mesa-dev] [RFC 2/3] glsl link: annotate not_interstage attribute of the ir_var after link phase

2015-10-03 Thread Gregory Hainaut
Signed-off-by: Gregory Hainaut --- src/glsl/linker.cpp | 47 +++ 1 file changed, 47 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index fd69dbc..a4a8ab4 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -3378,6

[Mesa-dev] [RFC 3/3] glsl IR: only allow optimization of interstage variable

2015-10-03 Thread Gregory Hainaut
GL_ARB_separate_shader_objects allow to match by name variable or block interface. Input varying can't be removed as it is will impact the location assignment. It fixes the bug 79783 and likely any application that uses GL_ARB_separate_shader_objects extension. Signed-off-by: Gregory Ha

[Mesa-dev] [RFC 0/3] V2: Improve GLSL support of GL_ARB_separate_shader_objects

2015-10-03 Thread Gregory Hainaut
uilt-in varyings because they don't impact location of others variables Gregory Hainaut (4): glsl IR: add not_interstage attribute to ir_variable glsl link: annotate not_interstage attribute of the ir_var after link phase glsl IR: only allow optimization of interstage variabl

Re: [Mesa-dev] [RFC 0/3] V2: Improve GLSL support of GL_ARB_separate_shader_objects

2015-10-03 Thread gregory hainaut
d on the shader position in the > > pipeline > >program. Potentially can be squased with the previous one. > > 3/ Don't do deadcode removal of not_interstage variable with the exception > >of the built-in varyings because they don't impact location of othe

Re: [Mesa-dev] [RFC 0/3] V2: Improve GLSL support of GL_ARB_separate_shader_objects

2015-10-05 Thread gregory hainaut
On Sat, 3 Oct 2015 11:59:49 +0200 gregory hainaut wrote: > On Sat, 03 Oct 2015 09:35:49 + > Mike Lothian wrote: > > > Would it be better to have is_interstage=0 rather than a double negative? > > > Yes. I think it just need to set 1 in the constructor (forget to

[Mesa-dev] [PATCH] mesa: faster validation of sampler unit mapping for SSO

2016-06-24 Thread Gregory Hainaut
Code was inspired from _mesa_update_shader_textures_used However unlike _mesa_update_shader_textures_used that only check for a single stage, it will check all stages. It avoids to loop on all uniforms, only active samplers are checked. Signed-off-by: Gregory Hainaut --- src/mesa/main

Re: [Mesa-dev] [PATCH] mesa: faster validation of sampler unit mapping for SSO

2016-06-25 Thread Gregory Hainaut
ation (cache? temperature, GPU turbo?). Honestly I was reluctant to send the patch, but the code isn't more complex. I let's you judge. Gregory On 6/25/16, Timothy Arceri wrote: > On Fri, 2016-06-24 at 10:07 +0200, Gregory Hainaut wrote: >> Code was inspired from _mesa_upd

Re: [Mesa-dev] [PATCH 3/7] glsl: optimise inputs/outputs with explicit locations

2015-11-21 Thread gregory hainaut
. > > We then add a function to match explicit locations between shaders. > > Cc: Gregory Hainaut > --- > src/glsl/link_varyings.cpp | 6 ++-- > src/glsl/linker.cpp| 82 > +++--- > 2 files changed, 74 insertions(+), 14 de

Re: [Mesa-dev] [PATCH 3/3] mesa: return initial value for VALIDATE_STATUS if pipe not bound

2015-11-22 Thread gregory hainaut
On Sun, 22 Nov 2015 14:25:31 +1100 Timothy Arceri wrote: > On Tue, 2015-09-01 at 13:53 +0300, Tapani Pälli wrote: > > From OpenGL 4.5 Core spec (7.13): > > > > "If pipeline is a name that has been generated (without > > subsequent > > deletion) by GenProgramPipelines, but refers to a pro

Re: [Mesa-dev] [PATCH] glsl: implement recent spec update to SSO validation

2015-11-23 Thread Gregory Hainaut
SO tests to proceed passed validation, >> while not regressing ES31-CTS.sepshaderobjs.PipelineApi. >> >> Cc: Tapani Pälli >> Cc: Gregory Hainaut >> --- >> src/mesa/main/pipelineobj.c | 25 - >> 1 file changed, 24 insertions(+), 1 deletion(

Re: [Mesa-dev] [PATCH] glsl: implement recent spec update to SSO validation

2015-11-23 Thread Gregory Hainaut
> From: Timothy Arceri >> >> Enables 200+ dEQP SSO tests to proceed passed validation, >> while not regressing ES31-CTS.sepshaderobjs.PipelineApi. >> >> Cc: Tapani Pälli >> Cc: Gregory Hainaut >> --- >> src/mesa/main/pipelineobj.c | 25 +

[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

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

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

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: >>>&

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

[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

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

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

[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

[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

  1   2   >