[Mesa-dev] [PATCH] util: Use win32 intrinsics for util_last_bit if present.

2016-08-09 Thread Mathias . Froehlich
From: Mathias Fröhlich v2: Split into two patches. v3: Fix off by one problem. Signed-off-by: Mathias Fröhlich --- src/util/bitscan.h | 12 1 file changed, 12 insertions(+) diff --git a/src/util/bitscan.h b/src/util/bitscan.h index 0743fe7..8afef81 100644 --- a/src/util/bitscan.h

[Mesa-dev] [PATCH 0/5] Move check for mapped buffers into api_validate.

2016-08-14 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, This series moves the call to check for mapped vertex buffer objects on draw from the vbo code into api_validate.c. There we already check for various conditions to validate the current draw call. Some cleanups in that area are included. Please review! Thanks Mat

[Mesa-dev] [PATCH 1/5] vbo: Array draw must not care about glBegin/glEnd vbo mapping.

2016-08-14 Thread Mathias . Froehlich
From: Mathias Fröhlich In array draw do not check if the vertex buffer object that is used to implement immediate mode glBegin/glEnd is mapped. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec_array.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git

[Mesa-dev] [PATCH 4/5] vbo: Remove allways true return from vbo_bind_arrays.

2016-08-14 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo.h| 2 +- src/mesa/vbo/vbo_exec_array.c | 36 +++- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index 939a3a6..7347

[Mesa-dev] [PATCH 3/5] mesa: Move check for vbo mapping into api_validate.c.

2016-08-14 Thread Mathias . Froehlich
From: Mathias Fröhlich Instead of checking for mapped buffers in vbo_bind_arrays do this check in api_validate.c. This additionally enables printing the draw calls name into the error string. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_validate.c | 7 +++ src/mesa/vbo/vbo_exec_a

[Mesa-dev] [PATCH 5/5] mesa: Remove duplicate include.

2016-08-14 Thread Mathias . Froehlich
From: Mathias Fröhlich In api_validate.c stdbool.h was included twice. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_validate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index ae3e118..384a8858 100644 --- a/src/mesa/m

[Mesa-dev] [PATCH 2/5] mesa: Move _mesa_all_buffers_are_unmapped to arrayobj.c.

2016-08-14 Thread Mathias . Froehlich
From: Mathias Fröhlich Move the function to check if all vao buffers are unmapped into the vao implementation file. Rename the function to _mesa_all_buffers_are_unmapped. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 28 src/mesa/main/arrayobj

[Mesa-dev] [PATCH] vbo: Correctly handle attribute offsets in dlist draw.

2016-08-18 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, I found the below while fixing a similar problem lately in the immediate mode glBegin/glEnd code path. Please review Thanks Mathias When executing a display list draw with a shader program using the generic0 attribute the offset computation may get out of sync. To

[Mesa-dev] [PATCH] vbo: Correctly handle attribute offsets in dlist draw.

2016-08-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, kind of a ping with a rephrased commit message and the style change. Please review. Thanks! Mathias When executing a display list draw, for the offset list to be correct, the offset computation needs to accumulate all attribute size values in order. Specificall

[Mesa-dev] [PATCH] osmesa: Export OSMesaCreateContextAttribs.

2016-07-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Since the function is exported like any other public api fucnntion and put in the header as if you could link against it export it also from shared objects. Please review! Thanks! Mathias --- src/gallium/targets/osmesa/osmesa.def | 1 + src/gallium/targets/os

[Mesa-dev] [PATCH 03/11] mesa: Implement _mesa_all_varyings_in_vbos.

