diff options
author | Marek Olšák <[email protected]> | 2020-02-03 20:44:04 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-11 00:34:57 +0000 |
commit | 36cc6b105b5299ae07f005feabd8bd6eb34c5257 (patch) | |
tree | 481fe6fc9c4dcab58ae61cac2a6735c3bcbb2894 /src/mesa | |
parent | 47d7e21619218348c86ca6909cf695f78c9778c6 (diff) |
mesa: don't use bitfields in _mesa_prim
This is better.
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Reviewed-by: Mathias Fröhlich <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/draw.c | 3 | ||||
-rw-r--r-- | src/mesa/main/draw.h | 9 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_rasterpos.c | 1 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 1 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_save_api.c | 2 |
5 files changed, 4 insertions, 12 deletions
diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 09170525ab7..8589c292298 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -770,7 +770,6 @@ _mesa_validated_drawrangeelements(struct gl_context *ctx, GLenum mode, prim.begin = 1; prim.end = 1; - prim.pad = 0; prim.mode = mode; prim.start = 0; prim.count = count; @@ -1228,7 +1227,6 @@ _mesa_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].pad = 0; prim[i].mode = mode; prim[i].start = ((uintptr_t) indices[i] - min_index_ptr) / index_type_size; @@ -1258,7 +1256,6 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode, prim[0].begin = 1; prim[0].end = 1; - prim[0].pad = 0; prim[0].mode = mode; prim[0].start = 0; prim[0].count = count[i]; diff --git a/src/mesa/main/draw.h b/src/mesa/main/draw.h index 86b0527ffc4..5ed8b8e90bf 100644 --- a/src/mesa/main/draw.h +++ b/src/mesa/main/draw.h @@ -42,11 +42,10 @@ struct gl_context; struct _mesa_prim { - GLuint mode:8; /**< GL_POINTS, GL_LINES, GL_QUAD_STRIP, etc */ - GLuint indexed:1; - GLuint begin:1; - GLuint end:1; - GLuint pad:21; + GLubyte mode; /**< GL_POINTS, GL_LINES, GL_QUAD_STRIP, etc */ + bool indexed; + bool begin; + bool end; GLuint start; GLuint count; diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index a69b0a651c3..44d1586ddb7 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -210,7 +210,6 @@ new_draw_rastpos_stage(struct gl_context *ctx, struct draw_context *draw) rs->prim.end = 1; rs->prim.start = 0; rs->prim.count = 1; - rs->prim.pad = 0; rs->prim.num_instances = 1; rs->prim.base_instance = 0; diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index f106fc2d970..698663d48f5 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -818,7 +818,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].pad = 0; exec->vtx.prim[i].start = exec->vtx.vert_count; exec->vtx.prim[i].count = 0; exec->vtx.prim[i].num_instances = 1; diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 57984684899..8e7ab86bae1 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -737,7 +737,6 @@ wrap_buffers(struct gl_context *ctx) save->prims[0].mode = mode; save->prims[0].begin = 0; save->prims[0].end = 0; - save->prims[0].pad = 0; save->prims[0].start = 0; save->prims[0].count = 0; save->prims[0].num_instances = 1; @@ -1217,7 +1216,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].pad = 0; save->prims[i].start = save->vert_count; save->prims[i].count = 0; save->prims[i].num_instances = 1; |