Commit 33d38219 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Pass a wined3d_context_gl structure to context_update_stream_sources().

parent 24f906f4
...@@ -5531,24 +5531,24 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c ...@@ -5531,24 +5531,24 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
checkGLcall("Loading numbered arrays"); 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_gl->c.use_immediate_mode_draw)
if (context->use_immediate_mode_draw)
return; return;
context_unload_vertex_data(context); context_unload_vertex_data(&context_gl->c);
if (context->d3d_info->ffp_generic_attributes || use_vs(state)) if (context_gl->c.d3d_info->ffp_generic_attributes || use_vs(state))
{ {
TRACE("Loading numbered arrays.\n"); 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; return;
} }
TRACE("Loading named arrays.\n"); TRACE("Loading named arrays.\n");
context_unload_numbered_arrays(context); context_unload_numbered_arrays(&context_gl->c);
context_load_vertex_data(context, &context->stream_info, state); context_load_vertex_data(&context_gl->c, &context_gl->c.stream_info, state);
context->namedArraysLoaded = TRUE; context_gl->c.namedArraysLoaded = TRUE;
} }
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture, static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture,
......
...@@ -3863,14 +3863,14 @@ static void streamsrc(struct wined3d_context *context, const struct wined3d_stat ...@@ -3863,14 +3863,14 @@ static void streamsrc(struct wined3d_context *context, const struct wined3d_stat
{ {
if (isStateDirty(context, STATE_VDECL)) if (isStateDirty(context, STATE_VDECL))
return; 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) static void vdecl_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{ {
if (isStateDirty(context, STATE_STREAMSRC)) if (isStateDirty(context, STATE_STREAMSRC))
return; 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) static void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
......
...@@ -2080,6 +2080,8 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, ...@@ -2080,6 +2080,8 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context_gl, 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; 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;
HRESULT wined3d_context_vk_init(struct wined3d_context *context_vk, HRESULT wined3d_context_vk_init(struct wined3d_context *context_vk,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
...@@ -2264,8 +2266,6 @@ void context_texture_update(struct wined3d_context *context, ...@@ -2264,8 +2266,6 @@ void context_texture_update(struct wined3d_context *context,
void context_unload_tex_coords(const struct wined3d_context *context) DECLSPEC_HIDDEN; void context_unload_tex_coords(const struct wined3d_context *context) DECLSPEC_HIDDEN;
void context_unmap_bo_address(struct wined3d_context *context, void context_unmap_bo_address(struct wined3d_context *context,
const struct wined3d_bo_address *data, GLenum binding) DECLSPEC_HIDDEN; 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 * Internal representation of a light
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment