wined3d: Resume transform feedback after geometry shader switch.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3ca84a348e
commit
ac793e5503
|
@ -16870,7 +16870,6 @@ static void test_stream_output_resume(void)
|
||||||
for (j = 0; j < 6; ++j) /* 2 triangles */
|
for (j = 0; j < 6; ++j) /* 2 triangles */
|
||||||
{
|
{
|
||||||
data = get_readback_vec4(&rb, idx++, 0);
|
data = get_readback_vec4(&rb, idx++, 0);
|
||||||
todo_wine
|
|
||||||
ok(compare_vec4(data, &constants[i], 0),
|
ok(compare_vec4(data, &constants[i], 0),
|
||||||
"Got unexpected result {%.8e, %.8e, %.8e, %.8e} at %u (%u, %u).\n",
|
"Got unexpected result {%.8e, %.8e, %.8e, %.8e} at %u (%u, %u).\n",
|
||||||
data->x, data->y, data->z, data->w, idx, i, j);
|
data->x, data->y, data->z, data->w, idx, i, j);
|
||||||
|
|
|
@ -414,6 +414,27 @@ static BOOL use_transform_feedback(const struct wined3d_state *state)
|
||||||
return shader->u.gs.so_desc.element_count;
|
return shader->u.gs.so_desc.element_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void context_pause_transform_feedback(struct wined3d_context *context, BOOL force)
|
||||||
|
{
|
||||||
|
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||||
|
|
||||||
|
if (!context->transform_feedback_active || context->transform_feedback_paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gl_info->supported[ARB_TRANSFORM_FEEDBACK2])
|
||||||
|
{
|
||||||
|
GL_EXTCALL(glPauseTransformFeedback());
|
||||||
|
checkGLcall("glPauseTransformFeedback");
|
||||||
|
context->transform_feedback_paused = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WARN("Cannot pause transform feedback operations.\n");
|
||||||
|
|
||||||
|
if (force)
|
||||||
|
context_end_transform_feedback(context);
|
||||||
|
}
|
||||||
|
|
||||||
/* Routine common to the draw primitive and draw indexed primitive routines */
|
/* Routine common to the draw primitive and draw indexed primitive routines */
|
||||||
void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state,
|
void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state,
|
||||||
int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
|
int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
|
||||||
|
@ -447,8 +468,8 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||||
}
|
}
|
||||||
gl_info = context->gl_info;
|
gl_info = context->gl_info;
|
||||||
|
|
||||||
if (context->transform_feedback_active && !use_transform_feedback(state))
|
if (!use_transform_feedback(state))
|
||||||
context_end_transform_feedback(context);
|
context_pause_transform_feedback(context, TRUE);
|
||||||
|
|
||||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||||
{
|
{
|
||||||
|
@ -599,19 +620,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||||
checkGLcall("glMemoryBarrier");
|
checkGLcall("glMemoryBarrier");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context->transform_feedback_active)
|
context_pause_transform_feedback(context, FALSE);
|
||||||
{
|
|
||||||
if (gl_info->supported[ARB_TRANSFORM_FEEDBACK2])
|
|
||||||
{
|
|
||||||
GL_EXTCALL(glPauseTransformFeedback());
|
|
||||||
checkGLcall("glPauseTransformFeedback");
|
|
||||||
context->transform_feedback_paused = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WARN("Cannot pause transform feedback operations.\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rasterizer_discard)
|
if (rasterizer_discard)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue