[Mesa-dev] [PATCH 04/14] vbo: Remove VBO_SAVE_PRIM_WEAK from vbo_save_NotifyBegin calls.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Now looking at the implementation of vbo_save_NotifyBegin. The VBO_SAVE_PRIM_WEAK flag, delivered in the primitive mode argument to vbo_save_NotifyBegin, is not evaluated anymore. The two users of the mode argument are the primitive mode itself, where the VBO_SAVE_PRIM_WEAK

[Mesa-dev] [PATCH 03/14] vbo: Remove set but not used weak field from _mesa_prim.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich The only reader of the weak field in _mesa_prim is pretty console printing. By that, remove the weak field from _mesa_prim. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_cb_rasterpos.c | 1 - src/mesa/vbo/vbo.h | 3 +-- src/mesa/vbo/

[Mesa-dev] [PATCH 08/14] vbo: Move no_current_update out of _mesa_prim.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich The _mesa_prim::no_current_update flag should tell the compiled display list if the current attributes that are placed in the dlists vbo shall take a defined state past replay of a display list. Immediate mode draws compiled into display lists should set the current values.

[Mesa-dev] [PATCH 01/14] vbo: Remove unused vbo_save_fallback function.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save.c | 15 --- src/mesa/vbo/vbo_save.h | 1 - 2 files changed, 16 deletions(-) diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c index 73bc49a24b..7e77123ba8 100644 --- a/src/mesa/vbo/vbo_sa

[Mesa-dev] [PATCH 13/14] mesa/vbo: Move _vbo_draw_indirect -> _mesa_draw_indirect

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/common/driverfuncs.c | 4 +- src/mesa/main/draw.c | 74 +++ src/mesa/main/draw.h | 11 src/mesa/vbo/vbo.h| 10 src/mesa/vbo/vbo_co

[Mesa-dev] [PATCH 07/14] vbo: Remove the now unused VBO_SAVE_PRIM_WEAK define.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h index d00700166e..65293c93f0 100644 --- a/src/mesa/vbo/vbo_save.h +++ b/src/mesa/vbo/vbo_save.h @@ -137,7 +137,

[Mesa-dev] [PATCH 05/14] vbo: Test for VBO_SAVE_PRIM_WEAK in _mesa_prim::mode is false.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich When setting the _mesa_prim::mode field we always filter out all non OpenGL primitive mode bits. So this tested bit cannot be there anymore and the test evaluates to zero. The zero is removed with the next patch to ease review. Signed-off-by: Mathias Fröhlich --- src/mes

[Mesa-dev] [PATCH 10/14] vbo: Preserve vbo_save::no_current_update on primitive restart.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich With this change we preserve the no_current_update property when we observe a glPrimitiveRestart call. That means that we now also get the no_current_update optimization for display lists that are made out of indexed draws using primitive restart. Signed-off-by: Mathias Fr

[Mesa-dev] [PATCH 11/14] vbo: Pull the _mesa_set_draw_vao calls out of the if clauses.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich These calls are just the same in each if branch. So pull that before the if. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_array.c | 114 -- 1 file changed, 38 insertions(+), 76 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_

[Mesa-dev] [PATCH 09/14] vbo: Make no_current_update an argument to vbo_save_NotifyBegin.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of coding additional information into the primitive mode, make the only remaining flag there a direct argument to vbo_save_NotifyBegin. Signed-off-by: Mathias Fröhlich --- src/mesa/main/dlist.c | 2 +- src/mesa/vbo/vbo.h | 3 ++- src/mesa/vbo/vbo

[Mesa-dev] [PATCH 14/14] mesa: Collect all the draw functions in draw.{h, c}.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Some of these functions were distributed across different implementation and header files. Put them at a central place. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/common/meta.c | 1 + src/mesa/main/draw.c | 43 ++ src/mesa/main/dr

[Mesa-dev] [PATCH 12/14] mesa/vbo: Move src/mesa/vbo/vbo_exec_array.c -> src/mesa/main/draw.c

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich The array type draw is no longer directly dependent on the vbo module. Thus move array type draws into mesa/main/draw.c. Rename symbols starting with vbo_* to _mesa_* and apply some reindenting to make it consistent. Signed-off-by: Mathias Fröhlich --- src/mapi/glapi/gen