2016-07-26 Thread Mathias . Froehlich
From: Mathias Fröhlich Implement the equivalent of vbo_all_varyings_in_vbos for vertex array objects. v2: Update comment. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 35 +++ src/mesa/main/arrayobj.h | 4 2 files changed, 39 insertions(+

[Mesa-dev] [PATCH] mesa: Copy bitmask of VBOs in the VAO on gl{Push, Pop}Attrib.

2016-08-04 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, The below was found by inspection. Please review. Thanks Mathias On gl{Push,Pop}Attrib(GL_CLIENT_VERTEX_ARRAY_BIT) take care that gl_vertex_array_object::VertexAttribBufferMask matches the bound buffer object in the gl_vertex_array_object::VertexBinding array.

[Mesa-dev] [PATCH] util: Move _mesa_fsl/util_last_bit into util/bitscan.h

2016-08-04 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, As requested with the initial creation of util/bitscan.h now move other bitscan related functions into util. Make use of win32 intrinsics for util_last_bit/fls if present. Signed-off-by: Mathias Fröhlich Any testing especially on win32 is apprechiated. Pleas

[Mesa-dev] [PATCH 1/3] util: Move _mesa_fsl/util_last_bit into util/bitscan.h v2

2016-08-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Following the split up patch as a series and on top the include fix to u_bitscan.h. Please review! Thanks! Mathias As requested with the initial creation of util/bitscan.h now move other bitscan related functions into util. v2: Split into two patches. Signed-off-by:

[Mesa-dev] [PATCH 2/3] util: Use win32 intrinsics for util_last_bit if present.

2016-08-05 Thread Mathias . Froehlich
From: Mathias Fröhlich v2: Split into two patches. Signed-off-by: Mathias Fröhlich --- src/util/bitscan.h | 12 1 file changed, 12 insertions(+) diff --git a/src/util/bitscan.h b/src/util/bitscan.h index 0743fe7..a5bb34e 100644 --- a/src/util/bitscan.h +++ b/src/util/bitscan.h @@

[Mesa-dev] [PATCH 3/3] gallium: Add c99_compat.h to u_bitcast.h

2016-08-05 Thread Mathias . Froehlich
From: Mathias Fröhlich We need this for 'inline'. Signed-off-by: Mathias Fröhlich --- src/gallium/auxiliary/util/u_bitcast.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/util/u_bitcast.h b/src/gallium/auxiliary/util/u_bitcast.h index b1f9938..e8fb0fe 100644 ---

[Mesa-dev] [PATCH] st/mesa: Reduce array updates due to current changes.

2019-02-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, Following a small optimization in the gallium state tracker to avoid flagging ST_NEW_VERTEX_ARRAYS a bit more often: please review! best Mathias Since using bitmasks we can easily check if we have any current value that is potentially uploaded on array set

[Mesa-dev] [PATCH 2/2] st/mesa: Invalidate the gallium array atom only if needed.

2019-02-28 Thread Mathias . Froehlich
From: Mathias Fröhlich Now that the buffer object usage history tracks if it is being used as vertex buffer object, we can restrict setting the ST_NEW_VERTEX_ARRAYS bit to dirty on glBufferData calls to buffers that are potentially used as vertex buffer object. Also put a note that the same could

[Mesa-dev] [PATCH 1/2] mesa: Track buffer object use also for VAO usage.

2019-02-28 Thread Mathias . Froehlich
From: Mathias Fröhlich We already track the usage history for buffer objects in a lot of aspects. Add GL_ARRAY_BUFFER and GL_ELEMENT_ARRAY_BUFFER to gl_buffer_object::UsageHistory. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 4 +++- src/mesa/main/bufferobj.c | 5 + src/

[Mesa-dev] [PATCH 0/2] Track vertex buffer usage for buffer objects.

2019-02-28 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, I have an other VAO optimization aspect for review. Currently gallium just invalidates the array state on every glBufferData type call. The change adds buffer object usage tracking for vertex buffer objects and avoids invalidating array state on for example unifo

[Mesa-dev] [PATCH 3/8] mesa: Use _mesa_array_element in dlist save.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Make use of the newly factored out _mesa_array_element function in display list compilation. For now that duplicates out the primitive restart logic. But that turns out to need a fix in display list handling anyhow. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_sa

[Mesa-dev] [PATCH 8/8] vbo: Fix GL_PRIMITIVE_RESTART_FIXED_INDEX in display list compiles.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich The maximum value primitive restart index is different for each index data type. Use the appropriate fixed restart index value. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save_api.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --gi

[Mesa-dev] [PATCH 4/8] mesa: Replace _ae_{, un}map_vbos with _mesa_vao_{, un}map_arrays

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Due to the use of bitmaps, the _mesa_vao_{,un}map_arrays functions should provide comparable runtime efficienty to the currently used _ae_{,un}map_vbos functions. So use this functions and enable further cleanup. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arra

[Mesa-dev] [PATCH 2/8] mesa: Factor out _mesa_array_element.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich The factored out function handles emitting the vertex attributes at the given index. The now public accessible function gets used in the following patches. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.c | 49 ++-- src/mes

[Mesa-dev] [PATCH 6/8] mesa: Use mapping tools in debug prints.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/draw.c | 57 ++-- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index bfc4b9c9373..fa70463eaee 100644 --- a/src/mesa/mai

[Mesa-dev] [PATCH 1/8] mesa: Implement helper functions to map and unmap a VAO.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Provide a set of functions that maps or unmaps all VBOs held in a VAO. The functions will be used in the following patches. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 84 src/mesa/main/arrayobj.h | 18 +

[Mesa-dev] [PATCH 5/8] mesa: Remove _ae_{, un}map_vbos and dependencies.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Since mapping and unmapping the buffer objects in a VAO is handled directly from the VAO, this part of the _NEW_ARRAY state is no longer used. So remove this part of array element state. Signed-off-by: Mathias Fröhlich --- src/mesa/main/api_arrayelt.c | 95 --

[Mesa-dev] [PATCH 7/8] vbo: Fix basevertex handling in display list compiles.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich The standard requires that the primitive restart comparison happens before the basevertex value is added. Do this now, drop a reference to the standard why this happens at this place. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save_api.c | 17 -

[Mesa-dev] [PATCH 0/8] Half way to remove _NEW_ARRAY.

2019-03-05 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, The following series introduces functions to map and unmap all vbos stored in a vao. Make use of those functions where possible. On that way cleanup and fix what comes up along the way. The series also already removes half of the state that is tracked using the _NE

[Mesa-dev] [PATCH 1/9] mesa: Implement helper functions to map and unmap a VAO.

2019-03-14 Thread Mathias . Froehlich
From: Mathias Fröhlich Brian, For reference the v2 with the updated comments. Thanks and best Mathias Provide a set of functions that maps or unmaps all VBOs held in a VAO. The functions will be used in the following patches. v2: Update comments. Signed-off-by: Mathias Fröhlich --- src/me

[Mesa-dev] [PATCH 9/9] mesa: Add assert to _mesa_primitive_restart_index.

2019-03-14 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Brian, You mean an assert like this? This patch also made it together with the rest of the series through intels CI. best Mathias Make sure the inde_size parameter is meant to be in bytes. Signed-off-by: Mathias Fröhlich --- src/mesa/main/varray.h | 3 +++ 1 f

[Mesa-dev] [PATCH 3/4] mesa: Handle clip control in meta operations.

2014-10-21 Thread Mathias . Froehlich
From: Mathias Fröhlich Restore clip control to the default state if MESA_META_VIEWPORT or MESA_META_DEPTH_TEST is requested. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/common/meta.c | 13 + src/mesa/drivers/common/meta.h | 4 2 files changed, 17 insertions

[Mesa-dev] [PATCH 0/4] Implement clip control

2014-10-21 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The next approach to bring decent depth buffer precision to mesa. The patch series implements ARB_clip_control in mesa and enables the extension for the gallium drivers. Please review. Greetings Mathias Mathias Fröhlich (4): mesa: Refactor viewport transform com

[Mesa-dev] [PATCH 2/4] mesa: Implement ARB_clip_control.

2014-10-21 Thread Mathias . Froehlich
From: Mathias Fröhlich Implement the mesa parts of ARB_clip_control. So far no driver enables this. Signed-off-by: Mathias Froehlich --- src/mapi/glapi/gen/ARB_clip_control.xml | 25 +++ src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/dlist.c | 26

[Mesa-dev] [PATCH 1/4] mesa: Refactor viewport transform computation.

2014-10-21 Thread Mathias . Froehlich
From: Mathias Fröhlich This is for preparation of ARB_clip_control. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/dri/i915/i915_state.c| 26 ++--- src/mesa/main/state.c | 9 +++--- src/mesa/main/viewport.c | 47

[Mesa-dev] [PATCH 4/4] gallium: Enable ARB_clip_control for gallium drivers.

2014-10-21 Thread Mathias . Froehlich
From: Mathias Fröhlich Gallium should be prepared fine for ARB_clip_control. So enable this and mention it in the release notes. Signed-off-by: Mathias Froehlich --- docs/GL3.txt| 2 +- docs/relnotes/10.4.html | 1 + src/mesa/state_tracker

[Mesa-dev] [PATCH 5/5] gallium: Enable ARB_clip_control for gallium drivers.

2014-10-22 Thread Mathias . Froehlich
From: Mathias Fröhlich Gallium should be prepared fine for ARB_clip_control. So enable this and mention it in the release notes. v2: Only enable for drivers announcing the freshly introduced PIPE_CAP_CLIP_HALFZ capability. Signed-off-by: Mathias Froehlich --- docs/GL3.txt

[Mesa-dev] [PATCH 2/5] mesa: Implement ARB_clip_control.

2014-10-22 Thread Mathias . Froehlich
From: Mathias Fröhlich Implement the mesa parts of ARB_clip_control. So far no driver enables this. Signed-off-by: Mathias Froehlich --- src/mapi/glapi/gen/ARB_clip_control.xml | 25 +++ src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/dlist.c | 26

[Mesa-dev] [PATCH 4/5] gallium: introduce PIPE_CAP_CLIP_HALFZ.

2014-10-22 Thread Mathias . Froehlich
From: Mathias Fröhlich In preparation of ARB_clip_control. Let the driver decide if it supports pipe_rasterizer_state::clip_halfz being set to true. Signed-off-by: Mathias Froehlich http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 3/5] mesa: Handle clip control in meta operations.

