Rebase against upstream changes.

This commit is contained in:
Sebastian Lackner 2015-04-02 21:37:06 +02:00
parent 9b05154f9e
commit bd6e9c6b12
12 changed files with 123 additions and 510 deletions

View File

@ -93,7 +93,7 @@ Included bug fixes and improvements
* Avoid race-conditions in NtReadFile() operations with write watches.
* Avoid race-conditions of async WSARecv() operations with write watches.
* Avoid race-conditions with write watches in WS2_async_accept.
* Avoid unloading msctf library while textservices are activated ([Wine Bug #31579](https://bugs.winehq.org/show_bug.cgi?id=31579))
* ~~Avoid unloading msctf library while textservices are activated~~ ([Wine Bug #31579](https://bugs.winehq.org/show_bug.cgi?id=31579))
* Avseq crashes when multisampling is enabled ([Wine Bug #31998](https://bugs.winehq.org/show_bug.cgi?id=31998))
* Basic handling of write watches triggered while we're on the signal stack.
* Basic support for CUDA

View File

@ -1,37 +0,0 @@
From f103e65ee8d05b6688dcecb4da039b1bd5714eb9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 1 Mar 2015 05:08:20 +0100
Subject: msctf: Avoid unloading library while textservices are activated.
Based on a patch by Qian Hong.
---
dlls/msctf/msctf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c
index 231246a..1582ddd 100644
--- a/dlls/msctf/msctf.c
+++ b/dlls/msctf/msctf.c
@@ -445,6 +445,7 @@ HRESULT activate_textservices(ITfThreadMgr *tm)
if (activated > 1)
return S_OK;
+ InterlockedIncrement(&MSCTF_refCount);
LIST_FOR_EACH_ENTRY(ats, &AtsList, AtsEntry, entry)
{
hr = activate_given_ts(ats->ats, tm);
@@ -462,8 +463,11 @@ HRESULT deactivate_textservices(void)
activated --;
if (activated == 0)
+ {
LIST_FOR_EACH_ENTRY(ats, &AtsList, AtsEntry, entry)
deactivate_given_ts(ats->ats);
+ InterlockedDecrement(&MSCTF_refCount);
+ }
return S_OK;
}
--
2.3.0

View File

@ -1 +0,0 @@
Fixes: [31579] Avoid unloading msctf library while textservices are activated

View File

@ -128,7 +128,6 @@ patch_enable_all ()
enable_mmdevapi_AEV_Stubs="$1"
enable_mountmgr_DosDevices="$1"
enable_mscoree_CorValidateImage="$1"
enable_msctf_DllCanUnloadNow="$1"
enable_msvcp90_basic_string_wchar_dtor="$1"
enable_msvcrt_atof_strtod="$1"
enable_msvfw32_Image_Size="$1"
@ -452,9 +451,6 @@ patch_enable ()
mscoree-CorValidateImage)
enable_mscoree_CorValidateImage="$2"
;;
msctf-DllCanUnloadNow)
enable_msctf_DllCanUnloadNow="$2"
;;
msvcp90-basic_string_wchar_dtor)
enable_msvcp90_basic_string_wchar_dtor="$2"
;;
@ -2615,6 +2611,20 @@ if test "$enable_kernel32_Console_Handles" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-FileDispositionInformation
# |
# | This patchset fixes the following Wine bugs:
@ -2634,20 +2644,6 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-CopyFileEx
# |
# | This patchset fixes the following Wine bugs:
@ -2945,21 +2941,6 @@ if test "$enable_mscoree_CorValidateImage" -eq 1; then
) >> "$patchlist"
fi
# Patchset msctf-DllCanUnloadNow
# |
# | This patchset fixes the following Wine bugs:
# | * [#31579] Avoid unloading msctf library while textservices are activated
# |
# | Modified files:
# | * dlls/msctf/msctf.c
# |
if test "$enable_msctf_DllCanUnloadNow" -eq 1; then
patch_apply msctf-DllCanUnloadNow/0001-msctf-Avoid-unloading-library-while-textservices-are.patch
(
echo '+ { "Sebastian Lackner", "msctf: Avoid unloading library while textservices are activated.", 1 },';
) >> "$patchlist"
fi
# Patchset msvcp90-basic_string_wchar_dtor
# |
# | This patchset fixes the following Wine bugs:
@ -3912,20 +3893,18 @@ fi
# | * [#33723] EA Origin needs support for job objects
# |
# | Modified files:
# | * dlls/kernel32/tests/process.c, dlls/ntdll/om.c, dlls/ntdll/sync.c, include/winnt.h, server/handle.c, server/object.c,
# | server/object.h, server/process.c, server/process.h, server/protocol.def
# | * dlls/kernel32/tests/process.c, dlls/ntdll/om.c, dlls/ntdll/sync.c, server/handle.c, server/object.c, server/object.h,
# | server/process.c, server/process.h, server/protocol.def
# |
if test "$enable_server_JobObjects" -eq 1; then
patch_apply server-JobObjects/0001-server-Implement-remaining-wineserver-calls-for-job-.patch
patch_apply server-JobObjects/0002-server-Implement-completion-messages-for-job-objects.patch
patch_apply server-JobObjects/0003-server-Properly-track-handle-count-of-objects.patch
patch_apply server-JobObjects/0004-server-Implement-JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE.patch
patch_apply server-JobObjects/0005-kernel32-tests-Add-tests-for-waiting-on-an-job-objec.patch
patch_apply server-JobObjects/0006-server-Implement-waiting-for-job-objects.patch
patch_apply server-JobObjects/0007-ntdll-Implement-NtQueryInformationJobObject-stub-fun.patch
patch_apply server-JobObjects/0002-server-Properly-track-handle-count-of-objects.patch
patch_apply server-JobObjects/0003-server-Implement-JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE.patch
patch_apply server-JobObjects/0004-kernel32-tests-Add-tests-for-waiting-on-an-job-objec.patch
patch_apply server-JobObjects/0005-server-Implement-waiting-for-job-objects.patch
patch_apply server-JobObjects/0006-ntdll-Implement-NtQueryInformationJobObject-stub-fun.patch
(
echo '+ { "Andrew Cook", "server: Implement remaining wineserver calls for job objects.", 1 },';
echo '+ { "Andrew Cook", "server: Implement completion messages for job objects.", 1 },';
echo '+ { "Andrew Cook", "server: Properly track handle count of objects.", 1 },';
echo '+ { "Andrew Cook", "server: Implement JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for waiting on an job object.", 1 },';

View File

@ -1,19 +1,18 @@
From f116e9e73f00bd6c65ebd087a1f7b23ceb9064a9 Mon Sep 17 00:00:00 2001
From f478d1b97efc4fe63f8ccc01a2ab214c0bffc579 Mon Sep 17 00:00:00 2001
From: Andrew Cook <ariscop@gmail.com>
Date: Thu, 26 Feb 2015 12:25:23 +1100
Subject: server: Implement remaining wineserver calls for job objects.
---
dlls/kernel32/tests/process.c | 6 +---
dlls/ntdll/sync.c | 76 +++++++++++++++++++++++++++++++++++++++----
include/winnt.h | 4 +++
server/process.c | 59 +++++++++++++++++++++++++++++++++
dlls/kernel32/tests/process.c | 2 --
dlls/ntdll/sync.c | 29 +++++++++++++++++++++++++----
server/process.c | 40 +++++++++++++++++++++++++++++++++++++++-
server/process.h | 1 +
server/protocol.def | 14 ++++++++
6 files changed, 149 insertions(+), 11 deletions(-)
server/protocol.def | 7 +++++++
5 files changed, 72 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 1add23d..8c9a6ef 100644
index 44e81ba..a86e331 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -2269,13 +2269,11 @@ static void test_TerminateJobObject(void)
@ -30,34 +29,8 @@ index 1add23d..8c9a6ef 100644
ok(dwret == 123 || broken(dwret == 0) /* randomly fails on Win 2000 / XP */,
"wrong exitcode %u\n", dwret);
@@ -2401,6 +2399,7 @@ static void test_CompletionPort(void)
port_info.CompletionKey = job;
port_info.CompletionPort = port;
ret = pSetInformationJobObject(job, JobObjectAssociateCompletionPortInformation, &port_info, sizeof(port_info));
+ todo_wine
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
create_process("wait", &pi);
@@ -2498,7 +2497,6 @@ static void test_jobInheritance(HANDLE job)
out = FALSE;
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
- todo_wine
ok(out, "IsProcessInJob returned out=%u\n", out);
dwret = WaitForSingleObject(pi.hProcess, 1000);
@@ -2526,9 +2524,7 @@ static void test_BreakawayOk(HANDLE job)
snprintf(buffer, MAX_PATH, "\"%s\" tests/process.c %s", selfname, "exit");
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
- todo_wine
ok(!ret, "CreateProcessA expected failure\n");
- todo_wine
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
if (ret)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index ce1a635..e001e28 100644
index a4df88a..400aa7d 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -56,6 +56,7 @@
@ -110,77 +83,8 @@ index ce1a635..e001e28 100644
}
/******************************************************************************
@@ -634,8 +655,51 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c
*/
NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS class, PVOID info, ULONG len )
{
- FIXME( "stub: %p %u %p %u\n", handle, class, info, len );
- return STATUS_SUCCESS;
+ JOBOBJECT_BASIC_LIMIT_INFORMATION *basic_limit;
+ NTSTATUS status = STATUS_SUCCESS;
+
+ TRACE( "(%p, %u, %p, %u)\n", handle, class, info, len );
+
+ if (class >= MaxJobObjectInfoClass)
+ return STATUS_INVALID_PARAMETER;
+
+ switch (class)
+ {
+
+ case JobObjectExtendedLimitInformation:
+ if (len != sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION))
+ return STATUS_INVALID_PARAMETER;
+
+ basic_limit = &(((JOBOBJECT_EXTENDED_LIMIT_INFORMATION *)info)->BasicLimitInformation);
+ if (basic_limit->LimitFlags & ~JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS)
+ return STATUS_INVALID_PARAMETER;
+
+ goto set_basic_limits;
+
+ case JobObjectBasicLimitInformation:
+ if (len != sizeof(JOBOBJECT_BASIC_LIMIT_INFORMATION))
+ return STATUS_INVALID_PARAMETER;
+
+ basic_limit = info;
+ if (basic_limit->LimitFlags & ~JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS)
+ return STATUS_INVALID_PARAMETER;
+
+ set_basic_limits:
+ SERVER_START_REQ( set_job_limits )
+ {
+ req->handle = wine_server_obj_handle( handle );
+ req->limit_flags = basic_limit->LimitFlags;
+ status = wine_server_call( req );
+ }
+ SERVER_END_REQ;
+ break;
+
+ default:
+ FIXME( "stub: %p %u %p %u\n", handle, class, info, len );
+ return STATUS_NOT_IMPLEMENTED;
+ }
+
+ return status;
}
/******************************************************************************
diff --git a/include/winnt.h b/include/winnt.h
index 4b06b2c..c2aa50e 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -5610,6 +5610,10 @@ typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION {
#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000
#define JOB_OBJECT_LIMIT_SUBSET_AFFINITY 0x00004000
+#define JOB_OBJECT_LIMIT_VALID_FLAGS 0x0007ffff
+#define JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS 0x000000ff
+#define JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS 0x00007fff
+
typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP
{
RelationProcessorCore = 0,
diff --git a/server/process.c b/server/process.c
index f9738c0..a1ab8c7 100644
index 5821435..727a682 100644
--- a/server/process.c
+++ b/server/process.c
@@ -65,6 +65,7 @@ static unsigned int process_map_access( struct object *obj, unsigned int access
@ -191,36 +95,40 @@ index f9738c0..a1ab8c7 100644
static const struct object_ops process_ops =
{
@@ -147,6 +148,7 @@ struct job
struct object obj; /* object header */
@@ -148,6 +149,7 @@ struct job
struct list process_list; /* list of all processes */
int num_processes; /* count of running processes */
+ int limit_flags; /* limit flags */
unsigned int limit_flags; /* limit flags */
+ int terminating; /* job is terminating */
struct completion *completion_port; /* associated completion port */
apc_param_t completion_key; /* key to send with completion messages */
};
static const struct object_ops job_ops =
@@ -185,6 +187,7 @@ static struct job *create_job_object( struct directory *root, const struct unico
SACL_SECURITY_INFORMATION );
@@ -189,6 +191,7 @@ static struct job *create_job_object( struct directory *root, const struct unico
list_init( &job->process_list );
job->num_processes = 0;
+ job->limit_flags = 0;
job->limit_flags = 0;
+ job->terminating = 0;
job->completion_port = NULL;
job->completion_key = 0;
}
}
return job;
@@ -223,6 +226,7 @@ static void add_job_process( struct job *job, struct process *process )
set_error( STATUS_ACCESS_DENIED );
return;
}
+
process->job = (struct job *)grab_object( job );
list_add_tail( &job->process_list, &process->job_entry );
job->num_processes++;
@@ -239,6 +243,23 @@ static void release_job_process( struct process *process )
@@ -252,12 +255,36 @@ static void release_job_process( struct process *process )
assert( job->num_processes );
job->num_processes--;
- add_job_completion( job, JOB_OBJECT_MSG_EXIT_PROCESS, get_process_id(process) );
+ if (!job->terminating)
+ add_job_completion( job, JOB_OBJECT_MSG_EXIT_PROCESS, get_process_id(process) );
if (!job->num_processes)
add_job_completion( job, JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO, 0 );
}
+static void terminate_job( struct job *job, int exit_code )
+{
+ /* Windows doesn't report completion events for processes
+ * terminated by TerminateProcess, we do the same */
+ job->terminating = 1;
+
+ for (;;) /* restart from the beginning of the list every time */
+ {
+ struct process *process;
@ -234,67 +142,31 @@ index f9738c0..a1ab8c7 100644
+ assert( process->job == job );
+ terminate_process( process, NULL, exit_code );
+ }
+
+ job->terminating = 0;
+}
+
static void job_destroy( struct object *obj )
{
struct job *job = (struct job *)obj;
@@ -1087,6 +1108,14 @@ DECL_HANDLER(new_process)
return;
}
+ if (parent->job && (req->create_flags & CREATE_BREAKAWAY_FROM_JOB) &&
+ !(parent->job->limit_flags & (JOB_OBJECT_LIMIT_BREAKAWAY_OK | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK)))
+ {
+ set_error( STATUS_ACCESS_DENIED );
+ close( socket_fd );
+ return;
+ }
+
if (!req->info_size) /* create an orphaned process */
{
create_process( socket_fd, NULL, 0 );
@@ -1157,6 +1186,12 @@ DECL_HANDLER(new_process)
&& !(req->create_flags & DEBUG_ONLY_THIS_PROCESS);
process->startup_info = (struct startup_info *)grab_object( info );
+ if (parent->job && !((req->create_flags & CREATE_BREAKAWAY_FROM_JOB) ||
+ (parent->job->limit_flags & JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK)))
+ {
+ add_job_process( parent->job, process );
+ }
+
/* connect to the window station */
connect_process_winstation( process, current );
@@ -1559,3 +1594,27 @@ DECL_HANDLER(process_in_job)
}
@@ -1596,6 +1623,17 @@ DECL_HANDLER(process_in_job)
release_object( process );
}
+
+/* terminate all processes associated with the job */
+DECL_HANDLER(terminate_job)
+{
+ struct job *job = get_job_obj( current->process, req->handle, JOB_OBJECT_TERMINATE );
+
+ if (job)
+ {
+ terminate_job( job, req->status );
+ release_object( job );
+ }
+ if (!job) return;
+
+ terminate_job( job, req->status );
+ release_object( job );
+}
+
+/* update limits of the job object */
+DECL_HANDLER(set_job_limits)
+{
+ struct job *job = get_job_obj( current->process, req->handle, JOB_OBJECT_SET_ATTRIBUTES );
+
+ if (job)
+ {
+ job->limit_flags = req->limit_flags;
+ release_object( job );
+ }
+}
/* update limits of the job object */
DECL_HANDLER(set_job_limits)
{
diff --git a/server/process.h b/server/process.h
index 0cf9514..ae83b0e 100644
--- a/server/process.h
@ -308,15 +180,13 @@ index 0cf9514..ae83b0e 100644
/* process startup state */
enum startup_state { STARTUP_IN_PROGRESS, STARTUP_DONE, STARTUP_ABORTED };
diff --git a/server/protocol.def b/server/protocol.def
index b85adca..0077aa4 100644
index 9199c7f..5ecc8d5 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3528,3 +3528,17 @@ enum coords_relative
obj_handle_t job; /* handle to the job */
obj_handle_t process; /* handle to the process */
@@ -3530,6 +3530,13 @@ enum coords_relative
@END
+
+
+/* Terminate all processes associated with the job */
+@REQ(terminate_job)
+ obj_handle_t handle; /* handle to the job */
@ -324,11 +194,9 @@ index b85adca..0077aa4 100644
+@END
+
+
+/* Update limits of the job object */
+@REQ(set_job_limits)
+ obj_handle_t handle; /* handle to the job */
+ unsigned int limit_flags; /* limit flags */
+@END
/* Set limit flags on a job */
@REQ(set_job_limits)
obj_handle_t handle; /* handle to the job */
--
2.3.3

View File

@ -1,196 +0,0 @@
From 3babb8a2681bd530008b0d268cde0b5788177097 Mon Sep 17 00:00:00 2001
From: Andrew Cook <ariscop@gmail.com>
Date: Thu, 26 Feb 2015 13:02:36 +1100
Subject: server: Implement completion messages for job objects.
Fixes Wine bug #33723.
Various cleanups to fit with the rest of the wineserver
coding style by Sebastian Lackner <sebastian@fds-team.de>.
---
dlls/kernel32/tests/process.c | 4 ----
dlls/ntdll/sync.c | 15 +++++++++++++++
server/process.c | 45 +++++++++++++++++++++++++++++++++++++++++++
server/protocol.def | 8 ++++++++
4 files changed, 68 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 8c9a6ef..a86e331 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -2399,7 +2399,6 @@ static void test_CompletionPort(void)
port_info.CompletionKey = job;
port_info.CompletionPort = port;
ret = pSetInformationJobObject(job, JobObjectAssociateCompletionPortInformation, &port_info, sizeof(port_info));
- todo_wine
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
create_process("wait", &pi);
@@ -2407,16 +2406,13 @@ static void test_CompletionPort(void)
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
- todo_wine
test_completion(port, JOB_OBJECT_MSG_NEW_PROCESS, (DWORD_PTR)job, pi.dwProcessId, 0);
TerminateProcess(pi.hProcess, 0);
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
- todo_wine
test_completion(port, JOB_OBJECT_MSG_EXIT_PROCESS, (DWORD_PTR)job, pi.dwProcessId, 0);
- todo_wine
test_completion(port, JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO, (DWORD_PTR)job, 0, 100);
CloseHandle(pi.hProcess);
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index e001e28..87ff3e0 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -694,6 +694,21 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla
SERVER_END_REQ;
break;
+ case JobObjectAssociateCompletionPortInformation:
+ if (len != sizeof(JOBOBJECT_ASSOCIATE_COMPLETION_PORT))
+ return STATUS_INVALID_PARAMETER;
+
+ SERVER_START_REQ( set_job_completion )
+ {
+ JOBOBJECT_ASSOCIATE_COMPLETION_PORT *port_info = info;
+ req->handle = wine_server_obj_handle( handle );
+ req->port = wine_server_obj_handle( port_info->CompletionPort );
+ req->key = wine_server_client_ptr( port_info->CompletionKey );
+ status = wine_server_call(req);
+ }
+ SERVER_END_REQ;
+ break;
+
default:
FIXME( "stub: %p %u %p %u\n", handle, class, info, len );
return STATUS_NOT_IMPLEMENTED;
diff --git a/server/process.c b/server/process.c
index a1ab8c7..10193ef 100644
--- a/server/process.c
+++ b/server/process.c
@@ -149,6 +149,9 @@ struct job
struct list process_list; /* list of all processes */
int num_processes; /* count of running processes */
int limit_flags; /* limit flags */
+ int terminating; /* job is terminating */
+ struct completion *completion_port;
+ apc_param_t completion_key;
};
static const struct object_ops job_ops =
@@ -188,6 +191,9 @@ static struct job *create_job_object( struct directory *root, const struct unico
list_init( &job->process_list );
job->num_processes = 0;
job->limit_flags = 0;
+ job->terminating = 0;
+ job->completion_port = NULL;
+ job->completion_key = 0;
}
}
return job;
@@ -214,6 +220,12 @@ static unsigned int job_map_access( struct object *obj, unsigned int access )
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
+static void add_job_completion( struct job *job, apc_param_t msg, apc_param_t pid )
+{
+ if (job->completion_port)
+ add_completion(job->completion_port, job->completion_key, pid, STATUS_SUCCESS, msg);
+}
+
static void add_job_process( struct job *job, struct process *process )
{
if (!process->running_threads)
@@ -230,6 +242,8 @@ static void add_job_process( struct job *job, struct process *process )
process->job = (struct job *)grab_object( job );
list_add_tail( &job->process_list, &process->job_entry );
job->num_processes++;
+
+ add_job_completion( job, JOB_OBJECT_MSG_NEW_PROCESS, get_process_id(process) );
}
/* called when a process has terminated, allow one additional process */
@@ -241,10 +255,20 @@ static void release_job_process( struct process *process )
assert( job->num_processes );
job->num_processes--;
+
+ if (!job->terminating)
+ add_job_completion( job, JOB_OBJECT_MSG_EXIT_PROCESS, get_process_id(process) );
+
+ if (!job->num_processes)
+ add_job_completion( job, JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO, 0 );
}
static void terminate_job( struct job *job, int exit_code )
{
+ /* Windows doesn't report completion events for processes
+ * terminated by TerminateProcess, we do the same */
+ job->terminating = 1;
+
for (;;) /* restart from the beginning of the list every time */
{
struct process *process;
@@ -258,6 +282,8 @@ static void terminate_job( struct job *job, int exit_code )
assert( process->job == job );
terminate_process( process, NULL, exit_code );
}
+
+ job->terminating = 0;
}
static void job_destroy( struct object *obj )
@@ -267,6 +293,9 @@ static void job_destroy( struct object *obj )
assert( !job->num_processes );
assert( list_empty(&job->process_list) );
+
+ if (job->completion_port)
+ release_object(job->completion_port);
}
static void job_dump( struct object *obj, int verbose )
@@ -1618,3 +1647,19 @@ DECL_HANDLER(set_job_limits)
release_object( job );
}
}
+
+DECL_HANDLER(set_job_completion)
+{
+ struct job *job = get_job_obj( current->process, req->handle, JOB_OBJECT_SET_ATTRIBUTES );
+
+ if (job)
+ {
+ if (!job->completion_port)
+ {
+ job->completion_port = get_completion_obj( current->process, req->port, IO_COMPLETION_MODIFY_STATE );
+ job->completion_key = req->key;
+ }
+ else set_error( STATUS_INVALID_PARAMETER );
+ release_object( job );
+ }
+}
diff --git a/server/protocol.def b/server/protocol.def
index 0077aa4..c88c970 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3542,3 +3542,11 @@ enum coords_relative
obj_handle_t handle; /* handle to the job */
unsigned int limit_flags; /* limit flags */
@END
+
+
+/* Set a job completion port/key */
+@REQ(set_job_completion)
+ obj_handle_t handle; /* handle to the job */
+ obj_handle_t port; /* completion port */
+ client_ptr_t key; /* completion key */
+@END
--
2.3.3

