wined3d: Emit position / attribute 0 last in draw_primitive_immediate_mode().
Emitting the position / attribute 0 provokes the actual vertex emission, so
needs to happen last. This fixes a regression introduced by commit
f3c155cc56
.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f69cf783df
commit
abad305c1a
|
@ -214,9 +214,9 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const
|
|||
unsigned int element_idx;
|
||||
|
||||
stride_idx = get_stride_idx(idx_data, idx_size, state->base_vertex_index, start_idx, vertex_idx);
|
||||
for (element_idx = 0; use_map; use_map >>= 1, ++element_idx)
|
||||
for (element_idx = MAX_ATTRIBS - 1; use_map; use_map &= ~(1u << element_idx), --element_idx)
|
||||
{
|
||||
if (!(use_map & 1u))
|
||||
if (!(use_map & 1u << element_idx))
|
||||
continue;
|
||||
|
||||
ptr = si->elements[element_idx].data.addr + si->elements[element_idx].stride * stride_idx;
|
||||
|
@ -329,12 +329,6 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const
|
|||
|
||||
stride_idx = get_stride_idx(idx_data, idx_size, state->base_vertex_index, start_idx, vertex_idx);
|
||||
|
||||
if (position)
|
||||
{
|
||||
ptr = position + stride_idx * si->elements[WINED3D_FFP_POSITION].stride;
|
||||
ops->position[si->elements[WINED3D_FFP_POSITION].format->emit_idx](ptr);
|
||||
}
|
||||
|
||||
if (normal)
|
||||
{
|
||||
ptr = normal + stride_idx * si->elements[WINED3D_FFP_NORMAL].stride;
|
||||
|
@ -379,6 +373,12 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const
|
|||
ops->texcoord[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->emit_idx](
|
||||
GL_TEXTURE0_ARB + context->tex_unit_map[texture_idx], ptr);
|
||||
}
|
||||
|
||||
if (position)
|
||||
{
|
||||
ptr = position + stride_idx * si->elements[WINED3D_FFP_POSITION].stride;
|
||||
ops->position[si->elements[WINED3D_FFP_POSITION].format->emit_idx](ptr);
|
||||
}
|
||||
}
|
||||
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
|
|
Loading…
Reference in New Issue