Commit f7580726 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Don't pass the device to gen_ffp_frag_op.

parent 820c12c9
......@@ -6410,7 +6410,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
{
/* Find or create a shader implementing the fixed function pipeline
* settings, then activate it. */
gen_ffp_frag_op(device, state, &settings, FALSE);
gen_ffp_frag_op(context, state, &settings, FALSE);
desc = (const struct arbfp_ffp_desc *)find_ffp_frag_shader(&priv->fragment_shaders, &settings);
if(!desc) {
struct arbfp_ffp_desc *new_desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_desc));
......
......@@ -844,7 +844,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined
DWORD mapped_stage;
unsigned int i;
gen_ffp_frag_op(device, state, &settings, TRUE);
gen_ffp_frag_op(context, state, &settings, TRUE);
desc = (const struct atifs_ffp_desc *)find_ffp_frag_shader(&priv->fragment_shaders, &settings);
if(!desc) {
struct atifs_ffp_desc *new_desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_desc));
......
......@@ -5532,7 +5532,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struc
struct glsl_ffp_fragment_shader *ffp_shader;
struct ffp_frag_settings settings;
gen_ffp_frag_op(device, state, &settings, FALSE);
gen_ffp_frag_op(context, state, &settings, FALSE);
ffp_shader = shader_glsl_find_ffp_fragment_shader(priv, gl_info, &settings);
ps_id = ffp_shader->id;
ps_list = &ffp_shader->linked_programs;
......
......@@ -3090,7 +3090,7 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) {
return size;
}
void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_state *state,
void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d_state *state,
struct ffp_frag_settings *settings, BOOL ignore_textype)
{
#define ARG1 0x01
......@@ -3130,8 +3130,8 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
const struct wined3d_surface *rt = state->fb->render_targets[0];
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
for (i = 0; i < gl_info->limits.texture_stages; ++i)
{
......
......@@ -1674,7 +1674,7 @@ struct ffp_frag_desc
extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions DECLSPEC_HIDDEN;
extern const struct wined3d_parent_ops wined3d_null_parent_ops DECLSPEC_HIDDEN;
void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_state *state,
void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d_state *state,
struct ffp_frag_settings *settings, BOOL ignore_textype) DECLSPEC_HIDDEN;
const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders,
const struct ffp_frag_settings *settings) DECLSPEC_HIDDEN;
......
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