2014-10-22 Thread Mathias . Froehlich
From: Mathias Fröhlich Restore clip control to the default state if MESA_META_VIEWPORT or MESA_META_DEPTH_TEST is requested. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/common/meta.c | 13 + src/mesa/drivers/common/meta.h | 4 2 files changed, 17 insertions

[Mesa-dev] [PATCH 0/5] Implement clip control v2

2014-10-22 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The next approach to bring decent depth buffer precision to mesa. The patch series implements ARB_clip_control in mesa and enables the extension for the gallium drivers. v2: Only enable on those gallium drivers that already support clip_halfz. Please review. Greeti

[Mesa-dev] [PATCH 1/5] mesa: Refactor viewport transform computation.

2014-10-22 Thread Mathias . Froehlich
From: Mathias Fröhlich This is for preparation of ARB_clip_control. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/dri/i915/i915_state.c| 26 ++--- src/mesa/main/state.c | 9 +++--- src/mesa/main/viewport.c | 47

[Mesa-dev] [PATCH 1/5] mesa: Refactor viewport transform computation.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich This is for preparation of ARB_clip_control. v3: Add comments. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/dri/i915/i915_state.c| 26 ++-- src/mesa/main/state.c | 9 +++--- src/mesa/main/viewport.c | 52

[Mesa-dev] [PATCH 5/5] gallium: Enable ARB_clip_control for gallium drivers.

