Rebase against 8676f7bae099f0ca20c26a29dfa4bebd828b39b9.

This commit is contained in:
Sebastian Lackner 2016-01-22 02:26:54 +01:00
parent b1e6717b81
commit fe47c7cf07
4 changed files with 70 additions and 61 deletions

View File

@ -1,4 +1,4 @@
From ffd7b942761e5010bdc234f10e5e9721c8d8159b Mon Sep 17 00:00:00 2001
From 82f162911442f78bae91fe8655cd2f4a33f638f7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 6 Jun 2015 01:21:05 +0200
Subject: server: Return correct error codes for NtWriteFile when pipes are
@ -25,10 +25,10 @@ index 3035dd4..9986337 100644
CloseHandle(hfile);
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 42d1fae..3bb2905 100644
index 8e6dc12..15a957d 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1213,6 +1213,9 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
@@ -1210,6 +1210,9 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
return STATUS_SUCCESS;
else if (errno == EFAULT)
return STATUS_INVALID_USER_BUFFER;
@ -39,7 +39,7 @@ index 42d1fae..3bb2905 100644
}
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 37f97ed..28816a2 100644
index 2297976..1759b00 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -145,6 +145,7 @@ static const struct object_ops named_pipe_ops =
@ -84,8 +84,8 @@ index 37f97ed..28816a2 100644
+
static void named_pipe_dump( struct object *obj, int verbose )
{
struct named_pipe *pipe = (struct named_pipe *) obj;
@@ -390,6 +394,23 @@ static void do_disconnect( struct pipe_server *server )
fputs( "Named pipe\n", stderr );
@@ -386,6 +390,23 @@ static void do_disconnect( struct pipe_server *server )
server->fd = NULL;
}
@ -109,7 +109,7 @@ index 37f97ed..28816a2 100644
static void pipe_server_destroy( struct object *obj)
{
struct pipe_server *server = (struct pipe_server *)obj;
@@ -416,6 +437,24 @@ static void pipe_server_destroy( struct object *obj)
@@ -412,6 +433,24 @@ static void pipe_server_destroy( struct object *obj)
release_object( server->pipe );
}
@ -135,10 +135,10 @@ index 37f97ed..28816a2 100644
{
struct pipe_client *client = (struct pipe_client *)obj;
diff --git a/server/protocol.def b/server/protocol.def
index 6b2030b..390c09a 100644
index e6e52de..4a24595 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2389,6 +2389,7 @@ enum message_type
@@ -2378,6 +2378,7 @@ enum message_type
#define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
#define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
#define NAMED_PIPE_NONBLOCKING_MODE 0x0004
@ -147,5 +147,5 @@ index 6b2030b..390c09a 100644
/* Get named pipe information by handle */
--
2.6.2
2.6.4

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "af4a757ad2cacbd238486632d0f7bd6f0a94483f"
echo "8676f7bae099f0ca20c26a29dfa4bebd828b39b9"
}
# Show version information

View File