[Mesa-dev] [PATCH] egl: Fix eglentrypoint.h sort order.

2018-11-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Emil, There seems to be a failure with the latest patches you pushed. The patch fixes a failure with the sort order in egl symbols. please review! FYI, I observed that the latest series that you sent for review differs a lot in the individual patches. Kind of looks li

[Mesa-dev] [PATCH] mesa: Remove needless indirection in some draw functions.

2018-11-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Paul, There is plenty more cleanup opportunity. We can probably use a lot more from the generated glapi also for these draw functions. But for now what you requested in the last mail. please review thanks Mathias Signed-off-by: Mathias Fröhlich --- src/mesa/main/d

[Mesa-dev] [PATCH 01/10] mesa: Rename gl_vertex_array_object::_Enabled -> Enabled.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Mark the up to now derived bitfield value now as primary value by removing the underscore. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 20 ++-- src/mesa/main/arrayobj.h | 4 ++-- src/mesa/main/attrib.c | 4 ++

[Mesa-dev] [PATCH 10/10] mesa: Remove unneeded bitfield widths from the VAO.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich With the current VAO layout we do not need to make these fields a bitfield. We get a tight struct layout with this change for VAO attributes. Signed-off-by: Mathias Fröhlich --- src/mesa/main/mtypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 05/10] mesa: Work with bitmasks when en/dis-abling VAO arrays.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich For enabling or disabling VAO arrays it is now possible to change a set of arrays with a single call without the need to iterate the attributes. Make use of this technique in the vao module. Signed-off-by: Mathias Fröhlich --- src/mesa/main/varray.c | 38 ++

[Mesa-dev] [PATCH 02/10] mesa: Use the gl_vertex_array_object::Enabled bitfield.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of using gl_array_attributes::Enabled use the much more compact representation stored in gl_vertex_array_object::Enabled using the corresponding bits. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.c | 28 ++-- src/mesa/mai

[Mesa-dev] [PATCH 08/10] tnl: Use gl_array_attribute::_ElementSize.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of open coding the size computation, use the already available gl_array_attribute::_ElementSize value. Signed-off-by: Mathias Fröhlich --- src/mesa/tnl/t_split_copy.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/mesa/tnl/t_s

[Mesa-dev] [PATCH 00/10] Remove pading and cleanup the VAO.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, The present series takes again care of the struct layout of the VAO. My last spring changes here destroyed the past attempt to get a minimum size struct layout on these structs. And with this series the property is again established. A struct gl_vertex_attributes

[Mesa-dev] [PATCH 03/10] mesa: Use gl_vertex_array_object::Enabled for glGet.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of using gl_array_attributes::Enabled use the much more compact representation stored in gl_vertex_array_object::Enabled using the corresponding bits. Keep the glGet changes in a seperate patch at least for review. Signed-off-by: Mathias Fröhlich --- src/mesa/mai

[Mesa-dev] [PATCH 04/10] mesa: Remove gl_array_attributes::Enabled.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Now that all users go via the VAO Enabled bitfield, get rid of the Enabled boolean. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c| 14 -- src/mesa/main/mtypes.h | 1 - src/mesa/main/varray.c | 11 --- src/mesa/vbo/vbo_sav

[Mesa-dev] [PATCH 07/10] nouveau: Use gl_array_attribute::_ElementSize.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of open coding the size computation, use the already available gl_array_attribute::_ElementSize value. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/dr

[Mesa-dev] [PATCH 09/10] mesa: Factor out struct gl_vertex_format.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Factor out struct gl_vertex_format from array attributes. The data type is supposed to describe the type of a vertex element. At this current stage the data type is only used with the VAO, but actually is useful in various other places. Due to the bitfields being used, spec

[Mesa-dev] [PATCH 06/10] mesa: Unify glEdgeFlagPointer data type.

2018-11-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Use GL_UNSIGNED_BYTE as initialization data type for the edge flag vertex attribute array. The same datatype is used in the glEdgeFlagPointer function when setting the array pointer. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 2 +- 1 file changed, 1 i

