[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

[Mesa-dev] [PATCH] egl: Don't add hardware device if there is no render node v2.

2019-06-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Emil, that one probably matches your original intent then. please review Thanks Mathias Do not offer a hardware drm backed egl device if no render node is available. The current implementation will fail on this egl device. On top it issues a warning that is actually

[Mesa-dev] [PATCH 1/2] swrast: Avoid creating front buffers with __DRI_SWRAST_LOADER < 3.

2019-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Align classic swrast with galliums software renderer with respect to front buffer creation. In case of front buffers swrast uses the __DRI_SWRAST_LOADER extensions getImage/putImage callbacks to keep the front buffer in sync between the X server and the mesa software

[Mesa-dev] [PATCH 2/2] egl: Don't add hardware device if there is no render node.

2019-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Do not offer a hardware drm backed egl device if no render node is available. The current implementation will fail on this egl device. On top it issues a warning that is actually missleading. There are finally more error paths that can fail on the way to a hardware backed

[Mesa-dev] [PATCH 0/2] Followups on the just landed EGL_platform_device.

2019-06-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Emil, I have two followups for EGL_platform_device: I have now found the proof for gallium swrast not calling getImage/putImage and provide an update to classic swrast to just do the same. Also, there is a change to catch one simple case that gives a false warning on

[Mesa-dev] [PATCH] mesa: Prevent classic swrast crash on a surfaceless context v2.

2019-05-27 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Emil, thanks for that hint to look at _mesa_get_incomplete_framebuffer. That one seems definitely more appropriate! Though, I miss a bit the idea how I can create either a sensible helper function for that task or how I can create something above in the call stack to

[Mesa-dev] [PATCH] mesa: Prevent classic swrast crash on a surfaceless context.

2019-05-15 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, One small fix below. Please review! best Mathias Running swrast with the new device egl extensions piglit test brings up this failure. Fix that by adding some NULL pointer checks. Signed-off-by: Mathias Fröhlich --- src/mesa/main/fbobject.c | 11

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

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

[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

[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

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

[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

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

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

[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

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

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

[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

[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

[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

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

[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

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

[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

[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

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

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

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

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

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

[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

[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

[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

[Mesa-dev] [PATCH 01/10] i965: Move down genX_upload_sbe in profiles.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Avoid looping over all VARYING_SLOT_MAX urb_setup array entries from genX_upload_sbe. Prepare an array indirection to the active entries of urb_setup already in the compile step. On upload only walk the active arrays. v2: Use uint8_t to store the attribute numbers.

[Mesa-dev] [PATCH 03/10] i965: Split merge_inputs and clear_buffers.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich The merge_inputs function handles that part that changes when the inputs change. The clear_buffers function triggers when we may need a new upload. Thus the merge_inputs can be limited to be once per brw_draw_prims. Signed-off-by: Mathias Fröhlich ---

[Mesa-dev] [PATCH 06/10] mesa: Remove now unused _mesa_draw_attrib_and_binding.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.h | 19 --- 1 file changed, 19 deletions(-) diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h index ee87b4b6ba..49b3522f30 100644 --- a/src/mesa/main/arrayobj.h +++

[Mesa-dev] [PATCH 08/10] mesa: Provide gl_vertex_format accessors.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Provide the same set of VAO and current value gl_vertex_format accessor functions like we have for the gl_array_attributes. For most purpose the vertex format is what we need. Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.h | 21 + 1

[Mesa-dev] [PATCH 09/10] i965: Make use of the vertex format functions in i965.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_draw.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 6e4a0a0213..e0d17cd449 100644 ---

[Mesa-dev] [PATCH 05/10] i965: Remove glbinding from brw_vertex_element.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/drivers/dri/i965/brw_context.h | 1 - src/mesa/drivers/dri/i965/brw_draw.c| 7 --- 2 files changed, 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index

[Mesa-dev] [PATCH 07/10] mesa: Remove now unused _mesa_draw_attrib.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h index 49b3522f30..55d233befb 100644 --- a/src/mesa/main/arrayobj.h +++

[Mesa-dev] [PATCH 04/10] i965: Reorder workaround flags computation.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Vertex processing workaround flags can be split into array and current vertex attributes. By that we can use specific access functions for these different vertex attribute kinds. This finally obsoletes some access functions that I introduced last winter for a smooth

[Mesa-dev] [PATCH 02/10] i965: Use the VAOs binding information in array setup.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich The change basically reimplements array setup by walking the gl_contex::Array._DrawVAO on a per binding sequence. In this way we can make direct use of the application provided minimum set of buffer objects and emit fewer relocs. v2: Rebase onto: compiler: Move

[Mesa-dev] [PATCH 00/10] Make use of VAO information in i965 v4.

2018-12-11 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, The following series is a resend from last spring with some rebasing on the way. This change finally makes use of the binding/attribute information now present in the VAO. The big part is basically a rewrite of brw_draw_upload in a way that traverses in an outer

[Mesa-dev] [PATCH 2/6] mesa/st: Only unmap the uploader that was actually used.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich In st_atom_array, we only need to unmap the upload buffer that was actually used. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_array.c

[Mesa-dev] [PATCH 5/6] mesa/st: Use binding information from the VAO in feedback rendering.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Use VAO binding information in feedback rendering. In theory it should reduce the amount of buffer objects scheduled for rendering. Feedback rendering is implemented in a crude way anyhow, so I do not expect much gain here. But for the sake of code reuse we should use the

[Mesa-dev] [PATCH 3/6] mesa/st: Factor out array and buffer setup from st_atom_array.c.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Factor out vertex array setup routines from the array state atom. The factored functions will be used in feedback rendering in the next change. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom.h | 17 ++ src/mesa/state_tracker/st_atom_array.c

[Mesa-dev] [PATCH 4/6] mesa/st: Avoid extra references in the feedback draw function scope.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich The change removes the reference that is held on the entries of the vbuffers[] array. The new code does not do that anymore as following the code into draw_set_vertex_buffers() the draw context holds an other reference as long as it is reset down the function again. So it

[Mesa-dev] [PATCH 1/6] mesa/st: Only care about the uploader if it was used.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich In st_atom_array, we only need to care for unmapping the upload buffer if we actually used it. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 6/6] mesa/st: Make st_pipe_vertex_format static.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom.h | 3 --- src/mesa/state_tracker/st_atom_array.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h index

[Mesa-dev] [PATCH 0/6] Use common code for gallium array setup.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The series unifies functions for array setup into gallium. Instead of just walking all VAO attributes we can make use of the enabled and required attribute arrays also for feedback rendering. Along that way cleanup duplicate references and unneeded calls to the

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

2018-11-19 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,

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

2018-11-19 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. v2: Change unsigned char -> GLubyte. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/mtypes.h | 4

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

[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

[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

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

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

[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

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

[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

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

[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

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

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

[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

[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

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

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

[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

[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

[Mesa-dev] [PATCH 02/14] vbo: Remove the VBO_SAFE_FALLBACK flag.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich On finishing a display list playback the VBO_SAFE_FALLBACK bit is still kept in vbo_save_context::replay_flags. But examining replay_flags and the display list flags that feed this value the corresponding bit is never set these days anymore. So, since it is nowhere set or

[Mesa-dev] [PATCH 06/14] vbo: Remove the always false branch dlist replay.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich The previous patch left a constant if (0) in the code. Clean that up now. Signed-off-by: Mathias Fröhlich --- src/mesa/vbo/vbo_save_loopback.c | 30 +- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git

[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

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

[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

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

[Mesa-dev] [PATCH 00/14] Various cleanups on display lists and draw code.

2018-10-29 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The series collects some of that cleanup opportunities that I found while working on the vao changes from this spring. There are two groups of changes. The first bunch removes unreachable code paths from the dlist code and removes related functions and flags. That is

[Mesa-dev] [PATCH 2/2] etnaviv: Reduce max offset to available hardware bits.

2018-09-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/gallium/drivers/etnaviv/etnaviv_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 9ddba62855..0081f9a173 100644 ---

[Mesa-dev] [PATCH 0/2] Introduce and use cap for MaxVertexAttribRelativeOffset.

2018-09-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, The following two patches introduce a gallium capability to feed gl_constants::MaxVertexAttribRelativeOffset. Then adapt etnyviv to return what it can really handle. That prevents _mesa_update_vao_derived_arrays from collapsing too many attribute arrays into a

[Mesa-dev] [PATCH 1/2] gallium: New cap PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET.

2018-09-06 Thread Mathias . Froehlich
From: Mathias Fröhlich Introduce a new capability for the maximum value of pipe_vertex_element::src_offset. Initially just every driver backend returns the value previously set from _mesa_init_constants. So this shall end up in no functional change. Signed-off-by: Mathias Fröhlich ---

[Mesa-dev] [PATCH] tnl: Fix green gun regression in xonotic.

2018-08-21 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi Ville, Brian, The below patch fixes the regression to tnl drivers that Ville reported a hand full weeks ago. Please review! best Mathias Fix an other regression of patch 64d2a2048054 mesa: Make gl_vertex_array contain pointers to first order VAO members. The

[Mesa-dev] [PATCH 1/3] vbo: Reestablish VAO limit checking on imm VAOs.

2018-06-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Bail out with out of memory, when the required stride exceeds the maximum possible stride as stored in Const.MaxVertexAttribStride. Etnaviv can only handle less than the OpenGL standard mandated minimum of 2048. For this one, at least give some 'resource exhaustion error'

[Mesa-dev] [PATCH 3/3] mesa: Update comments at Const.MaxVertexAttribStride.

2018-06-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Mention how this is supposed to work where the constant is declared. Signed-off-by: Mathias Fröhlich --- src/mesa/main/mtypes.h | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index

[Mesa-dev] [PATCH 2/3] vbo: Reestablish VAO limit checking on dlist VAOs.

2018-06-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Bail out with out of memory, when the required stride exceeds the maximum possible stride as stored in Const.MaxVertexAttribStride. Etnaviv can only handle less than the OpenGL standard mandated minimum of 2048. For this one, at least give some 'resource exhaustion error'

[Mesa-dev] [PATCH 0/3] More gently check for driver limits and lack thereof.

2018-06-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Turns out that the MaxVertexAttribStride constant value is not set by all drivers as I expected to be set. Expecially virgl may run on top of an OpenGL stack that is too old to allow the query of GL_MAX_VERTEX_ATTRIB_STRIDE. So, allow setting that

[Mesa-dev] [PATCH] mesa: Make sure that imm draws are flushed before other draws execute.

2018-06-02 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, The below patch fixes a recently introduced failure of my VAO rework. I could finally reproduce the problem using the provided apitrace (thanks Kai for the hint with the lower left corner). The change is slightly different than what I put initially into the

[Mesa-dev] [PATCH] radeonsi: Track pipe_vertex_buffers for relocs.

2018-05-19 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, Below a patch to radeonsi to get a small bit more out of the recent VAO changes. The change did not introduce regressions into piglit and some variant of deqp availble through piglit on a radeonsi system. Please review! best Mathias

[Mesa-dev] [PATCH 3/3] i965: Use the VAOs binding information in array setup.

2018-05-17 Thread Mathias . Froehlich
From: Mathias Fröhlich The change basically reimplements array setup by walking the gl_contex::Array._DrawVAO on a per binding sequence. In this way we can make direct use of the application provided minimum set of buffer objects and emit fewer relocs. Signed-off-by:

[Mesa-dev] [PATCH 0/3] Make use of VAO information in i965.

2018-05-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi all, This change finally makes use of the binding/attribute information now present in the VAO. The big part is basically a rewrite of brw_draw_upload in a way that traverses in an outer loop the bindings and for each binding the attached

[Mesa-dev] [PATCH 1/3] i965: Move down genX_upload_sbe in profiles.

2018-05-17 Thread Mathias . Froehlich
From: Mathias Fröhlich Avoid looping over all VARYING_SLOT_MAX urb_setup array entries from genX_upload_sbe. Prepare an array indirection to the active entries of urb_setup already in the compile step. On upload only walk the active arrays. Signed-off-by: Mathias

  1   2   3   4   5   >