View File

@ -1,4 +1,4 @@
From 2885683ee26ca39acc9158c804b5287da43585ac Mon Sep 17 00:00:00 2001
From 6e6cd9108a8f3c0b9d158ac2605e9b0a08b19c71 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 28 Feb 2015 06:58:48 +0100
Subject: server: Implement waiting for job objects.
@ -29,16 +29,16 @@ index aaa1a6e..c325d32 100644
return;
}
diff --git a/server/process.c b/server/process.c
index 89c029e..8c654b4 100644
index 3ff0be5..f59fe2b 100644
--- a/server/process.c
+++ b/server/process.c
@@ -151,6 +151,7 @@ struct job
int num_processes; /* count of running processes */
int limit_flags; /* limit flags */
unsigned int limit_flags; /* limit flags */
int terminating; /* job is terminating */
+ int signaled; /* job is signaled */
struct completion *completion_port;
apc_param_t completion_key;
struct completion *completion_port; /* associated completion port */
apc_param_t completion_key; /* key to send with completion messages */
};
@@ -193,6 +194,7 @@ static struct job *create_job_object( struct directory *root, const struct unico
job->num_processes = 0;
@ -48,7 +48,7 @@ index 89c029e..8c654b4 100644
job->completion_port = NULL;
job->completion_key = 0;
}
@@ -285,6 +287,8 @@ static void terminate_job( struct job *job, int exit_code )
@@ -284,6 +286,8 @@ static void terminate_job( struct job *job, int exit_code )
}
job->terminating = 0;
@ -57,7 +57,7 @@ index 89c029e..8c654b4 100644
}
static int job_close_handle( struct object *obj, struct process *process, obj_handle_t handle )
@@ -322,7 +326,8 @@ static void job_dump( struct object *obj, int verbose )
@@ -320,7 +324,8 @@ static void job_dump( struct object *obj, int verbose )
static int job_signaled( struct object *obj, struct wait_queue_entry *entry )
{

View File

@ -1204,7 +1204,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
shader_arb_ps_local_constants(compiled, context, state, rt_height);
}
@@ -7703,7 +7711,11 @@
@@ -7770,7 +7778,11 @@
/* Now load the surface */
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
@ -1216,7 +1216,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
== WINED3D_LOCATION_DRAWABLE
&& !wined3d_resource_is_offscreen(&src_surface->container->resource))
{
@@ -7733,6 +7745,7 @@
@@ -7800,6 +7812,7 @@
/* Leave the opengl state valid for blitting */
arbfp_blit_unset(context->gl_info);
@ -1224,7 +1224,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
if (wined3d_settings.cs_multithreaded)
context->gl_info->gl_ops.gl.p_glFinish();
else if (wined3d_settings.strict_draw_ordering
@@ -7744,6 +7757,17 @@
@@ -7811,6 +7824,17 @@
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
@ -1751,7 +1751,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -998,9 +1028,14 @@
@@ -997,9 +1027,14 @@
WORD use_map; /* MAX_ATTRIBS, 16 */
};
@ -1766,7 +1766,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
#define eps 1e-8f
@@ -1085,8 +1120,10 @@
@@ -1084,8 +1119,10 @@
struct list entry;
GLuint id;
struct wined3d_context *context;
@ -1777,7 +1777,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
union wined3d_gl_query_object
@@ -1122,6 +1159,7 @@
@@ -1121,6 +1158,7 @@
struct list entry;
GLuint id;
struct wined3d_context *context;
@ -1785,7 +1785,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT64 timestamp;
};
@@ -1157,6 +1195,12 @@
@@ -1156,6 +1194,12 @@
for (i = 0; i < min(dst->rt_size, src->rt_size); i++)
dst->render_targets[i] = src->render_targets[i];
}
@ -1798,7 +1798,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_context
{
@@ -1172,7 +1216,9 @@
@@ -1171,7 +1215,9 @@
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 */
@ -1808,7 +1808,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_swapchain *swapchain;
struct wined3d_surface *current_rt;
@@ -1272,8 +1318,17 @@
@@ -1271,8 +1317,17 @@
GLfloat fog_coord_value;
GLfloat color[4], fogstart, fogend, fogcolor[4];
GLuint dummy_arbfp_prog;
@ -1826,7 +1826,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
@@ -1403,8 +1458,12 @@
@@ -1402,8 +1457,12 @@
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device,
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
@ -1839,7 +1839,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
@@ -1953,7 +2012,11 @@
@@ -1952,7 +2011,11 @@
struct wined3d_state
{
DWORD flags;
@ -1851,7 +1851,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -1998,6 +2061,7 @@
@@ -1997,6 +2060,7 @@
DWORD render_states[WINEHIGHEST_RENDER_STATE + 1];
};
@ -1859,7 +1859,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_gl_bo
{
GLuint name;
@@ -2006,6 +2070,7 @@
@@ -2005,6 +2069,7 @@
UINT size;
};
@ -1867,7 +1867,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
#define WINED3D_UNMAPPED_STAGE ~0U
/* Multithreaded flag. Removed from the public header to signal that
@@ -2061,11 +2126,23 @@
@@ -2060,11 +2125,23 @@
struct wined3d_rendertarget_view *back_buffer_view;
struct wined3d_swapchain **swapchains;
UINT swapchain_count;
@ -1891,7 +1891,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* For rendering to a texture using glCopyTexImage */
GLuint depth_blt_texture;
@@ -2076,6 +2153,9 @@
@@ -2075,6 +2152,9 @@
UINT xScreenSpace;
UINT yScreenSpace;
UINT cursorWidth, cursorHeight;
@ -1901,7 +1901,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HCURSOR hardwareCursor;
/* The Wine logo texture */
@@ -2107,6 +2187,7 @@
@@ -2106,6 +2186,7 @@
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -1909,7 +1909,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
@@ -2118,6 +2199,11 @@
@@ -2117,6 +2198,11 @@
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_delete_opengl_contexts_cs(struct wined3d_device *device,
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -1921,7 +1921,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2141,9 +2227,11 @@
@@ -2140,9 +2226,11 @@
ULONG (*resource_incref)(struct wined3d_resource *resource);
ULONG (*resource_decref)(struct wined3d_resource *resource);
void (*resource_unload)(struct wined3d_resource *resource);
@ -1933,7 +1933,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_resource
@@ -2166,6 +2254,7 @@
@@ -2165,6 +2253,7 @@
UINT depth;
UINT size;
DWORD priority;
@ -1941,7 +1941,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data;
UINT custom_row_pitch, custom_slice_pitch;
struct wined3d_gl_bo *buffer, *map_buffer;
@@ -2173,6 +2262,11 @@
@@ -2172,6 +2261,11 @@
DWORD locations;
LONG access_fence;
BOOL unmap_dirtify;
@ -1953,7 +1953,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *parent;
const struct wined3d_parent_ops *parent_ops;
@@ -2197,6 +2291,7 @@
@@ -2196,6 +2290,7 @@
void *parent, const struct wined3d_parent_ops *parent_ops,
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
@ -1961,7 +1961,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_resource_changed(struct wined3d_resource *resource,
@@ -2243,6 +2338,15 @@
@@ -2242,6 +2337,15 @@
{
while(InterlockedCompareExchange(&resource->access_fence, 0, 0));
}
@ -1977,7 +1977,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
@@ -2320,7 +2424,9 @@
@@ -2319,7 +2423,9 @@
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;
@ -1987,7 +1987,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
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,
@@ -2354,9 +2460,16 @@
@@ -2353,9 +2459,16 @@
struct wined3d_resource resource;
struct wined3d_texture *container;
@ -2004,7 +2004,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
@@ -2364,6 +2477,7 @@
@@ -2363,6 +2476,7 @@
return CONTAINING_RECORD(resource, struct wined3d_volume, resource);
}
@ -2012,7 +2012,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
@@ -2376,6 +2490,23 @@
@@ -2375,6 +2489,23 @@
struct wined3d_surface_dib
{
HBITMAP DIBsection;
@ -2036,7 +2036,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
UINT bitmap_size;
};
@@ -2401,7 +2532,11 @@
@@ -2400,7 +2531,11 @@
struct wined3d_surface_ops
{
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
@ -2048,7 +2048,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_surface
@@ -2409,12 +2544,25 @@
@@ -2408,12 +2543,25 @@
struct wined3d_resource resource;
const struct wined3d_surface_ops *surface_ops;
struct wined3d_texture *container;
@ -2074,7 +2074,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
GLuint rb_multisample;
GLuint rb_resolved;
GLenum texture_target;
@@ -2458,10 +2606,19 @@
@@ -2457,10 +2605,19 @@
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
@ -2094,7 +2094,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_prepare_rb(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
@@ -2473,6 +2630,7 @@
@@ -2472,6 +2629,7 @@
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN;
@ -2102,7 +2102,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
@@ -2491,6 +2649,21 @@
@@ -2490,6 +2648,21 @@
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void surface_flip(struct wined3d_surface *front, struct wined3d_surface *back) DECLSPEC_HIDDEN;
@ -2124,7 +2124,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Surface flags: */
#define SFLAG_DIBSECTION 0x00000001 /* Has a DIB section attached for GetDC. */
@@ -2538,8 +2711,10 @@
@@ -2537,8 +2710,10 @@
BOOL half_float_conv_needed;
};
@ -2135,7 +2135,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_saved_states
{
DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
@@ -2607,6 +2782,7 @@
@@ -2606,6 +2781,7 @@
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2143,7 +2143,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2657,6 +2833,32 @@
@@ -2656,6 +2832,32 @@
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
@ -2176,7 +2176,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
@@ -2704,6 +2906,7 @@
@@ -2703,6 +2905,7 @@
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
@ -2184,7 +2184,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -2763,6 +2966,7 @@
@@ -2762,6 +2965,7 @@
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_getdc(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_cs_emit_releasedc(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@ -2192,7 +2192,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* 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
@@ -2777,8 +2981,12 @@
@@ -2776,8 +2980,12 @@
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@ -2205,7 +2205,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_query
@@ -2792,12 +3000,16 @@
@@ -2791,12 +2999,16 @@
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
@ -2222,7 +2222,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -2824,7 +3036,9 @@
@@ -2823,7 +3035,9 @@
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@ -2232,7 +2232,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -2849,11 +3063,15 @@
@@ -2848,11 +3062,15 @@
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -2248,7 +2248,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -2891,8 +3109,10 @@
@@ -2890,8 +3108,10 @@
return surface_from_resource(resource);
}
@ -2259,7 +2259,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -2905,8 +3125,12 @@
@@ -2904,8 +3124,12 @@
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
@ -2272,7 +2272,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_swapchain
@@ -2946,8 +3170,10 @@
@@ -2945,8 +3169,10 @@
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@ -2283,7 +2283,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/*****************************************************************************
* Utility function prototypes
@@ -3158,7 +3384,9 @@
@@ -3157,7 +3383,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_shader_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;