[PATCH 5/6] wined3d: Pass a wined3d_context_gl structure to context_update_stream_sources().
Matteo Bruni
mbruni at codeweavers.com
Mon May 13 13:34:21 CDT 2019
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
dlls/wined3d/context.c | 18 +++++++++---------
dlls/wined3d/state.c | 4 ++--
dlls/wined3d/wined3d_private.h | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index ac68d2e7fd8..073380fa99b 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -5543,24 +5543,24 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
checkGLcall("Loading numbered arrays");
}
-void context_update_stream_sources(struct wined3d_context *context, const struct wined3d_state *state)
+void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl,
+ const struct wined3d_state *state)
{
-
- if (context->use_immediate_mode_draw)
+ if (context_gl->c.use_immediate_mode_draw)
return;
- context_unload_vertex_data(context);
- if (context->d3d_info->ffp_generic_attributes || use_vs(state))
+ context_unload_vertex_data(&context_gl->c);
+ if (context_gl->c.d3d_info->ffp_generic_attributes || use_vs(state))
{
TRACE("Loading numbered arrays.\n");
- wined3d_context_gl_load_numbered_arrays(wined3d_context_gl(context), &context->stream_info, state);
+ wined3d_context_gl_load_numbered_arrays(context_gl, &context_gl->c.stream_info, state);
return;
}
TRACE("Loading named arrays.\n");
- context_unload_numbered_arrays(context);
- context_load_vertex_data(context, &context->stream_info, state);
- context->namedArraysLoaded = TRUE;
+ context_unload_numbered_arrays(&context_gl->c);
+ context_load_vertex_data(&context_gl->c, &context_gl->c.stream_info, state);
+ context_gl->c.namedArraysLoaded = TRUE;
}
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture,
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 729100adb21..08423e831fd 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3863,14 +3863,14 @@ static void streamsrc(struct wined3d_context *context, const struct wined3d_stat
{
if (isStateDirty(context, STATE_VDECL))
return;
- context_update_stream_sources(context, state);
+ wined3d_context_gl_update_stream_sources(wined3d_context_gl(context), state);
}
static void vdecl_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
if (isStateDirty(context, STATE_STREAMSRC))
return;
- context_update_stream_sources(context, state);
+ wined3d_context_gl_update_stream_sources(wined3d_context_gl(context), state);
}
static void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 13f8b570cc1..35291639505 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2072,6 +2072,8 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context_gl,
const struct wined3d_stream_info *si, GLuint *current_bo, const struct wined3d_state *state) DECLSPEC_HIDDEN;
+void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl,
+ const struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_fb_state
{
@@ -2266,8 +2268,6 @@ void context_texture_update(struct wined3d_context *context,
void context_unload_tex_coords(const struct wined3d_context *context) DECLSPEC_HIDDEN;
void context_unmap_bo_address(struct wined3d_context *context,
const struct wined3d_bo_address *data, GLenum binding) DECLSPEC_HIDDEN;
-void context_update_stream_sources(struct wined3d_context *context,
- const struct wined3d_state *state) DECLSPEC_HIDDEN;
/*****************************************************************************
* Internal representation of a light
--
2.21.0
More information about the wine-devel
mailing list