2014-10-24 Thread Mathias . Froehlich
with ARB_clip_control. Signed-off-by: Mathias Froehlich --- docs/GL3.txt| 2 +- docs/relnotes/10.4.html | 1 + src/mesa/state_tracker/st_atom_rasterizer.c | 14 +- src/mesa/state_tracker/st_extensions.c | 1 + 4 files changed

[Mesa-dev] [PATCH 0/5] Implement clip control v3

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The next approach to bring decent depth buffer precision to mesa. The patch series implements ARB_clip_control in mesa and enables the extension for the gallium drivers. v2: Only enable on those gallium drivers that already support clip_halfz. v3: Add more comments.

[Mesa-dev] [PATCH 4/5] gallium: introduce PIPE_CAP_CLIP_HALFZ.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich In preparation of ARB_clip_control. Let the driver decide if it supports pipe_rasterizer_state::clip_halfz being set to true. v3: Initially enable on ilo. Signed-off-by: Mathias Froehlich http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 2/5] mesa: Implement ARB_clip_control.

2014-10-24 Thread Mathias . Froehlich
state.c. Signed-off-by: Mathias Froehlich --- src/mapi/glapi/gen/ARB_clip_control.xml | 25 +++ src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/attrib.c | 1 + src/mesa/main/dlist.c | 26 +++ src/mesa/main/extensions.c

[Mesa-dev] [PATCH 3/5] mesa: Handle clip control in meta operations.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Restore clip control to the default state if MESA_META_VIEWPORT or MESA_META_DEPTH_TEST is requested. v3: Handle clip control state with MESA_META_TRANSFORM. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/common/meta.c | 6 ++ src/mesa/drivers/common/meta.h

[Mesa-dev] [PATCH] glx: Fix make check.

2014-10-24 Thread Mathias . Froehlich
From: Mathias Fröhlich Fixes the link failures with make check. Ok to commit? Signed-off-by: Mathias Froehlich CC: Ian Romanick --- src/glx/tests/indirect_api.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glx/tests/indirect_api.cpp b/src/glx/tests/indirect_api.cpp index

[Mesa-dev] [PATCH] mesa: Add ARB_clip_control.xml to automake.

2014-10-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Adding this makes 'make check' catch failures introduced from within ARB_clip_control.xml earlier. Ok to commit? Mathias Signed-off-by: Mathias Froehlich --- src/mapi/glapi/gen/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mapi

[Mesa-dev] [PATCH] mesa/gallium: Signal _NEW_TRANSFORM from glClipControl.

2014-10-25 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Marek, Did you have something like below in mind? Mathias This removes the need for the gallium rasterizer state to listen to viewport changes. Thanks to Marek Olšák . CC: Marek Olšák Signed-off-by: Mathias Froehlich --- src/mesa/main/viewport.c

[Mesa-dev] [PATCH] i965: Implement support for ARB_clip_control.

2015-03-30 Thread Mathias . Froehlich
-control-depth-precision tests on these two chipsets. Signed-off-by: Mathias Froehlich --- docs/GL3.txt | 2 +- docs/relnotes/10.6.0.html| 1 + src/mesa/drivers/dri/i965/brw_clip.c | 7 ++- src/mesa/drivers/dri/i965/brw_clip_state.c | 5

[Mesa-dev] [PATCH 4/4] mesa: Remove the _WindowMap from gl_viewport_attrib.

2015-03-30 Thread Mathias . Froehlich
From: Mathias Froehlich The _WindowMap can be dropped from gl_viewport_attrib now. Simplify gl_viewport_attrib handling where possible. Signed-off-by: Mathias Froehlich --- src/mesa/main/context.c | 12 ++-- src/mesa/main/mtypes.h | 1 - src/mesa/main/state.c| 25

[Mesa-dev] [PATCH 3/4] tnl: Maintain the _WindowMap matrix in TNLcontext.

2015-03-30 Thread Mathias . Froehlich
From: Mathias Froehlich This is the only real user of _WindowMap which has the depth buffer scaling multiplied in. Maintain the _WindowMap of the one and only viewport inside TNLcontext. Signed-off-by: Mathias Froehlich --- src/mesa/swrast_setup/ss_context.c | 5 +++-- src/mesa/tnl