[Mesa-dev] [PATCH 06/29] i965: Convert i965 to use CoordsReplaceBits.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_sf.c| 7 +-- src/mesa/drivers/dri/i965/brw_vs.c| 6 +- src/mesa/drivers/dri/i965/gen6_sf_state.c | 2 +- 3 files changed, 3 inserti

[Mesa-dev] [PATCH 14/29] radeon/r200: Use bitmask/ffs to iterate enabled lights

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces a loop that iterates all lights and test which of them is enabled by a loop only iterating over the bits set in the enabled bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/r200/r200_state.c | 40 ++-- src/mesa/driver

[Mesa-dev] [PATCH 11/29] mesa: Use bitmask/ffs to iterate enabled lights for building ff shader keys.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces a loop that iterates all lights and test which of them is enabled by a loop only iterating over the bits set in the enabled bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/main/ffvertex_prog.c | 28 +++- 1 file changed, 15 insertion

[Mesa-dev] [PATCH 02/29] swrast: Convert swrast to use CoordsReplaceBits.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/swrast/s_points.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 3163b04..8212850 100644

[Mesa-dev] [PATCH 00/29] Make more use of bitmasks

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, following a series with performance improvements for cpu/draw bound applications. This part makes more use of the bitmask/ffs technique for iterating a set of enabled items. The gains are not huge but they are noticable for some of my favourite workloads. Please r

[Mesa-dev] [PATCH 01/29] mesa: Add gl_point_attrib::CoordReplaceBits bitfield.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich The aim is to replace the CoordReplace array by a bitfield. Until all drivers are converted, establish the bitfield in paralell to the CoordReplace array. Signed-off-by: Mathias Fröhlich --- src/mesa/main/attrib.c| 2 +- src/mesa/main/ffvertex_prog.c | 2 +- sr

[Mesa-dev] [PATCH 17/29] mesa: Use bitmask/ffs to build ff vertex shader keys.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. The bitmask used here for iteration is a combination of different enabled masks present for texture units. Signed-off-by: Mathias Fröhlich --- src/mesa/main/ffve

[Mesa-dev] [PATCH 12/29] tnl: Use bitmask/ffs to iterate enabled lights

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces loops that iterate all lights and test which of them is enabled by a loop only iterating over the bits set in the enabled bitmask. --- src/mesa/tnl/t_vb_light.c| 2 +- src/mesa/tnl/t_vb_lighttmp.h | 27 --- 2 files changed, 21 insertio

[Mesa-dev] [PATCH 09/29] mesa: Track enabled lights in a bitmask

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich This enables some optimizations afterwards. Signed-off-by: Mathias Fröhlich --- src/mesa/main/enable.c | 2 ++ src/mesa/main/light.c | 1 + src/mesa/main/mtypes.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c inde

[Mesa-dev] [PATCH 10/29] mesa: Use bitmask/ffs to iterate enabled lights

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces loops that iterate all lights and test which of them is enabled by a loop only iterating over the bits set in the enabled bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/main/light.c | 55 ++--- src/mesa/main/r

[Mesa-dev] [PATCH 13/29] nouveau: Use bitmask/ffs to iterate enabled lights

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces a loop that iterates all lights and test which of them is enabled by a loop only iterating over the bits set in the enabled bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/nouveau/nouveau_state.c | 10 + src/mesa/drivers/dri/nouveau/nv

[Mesa-dev] [PATCH 05/29] i915: Convert i915 to use CoordsReplaceBits.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i915/i915_state.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/

[Mesa-dev] [PATCH 08/29] mesa: Rename CoordReplaceBits back to CoordReplace.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich It used to be called like that and fits better with 80 columns. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i965/brw_sf.c | 2 +- src/mesa/drivers/dri/i965/brw_vs.c | 2 +- src/mesa/dri

[Mesa-dev] [PATCH 15/29] mesa: Switch to bitmask based enabled lights in gen_matypes.c

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/x86/gen_matypes.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c index 18ffb72..fc06dc7 100644 --- a/src/mesa/x86/gen_matypes.c +++ b/src/mesa/x86/

[Mesa-dev] [PATCH 03/29] gallium: Convert the state_tracker to use CoordsReplaceBits.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_rasterizer.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tra

