wined3d: Call wined3d_adapter_init() before initialising any adapter field.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d16a353700
commit
597433ab6b
|
@ -2914,10 +2914,6 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal,
|
||||||
if (!(adapter = heap_alloc_zero(sizeof(*adapter))))
|
if (!(adapter = heap_alloc_zero(sizeof(*adapter))))
|
||||||
return NULL;
|
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))
|
if (!wined3d_adapter_init(adapter, ordinal, &wined3d_adapter_no3d_ops))
|
||||||
{
|
{
|
||||||
heap_free(adapter);
|
heap_free(adapter);
|
||||||
|
@ -2930,6 +2926,10 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal,
|
||||||
return NULL;
|
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->vertex_pipe = &none_vertex_pipe;
|
||||||
adapter->fragment_pipe = &none_fragment_pipe;
|
adapter->fragment_pipe = &none_fragment_pipe;
|
||||||
adapter->misc_state_template = misc_state_template_no3d;
|
adapter->misc_state_template = misc_state_template_no3d;
|
||||||
|
|
Loading…
Reference in New Issue