mesa: Rename gl_vertex_array_object::_Enabled -> Enabled.
Mark the up to now derived bitfield value now as primary value by removing the underscore. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
@@ -478,7 +478,7 @@ compute_vbo_offset_range(const struct gl_vertex_array_object *vao,
|
|||||||
GLuint max_offset = 0;
|
GLuint max_offset = 0;
|
||||||
|
|
||||||
/* We work on the unmapped originaly VAO array entries. */
|
/* We work on the unmapped originaly VAO array entries. */
|
||||||
GLbitfield mask = vao->_Enabled & binding->_BoundArrays;
|
GLbitfield mask = vao->Enabled & binding->_BoundArrays;
|
||||||
/* The binding should be active somehow, not to return inverted ranges */
|
/* The binding should be active somehow, not to return inverted ranges */
|
||||||
assert(mask);
|
assert(mask);
|
||||||
while (mask) {
|
while (mask) {
|
||||||
@@ -597,7 +597,7 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,
|
|||||||
*/
|
*/
|
||||||
const gl_attribute_map_mode mode = vao->_AttributeMapMode;
|
const gl_attribute_map_mode mode = vao->_AttributeMapMode;
|
||||||
/* Enabled array bits. */
|
/* Enabled array bits. */
|
||||||
const GLbitfield enabled = vao->_Enabled;
|
const GLbitfield enabled = vao->Enabled;
|
||||||
/* VBO array bits. */
|
/* VBO array bits. */
|
||||||
const GLbitfield vbos = vao->VertexAttribBufferMask;
|
const GLbitfield vbos = vao->VertexAttribBufferMask;
|
||||||
|
|
||||||
@@ -756,8 +756,8 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,
|
|||||||
* grouping information in a seperate array beside
|
* grouping information in a seperate array beside
|
||||||
* gl_array_attributes/gl_vertex_buffer_binding.
|
* gl_array_attributes/gl_vertex_buffer_binding.
|
||||||
*/
|
*/
|
||||||
assert(util_bitcount(binding->_BoundArrays & vao->_Enabled) == 1
|
assert(util_bitcount(binding->_BoundArrays & vao->Enabled) == 1
|
||||||
|| (vao->_Enabled & ~binding->_BoundArrays) == 0);
|
|| (vao->Enabled & ~binding->_BoundArrays) == 0);
|
||||||
|
|
||||||
/* Start this current effective binding with the array */
|
/* Start this current effective binding with the array */
|
||||||
GLbitfield eff_bound_arrays = bound;
|
GLbitfield eff_bound_arrays = bound;
|
||||||
@@ -776,8 +776,8 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx,
|
|||||||
&vao->BufferBinding[attrib2->BufferBindingIndex];
|
&vao->BufferBinding[attrib2->BufferBindingIndex];
|
||||||
|
|
||||||
/* See the comment at the same assert above. */
|
/* See the comment at the same assert above. */
|
||||||
assert(util_bitcount(binding2->_BoundArrays & vao->_Enabled) == 1
|
assert(util_bitcount(binding2->_BoundArrays & vao->Enabled) == 1
|
||||||
|| (vao->_Enabled & ~binding->_BoundArrays) == 0);
|
|| (vao->Enabled & ~binding->_BoundArrays) == 0);
|
||||||
|
|
||||||
/* Check if we have an identical binding */
|
/* Check if we have an identical binding */
|
||||||
if (binding->Stride != binding2->Stride)
|
if (binding->Stride != binding2->Stride)
|
||||||
@@ -871,7 +871,7 @@ bool
|
|||||||
_mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)
|
_mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
/* Walk those enabled arrays that have the default vbo attached */
|
/* Walk those enabled arrays that have the default vbo attached */
|
||||||
GLbitfield mask = vao->_Enabled & ~vao->VertexAttribBufferMask;
|
GLbitfield mask = vao->Enabled & ~vao->VertexAttribBufferMask;
|
||||||
|
|
||||||
while (mask) {
|
while (mask) {
|
||||||
/* Do not use u_bit_scan64 as we can walk multiple
|
/* Do not use u_bit_scan64 as we can walk multiple
|
||||||
@@ -883,7 +883,7 @@ _mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)
|
|||||||
const struct gl_vertex_buffer_binding *buffer_binding =
|
const struct gl_vertex_buffer_binding *buffer_binding =
|
||||||
&vao->BufferBinding[attrib_array->BufferBindingIndex];
|
&vao->BufferBinding[attrib_array->BufferBindingIndex];
|
||||||
|
|
||||||
/* Only enabled arrays shall appear in the _Enabled bitmask */
|
/* Only enabled arrays shall appear in the Enabled bitmask */
|
||||||
assert(attrib_array->Enabled);
|
assert(attrib_array->Enabled);
|
||||||
/* We have already masked out vao->VertexAttribBufferMask */
|
/* We have already masked out vao->VertexAttribBufferMask */
|
||||||
assert(!_mesa_is_bufferobj(buffer_binding->BufferObj));
|
assert(!_mesa_is_bufferobj(buffer_binding->BufferObj));
|
||||||
@@ -905,7 +905,7 @@ bool
|
|||||||
_mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
|
_mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
/* Walk the enabled arrays that have a vbo attached */
|
/* Walk the enabled arrays that have a vbo attached */
|
||||||
GLbitfield mask = vao->_Enabled & vao->VertexAttribBufferMask;
|
GLbitfield mask = vao->Enabled & vao->VertexAttribBufferMask;
|
||||||
|
|
||||||
while (mask) {
|
while (mask) {
|
||||||
const int i = ffs(mask) - 1;
|
const int i = ffs(mask) - 1;
|
||||||
@@ -914,7 +914,7 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
|
|||||||
const struct gl_vertex_buffer_binding *buffer_binding =
|
const struct gl_vertex_buffer_binding *buffer_binding =
|
||||||
&vao->BufferBinding[attrib_array->BufferBindingIndex];
|
&vao->BufferBinding[attrib_array->BufferBindingIndex];
|
||||||
|
|
||||||
/* Only enabled arrays shall appear in the _Enabled bitmask */
|
/* Only enabled arrays shall appear in the Enabled bitmask */
|
||||||
assert(attrib_array->Enabled);
|
assert(attrib_array->Enabled);
|
||||||
/* We have already masked with vao->VertexAttribBufferMask */
|
/* We have already masked with vao->VertexAttribBufferMask */
|
||||||
assert(_mesa_is_bufferobj(buffer_binding->BufferObj));
|
assert(_mesa_is_bufferobj(buffer_binding->BufferObj));
|
||||||
|
@@ -111,7 +111,7 @@ _mesa_vao_attribute_map[ATTRIBUTE_MAP_MODE_MAX][VERT_ATTRIB_MAX];
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply the position/generic0 aliasing map to a bitfield from the vao.
|
* Apply the position/generic0 aliasing map to a bitfield from the vao.
|
||||||
* Use for example to convert gl_vertex_array_object::_Enabled
|
* Use for example to convert gl_vertex_array_object::Enabled
|
||||||
* or gl_vertex_buffer_binding::_VertexBinding from the vao numbering to
|
* or gl_vertex_buffer_binding::_VertexBinding from the vao numbering to
|
||||||
* the numbering used with vertex processing inputs.
|
* the numbering used with vertex processing inputs.
|
||||||
*/
|
*/
|
||||||
@@ -143,7 +143,7 @@ static inline GLbitfield
|
|||||||
_mesa_get_vao_vp_inputs(const struct gl_vertex_array_object *vao)
|
_mesa_get_vao_vp_inputs(const struct gl_vertex_array_object *vao)
|
||||||
{
|
{
|
||||||
const gl_attribute_map_mode mode = vao->_AttributeMapMode;
|
const gl_attribute_map_mode mode = vao->_AttributeMapMode;
|
||||||
return _mesa_vao_enable_to_vp_inputs(mode, vao->_Enabled);
|
return _mesa_vao_enable_to_vp_inputs(mode, vao->Enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1576,8 +1576,8 @@ copy_array_object(struct gl_context *ctx,
|
|||||||
_mesa_copy_vertex_buffer_binding(ctx, &dest->BufferBinding[i], &src->BufferBinding[i]);
|
_mesa_copy_vertex_buffer_binding(ctx, &dest->BufferBinding[i], &src->BufferBinding[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _Enabled must be the same than on push */
|
/* Enabled must be the same than on push */
|
||||||
dest->_Enabled = src->_Enabled;
|
dest->Enabled = src->Enabled;
|
||||||
dest->_EffEnabledVBO = src->_EffEnabledVBO;
|
dest->_EffEnabledVBO = src->_EffEnabledVBO;
|
||||||
/* The bitmask of bound VBOs needs to match the VertexBinding array */
|
/* The bitmask of bound VBOs needs to match the VertexBinding array */
|
||||||
dest->VertexAttribBufferMask = src->VertexAttribBufferMask;
|
dest->VertexAttribBufferMask = src->VertexAttribBufferMask;
|
||||||
|
@@ -1100,7 +1100,7 @@ valid_draw_indirect(struct gl_context *ctx,
|
|||||||
* buffer bound.
|
* buffer bound.
|
||||||
*/
|
*/
|
||||||
if (_mesa_is_gles31(ctx) &&
|
if (_mesa_is_gles31(ctx) &&
|
||||||
ctx->Array.VAO->_Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {
|
ctx->Array.VAO->Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(No VBO bound)", name);
|
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(No VBO bound)", name);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -1538,7 +1538,7 @@ struct gl_vertex_array_object
|
|||||||
GLbitfield VertexAttribBufferMask;
|
GLbitfield VertexAttribBufferMask;
|
||||||
|
|
||||||
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
|
/** Mask of VERT_BIT_* values indicating which arrays are enabled */
|
||||||
GLbitfield _Enabled;
|
GLbitfield Enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mask of VERT_BIT_* enabled arrays past position/generic0 mapping
|
* Mask of VERT_BIT_* enabled arrays past position/generic0 mapping
|
||||||
|
@@ -141,7 +141,7 @@ update_attribute_map_mode(const struct gl_context *ctx,
|
|||||||
if (ctx->API != API_OPENGL_COMPAT)
|
if (ctx->API != API_OPENGL_COMPAT)
|
||||||
return;
|
return;
|
||||||
/* The generic0 attribute superseeds the position attribute */
|
/* The generic0 attribute superseeds the position attribute */
|
||||||
const GLbitfield enabled = vao->_Enabled;
|
const GLbitfield enabled = vao->Enabled;
|
||||||
if (enabled & VERT_BIT_GENERIC0)
|
if (enabled & VERT_BIT_GENERIC0)
|
||||||
vao->_AttributeMapMode = ATTRIBUTE_MAP_MODE_GENERIC0;
|
vao->_AttributeMapMode = ATTRIBUTE_MAP_MODE_GENERIC0;
|
||||||
else if (enabled & VERT_BIT_POS)
|
else if (enabled & VERT_BIT_POS)
|
||||||
@@ -177,7 +177,7 @@ _mesa_vertex_attrib_binding(struct gl_context *ctx,
|
|||||||
|
|
||||||
array->BufferBindingIndex = bindingIndex;
|
array->BufferBindingIndex = bindingIndex;
|
||||||
|
|
||||||
vao->NewArrays |= vao->_Enabled & array_bit;
|
vao->NewArrays |= vao->Enabled & array_bit;
|
||||||
if (vao == ctx->Array.VAO)
|
if (vao == ctx->Array.VAO)
|
||||||
ctx->NewState |= _NEW_ARRAY;
|
ctx->NewState |= _NEW_ARRAY;
|
||||||
}
|
}
|
||||||
@@ -213,7 +213,7 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx,
|
|||||||
else
|
else
|
||||||
vao->VertexAttribBufferMask |= binding->_BoundArrays;
|
vao->VertexAttribBufferMask |= binding->_BoundArrays;
|
||||||
|
|
||||||
vao->NewArrays |= vao->_Enabled & binding->_BoundArrays;
|
vao->NewArrays |= vao->Enabled & binding->_BoundArrays;
|
||||||
if (vao == ctx->Array.VAO)
|
if (vao == ctx->Array.VAO)
|
||||||
ctx->NewState |= _NEW_ARRAY;
|
ctx->NewState |= _NEW_ARRAY;
|
||||||
}
|
}
|
||||||
@@ -236,7 +236,7 @@ vertex_binding_divisor(struct gl_context *ctx,
|
|||||||
|
|
||||||
if (binding->InstanceDivisor != divisor) {
|
if (binding->InstanceDivisor != divisor) {
|
||||||
binding->InstanceDivisor = divisor;
|
binding->InstanceDivisor = divisor;
|
||||||
vao->NewArrays |= vao->_Enabled & binding->_BoundArrays;
|
vao->NewArrays |= vao->Enabled & binding->_BoundArrays;
|
||||||
if (vao == ctx->Array.VAO)
|
if (vao == ctx->Array.VAO)
|
||||||
ctx->NewState |= _NEW_ARRAY;
|
ctx->NewState |= _NEW_ARRAY;
|
||||||
}
|
}
|
||||||
@@ -347,7 +347,7 @@ _mesa_update_array_format(struct gl_context *ctx,
|
|||||||
array->RelativeOffset = relativeOffset;
|
array->RelativeOffset = relativeOffset;
|
||||||
array->_ElementSize = elementSize;
|
array->_ElementSize = elementSize;
|
||||||
|
|
||||||
vao->NewArrays |= vao->_Enabled & VERT_BIT(attrib);
|
vao->NewArrays |= vao->Enabled & VERT_BIT(attrib);
|
||||||
if (vao == ctx->Array.VAO)
|
if (vao == ctx->Array.VAO)
|
||||||
ctx->NewState |= _NEW_ARRAY;
|
ctx->NewState |= _NEW_ARRAY;
|
||||||
}
|
}
|
||||||
@@ -605,7 +605,7 @@ update_array(struct gl_context *ctx,
|
|||||||
* to the VAO. But but that is done already unconditionally in
|
* to the VAO. But but that is done already unconditionally in
|
||||||
* _mesa_update_array_format called above.
|
* _mesa_update_array_format called above.
|
||||||
*/
|
*/
|
||||||
assert((vao->NewArrays | ~vao->_Enabled) & VERT_BIT(attrib));
|
assert((vao->NewArrays | ~vao->Enabled) & VERT_BIT(attrib));
|
||||||
array->Ptr = ptr;
|
array->Ptr = ptr;
|
||||||
|
|
||||||
/* Update the vertex buffer binding */
|
/* Update the vertex buffer binding */
|
||||||
@@ -1082,7 +1082,7 @@ _mesa_enable_vertex_array_attrib(struct gl_context *ctx,
|
|||||||
/* was disabled, now being enabled */
|
/* was disabled, now being enabled */
|
||||||
vao->VertexAttrib[attrib].Enabled = GL_TRUE;
|
vao->VertexAttrib[attrib].Enabled = GL_TRUE;
|
||||||
const GLbitfield array_bit = VERT_BIT(attrib);
|
const GLbitfield array_bit = VERT_BIT(attrib);
|
||||||
vao->_Enabled |= array_bit;
|
vao->Enabled |= array_bit;
|
||||||
vao->NewArrays |= array_bit;
|
vao->NewArrays |= array_bit;
|
||||||
|
|
||||||
if (vao == ctx->Array.VAO)
|
if (vao == ctx->Array.VAO)
|
||||||
@@ -1169,7 +1169,7 @@ _mesa_disable_vertex_array_attrib(struct gl_context *ctx,
|
|||||||
/* was enabled, now being disabled */
|
/* was enabled, now being disabled */
|
||||||
vao->VertexAttrib[attrib].Enabled = GL_FALSE;
|
vao->VertexAttrib[attrib].Enabled = GL_FALSE;
|
||||||
const GLbitfield array_bit = VERT_BIT(attrib);
|
const GLbitfield array_bit = VERT_BIT(attrib);
|
||||||
vao->_Enabled &= ~array_bit;
|
vao->Enabled &= ~array_bit;
|
||||||
vao->NewArrays |= array_bit;
|
vao->NewArrays |= array_bit;
|
||||||
|
|
||||||
if (vao == ctx->Array.VAO)
|
if (vao == ctx->Array.VAO)
|
||||||
|
@@ -191,12 +191,12 @@ vbo_exec_bind_arrays(struct gl_context *ctx)
|
|||||||
GLbitfield vao_enabled = _vbo_get_vao_enabled_from_vbo(mode, exec->vtx.enabled);
|
GLbitfield vao_enabled = _vbo_get_vao_enabled_from_vbo(mode, exec->vtx.enabled);
|
||||||
|
|
||||||
/* At first disable arrays no longer needed */
|
/* At first disable arrays no longer needed */
|
||||||
GLbitfield mask = vao->_Enabled & ~vao_enabled;
|
GLbitfield mask = vao->Enabled & ~vao_enabled;
|
||||||
while (mask) {
|
while (mask) {
|
||||||
const int vao_attr = u_bit_scan(&mask);
|
const int vao_attr = u_bit_scan(&mask);
|
||||||
_mesa_disable_vertex_array_attrib(ctx, vao, vao_attr);
|
_mesa_disable_vertex_array_attrib(ctx, vao, vao_attr);
|
||||||
}
|
}
|
||||||
assert((~vao_enabled & vao->_Enabled) == 0);
|
assert((~vao_enabled & vao->Enabled) == 0);
|
||||||
|
|
||||||
/* Bind the buffer object */
|
/* Bind the buffer object */
|
||||||
const GLuint stride = exec->vtx.vertex_size*sizeof(GLfloat);
|
const GLuint stride = exec->vtx.vertex_size*sizeof(GLfloat);
|
||||||
@@ -222,13 +222,13 @@ vbo_exec_bind_arrays(struct gl_context *ctx)
|
|||||||
/* Set and enable */
|
/* Set and enable */
|
||||||
_vbo_set_attrib_format(ctx, vao, vao_attr, buffer_offset,
|
_vbo_set_attrib_format(ctx, vao, vao_attr, buffer_offset,
|
||||||
size, type, offset);
|
size, type, offset);
|
||||||
if ((vao->_Enabled & VERT_BIT(vao_attr)) == 0)
|
if ((vao->Enabled & VERT_BIT(vao_attr)) == 0)
|
||||||
_mesa_enable_vertex_array_attrib(ctx, vao, vao_attr);
|
_mesa_enable_vertex_array_attrib(ctx, vao, vao_attr);
|
||||||
|
|
||||||
/* The vao is initially created with all bindings set to 0. */
|
/* The vao is initially created with all bindings set to 0. */
|
||||||
assert(vao->VertexAttrib[vao_attr].BufferBindingIndex == 0);
|
assert(vao->VertexAttrib[vao_attr].BufferBindingIndex == 0);
|
||||||
}
|
}
|
||||||
assert(vao_enabled == vao->_Enabled);
|
assert(vao_enabled == vao->Enabled);
|
||||||
assert(!_mesa_is_bufferobj(exec->vtx.bufferobj) ||
|
assert(!_mesa_is_bufferobj(exec->vtx.bufferobj) ||
|
||||||
(vao_enabled & ~vao->VertexAttribBufferMask) == 0);
|
(vao_enabled & ~vao->VertexAttribBufferMask) == 0);
|
||||||
|
|
||||||
|
@@ -224,7 +224,7 @@ _vbo_set_attrib_format(struct gl_context *ctx,
|
|||||||
* to the VAO. But but that is done already unconditionally in
|
* to the VAO. But but that is done already unconditionally in
|
||||||
* _mesa_update_array_format called above.
|
* _mesa_update_array_format called above.
|
||||||
*/
|
*/
|
||||||
assert((vao->NewArrays | ~vao->_Enabled) & VERT_BIT(attr));
|
assert((vao->NewArrays | ~vao->Enabled) & VERT_BIT(attr));
|
||||||
vao->VertexAttrib[attr].Ptr = ADD_POINTERS(buffer_offset, offset);
|
vao->VertexAttrib[attr].Ptr = ADD_POINTERS(buffer_offset, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -426,7 +426,7 @@ compare_vao(gl_vertex_processing_mode mode,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* If the enabled arrays are not the same we are not equal. */
|
/* If the enabled arrays are not the same we are not equal. */
|
||||||
if (vao_enabled != vao->_Enabled)
|
if (vao_enabled != vao->Enabled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Check the buffer binding at 0 */
|
/* Check the buffer binding at 0 */
|
||||||
@@ -517,7 +517,7 @@ update_vao(struct gl_context *ctx,
|
|||||||
_mesa_vertex_attrib_binding(ctx, *vao, vao_attr, 0);
|
_mesa_vertex_attrib_binding(ctx, *vao, vao_attr, 0);
|
||||||
_mesa_enable_vertex_array_attrib(ctx, *vao, vao_attr);
|
_mesa_enable_vertex_array_attrib(ctx, *vao, vao_attr);
|
||||||
}
|
}
|
||||||
assert(vao_enabled == (*vao)->_Enabled);
|
assert(vao_enabled == (*vao)->Enabled);
|
||||||
assert((vao_enabled & ~(*vao)->VertexAttribBufferMask) == 0);
|
assert((vao_enabled & ~(*vao)->VertexAttribBufferMask) == 0);
|
||||||
|
|
||||||
/* Finalize and freeze the VAO */
|
/* Finalize and freeze the VAO */
|
||||||
|
@@ -47,7 +47,7 @@ copy_vao(struct gl_context *ctx, const struct gl_vertex_array_object *vao,
|
|||||||
{
|
{
|
||||||
struct vbo_context *vbo = vbo_context(ctx);
|
struct vbo_context *vbo = vbo_context(ctx);
|
||||||
|
|
||||||
mask &= vao->_Enabled;
|
mask &= vao->Enabled;
|
||||||
while (mask) {
|
while (mask) {
|
||||||
const int i = u_bit_scan(&mask);
|
const int i = u_bit_scan(&mask);
|
||||||
const struct gl_array_attributes *attrib = &vao->VertexAttrib[i];
|
const struct gl_array_attributes *attrib = &vao->VertexAttrib[i];
|
||||||
|
@@ -155,23 +155,23 @@ _vbo_loopback_vertex_list(struct gl_context *ctx,
|
|||||||
* the NV attributes entrypoints:
|
* the NV attributes entrypoints:
|
||||||
*/
|
*/
|
||||||
const struct gl_vertex_array_object *vao = node->VAO[VP_MODE_FF];
|
const struct gl_vertex_array_object *vao = node->VAO[VP_MODE_FF];
|
||||||
GLbitfield mask = vao->_Enabled & VERT_BIT_MAT_ALL;
|
GLbitfield mask = vao->Enabled & VERT_BIT_MAT_ALL;
|
||||||
while (mask) {
|
while (mask) {
|
||||||
const int i = u_bit_scan(&mask);
|
const int i = u_bit_scan(&mask);
|
||||||
append_attr(&nr, la, i, VBO_MATERIAL_SHIFT, vao);
|
append_attr(&nr, la, i, VBO_MATERIAL_SHIFT, vao);
|
||||||
}
|
}
|
||||||
|
|
||||||
vao = node->VAO[VP_MODE_SHADER];
|
vao = node->VAO[VP_MODE_SHADER];
|
||||||
mask = vao->_Enabled & ~(VERT_BIT_POS | VERT_BIT_GENERIC0);
|
mask = vao->Enabled & ~(VERT_BIT_POS | VERT_BIT_GENERIC0);
|
||||||
while (mask) {
|
while (mask) {
|
||||||
const int i = u_bit_scan(&mask);
|
const int i = u_bit_scan(&mask);
|
||||||
append_attr(&nr, la, i, 0, vao);
|
append_attr(&nr, la, i, 0, vao);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The last in the list should be the vertex provoking attribute */
|
/* The last in the list should be the vertex provoking attribute */
|
||||||
if (vao->_Enabled & VERT_BIT_GENERIC0) {
|
if (vao->Enabled & VERT_BIT_GENERIC0) {
|
||||||
append_attr(&nr, la, VERT_ATTRIB_GENERIC0, 0, vao);
|
append_attr(&nr, la, VERT_ATTRIB_GENERIC0, 0, vao);
|
||||||
} else if (vao->_Enabled & VERT_BIT_POS) {
|
} else if (vao->Enabled & VERT_BIT_POS) {
|
||||||
append_attr(&nr, la, VERT_ATTRIB_POS, 0, vao);
|
append_attr(&nr, la, VERT_ATTRIB_POS, 0, vao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user