[Mesa-dev] [PATCH 1/4] i965: Make use of _mesa_get_viewport_xform.

2015-03-30 Thread Mathias . Froehlich
From: Mathias Froehlich Instead of _WindowMap just use the translation and scale of the viewport transform directly. Thereby avoid dividing by _DepthMaxF again. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/dri/i965/brw_sf_state.c| 17 + src/mesa/drivers/dri

[Mesa-dev] [PATCH 2/4] radeon: Make use of _mesa_get_viewport_xform.

2015-03-30 Thread Mathias . Froehlich
From: Mathias Froehlich Instead of _WindowMap just use the translation and scale of the viewport transform directly. Thereby avoid dividing by _DepthMaxF again. Signed-off-by: Mathias Froehlich --- src/mesa/drivers/dri/r200/r200_state.c | 17 + src/mesa/drivers/dri/radeon

[Mesa-dev] [PATCH 0/4] Cleanup viewport handling past clip control.

2015-03-30 Thread Mathias . Froehlich
From: Mathias Froehlich Hi, The series cleans up viewport handling a bit. Make use of the utility functions provided with the clip control implementation in the drivers. Move the _WindowMap matrix into the TNL state which is the only remaining user of that matrix and simplify gl_viewport_attrib

[Mesa-dev] [PATCH 2/4] radeon: Make use of _mesa_get_viewport_xform v2.

2015-04-02 Thread Mathias . Froehlich
From: Mathias Froehlich Hi Michael, You mean like this? I did initially preserve the original ordering present in the radeon implementation because I thought it is easier to review then. If it's the other way round, here you are ... Ok, to commit? Thanks Mathias Instead of _WindowMap

[Mesa-dev] [PATCH 3/4] tnl: Maintain the _WindowMap matrix in TNLcontext v2.

2015-04-02 Thread Mathias . Froehlich
From: Mathias Froehlich Hi Brian, Thanks for the review! The Patch with unneeded parentheses removed. Ok, to push? Greetings Mathias This is the only real user of _WindowMap which has the depth buffer scaling multiplied in. Maintain the _WindowMap of the one and only viewport inside

[Mesa-dev] [PATCH] mesa: Remove unused variables left over from 107ae27e57d.

2015-04-05 Thread Mathias . Froehlich
From: Mathias Froehlich David, You mean the below. Ok to push? Greetings and Thanks! Mathias Signed-off-by: Mathias Froehlich --- src/mesa/main/viewport.c | 4 1 file changed, 4 deletions(-) diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c index 3f5ca79..b270630 100644

[Mesa-dev] [PATCH] i965: Flush batchbuffer containing the query on glQueryCounter.

2015-04-12 Thread Mathias . Froehlich
From: Mathias Froehlich Hi all, the attached patch fixes timer queries as noticed with osgviewer. Please review! Greetings and thanks Mathias This change fixes a regression with timer queries introduced with commit 3eb6258. There the pending batchbuffer is flushed only if glEndQuery is

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

2016-06-06 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. Changes

[Mesa-dev] [PATCH 02/31] mesa: Make use of _mesa_bit_scan{,64}.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 5 ++--- src/mesa/main/buffers.c | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 897dac6..fb3c752 100644 --- a/src/mesa/main/a

[Mesa-dev] [PATCH 01/31] mesa: Provide _mesa_bit_scan{, 64} similar to gallium.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich The function is yet unused but will be used with the next changes. Signed-off-by: Mathias Fröhlich --- src/mesa/main/imports.h | 24 1 file changed, 24 insertions(+) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index d96d666..3

[Mesa-dev] [PATCH 07/31] i915: Convert i915 to use CoordsReplaceBits.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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/mes

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/driver

