Re: [Mesa-dev] vertex array regression

2011-12-25 Thread Mathias Fröhlich
Hi, On Sunday, December 25, 2011 10:03:34 Marek Olšák wrote: > I did not fix Torcs. I think optimizing apps is useless if the same > optimization can be done in Mesa too. Ok, so any torcs version should show a performance difference to check against. > > Do you have any test program that could b

[Mesa-dev] [PATCH] vbo: Clean up recalculate_input_bindings.

2011-12-25 Thread Mathias Fröhlich
Hi, I have posted a very similar patch already with the array object change series. But I have omitted applying this one because of a general issue that Brian pointed me to in a patch prior to this one in the series. But it turns out that this one should be still safe. Please review Thanks Ma

Re: [Mesa-dev] [PATCH] vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays

2011-12-25 Thread Mathias Fröhlich
Hi Brian, On Saturday, December 24, 2011 16:38:09 Brian Paul wrote: > From: Brian Paul > > This fixes a regression seen with the isosurf demo when switching between > glBegin/End and glDrawArrays (do it several times). The problem was the > driver wasn't getting _NEW_ARRAY when the arrays were

[Mesa-dev] [PATCH 17/17] gallium : st_glsl_to_tgsi handles UBO

2011-12-25 Thread Vincent Lejeune
--- src/mesa/state_tracker/st_atom_constbuf.c |8 + src/mesa/state_tracker/st_extensions.c | 10 +- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 383 3 files changed, 350 insertions(+), 51 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c

[Mesa-dev] [PATCH 16/17] mesa: add Uniform Buffer Object API implementation

2011-12-25 Thread Vincent Lejeune
v2:Move implementation to ubo.cpp and ubo.h as suggested by Brian Paul --- src/mesa/main/api_exec.c |2 + src/mesa/main/bufferobj.c| 11 + src/mesa/main/ubo.cpp| 369 ++ src/mesa/main/ubo.h

[Mesa-dev] [PATCH 15/17] mesa: context carries UBO binding points

2011-12-25 Thread Vincent Lejeune
A binding point is an uint that is referred by BindBuffer* and UniformBlockBinding API function. A UBO in shader will fetch data in the buffer that holds the same binding point. Note that this patch should be reworked : it currently uses a static array to hold binding points, and does not take car

[Mesa-dev] [PATCH 14/17] mesa: Free new structures stored in shader/program at exit

2011-12-25 Thread Vincent Lejeune
--- src/mesa/main/shaderobj.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 454007f..8a2e159 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -110,6 +110,7 @@ _mes

[Mesa-dev] [PATCH 13/17] mesa: Update program_parameter_list to hold number of UBO

2011-12-25 Thread Vincent Lejeune
--- src/mesa/program/ir_to_mesa.cpp |2 ++ src/mesa/program/prog_parameter.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index a5f8eea..e873d3d 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/sr

[Mesa-dev] [PATCH 12/17] glsl: Linker sets indexed uniform

2011-12-25 Thread Vincent Lejeune
GL_ARB_uniform_buffer_object API uses index as a way to query information about classic uniform and variables in UBOs. For classic uniform, index does not have to match uniform location, but it is not forbidden and is simpler to implement. Linker generates an array that stores in index order varia

[Mesa-dev] [PATCH 11/17] glsl: Linker generates std140 layout

2011-12-25 Thread Vincent Lejeune
UBO data can be packed using 3 different strategies : packed, shader and std140. The spec defines in a non ambigous way the std140 strategy, this patch implements it. --- src/glsl/linker.cpp | 121 +++ 1 files changed, 121 insertions(+), 0 deletion

[Mesa-dev] [PATCH 10/17] glsl: Linker merges UBO from shaders from different stage into program-scope UBO.

2011-12-25 Thread Vincent Lejeune
--- src/glsl/linker.cpp| 98 src/mesa/main/mtypes.h |9 2 files changed, 107 insertions(+), 0 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 5ae928d..0c8a2c2 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/

[Mesa-dev] [PATCH 09/17] glsl: Add a gl_variable_storage* tree type to hold storage information on UBO variables.

2011-12-25 Thread Vincent Lejeune
GL_ARB_uniform_buffer_object spec defines standard layout rules to define how data are packed in a uniform buffer object, using offset and stride. A single ir_variable::location is not enough to hold every possible case and thus we defined a new type whose structure mirror the one of associated g

[Mesa-dev] [PATCH 08/17] glsl: Linker merges UBO from different shaders at intrastage step

2011-12-25 Thread Vincent Lejeune
This patch makes the linker checks UBO from several shader compatibility, and merges them if necessary, at intrastage step. --- src/glsl/linker.cpp | 79 +++ 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/src/glsl/linker.cpp b/src