@ -1,15 +1,15 @@
From e266c05975d524f09886decb854ec78942e9b2fb Mon Sep 17 00:00:00 2001
From fa91df6b120d18ad5c44c204dd5f17da734b859b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 17 Aug 2015 00:13:27 +0200
Subject: server: Move parent reference from object_name to object.
---
server/object.c | 20 ++++++++++----------
server/object.c | 22 +++++++++++-----------
server/object.h | 1 +
2 files changed, 11 insertions(+), 10 deletions(-)
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/server/object.c b/server/object.c
index d04fdb9..bfb4689 100644
index 1ec547a..b330831 100644
--- a/server/object.c
+++ b/server/object.c
@@ -44,7 +44,6 @@ struct object_name
@ -20,7 +20,7 @@ index d04fdb9..bfb4689 100644
data_size_t len; /* name length in bytes */
WCHAR name[1];
};
@@ -136,18 +135,15 @@ static struct object_name *alloc_name( const struct unicode_str *name )
@@ -138,18 +137,15 @@ static struct object_name *alloc_name( const struct unicode_str *name )
if ((ptr = mem_alloc( sizeof(*ptr) + name->len - sizeof(ptr->name) )))
{
ptr->len = name->len;
@ -40,7 +40,7 @@ index d04fdb9..bfb4689 100644
free( ptr );
}
@@ -183,7 +179,7 @@ WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len )
@@ -185,7 +181,7 @@ WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len )
{
struct object_name *name = ptr->name;
len += name->len + sizeof(WCHAR);
@ -49,7 +49,7 @@ index d04fdb9..bfb4689 100644
}
if (!len) return NULL;
if (!(ret = malloc( len ))) return NULL;
@@ -195,7 +191,7 @@ WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len )
@@ -197,7 +193,7 @@ WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len )
memcpy( ret + len - name->len, name->name, name->len );
len -= name->len + sizeof(WCHAR);
memcpy( ret + len, &backslash, sizeof(WCHAR) );
@ -58,7 +58,7 @@ index d04fdb9..bfb4689 100644
}
return (WCHAR *)ret;
}
@@ -208,6 +204,7 @@ void *alloc_object( const struct object_ops *ops )
@@ -210,6 +206,7 @@ void *alloc_object( const struct object_ops *ops )
{
obj->refcount = 1;
obj->handle_count = 0;
@ -66,7 +66,7 @@ index d04fdb9..bfb4689 100644
obj->ops = ops;
obj->name = NULL;
obj->sd = NULL;
@@ -230,7 +227,7 @@ void *create_object( struct namespace *namespace, const struct object_ops *ops,
@@ -232,7 +229,7 @@ void *create_object( struct namespace *namespace, const struct object_ops *ops,
if ((obj = alloc_object( ops )))
{
set_object_name( namespace, obj, name_ptr );
@ -75,7 +75,16 @@ index d04fdb9..bfb4689 100644
}
else
free( name_ptr );
@@ -278,8 +275,10 @@ void dump_object_name( struct object *obj )
@@ -275,7 +272,7 @@ static void dump_name( struct object *obj )
struct object_name *name = obj->name;
if (!name) return;
- if (name->parent) dump_name( name->parent );
+ if (obj->parent) dump_name( obj->parent );
fputs( "\\\\", stderr );
dump_strW( name->name, name->len / sizeof(WCHAR), stderr, "[]" );
}
@@ -292,8 +289,10 @@ void dump_object_name( struct object *obj )
/* unlink a named object from its namespace, without freeing the object itself */
void unlink_named_object( struct object *obj )
{
@ -87,7 +96,7 @@ index d04fdb9..bfb4689 100644
}
/* mark an object as being stored statically, i.e. only released at shutdown */
@@ -311,7 +310,8 @@ void release_object( void *ptr )
@@ -325,7 +324,8 @@ void release_object( void *ptr )
/* if the refcount is 0, nobody can be in the wait queue */
assert( list_empty( &obj->wait_queue ));
obj->ops->destroy( obj );
@ -98,7 +107,7 @@ index d04fdb9..bfb4689 100644
#ifdef DEBUG_OBJECTS
list_remove( &obj->obj_list );
diff --git a/server/object.h b/server/object.h
index 0974d87..9d14c9c 100644
index 8e010a3..4b554bc 100644
--- a/server/object.h
+++ b/server/object.h
@@ -96,6 +96,7 @@ struct object
@ -110,5 +119,5 @@ index 0974d87..9d14c9c 100644
struct list wait_queue;
struct object_name *name;
--
2.5.0
2.6.4

View File

@ -3114,7 +3114,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
@@ -4014,7 +4449,17 @@
@@ -4032,7 +4467,17 @@
unsigned int depth_pitch)
{
struct wined3d_resource *sub_resource;
@ -3132,7 +3132,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
device, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
@@ -4048,7 +4493,14 @@
@@ -4066,7 +4511,14 @@
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
return;
}
@ -3147,7 +3147,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (box)
{
if (box->left >= box->right || box->right > sub_resource->width
@@ -4059,9 +4511,47 @@
@@ -4077,9 +4529,47 @@
box->left, box->top, box->front, box->right, box->bottom, box->back);
return;
}
@ -3195,7 +3195,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
@@ -4092,8 +4582,14 @@
@@ -4110,8 +4600,14 @@
rect = &r;
}
@ -3210,7 +3210,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
@@ -4107,6 +4603,7 @@
@@ -4125,6 +4621,7 @@
return NULL;
}
@ -3218,7 +3218,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return device->state.fb.render_targets[view_idx];
}
@@ -4122,6 +4619,22 @@
@@ -4140,6 +4637,22 @@
{
struct wined3d_rendertarget_view *prev;
struct wined3d_fb_state *fb = &device->state.fb;
@ -3241,7 +3241,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4161,6 +4674,7 @@
@@ -4179,6 +4692,7 @@
}
@ -3249,7 +3249,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
prev = fb->render_targets[view_idx];
if (view == prev)
return WINED3D_OK;
@@ -4168,6 +4682,15 @@
@@ -4186,6 +4700,15 @@
if (view)
wined3d_rendertarget_view_incref(view);
fb->render_targets[view_idx] = view;
@ -3265,7 +3265,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
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. */
@@ -4179,6 +4702,7 @@
@@ -4197,6 +4720,7 @@
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -3273,7 +3273,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_fb_state *fb = &device->state.fb;
struct wined3d_rendertarget_view *prev;
@@ -4196,6 +4720,66 @@
@@ -4214,6 +4738,66 @@
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
wined3d_rendertarget_view_decref(prev);
@ -3340,7 +3340,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
@@ -4216,6 +4800,14 @@
@@ -4234,6 +4818,14 @@
cursor_image = surface_from_resource(sub_resource);
@ -3355,7 +3355,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM)
{
WARN("Surface %p has an invalid format %s.\n",
@@ -4243,6 +4835,13 @@
@@ -4261,6 +4853,13 @@
* release it after setting the cursor image. Windows doesn't
* addref the set surface, so we can't do this either without
* creating circular refcount dependencies. */
@ -3369,7 +3369,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32)
{
@@ -4347,6 +4946,12 @@
@@ -4365,6 +4964,12 @@
else
SetCursor(NULL);
}
@ -3382,7 +3382,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return oldVisible;
}
@@ -4357,8 +4962,10 @@
@@ -4375,8 +4980,10 @@
TRACE("device %p.\n", device);
@ -3393,7 +3393,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4366,6 +4973,7 @@
@@ -4384,6 +4991,7 @@
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
{
TRACE("Evicting %p.\n", resource);
@ -3401,7 +3401,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_evict_resource(device->cs, resource);
}
}
@@ -4384,6 +4992,37 @@
@@ -4402,6 +5010,37 @@
context = context_acquire(device, NULL);
gl_info = context->gl_info;
@ -3439,7 +3439,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (device->depth_blt_texture)
{
@@ -4405,6 +5044,7 @@
@@ -4423,6 +5062,7 @@
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;
@ -3447,7 +3447,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
swapchain->num_contexts = 0;
}
@@ -4424,6 +5064,14 @@
@@ -4442,6 +5082,14 @@
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
@ -3462,7 +3462,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
HRESULT hr;
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
@@ -4440,6 +5088,7 @@
@@ -4458,6 +5106,7 @@
return hr;
}
@ -3470,7 +3470,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
if (FAILED(hr))
{
@@ -4450,6 +5099,35 @@
@@ -4468,6 +5117,35 @@
}
wined3d_cs_emit_create_dummy_textures(device->cs);
@ -3506,7 +3506,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -4468,9 +5146,11 @@
@@ -4486,9 +5164,11 @@
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
device, swapchain_desc, mode, callback, reset_state);
@ -3518,7 +3518,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
{
ERR("Failed to get the first implicit swapchain.\n");
@@ -4485,9 +5165,21 @@
@@ -4503,9 +5183,21 @@
wined3d_texture_decref(device->logo_texture);
device->logo_texture = NULL;
}
@ -3540,7 +3540,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4496,6 +5188,7 @@
@@ -4514,6 +5206,7 @@
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -3548,7 +3548,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (reset_state)
{
state_unbind_resources(&device->state);
@@ -4505,6 +5198,12 @@
@@ -4523,6 +5216,12 @@
{
wined3d_texture_decref(device->cs->onscreen_depth_stencil->container);
device->cs->onscreen_depth_stencil = NULL;
@ -3561,7 +3561,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
if (reset_state)
@@ -4517,6 +5216,7 @@
@@ -4535,6 +5234,7 @@
}
}
@ -3569,7 +3569,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Free implicit resources and wait for the command stream before modifying
* swapchain parameters. After modifying the swapchain parameters a new GL
* context may be acquired by the worker thread. This causes problems in the
@@ -4538,6 +5238,7 @@
@@ -4556,6 +5256,7 @@
}
device->cs->ops->finish(device->cs);
@ -3577,7 +3577,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("New params:\n");
TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width);
TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height);
@@ -4664,6 +5365,13 @@
@@ -4682,6 +5383,13 @@
swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
return hr;
@ -3591,7 +3591,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (swapchain->desc.enable_auto_depth_stencil)
{
struct wined3d_resource_desc texture_desc;
@@ -4706,6 +5414,13 @@
@@ -4724,6 +5432,13 @@
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
}
@ -3605,7 +3605,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (swapchain->desc.backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface(
surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)),
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
@@ -4726,12 +5441,20 @@
@@ -4744,12 +5459,20 @@
}
wined3d_cs_emit_reset_state(device->cs);
state_cleanup(&device->state);
@ -3626,7 +3626,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
device->update_state = &device->state;
@@ -4740,6 +5463,7 @@
@@ -4758,6 +5481,7 @@
}
else if (device->back_buffer_view)
{
@ -3634,7 +3634,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_state *state = &device->state;
wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, FALSE);
@@ -4755,6 +5479,24 @@
@@ -4773,6 +5497,24 @@
state->scissor_rect.left = 0;
state->scissor_rect.right = swapchain->desc.backbuffer_width;
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
@ -3659,7 +3659,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4830,6 +5572,10 @@
@@ -4848,6 +5590,10 @@
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
@ -3670,7 +3670,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
switch (type)
{
case WINED3D_RTYPE_SURFACE:
@@ -4840,6 +5586,7 @@
@@ -4858,6 +5604,7 @@
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -3678,7 +3678,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[i]) == surface)
{
ERR("Surface %p is still in use as render target %u.\n", surface, i);
@@ -4851,6 +5598,19 @@
@@ -4869,6 +5616,19 @@
{
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
device->state.fb.depth_stencil = NULL;
@ -3698,7 +3698,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
}
break;
@@ -5013,7 +5773,11 @@
@@ -5031,7 +5791,11 @@
device->blitter = adapter->blitter;
@ -3710,7 +3710,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
&adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
{
ERR("Failed to initialize device state, hr %#x.\n", hr);
@@ -5112,6 +5876,7 @@
@@ -5130,6 +5894,7 @@
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@ -3718,7 +3718,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Context activation is done by the caller */
struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
@@ -5165,3 +5930,4 @@
@@ -5183,3 +5948,4 @@
wined3d_device_destroy_bo(device, context, bo);
}