diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 9fcd96b864a..8e1ac4819c5 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -144,6 +144,7 @@ static void wined3d_buffer_gl_bind(struct wined3d_buffer_gl *buffer_gl, struct w static void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *buffer_gl, struct wined3d_context *context) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(context); struct wined3d_resource *resource = &buffer_gl->b.resource; const struct wined3d_gl_info *gl_info = context->gl_info; @@ -179,7 +180,7 @@ static void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *bu * when deleting a potentially bound transform feedback buffer. * This may happen when the device is being destroyed. */ WARN("Deleting buffer object for buffer %p, disabling transform feedback.\n", buffer_gl); - context_end_transform_feedback(context); + wined3d_context_gl_end_transform_feedback(context_gl); } } } diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index b443fcd98ed..18a17163cba 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -4085,20 +4085,22 @@ static BOOL use_transform_feedback(const struct wined3d_state *state) return shader->u.gs.so_desc.element_count; } -void context_end_transform_feedback(struct wined3d_context *context) +void wined3d_context_gl_end_transform_feedback(struct wined3d_context_gl *context_gl) { - const struct wined3d_gl_info *gl_info = context->gl_info; - if (context->transform_feedback_active) + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; + + if (context_gl->c.transform_feedback_active) { GL_EXTCALL(glEndTransformFeedback()); checkGLcall("glEndTransformFeedback"); - context->transform_feedback_active = 0; - context->transform_feedback_paused = 0; + context_gl->c.transform_feedback_active = 0; + context_gl->c.transform_feedback_paused = 0; } } static void context_pause_transform_feedback(struct wined3d_context *context, BOOL force) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context->gl_info; if (!context->transform_feedback_active || context->transform_feedback_paused) @@ -4115,7 +4117,7 @@ static void context_pause_transform_feedback(struct wined3d_context *context, BO WARN("Cannot pause transform feedback operations.\n"); if (force) - context_end_transform_feedback(context); + wined3d_context_gl_end_transform_feedback(context_gl); } static void context_setup_target(struct wined3d_context *context, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 2b01caa3e6e..a31f08574ed 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4448,13 +4448,14 @@ static void state_uav_warn(struct wined3d_context *context, const struct wined3d static void state_so(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { + struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_buffer *buffer; unsigned int offset, size, i; TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); - context_end_transform_feedback(context); + wined3d_context_gl_end_transform_feedback(context_gl); for (i = 0; i < ARRAY_SIZE(state->stream_output); ++i) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 588d7e5b582..dad878cab2a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2091,6 +2091,7 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl, const struct wined3d_bo_address *src, GLenum src_binding, size_t size) DECLSPEC_HIDDEN; void wined3d_context_gl_destroy(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; void wined3d_context_gl_enable_clip_distances(struct wined3d_context_gl *context_gl, uint32_t mask) DECLSPEC_HIDDEN; +void wined3d_context_gl_end_transform_feedback(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; void wined3d_context_gl_free_fence(struct wined3d_fence *fence) DECLSPEC_HIDDEN; void wined3d_context_gl_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; void wined3d_context_gl_free_pipeline_statistics_query(struct wined3d_pipeline_statistics_query *query) DECLSPEC_HIDDEN; @@ -2250,7 +2251,6 @@ void context_draw_shaded_quad(struct wined3d_context *context, struct wined3d_te void context_draw_textured_quad(struct wined3d_context *context, struct wined3d_texture_gl *texture_gl, unsigned int sub_resource_idx, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -void context_end_transform_feedback(struct wined3d_context *context) DECLSPEC_HIDDEN; struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN; DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN; void context_gl_resource_released(struct wined3d_device *device,