Commit 597433ab authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

wined3d: Call wined3d_adapter_init() before initialising any adapter field.

parent d16a3537
......@@ -2914,10 +2914,6 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal,
if (!(adapter = heap_alloc_zero(sizeof(*adapter))))
return NULL;
wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0, 0);
adapter->vram_bytes_used = 0;
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes));
if (!wined3d_adapter_init(adapter, ordinal, &wined3d_adapter_no3d_ops))
{
heap_free(adapter);
......@@ -2930,6 +2926,10 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal,
return NULL;
}
wined3d_driver_info_init(&adapter->driver_info, &gpu_description, 0, 0);
adapter->vram_bytes_used = 0;
TRACE("Emulating 0x%s bytes of video ram.\n", wine_dbgstr_longlong(adapter->driver_info.vram_bytes));
adapter->vertex_pipe = &none_vertex_pipe;
adapter->fragment_pipe = &none_fragment_pipe;
adapter->misc_state_template = misc_state_template_no3d;
......
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