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

2013-04-05 Thread gregory
DeletePipelineObject/BindPipeline/UseProgramStages. Opinion is welcome Note: I didn't yet rebase my work on latest mesa. Not sure if it is critical for a preliminary review. Note2: I create the xml manually, don't know if there is any automatic flow. Thanks gregory (12): sso: Create

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

2013-04-05 Thread gregory
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file pipeline.c + * \author Hainaut Gregory + * + * Implementation of pipeline object related API functions. Based on GL_ARB_s

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

2013-04-05 Thread gregory
* 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 GenProgr

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

2013-04-05 Thread gregory
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 --- src/mesa/main/mtypes.h|5 +++ src/mesa/main/shaderapi.c | 90 +++-- 2 fi

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

2013-04-05 Thread gregory
--- src/mesa/main/pipelineobj.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index e50416c..7a56c67 100644 --- a/src/mesa/main/pipelineobj.c +++ b/src/mesa/main/pipelineobj.c @@ -233,6 +

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

2013-04-05 Thread gregory
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 06/12] sso: rename Shader to the pointer _Shader

2013-04-05 Thread gregory
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 --- src/mesa/drivers/common/meta.c | 10 ++-- src/mesa/drivers/dri/i965/brw_gs.c |

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

2013-04-05 Thread gregory
save and restore _Shader/Pipeline binding point. Rational we don't want any conflict when the program will be unattached. --- src/mesa/drivers/common/meta.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/d

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

2013-04-05 Thread gregory
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-04-05 Thread gregory
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-04-05 Thread gregory
--- 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 7ce2df1..f6311a5 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -356,6 +356,7 @@ EXTRA_

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

2013-04-05 Thread gregory
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-04-05 Thread gregory
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 11db9d3..4af46f3 100644 --- a/src/mesa/state_tracker/st_extensions.c ++

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

2013-04-12 Thread gregory
lineObject/DeletePipelineObject/BindPipeline/UseProgramStages. Opinion is welcome Note: Rebase done on ac1118d53c0b22db8dcd6fcdcd2d1a245037dbc1 Note2: I create the xml manually, don't know if there is any automatic flow. gregory (12): sso: Create extensions entry points sso: Add pipeline container/s

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

2013-04-12 Thread gregory
elineobj.c new file mode 100644 index 000..651c1a0 --- /dev/null +++ b/src/mesa/main/pipelineobj.c @@ -0,0 +1,135 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 2013-2013 Gregory Hainaut + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of

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

2013-04-12 Thread gregory
V2: * Rename gl_shader_state to gl_pipeline_object * Rename Pipeline.PipelineObj to Pipeline.Current * Rename ValidationStatus to Validated * Formatting improvement V1: * Extend gl_shader_state as pipeline object state * Add a new container gl_pipeline_shader_state that contains binding point of

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

2013-04-12 Thread gregory
V2: Formatting improvement 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 --- src/mesa/main/mtypes.h|5 +++ src/mesa/main/shaderapi.c | 94 +++

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

2013-04-12 Thread gregory
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 cf741a1..6c9a56f 100644 --- a/src/mesa/main/pipelineobj.c

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

2013-04-12 Thread gregory
V2: formating improvement 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 i

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

2013-04-12 Thread gregory
V2: formatting improvement 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 --- src/mesa/drivers/common/meta.c | 10 ++-- src/mesa/drivers/dri/i

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

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

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

2013-04-12 Thread gregory
V2: formatting & rename 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

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

2013-04-12 Thread gregory
V2: formatting & rename 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 g

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

2013-04-12 Thread gregory
--- 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-04-12 Thread gregory
V2: Fix memory leak with ralloc_strdup Formatting improvement V1: 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_vali

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

2013-04-12 Thread gregory
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 ++

[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
ame (which might be optimized as a spin lock). Therefore the hot rendering loop might be sync free hence the speed boost. To conclude, based on my single testcase, current state of the code isn't yet optimal and it might explain why few apps see any perf improvement so far.

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

2017-02-07 Thread Gregory Hainaut
or because it can really bring some performance improvements (when done carefully). Thanks you, Gregory ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

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
sync (with a hack), I won +25% on FPS and rendering was limited by the GPU (Nouveau). Gregory ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

2017-02-10 Thread gregory hainaut
ich is more reasonable than a crash. Cheers, Gregory ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

[Mesa-dev] [PATCH] Remove unneeded stall calls from batches on Baytrail.

2014-06-18 Thread Gregory Hunt
From: Greg Hunt These cause a small slowdown when we are sending a large number of small batches to the GPU. Signed-off-by: Gregory Hunt --- src/mesa/drivers/dri/i965/gen6_vs_state.c | 2 +- src/mesa/drivers/dri/i965/gen7_blorp.cpp | 2 +- src/mesa/drivers/dri/i965/gen7_gs_state.c

[Mesa-dev] [PATCH v2] Remove unneeded stall calls from batches on Baytrail. According to the bspec and running piglit these are not needed.

2014-06-25 Thread Gregory Hunt
From: Greg Hunt These cause a small slowdown when we are sending a large number of small batches to the GPU. Removing these improves performance by upto 5% on some CPU bound SynMark tests (Batch[4-7], DrvState1, HdrBloom, Multithread, ShMapPcf). Signed-off-by: Gregory Hunt --- src/mesa

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
indProgramPipeline(5) glUseProgram(0) # Don't use a real program. What state is # expected NULL or pipeline 5? My understanding is NULL Cheers, Gregory ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

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

2013-04-11 Thread gregory hainaut
a piglit non regression test first and double check any typo. Then I will probabaly post the V2 friday except if you prefer to finish the first review first. FYI, I choose to keep the shorter "Current" so we got the basic "Pipeline.Current" Cheers, Gregory > > On 04/05/2013

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
ow fixed) ? > I'm really excited to see progress on SSO, so hopefully we can get some > of this landed soon. > > gregory writes: > > > V2: formatting improvement > > patch versioning generally comes at the end of the commit message. > > Also, could you fix up

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
k) to start the test. See below The relevant log: // vertex interface layout(location=0) out highp float vtxVar0; // fragment interface layout(location=0) out highp float frgVar0; // mesa warning warning: fragment shader varying frgVar0 not written by vertex shader Cheers, Gregory diff --git

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

2015-11-22 Thread gregory hainaut
return; > > case GL_VALIDATE_STATUS: > > - *params = pipe->Validated; > > + /* If pipeline is not bound, return initial value 0. */ > > + *params = (ctx->_Shader->Name != pipe->Name) > > ? 0 : pipe->Validated; > > Hi Tapani, &

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

  1   2   3   >