[Mesa-dev] [PATCH 16/29] mesa: Remove the linked list of enabled lights

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Clean up after conversion to bitmasks. Signed-off-by: Mathias Fröhlich --- src/mesa/main/context.c | 11 +-- src/mesa/main/enable.c | 4 src/mesa/main/light.c | 4 src/mesa/main/mtypes.h | 4 4 files changed, 1 insertion(+), 22 deletions(-)

[Mesa-dev] [PATCH 07/29] mesa: Remove the now unused CoordsReplace array.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Now that all users are converted, remove the array. Signed-off-by: Mathias Fröhlich --- src/mesa/main/mtypes.h | 1 - src/mesa/main/points.c | 5 - src/mesa/main/texenv.c | 2 -- 3 files changed, 8 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mty

[Mesa-dev] [PATCH 04/29] r200: convert r200 to use CoordsReplaceBits.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/r200/r200_state.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r20

[Mesa-dev] [PATCH 18/29] mesa: Use bitmask/ffs to build ff fragment shader keys.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. The bitmask used here for iteration is a combination of different enabled masks present for texture units. Signed-off-by: Mathias Fröhlich --- src/mesa/main/ff_f

[Mesa-dev] [PATCH 19/29] mesa: Use bitmask/ffs to iterate color material attributes.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/main/light.c | 12 +++- src/mesa/tnl/t_vb_light.c | 11 +++ 2 files changed, 14 insertions(+), 9

[Mesa-dev] [PATCH 20/29] mesa: Use bitmask/ffs to iterate enabled clip planes.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/common/meta.c | 23 +++ src/mesa/main/matrix.c | 19 ++-- src/mesa/main/rastpos.

[Mesa-dev] [PATCH 22/29] i965: Use bitmask/ffs to iterate enabled clip planes.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_curbe.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --g

[Mesa-dev] [PATCH 24/29] mesa: Use bitmask/ffs to iterate SamplersUsed

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/main/uniforms.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-)

[Mesa-dev] [PATCH 21/29] radeon/r200: Use bitmask/ffs to iterate enabled clip planes.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/r200/r200_state.c | 24 src/mesa/drivers/dri/radeon/radeon_state.c | 24 +++

[Mesa-dev] [PATCH 28/29] vbo: Use a bitmask to track the active arrays in vbo_exec*.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich The use of a bitmask makes functions iterating only active attributes less visible in profiles. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec.h | 1 + src/mesa/vbo/vbo_exec_api.c | 149 +++ src/mesa/vbo/vbo_exec

[Mesa-dev] [PATCH 27/29] mesa: Use bitmask/ffs to iterate the active_samplers bitmask.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/main/uniform_query.cpp | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/uni

[Mesa-dev] [PATCH 25/29] mesa: Use designated bool value to check texture unit completeness.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich The change helps to use the bitmask/ffs in the next change. Signed-off-by: Mathias Fröhlich --- src/mesa/main/texstate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 9ee5c69..3543369 100

[Mesa-dev] [PATCH 23/29] i965: Use bitmask/ffs to iterate used vertex attributes.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_draw.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/

[Mesa-dev] [PATCH 26/29] mesa: Use bitmask/ffs to iterate the enabled textures.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. Signed-off-by: Mathias Fröhlich --- src/mesa/main/texstate.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git

[Mesa-dev] [PATCH 29/29] vbo: Use a bitmask to track the active arrays in vbo_save*.

2016-05-23 Thread Mathias . Froehlich
From: Mathias Fröhlich The use of a bitmask makes functions iterating only active attributes less visible in profiles. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save.h | 2 ++ src/mesa/vbo/vbo_save_api.c | 70 ++-- src/mesa/vbo/vbo_save

[Mesa-dev] [PATCH 3/3] vbo: Make sure the internal VAO's stay within limits.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_draw.c | 5 - src/mesa/vbo/vbo_save_api.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 026b7be129..31d7700225 100644 -

[Mesa-dev] [PATCH 1/3] mesa: When copying a VAO also copy the vertex attribute mode.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/attrib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 9d3aa728a1..9c632ffb51 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1515,6 +1515,7

