<div dir="ltr"><div>For the series:</div><div><br></div><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Nov 17, 2018 at 7:15 AM <<a href="mailto:Mathias.Froehlich@gmx.net">Mathias.Froehlich@gmx.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Mathias Fröhlich <<a href="mailto:mathias.froehlich@web.de" target="_blank">mathias.froehlich@web.de</a>><br>
<br>
Mark the up to now derived bitfield value now as primary<br>
value by removing the underscore.<br>
<br>
Signed-off-by: Mathias Fröhlich <<a href="mailto:Mathias.Froehlich@web.de" target="_blank">Mathias.Froehlich@web.de</a>><br>
---<br>
src/mesa/main/arrayobj.c | 20 ++++++++++----------<br>
src/mesa/main/arrayobj.h | 4 ++--<br>
src/mesa/main/attrib.c | 4 ++--<br>
src/mesa/main/draw_validate.c | 2 +-<br>
src/mesa/main/mtypes.h | 2 +-<br>
src/mesa/main/varray.c | 16 ++++++++--------<br>
src/mesa/vbo/vbo_exec_draw.c | 8 ++++----<br>
src/mesa/vbo/vbo_private.h | 2 +-<br>
src/mesa/vbo/vbo_save_api.c | 4 ++--<br>
src/mesa/vbo/vbo_save_draw.c | 2 +-<br>
src/mesa/vbo/vbo_save_loopback.c | 8 ++++----<br>
11 files changed, 36 insertions(+), 36 deletions(-)<br>
<br>
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c<br>
index ad34282afc..c4e61a9954 100644<br>
--- a/src/mesa/main/arrayobj.c<br>
+++ b/src/mesa/main/arrayobj.c<br>
@@ -478,7 +478,7 @@ compute_vbo_offset_range(const struct gl_vertex_array_object *vao,<br>
GLuint max_offset = 0;<br>
<br>
/* We work on the unmapped originaly VAO array entries. */<br>
- GLbitfield mask = vao->_Enabled & binding->_BoundArrays;<br>
+ GLbitfield mask = vao->Enabled & binding->_BoundArrays;<br>
/* The binding should be active somehow, not to return inverted ranges */<br>
assert(mask);<br>
while (mask) {<br>
@@ -597,7 +597,7 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,<br>
*/<br>
const gl_attribute_map_mode mode = vao->_AttributeMapMode;<br>
/* Enabled array bits. */<br>
- const GLbitfield enabled = vao->_Enabled;<br>
+ const GLbitfield enabled = vao->Enabled;<br>
/* VBO array bits. */<br>
const GLbitfield vbos = vao->VertexAttribBufferMask;<br>
<br>
@@ -756,8 +756,8 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,<br>
* grouping information in a seperate array beside<br>
* gl_array_attributes/gl_vertex_buffer_binding.<br>
*/<br>
- assert(util_bitcount(binding->_BoundArrays & vao->_Enabled) == 1<br>
- || (vao->_Enabled & ~binding->_BoundArrays) == 0);<br>
+ assert(util_bitcount(binding->_BoundArrays & vao->Enabled) == 1<br>
+ || (vao->Enabled & ~binding->_BoundArrays) == 0);<br>
<br>
/* Start this current effective binding with the array */<br>
GLbitfield eff_bound_arrays = bound;<br>
@@ -776,8 +776,8 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,<br>
&vao->BufferBinding[attrib2->BufferBindingIndex];<br>
<br>
/* See the comment at the same assert above. */<br>
- assert(util_bitcount(binding2->_BoundArrays & vao->_Enabled) == 1<br>
- || (vao->_Enabled & ~binding->_BoundArrays) == 0);<br>
+ assert(util_bitcount(binding2->_BoundArrays & vao->Enabled) == 1<br>
+ || (vao->Enabled & ~binding->_BoundArrays) == 0);<br>
<br>
/* Check if we have an identical binding */<br>
if (binding->Stride != binding2->Stride)<br>
@@ -871,7 +871,7 @@ bool<br>
_mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)<br>
{<br>
/* Walk those enabled arrays that have the default vbo attached */<br>
- GLbitfield mask = vao->_Enabled & ~vao->VertexAttribBufferMask;<br>
+ GLbitfield mask = vao->Enabled & ~vao->VertexAttribBufferMask;<br>
<br>
while (mask) {<br>
/* Do not use u_bit_scan64 as we can walk multiple<br>
@@ -883,7 +883,7 @@ _mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)<br>
const struct gl_vertex_buffer_binding *buffer_binding =<br>
&vao->BufferBinding[attrib_array->BufferBindingIndex];<br>
<br>
- /* Only enabled arrays shall appear in the _Enabled bitmask */<br>
+ /* Only enabled arrays shall appear in the Enabled bitmask */<br>
assert(attrib_array->Enabled);<br>
/* We have already masked out vao->VertexAttribBufferMask */<br>
assert(!_mesa_is_bufferobj(buffer_binding->BufferObj));<br>
@@ -905,7 +905,7 @@ bool<br>
_mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)<br>
{<br>
/* Walk the enabled arrays that have a vbo attached */<br>
- GLbitfield mask = vao->_Enabled & vao->VertexAttribBufferMask;<br>
+ GLbitfield mask = vao->Enabled & vao->VertexAttribBufferMask;<br>
<br>
while (mask) {<br>
const int i = ffs(mask) - 1;<br>
@@ -914,7 +914,7 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)<br>
const struct gl_vertex_buffer_binding *buffer_binding =<br>
&vao->BufferBinding[attrib_array->BufferBindingIndex];<br>
<br>
- /* Only enabled arrays shall appear in the _Enabled bitmask */<br>
+ /* Only enabled arrays shall appear in the Enabled bitmask */<br>
assert(attrib_array->Enabled);<br>
/* We have already masked with vao->VertexAttribBufferMask */<br>
assert(_mesa_is_bufferobj(buffer_binding->BufferObj));<br>
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h<br>
index 8b11c79bdb..ee87b4b6ba 100644<br>
--- a/src/mesa/main/arrayobj.h<br>
+++ b/src/mesa/main/arrayobj.h<br>
@@ -111,7 +111,7 @@ _mesa_vao_attribute_map[ATTRIBUTE_MAP_MODE_MAX][VERT_ATTRIB_MAX];<br>
<br>
/**<br>
* Apply the position/generic0 aliasing map to a bitfield from the vao.<br>
- * Use for example to convert gl_vertex_array_object::_Enabled<br>
+ * Use for example to convert gl_vertex_array_object::Enabled<br>
* or gl_vertex_buffer_binding::_VertexBinding from the vao numbering to<br>
* the numbering used with vertex processing inputs.<br>
*/<br>
@@ -143,7 +143,7 @@ static inline GLbitfield<br>
_mesa_get_vao_vp_inputs(const struct gl_vertex_array_object *vao)<br>
{<br>
const gl_attribute_map_mode mode = vao->_AttributeMapMode;<br>
- return _mesa_vao_enable_to_vp_inputs(mode, vao->_Enabled);<br>
+ return _mesa_vao_enable_to_vp_inputs(mode, vao->Enabled);<br>
}<br>
<br>
<br>
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c<br>
index a46fec73fd..fd13085717 100644<br>
--- a/src/mesa/main/attrib.c<br>
+++ b/src/mesa/main/attrib.c<br>
@@ -1576,8 +1576,8 @@ copy_array_object(struct gl_context *ctx,<br>
_mesa_copy_vertex_buffer_binding(ctx, &dest->BufferBinding[i], &src->BufferBinding[i]);<br>
}<br>
<br>
- /* _Enabled must be the same than on push */<br>
- dest->_Enabled = src->_Enabled;<br>
+ /* Enabled must be the same than on push */<br>
+ dest->Enabled = src->Enabled;<br>
dest->_EffEnabledVBO = src->_EffEnabledVBO;<br>
/* The bitmask of bound VBOs needs to match the VertexBinding array */<br>
dest->VertexAttribBufferMask = src->VertexAttribBufferMask;<br>
diff --git a/src/mesa/main/draw_validate.c b/src/mesa/main/draw_validate.c<br>
index 29304bd514..b715a27f8b 100644<br>
--- a/src/mesa/main/draw_validate.c<br>
+++ b/src/mesa/main/draw_validate.c<br>
@@ -1100,7 +1100,7 @@ valid_draw_indirect(struct gl_context *ctx,<br>
* buffer bound.<br>
*/<br>
if (_mesa_is_gles31(ctx) &&<br>
- ctx->Array.VAO->_Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {<br>
+ ctx->Array.VAO->Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(No VBO bound)", name);<br>
return GL_FALSE;<br>
}<br>
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h<br>
index 656e1226f9..9d79957afa 100644<br>
--- a/src/mesa/main/mtypes.h<br>
+++ b/src/mesa/main/mtypes.h<br>
@@ -1538,7 +1538,7 @@ struct gl_vertex_array_object<br>
GLbitfield VertexAttribBufferMask;<br>
<br>
/** Mask of VERT_BIT_* values indicating which arrays are enabled */<br>
- GLbitfield _Enabled;<br>
+ GLbitfield Enabled;<br>
<br>
/**<br>
* Mask of VERT_BIT_* enabled arrays past position/generic0 mapping<br>
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c<br>
index 2e27a16a99..e1675ff513 100644<br>
--- a/src/mesa/main/varray.c<br>
+++ b/src/mesa/main/varray.c<br>
@@ -141,7 +141,7 @@ update_attribute_map_mode(const struct gl_context *ctx,<br>
if (ctx->API != API_OPENGL_COMPAT)<br>
return;<br>
/* The generic0 attribute superseeds the position attribute */<br>
- const GLbitfield enabled = vao->_Enabled;<br>
+ const GLbitfield enabled = vao->Enabled;<br>
if (enabled & VERT_BIT_GENERIC0)<br>
vao->_AttributeMapMode = ATTRIBUTE_MAP_MODE_GENERIC0;<br>
else if (enabled & VERT_BIT_POS)<br>
@@ -177,7 +177,7 @@ _mesa_vertex_attrib_binding(struct gl_context *ctx,<br>
<br>
array->BufferBindingIndex = bindingIndex;<br>
<br>
- vao->NewArrays |= vao->_Enabled & array_bit;<br>
+ vao->NewArrays |= vao->Enabled & array_bit;<br>
if (vao == ctx->Array.VAO)<br>
ctx->NewState |= _NEW_ARRAY;<br>
}<br>
@@ -213,7 +213,7 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx,<br>
else<br>
vao->VertexAttribBufferMask |= binding->_BoundArrays;<br>
<br>
- vao->NewArrays |= vao->_Enabled & binding->_BoundArrays;<br>
+ vao->NewArrays |= vao->Enabled & binding->_BoundArrays;<br>
if (vao == ctx->Array.VAO)<br>
ctx->NewState |= _NEW_ARRAY;<br>
}<br>
@@ -236,7 +236,7 @@ vertex_binding_divisor(struct gl_context *ctx,<br>
<br>
if (binding->InstanceDivisor != divisor) {<br>
binding->InstanceDivisor = divisor;<br>
- vao->NewArrays |= vao->_Enabled & binding->_BoundArrays;<br>
+ vao->NewArrays |= vao->Enabled & binding->_BoundArrays;<br>
if (vao == ctx->Array.VAO)<br>
ctx->NewState |= _NEW_ARRAY;<br>
}<br>
@@ -347,7 +347,7 @@ _mesa_update_array_format(struct gl_context *ctx,<br>
array->RelativeOffset = relativeOffset;<br>
array->_ElementSize = elementSize;<br>
<br>
- vao->NewArrays |= vao->_Enabled & VERT_BIT(attrib);<br>
+ vao->NewArrays |= vao->Enabled & VERT_BIT(attrib);<br>
if (vao == ctx->Array.VAO)<br>
ctx->NewState |= _NEW_ARRAY;<br>
}<br>
@@ -605,7 +605,7 @@ update_array(struct gl_context *ctx,<br>
* to the VAO. But but that is done already unconditionally in<br>
* _mesa_update_array_format called above.<br>
*/<br>
- assert((vao->NewArrays | ~vao->_Enabled) & VERT_BIT(attrib));<br>
+ assert((vao->NewArrays | ~vao->Enabled) & VERT_BIT(attrib));<br>
array->Ptr = ptr;<br>
<br>
/* Update the vertex buffer binding */<br>
@@ -1082,7 +1082,7 @@ _mesa_enable_vertex_array_attrib(struct gl_context *ctx,<br>
/* was disabled, now being enabled */<br>
vao->VertexAttrib[attrib].Enabled = GL_TRUE;<br>
const GLbitfield array_bit = VERT_BIT(attrib);<br>
- vao->_Enabled |= array_bit;<br>
+ vao->Enabled |= array_bit;<br>
vao->NewArrays |= array_bit;<br>
<br>
if (vao == ctx->Array.VAO)<br>
@@ -1169,7 +1169,7 @@ _mesa_disable_vertex_array_attrib(struct gl_context *ctx,<br>
/* was enabled, now being disabled */<br>
vao->VertexAttrib[attrib].Enabled = GL_FALSE;<br>
const GLbitfield array_bit = VERT_BIT(attrib);<br>
- vao->_Enabled &= ~array_bit;<br>
+ vao->Enabled &= ~array_bit;<br>
vao->NewArrays |= array_bit;<br>
<br>
if (vao == ctx->Array.VAO)<br>
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c<br>
index dc6e8d3b8a..db95dbbc34 100644<br>
--- a/src/mesa/vbo/vbo_exec_draw.c<br>
+++ b/src/mesa/vbo/vbo_exec_draw.c<br>
@@ -191,12 +191,12 @@ vbo_exec_bind_arrays(struct gl_context *ctx)<br>
GLbitfield vao_enabled = _vbo_get_vao_enabled_from_vbo(mode, exec->vtx.enabled);<br>
<br>
/* At first disable arrays no longer needed */<br>
- GLbitfield mask = vao->_Enabled & ~vao_enabled;<br>
+ GLbitfield mask = vao->Enabled & ~vao_enabled;<br>
while (mask) {<br>
const int vao_attr = u_bit_scan(&mask);<br>
_mesa_disable_vertex_array_attrib(ctx, vao, vao_attr);<br>
}<br>
- assert((~vao_enabled & vao->_Enabled) == 0);<br>
+ assert((~vao_enabled & vao->Enabled) == 0);<br>
<br>
/* Bind the buffer object */<br>
const GLuint stride = exec->vtx.vertex_size*sizeof(GLfloat);<br>
@@ -222,13 +222,13 @@ vbo_exec_bind_arrays(struct gl_context *ctx)<br>
/* Set and enable */<br>
_vbo_set_attrib_format(ctx, vao, vao_attr, buffer_offset,<br>
size, type, offset);<br>
- if ((vao->_Enabled & VERT_BIT(vao_attr)) == 0)<br>
+ if ((vao->Enabled & VERT_BIT(vao_attr)) == 0)<br>
_mesa_enable_vertex_array_attrib(ctx, vao, vao_attr);<br>
<br>
/* The vao is initially created with all bindings set to 0. */<br>
assert(vao->VertexAttrib[vao_attr].BufferBindingIndex == 0);<br>
}<br>
- assert(vao_enabled == vao->_Enabled);<br>
+ assert(vao_enabled == vao->Enabled);<br>
assert(!_mesa_is_bufferobj(exec->vtx.bufferobj) ||<br>
(vao_enabled & ~vao->VertexAttribBufferMask) == 0);<br>
<br>
diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h<br>
index 86f6b41b79..1fc2ab48fd 100644<br>
--- a/src/mesa/vbo/vbo_private.h<br>
+++ b/src/mesa/vbo/vbo_private.h<br>
@@ -224,7 +224,7 @@ _vbo_set_attrib_format(struct gl_context *ctx,<br>
* to the VAO. But but that is done already unconditionally in<br>
* _mesa_update_array_format called above.<br>
*/<br>
- assert((vao->NewArrays | ~vao->_Enabled) & VERT_BIT(attr));<br>
+ assert((vao->NewArrays | ~vao->Enabled) & VERT_BIT(attr));<br>
vao->VertexAttrib[attr].Ptr = ADD_POINTERS(buffer_offset, offset);<br>
}<br>
<br>
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c<br>
index 05c894328e..97796aea53 100644<br>
--- a/src/mesa/vbo/vbo_save_api.c<br>
+++ b/src/mesa/vbo/vbo_save_api.c<br>
@@ -426,7 +426,7 @@ compare_vao(gl_vertex_processing_mode mode,<br>
return false;<br>
<br>
/* If the enabled arrays are not the same we are not equal. */<br>
- if (vao_enabled != vao->_Enabled)<br>
+ if (vao_enabled != vao->Enabled)<br>
return false;<br>
<br>
/* Check the buffer binding at 0 */<br>
@@ -517,7 +517,7 @@ update_vao(struct gl_context *ctx,<br>
_mesa_vertex_attrib_binding(ctx, *vao, vao_attr, 0);<br>
_mesa_enable_vertex_array_attrib(ctx, *vao, vao_attr);<br>
}<br>
- assert(vao_enabled == (*vao)->_Enabled);<br>
+ assert(vao_enabled == (*vao)->Enabled);<br>
assert((vao_enabled & ~(*vao)->VertexAttribBufferMask) == 0);<br>
<br>
/* Finalize and freeze the VAO */<br>
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c<br>
index 409a353b52..b3578cc27c 100644<br>
--- a/src/mesa/vbo/vbo_save_draw.c<br>
+++ b/src/mesa/vbo/vbo_save_draw.c<br>
@@ -47,7 +47,7 @@ copy_vao(struct gl_context *ctx, const struct gl_vertex_array_object *vao,<br>
{<br>
struct vbo_context *vbo = vbo_context(ctx);<br>
<br>
- mask &= vao->_Enabled;<br>
+ mask &= vao->Enabled;<br>
while (mask) {<br>
const int i = u_bit_scan(&mask);<br>
const struct gl_array_attributes *attrib = &vao->VertexAttrib[i];<br>
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c<br>
index eeb4580c54..7e9296bae2 100644<br>
--- a/src/mesa/vbo/vbo_save_loopback.c<br>
+++ b/src/mesa/vbo/vbo_save_loopback.c<br>
@@ -155,23 +155,23 @@ _vbo_loopback_vertex_list(struct gl_context *ctx,<br>
* the NV attributes entrypoints:<br>
*/<br>
const struct gl_vertex_array_object *vao = node->VAO[VP_MODE_FF];<br>
- GLbitfield mask = vao->_Enabled & VERT_BIT_MAT_ALL;<br>
+ GLbitfield mask = vao->Enabled & VERT_BIT_MAT_ALL;<br>
while (mask) {<br>
const int i = u_bit_scan(&mask);<br>
append_attr(&nr, la, i, VBO_MATERIAL_SHIFT, vao);<br>
}<br>
<br>
vao = node->VAO[VP_MODE_SHADER];<br>
- mask = vao->_Enabled & ~(VERT_BIT_POS | VERT_BIT_GENERIC0);<br>
+ mask = vao->Enabled & ~(VERT_BIT_POS | VERT_BIT_GENERIC0);<br>
while (mask) {<br>
const int i = u_bit_scan(&mask);<br>
append_attr(&nr, la, i, 0, vao);<br>
}<br>
<br>
/* The last in the list should be the vertex provoking attribute */<br>
- if (vao->_Enabled & VERT_BIT_GENERIC0) {<br>
+ if (vao->Enabled & VERT_BIT_GENERIC0) {<br>
append_attr(&nr, la, VERT_ATTRIB_GENERIC0, 0, vao);<br>
- } else if (vao->_Enabled & VERT_BIT_POS) {<br>
+ } else if (vao->Enabled & VERT_BIT_POS) {<br>
append_attr(&nr, la, VERT_ATTRIB_POS, 0, vao);<br>
}<br>
<br>
-- <br>
2.17.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>