Rebase against eac56fbda547e21cf9f40d57c913b3b582fc5697.

This commit is contained in:
Sebastian Lackner 2016-10-09 06:14:31 +02:00
parent 8bfc3ca97f
commit 2c7ec3747f
8 changed files with 202 additions and 206 deletions

View File

@ -1,4 +1,4 @@
From ac80ddfb739fbe5d743c97715431d0f2e038830c Mon Sep 17 00:00:00 2001
From c5fd5022f2e8a00a520f030919394f1b2b6559d4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 04:19:49 +0200
Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
@ -8,7 +8,7 @@ Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
1 file changed, 96 insertions(+)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 3388833..4d782bd 100644
index 81d4d39..18b371c 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2619,6 +2619,101 @@ static void test_overlapped_error(void)
@ -113,14 +113,14 @@ index 3388833..4d782bd 100644
static void test_NamedPipeHandleState(void)
{
HANDLE server, client;
@@ -3043,6 +3138,7 @@ START_TEST(pipe)
@@ -3114,6 +3209,7 @@ START_TEST(pipe)
test_impersonation();
test_overlapped();
test_overlapped_error();
+ test_nowait();
test_NamedPipeHandleState();
test_GetNamedPipeInfo();
test_readfileex_pending();
}
--
2.7.1
2.9.0

View File

