summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-16 09:31:01 -0700
committerBrian Paul <[email protected]>2018-01-17 11:17:56 -0700
commitf5140c1a6bf63f839070502dc4c9cca34c6955cc (patch)
tree70552d0fa9b750fca1748b7d2bc1a9723ffa49dc /src/mesa
parente6e78d98a27f15892bda046b978b9db2deb9abd4 (diff)
vbo: use inputs_read var to simplify code
v2: add some const qualifiers, per Ian. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c8
-rw-r--r--src/mesa/vbo/vbo_save_draw.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 5d1e5880b6b..ad1d38b0ee2 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -208,10 +208,10 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
* glVertexAttrib(0, val) calls to feed into the GENERIC0 input.
* The original state gets essentially restored below.
*/
- if ((ctx->VertexProgram._Current->info.inputs_read &
- VERT_BIT_POS) == 0 &&
- (ctx->VertexProgram._Current->info.inputs_read &
- VERT_BIT_GENERIC0)) {
+ const GLbitfield64 inputs_read =
+ ctx->VertexProgram._Current->info.inputs_read;
+ if ((inputs_read & VERT_BIT_POS) == 0 &&
+ (inputs_read & VERT_BIT_GENERIC0)) {
swap_pos = true;
exec->vtx.inputs[VERT_ATTRIB_GENERIC0] = exec->vtx.inputs[0];
exec->vtx.attrsz[VERT_ATTRIB_GENERIC0] = exec->vtx.attrsz[0];
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 5d299d8c325..f5c4a900b39 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -183,10 +183,10 @@ bind_vertex_list(struct gl_context *ctx,
* In that case we effectively need to route the data from
* glVertexAttrib(0, val) calls to feed into the GENERIC0 input.
*/
- if ((ctx->VertexProgram._Current->info.inputs_read &
- VERT_BIT_POS) == 0 &&
- (ctx->VertexProgram._Current->info.inputs_read &
- VERT_BIT_GENERIC0)) {
+ const GLbitfield64 inputs_read =
+ ctx->VertexProgram._Current->info.inputs_read;
+ if ((inputs_read & VERT_BIT_POS) == 0 &&
+ (inputs_read & VERT_BIT_GENERIC0)) {
save->inputs[VERT_ATTRIB_GENERIC0] = save->inputs[0];
node_attrsz[VERT_ATTRIB_GENERIC0] = node_attrsz[0];
node_attrtype[VERT_ATTRIB_GENERIC0] = node_attrtype[0];