[Mesa-dev] [PATCH 10/31] mesa: Rename CoordReplaceBits back to CoordReplace.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich It used to be called like that and fits better with 80 columns. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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/driv

[Mesa-dev] [PATCH 04/31] swrast: Convert swrast to use CoordsReplaceBits.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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/m

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/driver

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Clean up after conversion to bitmasks. Reviewed-by: Brian Paul 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 inser

[Mesa-dev] [PATCH 11/31] mesa: Track enabled lights in a bitmask

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich This enables some optimizations afterwards. Reviewed-by: Brian Paul 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/sr

[Mesa-dev] [PATCH 03/31] mesa: Add gl_point_attrib::CoordReplaceBits bitfield.

2016-06-06 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 parallel to the CoordReplace array. v2: Fix bitmask logic. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick Signed-off-by: Mathias Fröhlich --- src/

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Rev

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/lig

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/tnl/t_vb

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/f

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Reviewed-by: Brian Paul 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_maty

[Mesa-dev] [PATCH 06/31] r200: convert r200 to use CoordsReplaceBits.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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/dr

[Mesa-dev] [PATCH 08/31] i965: Convert i965 to use CoordsReplaceBits.

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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/i96

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Rev

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Now that all users are converted, remove the array. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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(-) dif

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick 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/stat

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich The use of a bitmask makes functions iterating only active attributes less visible in profiles. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_exec.h | 1 + src/mesa/vbo/vbo_exec_a

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/uniform_query.cpp | 7 --- 1

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/r200/r200_state.c | 19

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_curbe.c | 20

[Mesa-dev] [PATCH 26/31] mesa: Use bitmask/ffs to iterate SamplersUsed

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/uniforms.c | 41 +

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/common/meta.c | 21 ++-

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich The change helps to use the bitmask/ffs in the next change. Reviewed-by: Brian Paul 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 i

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

2016-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich The use of a bitmask makes functions iterating only active attributes less visible in profiles. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save.h | 2 ++ src/mesa/vbo/vbo_save_a

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/light.c | 11 ++- src

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_draw.c | 9 --

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

2016-06-06 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. v2: Use _mesa_bit_scan{,64} instead of open coding. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/texstate.c | 30 +++--

[Mesa-dev] [PATCH 1/2] mesa/gallium: Move u_bit_scan{, 64} from gallium to mesa.

2016-06-08 Thread Mathias . Froehlich
From: Mathias Fröhlich The functions are also useful for mesa. Introduce src/util/bitscan.{h,c}. Move ffs function implementations from src/mesa/main/imports.{h,c}. Move bit scan related functions from src/gallium/auxiliary/util/u_math.h. Merge platform handling with what is available from within

[Mesa-dev] [PATCH 0/2] Move u_bit_scan from gallium to util.

2016-06-08 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, I just put the two leading patches to move u_bit_scan from gallium to util. The architecture handling of ffs{,ll} is merged with what is available in the mesa/util directory. It compiles and works here and we should get slightly better intrinsic coverage on win32.

[Mesa-dev] [PATCH 2/2] mesa: Make use of u_bit_scan{,64}.

2016-06-08 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 6 +++--- src/mesa/main/buffers.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 897dac6..9c3451e 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH] mesa/gallium: Move u_bit_scan{, 64} from gallium to util.

2016-06-09 Thread Mathias . Froehlich
From: Mathias Fröhlich The functions are also useful for mesa. Introduce src/util/bitscan.{h,c}. Move ffs function implementations from src/mesa/main/imports.{h,c}. Move bit scan related functions from src/gallium/auxiliary/util/u_math.h. Merge platform handling with what is available from within

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

2016-06-13 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. Changes

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

2016-06-13 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. v2: Use _mesa_bit_scan{,64} instead of open coding. v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}. Reviewed-by: Brian Paul

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

2016-06-13 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. v2: Use _mesa_bit_scan{,64} instead of open coding. v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}. Reviewed-by: Brian Paul

  1   2   3   4   5   >