@ -1,4 +1,4 @@
From 2a458a2f67321fb801ad6203b21e644123dc90fa Mon Sep 17 00:00:00 2001
From 8ce5ed62d1e49a3e738a8287e4611fe9f63437e0 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 11 Aug 2014 05:34:19 +0200
Subject: ntdll: Allow to set PIPE_NOWAIT on byte-mode pipes.
@ -12,7 +12,7 @@ matches the native implementation.
2 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
index 4d782bd..3cdbd93 100644
index 18b371c..55f8d4f 100644
--- a/dlls/kernel32/tests/pipe.c
+++ b/dlls/kernel32/tests/pipe.c
@@ -2619,7 +2619,7 @@ static void test_overlapped_error(void)
@ -84,7 +84,7 @@ index 4d782bd..3cdbd93 100644
readden = 0xdeadbeef;
SetLastError(0xdeadbeef);
@@ -3138,7 +3158,8 @@ START_TEST(pipe)
@@ -3209,7 +3229,8 @@ START_TEST(pipe)
test_impersonation();
test_overlapped();
test_overlapped_error();
@ -92,13 +92,13 @@ index 4d782bd..3cdbd93 100644
+ test_nowait(PIPE_TYPE_BYTE);
+ test_nowait(PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE);
test_NamedPipeHandleState();
test_GetNamedPipeInfo();
test_readfileex_pending();
}
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index ac4d69a..06e5e9b 100644
index 622cc45..c27a13f 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -568,6 +568,8 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -573,6 +573,8 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
if (ret < 0) ERR("dequeue message failed reason: %s\n", strerror(errno));
}
}
@ -108,5 +108,5 @@ index ac4d69a..06e5e9b 100644
result = read( fd, buf + *total, length - *total );
--
2.7.1
2.9.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "7756d6ba9b0213d5533eb5248e62716e7e8409b8"
echo "eac56fbda547e21cf9f40d57c913b3b582fc5697"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 761d9fa421777e8cdec4d1f2f01cab3ef47589bc Mon Sep 17 00:00:00 2001
From 5c7954d9fe6f587a143c7d528351a2b75dd8d2a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 23 Aug 2016 22:54:14 +0200
Subject: wined3d: Create dummy 1d textures.
@ -10,10 +10,10 @@ Subject: wined3d: Create dummy 1d textures.
3 files changed, 40 insertions(+)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index a362247..924ce844 100644
index 394a2dc..6b7a180 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1521,6 +1521,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
@@ -1527,6 +1527,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + i));
checkGLcall("glActiveTexture");
@ -21,7 +21,7 @@ index a362247..924ce844 100644
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
@@ -1533,7 +1534,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
@@ -1539,7 +1540,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_textures.tex_cube);
if (gl_info->supported[EXT_TEXTURE_ARRAY])
@ -32,7 +32,7 @@ index a362247..924ce844 100644
checkGLcall("Bind dummy textures");
}
@@ -2381,6 +2385,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
@@ -2405,6 +2409,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
case GL_NONE:
/* nothing to do */
break;
@ -48,7 +48,7 @@ index a362247..924ce844 100644
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
checkGLcall("glBindTexture");
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b8ac88a..1ee707e 100644
index de6d5a4..5636300 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -698,6 +698,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
@ -87,9 +87,9 @@ index b8ac88a..1ee707e 100644
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_array);
checkGLcall("glGenTextures");
TRACE("Dummy 2D array texture given name %u.\n", device->dummy_textures.tex_2d_array);
@@ -775,7 +797,10 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
static void destroy_dummy_textures(struct wined3d_device *device, const struct wined3d_gl_info *gl_info)
{
@@ -777,7 +799,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
const struct wined3d_gl_info *gl_info = context->gl_info;
if (gl_info->supported[EXT_TEXTURE_ARRAY])
+ {
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_array);
@ -98,7 +98,7 @@ index b8ac88a..1ee707e 100644
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_cube);
@@ -787,6 +812,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
@@ -789,6 +814,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_rect);
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d);
@ -107,10 +107,10 @@ index b8ac88a..1ee707e 100644
checkGLcall("Delete dummy textures");
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a968bda..8b0def5 100644
index 3887f91..bd5c1b6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2488,10 +2488,12 @@ struct wined3d_device
@@ -2491,10 +2491,12 @@ struct wined3d_device
/* Textures for when no other textures are mapped */
struct
{

View File

@ -1,4 +1,4 @@
From 5f447b4ff74e75dfeedd4e65f083b5320dd31cd4 Mon Sep 17 00:00:00 2001
From 1ba81810e40d713d008452dbddc8708311ace3cb 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,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
13 files changed, 194 insertions(+), 135 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index df62501..0c49d82 100644
index 2edac17..dbcbbb0 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -704,7 +704,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
@ -32,7 +32,7 @@ index df62501..0c49d82 100644
/* Load DirectX 9 float constants for pixel shader */
priv->highest_dirty_ps_const = shader_arb_load_constants_f(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
@@ -4734,7 +4734,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
@@ -4736,7 +4736,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
}
else
{
@ -42,10 +42,10 @@ index df62501..0c49d82 100644
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 9683803..5984292 100644
index ebfc122..3dddb40 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1698,6 +1698,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1704,6 +1704,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
goto out;
}
@ -57,7 +57,7 @@ index 9683803..5984292 100644
/* Initialize the texture unit mapping to a 1:1 mapping */
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
{
@@ -2005,6 +2010,7 @@ out:
@@ -2012,6 +2017,7 @@ out:
if (hdc) wined3d_release_dc(swapchain->win_handle, hdc);
device->shader_backend->shader_free_context_data(ret);
device->adapter->fragment_pipe->free_context_data(ret);
@ -65,7 +65,7 @@ index 9683803..5984292 100644
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
@@ -2041,6 +2047,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
@@ -2059,6 +2065,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
device->shader_backend->shader_free_context_data(context);
device->adapter->fragment_pipe->free_context_data(context);
HeapFree(GetProcessHeap(), 0, context->fbo_key);
@ -73,7 +73,7 @@ index 9683803..5984292 100644
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
HeapFree(GetProcessHeap(), 0, context->blit_targets);
device_context_remove(device, context);
@@ -2595,7 +2602,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2613,7 +2620,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
DWORD rt_mask = 0, *cur_mask;
UINT i;
@ -82,7 +82,7 @@ index 9683803..5984292 100644
|| rt_count != gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2640,6 +2647,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2658,6 +2665,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
rt_mask = context_generate_rt_mask_no_fbo(context,
rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL);
}
@ -91,7 +91,7 @@ index 9683803..5984292 100644
}
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
@@ -2697,7 +2706,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2715,7 +2724,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_state *state)
{
@ -100,7 +100,7 @@ index 9683803..5984292 100644
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
DWORD rt_mask, rt_mask_bits;
unsigned int i;
@@ -2727,7 +2736,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
@@ -2745,7 +2754,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)
{
DWORD rt_mask = find_draw_buffers_mask(context, state);
@ -109,7 +109,7 @@ index 9683803..5984292 100644
DWORD *cur_mask;
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
@@ -2758,6 +2767,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
@@ -2776,6 +2785,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
context_apply_draw_buffers(context, rt_mask);
*cur_mask = rt_mask;
}
@ -118,7 +118,7 @@ index 9683803..5984292 100644
}
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
@@ -3389,7 +3400,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
@@ -3407,7 +3418,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
const struct wined3d_device *device, const struct wined3d_state *state)
{
const struct StateEntry *state_table = context->state_table;
@ -281,7 +281,7 @@ index b4cbcab..0beb6c2 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8937d52..f29ddb1 100644
index fa6ee5b..9bcfad1 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1002,7 +1002,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
@ -345,11 +345,11 @@ index 8937d52..f29ddb1 100644
/* Unload resources */
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
@@ -1220,37 +1232,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
* destroy the context. */
@@ -1216,37 +1228,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
context_release(context);
- /* Release the buffers (with sanity checks)*/
- /* Release the buffers (with sanity checks) */
- if (device->onscreen_depth_stencil)
- {
- surface = device->onscreen_depth_stencil;
@ -383,7 +383,7 @@ index 8937d52..f29ddb1 100644
if (device->back_buffer_view)
{
wined3d_rendertarget_view_decref(device->back_buffer_view);
@@ -1268,9 +1249,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1264,9 +1245,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
device->swapchains = NULL;
device->swapchain_count = 0;
@ -393,7 +393,7 @@ index 8937d52..f29ddb1 100644
device->d3d_initialized = FALSE;
return WINED3D_OK;
@@ -2087,7 +2065,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
@@ -2083,7 +2061,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
return;
@ -402,7 +402,7 @@ index 8937d52..f29ddb1 100644
return;
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
{
@@ -3487,6 +3465,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
@@ -3483,6 +3461,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
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)
{
@ -411,7 +411,7 @@ index 8937d52..f29ddb1 100644
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
device, rect_count, rects, flags, debug_color(color), depth, stencil);
@@ -3498,7 +3478,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3494,7 +3474,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
{
@ -420,7 +420,7 @@ index 8937d52..f29ddb1 100644
if (!ds)
{
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
@@ -3507,8 +3487,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3503,8 +3483,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
else if (flags & WINED3DCLEAR_TARGET)
{
@ -431,7 +431,7 @@ index 8937d52..f29ddb1 100644
{
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
return WINED3D_OK;
@@ -3824,8 +3804,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
@@ -3820,8 +3800,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])
{
@ -442,7 +442,7 @@ index 8937d52..f29ddb1 100644
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -4283,20 +4263,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
@@ -4279,20 +4259,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
return NULL;
}
@ -466,7 +466,7 @@ index 8937d52..f29ddb1 100644
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4333,13 +4314,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4329,13 +4310,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
}
@ -482,7 +482,7 @@ index 8937d52..f29ddb1 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. */
@@ -4351,18 +4332,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4347,18 +4328,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)
{
@ -504,7 +504,7 @@ index 8937d52..f29ddb1 100644
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4720,10 +4702,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4719,10 +4701,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_texture_decref(device->cursor_texture);
device->cursor_texture = NULL;
}
@ -516,7 +516,7 @@ index 8937d52..f29ddb1 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4732,6 +4713,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4731,6 +4712,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -528,7 +528,7 @@ index 8937d52..f29ddb1 100644
if (device->onscreen_depth_stencil)
{
wined3d_texture_decref(device->onscreen_depth_stencil->container);
@@ -4900,27 +4886,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4899,27 +4885,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@ -564,7 +564,7 @@ index 8937d52..f29ddb1 100644
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -5010,11 +4997,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -5009,11 +4996,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -578,7 +578,7 @@ index 8937d52..f29ddb1 100644
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
switch (type)
@@ -5139,8 +5126,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -5138,8 +5125,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@ -607,7 +607,7 @@ index e5b30db..1188009 100644
struct wined3d_event_query *ib_query = NULL;
struct wined3d_stream_info si_emulated;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index ca76359..5d52f65 100644
index 892b582..8b9485d 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1514,7 +1514,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@ -633,7 +633,7 @@ index 594520c..c6d23ce 100644
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 8758925..d508d54 100644
index 3bd22dc..ecb29c3 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@ -715,7 +715,7 @@ index 8758925..d508d54 100644
- const struct wined3d_rendertarget_view *target = state->fb->render_targets[0];
+ const struct wined3d_rendertarget_view *depth_stencil = state->fb.depth_stencil;
+ const struct wined3d_rendertarget_view *target = state->fb.render_targets[0];
float pixel_center_offset = context->swapchain->device->wined3d->flags
float pixel_center_offset = context->device->wined3d->flags
& WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f;
const struct wined3d_gl_info *gl_info = context->gl_info;
@@ -4856,7 +4856,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
@ -863,7 +863,7 @@ index d5478f4..f649b2f 100644
struct wined3d_texture *logo_texture;
struct wined3d_context *context;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index fe57db9..aa199c5 100644
index fbd5835..229d5db 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4532,7 +4532,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@ -885,7 +885,7 @@ index fe57db9..aa199c5 100644
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 01b5d9d..bc54b60 100644
index 9d40df6..ec14ea5 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1447,6 +1447,36 @@ struct wined3d_timestamp_query
@ -931,9 +931,9 @@ index 01b5d9d..bc54b60 100644
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
+ struct wined3d_fb_state current_fb;
struct wined3d_device *device;
struct wined3d_swapchain *swapchain;
struct
@@ -1569,12 +1600,6 @@ struct wined3d_context
@@ -1571,12 +1602,6 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@ -946,7 +946,7 @@ index 01b5d9d..bc54b60 100644
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -2362,7 +2387,7 @@ struct wined3d_stream_state
@@ -2364,7 +2389,7 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@ -955,7 +955,7 @@ index 01b5d9d..bc54b60 100644
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2467,7 +2492,6 @@ struct wined3d_device
@@ -2469,7 +2494,6 @@ struct wined3d_device
struct wine_rb_tree samplers;
/* Render Target Support */
@ -963,7 +963,7 @@ index 01b5d9d..bc54b60 100644
struct wined3d_surface *onscreen_depth_stencil;
struct wined3d_rendertarget_view *auto_depth_stencil_view;
@@ -3017,9 +3041,8 @@ struct wined3d_stateblock
@@ -3019,9 +3043,8 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -975,7 +975,7 @@ index 01b5d9d..bc54b60 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_cs_ops
@@ -3032,7 +3055,6 @@ struct wined3d_cs
@@ -3034,7 +3057,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;

View File

@ -1,4 +1,4 @@
From fc4e50699e4494de94a941c52799e987d6702e28 Mon Sep 17 00:00:00 2001
From 21a06ced85ce0e69abdb0d0ed89cc9f3ee2910b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sat, 7 May 2016 21:16:47 +0100
Subject: wined3d: Call create_default_sampler from create_dummy_textures.
@ -9,7 +9,7 @@ I should really rename it, don't feel like it now.
1 file changed, 34 insertions(+), 41 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2b30135..32946e8 100644
index e0ef122..1da8384 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -663,6 +663,39 @@ out:
@ -60,7 +60,7 @@ index 2b30135..32946e8 100644
}
/* Context activation is done by the caller. */
@@ -803,39 +837,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
@@ -805,39 +839,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
}
/* Context activation is done by the caller. */
@ -97,10 +97,10 @@ index 2b30135..32946e8 100644
-}
-
-/* Context activation is done by the caller. */
static void destroy_default_samplers(struct wined3d_device *device)
static void destroy_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@@ -1001,7 +1002,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
const struct wined3d_gl_info *gl_info = context->gl_info;
@@ -1003,7 +1004,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
{
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
struct wined3d_swapchain *swapchain = NULL;
@ -108,7 +108,7 @@ index 2b30135..32946e8 100644
DWORD clear_flags = 0;
HRESULT hr;
@@ -1061,9 +1061,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
@@ -1063,9 +1063,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
device_init_swapchain_state(device, swapchain);
wined3d_cs_emit_create_dummy_textures(device->cs);
@ -118,7 +118,7 @@ index 2b30135..32946e8 100644
device->contexts[0]->last_was_rhw = 0;
@@ -4606,7 +4603,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
@@ -4607,7 +4604,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
@ -126,7 +126,7 @@ index 2b30135..32946e8 100644
HRESULT hr;
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
@@ -4633,9 +4629,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
@@ -4634,9 +4630,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
}
wined3d_cs_emit_create_dummy_textures(device->cs);

View File

@ -1,17 +1,17 @@
From e7dcf35fcb8ae00086a72d4942972dcc1a4bc835 Mon Sep 17 00:00:00 2001
From 9fac716a1f532a52481b61ccc2dc1dc46124a5fb 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 | 33 +++------------------------------
1 file changed, 3 insertions(+), 30 deletions(-)
dlls/wined3d/device.c | 29 +++--------------------------
1 file changed, 3 insertions(+), 26 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 20d09a2..60e21ba 100644
index f6c5a52..d006531 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1132,8 +1132,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
@@ -1139,8 +1139,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
{
struct wined3d_resource *resource, *cursor;
@ -20,7 +20,7 @@ index 20d09a2..60e21ba 100644
struct wined3d_surface *surface;
UINT i;
@@ -1145,12 +1143,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1152,12 +1150,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
if (wined3d_settings.cs_multithreaded)
device->cs->ops->finish(device->cs);
@ -33,7 +33,7 @@ index 20d09a2..60e21ba 100644
if (device->logo_texture)
wined3d_texture_decref(device->logo_texture);
if (device->cursor_texture)
@@ -1182,31 +1174,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1189,27 +1181,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
TRACE("Unloading resource %p.\n", resource);
wined3d_cs_emit_unload_resource(device->cs, resource);
}
@ -54,20 +54,16 @@ index 20d09a2..60e21ba 100644
- /* 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);
- destroy_default_samplers(device);
- destroy_dummy_textures(device, context);
- destroy_default_samplers(device, context);
-
- /* 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);
+ /* FIXME: Is this in the right place??? */
+ wined3d_cs_emit_delete_opengl_contexts(device->cs, device->swapchains[0]);
if (device->back_buffer_view)
{
@@ -4582,6 +4554,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
@@ -4591,6 +4567,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;

File diff suppressed because it is too large Load Diff