diff options
author | Rob Clark <[email protected]> | 2016-07-05 15:41:26 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-07-06 10:17:30 -0400 |
commit | 64d35f817afc3106684dd74491b14be4d676cb88 (patch) | |
tree | 94e3b6297aa32985f8d9f26c72a53f730da4885b /src/mesa/vbo/vbo_exec_draw.c | |
parent | 23dd9eaa94e97450582059763fcb479e1e8fe818 (diff) |
vbo: fix attr reset
In bc4e0c4 (vbo: Use a bitmask to track the active arrays in vbo_exec*.)
we stopped looping over all the attributes and resetting all slots.
Which exposed an issue in vbo_exec_bind_arrays() for handling GENERIC0
vs. POS.
Split out a helper which can reset a particular slot, so that
vbo_exec_bind_arrays() can re-use it to reset POS.
This fixes an issue with 0ad (and possibly others).
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 8d1b2c08d27..0ef30819e22 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -213,7 +213,7 @@ vbo_exec_bind_arrays( struct gl_context *ctx ) exec->vtx.inputs[VERT_ATTRIB_GENERIC0] = exec->vtx.inputs[0]; exec->vtx.attrsz[VERT_ATTRIB_GENERIC0] = exec->vtx.attrsz[0]; exec->vtx.attrptr[VERT_ATTRIB_GENERIC0] = exec->vtx.attrptr[0]; - exec->vtx.attrsz[0] = 0; + vbo_reset_attr(exec, VERT_ATTRIB_POS); exec->vtx.enabled &= (~BITFIELD64_BIT(VBO_ATTRIB_POS)); exec->vtx.enabled |= BITFIELD64_BIT(VBO_ATTRIB_GENERIC0); } |