Commit 2f36d600 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass an IWineD3DBaseShaderImpl pointer to shader_generate_main().

parent 51f06dcf
......@@ -3771,7 +3771,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
}
/* Base Shader Body */
shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function, &priv_ctx);
shader_generate_main((IWineD3DBaseShaderImpl *)This, buffer, reg_maps, function, &priv_ctx);
if(args->super.srgb_correction) {
arbfp_add_sRGB_correction(buffer, fragcolor, srgbtmp[0], srgbtmp[1], srgbtmp[2], srgbtmp[3],
......@@ -4182,7 +4182,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This,
/* The shader starts with the main function */
priv_ctx.in_main_func = TRUE;
/* Base Shader Body */
shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function, &priv_ctx);
shader_generate_main((IWineD3DBaseShaderImpl *)This, buffer, reg_maps, function, &priv_ctx);
if (!priv_ctx.footer_written) vshader_add_footer(&priv_ctx,
shader_data, args, reg_maps, gl_info, buffer);
......
......@@ -4004,7 +4004,7 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
}
/* Base Shader Body */
shader_generate_main((IWineD3DBaseShader *)This, buffer, reg_maps, function, &priv_ctx);
shader_generate_main((IWineD3DBaseShaderImpl *)This, buffer, reg_maps, function, &priv_ctx);
/* Pixel shaders < 2.0 place the resulting color in R0 implicitly */
if (reg_maps->shader_version.major < 2)
......@@ -4089,7 +4089,7 @@ static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context
shader_generate_glsl_declarations(context, buffer, (IWineD3DBaseShaderImpl *)This, reg_maps, &priv_ctx);
/* Base Shader Body */
shader_generate_main((IWineD3DBaseShader*)This, buffer, reg_maps, function, &priv_ctx);
shader_generate_main((IWineD3DBaseShaderImpl *)This, buffer, reg_maps, function, &priv_ctx);
/* Unpack outputs */
shader_addline(buffer, "order_ps_input(OUT);\n");
......
......@@ -1162,10 +1162,9 @@ void shader_dump_src_param(const struct wined3d_shader_src_param *param,
/* Shared code in order to generate the bulk of the shader string.
* NOTE: A description of how to parse tokens can be found on MSDN. */
void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer,
void shader_generate_main(IWineD3DBaseShaderImpl *shader, struct wined3d_shader_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx)
{
IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)iface;
IWineD3DDeviceImpl *device = shader->baseShader.device;
const struct wined3d_shader_frontend *fe = shader->baseShader.frontend;
void *fe_data = shader->baseShader.frontend_data;
......@@ -1186,7 +1185,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffe
loop_state.current_depth = 0;
loop_state.current_reg = 0;
ctx.shader = iface;
ctx.shader = (IWineD3DBaseShader *)shader;
ctx.gl_info = &device->adapter->gl_info;
ctx.reg_maps = reg_maps;
ctx.buffer = buffer;
......
......@@ -2782,7 +2782,7 @@ void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
const struct wined3d_shader_version *shader_version) DECLSPEC_HIDDEN;
unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_maps *reg_maps,
unsigned int max) DECLSPEC_HIDDEN;
void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer,
void shader_generate_main(IWineD3DBaseShaderImpl *shader, struct wined3d_shader_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, WINED3DDECLUSAGE usage) 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