[Mesa-dev] [PATCH 0/3] A fix and some asserts around the VAO changes.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Following one fix and a set of asserts in the VAO area. The changes already passed intels CI system. Please review Thanks and best Mathias Mathias Fröhlich (3): mesa: When copying a VAO also copy the vertex attribute mode. mesa: Flag early if we modify a SharedAn

[Mesa-dev] [PATCH 2/3] mesa: Flag early if we modify a SharedAndImmutable VAO.

2018-03-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/varray.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 69a08a646f..5df38a14f0 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -162,6 +16

[Mesa-dev] [PATCH 5/8] vbo: Remove the now unused vbo draw path.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/main/state.c | 12 ++--- src/mesa/vbo/vbo.h| 20 --- src/mesa/vbo/vbo_context.c| 47

[Mesa-dev] [PATCH 6/8] vbo: Readd the arrays argument to the legacy draw methods.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich The legacy draw paths from back before 2012 contained a gl_vertex_array array for the inputs to be used for draw. So all draw methods from legacy drivers and evereything that goes through tnl are originally written for this calling convention. The same goes for tools like t

[Mesa-dev] [PATCH 7/8] vbo: Move vbo_split into the tnl module.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Move the files, adapt to the naming scheme in tnl, update callers and build system. Signed-off-by: Mathias Fröhlich --- src/mesa/Makefile.sources | 10 +-- src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c | 4 +- src/mesa/meson.build

[Mesa-dev] [PATCH 1/8] gallium: Push down the gl_vertex_array inputs into gallium.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Let the gallium backend have its own gl_vertex_array array and basically reimplement the way _vbo_draw works. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_cb_feedback.c | 35 ++--- src/mesa/state_tracker/st_context.c | 9

[Mesa-dev] [PATCH 8/8] vbo: Remove unused includes to vbo_private.h

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_array.c| 2 -- src/mesa/vbo/vbo_primitive_restart.c | 1 - 2 files changed, 3 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 51fd434dc4..b3ce138a09 100644 ---

[Mesa-dev] [PATCH 4/8] tnl: Push down the gl_vertex_array inputs into tnl drivers.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i915/intel_context.c | 1 + src/mesa/drivers/dri/i965/brw_draw.c | 4 +-- src/mesa/drivers/dri/nouveau/nouveau_context.c | 1 + src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c | 21 - sr

[Mesa-dev] [PATCH 3/8] vbo: Remove vbo_indirect_draw_func.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Remove the vbo_indirect_draw_func vbo callback and make the default implementation use the drivers main draw callback function directly. This will be needed with the next changes when drivers without own main drivers DrawIndirect implementation get moved to the main drivers

[Mesa-dev] [PATCH 2/8] i965: Push down the gl_vertex_array inputs into i965.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Let the i965 backend have its own gl_vertex_array array and basically reimplement the way _vbo_draw works. Note that brw_draw_indirect_prims calls brw_draw_prims internally and gets its update to Array._DrawArray by this way. Signed-off-by: Mathias Fröhlich --- src/mesa/

[Mesa-dev] [PATCH 0/8] Push down gl_vertex_array into drivers.

2018-03-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, This series pushes the inputs array down into the driver backends. Also the draw code paths get cleaned up to use the higher level function entry points from the driver functions struct. And finally vbo_split* can now be moved into the tnl module. This step is meant o

[Mesa-dev] [PATCH] vbo: Use alloca for _vbo_draw_indirect.

2018-03-28 Thread Mathias . Froehlich
From: Mathias Fröhlich Marek, you mean with the below patch as the 9-th change in the series? I would like to keep that change seprarate from #3 since patch #3 just moves the already existing impelentation to the driver_functions level using the exactly identical implementation except calling i

[Mesa-dev] [PATCH 04/11] gallium: Use Array._DrawVAO in st_atom_array.c.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Finally make use of the binding information in the VAO when setting up arrays for draw. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_array.c | 448 + 1 file changed, 124 insertions(+), 324 deletions(-) diff --git a/s

[Mesa-dev] [PATCH 00/11] Use binding information from DrawVAO.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, We are getting there somehow. The series builds up unique binding information internal to a VAO. This shall help drivers to get as few buffer objects as possible. The first patch implements building up this unique binding information. Then there is a bunch of gal

[Mesa-dev] [PATCH 08/11] i965: Remove the gl_vertex_array indirection.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich For now store binding and attrib in brw_vertex_element. The i965 driver still provides lots of opportunity to make use of the unique binding information in the VAO which is currently not taken from the VAO. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH 03/11] gallium: Make the input_to_index array available.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich The input_to_index array is already available internally when preparing vertex programs. Store the map in struct st_vertex_program. Also store the bitmask of mesa vertex processing inputs in struct st_vp_variant. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker

[Mesa-dev] [PATCH 06/11] gallium: Remove the now unused gl_vertex_array.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Was meant to be temporary in gallium. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_cb_feedback.c | 32 ++-- src/mesa/state_tracker/st_context.c | 3 --- src/mesa/state_tracker/st_context.h | 3 --- src/mesa/state_tra

[Mesa-dev] [PATCH 09/11] i965: Remove the now unused gl_vertex_array.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Was meant to be temporary in i965. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_context.h | 4 src/mesa/drivers/dri/i965/brw_draw.c| 7 --- 2 files changed, 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mes

[Mesa-dev] [PATCH 05/11] gallium: Make feedback draw and rasterpos use _DrawVAO.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of playing with Array._DrawArrays, make the feedback draw path use Array._DrawVAO. Also st_RasterPos needs to use the VAO then. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_cb_rasterpos.c | 38 -- src/mesa/state_track

[Mesa-dev] [PATCH 11/11] mesa/vbo/tnl: Move gl_vertex_array related stuff to tnl.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich The only remaining users of gl_vertex_array are tnl based drivers. So move everything related to that into tnl and rename it accordingly. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c | 38 +-- src/mesa/main/mtypes.h

[Mesa-dev] [PATCH 02/11] gallium: Use _DrawVAO for edgeflag enabled check.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index 45a45960a3..df1a94e831 100644 --- a/src/mesa/stat

[Mesa-dev] [PATCH 10/11] mesa: Remove Array._DrawArrays.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Only tnl based drivers still use this array. So remove it from core mesa and use Array._DrawVAO instead. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c | 4 ++-- src/mesa/main/arrayobj.c | 1 - src/mesa/main/attrib.

[Mesa-dev] [PATCH 01/11] mesa: Compute effective buffer bindings in the vao.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Compute VAO buffer binding information past the position/generic0 mapping. Also scan for duplicate buffer bindings and collapse them into derived effective buffer binding index and effective attribute mask variables. Also provide a set of helper functions to access the dist

[Mesa-dev] [PATCH 07/11] i965: Implement all_varyings_in_vbos in terms of Array._DrawVAO.

2018-04-01 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_draw.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 4caaadd560..8ee2535971 100644

[Mesa-dev] [PATCH] egl: Make EGL_EXT_device_drm optional.

2019-06-28 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Ilia mentioned that there are drm rendernode only drivers out there. To support an egl device on those platforms, make the EGL_EXT_device_drm device extension optional. Please review best and thanks Mathias Relax drm device requirement to just have a render node t

[Mesa-dev] [PATCH 02/10] mesa: Use glVertexAttrib*NV functions for fixed function attribs.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich In the glArrayElement implementation, use glVertexAttrib*NV type functions for fixed function attributes. We do the same in display execution when the list is replayed using immediate mode attribute functions. By that use a loop to walk the attributes. Signed-off-by: Mathi

[Mesa-dev] [PATCH 00/10] Get rid of _NEW_ARRAY finally.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, This is the second part of the _NEW_ARRAY mesa state bit removal. The code basically unifies the _mesa_array_element implementation by using a cheap to compute vertex attribute setter selection together with the bitmask iteration trick. Once this is in place we can rem

[Mesa-dev] [PATCH 05/10] mesa: Remove the now unused _NEW_ARRAY state change flag.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Is no longer used, so we have less occasions where NewState is non zero. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_state_upload.c | 1 - src/mesa/main/arrayobj.c | 1 - src/mesa/main/attrib.c | 1 - src

[Mesa-dev] [PATCH 10/10] mesa: Leave aliasing of vertex and generic0 attribute to the dlist code.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Now that dlist compilation again knows if it is inside glBegin/glEnd, we can leave the decision if aliasing should occur to the vertex attribute setter functions instead of doing that at glArrayElement time. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.

