From: Mathias Fröhlich Date: Mon, 29 Oct 2018 05:13:19 +0000 (+0100) Subject: vbo: Remove set but not used weak field from _mesa_prim. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b632c072b26998acd1d6e0fa7b5f794965a5238a;p=mesa.git vbo: Remove set but not used weak field from _mesa_prim. The only reader of the weak field in _mesa_prim is pretty console printing. By that, remove the weak field from _mesa_prim. Reviewed-by: Brian Paul Signed-off-by: Mathias Fröhlich --- diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index 13cc9a7f320..fecaaf77da8 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -206,7 +206,6 @@ new_draw_rastpos_stage(struct gl_context *ctx, struct draw_context *draw) rs->prim.indexed = 0; rs->prim.begin = 1; rs->prim.end = 1; - rs->prim.weak = 0; rs->prim.start = 0; rs->prim.count = 1; diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index 4e3f15999c0..eccef1a3ffc 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -46,10 +46,9 @@ struct _mesa_prim GLuint indexed:1; GLuint begin:1; GLuint end:1; - GLuint weak:1; GLuint no_current_update:1; GLuint is_indirect:1; - GLuint pad:18; + GLuint pad:19; GLuint start; GLuint count; diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 20148acce32..24bd1f0ba14 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -793,7 +793,6 @@ vbo_exec_Begin(GLenum mode) exec->vtx.prim[i].begin = 1; exec->vtx.prim[i].end = 0; exec->vtx.prim[i].indexed = 0; - exec->vtx.prim[i].weak = 0; exec->vtx.prim[i].pad = 0; exec->vtx.prim[i].start = exec->vtx.vert_count; exec->vtx.prim[i].count = 0; diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 51c000e7bd9..9335a246ead 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -811,7 +811,6 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode, prim.begin = 1; prim.end = 1; - prim.weak = 0; prim.pad = 0; prim.mode = mode; prim.start = 0; @@ -1285,7 +1284,6 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, for (i = 0; i < primcount; i++) { prim[i].begin = (i == 0); prim[i].end = (i == primcount - 1); - prim[i].weak = 0; prim[i].pad = 0; prim[i].mode = mode; prim[i].start = @@ -1317,7 +1315,6 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, prim[0].begin = 1; prim[0].end = 1; - prim[0].weak = 0; prim[0].pad = 0; prim[0].mode = mode; prim[0].start = 0; diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 8d74725db39..dc6e8d3b8a4 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -54,10 +54,9 @@ vbo_exec_debug_verts(struct vbo_exec_context *exec) for (i = 0 ; i < exec->vtx.prim_count ; i++) { struct _mesa_prim *prim = &exec->vtx.prim[i]; - printf(" prim %d: %s%s %d..%d %s %s\n", + printf(" prim %d: %s %d..%d %s %s\n", i, _mesa_lookup_prim_by_nr(prim->mode), - prim->weak ? " (weak)" : "", prim->start, prim->start + prim->count, prim->begin ? "BEGIN" : "(wrap)", diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 975ba46c8e6..f1c8d5e4b1a 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -720,7 +720,6 @@ wrap_buffers(struct gl_context *ctx) struct vbo_save_context *save = &vbo_context(ctx)->save; GLint i = save->prim_count - 1; GLenum mode; - GLboolean weak; GLboolean no_current_update; assert(i < (GLint) save->prim_max); @@ -730,7 +729,6 @@ wrap_buffers(struct gl_context *ctx) */ save->prims[i].count = (save->vert_count - save->prims[i].start); mode = save->prims[i].mode; - weak = save->prims[i].weak; no_current_update = save->prims[i].no_current_update; /* store the copied vertices, and allocate a new list. @@ -740,7 +738,6 @@ wrap_buffers(struct gl_context *ctx) /* Restart interrupted primitive */ save->prims[0].mode = mode; - save->prims[0].weak = weak; save->prims[0].no_current_update = no_current_update; save->prims[0].begin = 0; save->prims[0].end = 0; @@ -1208,7 +1205,6 @@ vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode) save->prims[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK; save->prims[i].begin = 1; save->prims[i].end = 0; - save->prims[i].weak = (mode & VBO_SAVE_PRIM_WEAK) ? 1 : 0; save->prims[i].no_current_update = (mode & VBO_SAVE_PRIM_NO_CURRENT_UPDATE) ? 1 : 0; save->prims[i].pad = 0; @@ -1844,10 +1840,9 @@ vbo_print_vertex_list(struct gl_context *ctx, void *data, FILE *f) for (i = 0; i < node->prim_count; i++) { struct _mesa_prim *prim = &node->prims[i]; - fprintf(f, " prim %d: %s%s %d..%d %s %s\n", + fprintf(f, " prim %d: %s %d..%d %s %s\n", i, _mesa_lookup_prim_by_nr(prim->mode), - prim->weak ? " (weak)" : "", prim->start, prim->start + prim->count, (prim->begin) ? "BEGIN" : "(wrap)",