Commit e45926d5 authored by Alexandre Julliard's avatar Alexandre Julliard

wined3d: Don't crash during initialization if the adapter doesn't have full GL info.

parent fb3ee6e0
......@@ -7034,13 +7034,17 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
select_shader_mode(&adapter->gl_info, &device->ps_selected_mode, &device->vs_selected_mode);
device->shader_backend = adapter->shader_backend;
if (device->shader_backend)
{
device->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps);
device->d3d_vshader_constantF = shader_caps.MaxVertexShaderConst;
device->d3d_pshader_constantF = shader_caps.MaxPixelShaderConst;
device->vs_clipping = shader_caps.VSClipping;
}
fragment_pipeline = adapter->fragment_pipe;
device->frag_pipe = fragment_pipeline;
if (fragment_pipeline)
{
fragment_pipeline->get_caps(&adapter->gl_info, &ffp_caps);
device->max_ffp_textures = ffp_caps.MaxSimultaneousTextures;
......@@ -7052,7 +7056,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
IWineD3D_Release(device->wined3d);
return hr;
}
}
device->blitter = adapter->blitter;
return WINED3D_OK;
......
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