[Mesa-dev] [PATCH 07/17] glsl: Parser support for GL_ARB_uniform_buffer_object

2011-12-25 Thread Vincent Lejeune
This patch brings 2 new structures: - gl_shader_ubo_variable which holds name and type of a variable inside an ubo - gl_uniform_buffer_object which holds UBO wide and variable informations in the form of a gl_shader_ubo_variable array. This patch also updates parser front-end to fill these structu

[Mesa-dev] [PATCH 06/17] glsl: Add barriers preventing variable in UBO to be linked like classic uniform

2011-12-25 Thread Vincent Lejeune
--- src/glsl/link_uniforms.cpp |2 +- src/glsl/linker.cpp |3 ++- src/mesa/program/ir_to_mesa.cpp |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index c7de480..bacf2e9 100644 --- a/src/glsl/

[Mesa-dev] [PATCH 05/17] glsl: Add a is_ubo_variable bit to ir_variable class

2011-12-25 Thread Vincent Lejeune
A variable in a UBO is basically an uniform, and optimisation pass should sees them as such. ir_variable::mode for variable in an uniform is thus set to ir_var_uniform. However it is good to be able to quickly discriminate classic uniform vs variable in an UBO so another flag is added to ir_vari

[Mesa-dev] [PATCH 04/17] glsl: Parser handles "#extension GL_ARB_uniform_buffer_object"

2011-12-25 Thread Vincent Lejeune
--- src/glsl/glsl_parser_extras.cpp |1 + src/glsl/glsl_parser_extras.h |2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 0b4ccac..71b4c5c 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/gl

[Mesa-dev] [PATCH 03/17] mesa: Add FEATURE_ARB_uniform_buffer_object define

2011-12-25 Thread Vincent Lejeune
--- src/mesa/main/mfeatures.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index 33db508..f8f9091 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -118,6 +118,7 @@ #define FEATURE_ARB_shader

[Mesa-dev] [PATCH 01/17] glapi: Add Uniform Buffer Object API

2011-12-25 Thread Vincent Lejeune
v2: Fix a typo spotted by Eric Anholt. --- src/mapi/glapi/gen/ARB_uniform_buffer_object.xml | 116 ++ src/mapi/glapi/gen/Makefile |1 + src/mapi/glapi/gen/gl_API.xml|2 + 3 files changed, 119 insertions(+), 0 deletions(-) cr

[Mesa-dev] [RFC]UBO support update

2011-12-25 Thread Vincent Lejeune
Hi and merry chrismas everyone. I have updated my UBO patch set to follow some recommandations from ML. I splitted some patches (and for some of them, added a longer description). The last three ones needs a bit more polishing though, and there might be some leftover debug code or old comments tha

[Mesa-dev] [PATCH 4/4] ARB_Uniform_Buffer_Object: Draw several ubos test

2011-12-25 Thread Vincent Lejeune
--- tests/all.tests|1 + .../arb_uniform_buffer_object/CMakeLists.gl.txt|1 + .../draw_several_ubo_test.c| 291 3 files changed, 293 insertions(+), 0 deletions(-) create mode 100644 tests/spec/arb_unifor

[Mesa-dev] [PATCH 3/4] ARB_Uniform_Buffer_Object: Types test

2011-12-25 Thread Vincent Lejeune
--- tests/all.tests|1 + .../arb_uniform_buffer_object/CMakeLists.gl.txt|1 + tests/spec/arb_uniform_buffer_object/types.c | 168 3 files changed, 170 insertions(+), 0 deletions(-) create mode 100644 tests/spec/arb_unifor

[Mesa-dev] [PATCH 2/4] ARB_Uniform_Buffer_Object: Draw test

2011-12-25 Thread Vincent Lejeune
v2: add indirect addressing test --- tests/all.tests|1 + .../arb_uniform_buffer_object/CMakeLists.gl.txt|1 + tests/spec/arb_uniform_buffer_object/draw_test.c | 246 3 files changed, 248 insertions(+), 0 deletions(-) create

[Mesa-dev] [PATCH 1/4] ARB_Uniform_Buffer_Object: layout(std140) test

2011-12-25 Thread Vincent Lejeune
v2: better formating --- tests/all.tests|4 + tests/spec/CMakeLists.txt |1 + .../arb_uniform_buffer_object/CMakeLists.gl.txt| 17 ++ .../spec/arb_uniform_buffer_object/CMakeLists.txt |1 + .../arb_uniform_buffer_objec

Re: [Mesa-dev] vertex array regression

2011-12-25 Thread Marek Olšák
2011/12/20 Mathias Fröhlich : > Ok, back to topic, so have I understood right? You have fixed torcs not to use > the slow path anymore? Which old version is the one still having this issue? I did not fix Torcs. I think optimizing apps is useless if the same optimization can be done in Mesa too. >