Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 3 +-- dlls/wined3d/adapter_vk.c | 3 +-- dlls/wined3d/directx.c | 7 ++++--- dlls/wined3d/wined3d_private.h | 3 ++- 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index d8414204ea0..0f554e7cf2e 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4570,7 +4570,7 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, TRACE("adapter_gl %p, ordinal %u, wined3d_creation_flags %#x.\n", adapter_gl, ordinal, wined3d_creation_flags);
- if (!wined3d_adapter_init(&adapter_gl->a, ordinal)) + if (!wined3d_adapter_init(&adapter_gl->a, ordinal, &wined3d_adapter_gl_ops)) return FALSE;
/* Dynamically load all GL core functions */ @@ -4660,7 +4660,6 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl, wined3d_caps_gl_ctx_destroy(&caps_gl_ctx);
wined3d_adapter_init_ffp_attrib_ops(&adapter_gl->a); - adapter_gl->a.adapter_ops = &wined3d_adapter_gl_ops;
return TRUE; } diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 4c01fb8fe86..464f7914098 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -648,7 +648,7 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, TRACE("adapter_vk %p, ordinal %u, wined3d_creation_flags %#x.\n", adapter_vk, ordinal, wined3d_creation_flags);
- if (!wined3d_adapter_init(adapter, ordinal)) + if (!wined3d_adapter_init(adapter, ordinal, &wined3d_adapter_vk_ops)) return FALSE;
if (!wined3d_init_vulkan(vk_info)) @@ -687,7 +687,6 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, adapter->vertex_pipe = &none_vertex_pipe; adapter->fragment_pipe = &none_fragment_pipe; adapter->shader_backend = &none_shader_backend; - adapter->adapter_ops = &wined3d_adapter_vk_ops;
adapter->d3d_info.wined3d_creation_flags = wined3d_creation_flags;
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3c89fad7d1a..cacd9ac1849 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2284,7 +2284,7 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, 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)) + if (!wined3d_adapter_init(adapter, ordinal, &wined3d_adapter_no3d_ops)) { heap_free(adapter); return NULL; @@ -2299,7 +2299,6 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, adapter->vertex_pipe = &none_vertex_pipe; adapter->fragment_pipe = &none_fragment_pipe; adapter->shader_backend = &none_shader_backend; - adapter->adapter_ops = &wined3d_adapter_no3d_ops;
wined3d_adapter_no3d_init_d3d_info(adapter, wined3d_creation_flags);
@@ -2308,7 +2307,8 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal, return adapter; }
-BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal) +BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal, + const struct wined3d_adapter_ops *adapter_ops) { DISPLAY_DEVICEW display_device;
@@ -2331,6 +2331,7 @@ BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal) memset(&adapter->device_uuid, 0, sizeof(adapter->device_uuid));
adapter->formats = NULL; + adapter->adapter_ops = adapter_ops;
return TRUE; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 15876e4f1ed..cf46f808e25 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2730,7 +2730,8 @@ struct wined3d_adapter const struct wined3d_adapter_ops *adapter_ops; };
-BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal) DECLSPEC_HIDDEN; +BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal, + const struct wined3d_adapter_ops *adapter_ops) DECLSPEC_HIDDEN; void wined3d_adapter_cleanup(struct wined3d_adapter *adapter) DECLSPEC_HIDDEN;
struct wined3d_adapter_gl