Henri Verbeet : wined3d: Introduce a separate structure for OpenGL context information.
Alexandre Julliard
julliard at winehq.org
Thu May 2 16:45:10 CDT 2019
Module: wine
Branch: master
Commit: 5cd787b341673b945af19edfd53685ca657089d1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5cd787b341673b945af19edfd53685ca657089d1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu May 2 17:28:51 2019 +0430
wined3d: Introduce a separate structure for OpenGL context information.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/context.c | 6 ++++--
dlls/wined3d/wined3d_private.h | 5 +++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 5015586..4b6aaa9 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1886,6 +1886,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
struct wined3d_texture *target, const struct wined3d_format *ds_format)
{
struct wined3d_device *device = swapchain->device;
+ struct wined3d_context_gl *context_gl;
struct wined3d_context *context;
DWORD state;
@@ -1893,8 +1894,9 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
wined3d_from_cs(device->cs);
- if (!(context = heap_alloc_zero(sizeof(*context))))
+ if (!(context_gl = heap_alloc_zero(sizeof(*context_gl))))
return NULL;
+ context = &context_gl->c;
list_init(&context->timestamp_queries);
list_init(&context->occlusion_queries);
@@ -1977,7 +1979,7 @@ out:
wined3d_release_dc(swapchain->win_handle, context->hdc);
device->shader_backend->shader_free_context_data(context);
device->adapter->fragment_pipe->free_context_data(context);
- heap_free(context);
+ heap_free(context_gl);
return NULL;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index daba669..138cefb 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2029,6 +2029,11 @@ struct wined3d_context
unsigned int scissor_rect_count;
};
+struct wined3d_context_gl
+{
+ struct wined3d_context c;
+};
+
struct wined3d_fb_state
{
struct wined3d_rendertarget_view *render_targets[MAX_RENDER_TARGET_VIEWS];
More information about the wine-cvs
mailing list