mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against upstream changes.
This commit is contained in:
parent
90eb3105b8
commit
040fd28c00
@ -1,4 +1,4 @@
|
||||
From b575a8659eb9daa7af14c15f9f564a19e4b5dbd5 Mon Sep 17 00:00:00 2001
|
||||
From 8ba268938be7e8f4c749be14decc23ebc67bcbc4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 12 Mar 2015 00:44:25 +0100
|
||||
Subject: server: Introduce a helper function to update the thread_input key
|
||||
@ -9,10 +9,10 @@ Subject: server: Introduce a helper function to update the thread_input key
|
||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 3a321cd..85c0786 100644
|
||||
index 350d45a..5031ac4 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -1215,9 +1215,9 @@ static void set_input_key_state( unsigned char *keystate, unsigned char key, int
|
||||
@@ -1238,9 +1238,9 @@ static void set_input_key_state( unsigned char *keystate, unsigned char key, int
|
||||
else keystate[key] &= ~0x80;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ index 3a321cd..85c0786 100644
|
||||
{
|
||||
unsigned char key;
|
||||
int down = 0;
|
||||
@@ -1279,6 +1279,12 @@ static void update_input_key_state( struct desktop *desktop, unsigned char *keys
|
||||
@@ -1302,6 +1302,12 @@ static void update_input_key_state( struct desktop *desktop, unsigned char *keys
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ index 3a321cd..85c0786 100644
|
||||
/* release the hardware message currently being processed by the given thread */
|
||||
static void release_hardware_message( struct msg_queue *queue, unsigned int hw_id,
|
||||
int remove )
|
||||
@@ -1309,7 +1315,7 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
|
||||
@@ -1332,7 +1338,7 @@ static void release_hardware_message( struct msg_queue *queue, unsigned int hw_i
|
||||
}
|
||||
if (clr_bit) clear_queue_bits( queue, clr_bit );
|
||||
|
||||
@ -47,16 +47,16 @@ index 3a321cd..85c0786 100644
|
||||
list_remove( &msg->entry );
|
||||
free_message( msg );
|
||||
}
|
||||
@@ -1430,7 +1436,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
|
||||
@@ -1451,7 +1457,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
|
||||
struct thread_input *input;
|
||||
unsigned int msg_code;
|
||||
struct hardware_msg_data *data = msg->data;
|
||||
|
||||
- update_input_key_state( desktop, desktop->keystate, msg );
|
||||
+ update_key_state( desktop, desktop->keystate, msg );
|
||||
last_input_time = get_tick_count();
|
||||
if (msg->msg != WM_MOUSEMOVE) always_queue = 1;
|
||||
|
||||
@@ -1473,7 +1479,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
|
||||
@@ -1494,7 +1500,7 @@ static void queue_hardware_message( struct desktop *desktop, struct message *msg
|
||||
win = find_hardware_message_window( desktop, input, msg, &msg_code, &thread );
|
||||
if (!win || !thread)
|
||||
{
|
||||
@ -65,7 +65,7 @@ index 3a321cd..85c0786 100644
|
||||
free_message( msg );
|
||||
return;
|
||||
}
|
||||
@@ -1911,7 +1917,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
@@ -1936,7 +1942,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
if (!win || !win_thread)
|
||||
{
|
||||
/* no window at all, remove it */
|
||||
@ -74,7 +74,7 @@ index 3a321cd..85c0786 100644
|
||||
list_remove( &msg->entry );
|
||||
free_message( msg );
|
||||
continue;
|
||||
@@ -1927,7 +1933,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
@@ -1952,7 +1958,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
else
|
||||
{
|
||||
/* for another thread input, drop it */
|
||||
@ -84,5 +84,5 @@ index 3a321cd..85c0786 100644
|
||||
free_message( msg );
|
||||
}
|
||||
--
|
||||
2.3.1
|
||||
2.3.5
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 97a7b572e7556d8867f025d94b9d361c3dd19a5a Mon Sep 17 00:00:00 2001
|
||||
From 5418bd3f836d3db0cbc70d5d5d79bc68a512414d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 15 Mar 2015 01:05:48 +0100
|
||||
Subject: server: Fix handling of GetMessage after previous PeekMessage call.
|
||||
@ -12,7 +12,7 @@ Changes in v2:
|
||||
2 files changed, 29 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
|
||||
index 5f10a89..dfb002e 100644
|
||||
index 5ef3840..9c2b249 100644
|
||||
--- a/dlls/user32/tests/msg.c
|
||||
+++ b/dlls/user32/tests/msg.c
|
||||
@@ -10459,13 +10459,10 @@ static void test_PeekMessage3(void)
|
||||
@ -63,10 +63,10 @@ index 5f10a89..dfb002e 100644
|
||||
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
|
||||
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 3a321cd..68b6a19 100644
|
||||
index 350d45a..4931760 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -138,6 +138,7 @@ struct msg_queue
|
||||
@@ -140,6 +140,7 @@ struct msg_queue
|
||||
struct thread_input *input; /* thread input descriptor */
|
||||
struct hook_table *hooks; /* hook table */
|
||||
timeout_t last_get_msg; /* time of last get message call */
|
||||
@ -74,7 +74,7 @@ index 3a321cd..68b6a19 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -292,6 +293,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -294,6 +295,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->input = (struct thread_input *)grab_object( input );
|
||||
queue->hooks = NULL;
|
||||
queue->last_get_msg = current_time;
|
||||
@ -82,7 +82,7 @@ index 3a321cd..68b6a19 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -479,13 +481,21 @@ static inline struct msg_queue *get_current_queue(void)
|
||||
@@ -491,13 +493,21 @@ static inline struct msg_queue *get_current_queue(void)
|
||||
}
|
||||
|
||||
/* get a (pseudo-)unique id to tag hardware messages */
|
||||
@ -105,7 +105,7 @@ index 3a321cd..68b6a19 100644
|
||||
/* try to merge a message with the last in the list; return 1 if successful */
|
||||
static int merge_message( struct thread_input *input, const struct message *msg )
|
||||
{
|
||||
@@ -772,6 +782,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
|
||||
@@ -786,6 +796,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
|
||||
{
|
||||
if (!match_window( win, msg->win )) continue;
|
||||
if (!check_msg_filter( msg->msg, first, last )) continue;
|
||||
@ -113,7 +113,7 @@ index 3a321cd..68b6a19 100644
|
||||
goto found; /* found one */
|
||||
}
|
||||
return 0;
|
||||
@@ -1341,6 +1352,7 @@ found:
|
||||
@@ -1364,6 +1375,7 @@ found:
|
||||
msg->msg = WM_HOTKEY;
|
||||
msg->wparam = hotkey->id;
|
||||
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
|
||||
@ -121,7 +121,7 @@ index 3a321cd..68b6a19 100644
|
||||
|
||||
free( msg->data );
|
||||
msg->data = NULL;
|
||||
@@ -1944,7 +1956,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
@@ -1969,7 +1981,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
|
||||
continue;
|
||||
}
|
||||
/* now we can return it */
|
||||
@ -130,15 +130,15 @@ index 3a321cd..68b6a19 100644
|
||||
reply->type = MSG_HARDWARE;
|
||||
reply->win = win;
|
||||
reply->msg = msg_code;
|
||||
@@ -2049,6 +2061,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
|
||||
@@ -2075,6 +2087,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
|
||||
msg->result = NULL;
|
||||
msg->data = NULL;
|
||||
msg->data_size = 0;
|
||||
+ msg->unique_id = get_unique_post_id();
|
||||
|
||||
list_add_tail( &thread->queue->msg_list[POST_MESSAGE], &msg->entry );
|
||||
set_queue_bits( thread->queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
|
||||
@@ -2263,6 +2276,7 @@ DECL_HANDLER(send_message)
|
||||
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
|
||||
|
||||
@@ -2292,6 +2305,7 @@ DECL_HANDLER(send_message)
|
||||
set_queue_bits( recv_queue, QS_SENDMESSAGE );
|
||||
break;
|
||||
case MSG_POSTED:
|
||||
@ -146,7 +146,7 @@ index 3a321cd..68b6a19 100644
|
||||
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
|
||||
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
|
||||
if (msg->msg == WM_HOTKEY)
|
||||
@@ -2392,7 +2406,7 @@ DECL_HANDLER(get_message)
|
||||
@@ -2421,7 +2435,7 @@ DECL_HANDLER(get_message)
|
||||
if ((filter & QS_INPUT) &&
|
||||
filter_contains_hw_range( req->get_first, req->get_last ) &&
|
||||
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
|
||||
@ -155,17 +155,17 @@ index 3a321cd..68b6a19 100644
|
||||
|
||||
/* now check for WM_PAINT */
|
||||
if ((filter & QS_PAINT) &&
|
||||
@@ -2405,7 +2419,7 @@ DECL_HANDLER(get_message)
|
||||
@@ -2434,7 +2448,7 @@ DECL_HANDLER(get_message)
|
||||
reply->wparam = 0;
|
||||
reply->lparam = 0;
|
||||
reply->time = get_tick_count();
|
||||
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
|
||||
- return;
|
||||
+ goto found_msg;
|
||||
}
|
||||
|
||||
/* now check for timer */
|
||||
@@ -2421,13 +2435,20 @@ DECL_HANDLER(get_message)
|
||||
reply->time = get_tick_count();
|
||||
@@ -2450,13 +2464,20 @@ DECL_HANDLER(get_message)
|
||||
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
|
||||
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
|
||||
set_event( current->process->idle_event );
|
||||
- return;
|
||||
@ -186,7 +186,7 @@ index 3a321cd..68b6a19 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -2445,7 +2466,10 @@ DECL_HANDLER(reply_message)
|
||||
@@ -2474,7 +2495,10 @@ DECL_HANDLER(reply_message)
|
||||
DECL_HANDLER(accept_hardware_message)
|
||||
{
|
||||
if (current->queue)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9e339aaca2d76bc24048081c3e47b49a840c716e Mon Sep 17 00:00:00 2001
|
||||
From 0140f5051aba3492e958ed4baf075a328de03c5e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -20,10 +20,10 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 172 insertions(+), 127 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index c3878ea..78ecff7 100644
|
||||
index f70562e..718ae0a 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -707,7 +707,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@@ -684,7 +684,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
{
|
||||
const struct wined3d_shader *pshader = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
const struct arb_ps_compiled_shader *gl_shader = priv->compiled_fprog;
|
||||
@ -32,7 +32,7 @@ index c3878ea..78ecff7 100644
|
||||
|
||||
/* Load DirectX 9 float constants for pixel shader */
|
||||
priv->highest_dirty_ps_const = shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
|
||||
@@ -4665,7 +4665,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
@@ -4652,7 +4652,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -42,7 +42,7 @@ index c3878ea..78ecff7 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 103d7eb..8f1860b 100644
|
||||
index 728a7cc..bf77b69 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1453,6 +1453,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@ -74,7 +74,7 @@ index 103d7eb..8f1860b 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2315,7 +2323,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2318,7 +2326,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -83,7 +83,7 @@ index 103d7eb..8f1860b 100644
|
||||
|| rt_count != context->gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
|
||||
@@ -2358,6 +2366,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2361,6 +2369,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(device,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
|
||||
}
|
||||
@ -92,7 +92,7 @@ index 103d7eb..8f1860b 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2408,7 +2418,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2411,7 +2421,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
@ -101,7 +101,7 @@ index 103d7eb..8f1860b 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2438,7 +2448,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2441,7 +2451,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_device *device = context->swapchain->device;
|
||||
@ -110,7 +110,7 @@ index 103d7eb..8f1860b 100644
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
||||
@@ -2468,6 +2478,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2471,6 +2481,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -119,7 +119,7 @@ index 103d7eb..8f1860b 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3056,7 +3068,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
@@ -3059,7 +3071,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||
{
|
||||
const struct wined3d_state *state = &device->state;
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -205,7 +205,7 @@ index 874129a..22a2de8 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c695c2f..4e83d14 100644
|
||||
index 596a8bd..f788cf2 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -269,9 +269,9 @@ index c695c2f..4e83d14 100644
|
||||
/* Unload resources */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
@@ -1086,37 +1098,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->shader_backend->shader_free_private(device);
|
||||
destroy_dummy_textures(device, gl_info);
|
||||
@@ -1092,37 +1104,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
* destroy the context. */
|
||||
context_release(context);
|
||||
|
||||
- /* Release the buffers (with sanity checks)*/
|
||||
- if (device->onscreen_depth_stencil)
|
||||
@ -307,7 +307,7 @@ index c695c2f..4e83d14 100644
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1136,9 +1117,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1140,9 +1121,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -317,7 +317,7 @@ index c695c2f..4e83d14 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1928,7 +1906,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -1932,7 +1910,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
surface = surface_from_resource(texture->sub_resources[0]);
|
||||
@ -326,7 +326,7 @@ index c695c2f..4e83d14 100644
|
||||
return;
|
||||
|
||||
wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
|
||||
@@ -3317,6 +3295,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
@@ -3321,6 +3299,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -335,7 +335,7 @@ index c695c2f..4e83d14 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
|
||||
|
||||
@@ -3328,7 +3308,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3332,7 +3312,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -344,7 +344,7 @@ index c695c2f..4e83d14 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3337,8 +3317,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3341,8 +3321,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -355,7 +355,7 @@ index c695c2f..4e83d14 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3697,8 +3677,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3701,8 +3681,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -366,7 +366,7 @@ index c695c2f..4e83d14 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3924,20 +3904,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -3928,20 +3908,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ index c695c2f..4e83d14 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -3977,13 +3958,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -3981,13 +3962,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -406,7 +406,7 @@ index c695c2f..4e83d14 100644
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -3995,18 +3976,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -3999,18 +3980,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -428,7 +428,7 @@ index c695c2f..4e83d14 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4363,10 +4345,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4367,10 +4349,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -440,7 +440,7 @@ index c695c2f..4e83d14 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4375,6 +4356,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4379,6 +4360,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -452,7 +452,7 @@ index c695c2f..4e83d14 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_surface_decref(device->onscreen_depth_stencil);
|
||||
@@ -4665,7 +4651,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4669,7 +4655,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -461,7 +461,7 @@ index c695c2f..4e83d14 100644
|
||||
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
|
||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
||||
device->update_state = &device->state;
|
||||
@@ -4674,22 +4660,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4678,22 +4664,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
else if (device->back_buffer_view)
|
||||
{
|
||||
@ -489,7 +489,7 @@ index c695c2f..4e83d14 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4780,17 +4765,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -4784,17 +4769,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -511,7 +511,7 @@ index c695c2f..4e83d14 100644
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4953,7 +4938,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -4957,7 +4942,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -577,10 +577,10 @@ index f2c2f42..c6a72fc 100644
|
||||
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index f1bf0a3..77c526e 100644
|
||||
index 851fc28..c4f00cb 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1083,7 +1083,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -1359,7 +1359,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct wined3d_state *state = &shader->device->state;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@ -590,10 +590,10 @@ index f1bf0a3..77c526e 100644
|
||||
const struct wined3d_shader_lconst *lconst;
|
||||
const char *prefix;
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index c249c9a..8a21921 100644
|
||||
index d9ff768..9217225 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -2344,7 +2344,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -2392,7 +2392,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
{
|
||||
@ -603,7 +603,7 @@ index c249c9a..8a21921 100644
|
||||
{
|
||||
static unsigned int warned = 0;
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index b025dff..9a52777 100644
|
||||
index c938771..3966130 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -790,10 +790,10 @@ index 62b1841..76a80e2 100644
|
||||
|
||||
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index b562f7a..870c32e 100644
|
||||
index 6f86bc4..ba6dfce 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3416,8 +3416,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -3418,8 +3418,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
struct wined3d_device *device = dst_surface->resource.device;
|
||||
@ -817,10 +817,10 @@ index 1ac5e7a..454cb21 100644
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_surface *front;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 5596375..17435c4 100644
|
||||
index 8a7075d..f9c7714 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3192,7 +3192,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -3293,7 +3293,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = context->render_offscreen
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -829,7 +829,7 @@ index 5596375..17435c4 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? 2.0f : 0.0f;
|
||||
float z_offset = zenable ? -1.0f : 0.0f;
|
||||
@@ -3686,7 +3686,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -3787,7 +3787,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
unsigned int i;
|
||||
DWORD ttff;
|
||||
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
|
||||
@ -839,10 +839,10 @@ index 5596375..17435c4 100644
|
||||
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e12ce80..2be7639 100644
|
||||
index 7308f6e..c440eda 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1124,6 +1124,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1126,6 +1126,36 @@ struct wined3d_timestamp_query
|
||||
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -879,7 +879,7 @@ index e12ce80..2be7639 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1138,6 +1168,7 @@ struct wined3d_context
|
||||
@@ -1140,6 +1170,7 @@ struct wined3d_context
|
||||
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
@ -887,7 +887,7 @@ index e12ce80..2be7639 100644
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1239,12 +1270,6 @@ struct wined3d_context
|
||||
@@ -1241,12 +1272,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -900,7 +900,7 @@ index e12ce80..2be7639 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1928,7 +1953,7 @@ struct wined3d_stream_state
|
||||
@@ -1930,7 +1955,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -909,7 +909,7 @@ index e12ce80..2be7639 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2034,7 +2059,6 @@ struct wined3d_device
|
||||
@@ -2036,7 +2061,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -917,7 +917,7 @@ index e12ce80..2be7639 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -2539,9 +2563,8 @@ struct wined3d_stateblock
|
||||
@@ -2542,9 +2566,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -929,7 +929,7 @@ index e12ce80..2be7639 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -2554,7 +2577,6 @@ struct wined3d_cs
|
||||
@@ -2557,7 +2580,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f0534e2583764b2f51690adb1e0b4c4264b4bfcb Mon Sep 17 00:00:00 2001
|
||||
From c75e1fc10eb6a040ef2736cee8262e4200366905 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 31 Jul 2013 23:18:28 +0200
|
||||
Subject: wined3d: Destroy shaders through the CS
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Destroy shaders through the CS
|
||||
3 files changed, 35 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d6581cf..24fdc17 100644
|
||||
index f088200..c745460 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -80,6 +80,7 @@ enum wined3d_cs_op
|
||||
@@ -81,6 +81,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_EVICT_RESOURCE,
|
||||
WINED3D_CS_OP_VIEW_DESTROY,
|
||||
WINED3D_CS_OP_VDECL_DESTROY,
|
||||
@ -21,7 +21,7 @@ index d6581cf..24fdc17 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -463,6 +464,12 @@ struct wined3d_cs_vertex_declaration_destroy
|
||||
@@ -473,6 +474,12 @@ struct wined3d_cs_vertex_declaration_destroy
|
||||
struct wined3d_vertex_declaration *declaration;
|
||||
};
|
||||
|
||||
@ -34,7 +34,7 @@ index d6581cf..24fdc17 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2282,6 +2289,27 @@ void wined3d_cs_emit_vertex_declaration_destroy(struct wined3d_cs *cs,
|
||||
@@ -2392,6 +2399,27 @@ void wined3d_cs_emit_vertex_declaration_destroy(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs, sizeof(*op));
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ index d6581cf..24fdc17 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2340,6 +2368,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2451,6 +2479,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_EVICT_RESOURCE */ wined3d_cs_exec_evict_resource,
|
||||
/* WINED3D_CS_OP_VIEW_DESTROY */ wined3d_cs_exec_view_destroy,
|
||||
/* WINED3D_CS_OP_VDECL_DESTROY */ wined3d_cs_exec_vertex_declaration_destroy,
|
||||
@ -71,10 +71,10 @@ index d6581cf..24fdc17 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 3323d12..1e9ff05 100644
|
||||
index ec2a269..04e217e 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -1812,7 +1812,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
||||
@@ -1859,7 +1859,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,8 +82,8 @@ index 3323d12..1e9ff05 100644
|
||||
+void shader_cleanup(struct wined3d_shader *shader)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, shader->output_signature.elements);
|
||||
HeapFree(GetProcessHeap(), 0, shader->signature_strings);
|
||||
@@ -2067,14 +2067,10 @@ ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
|
||||
HeapFree(GetProcessHeap(), 0, shader->input_signature.elements);
|
||||
@@ -2115,14 +2115,10 @@ ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -102,10 +102,10 @@ index 3323d12..1e9ff05 100644
|
||||
|
||||
return refcount;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 2df44a9..340ed08 100644
|
||||
index a2f2044..545c97e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2728,6 +2728,7 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
|
||||
@@ -2751,6 +2751,7 @@ void wined3d_cs_emit_buffer_preload(struct wined3d_cs *cs, struct wined3d_buffer
|
||||
void wined3d_cs_emit_view_destroy(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_vertex_declaration_destroy(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
@ -113,8 +113,8 @@ index 2df44a9..340ed08 100644
|
||||
|
||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||
* because only the driver knows about it, but we have a created state because d3d
|
||||
@@ -3120,6 +3121,7 @@ unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_map
|
||||
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_shader_buffer *buffer,
|
||||
@@ -3153,6 +3154,7 @@ unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_map
|
||||
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
|
||||
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
|
||||
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;
|
||||
+void shader_cleanup(struct wined3d_shader *shader) DECLSPEC_HIDDEN;
|
||||
@ -122,5 +122,5 @@ index 2df44a9..340ed08 100644
|
||||
static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
|
||||
{
|
||||
--
|
||||
2.3.3
|
||||
2.3.5
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
From 18d62357279e7f45df909bbbaa453ecef3fe6c40 Mon Sep 17 00:00:00 2001
|
||||
From c2fe136d2b070ad027b0805a24ed3664f02150c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Sun, 6 Oct 2013 16:20:32 +0200
|
||||
Subject: wined3d: Clean up texture resources through the cs.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 28 ++++++++++++++++++++++++++++
|
||||
dlls/wined3d/texture.c | 39 +++++++++++++++++++++++++++++++--------
|
||||
dlls/wined3d/texture.c | 38 ++++++++++++++++++++++++++++++--------
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 61 insertions(+), 8 deletions(-)
|
||||
3 files changed, 60 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 6010791..bea93f9 100644
|
||||
@ -70,7 +70,7 @@ index 6010791..bea93f9 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 35e3ebf..763b39b 100644
|
||||
index cded1c0..d0da497 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -123,17 +123,26 @@ static void wined3d_texture_unload_gl_texture(struct wined3d_texture *texture)
|
||||
@ -127,7 +127,7 @@ index 35e3ebf..763b39b 100644
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@@ -1012,12 +1019,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1012,6 +1019,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -135,14 +135,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP] && desc->pool != WINED3D_POOL_SCRATCH)
|
||||
{
|
||||
WARN("(%p) : Tried to create not supported cube texture.\n", texture);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1027,12 +1036,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1021,12 +1029,14 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -157,7 +150,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1053,6 +1064,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1047,6 +1057,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
@ -165,7 +158,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1062,6 +1074,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
@@ -1056,6 +1067,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wi
|
||||
surface_flags, WINED3D_GL_RES_TYPE_TEX_CUBE, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
@ -173,15 +166,15 @@ index 35e3ebf..763b39b 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1124,6 +1137,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1121,6 +1133,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
+ HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1154,6 +1168,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
format = wined3d_get_format(gl_info, desc->format);
|
||||
@@ -1152,6 +1165,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
@ -189,7 +182,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1166,12 +1181,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1164,12 +1178,14 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@ -204,7 +197,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1180,6 +1197,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -1195,6 +1211,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
surface_flags, WINED3D_GL_RES_TYPE_TEX_2D, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -212,7 +205,7 @@ index 35e3ebf..763b39b 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1358,12 +1376,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1367,12 +1384,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@ -227,7 +220,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1373,12 +1393,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1382,12 +1401,14 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@ -242,7 +235,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1406,6 +1428,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1415,6 +1436,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@ -250,7 +243,7 @@ index 35e3ebf..763b39b 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1415,6 +1438,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
@@ -1424,6 +1446,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
|
||||
0, WINED3D_GL_RES_TYPE_TEX_3D, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -258,7 +251,7 @@ index 35e3ebf..763b39b 100644
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1491,7 +1515,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
@@ -1500,7 +1523,6 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@ -267,10 +260,10 @@ index 35e3ebf..763b39b 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0e3901e..4dc917d 100644
|
||||
index de97d8b..f9a459a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2329,6 +2329,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
@@ -2332,6 +2332,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t
|
||||
|
||||
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
|
||||
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
@ -278,7 +271,7 @@ index 0e3901e..4dc917d 100644
|
||||
void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2758,6 +2759,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
@@ -2761,6 +2762,7 @@ void wined3d_cs_emit_resource_cleanup(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_buffer_cleanup(struct wined3d_cs *cs, struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_volume_cleanup(struct wined3d_cs *cs, struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_surface_cleanup(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
|
@ -1,14 +1,14 @@
|
||||
From f706600f7ffc7710a06809ff57ea8d59793f7d87 Mon Sep 17 00:00:00 2001
|
||||
From 4dd8d4df940d07ac83180fd8efa576d5f9cbfdae Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 11 Oct 2013 10:17:42 +0200
|
||||
Subject: wined3d: Delete GL contexts through the CS in uninit_3d.
|
||||
|
||||
---
|
||||
dlls/wined3d/device.c | 31 ++++---------------------------
|
||||
1 file changed, 4 insertions(+), 27 deletions(-)
|
||||
dlls/wined3d/device.c | 35 ++++-------------------------------
|
||||
1 file changed, 4 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 8d80044..bffeebb 100644
|
||||
index ee5139b..72e472e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1013,8 +1013,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
@ -33,7 +33,7 @@ index 8d80044..bffeebb 100644
|
||||
if (device->logo_texture)
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
|
||||
@@ -1061,24 +1053,8 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1061,30 +1053,8 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
TRACE("Unloading resource %p.\n", resource);
|
||||
wined3d_cs_emit_evict_resource(device->cs, resource);
|
||||
}
|
||||
@ -50,25 +50,22 @@ index 8d80044..bffeebb 100644
|
||||
- gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
|
||||
- device->depth_blt_texture = 0;
|
||||
- }
|
||||
|
||||
-
|
||||
- /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */
|
||||
- device->blitter->free_private(device);
|
||||
- device->shader_backend->shader_free_private(device);
|
||||
- destroy_dummy_textures(device, gl_info);
|
||||
|
||||
- /* Release the context again as soon as possible. In particular,
|
||||
- * releasing the render target views below may release the last reference
|
||||
- * to the swapchain associated with this context, which in turn will
|
||||
- * destroy the context. */
|
||||
- context_release(context);
|
||||
+ wined3d_cs_emit_delete_opengl_contexts(device->cs, device->swapchains[0]);
|
||||
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
@@ -1086,8 +1062,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->back_buffer_view = NULL;
|
||||
}
|
||||
|
||||
- context_release(context);
|
||||
-
|
||||
for (i = 0; i < device->swapchain_count; ++i)
|
||||
{
|
||||
TRACE("Releasing the implicit swapchain %u.\n", i);
|
||||
@@ -4165,6 +4139,8 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
@@ -4180,6 +4150,8 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
@ -77,7 +74,7 @@ index 8d80044..bffeebb 100644
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
|
||||
@@ -4184,6 +4160,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
@@ -4199,6 +4171,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@ -86,5 +83,5 @@ index 8d80044..bffeebb 100644
|
||||
|
||||
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
--
|
||||
2.2.1
|
||||
2.3.5
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user