[Mesa-dev] [PATCH 02/11] gallium: Use _DrawVAO for edgeflag enabled check.
Roland Scheidegger
sroland at vmware.com
Tue Apr 3 20:23:55 UTC 2018
Not a review, but these aren't gallium changes, but rather state tracker
ones, so should be st/mesa rather than gallium.
(gallium would be changes to the gallium interface.)
Roland
Am 01.04.2018 um 20:13 schrieb Mathias.Froehlich at gmx.net:
> From: Mathias Fröhlich <mathias.froehlich at web.de>
>
> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
> ---
> 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/state_tracker/st_atom.c
> +++ b/src/mesa/state_tracker/st_atom.c
> @@ -27,6 +27,7 @@
>
>
> #include <stdio.h>
> +#include "main/arrayobj.h"
> #include "main/glheader.h"
> #include "main/context.h"
>
> @@ -138,19 +139,15 @@ static void check_program_state( struct st_context *st )
>
> static void check_attrib_edgeflag(struct st_context *st)
> {
> - const struct gl_vertex_array *arrays = st->ctx->Array._DrawArrays;
> - const struct gl_vertex_buffer_binding *binding;
> GLboolean vertdata_edgeflags, edgeflag_culls_prims, edgeflags_enabled;
> struct gl_program *vp = st->ctx->VertexProgram._Current;
>
> - if (!arrays)
> - return;
> -
> edgeflags_enabled = st->ctx->Polygon.FrontMode != GL_FILL ||
> st->ctx->Polygon.BackMode != GL_FILL;
>
> - binding = arrays[VERT_ATTRIB_EDGEFLAG].BufferBinding;
> - vertdata_edgeflags = edgeflags_enabled && binding->Stride != 0;
> + vertdata_edgeflags = edgeflags_enabled &&
> + _mesa_draw_edge_flag_array_enabled(st->ctx);
> +
> if (vertdata_edgeflags != st->vertdata_edgeflags) {
> st->vertdata_edgeflags = vertdata_edgeflags;
> if (vp)
>
More information about the mesa-dev
mailing list