Commit 202a60c4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Explicitly pass gl_info to shader_arb_generate_vshader().

parent db164a99
...@@ -4067,14 +4067,13 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu ...@@ -4067,14 +4067,13 @@ static void init_output_registers(IWineD3DVertexShaderImpl *shader, DWORD sig_nu
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct wined3d_shader_buffer *buffer, static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This,
const struct wined3d_gl_info *gl_info, struct wined3d_shader_buffer *buffer,
const struct arb_vs_compile_args *args, struct arb_vs_compiled_shader *compiled) const struct arb_vs_compile_args *args, struct arb_vs_compiled_shader *compiled)
{ {
const struct arb_vshader_private *shader_data = This->baseShader.backend_data; const struct arb_vshader_private *shader_data = This->baseShader.backend_data;
const struct wined3d_shader_reg_maps *reg_maps = &This->baseShader.reg_maps; const struct wined3d_shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function; CONST DWORD *function = This->baseShader.function;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const local_constant *lconst; const local_constant *lconst;
GLuint ret; GLuint ret;
DWORD next_local, *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This); DWORD next_local, *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This);
...@@ -4163,6 +4162,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct ...@@ -4163,6 +4162,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
*/ */
if (!gl_info->supported[NV_VERTEX_PROGRAM]) if (!gl_info->supported[NV_VERTEX_PROGRAM])
{ {
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
const char *color_init = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_0001); const char *color_init = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_0001);
shader_addline(buffer, "MOV result.color.secondary, %s;\n", color_init); shader_addline(buffer, "MOV result.color.secondary, %s;\n", color_init);
...@@ -4401,7 +4401,7 @@ static struct arb_vs_compiled_shader *find_arb_vshader(IWineD3DVertexShaderImpl ...@@ -4401,7 +4401,7 @@ static struct arb_vs_compiled_shader *find_arb_vshader(IWineD3DVertexShaderImpl
return 0; return 0;
} }
ret = shader_arb_generate_vshader(shader, &buffer, args, ret = shader_arb_generate_vshader(shader, gl_info, &buffer, args,
&shader_data->gl_shaders[shader_data->num_gl_shaders]); &shader_data->gl_shaders[shader_data->num_gl_shaders]);
shader_buffer_free(&buffer); shader_buffer_free(&buffer);
shader_data->gl_shaders[shader_data->num_gl_shaders].prgId = ret; shader_data->gl_shaders[shader_data->num_gl_shaders].prgId = ret;
......
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