The flush_vertices argument is now unused, remove it.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
GL_FALSE, GL_FALSE,
offsetof(struct vertex, x));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_GENERIC(0),
- *buf_obj, 0, sizeof(struct vertex), true);
+ *buf_obj, 0, sizeof(struct vertex));
_mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_GENERIC(0), true);
+ VERT_ATTRIB_GENERIC(0));
if (texcoord_size > 0) {
_mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_GENERIC(1),
texcoord_size, GL_FLOAT, GL_RGBA,
GL_FALSE, GL_FALSE, GL_FALSE,
offsetof(struct vertex, tex));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_GENERIC(1),
- *buf_obj, 0, sizeof(struct vertex), true);
+ *buf_obj, 0, sizeof(struct vertex));
_mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_GENERIC(1), true);
+ VERT_ATTRIB_GENERIC(1));
}
} else {
_mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_POS,
GL_FALSE, GL_FALSE,
offsetof(struct vertex, x));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_POS,
- *buf_obj, 0, sizeof(struct vertex), true);
- _mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_POS, true);
+ *buf_obj, 0, sizeof(struct vertex));
+ _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS);
if (texcoord_size > 0) {
_mesa_update_array_format(ctx, array_obj, VERT_ATTRIB_TEX(0),
GL_FALSE, GL_FALSE,
offsetof(struct vertex, tex));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_TEX(0),
- *buf_obj, 0, sizeof(struct vertex), true);
+ *buf_obj, 0, sizeof(struct vertex));
_mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_TEX(0), true);
+ VERT_ATTRIB_TEX(0));
}
if (color_size > 0) {
GL_FALSE, GL_FALSE,
offsetof(struct vertex, r));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_COLOR0,
- *buf_obj, 0, sizeof(struct vertex), true);
+ *buf_obj, 0, sizeof(struct vertex));
_mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_COLOR0, true);
+ VERT_ATTRIB_COLOR0);
}
}
} else {
GL_FALSE, GL_FALSE,
offsetof(struct vertex, x));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_POS,
- drawtex->buf_obj, 0,
- sizeof(struct vertex), true);
- _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS, true);
+ drawtex->buf_obj, 0, sizeof(struct vertex));
+ _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_POS);
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
GL_FALSE, GL_FALSE,
offsetof(struct vertex, st[i]));
_mesa_bind_vertex_buffer(ctx, array_obj, VERT_ATTRIB_TEX(i),
- drawtex->buf_obj, 0,
- sizeof(struct vertex), true);
- _mesa_enable_vertex_array_attrib(ctx, array_obj,
- VERT_ATTRIB_TEX(i), true);
+ drawtex->buf_obj, 0, sizeof(struct vertex));
+ _mesa_enable_vertex_array_attrib(ctx, array_obj, VERT_ATTRIB_TEX(i));
}
}
else {
if (vao->BufferBinding[index].BufferObj == obj) {
_mesa_bind_vertex_buffer(ctx, vao, index, ctx->Shared->NullBufferObj,
vao->BufferBinding[index].Offset,
- vao->BufferBinding[index].Stride, true);
+ vao->BufferBinding[index].Stride);
}
}
vao_state(struct gl_context *ctx, gl_vert_attrib attr, GLboolean state)
{
if (state)
- _mesa_enable_vertex_array_attrib(ctx, ctx->Array.VAO, attr, true);
+ _mesa_enable_vertex_array_attrib(ctx, ctx->Array.VAO, attr);
else
- _mesa_disable_vertex_array_attrib(ctx, ctx->Array.VAO, attr, true);
+ _mesa_disable_vertex_array_attrib(ctx, ctx->Array.VAO, attr);
}
_mesa_vertex_attrib_binding(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
gl_vert_attrib attribIndex,
- GLuint bindingIndex, bool flush_vertices)
+ GLuint bindingIndex)
{
struct gl_array_attributes *array = &vao->VertexAttrib[attribIndex];
assert(!vao->SharedAndImmutable);
struct gl_vertex_array_object *vao,
GLuint index,
struct gl_buffer_object *vbo,
- GLintptr offset, GLsizei stride, bool flush_vertices)
+ GLintptr offset, GLsizei stride)
{
assert(index < ARRAY_SIZE(vao->BufferBinding));
assert(!vao->SharedAndImmutable);
normalized, integer, doubles, 0);
/* Reset the vertex attrib binding */
- _mesa_vertex_attrib_binding(ctx, vao, attrib, attrib, true);
+ _mesa_vertex_attrib_binding(ctx, vao, attrib, attrib);
/* The Stride and Ptr fields are not set by update_array_format() */
struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
GLsizei effectiveStride = stride != 0 ? stride : array->_ElementSize;
_mesa_bind_vertex_buffer(ctx, vao, attrib,
ctx->Array.ArrayBufferObj, (GLintptr) ptr,
- effectiveStride, true);
+ effectiveStride);
}
void GLAPIENTRY
void
_mesa_enable_vertex_array_attrib(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
- gl_vert_attrib attrib, bool flush_vertices)
+ gl_vert_attrib attrib)
{
assert(attrib < ARRAY_SIZE(vao->VertexAttrib));
assert(!vao->SharedAndImmutable);
return;
}
- _mesa_enable_vertex_array_attrib(ctx, vao,
- VERT_ATTRIB_GENERIC(index), true);
+ _mesa_enable_vertex_array_attrib(ctx, vao, VERT_ATTRIB_GENERIC(index));
}
{
GET_CURRENT_CONTEXT(ctx);
_mesa_enable_vertex_array_attrib(ctx, ctx->Array.VAO,
- VERT_ATTRIB_GENERIC(index), true);
+ VERT_ATTRIB_GENERIC(index));
}
{
GET_CURRENT_CONTEXT(ctx);
struct gl_vertex_array_object *vao = _mesa_lookup_vao(ctx, vaobj);
- _mesa_enable_vertex_array_attrib(ctx, vao,
- VERT_ATTRIB_GENERIC(index), true);
+ _mesa_enable_vertex_array_attrib(ctx, vao, VERT_ATTRIB_GENERIC(index));
}
void
_mesa_disable_vertex_array_attrib(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
- gl_vert_attrib attrib, bool flush_vertices)
+ gl_vert_attrib attrib)
{
assert(attrib < ARRAY_SIZE(vao->VertexAttrib));
assert(!vao->SharedAndImmutable);
}
const gl_vert_attrib attrib = VERT_ATTRIB_GENERIC(index);
- _mesa_disable_vertex_array_attrib(ctx, ctx->Array.VAO, attrib, true);
+ _mesa_disable_vertex_array_attrib(ctx, ctx->Array.VAO, attrib);
}
{
GET_CURRENT_CONTEXT(ctx);
const gl_vert_attrib attrib = VERT_ATTRIB_GENERIC(index);
- _mesa_disable_vertex_array_attrib(ctx, ctx->Array.VAO, attrib, true);
+ _mesa_disable_vertex_array_attrib(ctx, ctx->Array.VAO, attrib);
}
}
const gl_vert_attrib attrib = VERT_ATTRIB_GENERIC(index);
- _mesa_disable_vertex_array_attrib(ctx, vao, attrib, true);
+ _mesa_disable_vertex_array_attrib(ctx, vao, attrib);
}
GET_CURRENT_CONTEXT(ctx);
struct gl_vertex_array_object *vao = _mesa_lookup_vao(ctx, vaobj);
const gl_vert_attrib attrib = VERT_ATTRIB_GENERIC(index);
- _mesa_disable_vertex_array_attrib(ctx, vao, attrib, true);
+ _mesa_disable_vertex_array_attrib(ctx, vao, attrib);
}
* VertexAttribBinding(index, index);
* VertexBindingDivisor(index, divisor);"
*/
- _mesa_vertex_attrib_binding(ctx, vao, genericIndex, genericIndex, true);
+ _mesa_vertex_attrib_binding(ctx, vao, genericIndex, genericIndex);
vertex_binding_divisor(ctx, vao, genericIndex, divisor);
}
* VertexAttribBinding(index, index);
* VertexBindingDivisor(index, divisor);"
*/
- _mesa_vertex_attrib_binding(ctx, vao, genericIndex, genericIndex, true);
+ _mesa_vertex_attrib_binding(ctx, vao, genericIndex, genericIndex);
vertex_binding_divisor(ctx, vao, genericIndex, divisor);
}
}
_mesa_bind_vertex_buffer(ctx, vao, VERT_ATTRIB_GENERIC(bindingIndex),
- vbo, offset, stride, true);
+ vbo, offset, stride);
}
for (i = 0; i < count; i++)
_mesa_bind_vertex_buffer(ctx, vao, VERT_ATTRIB_GENERIC(first + i),
- vbo, 0, 16, true);
+ vbo, 0, 16);
return;
}
}
_mesa_bind_vertex_buffer(ctx, vao, VERT_ATTRIB_GENERIC(first + i),
- vbo, offsets[i], strides[i], true);
+ vbo, offsets[i], strides[i]);
}
_mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
_mesa_vertex_attrib_binding(ctx, vao,
VERT_ATTRIB_GENERIC(attribIndex),
- VERT_ATTRIB_GENERIC(bindingIndex), true);
+ VERT_ATTRIB_GENERIC(bindingIndex));
}
GET_CURRENT_CONTEXT(ctx);
_mesa_vertex_attrib_binding(ctx, ctx->Array.VAO,
VERT_ATTRIB_GENERIC(attribIndex),
- VERT_ATTRIB_GENERIC(bindingIndex), true);
+ VERT_ATTRIB_GENERIC(bindingIndex));
}
struct gl_vertex_array_object *vao = _mesa_lookup_vao(ctx, vaobj);
_mesa_vertex_attrib_binding(ctx, vao,
VERT_ATTRIB_GENERIC(attribIndex),
- VERT_ATTRIB_GENERIC(bindingIndex), true);
+ VERT_ATTRIB_GENERIC(bindingIndex));
}
extern void
_mesa_enable_vertex_array_attrib(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
- gl_vert_attrib attrib, bool flush_vertices);
+ gl_vert_attrib attrib);
extern void
_mesa_disable_vertex_array_attrib(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
- gl_vert_attrib attrib, bool flush_vertices);
+ gl_vert_attrib attrib);
extern void
_mesa_vertex_attrib_binding(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
gl_vert_attrib attribIndex,
- GLuint bindingIndex, bool flush_vertices);
+ GLuint bindingIndex);
extern void
struct gl_vertex_array_object *vao,
GLuint index,
struct gl_buffer_object *vbo,
- GLintptr offset, GLsizei stride, bool flush_vertices);
+ GLintptr offset, GLsizei stride);
extern void GLAPIENTRY
_mesa_VertexPointer_no_error(GLint size, GLenum type, GLsizei stride,
rs->ctx = ctx;
rs->VAO = _mesa_new_vao(ctx, ~((GLuint)0));
- _mesa_vertex_attrib_binding(ctx, rs->VAO, VERT_ATTRIB_POS, 0, false);
+ _mesa_vertex_attrib_binding(ctx, rs->VAO, VERT_ATTRIB_POS, 0);
_mesa_update_array_format(ctx, rs->VAO, VERT_ATTRIB_POS, 4, GL_FLOAT,
GL_RGBA, GL_FALSE, GL_FALSE, GL_FALSE, 0);
- _mesa_enable_vertex_array_attrib(ctx, rs->VAO, 0, false);
+ _mesa_enable_vertex_array_attrib(ctx, rs->VAO, 0);
rs->prim.mode = GL_POINTS;
rs->prim.indexed = 0;
vbo->VAO = _mesa_new_vao(ctx, ~((GLuint)0));
/* The exec VAO assumes to have all arributes bound to binding 0 */
for (unsigned i = 0; i < VERT_ATTRIB_MAX; ++i)
- _mesa_vertex_attrib_binding(ctx, vbo->VAO, i, 0, false);
+ _mesa_vertex_attrib_binding(ctx, vbo->VAO, i, 0);
_math_init_eval();
GLbitfield mask = vao->_Enabled & ~vao_enabled;
while (mask) {
const int vao_attr = u_bit_scan(&mask);
- _mesa_disable_vertex_array_attrib(ctx, vao, vao_attr, false);
+ _mesa_disable_vertex_array_attrib(ctx, vao, vao_attr);
}
assert((~vao_enabled & vao->_Enabled) == 0);
const GLuint stride = exec->vtx.vertex_size*sizeof(GLfloat);
assert(stride <= ctx->Const.MaxVertexAttribStride);
_mesa_bind_vertex_buffer(ctx, vao, 0, exec->vtx.bufferobj, buffer_offset,
- stride, false);
+ stride);
/* Retrieve the mapping from VBO_ATTRIB to VERT_ATTRIB space
* Note that the position/generic0 aliasing is done in the VAO.
_vbo_set_attrib_format(ctx, vao, vao_attr, buffer_offset,
size, type, offset);
if ((vao->_Enabled & VERT_BIT(vao_attr)) == 0)
- _mesa_enable_vertex_array_attrib(ctx, vao, vao_attr, false);
+ _mesa_enable_vertex_array_attrib(ctx, vao, vao_attr);
/* The vao is initially created with all bindings set to 0. */
assert(vao->VertexAttrib[vao_attr].BufferBindingIndex == 0);
*/
/* Bind the buffer object at binding point 0 */
- _mesa_bind_vertex_buffer(ctx, *vao, 0, bo, buffer_offset, stride, false);
+ _mesa_bind_vertex_buffer(ctx, *vao, 0, bo, buffer_offset, stride);
/* Retrieve the mapping from VBO_ATTRIB to VERT_ATTRIB space
* Note that the position/generic0 aliasing is done in the VAO.
_vbo_set_attrib_format(ctx, *vao, vao_attr, buffer_offset,
size[vbo_attr], type[vbo_attr], offset[vbo_attr]);
- _mesa_vertex_attrib_binding(ctx, *vao, vao_attr, 0, false);
- _mesa_enable_vertex_array_attrib(ctx, *vao, vao_attr, false);
+ _mesa_vertex_attrib_binding(ctx, *vao, vao_attr, 0);
+ _mesa_enable_vertex_array_attrib(ctx, *vao, vao_attr);
}
assert(vao_enabled == (*vao)->_Enabled);
assert((vao_enabled & ~(*vao)->VertexAttribBufferMask) == 0);