[Mesa-dev] [PATCH 01/10] mesa: Factor out index function that will have multiple use.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich For access to glArrayElement methods factor out a function to get the table lookup index for normalized/integer/double access. The function will be used in the next patch at least twice. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.c | 29 ++

[Mesa-dev] [PATCH 09/10] mesa: Correct the is_vertex_position decision for dlists.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich We have to use _mesa_inside_dlist_begin_end instead of _mesa_inside_begin_end to see if we are inside a glBegin/glEnd block in case of display lists. So split the is_vertex_position function used in vertex attribute processing into a imm and dlist variant and use the approp

[Mesa-dev] [PATCH 06/10] mesa: Constify static const array in api_arrayelt.c

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 6d4e548e7bd..48b2d9b2357 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/

[Mesa-dev] [PATCH 08/10] mesa: Set CurrentSavePrimitive in vbo_save_NotifyBegin.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich That seems to be lost somewhere. Is needed for correct outside begin/end detection in display list compilation. And is needed for correct aliasing in dlists restablished in the next changes. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save_api.c | 2 ++ 1 file c

[Mesa-dev] [PATCH 07/10] mesa: Remove the _glapi_table argument from _mesa_array_element.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich The value is now unused. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.c | 8 +++- src/mesa/main/api_arrayelt.h | 3 +-- src/mesa/vbo/vbo_save_api.c | 17 +++-- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/mesa/

[Mesa-dev] [PATCH 03/10] mesa: Implement _mesa_array_element by walking enabled arrays.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich In glArrayElement, use the bitmask trick to just walk the enabled vao arrays. This should be about equivalent in execution time to walk the prepare aelt_context list. Finally this will allow us to reduce the _mesa_update_state calls in a few patches. Signed-off-by: Mathias

[Mesa-dev] [PATCH 04/10] mesa: Rip out now unused gl_context::aelt_context.

2019-05-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Now this part of gl_context state is unused and can be removed. Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/r200/r200_context.c | 1 - src/mesa/drivers/dri/radeon/radeon_context.c | 1 - src/mesa/main/api_arrayelt.c | 180

[Mesa-dev] [PATCH 1/6] mesa/vbo: Update Comment to what is actually happening.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_draw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 87652d659d0..fd55a5bbee6 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++

[Mesa-dev] [PATCH 5/6] mesa: Avoid setting _NEW_VARYING_VP_INPUTS in non fixed function mode.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of checking the API variant on entry of set_varying_vp_inputs to check if we can ever be interrested in fixed function processing or not, we can check if we are actually fixed function processing. To check this we can use the immediately updated gl_context::VertexPr

[Mesa-dev] [PATCH 3/6] mesa: Make _mesa_set_varying_vp_inputs static in state.c.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich Is no longer used outside that file. Signed-off-by: Mathias Fröhlich --- src/mesa/main/state.c | 7 +++ src/mesa/main/state.h | 4 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 097cd9e20d2..217

[Mesa-dev] [PATCH 0/6] Update mesa state handling past VAO changes.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, The series is a collection of comment updates and state handling cleanup past the VAO changes that went into mesa. There are two fixes for potential bugs in state handling included. There were no reports accoring that, and it does not change the outcome of intels

[Mesa-dev] [PATCH 4/6] mesa: Fix test for setting the _NEW_VARYING_VP_INPUTS flag.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich The precondition stated in the comment is not true. The values mentioned are only set from _mesa_update_state which in turn may not yet be called. For now set the _NEW_VARYING_VP_INPUTS flag a bit more often, we will narrow that down to a minimum again in a later patch. Si

[Mesa-dev] [PATCH 6/6] mesa: Set _NEW_VARYING_VP_INPUTS iff varying_vp_inputs are set.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/state.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 9d8964952cd..3e2eb28dcc5 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/

[Mesa-dev] [PATCH 2/6] mesa: Fix old outdated variable name in a comment.

2019-05-12 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h index 589c6650add..92c0661d4ee 100644 --- a/src/mesa/main/state.h +++ b/src/mesa/main/state.h @@ -47

<    1   2   3   4   5   >