mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
vbo: use inputs_read var to simplify code
v2: add some const qualifiers, per Ian. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
e6e78d98a2
commit
f5140c1a6b
2 changed files with 8 additions and 8 deletions
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue