Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2018
- 68 participants
- 1149 messages
Re: [PATCH 2/5] mstask: Implement IEnumWorkItems::Next().
by Alexandre Julliard
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
> + if (is_file(&data))
> + {
> + LPWSTR *new_list;
> +
> + if (!list)
> + new_list = CoTaskMemAlloc((enumerated + 1) * sizeof(list[0]));
> + else
> + new_list = CoTaskMemRealloc(list, (enumerated + 1) * sizeof(list[0]));
It would be better to double the allocated size.
--
Alexandre Julliard
julliard(a)winehq.org
June 11, 2018
[PATCH] ntdll: Implement RtlReleaseRelativeName
by Stefan Leichter
For https://bugs.winehq.org/show_bug.cgi?id=45294
Signed-off-by: Stefan Leichter <sle85276(a)gmx.de>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/path.c | 8 ++++++++
2 files changed, 9 insertions(+)
June 11, 2018
[PATCH 2/2] user32: Fix returned class name for other processes windows.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/user32/class.c | 18 ++++++++++--------
include/wine/server_protocol.h | 18 +++++++++++++++++-
server/atom.c | 25 +++++++++++++++++++++++++
server/class.c | 5 +++++
server/object.h | 1 +
server/protocol.def | 8 ++++++++
server/request.h | 5 +++++
server/trace.c | 13 +++++++++++++
server/user.h | 1 +
server/window.c | 17 +++++++++++++++++
10 files changed, 102 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/class.c b/dlls/user32/class.c
index 2b2d07f888..69dc4477ca 100644
--- a/dlls/user32/class.c
+++ b/dlls/user32/class.c
@@ -1183,7 +1183,7 @@ INT WINAPI GetClassNameA( HWND hwnd, LPSTR buffer, INT count )
INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count )
{
CLASS *class;
- INT ret;
+ INT ret = 0;
TRACE("%p %p %d\n", hwnd, buffer, count);
@@ -1193,15 +1193,17 @@ INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count )
if (class == CLASS_OTHER_PROCESS)
{
- WCHAR tmpbuf[MAX_ATOM_LEN + 1];
-
- ret = GlobalGetAtomNameW( GetClassLongW( hwnd, GCW_ATOM ), tmpbuf, MAX_ATOM_LEN + 1 );
- if (ret)
+ SERVER_START_REQ( get_class_name )
{
- ret = min(count - 1, ret);
- memcpy(buffer, tmpbuf, ret * sizeof(WCHAR));
- buffer[ret] = 0;
+ req->handle = wine_server_user_handle( hwnd );
+ wine_server_set_reply( req, buffer, count * sizeof(WCHAR) );
+ if (!wine_server_call_err( req ))
+ {
+ ret = wine_server_reply_size( reply );
+ buffer[ret / sizeof(WCHAR)] = 0;
+ }
}
+ SERVER_END_REQ;
}
else
{
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 5358af20b8..879d361ab2 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -3503,6 +3503,19 @@ struct set_window_owner_reply
+struct get_class_name_request
+{
+ struct request_header __header;
+ user_handle_t handle;
+};
+struct get_class_name_reply
+{
+ struct reply_header __header;
+ /* VARARG(name,unicode_str); */
+};
+
+
+
struct get_window_info_request
{
struct request_header __header;
@@ -5793,6 +5806,7 @@ enum request
REQ_destroy_window,
REQ_get_desktop_window,
REQ_set_window_owner,
+ REQ_get_class_name,
REQ_get_window_info,
REQ_set_window_info,
REQ_set_parent,
@@ -6089,6 +6103,7 @@ union generic_request
struct destroy_window_request destroy_window_request;
struct get_desktop_window_request get_desktop_window_request;
struct set_window_owner_request set_window_owner_request;
+ struct get_class_name_request get_class_name_request;
struct get_window_info_request get_window_info_request;
struct set_window_info_request set_window_info_request;
struct set_parent_request set_parent_request;
@@ -6383,6 +6398,7 @@ union generic_reply
struct destroy_window_reply destroy_window_reply;
struct get_desktop_window_reply get_desktop_window_reply;
struct set_window_owner_reply set_window_owner_reply;
+ struct get_class_name_reply get_class_name_reply;
struct get_window_info_reply get_window_info_reply;
struct set_window_info_reply set_window_info_reply;
struct set_parent_reply set_parent_reply;
@@ -6512,6 +6528,6 @@ union generic_reply
struct terminate_job_reply terminate_job_reply;
};
-#define SERVER_PROTOCOL_VERSION 554
+#define SERVER_PROTOCOL_VERSION 555
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/atom.c b/server/atom.c
index 3ff75407d9..7e79195973 100644
--- a/server/atom.c
+++ b/server/atom.c
@@ -381,6 +381,31 @@ void release_global_atom( struct winstation *winstation, atom_t atom )
}
}
+/* get atom name */
+int get_atom_string( atom_t atom, WCHAR *name, unsigned short len )
+{
+ struct atom_table *table = get_table( 0, 0 );
+ int ret = 0;
+
+ *name = 0;
+
+ if (table)
+ {
+ struct atom_entry *entry;
+
+ if ((entry = get_atom_entry( table, atom )))
+ {
+ ret = len = min(len, entry->len);
+ memcpy(name, entry->str, len);
+ name[len / sizeof(WCHAR)] = 0;
+ }
+
+ release_object( table );
+ }
+
+ return ret;
+}
+
/* add a global atom */
DECL_HANDLER(add_atom)
{
diff --git a/server/class.c b/server/class.c
index d5f6712006..4bb3aa1aad 100644
--- a/server/class.c
+++ b/server/class.c
@@ -142,6 +142,11 @@ atom_t get_class_atom( struct window_class *class )
return class->atom;
}
+atom_t get_base_class_atom( struct window_class *class )
+{
+ return class->base_atom;
+}
+
client_ptr_t get_class_client_ptr( struct window_class *class )
{
return class->client_ptr;
diff --git a/server/object.h b/server/object.h
index b5c50e1cee..4c8d1a58fd 100644
--- a/server/object.h
+++ b/server/object.h
@@ -224,6 +224,7 @@ extern atom_t add_global_atom( struct winstation *winstation, const struct unico
extern atom_t find_global_atom( struct winstation *winstation, const struct unicode_str *str );
extern int grab_global_atom( struct winstation *winstation, atom_t atom );
extern void release_global_atom( struct winstation *winstation, atom_t atom );
+extern int get_atom_string( atom_t atom, WCHAR *name, unsigned short len );
/* directory functions */
diff --git a/server/protocol.def b/server/protocol.def
index 032b03822b..9027312f46 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2515,6 +2515,14 @@ enum message_type
@END
+/* Get window class name */
+(a)REQ(get_class_name)
+ user_handle_t handle; /* handle to the window */
+(a)REPLY
+ VARARG(name,unicode_str); /* class name */
+(a)END
+
+
/* Get information from a window handle */
@REQ(get_window_info)
user_handle_t handle; /* handle to the window */
diff --git a/server/request.h b/server/request.h
index 9cf81a1f09..a693e2cf62 100644
--- a/server/request.h
+++ b/server/request.h
@@ -274,6 +274,7 @@ DECL_HANDLER(create_window);
DECL_HANDLER(destroy_window);
DECL_HANDLER(get_desktop_window);
DECL_HANDLER(set_window_owner);
+DECL_HANDLER(get_class_name);
DECL_HANDLER(get_window_info);
DECL_HANDLER(set_window_info);
DECL_HANDLER(set_parent);
@@ -569,6 +570,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_destroy_window,
(req_handler)req_get_desktop_window,
(req_handler)req_set_window_owner,
+ (req_handler)req_get_class_name,
(req_handler)req_get_window_info,
(req_handler)req_set_window_info,
(req_handler)req_set_parent,
@@ -1685,6 +1687,9 @@ C_ASSERT( sizeof(struct set_window_owner_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct set_window_owner_reply, full_owner) == 8 );
C_ASSERT( FIELD_OFFSET(struct set_window_owner_reply, prev_owner) == 12 );
C_ASSERT( sizeof(struct set_window_owner_reply) == 16 );
+C_ASSERT( FIELD_OFFSET(struct get_class_name_request, handle) == 12 );
+C_ASSERT( sizeof(struct get_class_name_request) == 16 );
+C_ASSERT( sizeof(struct get_class_name_reply) == 8 );
C_ASSERT( FIELD_OFFSET(struct get_window_info_request, handle) == 12 );
C_ASSERT( sizeof(struct get_window_info_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_window_info_reply, full_handle) == 8 );
diff --git a/server/trace.c b/server/trace.c
index 999532a425..6b38896f4c 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -3082,6 +3082,16 @@ static void dump_set_window_owner_reply( const struct set_window_owner_reply *re
fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
}
+static void dump_get_class_name_request( const struct get_class_name_request *req )
+{
+ fprintf( stderr, " handle=%08x", req->handle );
+}
+
+static void dump_get_class_name_reply( const struct get_class_name_reply *req )
+{
+ dump_varargs_unicode_str( " name=", cur_size );
+}
+
static void dump_get_window_info_request( const struct get_window_info_request *req )
{
fprintf( stderr, " handle=%08x", req->handle );
@@ -4693,6 +4703,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_destroy_window_request,
(dump_func)dump_get_desktop_window_request,
(dump_func)dump_set_window_owner_request,
+ (dump_func)dump_get_class_name_request,
(dump_func)dump_get_window_info_request,
(dump_func)dump_set_window_info_request,
(dump_func)dump_set_parent_request,
@@ -4985,6 +4996,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL,
(dump_func)dump_get_desktop_window_reply,
(dump_func)dump_set_window_owner_reply,
+ (dump_func)dump_get_class_name_reply,
(dump_func)dump_get_window_info_reply,
(dump_func)dump_set_window_info_reply,
(dump_func)dump_set_parent_reply,
@@ -5277,6 +5289,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"destroy_window",
"get_desktop_window",
"set_window_owner",
+ "get_class_name",
"get_window_info",
"set_window_info",
"set_parent",
diff --git a/server/user.h b/server/user.h
index e7eecd4c6a..11db294fbb 100644
--- a/server/user.h
+++ b/server/user.h
@@ -175,6 +175,7 @@ extern void release_class( struct window_class *class );
extern int is_desktop_class( struct window_class *class );
extern int is_hwnd_message_class( struct window_class *class );
extern atom_t get_class_atom( struct window_class *class );
+extern atom_t get_base_class_atom( struct window_class *class );
extern client_ptr_t get_class_client_ptr( struct window_class *class );
/* windows station functions */
diff --git a/server/window.c b/server/window.c
index 70812095d2..2223d38aeb 100644
--- a/server/window.c
+++ b/server/window.c
@@ -2049,6 +2049,23 @@ DECL_HANDLER(set_window_owner)
}
+/* get class name for a window handle */
+DECL_HANDLER(get_class_name)
+{
+ struct window *win = get_window( req->handle );
+ WCHAR name[256];
+ atom_t atom;
+ int len;
+
+ if (!win) return;
+
+ atom = win->class ? get_base_class_atom( win->class ) : DESKTOP_ATOM;
+ len = get_atom_string(atom, name, 256);
+
+ set_reply_data( name, min( len, get_reply_max_size() ));
+}
+
+
/* get information from a window handle */
DECL_HANDLER(get_window_info)
{
--
2.17.1
June 11, 2018
[PATCH 1/2] server: Use additional atom to keep base class name.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/user32/class.c | 1 +
include/wine/server_protocol.h | 4 +++-
server/class.c | 27 +++++++++++++++++++++++++--
server/protocol.def | 2 ++
server/request.h | 14 ++++++++------
server/trace.c | 2 ++
6 files changed, 41 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/class.c b/dlls/user32/class.c
index ce2830fe25..2b2d07f888 100644
--- a/dlls/user32/class.c
+++ b/dlls/user32/class.c
@@ -487,6 +487,7 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, UINT basename_offset, HINSTANCE
req->win_extra = winExtra;
req->client_ptr = wine_server_client_ptr( classPtr );
req->atom = classPtr->atomName;
+ req->name_offset = basename_offset;
if (!req->atom && name) wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) );
ret = !wine_server_call_err( req );
classPtr->atomName = reply->atom;
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 98dbcb7e61..5358af20b8 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -4475,6 +4475,8 @@ struct create_class_request
struct request_header __header;
int local;
atom_t atom;
+ int name_offset;
+ int _pad;
unsigned int style;
mod_handle_t instance;
int extra;
@@ -6510,6 +6512,6 @@ union generic_reply
struct terminate_job_reply terminate_job_reply;
};
-#define SERVER_PROTOCOL_VERSION 553
+#define SERVER_PROTOCOL_VERSION 554
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/class.c b/server/class.c
index cc6e52d9b1..d5f6712006 100644
--- a/server/class.c
+++ b/server/class.c
@@ -46,6 +46,7 @@ struct window_class
int count; /* reference count */
int local; /* local class? */
atom_t atom; /* class atom */
+ atom_t base_atom; /* base class atom for versioned class */
mod_handle_t instance; /* module instance */
unsigned int style; /* class style */
int win_extra; /* number of window extra bytes */
@@ -151,17 +152,35 @@ DECL_HANDLER(create_class)
{
struct window_class *class;
struct unicode_str name = get_req_unicode_str();
- atom_t atom;
+ atom_t atom, base_atom;
if (name.len)
{
atom = add_global_atom( NULL, &name );
if (!atom) return;
+ if (req->name_offset && req->name_offset < name.len / sizeof(WCHAR))
+ {
+ name.str += req->name_offset;
+ name.len -= req->name_offset * sizeof(WCHAR);
+
+ base_atom = add_global_atom( NULL, &name );
+ if (!base_atom)
+ {
+ release_global_atom( NULL, atom );
+ return;
+ }
+ }
+ else
+ {
+ base_atom = atom;
+ grab_global_atom( NULL, atom );
+ }
}
else
{
- atom = req->atom;
+ base_atom = atom = req->atom;
if (!grab_global_atom( NULL, atom )) return;
+ grab_global_atom( NULL, base_atom );
}
class = find_class( current->process, atom, req->instance );
@@ -169,6 +188,7 @@ DECL_HANDLER(create_class)
{
set_win32_error( ERROR_CLASS_ALREADY_EXISTS );
release_global_atom( NULL, atom );
+ release_global_atom( NULL, base_atom );
return;
}
if (req->extra < 0 || req->extra > 4096 || req->win_extra < 0 || req->win_extra > 4096)
@@ -176,15 +196,18 @@ DECL_HANDLER(create_class)
/* don't allow stupid values here */
set_error( STATUS_INVALID_PARAMETER );
release_global_atom( NULL, atom );
+ release_global_atom( NULL, base_atom );
return;
}
if (!(class = create_class( current->process, req->extra, req->local )))
{
release_global_atom( NULL, atom );
+ release_global_atom( NULL, base_atom );
return;
}
class->atom = atom;
+ class->base_atom = base_atom;
class->instance = req->instance;
class->style = req->style;
class->win_extra = req->win_extra;
diff --git a/server/protocol.def b/server/protocol.def
index 99e7221c4b..032b03822b 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3144,6 +3144,8 @@ enum caret_state
@REQ(create_class)
int local; /* is it a local class? */
atom_t atom; /* class atom */
+ int name_offset; /* base class name offset for specified atom */
+ int _pad;
unsigned int style; /* class style */
mod_handle_t instance; /* module instance */
int extra; /* number of extra class bytes */
diff --git a/server/request.h b/server/request.h
index 2d55dfbd98..9cf81a1f09 100644
--- a/server/request.h
+++ b/server/request.h
@@ -2031,12 +2031,14 @@ C_ASSERT( FIELD_OFFSET(struct get_hook_info_reply, unicode) == 32 );
C_ASSERT( sizeof(struct get_hook_info_reply) == 40 );
C_ASSERT( FIELD_OFFSET(struct create_class_request, local) == 12 );
C_ASSERT( FIELD_OFFSET(struct create_class_request, atom) == 16 );
-C_ASSERT( FIELD_OFFSET(struct create_class_request, style) == 20 );
-C_ASSERT( FIELD_OFFSET(struct create_class_request, instance) == 24 );
-C_ASSERT( FIELD_OFFSET(struct create_class_request, extra) == 32 );
-C_ASSERT( FIELD_OFFSET(struct create_class_request, win_extra) == 36 );
-C_ASSERT( FIELD_OFFSET(struct create_class_request, client_ptr) == 40 );
-C_ASSERT( sizeof(struct create_class_request) == 48 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, name_offset) == 20 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, _pad) == 24 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, style) == 28 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, instance) == 32 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, extra) == 40 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, win_extra) == 44 );
+C_ASSERT( FIELD_OFFSET(struct create_class_request, client_ptr) == 48 );
+C_ASSERT( sizeof(struct create_class_request) == 56 );
C_ASSERT( FIELD_OFFSET(struct create_class_reply, atom) == 8 );
C_ASSERT( sizeof(struct create_class_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct destroy_class_request, atom) == 12 );
diff --git a/server/trace.c b/server/trace.c
index e2980a3e31..999532a425 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -3753,6 +3753,8 @@ static void dump_create_class_request( const struct create_class_request *req )
{
fprintf( stderr, " local=%d", req->local );
fprintf( stderr, ", atom=%04x", req->atom );
+ fprintf( stderr, ", name_offset=%d", req->name_offset );
+ fprintf( stderr, ", _pad=%d", req->_pad );
fprintf( stderr, ", style=%08x", req->style );
dump_uint64( ", instance=", &req->instance );
fprintf( stderr, ", extra=%d", req->extra );
--
2.17.1
June 11, 2018
Re: [PATCH] winhttp: Store the server certificate context in the request.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39055
Your paranoid android.
=== w2003std (32 bit winhttp) ===
winhttp.c:3908: Test failed: got 80072f0d
=== wvistau64_zh_CN (32 bit winhttp) ===
winhttp.c:3104: Test failed: failed to receive response 12152
winhttp.c:3109: Test failed: failed to query status code 12019
winhttp.c:3110: Test failed: request failed unexpectedly 3735928559
June 11, 2018
[PATCH] winhttp: Store the server certificate context in the request.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/winhttp/net.c | 1 -
dlls/winhttp/request.c | 11 +++++++++++
dlls/winhttp/session.c | 14 ++++++--------
dlls/winhttp/tests/winhttp.c | 5 +++++
dlls/winhttp/winhttp_private.h | 2 ++
5 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index d0d02d535e..d577a64783 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -47,7 +47,6 @@
#include "windef.h"
#include "winbase.h"
#include "winhttp.h"
-#include "wincrypt.h"
#include "schannel.h"
#include "winhttp_private.h"
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 96a2c91de5..56ec910294 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -1765,6 +1765,10 @@ static BOOL open_connection( request_t *request )
return FALSE;
}
}
+
+ CertFreeCertificateContext( request->server_cert );
+ request->server_cert = NULL;
+
if (!ensure_cred_handle( connect->session ) ||
!netconn_secure_connect( netconn, connect->hostname, request->security_flags,
&connect->session->cred_handle ))
@@ -1787,6 +1791,13 @@ static BOOL open_connection( request_t *request )
request->netconn = netconn;
}
+ if (netconn->secure && !(request->server_cert = netconn_get_certificate( netconn )))
+ {
+ heap_free( addressW );
+ netconn_close( netconn );
+ return FALSE;
+ }
+
done:
request->read_pos = request->read_size = 0;
request->read_chunked = FALSE;
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index e2b91fa513..fb815682c2 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -40,7 +40,6 @@
#include "winsock2.h"
#include "ws2ipdef.h"
#include "winhttp.h"
-#include "wincrypt.h"
#include "winreg.h"
#define COBJMACROS
#include "ole2.h"
@@ -597,6 +596,8 @@ static void request_destroy( object_header_t *hdr )
}
release_object( &request->connect->hdr );
+ CertFreeCertificateContext( request->server_cert );
+
destroy_authinfo( request->authinfo );
destroy_authinfo( request->proxy_authinfo );
@@ -759,14 +760,14 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
return FALSE;
}
- if (!request->netconn || !(cert = netconn_get_certificate( request->netconn ))) return FALSE;
+ if (!(cert = CertDuplicateCertificateContext( request->server_cert ))) return FALSE;
*(CERT_CONTEXT **)buffer = (CERT_CONTEXT *)cert;
*buflen = sizeof(cert);
return TRUE;
}
case WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT:
{
- const CERT_CONTEXT *cert;
+ const CERT_CONTEXT *cert = request->server_cert;
const CRYPT_OID_INFO *oidInfo;
WINHTTP_CERTIFICATE_INFO *ci = buffer;
@@ -778,16 +779,14 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
set_last_error( ERROR_INSUFFICIENT_BUFFER );
return FALSE;
}
- if (!request->netconn || !(cert = netconn_get_certificate( request->netconn ))) return FALSE;
+ if (!cert) return FALSE;
ci->ftExpiry = cert->pCertInfo->NotAfter;
ci->ftStart = cert->pCertInfo->NotBefore;
ci->lpszSubjectInfo = blob_to_str( cert->dwCertEncodingType, &cert->pCertInfo->Subject );
ci->lpszIssuerInfo = blob_to_str( cert->dwCertEncodingType, &cert->pCertInfo->Issuer );
ci->lpszProtocolName = NULL;
- oidInfo = CryptFindOIDInfo( CRYPT_OID_INFO_OID_KEY,
- cert->pCertInfo->SignatureAlgorithm.pszObjId,
- 0 );
+ oidInfo = CryptFindOIDInfo( CRYPT_OID_INFO_OID_KEY, cert->pCertInfo->SignatureAlgorithm.pszObjId, 0 );
if (oidInfo)
ci->lpszSignatureAlgName = (LPWSTR)oidInfo->pwszName;
else
@@ -795,7 +794,6 @@ static BOOL request_query_option( object_header_t *hdr, DWORD option, LPVOID buf
ci->lpszEncryptionAlgName = NULL;
ci->dwKeySize = request->netconn ? netconn_get_cipher_strength( request->netconn ) : 0;
- CertFreeCertificateContext( cert );
*buflen = sizeof(*ci);
return TRUE;
}
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 4d8585be1a..2c22276899 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -1107,6 +1107,11 @@ static void test_secure_connection(void)
}
ok(read_size >= available_size, "read_size = %u, available_size = %u\n", read_size, available_size);
+ size = sizeof(cert);
+ ret = WinHttpQueryOption(req, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert, &size);
+ ok(ret, "failed to retrieve certificate context %u\n", GetLastError());
+ if (ret) CertFreeCertificateContext(cert);
+
cleanup:
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h
index 0eb0dead87..d639a2deb2 100644
--- a/dlls/winhttp/winhttp_private.h
+++ b/dlls/winhttp/winhttp_private.h
@@ -46,6 +46,7 @@
#include "ole2.h"
#include "sspi.h"
+#include "wincrypt.h"
static const WCHAR getW[] = {'G','E','T',0};
static const WCHAR postW[] = {'P','O','S','T',0};
@@ -209,6 +210,7 @@ typedef struct
DWORD optional_len;
netconn_t *netconn;
DWORD security_flags;
+ const CERT_CONTEXT *server_cert;
int resolve_timeout;
int connect_timeout;
int send_timeout;
--
2.11.0
June 11, 2018
Re: [PATCH] webservices/tests: Use the available ARRAY_SIZE() macro
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 11, 2018
wine-3.0.2-rc1 Available
by Michael Stefaniuc
Hello guys,
I have pushed wine-3.0.2-rc1 (with tag) to
https://github.com/mstefani/wine-stable/tree/oldstable
http://static-winehq.193b.starter-ca-central-1.openshiftapps.com/stable/
Nothing fancy this time. The bulk of the changes is stuff from wine-3.5
to wine-3.7 with some older stuff that got deferred during 3.0.1.
The interesting parts from the ANNOUNCE file:
What's new in this release (see below for details):
- Various bug fixes
----------------------------------------------------------------
Bugs fixed in 3.0.2 (total 54):
13351 Empire Earth v. 1.00: mouse is not responsive
15350 wrong keyboard layout in Tomb Raider Anniversary / Legend
29842 IE4 crashes on showing certificate authorities, needs
wininet.dll.ParseX509EncodedCertificateForListBoxEntry
29999 Bloodrayne 2: text in the menus misplaced
30076 .NET Framework 4.x with WinVer setting "Windows 7" spams
terminal with "LocaleNameToLCID/LCIDToLocaleName unsupported flags
8000000" (LOCALE_ALLOW_NEUTRAL_NAMES)
30103 Static controls with bitmap do not display correct background.
30611 Lazarus browser sample fails, needs ieframe:ViewObject_Draw
implementation
31850 Age of Mythology needs pidgen.dll.PIDGenSimpA
34101 Need for Speed: Shift demo crashes in 'purist' mode (d3dx9_36)
(needs ID3DXEffect::FindNextValidTechnique method implementation)
36843 "Read only"checkbox on Save As dialog
37228 Cisco Jabber 11.x crashes on unimplemented function
ntdsapi.dll.DsCrackNamesW
37594 World of Warcraft in-game browser does not work (needs
advapi32.BuildSecurityDescriptorW() implementation)
38564 Rush for Berlin Gold crashes after starting
38836 SCM 'StartService' must wait for driver service entry point
execution before return (PunkBuster 'PnkBstrB' service failure, CPU-Z
randomly fails to load its driver, BattlEye 'BEDaisy' kernel service)
39209 Smart Diary Suite 4 crashes when updating options
('CLSID_AudioCompressorCategory',
'{33D9A761-90C8-11d0-BD43-00A0C911CE86}' must be treated as special
category)
39452 mpr.WNetGetUniversalName() return value (causes Intel MPI to fail)
39979 SupArc crashes inside msvcr110
40767 Indiana Jones and The Emperor's Tomb quits after the splash screen
41377 Windows 10 DISM fails to find its resources (kernel32
SetThreadUILanguage must return non-zero/best fit language identifier if
zero is passed)
42267 Rogue-Killer installer crashes on unimplemented function
ntdll.dll._aulldvrm
42446 Native Instruments 'Native Access' 1.1.x fails to start,
reports 'You cannot start Native Access from the mounted disk'
42686 Poedit crashes on start on unimplemented function
msvcp140.dll.?_IsNonBlockingThread(a)_Task_impl_base@details(a)Concurrency@@SA_NXZ
42768 Ys: The Ark of Napishtim (Ys 6) silently crashes playing
in-game videos
43351 x64dbg needs kernel32.dll CreateRemoteThreadEx in Win7+ mode
43831 Cuphead (Steam) crashes on startup (needs
setupapi.CM_Get_Parent stub to return CR_NO_SUCH_DEVNODE)
43930 iCopy 1.6.x (.NET 2.0 app) crashes on startup
(IWiaDevMgr::SelectDeviceDlg DeviceID pointer parameter can be NULL,
needs be declared 'unique' for RPC marshalling)
44135 Olive Tree Bible Software BibleStudySetup_6.0.23.exe fails to
install
44138 Native Access needs unimplemented function
iphlpapi.dll.if_indextoname
44278 Multiple applications crash on unimplemented function
msvcp140.dll.?uncaught_exceptions(a)std@@YAHXZ
44404 Several .Net apps (e.g. Remembear) throw errors/crash,caused by
msctf stubs TextStoreACPSink_{OnTextChange,OnSelectionChange,OnLayoutChange}
44466 PrtSc button crashes StarCraft
44496 Custom imports resolver used by multiple kernel drivers can't
cope with 'ntoskrnl.exe' low-level (wc)string/copy helpers being
forwarded to 'msvcrt.dll' (BattlEye 'BEDaisy', Sentinel HASP 'hardlock.sys')
44504 vlc 2.2.6: playback performance hampered
44530 64-bit Sentinel HASP hardlock.sys kernel driver tries to access
to DR7 (not handled in ntoskrnl emulate_instruction)
44693 Native Access crashes on unimplemented function
vcruntime140.dll.__current_exception
44742 Divinity: Original Sin 2 crashes due to unimplemented
IPHLPAPI.DLL.ConvertLengthToIpv4Mask
44744 Autodesk Fusion 360 need propsys.dll.PSGetPropertyKeyFromName
to be installed
44746 Running any command in MS PowerShell 6+ (.NET app) results in
advapi:EventActivityIdControl console spam
44770 ExpressPCB Plus 1.1 (.NET 3.5 SP1 app) throws
'System.NotImplementedException: Not implemented at
System.Drawing.Pen.TranslateTransform' (GdipTranslatePenTransform not
implemented)
44772 progecad 2018 installer does not start
44804 PCBWeb crashes: Call to unimplemented function
d3dx11_43.dll.D3DX11CreateTextureFromFileW
44811 BattlEye 'BEDaisy' kernel service crashes on unimplemented
function ntoskrnl.exe._chkstk
44818 ntdll.NtClose (kernel32.CloseHandle) should throw invalid
handle exception (EXCEPTION_INVALID_HANDLE) for invalid handles when run
under debugger
44864 Incoming crashes after the intro video
44874 Phonetools 9.x crashes on unimplemented function
KERNEL32.dll.RequestDeviceWakeup
44904 winebus blocks auto start up of scheduler service
44923 Failing kernel driver services can stall WINEPREFIX
bootstrapping/startup for a considerable time when configured as autostart
44924 StarForce v3 kernel drivers need
ntoskrnl.IoCreateSynchronizationEvent to return a non-NULL handle
44932 limited list of available printer's paper/page size
44944 Adobe Premiere Elements 14 fails to install: ERROR: Third party
payload installer pxengine5_08_13a.exe failed with exit code: -1
44971 HackShield for Banking Driver 'HSBDrvNt.sys' (part of Ahnlab
Safe Transaction) crashes on unimplemented function
ntoskrnl.exe.ExInterlockedPopEntrySList
44984 Maya 2018 LT Installer requires unimplemented function
api-ms-win-crt-time-l1-1-0.dll._timespec64_get
44993 Magic The Gathering Arena fails to install
45026 Windows File Manager (WinFile) fails to build in winelib
(LPDROPSTRUCT missing from winuser.h)
----------------------------------------------------------------
Changes since 3.0.1:
Alexander Morozov (1):
ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and
ExReleaseFastMutexUnsafe.
Alexandre Julliard (7):
winex11: Use the correct colormap for the OpenGL parent window.
winex11: Store the visual info in the OpenGL pixel format.
winex11: Store only the pixmap size instead of the window
rectangle in the GL drawable.
winex11: Implement refcounting of GL drawables.
winex11: Hold a reference to the drawable from the GL context.
wininet/tests: Update the winehq.org certificate data.
ntoskrnl: Add emulation of CRn and DRn registers on x86-64.
Alistair Leslie-Hughes (9):
comctl32/treeview: Fix item icon background when using
TVS_FULLROWSELECT style.
pidgen: Add PIDGenSimpA stub.
winedevice: Wait until driver has started before returning.
ntoskrnl.exe: Dont forward some msvcrt functions.
propsys: Add PSGetPropertyKeyFromName stub.
ntoskrnl.exe: Implement _chkstk.
winedevice: Improve error handling when a driver fails to load.
maintainers: Update Staging branch.
maintainers: Remove previous wine-staging maintainers.
Andrew Eikum (1):
maintainers: Remove myself from a dmusic DLL.
Andrew Wesie (1):
advapi32: Implement BuildSecurityDescriptorW.
Andrey Gusev (1):
d3dx11: Add D3DX11CreateTextureFromFileA/W stub.
André Hentschel (3):
wininet: Fix negated check for drain_content result (clang).
gdiplus: Add stub for GdipSetPathGradientPath.
progman: Fix warning in PUT_SHORT macro (clang).
Austin English (4):
wininet: Add ParseX509EncodedCertificateForListBoxEntry stub.
ntdsapi: Add DsCrackNamesA/W stubs.
include/winuser.h: Add tagDROPSTRUCT struct.
include/wfext.h: Add miscellaneous FM_* defines.
Christian Inci (1):
wined3d: Recognize Titan V.
Dagfinn Reiakvam (1):
iphlpapi: Add support for ConvertLengthToIpv4Mask().
Dmitry Timoshkov (5):
avifil32: Correct threading model on interfaces.
services: Add a 3000 ms timeout to StartService.
winspool.drv: Add A0, A1 and A2 paper sizes to generic.ppd.
dinput: The DIK_ key code should match the scan code.
sspicli: Add forwards to secur32.
Gijs Vermeulen (1):
ntoskrnl.exe: Improve IoCreateSynchronizationEvent stub.
Hans Leidekker (2):
iphlpapi: Implement if_indextoname.
msi: Don't cache the base URL.
Henri Verbeet (1):
winex11: Restore the X11DRV_FLUSH_GL_DRAWABLE XFlush() for setups
without OML_sync_control.
Huw D. M. Davies (1):
winebuild: On x86_64, save xmm0 - 3 during the delayed import lookup.
Ivan Kalvachev (1):
kernel32: Add DECL_HOTPATCH to OutputDebugString functions.
Jarkko Korpi (1):
kernel32: Silence repeated LocaleNameToLCID unsupported flags.
Johann Frei (1):
dinput: Implement X/Y axis granularity and add test.
Louis Lenders (9):
ntdll: Update version resource.
kernel32/tests: Add simple test for SetThreadUILanguage.
kernel32: Improve stub for SetThreadUILanguage.
iexplore/iexplore.inf: Add svcVersion reg key and update to win7.
msctf: Return S_OK in TextStoreACPSink_OnTextChange.
msctf: Return S_OK in TextStoreACPSink_OnSelectionChange.
msctf: Return S_OK in TextStoreACPSink_OnLayoutChange.
wine.inf: Create catroot directory.
kernel32: Add stub for RequestDeviceWakeup.
Mark White (1):
kernel32: Fix forward slash path handling to GetVolumePathNameW.
Martin Storsjo (1):
ucrtbase: Hook up __intrinsic_setjmpex for x86_64 and arm64.
Matteo Bruni (2):
d3dx9: Implement FindNextValidTechnique().
d3d8: Forbid setting a viewport larger than the render target.
Michael Müller (3):
ieframe: Return S_OK in IViewObject::Draw stub.
mpr: Return correct error code for non network paths and
REMOTE_NAME_INFO_LEVEL in WNetGetUniversalName.
ntoskrnl: Implement ExInterlockedPopEntrySList.
Michael Stefaniuc (1):
maintainers: Add a DirectMusic section.
Nikolay Sivov (7):
comdlg32: Add a helper to test if file dialog hook is enabled.
comdlg32: Hide Read-only checkbox for Save dialogs.
gdiplus: Implement GdipTranslatePenTransform.
wincodecs: Use static array for property bag descriptions.
wincodecs: Encoder options are optional for CreateNewFrame().
user32/static: Use correct brush color for centered image background.
kernel32: Add CreateRemoteThreadEx().
Piotr Caban (6):
msvcrt: Optimize _strupr implementation in C locale.
msvcrt/tests: Add _strupr tests.
msvcp140: Add __uncaught_exceptions implementation.
ucrtbase: Add __current_exception() implementation.
msvcp140: Add _Task_impl_base::_IsNonBlockingThread stub.
ucrtbase: Add _timespec{32,64}_get implementation.
Sebastian Lackner (2):
ntdll: Throw exception if invalid handle is passed to NtClose and
debugger enabled.
advapi32/tests: Add basic tests for BuildSecurityDescriptor.
Stefan Dösinger (1):
ddraw: Don't read past the end of the executebuffer.
Stefan Leichter (2):
advapi32: Silence the fixme in EventActivityIdControl.
include: Fix declaration of SelectDeviceDlg.
Tim Wanders (1):
setupapi: Return CR_NO_SUCH_DEVNODE from CM_Get_Parent stub.
Zebediah Figura (5):
ntdll: Implement _alldvrm() and _aulldvrm().
devenum/tests: Test registering DirectShow filters.
devenum: More correctly handle device types.
devenum: Allow parsing display name without class ID.
devenum: Correctly implement IMoniker::GetDisplayName().
--
Michael Stefaniuc
mstefani(a)winehq.org
June 10, 2018
[PATCH] find: First simple implementation and tests
by Fabian Maurer
The message text is the same as on windows,
since the exit code doesn't seem reliable.
Currently only supports single line searching,
and not unicode aware. I'll add tests and if needed an implementation
for that sometime later.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
configure | 25 ++----
configure.ac | 1 +
programs/find/Makefile.in | 5 +-
programs/find/find.c | 112 +++++++++++++++++++++--
programs/find/resources.h | 27 ++++++
programs/find/rsrc.rc | 25 ++++++
programs/find/tests/Makefile.in | 4 +
programs/find/tests/find.c | 151 ++++++++++++++++++++++++++++++++
8 files changed, 326 insertions(+), 24 deletions(-)
create mode 100644 programs/find/resources.h
create mode 100644 programs/find/rsrc.rc
create mode 100644 programs/find/tests/Makefile.in
create mode 100644 programs/find/tests/find.c
diff --git a/configure b/configure
index 299fb407d8..56e7dde04c 100755
--- a/configure
+++ b/configure
@@ -800,7 +800,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1862,7 +1861,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -2115,15 +2113,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -2261,7 +2250,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -2414,7 +2403,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -6626,7 +6614,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -6672,7 +6660,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -6696,7 +6684,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -6741,7 +6729,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -6765,7 +6753,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -19379,6 +19367,7 @@ wine_fn_config_makefile programs/explorer enable_explorer
wine_fn_config_makefile programs/extrac32 enable_extrac32
wine_fn_config_makefile programs/fc enable_fc
wine_fn_config_makefile programs/find enable_find
+wine_fn_config_makefile programs/find/tests enable_tests
wine_fn_config_makefile programs/findstr enable_findstr
wine_fn_config_makefile programs/fsutil enable_fsutil
wine_fn_config_makefile programs/hh enable_hh
diff --git a/configure.ac b/configure.ac
index 469fa8d729..1d6a4cf1c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3878,6 +3878,7 @@ WINE_CONFIG_MAKEFILE(programs/explorer)
WINE_CONFIG_MAKEFILE(programs/extrac32)
WINE_CONFIG_MAKEFILE(programs/fc)
WINE_CONFIG_MAKEFILE(programs/find)
+WINE_CONFIG_MAKEFILE(programs/find/tests)
WINE_CONFIG_MAKEFILE(programs/findstr)
WINE_CONFIG_MAKEFILE(programs/fsutil)
WINE_CONFIG_MAKEFILE(programs/hh)
diff --git a/programs/find/Makefile.in b/programs/find/Makefile.in
index ef8d61b7ce..4a90905986 100644
--- a/programs/find/Makefile.in
+++ b/programs/find/Makefile.in
@@ -1,4 +1,7 @@
MODULE = find.exe
-APPMODE = -mconsole -municode
+APPMODE = -mconsole
+IMPORTS = user32 shlwapi
C_SRCS = find.c
+
+RC_SRCS = rsrc.rc
diff --git a/programs/find/find.c b/programs/find/find.c
index 9d7aecd402..937f773243 100644
--- a/programs/find/find.c
+++ b/programs/find/find.c
@@ -16,18 +16,120 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include <windows.h>
+#include <stdlib.h>
+#include <shlwapi.h>
+
+#include "wine/heap.h"
#include "wine/debug.h"
+#include "resources.h"
WINE_DEFAULT_DEBUG_CHANNEL(find);
-int wmain(int argc, WCHAR *argv[])
+char* read_from_pipe(HANDLE handle)
+{
+ char buffer[4096];
+ DWORD bytes_read;
+ DWORD length = 0;
+ BOOL success;
+ char *ret = heap_alloc_zero(1);
+
+ for (;;)
+ {
+ success = ReadFile(handle, buffer, sizeof(buffer), &bytes_read, NULL);
+ if (!success || !bytes_read)
+ break;
+ ret = heap_realloc(ret, length + bytes_read);
+ memcpy((char *)ret + length, buffer, bytes_read);
+ length += bytes_read;
+ }
+
+ ret[length] = 0;
+ return ret;
+}
+
+void write_to_pipe(HANDLE handle, const char *str)
+{
+ DWORD bytes_written_sum = 0;
+ DWORD length = lstrlenA(str);
+ do
+ {
+ DWORD bytes_written;
+ WriteFile(handle, str, length * sizeof(char), &bytes_written, NULL);
+ bytes_written_sum += bytes_written;
+ } while (bytes_written_sum < length);
+}
+
+void find_printf(const char *str)
+{
+ write_to_pipe(GetStdHandle(STD_OUTPUT_HANDLE), str);
+}
+
+int do_find(const char *text, const char* tofind)
{
+ void *found;
+
+ if (lstrlenA(text) == 0)
+ return 1;
+
+ found = StrStrA(text, tofind);
+
+ if (found)
+ {
+ find_printf(text);
+ find_printf("\r\n");
+ return 0;
+ }
+
+ return 1;
+}
+
+int main(int argc, char *argv[])
+{
+ char *text_stdin;
+ char *tofind = NULL;
+ char message_parameter_invalid[64];
+ char message_switch_invalid[64];
int i;
+ int exitcode;
- WINE_FIXME("stub:");
+ TRACE("running find:");
for (i = 0; i < argc; i++)
- WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
- WINE_FIXME("\n");
+ {
+ TRACE(" %s", argv[i]);
+ }
+ TRACE("\n");
+
+ LoadStringA(GetModuleHandleW(NULL), IDS_INVALID_PARAMETER, message_parameter_invalid, sizeof(message_parameter_invalid));
+ LoadStringA(GetModuleHandleW(NULL), IDS_INVALID_SWITCH, message_switch_invalid, sizeof(message_switch_invalid));
+
+ /* We read the complete input at once, for simplicity */
+ text_stdin = read_from_pipe(GetStdHandle(STD_INPUT_HANDLE));
+
+ for (i = 1; i < argc; i++)
+ {
+ if (argv[i][0] == '/')
+ {
+ find_printf(message_switch_invalid);
+ exitcode = 2;
+ goto cleanup;
+ }
+ else if(tofind == NULL)
+ {
+ tofind = argv[i];
+ }
+ }
+
+ if (tofind == NULL)
+ {
+ find_printf(message_parameter_invalid);
+ exitcode = 2;
+ goto cleanup;
+ }
+
+ exitcode = do_find(text_stdin, tofind);
- return 0;
+cleanup:
+ heap_free(text_stdin);
+ return exitcode;
}
diff --git a/programs/find/resources.h b/programs/find/resources.h
new file mode 100644
index 0000000000..8712d91e36
--- /dev/null
+++ b/programs/find/resources.h
@@ -0,0 +1,27 @@
+/*
+ * Resource IDs
+ *
+ * Copyright 2018 Fabian Maurer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_FIND_RESOURCES_H
+#define __WINE_FIND_RESOURCES_H
+
+#define IDS_INVALID_PARAMETER 1000
+#define IDS_INVALID_SWITCH 1001
+
+#endif /* __WINE_FIND_RESOURCES_H */
diff --git a/programs/find/rsrc.rc b/programs/find/rsrc.rc
new file mode 100644
index 0000000000..f10fb6285f
--- /dev/null
+++ b/programs/find/rsrc.rc
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2018 Fabian Maurer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "resources.h"
+
+STRINGTABLE
+{
+ IDS_INVALID_PARAMETER "FIND: Parameter format not correct\r\n"
+ IDS_INVALID_SWITCH "FIND: Invalid switch\r\n"
+}
diff --git a/programs/find/tests/Makefile.in b/programs/find/tests/Makefile.in
new file mode 100644
index 0000000000..ad88243ede
--- /dev/null
+++ b/programs/find/tests/Makefile.in
@@ -0,0 +1,4 @@
+TESTDLL = find.exe
+
+C_SRCS = \
+ find.c
diff --git a/programs/find/tests/find.c b/programs/find/tests/find.c
new file mode 100644
index 0000000000..2dce343965
--- /dev/null
+++ b/programs/find/tests/find.c
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2018 Fabian Maurer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <windows.h>
+#include <stdio.h>
+
+#include "wine/heap.h"
+#include "wine/test.h"
+
+/* Copied from find.exe implementation */
+char* read_from_pipe(HANDLE handle)
+{
+ char buffer[4096];
+ DWORD bytes_read;
+ DWORD length = 0;
+ BOOL success;
+ char *ret = heap_alloc_zero(1);
+
+ for (;;)
+ {
+ success = ReadFile(handle, buffer, sizeof(buffer), &bytes_read, NULL);
+ if (!success || !bytes_read)
+ break;
+ ret = heap_realloc(ret, length + bytes_read);
+ memcpy((char *)ret + length, buffer, bytes_read);
+ length += bytes_read;
+ }
+
+ ret[length] = 0;
+ return ret;
+}
+
+/* Copied from find.exe implementation */
+void write_to_pipe(HANDLE handle, const char *str)
+{
+ DWORD bytes_written_sum = 0;
+ DWORD length = lstrlenA(str);
+ do
+ {
+ DWORD bytes_written;
+ WriteFile(handle, str, length * sizeof(char), &bytes_written, NULL);
+ bytes_written_sum += bytes_written;
+ } while (bytes_written_sum < length);
+}
+
+#define run_find(commandline, input, out_expected, exitcode_expected) \
+ run_find_(commandline, input, out_expected, exitcode_expected, __FILE__, __LINE__)
+
+static void run_find_(const char *commandline, const char *input, const char *out_expected, int exitcode_expected, const char *file, int line)
+{
+ HANDLE child_stdin_read;
+ HANDLE child_stdout_write;
+ HANDLE parent_stdin_write;
+ HANDLE parent_stdout_read;
+ STARTUPINFOA startup_info = {0};
+ SECURITY_ATTRIBUTES security_attributes;
+ PROCESS_INFORMATION process_info = {0};
+ char *child_output = NULL;
+ char cmd[4096];
+ int comparison;
+ DWORD exitcode;
+
+ security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES);
+ security_attributes.bInheritHandle = TRUE;
+ security_attributes.lpSecurityDescriptor = NULL;
+
+ CreatePipe(&parent_stdout_read, &child_stdout_write, &security_attributes, 0);
+ CreatePipe(&child_stdin_read, &parent_stdin_write, &security_attributes, 0);
+
+ SetHandleInformation(parent_stdout_read, HANDLE_FLAG_INHERIT, 0);
+ SetHandleInformation(parent_stdin_write, HANDLE_FLAG_INHERIT, 0);
+
+ startup_info.cb = sizeof(STARTUPINFOW);
+ startup_info.hStdInput = child_stdin_read;
+ startup_info.hStdOutput = child_stdout_write;
+ startup_info.hStdError = NULL;
+ startup_info.dwFlags |= STARTF_USESTDHANDLES;
+
+ sprintf(cmd, "find.exe %s", commandline);
+ CreateProcessA(NULL, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &startup_info, &process_info);
+ CloseHandle(child_stdin_read);
+ CloseHandle(child_stdout_write);
+
+ write_to_pipe(parent_stdin_write, input);
+ CloseHandle(parent_stdin_write);
+
+ child_output = read_from_pipe(parent_stdout_read);
+ CloseHandle(parent_stdout_read);
+
+ GetExitCodeProcess(process_info.hProcess, &exitcode);
+ CloseHandle(process_info.hProcess);
+ CloseHandle(process_info.hThread);
+
+ comparison = lstrcmpA(child_output, out_expected);
+
+ ok_(file, line)(comparison == 0, "\n#################### Expected:\n"
+ "%s\n"
+ "#################### But got:\n"
+ "%s\n"
+ "####################\n",
+ out_expected, child_output);
+ ok_(file, line)(exitcode == exitcode_expected, "Expected exitcode %d, got %d\n", exitcode_expected, exitcode);
+
+ heap_free(child_output);
+}
+
+static void test_errors(void)
+{
+ run_find("", "", "FIND: Parameter format not correct\r\n", 2);
+ todo_wine
+ run_find("test", "", "FIND: Parameter format not correct\r\n", 2);
+ todo_wine
+ run_find("\"test", "", "FIND: Parameter format not correct\r\n", 2);
+ run_find("\"test\" /XYZ", "", "FIND: Invalid switch\r\n", 2);
+}
+
+static void test_singleline_without_switches(void)
+{
+ run_find("\"\"", "test", "", 1);
+ run_find("\"test\"", "", "", 1);
+ run_find("\"test\"", "test", "test\r\n", 0);
+ run_find("\"test\"", "test2", "test2\r\n", 0);
+ run_find("\"test2\"", "test", "", 1);
+}
+
+START_TEST(find)
+{
+ if (PRIMARYLANGID(GetUserDefaultUILanguage()) != LANG_ENGLISH)
+ {
+ skip("Tests only work with english locale.\n");
+ return;
+ }
+
+ test_errors();
+ test_singleline_without_switches();
+}
--
2.17.1
June 10, 2018
[PATCH] po: Update Norwegian translation.
by Kim Malmo
Signed-off-by: Kim Malmo <berencamlost(a)msn.com>
---
po/nb_NO.po | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 2021f0d18a..d6999c1043 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: Wine\n"
"Report-Msgid-Bugs-To: https://bugs.winehq.org\n"
"POT-Creation-Date: N/A\n"
-"PO-Revision-Date: 2018-05-18 13:47+0200\n"
+"PO-Revision-Date: 2018-06-09 23:18+0200\n"
"Last-Translator: Kim Malmo <berencamlost(a)msn.com>\n"
"Language-Team: Norwegian Bokmål <alexsornes(a)gmail.com>\n"
"Language: nb_NO\n"
@@ -12800,10 +12800,8 @@ msgid "Confirm Value Delete"
msgstr "Bekreft sletting av verdi"
#: regedit.rc:210
-#, fuzzy
-#| msgid "Are you sure you want to delete the registry value '%1'?"
msgid "Are you sure you want to delete the selected registry value?"
-msgstr "Virkelig slette registerverdien \"%1\"?"
+msgstr "Virkelig slette den valgte registerverdien?"
#: regedit.rc:216
msgid "Search complete. The string '%1' was not found."
--
2.17.1
June 9, 2018
Re: [PATCH v2] shellpath.c: Fix creation of HOME directory symbolic links
by Bob Wya
On 8 June 2018 at 12:52, Huw Davies <huw(a)codeweavers.com> wrote:
> On Fri, Jun 08, 2018 at 10:58:23AM +0100, Rob Walker wrote:
> > Fixes: https://bugs.winehq.org/show_bug.cgi?id=41668
> >
> > The Shell Folders, that Wine symlinks to the user's HOME directory, are
> > only re-created on each Wine boot if they: do not pre-exist or are broken
> > symbolic links.
> >
> > Handling the DESKTOP Shell Folder is a special case as this is created
> twice
> > (during a standard boot), early in the Wine boot process. This is
> handled by
> > 2 separate processes, loading shell32.dll, in sequence. This makes it
> hard to determine
> > if the DESKTOP folder was created before the Wine boot (either from a
> previous Wine boot
> > or by the end user).
> >
> > The final (implemented) solution determines the exact start time of the
> Wine boot process
> > (using the current system time and tick-count). If the DESKTOP directory
> was last written
> > after this Wine boot time, we can assume that "we" (Wine) automatically
> created the
> > directory. Only in this instance do we attempt to set a symlink to the
> DESKTOP directory
> > (subdirectory of HOME).
>
> There's still too much going on here.
>
> Do you really need to refactor the code to make your change?
> If not, then just send in the change to the current code.
> If you need to refactor, then do the refactoring first
> (I could imagine taking 3-4 patches to do the refactoring[1])
> then make the change as a final patch in the series.
>
> The file-time / boot-time thing seems hacky, I'm not exactly
> sure what you're trying do to, but this doesn't sound right.
> Hopefully that will become clearer as you tidy things up.
>
> Huw.
>
> [1] For example move the creation of My Pictures/My Videos/etc
> first, then move My Documents and finally Desktop. These
> final two are special cases in the current code, we'd need
> to see that in any new code.
>
Sorry I forgot to update the commit message! I'd updated the code (in the
v2 patch), for handling the
special case of the User profile Desktop directory, without testing file
times / boot times (the latter
didn't work as GetTickTime64 was returning the host system uptime anyway).
--------------------------------------------------------------------------------------------------------------------------------
I have a number of concerns with the existing implementation of
_SHCreateSymbolicLinks():
1) The function is far too long, in it's present form - it's currently 165
lines long!
2) The comments should be far more terse and precise.
3) Using infinite while (1) loops to de-mark code blocks only serves to
obscure the functionality of the code.
4)
4487- /* '$HOME' doesn't exist. Create 'My Pictures', 'My Videos'
and 'My Music' subdirs
4488- * in '%USERPROFILE%\\My Documents' or fail silently if they
already exist. */
4489- pszHome = NULL;
4490- strcpy(szPersonalTarget, pszPersonal);
4491- for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++) {
4492- strcpy(szMyStuffTarget, szPersonalTarget);
4493- if (_SHAppendToUnixPath(szMyStuffTarget,
MAKEINTRESOURCEW(aidsMyStuff[i])))
4494- mkdir(szMyStuffTarget, 0777);
4495- }
Windows Vista (and newer) do not nest the User profile directories. Since
Wine is targeting Windows 7 by default - this
legacy behaviour should be removed. (As an end user, who used to use
Windows XP, this was simply an annoying default
layout anyway.)
5)
4447- /* '$HOME/My Documents' exists. Create 'My Pictures',
4448- * 'My Videos' and 'My Music' subfolders or fail
silently if
4449- * they already exist.
4450- */
4451- for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++)
4452- {
4453- strcpy(szMyStuffTarget, szPersonalTarget);
4454- if (_SHAppendToUnixPath(szMyStuffTarget,
MAKEINTRESOURCEW(aidsMyStuff[i])))
4455- mkdir(szMyStuffTarget, 0777);
4456- }
4457- break;
Ditto as per (4). This is an obsolete User Profile directory layout
(pre-Vista).
Also if "${HOME}/My Documents" exists then this block of code will start
creating subdirectories in this
folder. I don't think that Wine should be making the rather arbitrary
assumption that a Wine user wants
their "${HOME}" directory spammed with new subdirectories.
I often read online, comments from Wine users, complaining about this sort
of behaviour...
6)
4543- /* Last but not least, the Desktop folder */
4544- if (pszHome)
4545- strcpy(szDesktopTarget, pszHome);
4546- else
4547- strcpy(szDesktopTarget, pszPersonal);
4548- heap_free(pszPersonal);
4549-
4550- xdg_desktop_dir = xdg_results ? xdg_results[num - 1] : NULL;
4551- if (xdg_desktop_dir ||
4552- (_SHAppendToUnixPath(szDesktopTarget, DesktopW) &&
4553- !stat(szDesktopTarget, &statFolder) &&
S_ISDIR(statFolder.st_mode)))
4554- {
4555- hr = SHGetFolderPathW(NULL,
CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE,
NULL,
4556- SHGFP_TYPE_DEFAULT, wszTempPath);
4557- if (SUCCEEDED(hr) && (pszDesktop =
wine_get_unix_file_name(wszTempPath)))
4558- {
4559- remove(pszDesktop);
4560- if (xdg_desktop_dir)
4561- symlink(xdg_desktop_dir, pszDesktop);
4562- else
4563- symlink(szDesktopTarget, pszDesktop);
4564- heap_free(pszDesktop);
4565- }
4566- }
This code uses pszPersonal as a fallback target for when HOME is unset.
This will be the equivalent of:
"${WINEPREFIX}/dosdevices/c:/users/${USER}/My Documents"
Say the XDG_DESKTOP_DIR check fails. Then Wine tries to find the directory:
"${WINEPREFIX}/dosdevices/c:/users/${USER}/My Documents/Desktop"
as a symlink target. Which never succeeds because Wine never creates this
directory...
This extra path appears to be redundant (HOME unset / XDG_DESKTOP_DIR
unset).
--------------------------------------------------------------------------------------------------------------------------------
I can of course leave the variable names unchanged and the function name.
I was "told off" for not using snake case on a previous Wine commit - so I
assumed
I had to follow this standard if I wanted to refactor existing code. :-)
I'd like to tidy this function up and make it more readable (including the
comments).
Which I can do in staged patches, as you suggested.
But obviously I'd like to feel that we are both on the "same page" about
the changes
I discussed (above). Before I email in a v3 staged patchset.
June 8, 2018
Re: [PATCH] d3dcompiler/tests: Use the available ARRAY_SIZE() macro
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
June 8, 2018
[PATCH] ntprint/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntprint/tests/ntprint.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ntprint/tests/ntprint.c b/dlls/ntprint/tests/ntprint.c
index 1710220def..57caa49ab2 100644
--- a/dlls/ntprint/tests/ntprint.c
+++ b/dlls/ntprint/tests/ntprint.c
@@ -67,7 +67,7 @@ static void test_PSetupCreateMonitorInfo(VOID)
{
HANDLE mi;
WCHAR buffer[1024] = {'\\','\\'};
- UINT len = sizeof(buffer) / sizeof(buffer[0]) - 2;
+ UINT len = ARRAY_SIZE(buffer) - 2;
GetComputerNameW(buffer + 2, &len);
SetLastError(0xdeadbeef);
@@ -155,7 +155,7 @@ static void test_PSetupEnumMonitor(VOID)
"and '> 0')\n", res, GetLastError(), minsize);
- size = sizeof(buffer) / sizeof(buffer[0]);
+ size = ARRAY_SIZE(buffer);
if ((minsize + 1) > size) {
skip("overflow: %u\n", minsize);
pPSetupDestroyMonitorInfo(mi);
@@ -165,7 +165,7 @@ static void test_PSetupEnumMonitor(VOID)
if (0) {
/* XP: ERROR_INVALID_PARAMETER, w2k: Crash */
SetLastError(0xdeadbeef);
- size = sizeof(buffer) / sizeof(buffer[0]);
+ size = ARRAY_SIZE(buffer);
res = pPSetupEnumMonitor(NULL, 0, buffer, &size);
ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER),
"got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n",
@@ -175,7 +175,7 @@ static void test_PSetupEnumMonitor(VOID)
if (0) {
/* XP: Crash, w2k: Success (how can that work?) */
SetLastError(0xdeadbeef);
- size = sizeof(buffer) / sizeof(buffer[0]);
+ size = ARRAY_SIZE(buffer);
res = pPSetupEnumMonitor(mi, 0, NULL, &size);
trace("got %u with %u and %u\n", res, GetLastError(), size);
}
@@ -213,7 +213,7 @@ static void test_PSetupEnumMonitor(VOID)
while (res && (index < 20)) {
SetLastError(0xdeadbeef);
buffer[0] = '\0';
- size = sizeof(buffer) / sizeof(buffer[0]);
+ size = ARRAY_SIZE(buffer);
res = pPSetupEnumMonitor(mi, index, buffer, &size);
ok( res || (GetLastError() == ERROR_NO_MORE_ITEMS),
"(%u) got %u with %u and %u (expected '!=0' or: '0' with "
--
2.14.4
June 8, 2018
[PATCH] oleacc/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/oleacc/tests/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c
index 7a0737caff..c62fa79556 100644
--- a/dlls/oleacc/tests/main.c
+++ b/dlls/oleacc/tests/main.c
@@ -410,7 +410,7 @@ static void test_getroletext(void)
memset(buff2W, 0, sizeof(buff2W));
ret = GetRoleTextW(role, NULL, 0);
- GetRoleTextW(role, buff2W, sizeof(buff2W)/sizeof(WCHAR));
+ GetRoleTextW(role, buff2W, ARRAY_SIZE(buff2W));
ok(ret == lstrlenW(buff2W),
"GetRoleTextW: returned length doesn't match returned buffer for role %d\n", role);
}
--
2.14.4
June 8, 2018
[PATCH] psapi/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/psapi/tests/psapi_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
index 4adc82619b..0ff212c766 100644
--- a/dlls/psapi/tests/psapi_main.c
+++ b/dlls/psapi/tests/psapi_main.c
@@ -536,12 +536,12 @@ todo_wine {
}
SetLastError(0xdeadbeef);
- ret = pGetMappedFileNameW(GetCurrentProcess(), base, map_nameW, sizeof(map_nameW)/sizeof(map_nameW[0]));
+ ret = pGetMappedFileNameW(GetCurrentProcess(), base, map_nameW, ARRAY_SIZE(map_nameW));
todo_wine {
ok(ret, "GetMappedFileNameW error %d\n", GetLastError());
ok(ret > strlen(device_name), "map_name should be longer than device_name\n");
}
- if (nt_get_mapped_file_name(GetCurrentProcess(), base, nt_map_name, sizeof(nt_map_name)/sizeof(nt_map_name[0])))
+ if (nt_get_mapped_file_name(GetCurrentProcess(), base, nt_map_name, ARRAY_SIZE(nt_map_name)))
{
ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name);
WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL);
@@ -658,7 +658,7 @@ static void test_GetProcessImageFileName(void)
/* correct call */
memset(szImgPathW, 0xff, sizeof(szImgPathW));
- ret = pGetProcessImageFileNameW(hpQI, szImgPathW, sizeof(szImgPathW)/sizeof(WCHAR));
+ ret = pGetProcessImageFileNameW(hpQI, szImgPathW, ARRAY_SIZE(szImgPathW));
ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n");
ok(szImgPathW[0] == '\\', "GetProcessImageFileNameW should have returned an NT path.\n");
ok(lstrlenW(szImgPathW) == ret, "Expected length to be %d, got %d\n", ret, lstrlenW(szImgPathW));
--
2.14.4
June 8, 2018
[PATCH] quartz/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/quartz/tests/avisplitter.c | 4 ++--
dlls/quartz/tests/filtergraph.c | 6 +++---
dlls/quartz/tests/misc.c | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/quartz/tests/avisplitter.c b/dlls/quartz/tests/avisplitter.c
index 8bafb14157..bc933d148d 100644
--- a/dlls/quartz/tests/avisplitter.c
+++ b/dlls/quartz/tests/avisplitter.c
@@ -210,7 +210,7 @@ static void test_filesourcefilter(void)
ret = GetTempFileNameW(temp, prefix, 0, path);
ok(ret, "GetTempFileNameW failed with error %u\n", GetLastError());
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
trace("Running test for %s\n", tests[i].label);
@@ -280,7 +280,7 @@ static WCHAR *load_resource(const WCHAR *name)
HRSRC res;
void *ptr;
- GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW);
+ GetTempPathW(ARRAY_SIZE(pathW), pathW);
lstrcatW(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index a1ece9489f..85079d982d 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -50,7 +50,7 @@ static WCHAR *load_resource(const WCHAR *name)
HRSRC res;
void *ptr;
- GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW);
+ GetTempPathW(ARRAY_SIZE(pathW), pathW);
lstrcatW(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
@@ -1500,14 +1500,14 @@ static HRESULT createtestfilter(const CLSID* pClsid, const TestFilterPinData *pi
pinInfo.pFilter = &pTestFilter->IBaseFilter_iface;
if (pinInfo.dir == PINDIR_INPUT)
{
- lstrcpynW(pinInfo.achName, wcsInputPinName, sizeof(pinInfo.achName) / sizeof(pinInfo.achName[0]));
+ lstrcpynW(pinInfo.achName, wcsInputPinName, ARRAY_SIZE(pinInfo.achName));
hr = TestFilter_Pin_Construct(&TestFilter_InputPin_Vtbl, &pinInfo, &mt, &pTestFilter->csFilter,
&pTestFilter->ppPins[i]);
}
else
{
- lstrcpynW(pinInfo.achName, wcsOutputPinName, sizeof(pinInfo.achName) / sizeof(pinInfo.achName[0]));
+ lstrcpynW(pinInfo.achName, wcsOutputPinName, ARRAY_SIZE(pinInfo.achName));
hr = TestFilter_Pin_Construct(&TestFilter_OutputPin_Vtbl, &pinInfo, &mt, &pTestFilter->csFilter,
&pTestFilter->ppPins[i]);
}
diff --git a/dlls/quartz/tests/misc.c b/dlls/quartz/tests/misc.c
index 748c0f2cfd..16b6d40ce4 100644
--- a/dlls/quartz/tests/misc.c
+++ b/dlls/quartz/tests/misc.c
@@ -169,7 +169,7 @@ static void test_null_renderer_aggregations(void)
};
int i;
- for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iids); i++)
{
test_aggregation(CLSID_SystemClock, CLSID_NullRenderer, IID_IReferenceClock, *iids[i]);
}
@@ -182,7 +182,7 @@ static void test_video_renderer_aggregations(void)
};
int i;
- for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iids); i++)
{
test_aggregation(CLSID_SystemClock, CLSID_VideoRenderer,
IID_IReferenceClock, *iids[i]);
@@ -199,7 +199,7 @@ static void test_filter_graph_aggregations(void)
};
int i;
- for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iids); i++)
{
test_aggregation(CLSID_SystemClock, CLSID_FilterGraph,
IID_IReferenceClock, *iids[i]);
@@ -213,7 +213,7 @@ static void test_filter_mapper_aggregations(void)
};
int i;
- for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iids); i++)
{
test_aggregation(CLSID_SystemClock, CLSID_FilterMapper2,
IID_IReferenceClock, *iids[i]);
--
2.14.4
June 8, 2018
[PATCH] rpcrt4/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/rpcrt4/tests/cstub.c | 2 +-
dlls/rpcrt4/tests/rpc.c | 6 ++----
dlls/rpcrt4/tests/server.c | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c
index 606107fcfd..7bed308807 100644
--- a/dlls/rpcrt4/tests/cstub.c
+++ b/dlls/rpcrt4/tests/cstub.c
@@ -596,7 +596,7 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
#undef VTBL_PROXY_TEST
#undef VTBL_PROXY_TEST_NOT_ZERO
- for (i = 0; i < sizeof(interfaces)/sizeof(interfaces[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(interfaces); i++)
ok( proxy_vtbl[i]->header.piid == interfaces[i],
"wrong proxy %u iid %p/%p\n", i, proxy_vtbl[i]->header.piid, interfaces[i] );
diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c
index f026e99de2..c9f2a4b721 100644
--- a/dlls/rpcrt4/tests/rpc.c
+++ b/dlls/rpcrt4/tests/rpc.c
@@ -149,10 +149,8 @@ static void TestDceErrorInqText (void)
*/
DWORD dwCount;
- dwCount = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, RPC_S_NOT_RPC_ERROR, 0, bufferInvalid,
- sizeof(bufferInvalid)/sizeof(bufferInvalid[0]), NULL);
+ dwCount = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
+ RPC_S_NOT_RPC_ERROR, 0, bufferInvalid, ARRAY_SIZE(bufferInvalid), NULL);
/* A random sample of DceErrorInqText */
/* 0 is success */
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index dfad1ed0f3..b35b71bcfd 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -313,7 +313,7 @@ void __cdecl s_get_number_array(int x[20], int *n)
{
int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
memcpy(x, c, sizeof(c));
- *n = sizeof(c)/sizeof(c[0]);
+ *n = ARRAY_SIZE(c);
}
int __cdecl s_sum_cs(cs_t *cs)
--
2.14.4
June 8, 2018
[PATCH] webservices/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/webservices/tests/channel.c | 12 ++++++------
dlls/webservices/tests/msg.c | 2 +-
dlls/webservices/tests/proxy.c | 8 ++++----
dlls/webservices/tests/reader.c | 20 ++++++++++----------
dlls/webservices/tests/url.c | 4 ++--
dlls/webservices/tests/writer.c | 38 +++++++++++++++++++-------------------
6 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/dlls/webservices/tests/channel.c b/dlls/webservices/tests/channel.c
index 17a0b58ac8..c995a08829 100644
--- a/dlls/webservices/tests/channel.c
+++ b/dlls/webservices/tests/channel.c
@@ -134,7 +134,7 @@ static void test_WsOpenChannel(void)
ok( hr == E_INVALIDARG, "got %08x\n", hr );
memset( &addr, 0, sizeof(addr) );
- addr.url.length = sizeof(url)/sizeof(url[0]);
+ addr.url.length = ARRAY_SIZE( url );
addr.url.chars = url;
hr = WsOpenChannel( NULL, &addr, NULL, NULL );
ok( hr == E_INVALIDARG, "got %08x\n", hr );
@@ -179,7 +179,7 @@ static void test_WsResetChannel(void)
ok( hr == S_OK, "got %08x\n", hr );
memset( &addr, 0, sizeof(addr) );
- addr.url.length = sizeof(url)/sizeof(url[0]);
+ addr.url.length = ARRAY_SIZE( url );
addr.url.chars = url;
hr = WsOpenChannel( channel, &addr, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -301,7 +301,7 @@ static void test_WsOpenListener(void)
hr = WsOpenListener( listener, NULL, NULL, NULL );
ok( hr == E_INVALIDARG, "got %08x\n", hr );
- url.length = sizeof(str)/sizeof(str[0]);
+ url.length = ARRAY_SIZE( str );
url.chars = str;
hr = WsOpenListener( NULL, &url, NULL, NULL );
ok( hr == E_INVALIDARG, "got %08x\n", hr );
@@ -320,7 +320,7 @@ static void test_WsOpenListener(void)
hr = WsCreateListener( WS_CHANNEL_TYPE_DUPLEX_SESSION, WS_TCP_CHANNEL_BINDING, NULL, 0, NULL, &listener, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- url.length = sizeof(str2)/sizeof(str2[0]);
+ url.length = ARRAY_SIZE( str2 );
url.chars = str2;
hr = WsOpenListener( listener, &url, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -333,7 +333,7 @@ static void test_WsOpenListener(void)
hr = WsCreateListener( WS_CHANNEL_TYPE_DUPLEX_SESSION, WS_TCP_CHANNEL_BINDING, NULL, 0, NULL, &listener, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- url.length = sizeof(str3)/sizeof(str3[0]);
+ url.length = ARRAY_SIZE( str3 );
url.chars = str3;
hr = WsOpenListener( listener, &url, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -387,7 +387,7 @@ static void test_WsResetListener(void)
{
WCHAR str[] =
{'n','e','t','.','t','c','p',':','/','/','+',':','2','0','1','7','/','p','a','t','h'};
- WS_STRING url = { sizeof(str)/sizeof(str[0]), str };
+ WS_STRING url = { ARRAY_SIZE( str ), str };
WS_LISTENER *listener;
WS_LISTENER_STATE state;
WS_LISTENER_PROPERTY prop;
diff --git a/dlls/webservices/tests/msg.c b/dlls/webservices/tests/msg.c
index 550ae1dd0d..22d69ece2c 100644
--- a/dlls/webservices/tests/msg.c
+++ b/dlls/webservices/tests/msg.c
@@ -258,7 +258,7 @@ static void test_WsAddressMessage(void)
memset( &endpoint, 0, sizeof(endpoint) );
endpoint.url.chars = localhost;
- endpoint.url.length = sizeof(localhost)/sizeof(localhost[0]);
+ endpoint.url.length = ARRAY_SIZE( localhost );
hr = WsAddressMessage( msg, &endpoint, NULL );
ok( hr == S_OK, "got %08x\n", hr );
diff --git a/dlls/webservices/tests/proxy.c b/dlls/webservices/tests/proxy.c
index 95f980a2ff..f5297796b3 100644
--- a/dlls/webservices/tests/proxy.c
+++ b/dlls/webservices/tests/proxy.c
@@ -164,7 +164,7 @@ static void test_WsOpenServiceProxy(void)
ok( state == WS_SERVICE_PROXY_STATE_CREATED, "got %u\n", state );
memset( &addr, 0, sizeof(addr) );
- addr.url.length = sizeof(url)/sizeof(url[0]);
+ addr.url.length = ARRAY_SIZE( url );
addr.url.chars = url;
hr = WsOpenServiceProxy( proxy, &addr, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -206,7 +206,7 @@ static void test_WsResetServiceProxy(void)
ok( state == WS_SERVICE_PROXY_STATE_CREATED, "got %u\n", state );
memset( &addr, 0, sizeof(addr) );
- addr.url.length = sizeof(url)/sizeof(url[0]);
+ addr.url.length = ARRAY_SIZE( url );
addr.url.chars = url;
hr = WsOpenServiceProxy( proxy, &addr, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -385,7 +385,7 @@ static HRESULT create_proxy( int port, WS_SERVICE_PROXY **ret )
*ret = NULL;
hr = WsCreateServiceProxy( WS_CHANNEL_TYPE_REQUEST, WS_HTTP_CHANNEL_BINDING, NULL, NULL,
- 0, prop, sizeof(prop)/sizeof(prop[0]), &proxy, NULL );
+ 0, prop, ARRAY_SIZE( prop ), &proxy, NULL );
if (hr != S_OK) return hr;
memset( &addr, 0, sizeof(addr) );
@@ -687,7 +687,7 @@ static DWORD CALLBACK server_proc( void *arg )
}
buf[i] = 0;
- for (j = 0; j < sizeof(tests)/sizeof(tests[0]); j++)
+ for (j = 0; j < ARRAY_SIZE( tests ); j++)
{
if (strstr( buf, tests[j].req_action ))
{
diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c
index bd8a37cc52..b21e8396be 100644
--- a/dlls/webservices/tests/reader.c
+++ b/dlls/webservices/tests/reader.c
@@ -479,7 +479,7 @@ static void test_WsSetInput(void)
enc.encoding.encodingType = WS_XML_READER_ENCODING_TYPE_TEXT;
enc.charSet = WS_CHARSET_AUTO;
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
input.encodedData = tests[i].data;
input.encodedDataSize = tests[i].size;
@@ -1174,7 +1174,7 @@ static void test_WsReadNode(void)
hr = WsCreateReader( NULL, 0, &reader, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_input( reader, tests[i].text, strlen(tests[i].text) );
ok( hr == S_OK, "got %08x\n", hr );
@@ -1644,7 +1644,7 @@ static void test_WsReadType(void)
ok( hr == WS_E_INVALID_FORMAT, "got %08x\n", hr );
enum_desc.values = enum_values;
- enum_desc.valueCount = sizeof(enum_values)/sizeof(enum_values[0]);
+ enum_desc.valueCount = ARRAY_SIZE( enum_values );
enum_desc.maxByteCount = 3;
enum_desc.nameIndices = NULL;
@@ -3526,7 +3526,7 @@ static void test_datetime(void)
hr = WsCreateReader( NULL, 0, &reader, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
memset( &date, 0, sizeof(date) );
prepare_type_test( reader, tests[i].str, strlen(tests[i].str) );
@@ -3578,7 +3578,7 @@ static void test_WsDateTimeToFileTime(void)
hr = WsDateTimeToFileTime( NULL, &ft, NULL );
ok( hr == E_INVALIDARG, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
memset( &ft, 0, sizeof(ft) );
hr = WsDateTimeToFileTime( &tests[i].dt, &ft, NULL );
@@ -3716,7 +3716,7 @@ static void test_double(void)
hr = WsCreateReader( NULL, 0, &reader, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
val = 0;
prepare_type_test( reader, tests[i].str, strlen(tests[i].str) );
@@ -4064,7 +4064,7 @@ static void test_entities(void)
hr = WsCreateReader( NULL, 0, &reader, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_input( reader, tests[i].str, strlen(tests[i].str) );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -4628,7 +4628,7 @@ static void test_WsReadQualifiedName(void)
hr = WsReadQualifiedName( reader, heap, NULL, &localname, NULL, NULL );
ok( hr == WS_E_INVALID_FORMAT, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_input( reader, tests[i].str, strlen(tests[i].str) );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -5647,7 +5647,7 @@ static void test_dictionary(void)
UuidCreate( &dict.guid );
dict.strings = strings;
- dict.stringCount = sizeof(strings)/sizeof(strings[0]);
+ dict.stringCount = ARRAY_SIZE( strings );
dict.isConst = TRUE;
/* short dictionary element */
@@ -6385,7 +6385,7 @@ static void test_float(void)
hr = WsCreateReader( NULL, 0, &reader, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
val = 0;
prepare_type_test( reader, tests[i].str, strlen(tests[i].str) );
diff --git a/dlls/webservices/tests/url.c b/dlls/webservices/tests/url.c
index 82059a02bf..2b8dda482e 100644
--- a/dlls/webservices/tests/url.c
+++ b/dlls/webservices/tests/url.c
@@ -131,7 +131,7 @@ static void test_WsDecodeUrl(void)
hr = WsDecodeUrl( &str, 0, NULL, (WS_URL **)&url, NULL );
ok( hr == E_INVALIDARG, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
static const WCHAR netpipe[] = {'n','e','t','.','p','i','p','e'};
@@ -271,7 +271,7 @@ static void test_WsEncodeUrl(void)
hr = WsEncodeUrl( (const WS_URL *)&url, 0, heap, NULL, NULL );
ok( hr == E_INVALIDARG, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
memset( &url, 0, sizeof(url) );
url.url.scheme = tests[i].scheme;
diff --git a/dlls/webservices/tests/writer.c b/dlls/webservices/tests/writer.c
index 15d4569662..e33c38951e 100644
--- a/dlls/webservices/tests/writer.c
+++ b/dlls/webservices/tests/writer.c
@@ -710,7 +710,7 @@ static void test_basic_type(void)
ok( hr == S_OK, "got %08x\n", hr );
/* element content type mapping */
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
prepare_basic_type_test( writer );
hr = WsWriteType( writer, WS_ELEMENT_CONTENT_TYPE_MAPPING, tests[i].type, NULL,
@@ -723,7 +723,7 @@ static void test_basic_type(void)
}
/* element type mapping is the same as element content type mapping for basic types */
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
const INT64 *ptr = &tests[i].val;
@@ -738,7 +738,7 @@ static void test_basic_type(void)
}
/* attribute type mapping */
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
prepare_basic_type_test( writer );
hr = WsWriteStartAttribute( writer, NULL, &localname, &ns, FALSE, NULL );
@@ -1103,7 +1103,7 @@ static void test_WsWriteValue(void)
ok( hr == E_INVALIDARG, "got %08x\n", hr );
/* element type mapping */
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "got %08x\n", hr );
@@ -1120,7 +1120,7 @@ static void test_WsWriteValue(void)
}
/* attribute type mapping */
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "got %08x\n", hr );
@@ -2170,7 +2170,7 @@ static void test_text_types(void)
hr = WsCreateWriter( NULL, 0, &writer, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "got %08x\n", hr );
@@ -2257,7 +2257,7 @@ static void test_double(void)
ok( hr == S_OK, "got %08x\n", hr );
text.text.textType = WS_XML_TEXT_TYPE_DOUBLE;
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "got %08x\n", hr );
@@ -2772,7 +2772,7 @@ static void test_escapes(void)
hr = WsCreateWriter( NULL, 0, &writer, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests_elem)/sizeof(tests_elem[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests_elem ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -2789,7 +2789,7 @@ static void test_escapes(void)
check_output( writer, tests_elem[i].result, __LINE__ );
}
- for (i = 0; i < sizeof(tests_attr)/sizeof(tests_attr[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests_attr ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -2812,7 +2812,7 @@ static void test_escapes(void)
check_output( writer, tests_attr[i].result, __LINE__ );
}
- for (i = 0; i < sizeof(tests_cdata)/sizeof(tests_cdata[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests_cdata ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -2835,7 +2835,7 @@ static void test_escapes(void)
check_output( writer, tests_cdata[i].result, __LINE__ );
}
- for (i = 0; i < sizeof(tests_comment)/sizeof(tests_comment[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests_comment ); i++)
{
WS_XML_COMMENT_NODE comment = {{WS_XML_NODE_TYPE_COMMENT}};
@@ -2954,7 +2954,7 @@ static void test_write_option(void)
hr = WsCreateWriter( NULL, 0, &writer, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -3041,7 +3041,7 @@ static void test_datetime(void)
hr = WsCreateWriter( NULL, 0, &writer, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
hr = set_output( writer );
ok( hr == S_OK, "got %08x\n", hr );
@@ -3231,7 +3231,7 @@ static void test_WsWriteQualifiedName(void)
hr = WsWriteQualifiedName( writer, NULL, NULL, NULL, NULL );
ok( hr == WS_E_INVALID_FORMAT, "got %08x\n", hr );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( tests ); i++)
{
WS_XML_STRING prefix2, localname2, ns2;
const WS_XML_STRING *prefix_ptr, *localname_ptr, *ns_ptr;
@@ -3551,7 +3551,7 @@ static void test_binary_encoding(void)
hr = WsCreateWriter( NULL, 0, &writer, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- for (i = 0; i < sizeof(elem_tests)/sizeof(elem_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( elem_tests ); i++)
{
hr = WsSetOutput( writer, &bin.encoding, &buf.output, NULL, 0, NULL );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -3574,7 +3574,7 @@ static void test_binary_encoding(void)
if (hr == S_OK) check_output_bin( writer, elem_tests[i].result, elem_tests[i].len_result, __LINE__ );
}
- for (i = 0; i < sizeof(attr_tests)/sizeof(attr_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( attr_tests ); i++)
{
hr = WsSetOutput( writer, &bin.encoding, &buf.output, NULL, 0, NULL );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -3778,12 +3778,12 @@ static void test_dictionary(void)
UuidCreate( &dict.guid );
dict.strings = strings;
- dict.stringCount = sizeof(strings)/sizeof(strings[0]);
+ dict.stringCount = ARRAY_SIZE( strings );
dict.isConst = TRUE;
bin.staticDictionary = &dict;
- for (i = 0; i < sizeof(elem_tests)/sizeof(elem_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( elem_tests ); i++)
{
hr = WsSetOutput( writer, &bin.encoding, &buf.output, NULL, 0, NULL );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
@@ -3799,7 +3799,7 @@ static void test_dictionary(void)
if (hr == S_OK) check_output_bin( writer, elem_tests[i].result, elem_tests[i].len_result, __LINE__ );
}
- for (i = 0; i < sizeof(attr_tests)/sizeof(attr_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE( attr_tests ); i++)
{
hr = WsSetOutput( writer, &bin.encoding, &buf.output, NULL, 0, NULL );
ok( hr == S_OK, "%u: got %08x\n", i, hr );
--
2.14.4
June 8, 2018
[PATCH] windowscodecs/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/windowscodecs/tests/info.c | 10 ++++----
dlls/windowscodecs/tests/metadata.c | 46 +++++++++++++++++------------------
dlls/windowscodecs/tests/palette.c | 2 +-
dlls/windowscodecs/tests/pngformat.c | 2 +-
dlls/windowscodecs/tests/tiffformat.c | 2 +-
5 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c
index d00e9d8338..b647601495 100644
--- a/dlls/windowscodecs/tests/info.c
+++ b/dlls/windowscodecs/tests/info.c
@@ -119,7 +119,7 @@ static void test_decoder_info(void)
UINT num_formats, count;
int i, j;
- for (i = 0; i < sizeof(decoder_info_tests)/sizeof(decoder_info_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(decoder_info_tests); i++)
{
struct decoder_info_test *test = &decoder_info_tests[i];
IWICBitmapDecoder *decoder, *decoder2;
@@ -149,8 +149,8 @@ static void test_decoder_info(void)
}
IWICBitmapDecoder_Release(decoder);
- MultiByteToWideChar(CP_ACP, 0, test->mimetype, -1, mimetypeW, sizeof(mimetypeW)/sizeof(mimetypeW[0]));
- MultiByteToWideChar(CP_ACP, 0, test->extensions, -1, extensionsW, sizeof(extensionsW)/sizeof(extensionsW[0]));
+ MultiByteToWideChar(CP_ACP, 0, test->mimetype, -1, mimetypeW, ARRAY_SIZE(mimetypeW));
+ MultiByteToWideChar(CP_ACP, 0, test->extensions, -1, extensionsW, ARRAY_SIZE(extensionsW));
hr = get_component_info(test->clsid, &info);
ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr);
@@ -234,8 +234,8 @@ static void test_decoder_info(void)
ok(hr == E_INVALIDARG, "GetPixelFormats failed, hr=%x\n", hr);
count = 0xdeadbeef;
- hr = IWICBitmapDecoderInfo_GetPixelFormats(decoder_info, sizeof(pixelformats)/sizeof(pixelformats[0]),
- pixelformats, &count);
+ hr = IWICBitmapDecoderInfo_GetPixelFormats(decoder_info, ARRAY_SIZE(pixelformats),
+ pixelformats, &count);
ok(hr == S_OK, "GetPixelFormats failed, hr=%x\n", hr);
ok(count == num_formats, "got %d formats, expected %d\n", count, num_formats);
diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c
index c54d7dfe18..eb846db0b8 100644
--- a/dlls/windowscodecs/tests/metadata.c
+++ b/dlls/windowscodecs/tests/metadata.c
@@ -816,7 +816,7 @@ static void test_metadata_IFD(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
@@ -832,7 +832,7 @@ static void test_metadata_IFD(void)
load_stream((IUnknown *)reader, IFD_data_swapped, sizeof(IFD_data), persist_options);
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
HeapFree(GetProcessHeap(), 0, IFD_data_swapped);
@@ -1271,7 +1271,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(gif_LSD)/sizeof(gif_LSD[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(gif_LSD), "unexpected count %u\n", count);
compare_metadata(reader, gif_LSD, count);
@@ -1320,7 +1320,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(gif_IMD)/sizeof(gif_IMD[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(gif_IMD), "unexpected count %u\n", count);
compare_metadata(reader, gif_IMD, count);
@@ -1374,7 +1374,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_LSD)/sizeof(animated_gif_LSD[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_LSD), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_LSD, count);
@@ -1393,7 +1393,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_APE)/sizeof(animated_gif_APE[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_APE), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_APE, count);
@@ -1412,7 +1412,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_comment_1)/sizeof(animated_gif_comment_1[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_comment_1), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_comment_1, count);
@@ -1431,7 +1431,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_plain_1)/sizeof(animated_gif_plain_1[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_plain_1), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_plain_1, count);
@@ -1480,7 +1480,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_IMD)/sizeof(animated_gif_IMD[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_IMD), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_IMD, count);
@@ -1499,7 +1499,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_comment_2)/sizeof(animated_gif_comment_2[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_comment_2), "unexpected count %u\n", count);
if (count == 1)
compare_metadata(reader, animated_gif_comment_2, count);
@@ -1519,7 +1519,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_plain_2)/sizeof(animated_gif_plain_2[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_plain_2), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_plain_2, count);
@@ -1538,7 +1538,7 @@ static void test_metadata_gif(void)
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(animated_gif_GCE)/sizeof(animated_gif_GCE[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(animated_gif_GCE), "unexpected count %u\n", count);
compare_metadata(reader, animated_gif_GCE, count);
@@ -1599,7 +1599,7 @@ static void test_metadata_gif(void)
ok(len == 2, "expected 2, got %u\n", len);
ok(!lstrcmpW(name, rootW), "expected '/', got %s\n", wine_dbgstr_w(name));
- for (i = 0; i < sizeof(decoder_data)/sizeof(decoder_data[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(decoder_data); i++)
{
WCHAR queryW[256];
@@ -1622,7 +1622,7 @@ static void test_metadata_gif(void)
ok(len == lstrlenW(queryW) + 1, "expected %u, got %u\n", lstrlenW(queryW) + 1, len);
ok(!lstrcmpW(name, queryW), "expected %s, got %s\n", wine_dbgstr_w(queryW), wine_dbgstr_w(name));
- for (j = 0; j < sizeof(decoder_data)/sizeof(decoder_data[0]); j++)
+ for (j = 0; j < ARRAY_SIZE(decoder_data); j++)
{
MultiByteToWideChar(CP_ACP, 0, decoder_data[j].query, -1, queryW, 256);
@@ -1698,7 +1698,7 @@ static void test_metadata_gif(void)
ok(len == 2, "expected 2, got %u\n", len);
ok(!lstrcmpW(name, rootW), "expected '/', got %s\n", wine_dbgstr_w(name));
- for (i = 0; i < sizeof(frame_data)/sizeof(frame_data[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(frame_data); i++)
{
if (winetest_debug > 1)
trace("query: %s\n", frame_data[i].query);
@@ -1812,7 +1812,7 @@ static void test_metadata_LSD(void)
{
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
@@ -1890,7 +1890,7 @@ static void test_metadata_IMD(void)
{
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
@@ -1965,7 +1965,7 @@ static void test_metadata_GCE(void)
{
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
@@ -2038,7 +2038,7 @@ static void test_metadata_APE(void)
{
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
@@ -2122,7 +2122,7 @@ static void test_metadata_GIF_comment(void)
{
hr = IWICMetadataReader_GetCount(reader, &count);
ok(hr == S_OK, "GetCount error %#x\n", hr);
- ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count);
+ ok(count == ARRAY_SIZE(td), "unexpected count %u\n", count);
compare_metadata(reader, td, count);
@@ -2425,9 +2425,9 @@ static void test_WICMapSchemaToName(void)
return;
}
- for (i = 0; i < sizeof(guid_list)/sizeof(guid_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(guid_list); i++)
{
- for (j = 0; j < sizeof(schema_list)/sizeof(schema_list[0]); j++)
+ for (j = 0; j < ARRAY_SIZE(schema_list); j++)
{
hr = WICMapSchemaToName(guid_list[i], schema_list[j], 0, NULL, &len);
if (IsEqualGUID(guid_list[i], &GUID_MetadataFormatXMP) ||
@@ -2959,7 +2959,7 @@ static void test_queryreader(void)
hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(factory, &mdbr, &reader);
ok(hr == S_OK, "CreateQueryReaderFromBlockReader error %#x\n", hr);
- for (i = 0; i < sizeof(test_data)/sizeof(test_data[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(test_data); i++)
{
current_metadata = test_data[i].data;
diff --git a/dlls/windowscodecs/tests/palette.c b/dlls/windowscodecs/tests/palette.c
index e3b9a313f6..27bf7c80d1 100644
--- a/dlls/windowscodecs/tests/palette.c
+++ b/dlls/windowscodecs/tests/palette.c
@@ -473,7 +473,7 @@ static void test_predefined_palette(void)
ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr);
IWICPalette_Release(palette);
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
hr = IWICImagingFactory_CreatePalette(factory, &palette);
ok(hr == S_OK, "%u: CreatePalette error %#x\n", i, hr);
diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c
index 4b84ccebb1..c798ea438d 100644
--- a/dlls/windowscodecs/tests/pngformat.c
+++ b/dlls/windowscodecs/tests/pngformat.c
@@ -717,7 +717,7 @@ static void test_color_formats(void)
* with tEXt id.
*/
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
/* with the tRNS and PLTE chunks */
memcpy(buf, png_1x1_data, sizeof(png_1x1_data));
diff --git a/dlls/windowscodecs/tests/tiffformat.c b/dlls/windowscodecs/tests/tiffformat.c
index a7b6f5b594..c6ec21ada1 100644
--- a/dlls/windowscodecs/tests/tiffformat.c
+++ b/dlls/windowscodecs/tests/tiffformat.c
@@ -454,7 +454,7 @@ static void test_tiff_resolution(void)
double dpi_x, dpi_y;
int i;
- for (i = 0; i < sizeof(tiff_resolution_test_data)/sizeof(tiff_resolution_test_data[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(tiff_resolution_test_data); i++)
{
const struct tiff_resolution_test_data *test_data = &tiff_resolution_test_data[i];
tiff_resolution_image_data.resx = test_data->resx;
--
2.14.4
June 8, 2018
Re: [PATCH] gdiplus/tests: Use the available ARRAY_SIZE() macro
by Vincent Povirk
Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com>
June 8, 2018
Re: [PATCH v2] shellpath.c: Fix creation of HOME directory symbolic links
by Huw Davies
On Fri, Jun 08, 2018 at 10:58:23AM +0100, Rob Walker wrote:
> Fixes: https://bugs.winehq.org/show_bug.cgi?id=41668
>
> The Shell Folders, that Wine symlinks to the user's HOME directory, are
> only re-created on each Wine boot if they: do not pre-exist or are broken
> symbolic links.
>
> Handling the DESKTOP Shell Folder is a special case as this is created twice
> (during a standard boot), early in the Wine boot process. This is handled by
> 2 separate processes, loading shell32.dll, in sequence. This makes it hard to determine
> if the DESKTOP folder was created before the Wine boot (either from a previous Wine boot
> or by the end user).
>
> The final (implemented) solution determines the exact start time of the Wine boot process
> (using the current system time and tick-count). If the DESKTOP directory was last written
> after this Wine boot time, we can assume that "we" (Wine) automatically created the
> directory. Only in this instance do we attempt to set a symlink to the DESKTOP directory
> (subdirectory of HOME).
There's still too much going on here.
Do you really need to refactor the code to make your change?
If not, then just send in the change to the current code.
If you need to refactor, then do the refactoring first
(I could imagine taking 3-4 patches to do the refactoring[1])
then make the change as a final patch in the series.
The file-time / boot-time thing seems hacky, I'm not exactly
sure what you're trying do to, but this doesn't sound right.
Hopefully that will become clearer as you tidy things up.
Huw.
[1] For example move the creation of My Pictures/My Videos/etc
first, then move My Documents and finally Desktop. These
final two are special cases in the current code, we'd need
to see that in any new code.
June 8, 2018
[PATCH v2] shellpath.c: Fix creation of HOME directory symbolic links
by Rob Walker
Fixes: https://bugs.winehq.org/show_bug.cgi?id=41668
The Shell Folders, that Wine symlinks to the user's HOME directory, are
only re-created on each Wine boot if they: do not pre-exist or are broken
symbolic links.
Handling the DESKTOP Shell Folder is a special case as this is created twice
(during a standard boot), early in the Wine boot process. This is handled by
2 separate processes, loading shell32.dll, in sequence. This makes it hard to determine
if the DESKTOP folder was created before the Wine boot (either from a previous Wine boot
or by the end user).
The final (implemented) solution determines the exact start time of the Wine boot process
(using the current system time and tick-count). If the DESKTOP directory was last written
after this Wine boot time, we can assume that "we" (Wine) automatically created the
directory. Only in this instance do we attempt to set a symlink to the DESKTOP directory
(subdirectory of HOME).
Test on Gentoo GNU/Linux.
Signed-off-by: Rob Walker <bob.mt.wya(a)gmail.com>
---
dlls/shell32/shellpath.c | 325 ++++++++++++++++++---------------------
1 file changed, 151 insertions(+), 174 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index a551e93aa8..c87c73846b 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -58,6 +58,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(shell);
static const BOOL is_win64 = sizeof(void *) > sizeof(int);
+static LONG register_shell_folders = 0;
/*
########## Combining and Constructing paths ##########
@@ -4098,6 +4099,15 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
goto end;
}
+ /* Allow function create_homedir_symbolic_link create this directory
+ (or a HOME directory symlink) for us, later in the boot process. */
+ if (!InterlockedCompareExchange(®ister_shell_folders, -1, -1) && (folder == CSIDL_DESKTOPDIRECTORY))
+ {
+ TRACE("Faking successful creation of system directory %s (%#x)\n", debugstr_w(szBuildPath), folder);
+ hr = S_OK;
+ goto end;
+ }
+
/* create directory/directories */
ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL);
if (ret && ret != ERROR_ALREADY_EXISTS)
@@ -4107,7 +4117,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
goto end;
}
- TRACE("Created missing system directory %s\n", debugstr_w(szBuildPath));
+ TRACE("Created missing system directory %s (%#x)\n", debugstr_w(szBuildPath), folder);
end:
TRACE("returning 0x%08x (final path is %s)\n", hr, debugstr_w(szBuildPath));
return hr;
@@ -4385,193 +4395,111 @@ static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) {
}
/******************************************************************************
- * _SHCreateSymbolicLinks [Internal]
- *
- * Sets up symbol links for various shell folders to point into the users home
- * directory. We do an educated guess about what the user would probably want:
- * - If there is a 'My Documents' directory in $HOME, the user probably wants
- * wine's 'My Documents' to point there. Furthermore, we imply that the user
- * is a Windows lover and has no problem with wine creating 'My Pictures',
- * 'My Music' and 'My Videos' subfolders under '$HOME/My Documents', if those
- * do not already exits. We put appropriate symbolic links in place for those,
- * too.
- * - If there is no 'My Documents' directory in $HOME, we let 'My Documents'
- * point directly to $HOME. We assume the user to be a unix hacker who does not
- * want wine to create anything anywhere besides the .wine directory. So, if
- * there already is a 'My Music' directory in $HOME, we symlink the 'My Music'
- * shell folder to it. But if not, then we check XDG_MUSIC_DIR - "well known"
- * directory, and try to link to that. If that fails, then we symlink to
- * $HOME directly. The same holds fo 'My Pictures' and 'My Videos'.
- * - The Desktop shell folder is symlinked to XDG_DESKTOP_DIR. If that does not
- * exist, then we try '$HOME/Desktop'. If that does not exist, then we leave
- * it alone.
- * ('My Music',... above in fact means LoadString(IDS_MYMUSIC))
+ * create_homedir_symbolic_link [Internal]
+ *
+ * Creates a symbolic link from the current Wineprefix to an appropriate
+ * HOME subdirectory (if one is found).
+ *
+ * Creates 'XXXX' directory in Wineprefix.
+ * Then create a 'My XXXX' symbolic link in Wineprefix:
+ * 1) If '$HOME/XXXX' (IDS directory) exists then target this.
+ * 2) If '$HOME/XXXX' (XDG_XXXX_DIR) exists then target this.
+ * 3) If '$HOME/XXXX' (MacOS XXXX media directory) exists then target this.
+ *
+ * PARAMS
+ * ids_dir [I] Windows Resource Identifier code for current Shell Folder.
+ * csidl_dir [I] Constant Special Item ID List identifier for current Shell Folder.
+ * xdg_dir [I] Full path of external Unix XDG directory corresponding to current Shell Folder.
+ * ws_osx_dir [I] Fallback directory name to use, corresponding to current Shell Folder (OSX specific).
+ *
*/
-static void _SHCreateSymbolicLinks(void)
-{
- UINT aidsMyStuff[] = { IDS_MYPICTURES, IDS_MYVIDEOS, IDS_MYMUSIC }, i;
- const WCHAR* MyOSXStuffW[] = { PicturesW, MoviesW, MusicW };
- int acsidlMyStuff[] = { CSIDL_MYPICTURES, CSIDL_MYVIDEO, CSIDL_MYMUSIC };
- static const char * const xdg_dirs[] = { "PICTURES", "VIDEOS", "MUSIC", "DOCUMENTS", "DESKTOP" };
- static const unsigned int num = ARRAY_SIZE(xdg_dirs);
- WCHAR wszTempPath[MAX_PATH];
- char szPersonalTarget[FILENAME_MAX], *pszPersonal;
- char szMyStuffTarget[FILENAME_MAX], *pszMyStuff;
- char szDesktopTarget[FILENAME_MAX], *pszDesktop;
- struct stat statFolder;
- const char *pszHome;
+void create_homedir_symbolic_link(UINT ids_dir,
+ int csidl_dir,
+ const char * xdg_dir,
+ const WCHAR * ws_osx_dir)
+{
+ static const char * env_homedir = NULL;
+ WCHAR ws_temp_path[MAX_PATH];
+ char home_target[FILENAME_MAX], * prefix_dir;
+ struct stat stat_folder, stat_home_folder;
HRESULT hr;
- char ** xdg_results;
- char * xdg_desktop_dir;
-
- /* Create all necessary profile sub-dirs up to 'My Documents' and get the unix path. */
- hr = SHGetFolderPathW(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL,
- SHGFP_TYPE_DEFAULT, wszTempPath);
- if (FAILED(hr)) return;
- pszPersonal = wine_get_unix_file_name(wszTempPath);
- if (!pszPersonal) return;
+ BOOL target_ok;
- hr = XDG_UserDirLookup(xdg_dirs, num, &xdg_results);
- if (FAILED(hr)) xdg_results = NULL;
-
- pszHome = getenv("HOME");
- if (pszHome && !stat(pszHome, &statFolder) && S_ISDIR(statFolder.st_mode))
+ hr = SHGetFolderPathW(NULL, csidl_dir, NULL,
+ SHGFP_TYPE_DEFAULT, ws_temp_path);
+ if (SUCCEEDED(hr))
{
- while (1)
- {
- /* Check if there's already a Wine-specific 'My Documents' folder */
- strcpy(szPersonalTarget, pszHome);
- if (_SHAppendToUnixPath(szPersonalTarget, MAKEINTRESOURCEW(IDS_PERSONAL)) &&
- !stat(szPersonalTarget, &statFolder) && S_ISDIR(statFolder.st_mode))
- {
- /* '$HOME/My Documents' exists. Create 'My Pictures',
- * 'My Videos' and 'My Music' subfolders or fail silently if
- * they already exist.
- */
- for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++)
- {
- strcpy(szMyStuffTarget, szPersonalTarget);
- if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])))
- mkdir(szMyStuffTarget, 0777);
- }
- break;
- }
-
- /* Try to point to the XDG Documents folder */
- if (xdg_results && xdg_results[num-2] &&
- !stat(xdg_results[num-2], &statFolder) &&
- S_ISDIR(statFolder.st_mode))
- {
- strcpy(szPersonalTarget, xdg_results[num-2]);
- break;
- }
-
- /* Or the hardcoded / OS X Documents folder */
- strcpy(szPersonalTarget, pszHome);
- if (_SHAppendToUnixPath(szPersonalTarget, DocumentsW) &&
- !stat(szPersonalTarget, &statFolder) &&
- S_ISDIR(statFolder.st_mode))
- break;
-
- /* As a last resort point to $HOME. */
- strcpy(szPersonalTarget, pszHome);
- break;
- }
-
- /* Replace 'My Documents' directory with a symlink or fail silently if not empty. */
- remove(pszPersonal);
- symlink(szPersonalTarget, pszPersonal);
+ TRACE("%s directory already exists\n",
+ debugstr_w(ws_temp_path));
+ return;
+ }
+ else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
+ {
+ hr = SHGetFolderPathW(NULL, csidl_dir|CSIDL_FLAG_CREATE, NULL,
+ SHGFP_TYPE_DEFAULT, ws_temp_path);
+ if (FAILED(hr)) return;
}
else
{
- /* '$HOME' doesn't exist. Create 'My Pictures', 'My Videos' and 'My Music' subdirs
- * in '%USERPROFILE%\\My Documents' or fail silently if they already exist. */
- pszHome = NULL;
- strcpy(szPersonalTarget, pszPersonal);
- for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++) {
- strcpy(szMyStuffTarget, szPersonalTarget);
- if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])))
- mkdir(szMyStuffTarget, 0777);
- }
+ ERR("Failed to get Wineprefix path corresponding to %d CSIDL\n",
+ csidl_dir);
+ return;
}
- /* Create symbolic links for 'My Pictures', 'My Videos' and 'My Music'. */
- for (i=0; i < ARRAY_SIZE(aidsMyStuff); i++)
+ prefix_dir = wine_get_unix_file_name(ws_temp_path);
+ if (!prefix_dir)
{
- /* Create the current 'My Whatever' folder and get its unix path. */
- hr = SHGetFolderPathW(NULL, acsidlMyStuff[i]|CSIDL_FLAG_CREATE, NULL,
- SHGFP_TYPE_DEFAULT, wszTempPath);
- if (FAILED(hr)) continue;
-
- pszMyStuff = wine_get_unix_file_name(wszTempPath);
- if (!pszMyStuff) continue;
-
- while (1)
- {
- /* Check for the Wine-specific '$HOME/My Documents' subfolder */
- strcpy(szMyStuffTarget, szPersonalTarget);
- if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])) &&
- !stat(szMyStuffTarget, &statFolder) && S_ISDIR(statFolder.st_mode))
- break;
-
- /* Try the XDG_XXX_DIR folder */
- if (xdg_results && xdg_results[i])
- {
- strcpy(szMyStuffTarget, xdg_results[i]);
- break;
- }
-
- /* Or the OS X folder (these are never localized) */
- if (pszHome)
- {
- strcpy(szMyStuffTarget, pszHome);
- if (_SHAppendToUnixPath(szMyStuffTarget, MyOSXStuffW[i]) &&
- !stat(szMyStuffTarget, &statFolder) &&
- S_ISDIR(statFolder.st_mode))
- break;
- }
+ ERR("Failed to get Unix Wineprefix directory for: %s\n",
+ debugstr_w(ws_temp_path));
+ return;
+ }
- /* As a last resort point to the same location as 'My Documents' */
- strcpy(szMyStuffTarget, szPersonalTarget);
- break;
- }
- remove(pszMyStuff);
- symlink(szMyStuffTarget, pszMyStuff);
- heap_free(pszMyStuff);
+ if (!env_homedir) env_homedir = getenv("HOME");
+ if (!(env_homedir
+ && (stat(env_homedir, &stat_home_folder) != 1)
+ && S_ISDIR(stat_home_folder.st_mode)))
+ {
+ if (prefix_dir) heap_free(prefix_dir);
+ return;
}
- /* Last but not least, the Desktop folder */
- if (pszHome)
- strcpy(szDesktopTarget, pszHome);
+ /* Check for:
+ * '$HOME/XXXX' (IDS directory)
+ * or '$HOME/XXXX' (XDG directory)
+ * or '$HOME/XXXX' (MacOS directory)
+ */
+ target_ok = FALSE;
+ strcpy(home_target, env_homedir);
+ if (_SHAppendToUnixPath(home_target, MAKEINTRESOURCEW(ids_dir))
+ && (stat(home_target, &stat_folder) != -1)
+ && S_ISDIR(stat_folder.st_mode))
+ {
+ target_ok = TRUE;
+ }
+ else if (xdg_dir)
+ {
+ strcpy(home_target, xdg_dir);
+ /* Only link to the XDG directory, if it does not point directly
+ * to the user's HOME directory (XDG specification fallback path). */
+ target_ok = TRUE;
+ }
else
- strcpy(szDesktopTarget, pszPersonal);
- heap_free(pszPersonal);
-
- xdg_desktop_dir = xdg_results ? xdg_results[num - 1] : NULL;
- if (xdg_desktop_dir ||
- (_SHAppendToUnixPath(szDesktopTarget, DesktopW) &&
- !stat(szDesktopTarget, &statFolder) && S_ISDIR(statFolder.st_mode)))
{
- hr = SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, NULL,
- SHGFP_TYPE_DEFAULT, wszTempPath);
- if (SUCCEEDED(hr) && (pszDesktop = wine_get_unix_file_name(wszTempPath)))
- {
- remove(pszDesktop);
- if (xdg_desktop_dir)
- symlink(xdg_desktop_dir, pszDesktop);
- else
- symlink(szDesktopTarget, pszDesktop);
- heap_free(pszDesktop);
- }
+ strcpy(home_target, env_homedir);
+ target_ok = _SHAppendToUnixPath(home_target, ws_osx_dir)
+ && (stat(home_target, &stat_folder) != -1)
+ && S_ISDIR(stat_folder.st_mode);
}
- /* Free resources allocated by XDG_UserDirLookup() */
- if (xdg_results)
+ if (target_ok)
{
- for (i = 0; i < num; i++)
- heap_free(xdg_results[i]);
- heap_free(xdg_results);
+ TRACE("Delete path: %s\n", debugstr_a(prefix_dir));
+ remove(prefix_dir);
+ TRACE("Symlink: %s -> %s\n", debugstr_a(prefix_dir), debugstr_a(home_target));
+ symlink(home_target, prefix_dir);
}
+
+ if (prefix_dir) heap_free(prefix_dir);
}
/******************************************************************************
@@ -6126,15 +6054,61 @@ static void register_system_knownfolders(void)
}
}
+/******************************************************************************
+ * create_homedir_symbolic_links [Internal]
+ *
+ * Parse WINESYMLINK env variable, for each XDG directory argument. To test if symlinking is
+ * enabled for that XDG directory / Wine Profile Folder.
+ * Then calls the function create_homedir_symbolic_link to potentially symlink from a Shell Folder,
+ * in the current Wineprefix, to a subdirectory of the current user's HOME directory.
+ *
+ * PARAMS
+ * xdg_dirnames [I] Pointer to an array of Unix XDG directory names
+ * (without "XDG_" prefix and "_DIR" suffix).
+ * xdg_dir_count [I] Item count of array (above).
+ *
+ */
+static void create_homedir_symbolic_links(const char * const xdg_dirnames[], const UINT xdg_dir_count)
+{
+ char ** xdg_dirs_array;
+ char * xdg_dir;
+ HRESULT hr;
+ UINT i;
+
+ if (!xdg_dirnames) return;
+
+ hr = XDG_UserDirLookup(xdg_dirnames, xdg_dir_count, &xdg_dirs_array);
+ if (FAILED(hr)) xdg_dirs_array = NULL;
+
+ for (i = 0; i < xdg_dir_count; ++i)
+ {
+ xdg_dir = xdg_dirs_array ? xdg_dirs_array[i] : NULL;
+ if (!strcmp(xdg_dirnames[i],"DOCUMENTS"))
+ create_homedir_symbolic_link(IDS_PERSONAL, CSIDL_PERSONAL, xdg_dir, DocumentsW);
+ else if (!strcmp(xdg_dirnames[i],"PICTURES"))
+ create_homedir_symbolic_link(IDS_MYPICTURES, CSIDL_MYPICTURES, xdg_dir, PicturesW);
+ else if (!strcmp(xdg_dirnames[i],"VIDEOS"))
+ create_homedir_symbolic_link(IDS_MYVIDEOS, CSIDL_MYVIDEO, xdg_dir, MoviesW);
+ else if (!strcmp(xdg_dirnames[i],"MUSIC"))
+ create_homedir_symbolic_link(IDS_MYMUSIC, CSIDL_MYMUSIC, xdg_dir, MusicW);
+ else if (!strcmp(xdg_dirnames[i],"DESKTOP"))
+ create_homedir_symbolic_link(IDS_DESKTOPDIRECTORY, CSIDL_DESKTOPDIRECTORY, xdg_dir, DesktopW);
+ else
+ ERR("XDG directory name specifier invalid: %s\n", debugstr_a(xdg_dirnames[i]));
+ if (xdg_dir) heap_free(xdg_dirs_array[i]);
+ }
+ if (xdg_dirs_array) heap_free(xdg_dirs_array);
+}
+
HRESULT SHELL_RegisterShellFolders(void)
{
+ static const char * const xdg_dirnames[] = { "DOCUMENTS", "PICTURES", "VIDEOS", "MUSIC", "DESKTOP" };
+ const UINT xdg_dir_count = 5;
HRESULT hr;
- /* Set up '$HOME' targeted symlinks for 'My Documents', 'My Pictures',
- * 'My Videos', 'My Music' and 'Desktop' in advance, so that the
- * _SHRegister*ShellFolders() functions will find everything nice and clean
- * and thus will not attempt to create them in the profile directory. */
- _SHCreateSymbolicLinks();
+ /* Early setup of symlinks from specific User Shell Folders, in
+ * current Wineprefix, to subdirecties of the user's HOME directory. */
+ create_homedir_symbolic_links(xdg_dirnames, xdg_dir_count);
hr = _SHRegisterUserShellFolders(TRUE);
if (SUCCEEDED(hr))
@@ -6147,5 +6121,8 @@ HRESULT SHELL_RegisterShellFolders(void)
hr = set_folder_attributes();
if (SUCCEEDED(hr))
register_system_knownfolders();
+
+ (void) InterlockedExchange(®ister_shell_folders, 1);
+
return hr;
}
--
2.17.1
June 8, 2018
Re: [PATCH 4/4] wsdapi: Add initial support for reading messages; identify Probe message.
by Owen Rudge
> It's mainly just for consistency. I don't feel particularly strongly
> about it in these cases, however in previous patch-sets I let similar
> things go, only for it later to become apparent that I shouldn't have.
Although these functions are not used in my upcoming patches, I suppose it's feasible that one day they could be used by callers that could make use of the result, so I'll look at amending that.
> It certainly can't be left like this at the end of the patch-set. It
> might be ok (since this isn't exactly a core dll) to include the next
> patch so that the implementation doesn't regress as far as the tests
> are concerned.
OK, I can include the patch that will fix the TODO in the patchset, which I think would likely be the simplest way of resolving this.
Thanks,
Owen
June 8, 2018
Re: [PATCH 4/4] wsdapi: Add initial support for reading messages; identify Probe message.
by Huw Davies
On Thu, Jun 07, 2018 at 09:15:02PM +0100, Owen Rudge wrote:
> On 07/06/2018 08:56, Huw Davies wrote:
>
> >> +static BOOL move_to_element(WS_XML_READER *reader, const char
> *element_name, WS_XML_STRING *uri)
> >
> > return HRESULT
> >
> >> +static BOOL ws_element_to_wsdxml_element(WS_XML_READER *reader,
> IWSDXMLContext *context, WSDXML_ELEMENT *parent_element)
> >
> > and here.
> >
> >> int read_message(const char *xml, int xml_length, WSD_SOAP_MESSAGE
> **out_msg)
> >
> > This is also looking like a good contender to return HRESULT and
> > take an [out] int *type parameter.
>
> As per the previous patch, the HRESULT is not ultimately used, and I can't
> see that there's a great benefit in passing it along. I do understand it for
> the other functions that ultimately return a value to the caller, but these
> functions are all called by the listener thread, and a simple identification
> of the message type is all we require.
>
> If you think it would be beneficial, I can modify these functions to return
> HRESULT, but it would be good to understand the benefits of doing so.
It's mainly just for consistency. I don't feel particularly strongly
about it in these cases, however in previous patch-sets I let similar
things go, only for it later to become apparent that I shouldn't have.
One way to look at it is that conceptually the function has no idea
that the caller cannot use the failure status, so it should return
it regardless.
> >> - ok(any != NULL, "%s: any == NULL\n", debug_prefix);
> >> + todo_wine ok(any != NULL, "%s: any == NULL\n", debug_prefix);
> >
> > You'll need to have a really good reason for doing this. Can you
> > re-order things so you don't break the tests?
>
> This will be fixed in the next patchset; I didn't want to include any more
> code in what's already quite a large patch. There's probably an extra 40 or
> so lines of code needed to avoid this breakage. There's not really a way I
> can re-order this that I can think of.
>
> If preferred though, I can submit the patch that will fix this as part of
> this patchset, so the net result once the set is committed involves no extra
> todos.
It certainly can't be left like this at the end of the patch-set. It
might be ok (since this isn't exactly a core dll) to include the next
patch so that the implementation doesn't regress as far as the tests
are concerned.
Huw.
June 8, 2018
[PATCH 5/5] mstask/tests: Add more tests for IEnumWorkItems interface.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/mstask/tests/task_scheduler.c | 75 +++++++++++++++++++++++++++++++++++---
1 file changed, 70 insertions(+), 5 deletions(-)
diff --git a/dlls/mstask/tests/task_scheduler.c b/dlls/mstask/tests/task_scheduler.c
index d4766382ec..f61022575d 100644
--- a/dlls/mstask/tests/task_scheduler.c
+++ b/dlls/mstask/tests/task_scheduler.c
@@ -212,23 +212,88 @@ done:
static void test_Enum(void)
{
+ static const WCHAR Task1[] = { 'w','i','n','e','t','a','s','k','1',0 };
ITaskScheduler *scheduler;
+ ITask *task;
IEnumWorkItems *tasks;
+ WCHAR **names;
+ ULONG fetched;
HRESULT hr;
hr = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER,
&IID_ITaskScheduler, (void **)&scheduler);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ /* cleanup after previous runs */
+ ITaskScheduler_Delete(scheduler, Task1);
+
+ hr = ITaskScheduler_NewWorkItem(scheduler, Task1, &CLSID_CTask, &IID_ITask, (IUnknown **)&task);
+ ok(hr == S_OK, "got %#x\n", hr);
+ hr = ITaskScheduler_AddWorkItem(scheduler, Task1, (IScheduledWorkItem *)task);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ ITask_Release(task);
-if (0) { /* crashes on win2k */
hr = ITaskScheduler_Enum(scheduler, NULL);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
-}
+ ok(hr == E_INVALIDARG, "got %#x\n", hr);
hr = ITaskScheduler_Enum(scheduler, &tasks);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ names = (void *)0xdeadbeef;
+ fetched = 0xdeadbeef;
+ hr = IEnumWorkItems_Next(tasks, 0, &names, &fetched);
+ ok(hr == E_INVALIDARG, "got %#x\n", hr);
+ ok(names == (void *)0xdeadbeef, "got %p\n", names);
+ ok(fetched == 0xdeadbeef, "got %#x\n", fetched);
+
+ hr = IEnumWorkItems_Next(tasks, 1, NULL, NULL);
+ ok(hr == E_INVALIDARG, "got %#x\n", hr);
+
+ names = NULL;
+ hr = IEnumWorkItems_Next(tasks, 1, &names, NULL);
+ ok(hr == S_OK, "got %#x\n", hr);
+ ok(names != NULL, "got NULL\n");
+ ok(names[0] != NULL, "got NULL\n");
+ CoTaskMemFree(names[0]);
+ CoTaskMemFree(names);
+
+ names = (void *)0xdeadbeef;
+ hr = IEnumWorkItems_Next(tasks, 2, &names, NULL);
+ ok(hr == E_INVALIDARG, "got %#x\n", hr);
+ ok(names == (void *)0xdeadbeef, "got %p\n", names);
+
+ hr = IEnumWorkItems_Reset(tasks);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ names = NULL;
+ fetched = 0xdeadbeef;
+ hr = IEnumWorkItems_Next(tasks, 1, &names, &fetched);
+ ok(hr == S_OK, "got %#x\n", hr);
+ ok(names != NULL, "got NULL\n");
+ ok(names[0] != NULL, "got NULL\n");
+ ok(fetched == 1, "got %u\n", fetched);
+ CoTaskMemFree(names[0]);
+ CoTaskMemFree(names);
+
+ while (IEnumWorkItems_Skip(tasks, 1) == S_OK)
+ /* do nothing*/;
+
+ hr = IEnumWorkItems_Skip(tasks, 1);
+ ok(hr == S_FALSE, "got %#x\n", hr);
+
+ names = (void *)0xdeadbeef;
+ fetched = 0xdeadbeef;
+ hr = IEnumWorkItems_Next(tasks, 1, &names, &fetched);
+ ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(names == NULL, "got %p\n", names);
+ ok(fetched == 0, "got %u\n", fetched);
+
IEnumWorkItems_Release(tasks);
+ hr = ITaskScheduler_Delete(scheduler, Task1);
+ ok(hr == S_OK, "got %#x\n", hr);
+
ITaskScheduler_Release(scheduler);
}
--
2.16.3
June 8, 2018
[PATCH 4/5] mstask: Implement IEnumWorkItems::Skip().
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/mstask/task_scheduler.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/mstask/task_scheduler.c b/dlls/mstask/task_scheduler.c
index ccb6d6c078..262dd0c49f 100644
--- a/dlls/mstask/task_scheduler.c
+++ b/dlls/mstask/task_scheduler.c
@@ -206,9 +206,17 @@ static HRESULT WINAPI EnumWorkItems_Next(IEnumWorkItems *iface, ULONG count, LPW
static HRESULT WINAPI EnumWorkItems_Skip(IEnumWorkItems *iface, ULONG count)
{
- EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
- FIXME("(%p)->(%u): stub\n", This, count);
- return E_NOTIMPL;
+ LPWSTR *names;
+ ULONG fetched;
+ HRESULT hr;
+
+ TRACE("(%p)->(%u)\n", iface, count);
+
+ hr = EnumWorkItems_Next(iface, count, &names, &fetched);
+ if (SUCCEEDED(hr))
+ free_list(names, fetched);
+
+ return hr;
}
static HRESULT WINAPI EnumWorkItems_Reset(IEnumWorkItems *iface)
--
2.16.3
June 8, 2018
[PATCH 3/5] mstask: Implement IEnumWorkItems::Reset().
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/mstask/task_scheduler.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/mstask/task_scheduler.c b/dlls/mstask/task_scheduler.c
index 8db6e28b5e..ccb6d6c078 100644
--- a/dlls/mstask/task_scheduler.c
+++ b/dlls/mstask/task_scheduler.c
@@ -214,8 +214,16 @@ static HRESULT WINAPI EnumWorkItems_Skip(IEnumWorkItems *iface, ULONG count)
static HRESULT WINAPI EnumWorkItems_Reset(IEnumWorkItems *iface)
{
EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
- FIXME("(%p): stub\n", This);
- return E_NOTIMPL;
+
+ TRACE("(%p)\n", This);
+
+ if (This->handle != INVALID_HANDLE_VALUE)
+ {
+ FindClose(This->handle);
+ This->handle = INVALID_HANDLE_VALUE;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI EnumWorkItems_Clone(IEnumWorkItems *iface, IEnumWorkItems **cloned)
--
2.16.3
June 8, 2018
[PATCH 2/5] mstask: Implement IEnumWorkItems::Next().
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/mstask/task_scheduler.c | 98 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 96 insertions(+), 2 deletions(-)
diff --git a/dlls/mstask/task_scheduler.c b/dlls/mstask/task_scheduler.c
index 416a3218d0..8db6e28b5e 100644
--- a/dlls/mstask/task_scheduler.c
+++ b/dlls/mstask/task_scheduler.c
@@ -43,6 +43,7 @@ typedef struct
{
IEnumWorkItems IEnumWorkItems_iface;
LONG ref;
+ HANDLE handle;
} EnumWorkItemsImpl;
static inline TaskSchedulerImpl *impl_from_ITaskScheduler(ITaskScheduler *iface)
@@ -97,6 +98,8 @@ static ULONG WINAPI EnumWorkItems_Release(IEnumWorkItems *iface)
if (ref == 0)
{
+ if (This->handle != INVALID_HANDLE_VALUE)
+ FindClose(This->handle);
heap_free(This);
InterlockedDecrement(&dll_ref);
}
@@ -104,11 +107,101 @@ static ULONG WINAPI EnumWorkItems_Release(IEnumWorkItems *iface)
return ref;
}
+static void free_list(LPWSTR *list, LONG count)
+{
+ LONG i;
+
+ for (i = 0; i < count; i++)
+ CoTaskMemFree(list[i]);
+
+ CoTaskMemFree(list);
+}
+
+static inline BOOL is_file(const WIN32_FIND_DATAW *data)
+{
+ return !(data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
+}
+
static HRESULT WINAPI EnumWorkItems_Next(IEnumWorkItems *iface, ULONG count, LPWSTR **names, ULONG *fetched)
{
+ static const WCHAR tasksW[] = { '\\','T','a','s','k','s','\\','*',0 };
EnumWorkItemsImpl *This = impl_from_IEnumWorkItems(iface);
- FIXME("(%p)->(%u %p %p): stub\n", This, count, names, fetched);
- return E_NOTIMPL;
+ WCHAR path[MAX_PATH];
+ WIN32_FIND_DATAW data;
+ ULONG enumerated, dummy;
+ LPWSTR *list;
+ HRESULT hr = S_FALSE;
+
+ TRACE("(%p)->(%u %p %p)\n", This, count, names, fetched);
+
+ if (!count || !names || (!fetched && count > 1)) return E_INVALIDARG;
+
+ if (!fetched) fetched = &dummy;
+
+ *names = NULL;
+ *fetched = 0;
+ enumerated = 0;
+ list = NULL;
+
+ if (This->handle == INVALID_HANDLE_VALUE)
+ {
+ GetWindowsDirectoryW(path, MAX_PATH);
+ lstrcatW(path, tasksW);
+ This->handle = FindFirstFileW(path, &data);
+ if (This->handle == INVALID_HANDLE_VALUE)
+ return S_FALSE;
+ }
+ else
+ {
+ if (!FindNextFileW(This->handle, &data))
+ return S_FALSE;
+ }
+
+ do
+ {
+ if (is_file(&data))
+ {
+ LPWSTR *new_list;
+
+ if (!list)
+ new_list = CoTaskMemAlloc((enumerated + 1) * sizeof(list[0]));
+ else
+ new_list = CoTaskMemRealloc(list, (enumerated + 1) * sizeof(list[0]));
+ if (!new_list)
+ {
+ hr = E_OUTOFMEMORY;
+ break;
+ }
+
+ list = new_list;
+
+ list[enumerated] = CoTaskMemAlloc((lstrlenW(data.cFileName) + 1) * sizeof(WCHAR));
+ if (!list[enumerated])
+ {
+ hr = E_OUTOFMEMORY;
+ break;
+ }
+
+ lstrcpyW(list[enumerated], data.cFileName);
+ enumerated++;
+
+ if (enumerated >= count)
+ {
+ hr = S_OK;
+ break;
+ }
+ }
+ } while (FindNextFileW(This->handle, &data));
+
+ if (FAILED(hr))
+ free_list(list, enumerated);
+ else
+ {
+ *fetched = enumerated;
+ *names = list;
+ }
+
+ return hr;
}
static HRESULT WINAPI EnumWorkItems_Skip(IEnumWorkItems *iface, ULONG count)
@@ -154,6 +247,7 @@ static HRESULT create_task_enum(IEnumWorkItems **ret)
tasks->IEnumWorkItems_iface.lpVtbl = &EnumWorkItemsVtbl;
tasks->ref = 1;
+ tasks->handle = INVALID_HANDLE_VALUE;
*ret = &tasks->IEnumWorkItems_iface;
InterlockedIncrement(&dll_ref);
--
2.16.3
June 8, 2018
[PATCH 1/5] mstask: Implement ITask::GetExitCode().
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/mstask/task.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c
index 266029a58e..7499826937 100644
--- a/dlls/mstask/task.c
+++ b/dlls/mstask/task.c
@@ -685,8 +685,14 @@ static HRESULT WINAPI MSTASK_ITask_GetExitCode(ITask *iface, DWORD *exit_code)
TRACE("(%p, %p)\n", iface, exit_code);
+ if (This->status == SCHED_S_TASK_NOT_SCHEDULED)
+ {
+ *exit_code = 0;
+ return SCHED_S_TASK_HAS_NOT_RUN;
+ }
+
*exit_code = This->exit_code;
- return SCHED_S_TASK_HAS_NOT_RUN; /* FIXME */
+ return S_OK;
}
static HRESULT WINAPI MSTASK_ITask_SetComment(ITask *iface, LPCWSTR comment)
--
2.16.3
June 8, 2018
[PATCH 3/3] schedsvc: Add support for running missed tasks at the service start.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 24 ++++++++++++++++++++++++
dlls/schedsvc/schedsvc_private.h | 1 +
dlls/schedsvc/svc_main.c | 1 +
3 files changed, 26 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index b5b8317ded..f6ea0f0e23 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -1039,6 +1039,30 @@ void check_task_time(void)
LeaveCriticalSection(&at_job_list_section);
}
+void check_missed_task_time(void)
+{
+ FILETIME current_ft, last_ft;
+ struct job_t *job;
+
+ GetSystemTimeAsFileTime(¤t_ft);
+ FileTimeToLocalFileTime(¤t_ft, ¤t_ft);
+
+ EnterCriticalSection(&at_job_list_section);
+
+ LIST_FOR_EACH_ENTRY(job, &at_job_list, struct job_t, entry)
+ {
+ if (SystemTimeToFileTime(&job->data.last_runtime, &last_ft))
+ {
+ if (job_runs_at(job, &last_ft, ¤t_ft))
+ {
+ run_job(job);
+ }
+ }
+ }
+
+ LeaveCriticalSection(&at_job_list_section);
+}
+
void remove_job(const WCHAR *name)
{
struct job_t *job;
diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h
index 10892d55ca..117c6f51ed 100644
--- a/dlls/schedsvc/schedsvc_private.h
+++ b/dlls/schedsvc/schedsvc_private.h
@@ -31,6 +31,7 @@ void update_process_status(DWORD pid) DECLSPEC_HIDDEN;
BOOL get_next_runtime(LARGE_INTEGER *rt) DECLSPEC_HIDDEN;
void check_task_time(void) DECLSPEC_HIDDEN;
void load_at_tasks(void) DECLSPEC_HIDDEN;
+void check_missed_task_time(void) DECLSPEC_HIDDEN;
static inline WCHAR *heap_strdupW(const WCHAR *src)
{
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 2bba674b07..8e23a049db 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -54,6 +54,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
TRACE("Starting...\n");
load_at_tasks();
+ check_missed_task_time();
htimer = CreateWaitableTimerW(NULL, FALSE, NULL);
if (htimer == NULL)
--
2.16.3
June 8, 2018
[PATCH 2/3] schedsvc: Load job files at the service start up.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 41 ++++++++++++++++++++++++++++++++++++++++
dlls/schedsvc/schedsvc_private.h | 1 +
dlls/schedsvc/svc_main.c | 2 ++
3 files changed, 44 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index 597df34f2a..b5b8317ded 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -623,6 +623,47 @@ void add_job(const WCHAR *name)
LeaveCriticalSection(&at_job_list_section);
}
+static inline BOOL is_file(const WIN32_FIND_DATAW *data)
+{
+ return !(data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
+}
+
+void load_at_tasks(void)
+{
+ static const WCHAR tasksW[] = { '\\','T','a','s','k','s','\\',0 };
+ static const WCHAR allW[] = { '*',0 };
+ WCHAR windir[MAX_PATH], path[MAX_PATH];
+ WIN32_FIND_DATAW data;
+ HANDLE handle;
+
+ GetWindowsDirectoryW(windir, MAX_PATH);
+ lstrcpyW(path, windir);
+ lstrcatW(path, tasksW);
+ lstrcatW(path, allW);
+
+ handle = FindFirstFileW(path, &data);
+ if (handle == INVALID_HANDLE_VALUE) return;
+
+ do
+ {
+ if (is_file(&data))
+ {
+ lstrcpyW(path, windir);
+ lstrcatW(path, tasksW);
+
+ if (lstrlenW(path) + lstrlenW(data.cFileName) < MAX_PATH)
+ {
+ lstrcatW(path, data.cFileName);
+ add_job(path);
+ }
+ else
+ FIXME("too long file name %s\n", debugstr_w(data.cFileName));
+ }
+ } while (FindNextFileW(handle, &data));
+
+ FindClose(handle);
+}
+
static BOOL write_signature(HANDLE hfile)
{
struct
diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h
index d601030e78..10892d55ca 100644
--- a/dlls/schedsvc/schedsvc_private.h
+++ b/dlls/schedsvc/schedsvc_private.h
@@ -30,6 +30,7 @@ void add_process_to_queue(HANDLE hproc) DECLSPEC_HIDDEN;
void update_process_status(DWORD pid) DECLSPEC_HIDDEN;
BOOL get_next_runtime(LARGE_INTEGER *rt) DECLSPEC_HIDDEN;
void check_task_time(void) DECLSPEC_HIDDEN;
+void load_at_tasks(void) DECLSPEC_HIDDEN;
static inline WCHAR *heap_strdupW(const WCHAR *src)
{
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 0dfac818fd..2bba674b07 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -53,6 +53,8 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
TRACE("Starting...\n");
+ load_at_tasks();
+
htimer = CreateWaitableTimerW(NULL, FALSE, NULL);
if (htimer == NULL)
{
--
2.16.3
June 8, 2018
[PATCH 1/3] schedsvc: Add a sanity check when loading a .job file.
by Dmitry Timoshkov
There was no problem with this patchset, however I had a file in the c:\windows\tasks
directory (dump_job.exe) that was leading to a crash in the job file loading code,
this patch fixes it.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index 91ef3edca0..597df34f2a 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -394,6 +394,12 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE("file_version %04x\n", fixed->file_version);
TRACE("uuid %s\n", wine_dbgstr_guid(&fixed->uuid));
+ if (fixed->file_version != 0x0001)
+ {
+ TRACE("invalid file version\n");
+ return FALSE;
+ }
+
TRACE("name_size_offset %04x\n", fixed->name_size_offset);
TRACE("trigger_offset %04x\n", fixed->trigger_offset);
TRACE("error_retry_count %u\n", fixed->error_retry_count);
--
2.16.3
June 8, 2018
[PATCH] cdosys: Prefer native version.
by Alistair Leslie-Hughes
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/cdosys/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/cdosys/main.c b/dlls/cdosys/main.c
index 1a9affe..4728229 100644
--- a/dlls/cdosys/main.c
+++ b/dlls/cdosys/main.c
@@ -41,6 +41,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv)
switch (reason)
{
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
--
1.9.1
June 8, 2018
Re: [PATCH] kernel32/tests: Add tests for job object accounting
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39044
Your paranoid android.
=== w1064 (64 bit process) ===
process.c:2532: Test failed: Expected NumberOfAssignedProcesses to be 0 (expected_count) is 1
process.c:2532: Test failed: Expected NumberOfProcessIdsInList to be 0 (expected_count) is 1
process.c:2533: Test failed: Expected basic_accounting.ActiveProcesses to be 0 (active_proc) is 1
June 8, 2018
[PATCH] kernel32/tests: Add tests for job object accounting
by Alistair Leslie-Hughes
From: Mark Jansen <mark.jansen(a)reactos.org>
Signed-off-by: Mark Jansen <mark.jansen(a)reactos.org>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/kernel32/tests/process.c | 95 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index b1a4539..5324894 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -2394,6 +2394,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
ok_(__FILE__, line)(ret, "CreateProcess error %u\n", GetLastError());
}
+#define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__)
+static void _test_assigned_proc(int line, HANDLE job, int expected_count, ...)
+{
+ char buf[sizeof(JOBOBJECT_BASIC_PROCESS_ID_LIST) + sizeof(ULONG_PTR) * 20];
+ PJOBOBJECT_BASIC_PROCESS_ID_LIST pid_list = (JOBOBJECT_BASIC_PROCESS_ID_LIST *)buf;
+ DWORD ret_len, pid;
+ va_list valist;
+ int n;
+ BOOL ret;
+
+ memset(buf, 0, sizeof(buf));
+ ret = pQueryInformationJobObject(job, JobObjectBasicProcessIdList, pid_list, sizeof(buf), &ret_len);
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %u\n", GetLastError());
+ if (ret)
+ {
+ todo_wine_if(expected_count)
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfAssignedProcesses,
+ "Expected NumberOfAssignedProcesses to be %d (expected_count) is %d\n",
+ expected_count, pid_list->NumberOfAssignedProcesses);
+ todo_wine_if(expected_count)
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfProcessIdsInList,
+ "Expected NumberOfProcessIdsInList to be %d (expected_count) is %d\n",
+ expected_count, pid_list->NumberOfProcessIdsInList);
+
+ va_start(valist, expected_count);
+ for (n = 0; n < min(expected_count, pid_list->NumberOfProcessIdsInList); ++n)
+ {
+ pid = va_arg(valist, DWORD);
+ ok_(__FILE__, line)(pid == pid_list->ProcessIdList[n],
+ "Expected pid_list->ProcessIdList[%d] to be %x is %lx\n",
+ n, pid, pid_list->ProcessIdList[n]);
+ }
+ va_end(valist);
+ }
+}
+
+#define test_accounting(job, total_proc, active_proc, terminated_proc) _test_accounting(__LINE__, job, total_proc, active_proc, terminated_proc)
+static void _test_accounting(int line, HANDLE job, int total_proc, int active_proc, int terminated_proc)
+{
+ JOBOBJECT_BASIC_ACCOUNTING_INFORMATION basic_accounting;
+ DWORD ret_len;
+ BOOL ret;
+
+ memset(&basic_accounting, 0, sizeof(basic_accounting));
+ ret = pQueryInformationJobObject(job, JobObjectBasicAccountingInformation, &basic_accounting, sizeof(basic_accounting), &ret_len);
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %u\n", GetLastError());
+ if (ret)
+ {
+ /* Not going to check process times or page faults */
+
+ todo_wine_if(total_proc)
+ ok_(__FILE__, line)(total_proc == basic_accounting.TotalProcesses,
+ "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %d\n",
+ total_proc, basic_accounting.TotalProcesses);
+ todo_wine_if(active_proc)
+ ok_(__FILE__, line)(active_proc == basic_accounting.ActiveProcesses,
+ "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %d\n",
+ active_proc, basic_accounting.ActiveProcesses);
+ ok_(__FILE__, line)(terminated_proc == basic_accounting.TotalTerminatedProcesses,
+ "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %d\n",
+ terminated_proc, basic_accounting.TotalTerminatedProcesses);
+ }
+}
static void test_IsProcessInJob(void)
{
@@ -2420,11 +2483,15 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 0);
+ test_accounting(job, 0, 0, 0);
out = TRUE;
ret = pIsProcessInJob(pi.hProcess, job2, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job2, 0);
+ test_accounting(job2, 0, 0, 0);
out = TRUE;
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
@@ -2438,11 +2505,15 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 1, pi.dwProcessId);
+ test_accounting(job, 1, 1, 0);
out = TRUE;
ret = pIsProcessInJob(pi.hProcess, job2, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job2, 0);
+ test_accounting(job2, 0, 0, 0);
out = FALSE;
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
@@ -2458,6 +2529,8 @@ static void test_IsProcessInJob(void)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 0);
+ test_accounting(job, 1, 0, 0);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2474,11 +2547,15 @@ static void test_TerminateJobObject(void)
job = pCreateJobObjectW(NULL, NULL);
ok(job != NULL, "CreateJobObject error %u\n", GetLastError());
+ test_assigned_proc(job, 0);
+ test_accounting(job, 0, 0, 0);
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
+ test_assigned_proc(job, 1, pi.dwProcessId);
+ test_accounting(job, 1, 1, 0);
ret = pTerminateJobObject(job, 123);
ok(ret, "TerminateJobObject error %u\n", GetLastError());
@@ -2486,6 +2563,8 @@ static void test_TerminateJobObject(void)
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0);
+ test_assigned_proc(job, 0);
+ test_accounting(job, 1, 0, 0);
ret = GetExitCodeProcess(pi.hProcess, &dwret);
ok(ret, "GetExitCodeProcess error %u\n", GetLastError());
@@ -2505,6 +2584,8 @@ static void test_TerminateJobObject(void)
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(!ret, "AssignProcessToJobObject unexpectedly succeeded\n");
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
+ test_assigned_proc(job, 0);
+ test_accounting(job, 1, 0, 0);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
@@ -2691,11 +2772,15 @@ static void test_KillOnJobClose(void)
return;
}
ok(ret, "SetInformationJobObject error %u\n", GetLastError());
+ test_assigned_proc(job, 0);
+ test_accounting(job, 0, 0, 0);
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess);
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
+ test_assigned_proc(job, 1, pi.dwProcessId);
+ test_accounting(job, 1, 1, 0);
CloseHandle(job);
@@ -2799,6 +2884,8 @@ static HANDLE test_AddSelfToJob(void)
ret = pAssignProcessToJobObject(job, GetCurrentProcess());
ok(ret, "AssignProcessToJobObject error %u\n", GetLastError());
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 1, 1, 0);
return job;
}
@@ -2826,6 +2913,8 @@ static void test_jobInheritance(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 2, GetCurrentProcessId(), pi.dwProcessId);
+ test_accounting(job, 2, 2, 0);
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
@@ -2854,6 +2943,8 @@ static void test_BreakawayOk(HANDLE job)
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
ok(!ret, "CreateProcessA expected failure\n");
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 2, 1, 0);
if (ret)
{
@@ -2876,6 +2967,8 @@ static void test_BreakawayOk(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 2, 1, 0);
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
@@ -2893,6 +2986,8 @@ static void test_BreakawayOk(HANDLE job)
ret = pIsProcessInJob(pi.hProcess, job, &out);
ok(ret, "IsProcessInJob error %u\n", GetLastError());
ok(!out, "IsProcessInJob returned out=%u\n", out);
+ test_assigned_proc(job, 1, GetCurrentProcessId());
+ test_accounting(job, 2, 1, 0);
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
--
1.9.1
June 8, 2018
[PATCH] msxml3: Accept NormalizeAttributeValues property
by Alistair Leslie-Hughes
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/msxml3/domdoc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index ddd7565..0b917c1 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -73,6 +73,7 @@ static const WCHAR PropValueXSLPatternW[] = {'X','S','L','P','a','t','t','e','r'
static const WCHAR PropertyResolveExternalsW[] = {'R','e','s','o','l','v','e','E','x','t','e','r','n','a','l','s',0};
static const WCHAR PropertyAllowXsltScriptW[] = {'A','l','l','o','w','X','s','l','t','S','c','r','i','p','t',0};
static const WCHAR PropertyAllowDocumentFunctionW[] = {'A','l','l','o','w','D','o','c','u','m','e','n','t','F','u','n','c','t','i','o','n',0};
+static const WCHAR PropertyNormalizeAttributeValuesW[] = {'N','o','r','m','a','l','i','z','e','A','t','t','r','i','b','u','t','e','V','a','l','u','e','s',0};
/* Anything that passes the test_get_ownerDocument()
* tests can go here (data shared between all instances).
@@ -3108,6 +3109,7 @@ static HRESULT WINAPI domdoc_setProperty(
lstrcmpiW(p, PropertyNewParserW) == 0 ||
lstrcmpiW(p, PropertyResolveExternalsW) == 0 ||
lstrcmpiW(p, PropertyAllowXsltScriptW) == 0 ||
+ lstrcmpiW(p, PropertyNormalizeAttributeValuesW) == 0 ||
lstrcmpiW(p, PropertyAllowDocumentFunctionW) == 0)
{
/* Ignore */
--
1.9.1
June 8, 2018
[PATCH] include: Updated enum AutomationIdentifierType values
by Alistair Leslie-Hughes
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/uiautomationcoreapi.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h
index 12c509f..1898fe9 100644
--- a/include/uiautomationcoreapi.h
+++ b/include/uiautomationcoreapi.h
@@ -45,7 +45,11 @@ enum AutomationIdentifierType
AutomationIdentifierType_Pattern,
AutomationIdentifierType_Event,
AutomationIdentifierType_ControlType,
- AutomationIdentifierType_TextAttribute
+ AutomationIdentifierType_TextAttribute,
+ AutomationIdentifierType_LandmarkType,
+ AutomationIdentifierType_Annotation,
+ AutomationIdentifierType_Changes,
+ AutomationIdentifierType_Style
};
HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value);
--
1.9.1
June 8, 2018
Re: [PATCH 1/3] user32: Make RegisterPointerDeviceNotifications return TRUE to fake success
by Fabian Maurer
Thanks for your feedback,
I updated my GetPointerDevices stub to return FALSE when the application tries to load
devices - now we only success if it queries the number of devices - and then we return 0.
This should be alright.
I made a small testcase to test if windows returns success for
RegisterTouchHitTestingWindow when the system doesn't have a pointer device - it does.
Since there is no touch device, it should be fine if we just never send the message - even if
the window is "registered".
I'd add a testcase, but I'm not sure how to go about that - since it's not guaranteed that
every machine the test runs one has 0 pointer devices. An idea how I could go about that?
Regards,
Fabian Maurer
####################################
#define _WIN32_WINNT _WIN32_WINNT_WIN8
#include <windows.h>
#include <stdio.h>
static LRESULT WINAPI WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
lParam)
{
return DefWindowProcA(hwnd, message, wParam, lParam);
}
int main(void)
{
BOOL success;
UINT32 count;
WNDCLASSA cls = {0};
HANDLE hwnd;
POINTER_DEVICE_INFO devices[1];
cls.lpfnWndProc = WndProc;
cls.hInstance = GetModuleHandleA(0);
cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszClassName = "testclass";
RegisterClassA(&cls);
hwnd = CreateWindowA("testclass", "Test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10,
10, 300, 300, NULL, NULL, NULL, 0);
printf("Handle: %p\n", hwnd);
success = GetPointerDevices(&count, NULL);
printf("success: %d, count: %d\n", success, count);
success = RegisterTouchHitTestingWindow(hwnd, TOUCH_HIT_TESTING_CLIENT);
printf("success: %d\n", success);
count = 1;
success = GetPointerDevices(&count, devices);
printf("success: %d, count: %d\n", success, count);
return 0;
}
####################################
output from testbot:
Handle: 00070234
success: 1, count: 0
success: 1
success: 0, count: 1
June 7, 2018
[PATCH v2 3/3] user32: Add RegisterTouchHitTestingWindow stub
by Fabian Maurer
Fixes bug 45303.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dlls/user32/misc.c | 9 +++++++++
dlls/user32/user32.spec | 1 +
2 files changed, 10 insertions(+)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index dfdd599299..b1b2c61aa0 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -863,6 +863,15 @@ BOOL WINAPI GetPointerDevices(UINT32 *device_count, POINTER_DEVICE_INFO *devices
return TRUE;
}
+/**********************************************************************
+ * RegisterTouchHitTestingWindow [USER32.@]
+ */
+BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value)
+{
+ FIXME("(%p %d): stub\n", hwnd, value);
+ return TRUE;
+}
+
static const WCHAR imeW[] = {'I','M','E',0};
const struct builtin_class_descr IME_builtin_class =
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 7f652ee722..61e0e4e8cc 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -606,6 +606,7 @@
@ stdcall RegisterShellHookWindow (long)
@ stdcall RegisterSystemThread(long long)
@ stdcall RegisterTasklist (long)
+@ stdcall RegisterTouchHitTestingWindow(long long)
@ stdcall RegisterTouchWindow(long long)
# @ stub RegisterUserApiHook
@ stdcall RegisterWindowMessageA(str)
--
2.17.1
June 7, 2018
[PATCH v2 2/3] user32: Add stub for GetPointerDevices
by Fabian Maurer
Fixes bug 45302.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
...ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec | 2 +-
dlls/user32/misc.c | 18 +++++++++++++++++
dlls/user32/user32.spec | 1 +
include/winuser.h | 20 +++++++++++++++++++
4 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec b/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec
index 72cfe3d954..3a043dc9c2 100644
--- a/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec
+++ b/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec
@@ -4,7 +4,7 @@
@ stub GetPointerDevice
@ stub GetPointerDeviceProperties
@ stub GetPointerDeviceRects
-@ stub GetPointerDevices
+@ stdcall GetPointerDevices(ptr ptr) user32.GetPointerDevices
@ stub GetPointerFrameInfo
@ stub GetPointerFrameInfoHistory
@ stub GetPointerFramePenInfo
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index c3f4030a90..dfdd599299 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -846,6 +846,24 @@ BOOL WINAPI RegisterPointerDeviceNotifications(HWND hwnd, BOOL notifyrange)
return TRUE;
}
+/**********************************************************************
+ * GetPointerDevices [USER32.@]
+ */
+BOOL WINAPI GetPointerDevices(UINT32 *device_count, POINTER_DEVICE_INFO *devices)
+{
+ FIXME("(%p %p): partial stub\n", device_count, devices);
+
+ if (!device_count)
+ return FALSE;
+
+ if (devices)
+ return FALSE;
+
+ *device_count = 0;
+ return TRUE;
+}
+
+
static const WCHAR imeW[] = {'I','M','E',0};
const struct builtin_class_descr IME_builtin_class =
{
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 2e5b203a85..7f652ee722 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -354,6 +354,7 @@
@ stdcall GetOpenClipboardWindow()
@ stdcall GetParent(long)
@ stdcall GetPhysicalCursorPos(ptr)
+@ stdcall GetPointerDevices(ptr ptr)
@ stdcall GetPriorityClipboardFormat(ptr long)
@ stdcall GetProcessDefaultLayout(ptr)
@ stdcall GetProcessDpiAwarenessInternal(long ptr)
diff --git a/include/winuser.h b/include/winuser.h
index 648efbe0e2..f546a4a1f3 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3357,6 +3357,26 @@ typedef struct tagGESTUREINFO {
} GESTUREINFO, *PGESTUREINFO;
typedef GESTUREINFO const * PCGESTUREINFO;
+#define POINTER_DEVICE_PRODUCT_STRING_MAX 520
+
+typedef enum tagPOINTER_DEVICE_TYPE {
+ POINTER_DEVICE_TYPE_INTEGRATED_PEN = 0x00000001,
+ POINTER_DEVICE_TYPE_EXTERNAL_PEN = 0x00000002,
+ POINTER_DEVICE_TYPE_TOUCH = 0x00000003,
+ POINTER_DEVICE_TYPE_TOUCH_PAD = 0x00000004,
+ POINTER_DEVICE_TYPE_MAX = 0xFFFFFFFF
+} POINTER_DEVICE_TYPE;
+
+typedef struct tagPOINTER_DEVICE_INFO {
+ DWORD displayOrientation;
+ HANDLE device;
+ POINTER_DEVICE_TYPE pointerDeviceType;
+ HMONITOR monitor;
+ ULONG startingCursorId;
+ USHORT maxActiveContacts;
+ WCHAR productString[POINTER_DEVICE_PRODUCT_STRING_MAX];
+} POINTER_DEVICE_INFO;
+
#if defined(_WINGDI_) && !defined(NOGDI)
WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA,DWORD);
WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW,DWORD);
--
2.17.1
June 7, 2018
[PATCH v2 1/3] user32: Make RegisterPointerDeviceNotifications return TRUE to fake success
by Fabian Maurer
Fixes bug 45284.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dlls/user32/misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index be4b71a4bc..c3f4030a90 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -843,7 +843,7 @@ LONG WINAPI GetDisplayConfigBufferSizes(UINT32 flags, UINT32 *num_path_info, UIN
BOOL WINAPI RegisterPointerDeviceNotifications(HWND hwnd, BOOL notifyrange)
{
FIXME("(%p %d): stub\n", hwnd, notifyrange);
- return FALSE;
+ return TRUE;
}
static const WCHAR imeW[] = {'I','M','E',0};
--
2.17.1
June 7, 2018
[PATCH] mshtml/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/mshtml/tests/dom.c | 59 ++++++++++++++--------------
dlls/mshtml/tests/htmldoc.c | 16 ++++----
dlls/mshtml/tests/htmllocation.c | 4 +-
dlls/mshtml/tests/protocol.c | 78 ++++++++++++++++++--------------------
dlls/mshtml/tests/script.c | 4 +-
dlls/mshtml/tests/xmlhttprequest.c | 4 +-
6 files changed, 80 insertions(+), 85 deletions(-)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index efdd856318..b120b47453 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -2704,7 +2704,7 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
memset(vs, 0, sizeof(vs));
fetched = 0;
- hres = IEnumVARIANT_Next(enum_var, sizeof(vs)/sizeof(*vs), vs, &fetched);
+ hres = IEnumVARIANT_Next(enum_var, ARRAY_SIZE(vs), vs, &fetched);
ok_(__FILE__,line)(hres == S_FALSE, "Next failed: %08x\n", hres);
ok_(__FILE__,line)(fetched == (len > 2 ? 2 : len), "fetched = %d\n", fetched);
if(len) {
@@ -6188,7 +6188,7 @@ static void _test_language_string(unsigned line, const WCHAR *lang, LCID lcid)
int res;
if(pLCIDToLocaleName) {
- res = pLCIDToLocaleName(lcid, buf, sizeof(buf)/sizeof(WCHAR), 0);
+ res = pLCIDToLocaleName(lcid, buf, ARRAY_SIZE(buf), 0);
ok_(__FILE__,line)(res, "LCIDToLocaleName failed: %u\n", GetLastError());
ok_(__FILE__,line)(!lstrcmpW(lang, buf), "lang = %s, expected %s\n", wine_dbgstr_w(lang), wine_dbgstr_w(buf));
}else {
@@ -6486,17 +6486,17 @@ static void test_unique_id(IHTMLDocument2 *doc, IHTMLElement *elem)
hres = IHTMLDocument3_get_uniqueID(doc3, &id);
ok(hres == S_OK, "get_uniqueID failed: %08x\n", hres);
- ok(SysStringLen(id) >= sizeof(prefixW)/sizeof(*prefixW), "id %s too short\n", wine_dbgstr_w(id));
+ ok(SysStringLen(id) >= ARRAY_SIZE(prefixW), "id %s too short\n", wine_dbgstr_w(id));
hres = IHTMLDocument3_get_uniqueID(doc3, &id2);
ok(hres == S_OK, "get_uniqueID failed: %08x\n", hres);
- ok(SysStringLen(id2) >= sizeof(prefixW)/sizeof(*prefixW), "id %s too short\n", wine_dbgstr_w(id2));
+ ok(SysStringLen(id2) >= ARRAY_SIZE(prefixW), "id %s too short\n", wine_dbgstr_w(id2));
ok(lstrcmpW(id, id2), "same unique ids %s\n", wine_dbgstr_w(id));
- id[sizeof(prefixW)/sizeof(*prefixW)-1] = 0;
+ id[ARRAY_SIZE(prefixW)-1] = 0;
ok(!lstrcmpW(id, prefixW), "unexpected prefix %s\n", wine_dbgstr_w(id));
- id2[sizeof(prefixW)/sizeof(*prefixW)-1] = 0;
+ id2[ARRAY_SIZE(prefixW)-1] = 0;
ok(!lstrcmpW(id2, prefixW), "unexpected prefix %s\n", wine_dbgstr_w(id2));
SysFreeString(id);
@@ -7267,7 +7267,7 @@ static void test_tr_elem(IHTMLElement *elem)
ok(hres == S_OK, "get_cells failed: %08x\n", hres);
ok(col != NULL, "get_cells returned NULL\n");
- test_elem_collection((IUnknown*)col, cell_types, sizeof(cell_types)/sizeof(*cell_types));
+ test_elem_collection((IUnknown*)col, cell_types, ARRAY_SIZE(cell_types));
IHTMLElementCollection_Release(col);
bstr = a2bstr("left");
@@ -7591,14 +7591,14 @@ static void test_table_elem(IHTMLElement *elem)
ok(hres == S_OK, "get_rows failed: %08x\n", hres);
ok(col != NULL, "get_rows returned NULL\n");
- test_elem_collection((IUnknown*)col, row_types, sizeof(row_types)/sizeof(*row_types));
+ test_elem_collection((IUnknown*)col, row_types, ARRAY_SIZE(row_types));
IHTMLElementCollection_Release(col);
- test_elem_all((IUnknown*)table, all_types, sizeof(all_types)/sizeof(*all_types));
+ test_elem_all((IUnknown*)table, all_types, ARRAY_SIZE(all_types));
node = clone_node((IUnknown*)table, VARIANT_TRUE);
test_elem_tag((IUnknown*)node, "TABLE");
- test_elem_all((IUnknown*)node, all_types, sizeof(all_types)/sizeof(*all_types));
+ test_elem_all((IUnknown*)node, all_types, ARRAY_SIZE(all_types));
IHTMLDOMNode_Release(node);
node = clone_node((IUnknown*)table, VARIANT_FALSE);
@@ -7611,7 +7611,7 @@ static void test_table_elem(IHTMLElement *elem)
ok(hres == S_OK, "get_tBodies failed: %08x\n", hres);
ok(col != NULL, "get_tBodies returned NULL\n");
- test_elem_collection((IUnknown*)col, tbodies_types, sizeof(tbodies_types)/sizeof(*tbodies_types));
+ test_elem_collection((IUnknown*)col, tbodies_types, ARRAY_SIZE(tbodies_types));
IHTMLElementCollection_Release(col);
test_table_cell_spacing(table, NULL);
@@ -7994,7 +7994,7 @@ static void test_iframe_elem(IHTMLElement *elem)
hres = IHTMLDocument2_get_all(content_doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0]));
+ test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types));
IHTMLElementCollection_Release(col);
body = doc_get_body(content_doc);
@@ -8302,7 +8302,7 @@ static void test_elemsbyclass(IHTMLElement *div)
hres = IHTMLElement6_getElementsByClassName(elem, str, &collection);
ok(hres == S_OK, "getElementsByClassName failed: %08x\n", hres);
ok(collection != NULL, "collection == NULL\n");
- test_elem_collection((IUnknown*)collection, types, sizeof(types)/sizeof(*types));
+ test_elem_collection((IUnknown*)collection, types, ARRAY_SIZE(types));
IHTMLElementCollection_Release(collection);
SysFreeString(str);
@@ -8364,8 +8364,8 @@ static void test_elems(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_all(doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0]));
- test_elem_col_item(col, "x", item_types, sizeof(item_types)/sizeof(item_types[0]));
+ test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types));
+ test_elem_col_item(col, "x", item_types, ARRAY_SIZE(item_types));
elem = get_elem_col_item_idx(col, 0);
test_elem_source_index(elem, 0);
@@ -8419,7 +8419,7 @@ static void test_elems(IHTMLDocument2 *doc)
elem = get_doc_elem(doc);
test_elem_istextedit(elem, VARIANT_FALSE);
- test_elem_all((IUnknown*)elem, all_types+1, sizeof(all_types)/sizeof(all_types[0])-1);
+ test_elem_all((IUnknown*)elem, all_types+1, ARRAY_SIZE(all_types)-1);
IHTMLElement_Release(elem);
get_elem_by_id(doc, "xxx", FALSE);
@@ -8964,7 +8964,7 @@ static void test_elems(IHTMLDocument2 *doc)
static const elem_type_t select_types[] = { ET_OPTION, ET_OPTION, ET_OPTION };
test_select_put_length((IUnknown*)elem, 3);
- test_elem_all((IUnknown*)elem, select_types, sizeof(select_types)/sizeof(*select_types));
+ test_elem_all((IUnknown*)elem, select_types, ARRAY_SIZE(select_types));
test_select_put_length((IUnknown*)elem, 1);
test_elem_all((IUnknown*)elem, select_types, 1);
IHTMLElement_Release(elem);
@@ -9204,7 +9204,7 @@ static void test_elem_names(IHTMLDocument2 *doc)
test_elem_set_innerhtml((IUnknown*)body,
"<input name=\"test\"><a name=\"test\"></a><a name=\"xxx\"></a><div id=\"test\"></div>");
col = doc_get_elems_by_name(doc, "test");
- test_elem_collection((IUnknown*)col, test1_types, sizeof(test1_types)/sizeof(*test1_types));
+ test_elem_collection((IUnknown*)col, test1_types, ARRAY_SIZE(test1_types));
IHTMLElementCollection_Release(col);
col = doc_get_elems_by_name(doc, "yyy");
@@ -9252,7 +9252,7 @@ static void test_elems2(IHTMLDocument2 *doc)
elem2 = get_doc_elem_by_id(doc, "innerid");
ok(elem2 != NULL, "elem2 == NULL\n");
test_elem_set_outerhtml((IUnknown*)elem2, "<br><a href=\"about:blank\" id=\"aid\">a</a>");
- test_elem_all((IUnknown*)div, outer_types, sizeof(outer_types)/sizeof(*outer_types));
+ test_elem_all((IUnknown*)div, outer_types, ARRAY_SIZE(outer_types));
IHTMLElement_Release(elem2);
elem2 = get_doc_elem_by_id(doc, "aid");
@@ -9407,8 +9407,7 @@ static void test_form_element(IHTMLDocument2 *doc, IHTMLElement *parent)
test_form_put_encoding((IUnknown*)elem, S_OK, "multipart/form-data");
test_form_put_encoding((IUnknown*)elem, E_INVALIDARG, "image/png");
test_form_encoding((IUnknown*)elem, "multipart/form-data");
- test_form_elements((IUnknown*)elem, elems_textarea_input,
- sizeof(elems_textarea_input)/sizeof(*elems_textarea_input));
+ test_form_elements((IUnknown*)elem, elems_textarea_input, ARRAY_SIZE(elems_textarea_input));
test_form_reset((IUnknown*)elem);
test_form_target((IUnknown*)elem);
@@ -9495,7 +9494,7 @@ static void test_create_elems(IHTMLDocument2 *doc)
hres = IHTMLElement_get_all(body, &disp);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)disp, types1, sizeof(types1)/sizeof(types1[0]));
+ test_elem_collection((IUnknown*)disp, types1, ARRAY_SIZE(types1));
IDispatch_Release(disp);
test_node_remove_child((IUnknown*)body, node);
@@ -9636,12 +9635,12 @@ static void test_noscript(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_all(doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0]));
+ test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types));
IHTMLElementCollection_Release(col);
body = doc_get_body(doc);
test_elem_set_innerhtml((IUnknown*)body, "<div>test</div><noscript><a href=\"about:blank\">A</a></noscript>");
- test_elem_all((IUnknown*)body, body_all_types, sizeof(body_all_types)/sizeof(*body_all_types));
+ test_elem_all((IUnknown*)body, body_all_types, ARRAY_SIZE(body_all_types));
IHTMLElement_Release(body);
}
@@ -9703,12 +9702,12 @@ static void test_create_stylesheet(IHTMLDocument2 *doc)
ET_DIV
};
- test_doc_all(doc, all_types, sizeof(all_types)/sizeof(*all_types));
+ test_doc_all(doc, all_types, ARRAY_SIZE(all_types));
hres = IHTMLDocument2_createStyleSheet(doc, NULL, -1, &stylesheet);
ok(hres == S_OK, "createStyleSheet failed: %08x\n", hres);
- test_doc_all(doc, all_types2, sizeof(all_types2)/sizeof(*all_types2));
+ test_doc_all(doc, all_types2, ARRAY_SIZE(all_types2));
doc_elem = get_doc_elem(doc);
@@ -9773,7 +9772,7 @@ static void test_indent(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_all(doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0]));
+ test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types));
IHTMLElementCollection_Release(col);
range = test_create_body_range(doc);
@@ -9782,7 +9781,7 @@ static void test_indent(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_all(doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, indent_types, sizeof(indent_types)/sizeof(indent_types[0]));
+ test_elem_collection((IUnknown*)col, indent_types, ARRAY_SIZE(indent_types));
IHTMLElementCollection_Release(col);
}
@@ -9801,7 +9800,7 @@ static void test_cond_comment(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_all(doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0]));
+ test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types));
IHTMLElementCollection_Release(col);
}
@@ -10116,7 +10115,7 @@ static void test_docfrag(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_all(doc, &col);
ok(hres == S_OK, "get_all failed: %08x\n", hres);
- test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0]));
+ test_elem_collection((IUnknown*)col, all_types, ARRAY_SIZE(all_types));
IHTMLElementCollection_Release(col);
div = test_create_elem(frag, "div");
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index a03d0105a9..1f40fed4e7 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -6456,7 +6456,7 @@ static void test_MSHTML_QueryStatus(IHTMLDocument2 *doc, DWORD cmdf)
static void test_OleCommandTarget(IHTMLDocument2 *doc)
{
IOleCommandTarget *cmdtrg;
- OLECMD cmds[sizeof(expect_cmds)/sizeof(*expect_cmds)-1];
+ OLECMD cmds[ARRAY_SIZE(expect_cmds)-1];
int i;
HRESULT hres;
@@ -6465,19 +6465,19 @@ static void test_OleCommandTarget(IHTMLDocument2 *doc)
if(FAILED(hres))
return;
- for(i=0; i < sizeof(cmds)/sizeof(*cmds); i++) {
+ for(i=0; i < ARRAY_SIZE(cmds); i++) {
cmds[i].cmdID = i+1;
cmds[i].cmdf = 0xf0f0;
}
SET_EXPECT(QueryStatus_OPEN);
SET_EXPECT(QueryStatus_NEW);
- hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, sizeof(cmds)/sizeof(cmds[0]), cmds, NULL);
+ hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, ARRAY_SIZE(cmds), cmds, NULL);
ok(hres == S_OK, "QueryStatus failed: %08x\n", hres);
CHECK_CALLED(QueryStatus_OPEN);
CHECK_CALLED(QueryStatus_NEW);
- for(i=0; i < sizeof(cmds)/sizeof(*cmds); i++) {
+ for(i=0; i < ARRAY_SIZE(cmds); i++) {
ok(cmds[i].cmdID == i+1, "cmds[%d].cmdID canged to %x\n", i, cmds[i].cmdID);
if(i+1 == OLECMDID_FIND)
continue;
@@ -7332,7 +7332,7 @@ static void test_enum_objects(IOleContainer *container)
ok(enum_unknown != NULL, "enum_unknown == NULL\n");
fetched = 0xdeadbeef;
- hres = IEnumUnknown_Next(enum_unknown, sizeof(buf)/sizeof(*buf), buf, &fetched);
+ hres = IEnumUnknown_Next(enum_unknown, ARRAY_SIZE(buf), buf, &fetched);
ok(hres == S_FALSE, "Next returned %08x\n", hres);
ok(!fetched, "fetched = %d\n", fetched);
ok(buf[0] == (void*)0xdeadbeef, "buf[0] = %p\n", buf[0]);
@@ -7764,7 +7764,7 @@ static void test_cookies(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_cookie(doc, &str);
ok(hres == S_OK, "get_cookie failed: %08x\n", hres);
if(str) {
- size = sizeof(buf)/sizeof(WCHAR);
+ size = ARRAY_SIZE(buf);
b = InternetGetCookieW(http_urlW, NULL, buf, &size);
ok(b, "InternetGetCookieW failed: %08x\n", GetLastError());
ok(!lstrcmpW(buf, str), "cookie = %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(buf));
@@ -7779,7 +7779,7 @@ static void test_cookies(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_cookie(doc, &str2);
ok(hres == S_OK, "get_cookie failed: %08x\n", hres);
ok(str2 != NULL, "cookie = NULL\n");
- size = sizeof(buf)/sizeof(WCHAR);
+ size = ARRAY_SIZE(buf);
b = InternetGetCookieW(http_urlW, NULL, buf, &size);
ok(b, "InternetGetCookieW failed: %08x\n", GetLastError());
ok(!lstrcmpW(buf, str2), "cookie = %s, expected %s\n", wine_dbgstr_w(str2), wine_dbgstr_w(buf));
@@ -7796,7 +7796,7 @@ static void test_cookies(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_cookie(doc, &str2);
ok(hres == S_OK, "get_cookie failed: %08x\n", hres);
ok(str2 != NULL, "cookie = NULL\n");
- size = sizeof(buf)/sizeof(WCHAR);
+ size = ARRAY_SIZE(buf);
b = InternetGetCookieW(http_urlW, NULL, buf, &size);
ok(b, "InternetGetCookieW failed: %08x\n", GetLastError());
ok(!lstrcmpW(buf, str2), "cookie = %s, expected %s\n", wine_dbgstr_w(str2), wine_dbgstr_w(buf));
diff --git a/dlls/mshtml/tests/htmllocation.c b/dlls/mshtml/tests/htmllocation.c
index 458960a8d3..4781de9681 100644
--- a/dlls/mshtml/tests/htmllocation.c
+++ b/dlls/mshtml/tests/htmllocation.c
@@ -300,7 +300,7 @@ static void perform_test(const struct location_test* test)
if(FAILED(hres))
return;
- MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, sizeof(url)/sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, ARRAY_SIZE(url));
hres = CreateURLMoniker(NULL, url, &url_mon);
ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08x\n", test->name, hres);
if(FAILED(hres)){
@@ -381,7 +381,7 @@ START_TEST(htmllocation)
CoInitialize(NULL);
- for(i=0; i < sizeof(location_tests)/sizeof(*location_tests); i++)
+ for(i=0; i < ARRAY_SIZE(location_tests); i++)
perform_test(location_tests+i);
CoUninitialize();
diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c
index 62bda5c75f..80e356344d 100644
--- a/dlls/mshtml/tests/protocol.c
+++ b/dlls/mshtml/tests/protocol.c
@@ -271,7 +271,7 @@ static void test_res_url(const char *url_suffix)
HRESULT hres;
memcpy(url, res_url_base, res_url_base_len*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, url_suffix, -1, url+res_url_base_len, sizeof(url)/sizeof(WCHAR)-res_url_base_len);
+ MultiByteToWideChar(CP_ACP, 0, url_suffix, -1, url+res_url_base_len, ARRAY_SIZE(url)-res_url_base_len);
hres = CoCreateInstance(&CLSID_ResProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not create ResProtocol instance: %08x\n", hres);
@@ -296,13 +296,13 @@ static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
static const WCHAR fileW[] = {'f','i','l','e',':','/','/'};
- if(size < sizeof(fileW)/sizeof(WCHAR) || memcmp(url, fileW, sizeof(fileW))) {
+ if(size < ARRAY_SIZE(fileW) || memcmp(url, fileW, sizeof(fileW))) {
ok(0, "wrong URL protocol\n");
return;
}
SetLastError(0xdeadbeef);
- len = SearchPathW(NULL, file, NULL, sizeof(buf)/sizeof(WCHAR), buf, NULL);
+ len = SearchPathW(NULL, file, NULL, ARRAY_SIZE(buf), buf, NULL);
if(!len) {
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
win_skip("SearchPathW is not implemented\n");
@@ -311,9 +311,9 @@ static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file)
return;
}
- len += sizeof(fileW)/sizeof(WCHAR)+1;
+ len += ARRAY_SIZE(fileW)+1;
ok(len == size, "wrong size %u, expected %u\n", size, len);
- ok(!lstrcmpW(url + sizeof(fileW)/sizeof(WCHAR), buf), "wrong file part %s\n", wine_dbgstr_w(url));
+ ok(!lstrcmpW(url + ARRAY_SIZE(fileW), buf), "wrong file part %s\n", wine_dbgstr_w(url));
}
static void test_res_protocol(void)
@@ -355,14 +355,14 @@ static void test_res_protocol(void)
for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) {
if(i != PARSE_SECURITY_URL && i != PARSE_DOMAIN) {
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, i, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
res_sec_url_cmp(buf, size, mshtml_dllW);
ok(size == lstrlenW(buf)+1, "size = %d\n", size);
@@ -381,36 +381,32 @@ static void test_res_protocol(void)
ok(size == expected_size, "size = %d\n", size);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_SECURITY_URL, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX || hres == E_INVALIDARG,
"ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url5, PARSE_SECURITY_URL, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url6, PARSE_SECURITY_URL, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres);
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
- ok(size == sizeof(blank_url)/sizeof(WCHAR) ||
- size == sizeof(buf)/sizeof(buf[0]), /* IE8 */
- "size=%d\n", size);
+ ok(size == ARRAY_SIZE(blank_url) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%d\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
- ok(size == sizeof(wrong_url1)/sizeof(WCHAR) ||
- size == sizeof(buf)/sizeof(buf[0]), /* IE8 */
- "size=%d\n", size);
+ ok(size == ARRAY_SIZE(wrong_url1) || size == ARRAY_SIZE(buf), /* IE8 */ "size=%d\n", size);
if (0)
{
@@ -418,40 +414,40 @@ static void test_res_protocol(void)
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == 1, "size=%u, expected 1\n", size);
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), NULL, 0);
+ ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), NULL, 0);
+ ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
}
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_UNESCAPE+1, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
ok(buf[0] == '?', "buf changed\n");
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url,
- 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0);
+ 0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url,
- URL_FILE_USE_PATHURL, buf, sizeof(buf)/sizeof(buf[0]), &size, 0);
+ URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
@@ -693,14 +689,14 @@ static void test_about_protocol(void)
for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) {
if(i != PARSE_SECURITY_URL && i != PARSE_DOMAIN) {
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, i, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(!lstrcmpW(about_blank_url, buf), "buf != blank_url\n");
@@ -711,7 +707,7 @@ static void test_about_protocol(void)
ok(size == 12, "size = %d\n", size);
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_test_url, PARSE_SECURITY_URL, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK, "ParseUrl failed: %08x\n", hres);
ok(!lstrcmpW(about_test_url, buf), "buf != test_url\n");
ok(size == 11, "size = %d\n", size);
@@ -719,13 +715,12 @@ static void test_about_protocol(void)
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?' || buf[0] == '\0' /* Win10 */,
"Expected buf to be unchanged or empty, got %s\n",
wine_dbgstr_w(buf));
- ok(size == sizeof(about_blank_url)/sizeof(WCHAR) ||
- size == sizeof(buf)/sizeof(buf[0]), /* IE8 */
+ ok(size == ARRAY_SIZE(about_blank_url) || size == ARRAY_SIZE(buf), /* IE8 */
"size=%d\n", size);
if (0)
@@ -734,44 +729,44 @@ static void test_about_protocol(void)
size = 0xdeadbeef;
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
ok(size == 1, "size=%u, expected 1\n", size);
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), NULL, 0);
+ ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
buf[0] = '?';
hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf,
- sizeof(buf)/sizeof(buf[0]), NULL, 0);
+ ARRAY_SIZE(buf), NULL, 0);
ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres);
ok(buf[0] == '?', "buf changed\n");
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_UNESCAPE+1, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url,
- 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0);
+ 0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url,
- URL_FILE_USE_PATHURL, buf, sizeof(buf)/sizeof(buf[0]), &size, 0);
+ URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL,
- URL_FILE_USE_PATHURL, buf, sizeof(buf)/sizeof(buf[0]), &size, 0);
+ URL_FILE_USE_PATHURL, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
@@ -870,20 +865,20 @@ static void test_javascript_protocol(void)
for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) {
if(i != PARSE_SECURITY_URL && i != PARSE_DOMAIN) {
hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, i, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, PARSE_UNESCAPE+1, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres);
size = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, javascript_test_url, javascript_test_url,
- 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0);
+ 0, buf, ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres);
ok(size == 0xdeadbeef, "size=%d\n", size);
@@ -1007,7 +1002,8 @@ static void test_com_aggregation(const CLSID *clsid)
START_TEST(protocol)
{
- res_url_base_len = 6 + GetModuleFileNameW(NULL, res_url_base + 6 /* strlen("res://") */, sizeof(res_url_base)/sizeof(WCHAR)-6);
+ res_url_base_len = 6 + GetModuleFileNameW(NULL, res_url_base + 6 /* strlen("res://") */,
+ ARRAY_SIZE(res_url_base)-6);
OleInitialize(NULL);
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index 3decb8690b..2e13f9b236 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -3378,9 +3378,9 @@ static void run_js_script(const char *test_name)
trace("running %s...\n", test_name);
ptr = url + lstrlenW(url);
- ptr += GetModuleFileNameW(NULL, ptr, url + sizeof(url)/sizeof(WCHAR) - ptr);
+ ptr += GetModuleFileNameW(NULL, ptr, url + ARRAY_SIZE(url) - ptr);
*ptr++ = '/';
- MultiByteToWideChar(CP_ACP, 0, test_name, -1, ptr, url + sizeof(url)/sizeof(WCHAR) - ptr);
+ MultiByteToWideChar(CP_ACP, 0, test_name, -1, ptr, url + ARRAY_SIZE(url) - ptr);
hres = CreateURLMoniker(NULL, url, &mon);
ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
diff --git a/dlls/mshtml/tests/xmlhttprequest.c b/dlls/mshtml/tests/xmlhttprequest.c
index 733987fce0..2be817914d 100644
--- a/dlls/mshtml/tests/xmlhttprequest.c
+++ b/dlls/mshtml/tests/xmlhttprequest.c
@@ -747,7 +747,7 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const char *xml_url, const char *
SysFreeString(text);
if(expect_text)
- test_header(expect_headers, sizeof(expect_headers)/sizeof(expect_headers[0]));
+ test_header(expect_headers, ARRAY_SIZE(expect_headers));
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
@@ -905,7 +905,7 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url, const char
SysFreeString(text);
if(expect_text)
- test_header(expect_headers, sizeof(expect_headers)/sizeof(expect_headers[0]));
+ test_header(expect_headers, ARRAY_SIZE(expect_headers));
val = 0xdeadbeef;
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
--
2.14.4
June 7, 2018
[PATCH] dinput/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dinput/tests/device.c | 4 ++--
dlls/dinput/tests/dinput.c | 20 ++++++++++----------
dlls/dinput/tests/joystick.c | 8 +++-----
dlls/dinput/tests/keyboard.c | 10 +++++-----
4 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/dlls/dinput/tests/device.c b/dlls/dinput/tests/device.c
index 74940248ff..fa9b6f1436 100644
--- a/dlls/dinput/tests/device.c
+++ b/dlls/dinput/tests/device.c
@@ -51,7 +51,7 @@ static const DIDATAFORMAT data_format = {
sizeof(DIOBJECTDATAFORMAT),
DIDF_ABSAXIS,
32,
- sizeof(obj_data_format) / sizeof(obj_data_format[0]),
+ ARRAY_SIZE(obj_data_format),
(LPDIOBJECTDATAFORMAT)obj_data_format
};
@@ -94,7 +94,7 @@ static void test_object_info(IDirectInputDeviceA *device, HWND hwnd)
ok(cnt == cnt1, "Enum count changed from %d to %d\n", cnt, cnt1);
/* Testing EnumObjects with different types of device objects */
- for (type_index=0; type_index < sizeof(obj_types)/sizeof(obj_types[0]); type_index++)
+ for (type_index=0; type_index < ARRAY_SIZE(obj_types); type_index++)
{
hr = IDirectInputDevice_EnumObjects(device, enum_type_callback, &obj_types[type_index], obj_types[type_index]);
ok(SUCCEEDED(hr), "EnumObjects() failed: %08x\n", hr);
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c
index a5f7c0cfce..7e2da9ff32 100644
--- a/dlls/dinput/tests/dinput.c
+++ b/dlls/dinput/tests/dinput.c
@@ -106,7 +106,7 @@ static void test_preinitialization(void)
return;
}
- for (i = 0; i < sizeof(create_device_tests)/sizeof(create_device_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(create_device_tests); i++)
{
if (create_device_tests[i].pdev) pDID = (void *)0xdeadbeef;
hr = IDirectInput_CreateDevice(pDI, create_device_tests[i].rguid,
@@ -117,7 +117,7 @@ static void test_preinitialization(void)
ok(pDID == NULL, "[%d] Output interface pointer is %p\n", i, pDID);
}
- for (i = 0; i < sizeof(enum_devices_tests)/sizeof(enum_devices_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(enum_devices_tests); i++)
{
hr = IDirectInput_EnumDevices(pDI, enum_devices_tests[i].dwDevType,
enum_devices_tests[i].lpCallback,
@@ -217,7 +217,7 @@ static void test_DirectInputCreateEx(void)
return;
}
- for (i = 0; i < sizeof(invalid_param_list)/sizeof(invalid_param_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(invalid_param_list); i++)
{
if (invalid_param_list[i].ppdi) pUnk = (void *)0xdeadbeef;
hr = pDirectInputCreateEx(invalid_param_list[i].hinst ? hInstance : NULL,
@@ -230,7 +230,7 @@ static void test_DirectInputCreateEx(void)
ok(pUnk == invalid_param_list[i].expected_ppdi, "[%d] Output interface pointer is %p\n", i, pUnk);
}
- for (i = 0; i < sizeof(no_interface_list)/sizeof(no_interface_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(no_interface_list); i++)
{
pUnk = (void *)0xdeadbeef;
hr = pDirectInputCreateEx(hInstance, DIRECTINPUT_VERSION, no_interface_list[i], (void **)&pUnk, NULL);
@@ -238,7 +238,7 @@ static void test_DirectInputCreateEx(void)
ok(pUnk == (void *)0xdeadbeef, "[%d] Output interface pointer is %p\n", i, pUnk);
}
- for (i = 0; i < sizeof(iid_list)/sizeof(iid_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iid_list); i++)
{
pUnk = NULL;
hr = pDirectInputCreateEx(hInstance, DIRECTINPUT_VERSION, iid_list[i], (void **)&pUnk, NULL);
@@ -249,9 +249,9 @@ static void test_DirectInputCreateEx(void)
}
/* Examine combinations of requested interfaces and version numbers. */
- for (i = 0; i < sizeof(directinput_version_list)/sizeof(directinput_version_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(directinput_version_list); i++)
{
- for (j = 0; j < sizeof(iid_list)/sizeof(iid_list[0]); j++)
+ for (j = 0; j < ARRAY_SIZE(iid_list); j++)
{
pUnk = NULL;
hr = pDirectInputCreateEx(hInstance, directinput_version_list[i], iid_list[j], (void **)&pUnk, NULL);
@@ -311,7 +311,7 @@ static void test_QueryInterface(void)
hr = IDirectInput_QueryInterface(pDI, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "IDirectInput_QueryInterface returned 0x%08x\n", hr);
- for (i = 0; i < sizeof(iid_list)/sizeof(iid_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iid_list); i++)
{
pUnk = NULL;
hr = IDirectInput_QueryInterface(pDI, iid_list[i], (void **)&pUnk);
@@ -320,7 +320,7 @@ static void test_QueryInterface(void)
if (pUnk) IUnknown_Release(pUnk);
}
- for (i = 0; i < sizeof(no_interface_list)/sizeof(no_interface_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(no_interface_list); i++)
{
pUnk = (void *)0xdeadbeef;
hr = IDirectInput_QueryInterface(pDI, no_interface_list[i].riid, (void **)&pUnk);
@@ -512,7 +512,7 @@ static void test_Initialize(void)
hr = IDirectInput_Initialize(pDI, hInstance, 0xcafe);
ok(hr == DIERR_OLDDIRECTINPUTVERSION, "IDirectInput_Initialize returned 0x%08x\n", hr);
- for (i = 0; i < sizeof(directinput_version_list)/sizeof(directinput_version_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(directinput_version_list); i++)
{
hr = IDirectInput_Initialize(pDI, hInstance, directinput_version_list[i]);
ok(hr == DI_OK, "IDirectInput_Initialize returned 0x%08x\n", hr);
diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c
index b4ffba5c5d..69e95d0c2d 100644
--- a/dlls/dinput/tests/joystick.c
+++ b/dlls/dinput/tests/joystick.c
@@ -30,8 +30,6 @@
#include "wingdi.h"
#include "dinput.h"
-#define numObjects(x) (sizeof(x) / sizeof(x[0]))
-
typedef struct tagUserData {
IDirectInputA *pDI;
DWORD version;
@@ -62,7 +60,7 @@ static const DIDATAFORMAT c_dfDIJoystickTest = {
sizeof(DIOBJECTDATAFORMAT),
DIDF_ABSAXIS,
sizeof(DIJOYSTATE2),
- numObjects(dfDIJoystickTest),
+ ARRAY_SIZE(dfDIJoystickTest),
(LPDIOBJECTDATAFORMAT)dfDIJoystickTest
};
@@ -178,7 +176,7 @@ static const struct effect_id
static const struct effect_id* effect_from_guid(const GUID *guid)
{
unsigned int i;
- for (i = 0; i < sizeof(effect_conversion) / sizeof(effect_conversion[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(effect_conversion); i++)
if (IsEqualGUID(guid, effect_conversion[i].guid))
return &effect_conversion[i];
return NULL;
@@ -504,7 +502,7 @@ static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef)
effect_data.eff.dwDuration = INFINITE;
effect_data.eff.dwGain = DI_FFNOMINALMAX;
effect_data.eff.dwTriggerButton = DIEB_NOTRIGGER;
- effect_data.eff.cAxes = sizeof(axes) / sizeof(axes[0]);
+ effect_data.eff.cAxes = ARRAY_SIZE(axes);
effect_data.eff.rgdwAxes = axes;
effect_data.eff.rglDirection = direction;
diff --git a/dlls/dinput/tests/keyboard.c b/dlls/dinput/tests/keyboard.c
index 576a94cc7d..59411cbfa5 100644
--- a/dlls/dinput/tests/keyboard.c
+++ b/dlls/dinput/tests/keyboard.c
@@ -101,7 +101,7 @@ static void acquire_tests(IDirectInputA *pDI, HWND hwnd)
df.dwObjSize = sizeof( DIOBJECTDATAFORMAT );
df.dwFlags = DIDF_RELAXIS;
df.dwDataSize = sizeof( custom_state );
- df.dwNumObjs = sizeof( dodf )/sizeof( dodf[0] );
+ df.dwNumObjs = ARRAY_SIZE(dodf);
df.rgodf = dodf;
hr = IDirectInput_CreateDevice(pDI, &GUID_SysKeyboard, &pKeyboard, NULL);
@@ -139,7 +139,7 @@ static void acquire_tests(IDirectInputA *pDI, HWND hwnd)
memset(custom_state, 0x56, sizeof(custom_state));
IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state);
- for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(custom_state); i++)
ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n", custom_state[i]);
/* simulate some keyboard input */
@@ -160,7 +160,7 @@ static void acquire_tests(IDirectInputA *pDI, HWND hwnd)
ok(SUCCEEDED(hr), "IDirectInputDevice_Acquire() failed: %08x\n", hr);
hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state);
ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState failed: %08x\n", hr);
- for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(custom_state); i++)
ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n", custom_state[i]);
}
keybd_event('Q', 0, KEYEVENTF_KEYUP, 0);
@@ -316,7 +316,7 @@ static void test_dik_codes(IDirectInputA *dI, HWND hwnd, LANGID langid)
HKL hkl, hkl_orig;
MSG msg;
- for (i = 0; i < sizeof(expected)/sizeof(expected[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(expected); i++)
{
if (expected[i].langid == langid)
{
@@ -340,7 +340,7 @@ static void test_dik_codes(IDirectInputA *dI, HWND hwnd, LANGID langid)
SetFocus(hwnd);
pump_messages();
- for (i = 0; i < sizeof(key2dik_en)/sizeof(key2dik_en[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(key2dik_en); i++)
{
BYTE kbd_state[256];
UINT n;
--
2.14.4
June 7, 2018
[PATCH] dinput8/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dinput8/tests/device.c | 12 ++++++------
dlls/dinput8/tests/dinput.c | 18 +++++++++---------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 2b06f624c2..aaeddd9b7b 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -317,8 +317,8 @@ static void test_action_mapping(void)
memset (&af, 0, sizeof(af));
af.dwSize = sizeof(af);
af.dwActionSize = sizeof(DIACTIONA);
- af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]);
- af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+ af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
+ af.dwNumActions = ARRAY_SIZE(actionMapping);
af.rgoAction = actionMapping;
af.guidActionMap = ACTION_MAPPING_GUID;
af.dwGenre = 0x01000000; /* DIVIRTUAL_DRIVING_RACE */
@@ -357,8 +357,8 @@ static void test_action_mapping(void)
hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%08x\n", hr);
- af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]);
- af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+ af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
+ af.dwNumActions = ARRAY_SIZE(actionMapping);
/* test DIDSAM_NOUSER */
dps.diph.dwSize = sizeof(dps);
@@ -448,8 +448,8 @@ static void test_save_settings(void)
memset (&af, 0, sizeof(af));
af.dwSize = sizeof(af);
af.dwActionSize = sizeof(DIACTIONA);
- af.dwDataSize = 4 * sizeof(actions) / sizeof(actions[0]);
- af.dwNumActions = sizeof(actions) / sizeof(actions[0]);
+ af.dwDataSize = 4 * ARRAY_SIZE(actions);
+ af.dwNumActions = ARRAY_SIZE(actions);
af.rgoAction = actions;
af.guidActionMap = mapping_guid;
af.dwGenre = 0x01000000; /* DIVIRTUAL_DRIVING_RACE */
diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput8/tests/dinput.c
index e16542ab13..b093437096 100644
--- a/dlls/dinput8/tests/dinput.c
+++ b/dlls/dinput8/tests/dinput.c
@@ -82,7 +82,7 @@ static void test_preinitialization(void)
return;
}
- for (i = 0; i < sizeof(create_device_tests)/sizeof(create_device_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(create_device_tests); i++)
{
if (create_device_tests[i].pdev) pDID = (void *)0xdeadbeef;
hr = IDirectInput8_CreateDevice(pDI, create_device_tests[i].rguid,
@@ -93,7 +93,7 @@ static void test_preinitialization(void)
ok(pDID == NULL, "[%d] Output interface pointer is %p\n", i, pDID);
}
- for (i = 0; i < sizeof(enum_devices_tests)/sizeof(enum_devices_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(enum_devices_tests); i++)
{
hr = IDirectInput8_EnumDevices(pDI, enum_devices_tests[i].dwDevType,
enum_devices_tests[i].lpCallback,
@@ -186,7 +186,7 @@ static void test_DirectInput8Create(void)
IUnknown *pUnk;
HRESULT hr;
- for (i = 0; i < sizeof(invalid_param_list)/sizeof(invalid_param_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(invalid_param_list); i++)
{
if (invalid_param_list[i].ppdi) pUnk = (void *)0xdeadbeef;
hr = DirectInput8Create(invalid_param_list[i].hinst ? hInstance : NULL,
@@ -199,7 +199,7 @@ static void test_DirectInput8Create(void)
ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
}
- for (i = 0; i < sizeof(no_interface_list)/sizeof(no_interface_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(no_interface_list); i++)
{
pUnk = (void *)0xdeadbeef;
hr = DirectInput8Create(hInstance, DIRECTINPUT_VERSION, no_interface_list[i], (void **)&pUnk, NULL);
@@ -207,7 +207,7 @@ static void test_DirectInput8Create(void)
ok(pUnk == NULL, "[%d] Output interface pointer is %p\n", i, pUnk);
}
- for (i = 0; i < sizeof(iid_list)/sizeof(iid_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iid_list); i++)
{
pUnk = NULL;
hr = DirectInput8Create(hInstance, DIRECTINPUT_VERSION, iid_list[i], (void **)&pUnk, NULL);
@@ -268,7 +268,7 @@ static void test_QueryInterface(void)
hr = IDirectInput8_QueryInterface(pDI, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "IDirectInput8_QueryInterface returned 0x%08x\n", hr);
- for (i = 0; i < sizeof(iid_list)/sizeof(iid_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(iid_list); i++)
{
pUnk = NULL;
hr = IDirectInput8_QueryInterface(pDI, iid_list[i], (void **)&pUnk);
@@ -277,7 +277,7 @@ static void test_QueryInterface(void)
if (pUnk)
{
int j;
- for (j = 0; j < sizeof(iid_list)/sizeof(iid_list[0]); j++)
+ for (j = 0; j < ARRAY_SIZE(iid_list); j++)
{
IUnknown *pUnk1 = NULL;
hr = IDirectInput8_QueryInterface(pUnk, iid_list[j], (void **)&pUnk1);
@@ -289,7 +289,7 @@ static void test_QueryInterface(void)
}
}
- for (i = 0; i < sizeof(no_interface_list)/sizeof(no_interface_list[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(no_interface_list); i++)
{
pUnk = (void *)0xdeadbeef;
hr = IDirectInput8_QueryInterface(pDI, no_interface_list[i].riid, (void **)&pUnk);
@@ -527,7 +527,7 @@ static void test_EnumDevicesBySemantics(void)
memset (&diaf, 0, sizeof(diaf));
diaf.dwSize = sizeof(diaf);
diaf.dwActionSize = sizeof(DIACTIONA);
- diaf.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+ diaf.dwNumActions = ARRAY_SIZE(actionMapping);
diaf.dwDataSize = 4 * diaf.dwNumActions;
diaf.rgoAction = actionMapping;
diaf.guidActionMap = ACTION_MAPPING_GUID;
--
2.14.4
June 7, 2018
[PATCH] ieframe/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ieframe/tests/intshcut.c | 2 +-
dlls/ieframe/tests/webbrowser.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ieframe/tests/intshcut.c b/dlls/ieframe/tests/intshcut.c
index 0959a61880..803e7ec60e 100644
--- a/dlls/ieframe/tests/intshcut.c
+++ b/dlls/ieframe/tests/intshcut.c
@@ -331,7 +331,7 @@ static void test_Load(void)
GetTempPathW(MAX_PATH, file_path);
lstrcatW(file_path, test_urlW);
- for(test = load_tests; test < load_tests + sizeof(load_tests)/sizeof(*load_tests); test++) {
+ for(test = load_tests; test < load_tests + ARRAY_SIZE(load_tests); test++) {
IPropertySetStorage *propsetstorage;
IPropertyStorage *propstorage;
PROPVARIANT v;
diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c
index ca2a13162b..706d5071a9 100644
--- a/dlls/ieframe/tests/webbrowser.c
+++ b/dlls/ieframe/tests/webbrowser.c
@@ -2167,7 +2167,7 @@ static void test_EnumVerbs(IWebBrowser2 *wb)
fetched = 0xdeadbeef;
memset(verbs, 0xa, sizeof(verbs));
verbs[1].lVerb = 0xdeadbeef;
- hres = IEnumOLEVERB_Next(enum_verbs, sizeof(verbs)/sizeof(*verbs), verbs, &fetched);
+ hres = IEnumOLEVERB_Next(enum_verbs, ARRAY_SIZE(verbs), verbs, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(!fetched, "fetched = %d\n", fetched);
/* Although fetched==0, an element is returned. */
@@ -2184,12 +2184,12 @@ static void test_EnumVerbs(IWebBrowser2 *wb)
fetched = 0xdeadbeef;
memset(verbs, 0xa, sizeof(verbs));
verbs[0].lVerb = 0xdeadbeef;
- hres = IEnumOLEVERB_Next(enum_verbs, sizeof(verbs)/sizeof(*verbs), verbs, &fetched);
+ hres = IEnumOLEVERB_Next(enum_verbs, ARRAY_SIZE(verbs), verbs, &fetched);
todo_wine ok(hres == S_OK, "Next failed: %08x\n", hres);
todo_wine ok(fetched == 1, "fetched = %d\n", fetched);
todo_wine ok(verbs[0].lVerb != 0xdeadbeef, "verbs[0].lVerb = %x\n", verbs[0].lVerb);
- hres = IEnumOLEVERB_Next(enum_verbs, sizeof(verbs)/sizeof(*verbs), verbs, &fetched);
+ hres = IEnumOLEVERB_Next(enum_verbs, ARRAY_SIZE(verbs), verbs, &fetched);
ok(hres == S_FALSE, "Next failed: %08x\n", hres);
ok(!fetched, "fetched = %d\n", fetched);
--
2.14.4
June 7, 2018
[PATCH] gdiplus/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/gdiplus/tests/graphics.c | 10 +++----
dlls/gdiplus/tests/graphicspath.c | 58 +++++++++++++++++++--------------------
dlls/gdiplus/tests/image.c | 40 +++++++++++++--------------
3 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 6acc656c8f..ae75c0efc1 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -3721,7 +3721,7 @@ static void test_GdipMeasureString(void)
expect(Ok, status);
expect(UnitPixel, font_unit);
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
GpImage *image;
@@ -3799,7 +3799,7 @@ todo_wine
expect(Ok, status);
expect(unit, font_unit);
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
REAL unit_scale;
GpImage *image;
@@ -3883,7 +3883,7 @@ todo_wine
}
/* Font with units = UnitWorld */
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
GpPointF pt = {0.0, 100.0};
GpImage* image;
@@ -3972,7 +3972,7 @@ static void test_transform(void)
GpPointF ptf[2];
UINT i;
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
graphics = create_graphics(td[i].res_x, td[i].res_y, td[i].unit, td[i].scale, &image);
ptf[0].X = td[i].in[0].X;
@@ -4032,7 +4032,7 @@ static void test_pen_thickness(void)
BitmapData bd;
INT min, max, size;
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
status = GdipCreateBitmapFromScan0(100, 100, 0, PixelFormat24bppRGB, NULL, &u.bitmap);
expect(Ok, status);
diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c
index c5403cbe0e..096fbc600a 100644
--- a/dlls/gdiplus/tests/graphicspath.c
+++ b/dlls/gdiplus/tests/graphicspath.c
@@ -207,7 +207,7 @@ static void test_line2(void)
status = GdipAddPathLine2(path, &(line2_points[6]), 3);
expect(Ok, status);
- ok_path(path, line2_path, sizeof(line2_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, line2_path, ARRAY_SIZE(line2_path), FALSE);
GdipDeletePath(path);
}
@@ -278,7 +278,7 @@ static void test_arc(void)
status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, 0.0);
expect(Ok, status);
- ok_path(path, arc_path, sizeof(arc_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, arc_path, ARRAY_SIZE(arc_path), FALSE);
GdipDeletePath(path);
}
@@ -458,7 +458,7 @@ static void test_pathpath(void)
status = GdipAddPathPath(path1, path2, TRUE);
expect(Ok, status);
- ok_path(path1, pathpath_path, sizeof(pathpath_path)/sizeof(path_test_t), FALSE);
+ ok_path(path1, pathpath_path, ARRAY_SIZE(pathpath_path), FALSE);
GdipDeletePath(path1);
GdipDeletePath(path2);
@@ -529,7 +529,7 @@ static void test_ellipse(void)
status = GdipAddPathEllipse(path, 10.0, 300.0, 0.0, 1.0);
expect(Ok, status);
- ok_path(path, ellipse_path, sizeof(ellipse_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, ellipse_path, ARRAY_SIZE(ellipse_path), FALSE);
GdipDeletePath(path);
}
@@ -565,7 +565,7 @@ static void test_linei(void)
status = GdipAddPathLineI(path, 35.0, 35.0, 36.0, 38.0);
expect(Ok, status);
- ok_path(path, linei_path, sizeof(linei_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, linei_path, ARRAY_SIZE(linei_path), FALSE);
GdipDeletePath(path);
}
@@ -614,7 +614,7 @@ static void test_polygon(void)
status = GdipAddPathPolygon(path, points, 5);
expect(Ok, status);
/* check resulting path */
- ok_path(path, poly_path, sizeof(poly_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, poly_path, ARRAY_SIZE(poly_path), FALSE);
GdipDeletePath(path);
}
@@ -643,7 +643,7 @@ static void test_rect(void)
status = GdipAddPathRectangle(path, 100.0, 50.0, 120.0, 30.0);
expect(Ok, status);
- ok_path(path, rect_path, sizeof(rect_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, rect_path, ARRAY_SIZE(rect_path), FALSE);
GdipDeletePath(path);
@@ -661,7 +661,7 @@ static void test_rect(void)
status = GdipAddPathRectangles(path, (GDIPCONST GpRectF*)&rects, 2);
expect(Ok, status);
- ok_path(path, rect_path, sizeof(rect_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, rect_path, ARRAY_SIZE(rect_path), FALSE);
GdipDeletePath(path);
}
@@ -756,7 +756,7 @@ static void test_addcurve(void)
/* add to empty path */
status = GdipAddPathCurve2(path, points, 4, 1.0);
expect(Ok, status);
- ok_path(path, addcurve_path, sizeof(addcurve_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, addcurve_path, ARRAY_SIZE(addcurve_path), FALSE);
GdipDeletePath(path);
/* add to notempty path and opened figure */
@@ -764,7 +764,7 @@ static void test_addcurve(void)
GdipAddPathLine(path, 100.0, 120.0, 123.0, 10.0);
status = GdipAddPathCurve2(path, points, 4, 1.0);
expect(Ok, status);
- ok_path(path, addcurve_path2, sizeof(addcurve_path2)/sizeof(path_test_t), FALSE);
+ ok_path(path, addcurve_path2, ARRAY_SIZE(addcurve_path2), FALSE);
/* NULL args */
GdipResetPath(path);
@@ -789,12 +789,12 @@ static void test_addcurve(void)
/* use all points */
status = GdipAddPathCurve3(path, points, 4, 0, 3, 1.0);
expect(Ok, status);
- ok_path(path, addcurve_path, sizeof(addcurve_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, addcurve_path, ARRAY_SIZE(addcurve_path), FALSE);
GdipResetPath(path);
status = GdipAddPathCurve3(path, points, 4, 1, 2, 1.0);
expect(Ok, status);
- ok_path(path, addcurve_path3, sizeof(addcurve_path3)/sizeof(path_test_t), FALSE);
+ ok_path(path, addcurve_path3, ARRAY_SIZE(addcurve_path3), FALSE);
GdipDeletePath(path);
}
@@ -844,7 +844,7 @@ static void test_addclosedcurve(void)
/* add to empty path */
status = GdipAddPathClosedCurve2(path, points, 4, 1.0);
expect(Ok, status);
- ok_path(path, addclosedcurve_path, sizeof(addclosedcurve_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, addclosedcurve_path, ARRAY_SIZE(addclosedcurve_path), FALSE);
GdipDeletePath(path);
}
@@ -886,7 +886,7 @@ static void test_reverse(void)
status = GdipReversePath(path);
expect(Ok, status);
- ok_path(path, reverse_path, sizeof(reverse_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, reverse_path, ARRAY_SIZE(reverse_path), FALSE);
GdipDeletePath(path);
}
@@ -917,21 +917,21 @@ static void test_addpie(void)
status = GdipAddPathPie(path, 0.0, 0.0, 100.0, 50.0, 10.0, 50.0);
expect(Ok, status);
- ok_path(path, addpie_path, sizeof(addpie_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, addpie_path, ARRAY_SIZE(addpie_path), FALSE);
status = GdipResetPath(path);
expect(Ok, status);
/* zero width base ellipse */
status = GdipAddPathPie(path, 0.0, 0.0, 0.0, 60.0, -90.0, 24.0);
expect(InvalidParameter, status);
- ok_path(path, addpie_path2, sizeof(addpie_path2)/sizeof(path_test_t), FALSE);
+ ok_path(path, addpie_path2, ARRAY_SIZE(addpie_path2), FALSE);
status = GdipResetPath(path);
expect(Ok, status);
/* zero height base ellipse */
status = GdipAddPathPie(path, 0.0, 0.0, 60.0, 0.0 , -90.0, 24.0);
expect(InvalidParameter, status);
- ok_path(path, addpie_path3, sizeof(addpie_path3)/sizeof(path_test_t), FALSE);
+ ok_path(path, addpie_path3, ARRAY_SIZE(addpie_path3), FALSE);
GdipDeletePath(path);
}
@@ -1020,7 +1020,7 @@ static void test_flatten(void)
status = GdipFlattenPath(path, NULL, 1.0);
expect(Ok, status);
- ok_path(path, flattenellipse_path, sizeof(flattenellipse_path)/sizeof(path_test_t), TRUE);
+ ok_path(path, flattenellipse_path, ARRAY_SIZE(flattenellipse_path), TRUE);
status = GdipResetPath(path);
expect(Ok, status);
@@ -1028,7 +1028,7 @@ static void test_flatten(void)
expect(Ok, status);
status = GdipFlattenPath(path, NULL, 1.0);
expect(Ok, status);
- ok_path(path, flattenline_path, sizeof(flattenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, flattenline_path, ARRAY_SIZE(flattenline_path), FALSE);
status = GdipResetPath(path);
expect(Ok, status);
@@ -1036,7 +1036,7 @@ static void test_flatten(void)
expect(Ok, status);
status = GdipFlattenPath(path, NULL, 1.0);
expect(Ok, status);
- ok_path(path, flattenarc_path, sizeof(flattenarc_path)/sizeof(path_test_t), TRUE);
+ ok_path(path, flattenarc_path, ARRAY_SIZE(flattenarc_path), TRUE);
/* easy case - quater of a full circle */
status = GdipResetPath(path);
@@ -1045,7 +1045,7 @@ static void test_flatten(void)
expect(Ok, status);
status = GdipFlattenPath(path, NULL, 1.0);
expect(Ok, status);
- ok_path(path, flattenquater_path, sizeof(flattenquater_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, flattenquater_path, ARRAY_SIZE(flattenquater_path), FALSE);
GdipDeleteMatrix(m);
GdipDeletePath(path);
@@ -1119,7 +1119,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_path, ARRAY_SIZE(widenline_path), FALSE);
/* horizontal 2x stretch */
status = GdipResetPath(path);
@@ -1132,7 +1132,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_path, ARRAY_SIZE(widenline_path), FALSE);
/* vertical 2x stretch */
status = GdipResetPath(path);
@@ -1145,7 +1145,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_path, ARRAY_SIZE(widenline_path), FALSE);
status = GdipScaleMatrix(m, 1.0, 0.5, MatrixOrderAppend);
expect(Ok, status);
@@ -1161,7 +1161,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_dash_path, sizeof(widenline_dash_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_dash_path, ARRAY_SIZE(widenline_dash_path), FALSE);
status = GdipSetPenDashStyle(pen, DashStyleSolid);
expect(Ok, status);
@@ -1178,7 +1178,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_path, ARRAY_SIZE(widenline_path), FALSE);
/* horizontal 2x stretch */
status = GdipResetPath(path);
@@ -1191,7 +1191,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_path, ARRAY_SIZE(widenline_path), FALSE);
/* vertical 2x stretch */
status = GdipResetPath(path);
@@ -1204,7 +1204,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_wide_path, sizeof(widenline_wide_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_wide_path, ARRAY_SIZE(widenline_wide_path), FALSE);
status = GdipScaleMatrix(m, 1.0, 0.5, MatrixOrderAppend);
expect(Ok, status);
@@ -1221,7 +1221,7 @@ static void test_widen(void)
status = GdipWidenPath(path, pen, m, 1.0);
expect(Ok, status);
- ok_path(path, widenline_path, sizeof(widenline_path)/sizeof(path_test_t), FALSE);
+ ok_path(path, widenline_path, ARRAY_SIZE(widenline_path), FALSE);
/* pen width = 0 pixels - native fails to widen but can draw with this pen */
GdipDeletePen(pen);
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 4fd2744132..88d195f6c9 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -55,10 +55,10 @@ static void expect_guid(REFGUID expected, REFGUID got, int line, BOOL todo)
char buffer[39];
char buffer2[39];
- StringFromGUID2(got, bufferW, sizeof(bufferW)/sizeof(bufferW[0]));
- WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer, sizeof(buffer), NULL, NULL);
- StringFromGUID2(expected, bufferW, sizeof(bufferW)/sizeof(bufferW[0]));
- WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer2, sizeof(buffer2), NULL, NULL);
+ StringFromGUID2(got, bufferW, ARRAY_SIZE(bufferW));
+ WideCharToMultiByte(CP_ACP, 0, bufferW, ARRAY_SIZE(bufferW), buffer, sizeof(buffer), NULL, NULL);
+ StringFromGUID2(expected, bufferW, ARRAY_SIZE(bufferW));
+ WideCharToMultiByte(CP_ACP, 0, bufferW, ARRAY_SIZE(bufferW), buffer2, sizeof(buffer2), NULL, NULL);
todo_wine_if (todo)
ok_(__FILE__, line)(IsEqualGUID(expected, got), "Expected %s, got %s\n", buffer2, buffer);
}
@@ -3311,7 +3311,7 @@ static void test_image_properties(void)
char buf[256];
} item;
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
image = load_image(td[i].image_data, td[i].image_size);
if (!image)
@@ -3629,9 +3629,9 @@ static void test_tiff_properties(void)
prop_count = 0xdeadbeef;
status = GdipGetPropertyCount(image, &prop_count);
expect(Ok, status);
- ok(prop_count == sizeof(td)/sizeof(td[0]) ||
- broken(prop_count == sizeof(td)/sizeof(td[0]) - 1) /* Win7 SP0 */,
- "expected property count %u, got %u\n", (UINT)(sizeof(td)/sizeof(td[0])), prop_count);
+ ok(prop_count == ARRAY_SIZE(td) ||
+ broken(prop_count == ARRAY_SIZE(td) - 1) /* Win7 SP0 */,
+ "expected property count %u, got %u\n", (UINT) ARRAY_SIZE(td), prop_count);
prop_id = HeapAlloc(GetProcessHeap(), 0, prop_count * sizeof(*prop_id));
@@ -3739,8 +3739,8 @@ static void test_GdipGetAllPropertyItems(void)
prop_count = 0xdeadbeef;
status = GdipGetPropertyCount(image, &prop_count);
expect(Ok, status);
- ok(prop_count == sizeof(td)/sizeof(td[0]),
- "expected property count %u, got %u\n", (UINT)(sizeof(td)/sizeof(td[0])), prop_count);
+ ok(prop_count == ARRAY_SIZE(td),
+ "expected property count %u, got %u\n", (UINT) ARRAY_SIZE(td), prop_count);
prop_id = HeapAlloc(GetProcessHeap(), 0, prop_count * sizeof(*prop_id));
@@ -4014,7 +4014,7 @@ static void test_bitmapbits(void)
} palette;
ARGB *entries = palette.pal.Entries;
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
BYTE pixels[sizeof(pixels_24)];
memcpy(pixels, pixels_24, sizeof(pixels_24));
@@ -4283,7 +4283,7 @@ static void test_image_format(void)
BitmapData data;
UINT i, ret;
- for (i = 0; i < sizeof(fmt)/sizeof(fmt[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(fmt); i++)
{
status = GdipCreateBitmapFromScan0(1, 1, 0, fmt[i], NULL, &bitmap);
ok(status == Ok || broken(status == InvalidParameter) /* before win7 */,
@@ -4435,7 +4435,7 @@ static void test_DrawImage_scale(void)
status = GdipSetInterpolationMode(graphics, InterpolationModeNearestNeighbor);
expect(Ok, status);
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
status = GdipSetPixelOffsetMode(graphics, td[i].pixel_offset_mode);
expect(Ok, status);
@@ -4541,10 +4541,10 @@ static void test_gif_properties(void)
status = GdipGetPropertyCount(image, &prop_count);
expect(Ok, status);
- ok(prop_count == sizeof(td)/sizeof(td[0]) || broken(prop_count == 1) /* before win7 */,
- "expected property count %u, got %u\n", (UINT)(sizeof(td)/sizeof(td[0])), prop_count);
+ ok(prop_count == ARRAY_SIZE(td) || broken(prop_count == 1) /* before win7 */,
+ "expected property count %u, got %u\n", (UINT) ARRAY_SIZE(td), prop_count);
- if (prop_count != sizeof(td)/sizeof(td[0]))
+ if (prop_count != ARRAY_SIZE(td))
{
GdipDisposeImage(image);
return;
@@ -4818,7 +4818,7 @@ static void test_supported_encoders(void)
status = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat24bppRGB, NULL, &bm);
ok(status == Ok, "GdipCreateBitmapFromScan0 error %d\n", status);
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
ret = get_encoder_clsid(td[i].mime, &format, &clsid);
ok(ret, "%s encoder is not in the list\n", wine_dbgstr_w(td[i].mime));
@@ -4868,7 +4868,7 @@ static void test_createeffect(void)
stat = pGdipCreateEffect(noneffect, &effect);
todo_wine expect(Win32Error, stat);
- for(i=0; i < sizeof(effectlist) / sizeof(effectlist[0]); i++)
+ for(i=0; i < ARRAY_SIZE(effectlist); i++)
{
stat = pGdipCreateEffect(*effectlist[i], &effect);
todo_wine expect(Ok, stat);
@@ -4981,7 +4981,7 @@ static void test_histogram(void)
expect(Ok, stat);
expect(256, num);
- for (i = 0; i < sizeof(test_formats)/sizeof(test_formats[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(test_formats); i++)
{
num = 0;
stat = pGdipBitmapGetHistogramSize(test_formats[i], &num);
@@ -5131,7 +5131,7 @@ static void test_png_color_formats(void)
UINT flags;
int i;
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
memcpy(buf, png_1x1_data, sizeof(png_1x1_data));
buf[24] = td[i].bit_depth;
--
2.14.4
June 7, 2018
[PATCH] d3dcompiler/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/d3dcompiler_43/tests/asm.c | 27 ++++++++++++++-------------
dlls/d3dcompiler_43/tests/blob.c | 18 +++++++++---------
dlls/d3dcompiler_43/tests/hlsl.c | 14 +++++++-------
dlls/d3dcompiler_43/tests/reflection.c | 18 +++++++++---------
4 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/dlls/d3dcompiler_43/tests/asm.c b/dlls/d3dcompiler_43/tests/asm.c
index 6fd78c186e..f077369ba8 100644
--- a/dlls/d3dcompiler_43/tests/asm.c
+++ b/dlls/d3dcompiler_43/tests/asm.c
@@ -108,7 +108,7 @@ static void preproc_test(void) {
},
};
- exec_tests("preproc", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("preproc", tests, ARRAY_SIZE(tests));
}
static void ps_1_1_test(void) {
@@ -134,7 +134,7 @@ static void ps_1_1_test(void) {
},
};
- exec_tests("ps_1_1", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("ps_1_1", tests, ARRAY_SIZE(tests));
}
static void vs_1_1_test(void) {
@@ -277,7 +277,7 @@ static void vs_1_1_test(void) {
},
};
- exec_tests("vs_1_1", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("vs_1_1", tests, ARRAY_SIZE(tests));
}
static void ps_1_3_test(void) {
@@ -517,7 +517,7 @@ static void ps_1_3_test(void) {
},
};
- exec_tests("ps_1_3", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("ps_1_3", tests, ARRAY_SIZE(tests));
}
static void ps_1_4_test(void) {
@@ -627,7 +627,7 @@ static void ps_1_4_test(void) {
},
};
- exec_tests("ps_1_4", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("ps_1_4", tests, ARRAY_SIZE(tests));
}
static void vs_2_0_test(void) {
@@ -818,7 +818,7 @@ static void vs_2_0_test(void) {
},
};
- exec_tests("vs_2_0", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("vs_2_0", tests, ARRAY_SIZE(tests));
}
static void vs_2_x_test(void) {
@@ -879,7 +879,7 @@ static void vs_2_x_test(void) {
},
};
- exec_tests("vs_2_x", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("vs_2_x", tests, ARRAY_SIZE(tests));
}
static void ps_2_0_test(void) {
@@ -952,7 +952,7 @@ static void ps_2_0_test(void) {
},
};
- exec_tests("ps_2_0", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("ps_2_0", tests, ARRAY_SIZE(tests));
}
static void ps_2_x_test(void) {
@@ -1090,7 +1090,7 @@ static void ps_2_x_test(void) {
},
};
- exec_tests("ps_2_x", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("ps_2_x", tests, ARRAY_SIZE(tests));
}
static void vs_3_0_test(void) {
@@ -1175,7 +1175,7 @@ static void vs_3_0_test(void) {
};
- exec_tests("vs_3_0", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("vs_3_0", tests, ARRAY_SIZE(tests));
}
static void ps_3_0_test(void) {
@@ -1261,7 +1261,7 @@ static void ps_3_0_test(void) {
},
};
- exec_tests("ps_3_0", tests, sizeof(tests) / sizeof(tests[0]));
+ exec_tests("ps_3_0", tests, ARRAY_SIZE(tests));
}
static void failure_test(void) {
@@ -1408,7 +1408,8 @@ static void failure_test(void) {
unsigned int i;
ID3DBlob *shader, *messages;
- for(i = 0; i < (sizeof(tests) / sizeof(tests[0])); i++) {
+ for(i = 0; i < ARRAY_SIZE(tests); i++)
+ {
shader = NULL;
messages = NULL;
hr = D3DAssemble(tests[i], strlen(tests[i]), NULL,
@@ -1689,7 +1690,7 @@ static void d3dpreprocess_test(void)
/* pInclude tests */
include.ID3DInclude_iface.lpVtbl = &D3DInclude_Vtbl;
- for (i = 0; i < sizeof(include_test_shaders) / sizeof(include_test_shaders[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(include_test_shaders); ++i)
{
shader = NULL;
messages = NULL;
diff --git a/dlls/d3dcompiler_43/tests/blob.c b/dlls/d3dcompiler_43/tests/blob.c
index ba69abfb60..d99df825ee 100644
--- a/dlls/d3dcompiler_43/tests/blob.c
+++ b/dlls/d3dcompiler_43/tests/blob.c
@@ -171,7 +171,7 @@ static void test_get_blob_part(void)
ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
ok(TAG_ISGN == *(dword+9), "ISGN got %#x, expected %#x.\n", *(dword+9), TAG_ISGN);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -202,7 +202,7 @@ static void test_get_blob_part(void)
ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
ok(TAG_OSGN == *(dword+9), "OSGN got %#x, expected %#x.\n", *(dword+9), TAG_OSGN);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -234,7 +234,7 @@ static void test_get_blob_part(void)
ok(TAG_ISGN == *(dword+10), "ISGN got %#x, expected %#x.\n", *(dword+10), TAG_ISGN);
ok(TAG_OSGN == *(dword+32), "OSGN got %#x, expected %#x.\n", *(dword+32), TAG_OSGN);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -278,7 +278,7 @@ static void test_get_blob_part(void)
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(test_blob_part[0] != *dword, "DXBC failed got %#x.\n", *dword);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
/* There isn't a full DXBC blob returned for D3D_BLOB_LEGACY_SHADER */
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -298,7 +298,7 @@ static void test_get_blob_part(void)
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(test_blob_part[0] != *dword, "DXBC failed got %#x.\n", *dword);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
/* There isn't a full DXBC blob returned for D3D_BLOB_XNA_PREPASS_SHADER */
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -318,7 +318,7 @@ static void test_get_blob_part(void)
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(test_blob_part[0] != *dword, "DXBC failed got %#x.\n", *dword);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
/* There isn't a full DXBC blob returned for D3D_BLOB_XNA_SHADER */
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -606,7 +606,7 @@ static void test_get_blob_part2(void)
ok(TAG_DXBC == *dword, "DXBC got %#x, expected %#x.\n", *dword, TAG_DXBC);
ok(TAG_PCSG == *(dword+9), "PCSG got %#x, expected %#x.\n", *(dword+9), TAG_PCSG);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -639,7 +639,7 @@ static void test_get_blob_part2(void)
ok(TAG_OSGN == *(dword+24), "OSGN got %#x, expected %#x.\n", *(dword+24), TAG_OSGN);
ok(TAG_PCSG == *(dword+37), "PCSG got %#x, expected %#x.\n", *(dword+37), TAG_PCSG);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
@@ -673,7 +673,7 @@ static void test_get_blob_part2(void)
dword = ((DWORD*)ID3D10Blob_GetBufferPointer(blob));
ok(TAG_DXBC != *dword, "DXBC failed got %#x.\n", *dword);
- for (i = 0; i < sizeof(parts) / sizeof(parts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(parts); i++)
{
/* There isn't a full DXBC blob returned for D3D_BLOB_DEBUG_INFO */
hr = D3DGetBlobPart(dword, size, parts[i], 0, &blob2);
diff --git a/dlls/d3dcompiler_43/tests/hlsl.c b/dlls/d3dcompiler_43/tests/hlsl.c
index 856a09c2c5..546a0e5d2e 100644
--- a/dlls/d3dcompiler_43/tests/hlsl.c
+++ b/dlls/d3dcompiler_43/tests/hlsl.c
@@ -320,7 +320,7 @@ static void test_swizzle(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_
set_float4_d3d9(device, constants, "color", 0.0303f, 0.0f, 0.0f, 0.0202f);
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry,
- probes, sizeof(probes) / sizeof(*probes), 1, 1, __LINE__);
+ probes, ARRAY_SIZE(probes), 1, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
@@ -363,7 +363,7 @@ static void test_math(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geo
ID3DXConstantTable_SetFloat(constants, device, "$z", z);
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry,
- probes, sizeof(probes) / sizeof(*probes), 1, 1, __LINE__);
+ probes, ARRAY_SIZE(probes), 1, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
@@ -417,7 +417,7 @@ static void test_conditionals(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *
if (pshader != NULL)
{
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry, if_greater_probes,
- sizeof(if_greater_probes) / sizeof(*if_greater_probes), 32, 1, __LINE__);
+ ARRAY_SIZE(if_greater_probes), 32, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
@@ -427,7 +427,7 @@ static void test_conditionals(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *
if (pshader != NULL)
{
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry, ternary_operator_probes,
- sizeof(ternary_operator_probes) / sizeof(*ternary_operator_probes), 8, 1, __LINE__);
+ ARRAY_SIZE(ternary_operator_probes), 8, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
@@ -476,7 +476,7 @@ static void test_float_vectors(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
if (pshader != NULL)
{
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry, vec4_indexing_test1_probes,
- sizeof(vec4_indexing_test1_probes) / sizeof(*vec4_indexing_test1_probes), 1, 1, __LINE__);
+ ARRAY_SIZE(vec4_indexing_test1_probes), 1, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
@@ -488,7 +488,7 @@ static void test_float_vectors(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
ID3DXConstantTable_SetInt(constants, device, "i", 2);
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry, vec4_indexing_test2_probes,
- sizeof(vec4_indexing_test2_probes) / sizeof(*vec4_indexing_test2_probes), 32, 1, __LINE__);
+ ARRAY_SIZE(vec4_indexing_test2_probes), 32, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
@@ -550,7 +550,7 @@ static void test_trig(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geo
if (pshader != NULL)
{
compute_shader_probe9(device, vshader_passthru, pshader, quad_geometry, sincos_probes,
- sizeof(sincos_probes) / sizeof(*sincos_probes), 32, 1, __LINE__);
+ ARRAY_SIZE(sincos_probes), 32, 1, __LINE__);
ID3DXConstantTable_Release(constants);
IDirect3DPixelShader9_Release(pshader);
diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c
index 9d77d47938..5ca734e6bd 100644
--- a/dlls/d3dcompiler_43/tests/reflection.c
+++ b/dlls/d3dcompiler_43/tests/reflection.c
@@ -356,7 +356,7 @@ static void test_reflection_desc_vs(void)
ok(ret == 0, "GetMovcInstructionCount failed, got %u, expected %u\n", ret, 0);
/* GetIn/OutputParameterDesc */
- for (i = 0; i < sizeof(test_reflection_desc_vs_resultin)/sizeof(*test_reflection_desc_vs_resultin); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_desc_vs_resultin); ++i)
{
pdesc = &test_reflection_desc_vs_resultin[i];
@@ -381,7 +381,7 @@ static void test_reflection_desc_vs(void)
i, desc.Stream, pdesc->ReadWriteMask);
}
- for (i = 0; i < sizeof(test_reflection_desc_vs_resultout)/sizeof(*test_reflection_desc_vs_resultout); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_desc_vs_resultout); ++i)
{
pdesc = &test_reflection_desc_vs_resultout[i];
@@ -656,7 +656,7 @@ static void test_reflection_desc_ps(void)
ok(hr == E_INVALIDARG, "GetPatchConstantParameterDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
/* GetIn/OutputParameterDesc */
- for (i = 0; i < sizeof(test_reflection_desc_ps_resultin)/sizeof(*test_reflection_desc_ps_resultin); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_desc_ps_resultin); ++i)
{
pdesc = &test_reflection_desc_ps_resultin[i];
@@ -681,7 +681,7 @@ static void test_reflection_desc_ps(void)
i, desc.Stream, pdesc->ReadWriteMask);
}
- for (i = 0; i < sizeof(test_reflection_desc_ps_resultout)/sizeof(*test_reflection_desc_ps_resultout); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_desc_ps_resultout); ++i)
{
pdesc = &test_reflection_desc_ps_resultout[i];
@@ -899,7 +899,7 @@ static void test_reflection_desc_ps_output(void)
const D3D11_SIGNATURE_PARAMETER_DESC *pdesc;
unsigned int i;
- for (i = 0; i < sizeof(test_reflection_desc_ps_output_result)/sizeof(*test_reflection_desc_ps_output_result); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_desc_ps_output_result); ++i)
{
hr = D3DReflect(test_reflection_desc_ps_output_blob[i], test_reflection_desc_ps_output_blob[i][6], &IID_ID3D11ShaderReflection, (void **)&ref11);
ok(hr == S_OK, "(%u): D3DReflect failed %x\n", i, hr);
@@ -1036,7 +1036,7 @@ static void test_reflection_bound_resources(void)
ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
/* GetResourceBindingDesc */
- for (i = 0; i < sizeof(test_reflection_bound_resources_result)/sizeof(*test_reflection_bound_resources_result); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_bound_resources_result); ++i)
{
pdesc = &test_reflection_bound_resources_result[i];
@@ -1062,7 +1062,7 @@ static void test_reflection_bound_resources(void)
}
/* GetResourceBindingDescByName */
- for (i = 0; i < sizeof(test_reflection_bound_resources_result)/sizeof(*test_reflection_bound_resources_result); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_bound_resources_result); ++i)
{
pdesc = &test_reflection_bound_resources_result[i];
@@ -1393,7 +1393,7 @@ static void test_reflection_constant_buffer(void)
ok(hr == S_OK, "IsEqual failed, got %x, expected %x\n", hr, S_OK);
/* constant buffers */
- for (i = 0; i < sizeof(test_reflection_constant_buffer_cb_result)/sizeof(*test_reflection_constant_buffer_cb_result); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_constant_buffer_cb_result); ++i)
{
pcbdesc = &test_reflection_constant_buffer_cb_result[i];
@@ -1416,7 +1416,7 @@ static void test_reflection_constant_buffer(void)
}
/* variables */
- for (i = 0; i < sizeof(test_reflection_constant_buffer_variable_result)/sizeof(*test_reflection_constant_buffer_variable_result); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_reflection_constant_buffer_variable_result); ++i)
{
pvdesc = &test_reflection_constant_buffer_variable_result[i].desc;
--
2.14.4
June 7, 2018
[PATCH] advpack/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/advpack/tests/advpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c
index d5958769ab..8d7c5ebb48 100644
--- a/dlls/advpack/tests/advpack.c
+++ b/dlls/advpack/tests/advpack.c
@@ -134,8 +134,8 @@ static void delnode_test(void)
/* Native DelNode apparently does not support relative paths, so we use
absolute paths for testing */
- currDirLen = GetCurrentDirectoryA(sizeof(currDir) / sizeof(CHAR), currDir);
- assert(currDirLen > 0 && currDirLen < sizeof(currDir) / sizeof(CHAR));
+ currDirLen = GetCurrentDirectoryA(ARRAY_SIZE(currDir), currDir);
+ assert(currDirLen > 0 && currDirLen < ARRAY_SIZE(currDir));
if(currDir[currDirLen - 1] == '\\')
currDir[--currDirLen] = 0;
--
2.14.4
June 7, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Matteo Bruni
2018-06-07 17:07 GMT+02:00 Henri Verbeet <hverbeet(a)gmail.com>:
> On 6 June 2018 at 00:32, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
>> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
>> ---
>> dlls/wined3d/glsl_shader.c | 116 ++++++++++++++++++++++++++++++++++++++++++---
>> 1 file changed, 109 insertions(+), 7 deletions(-)
>>
> This fails the tests here:
>
> ../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
> d3d10core.dll -p d3d10core_test.exe.so device && touch device.ok
> device.c:11300: Test failed: Got 0xff0000ff, expected 0xff00ff00 at
> (0, 0), sub-resource 0.
> device.c:11307: Test failed: Got 0xff0000ff, expected 0xff00ff00 at
> (0, 0), sub-resource 0.
>
> ../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
> d3d11.dll -p d3d11_test.exe.so d3d11 && touch d3d11.ok
> d3d11.c:14777: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0,
> 0, 0), sub-resource 0.
> d3d11.c:14784: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0,
> 0, 0), sub-resource 0.
> d3d11.c:20644: Tests skipped: Raw buffers are not supported.
> d3d11.c:20644: Tests skipped: Raw buffers are not supported.
:/
This time I know why I missed these (didn't notice them in the midst
of other test failures), still not great... I have a fix coming.
June 7, 2018
[PATCH 3/3] user32: Add RegisterTouchHitTestingWindow stub
by Fabian Maurer
Fixes bug 45303.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dlls/user32/misc.c | 9 +++++++++
dlls/user32/user32.spec | 1 +
2 files changed, 10 insertions(+)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index 4cc54df412..b91aa3c7cc 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -862,6 +862,15 @@ BOOL WINAPI GetPointerDevices(UINT32 *device_count, POINTER_DEVICE_INFO *devices
return TRUE;
}
+/**********************************************************************
+ * RegisterTouchHitTestingWindow [USER32.@]
+ */
+BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value)
+{
+ FIXME("(%p %d): stub\n", hwnd, value);
+ return TRUE;
+}
+
static const WCHAR imeW[] = {'I','M','E',0};
const struct builtin_class_descr IME_builtin_class =
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 7f652ee722..61e0e4e8cc 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -606,6 +606,7 @@
@ stdcall RegisterShellHookWindow (long)
@ stdcall RegisterSystemThread(long long)
@ stdcall RegisterTasklist (long)
+@ stdcall RegisterTouchHitTestingWindow(long long)
@ stdcall RegisterTouchWindow(long long)
# @ stub RegisterUserApiHook
@ stdcall RegisterWindowMessageA(str)
--
2.17.1
June 7, 2018
[PATCH 2/3] user32: Add stub for GetPointerDevices
by Fabian Maurer
Fixes bug 45302.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
...ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec | 2 +-
dlls/user32/misc.c | 17 ++++++++++++++++
dlls/user32/user32.spec | 1 +
include/winuser.h | 20 +++++++++++++++++++
4 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec b/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec
index 72cfe3d954..3a043dc9c2 100644
--- a/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec
+++ b/dlls/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0/api-ms-win-rtcore-ntuser-wmpointer-l1-1-0.spec
@@ -4,7 +4,7 @@
@ stub GetPointerDevice
@ stub GetPointerDeviceProperties
@ stub GetPointerDeviceRects
-@ stub GetPointerDevices
+@ stdcall GetPointerDevices(ptr ptr) user32.GetPointerDevices
@ stub GetPointerFrameInfo
@ stub GetPointerFrameInfoHistory
@ stub GetPointerFramePenInfo
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index c3f4030a90..4cc54df412 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -846,6 +846,23 @@ BOOL WINAPI RegisterPointerDeviceNotifications(HWND hwnd, BOOL notifyrange)
return TRUE;
}
+/**********************************************************************
+ * GetPointerDevices [USER32.@]
+ */
+BOOL WINAPI GetPointerDevices(UINT32 *device_count, POINTER_DEVICE_INFO *devices)
+{
+ FIXME("(%p %p): stub\n", device_count, devices);
+
+ if (!device_count)
+ return FALSE;
+
+ if (!devices)
+ *device_count = 0;
+
+ return TRUE;
+}
+
+
static const WCHAR imeW[] = {'I','M','E',0};
const struct builtin_class_descr IME_builtin_class =
{
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 2e5b203a85..7f652ee722 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -354,6 +354,7 @@
@ stdcall GetOpenClipboardWindow()
@ stdcall GetParent(long)
@ stdcall GetPhysicalCursorPos(ptr)
+@ stdcall GetPointerDevices(ptr ptr)
@ stdcall GetPriorityClipboardFormat(ptr long)
@ stdcall GetProcessDefaultLayout(ptr)
@ stdcall GetProcessDpiAwarenessInternal(long ptr)
diff --git a/include/winuser.h b/include/winuser.h
index 648efbe0e2..f546a4a1f3 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3357,6 +3357,26 @@ typedef struct tagGESTUREINFO {
} GESTUREINFO, *PGESTUREINFO;
typedef GESTUREINFO const * PCGESTUREINFO;
+#define POINTER_DEVICE_PRODUCT_STRING_MAX 520
+
+typedef enum tagPOINTER_DEVICE_TYPE {
+ POINTER_DEVICE_TYPE_INTEGRATED_PEN = 0x00000001,
+ POINTER_DEVICE_TYPE_EXTERNAL_PEN = 0x00000002,
+ POINTER_DEVICE_TYPE_TOUCH = 0x00000003,
+ POINTER_DEVICE_TYPE_TOUCH_PAD = 0x00000004,
+ POINTER_DEVICE_TYPE_MAX = 0xFFFFFFFF
+} POINTER_DEVICE_TYPE;
+
+typedef struct tagPOINTER_DEVICE_INFO {
+ DWORD displayOrientation;
+ HANDLE device;
+ POINTER_DEVICE_TYPE pointerDeviceType;
+ HMONITOR monitor;
+ ULONG startingCursorId;
+ USHORT maxActiveContacts;
+ WCHAR productString[POINTER_DEVICE_PRODUCT_STRING_MAX];
+} POINTER_DEVICE_INFO;
+
#if defined(_WINGDI_) && !defined(NOGDI)
WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA,DWORD);
WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW,DWORD);
--
2.17.1
June 7, 2018
[PATCH 1/3] user32: Make RegisterPointerDeviceNotifications return TRUE to fake success
by Fabian Maurer
Fixes bug 45284.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dlls/user32/misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index be4b71a4bc..c3f4030a90 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -843,7 +843,7 @@ LONG WINAPI GetDisplayConfigBufferSizes(UINT32 flags, UINT32 *num_path_info, UIN
BOOL WINAPI RegisterPointerDeviceNotifications(HWND hwnd, BOOL notifyrange)
{
FIXME("(%p %d): stub\n", hwnd, notifyrange);
- return FALSE;
+ return TRUE;
}
static const WCHAR imeW[] = {'I','M','E',0};
--
2.17.1
June 7, 2018
Re: [PATCH 4/4] wsdapi: Add initial support for reading messages; identify Probe message.
by Owen Rudge
On 07/06/2018 08:56, Huw Davies wrote:
>> +static BOOL move_to_element(WS_XML_READER *reader, const char
*element_name, WS_XML_STRING *uri)
>
> return HRESULT
>
>> +static BOOL ws_element_to_wsdxml_element(WS_XML_READER *reader,
IWSDXMLContext *context, WSDXML_ELEMENT *parent_element)
>
> and here.
>
>> int read_message(const char *xml, int xml_length, WSD_SOAP_MESSAGE
**out_msg)
>
> This is also looking like a good contender to return HRESULT and
> take an [out] int *type parameter.
As per the previous patch, the HRESULT is not ultimately used, and I
can't see that there's a great benefit in passing it along. I do
understand it for the other functions that ultimately return a value to
the caller, but these functions are all called by the listener thread,
and a simple identification of the message type is all we require.
If you think it would be beneficial, I can modify these functions to
return HRESULT, but it would be good to understand the benefits of doing so.
>> - ok(any != NULL, "%s: any == NULL\n", debug_prefix);
>> + todo_wine ok(any != NULL, "%s: any == NULL\n", debug_prefix);
>
> You'll need to have a really good reason for doing this. Can you
> re-order things so you don't break the tests?
This will be fixed in the next patchset; I didn't want to include any
more code in what's already quite a large patch. There's probably an
extra 40 or so lines of code needed to avoid this breakage. There's not
really a way I can re-order this that I can think of.
If preferred though, I can submit the patch that will fix this as part
of this patchset, so the net result once the set is committed involves
no extra todos.
Thanks,
Owen
June 7, 2018
Re: [PATCH 3/4] wsdapi: Add stub for Probe message parsing, prepare notification sink message.
by Owen Rudge
On 07/06/2018 08:45, Huw Davies wrote:
>> +static void process_received_message(listener_thread_params
*params, char *message, int message_len,
>> + SOCKADDR_STORAGE *source_addr)
>
> This should return HRESULT.
There's not really anything that can be done with that result. If an
unknown message is received, I can add a trace for it, but an error
reading the message is not a reason to, for instance, stop listening on
the socket, so I'm not sure what purpose having a return value here
would serve.
Cheers,
Owen
June 7, 2018
[PATCH] po: Update Finnish translation.
by Lauri Kenttä
Signed-off-by: Lauri Kenttä <lauri.kentta(a)gmail.com>
---
po/fi.po | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/po/fi.po b/po/fi.po
index fce90dcccf..d654e904f2 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -12782,10 +12782,8 @@ msgid "Confirm Value Delete"
msgstr "Vahvista arvon tuhoaminen"
#: regedit.rc:210
-#, fuzzy
-#| msgid "Are you sure you want to delete the registry value '%1'?"
msgid "Are you sure you want to delete the selected registry value?"
-msgstr "Haluatko varmasti tuhota rekisteristä arvon '%1'?"
+msgstr "Haluatko varmasti tuhota rekisteristä valitun arvon?"
#: regedit.rc:216
msgid "Search complete. The string '%1' was not found."
--
2.17.1
June 7, 2018
Re: [PATCH] shellpath.c: Fix creation of HOME directory symbolic links
by Huw Davies
On 7 Jun 2018, at 16:11, Bob Wya <bob.mt.wya(a)gmail.com> wrote:
> Thanks for the valuable feedback! I think I spent quite a bit of time fiddling with this,
> so I've probably "lost the wood for the trees" a bit... :-)
>
> Just to clarify a style point, for the re-factored patches...
>
> If I still want to split the _SHCreateSymbolicLinks() function into a re-factored
> implementation that has an iterative wrapper function, is it OK to call them:
>
> _SHCreateSymbolicLink()
> _SHCreateSymbolicLinks()
>
> ??
> This would introduce a new "Camel Case" style function name... But would obviously
> be more consistent...
For new functions you’d avoid CamelCase and use something like
create_symbolic_link(). If might be ok to rename existing
functions if the patch is small enough. The problem at the
moment is that the patch is much too large.
Huw.
June 7, 2018
Re: [PATCH] shellpath.c: Fix creation of HOME directory symbolic links
by Bob Wya
On 7 June 2018 at 11:57, Huw Davies <huw(a)codeweavers.com> wrote:
> On Wed, Jun 06, 2018 at 08:46:49AM +0100, Rob Walker wrote:
> > Fixes: https://bugs.winehq.org/show_bug.cgi?id=41668 (1)
> > https://bugs.winehq.org/show_bug.cgi?id=28216 (2)
> >
> > (1) Introduces a "WINESYMLINK" env variable that allows a user to
> > control what shell folder links are created to the HOME folder, when
> > a WINEPREFIX is initially created.
> > The Wineprefix Shell Folders, that Wine symlinks to the user's HOME
> directory,
> > are only (re-)created on each Wine boot if they: do not pre-exist or
> are broken
> > symbolic links.
> >
> > (2) The XDG Directory specification automatically falls back to the user
> HOME
> > directory for any XDG_*_DIR that does not exist
> (xdg-user-dirs-update).
> > The implemented solution is to block Wine from symlinking directly
> > to HOME directory.
>
> Hi Rob,
>
> There's an awful lot going on in this patch which makes it very
> difficult to review. Please avoid re-naming and re-indenting
> existing functions so that we can actually see the real changes.
>
> Then please split the changes into separate patches. A clue
> that you're not doing this is that you have a list of two
> items in the commit message. If the patch is doing two
> things, it should be two patches.
>
> Huw.
>
>
Hi Huw,
Thanks for the valuable feedback! I think I spent quite a bit of time
fiddling with this,
so I've probably "lost the wood for the trees" a bit... :-)
Just to clarify a style point, for the re-factored patches...
If I still want to split the _SHCreateSymbolicLinks() function into a
re-factored
implementation that has an iterative wrapper function, is it OK to call
them:
_SHCreateSymbolicLink()
_SHCreateSymbolicLinks()
??
This would introduce a new "Camel Case" style function name... But would
obviously
be more consistent...
Thanks
Rob
> >
> > Test on Gentoo GNU/Linux.
> >
> > Signed-off-by: Rob Walker <bob.mt.wya(a)gmail.com>
> > ---
> > dlls/shell32/shellpath.c | 554 ++++++++++++++++++++++++---------------
> > 1 file changed, 343 insertions(+), 211 deletions(-)
> >
> > diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
> > index a551e93aa8..b8c74273c6 100644
> > --- a/dlls/shell32/shellpath.c
> > +++ b/dlls/shell32/shellpath.c
> > @@ -4326,252 +4326,259 @@ static HRESULT _SHRegisterCommonShellFolders(
> void)
> > }
> >
> > /***********************************************************
> *******************
> > - * _SHAppendToUnixPath [Internal]
> > + * append_to_unix_path [Internal]
> > *
> > - * Helper function for _SHCreateSymbolicLinks. Appends pwszSubPath (or
> the
> > - * corresponding resource, if IS_INTRESOURCE) to the unix base path
> 'szBasePath'
> > - * and replaces backslashes with slashes.
> > + * Helper function for create_home_subdir_symbolic_link.
> > + * Appends 'subpath', or the corresponding resource (if it is a
> > + * resource identifier), to the Unix base path 'base_dir'.
> > + * Replace backslashes with forward slashes.
> > *
> > * PARAMS
> > - * szBasePath [IO] The unix base path, which will be appended to
> (CP_UNXICP).
> > - * pwszSubPath [I] Sub-path or resource id (use MAKEINTRESOURCEW).
> > + * base_dir [IO] The Unix base path, which will be appended to
> (CP_UNXICP).
> > + * subpath [I] Sub-path or resource id (use MAKEINTRESOURCEW,
> pre-call).
> > *
> > * RETURNS
> > - * Success: TRUE,
> > + * Success: TRUE
> > * Failure: FALSE
> > */
> > -static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR
> pwszSubPath) {
> > - WCHAR wszSubPath[MAX_PATH];
> > - int cLen = strlen(szBasePath);
> > - char *pBackslash;
> > -
> > - if (IS_INTRESOURCE(pwszSubPath)) {
> > - if (!LoadStringW(shell32_hInstance, LOWORD(pwszSubPath),
> wszSubPath, MAX_PATH)) {
> > - /* Fall back to hard coded defaults. */
> > - switch (LOWORD(pwszSubPath)) {
> > - case IDS_PERSONAL:
> > - lstrcpyW(wszSubPath, DocumentsW);
> > - break;
> > - case IDS_MYMUSIC:
> > - lstrcpyW(wszSubPath, My_MusicW);
> > - break;
> > - case IDS_MYPICTURES:
> > - lstrcpyW(wszSubPath, My_PicturesW);
> > - break;
> > - case IDS_MYVIDEOS:
> > - lstrcpyW(wszSubPath, My_VideosW);
> > - break;
> > - default:
> > - ERR("LoadString(%d) failed!\n",
> LOWORD(pwszSubPath));
> > - return FALSE;
> > - }
> > +static inline BOOL append_to_unix_path(char *base_dir, LPCWSTR subpath)
> > +{
> > + WCHAR ws_subpath[MAX_PATH];
> > + int cLen = strlen(base_dir);
> > + char *back_slash;
> > +
> > + if (!IS_INTRESOURCE(subpath))
> > + {
> > + lstrcpyW(ws_subpath, subpath);
> > + }
> > + else if (!LoadStringW(shell32_hInstance, LOWORD(subpath),
> ws_subpath, MAX_PATH))
> > + {
> > + /* Fall back to hard coded defaults. */
> > + switch (LOWORD(subpath)) {
> > + case IDS_PERSONAL:
> > + lstrcpyW(ws_subpath, DocumentsW);
> > + break;
> > + case IDS_MYMUSIC:
> > + lstrcpyW(ws_subpath, My_MusicW);
> > + break;
> > + case IDS_MYPICTURES:
> > + lstrcpyW(ws_subpath, My_PicturesW);
> > + break;
> > + case IDS_MYVIDEOS:
> > + lstrcpyW(ws_subpath, My_VideosW);
> > + break;
> > + case IDS_DESKTOP:
> > + lstrcpyW(ws_subpath, DesktopW);
> > + break;
> > + default:
> > + ERR("LoadString(%d) failed!\n", LOWORD(subpath));
> > + return FALSE;
> > }
> > - } else {
> > - lstrcpyW(wszSubPath, pwszSubPath);
> > }
> > -
> > - if (szBasePath[cLen-1] != '/') szBasePath[cLen++] = '/';
> > -
> > - if (!WideCharToMultiByte(CP_UNIXCP, 0, wszSubPath, -1, szBasePath
> + cLen,
> > +
> > + if (!cLen || (base_dir[cLen-1] != '/')) base_dir[cLen++] = '/';
> > +
> > + if (!WideCharToMultiByte(CP_UNIXCP, 0, ws_subpath, -1, base_dir +
> cLen,
> > FILENAME_MAX - cLen, NULL, NULL))
> > {
> > return FALSE;
> > }
> > -
> > - pBackslash = szBasePath + cLen;
> > - while ((pBackslash = strchr(pBackslash, '\\'))) *pBackslash = '/';
> > -
> > +
> > + back_slash = base_dir + cLen;
> > + while ((back_slash = strchr(back_slash, '\\'))) *back_slash = '/';
> > +
> > return TRUE;
> > }
> >
> > /***********************************************************
> *******************
> > - * _SHCreateSymbolicLinks [Internal]
> > + * compare_pathft_to_bootft [Internal]
> > *
> > - * Sets up symbol links for various shell folders to point into the
> users home
> > - * directory. We do an educated guess about what the user would
> probably want:
> > - * - If there is a 'My Documents' directory in $HOME, the user probably
> wants
> > - * wine's 'My Documents' to point there. Furthermore, we imply that
> the user
> > - * is a Windows lover and has no problem with wine creating 'My
> Pictures',
> > - * 'My Music' and 'My Videos' subfolders under '$HOME/My Documents',
> if those
> > - * do not already exits. We put appropriate symbolic links in place
> for those,
> > - * too.
> > - * - If there is no 'My Documents' directory in $HOME, we let 'My
> Documents'
> > - * point directly to $HOME. We assume the user to be a unix hacker
> who does not
> > - * want wine to create anything anywhere besides the .wine directory.
> So, if
> > - * there already is a 'My Music' directory in $HOME, we symlink the
> 'My Music'
> > - * shell folder to it. But if not, then we check XDG_MUSIC_DIR -
> "well known"
> > - * directory, and try to link to that. If that fails, then we symlink
> to
> > - * $HOME directly. The same holds fo 'My Pictures' and 'My Videos'.
> > - * - The Desktop shell folder is symlinked to XDG_DESKTOP_DIR. If that
> does not
> > - * exist, then we try '$HOME/Desktop'. If that does not exist, then
> we leave
> > - * it alone.
> > - * ('My Music',... above in fact means LoadString(IDS_MYMUSIC))
> > + * Function to compare the FILETIME of ws_path (a Windows path) to the
> (estimated)
> > + * Wine System boot time.
> > + *
> > + * PARAMS
> > + * ws_path [I] The Windows path, for which provides the FS
> write time.
> > + * time_difference [O] -1 Windows path last written before time of
> Wine boot.
> > + * 0 Windows path last written at time of Wine
> boot.
> > + * +1 Windows path last written after time of
> Wine boot.
> > + * RETURNS
> > + * Success: S_OK
> > + * Failure: E_FAIL
> > + *
> > + * NOTES
> > + * Pre-allocate storage for time_difference pointer variable
> externally.
> > */
> > -static void _SHCreateSymbolicLinks(void)
> > -{
> > - UINT aidsMyStuff[] = { IDS_MYPICTURES, IDS_MYVIDEOS, IDS_MYMUSIC },
> i;
> > - const WCHAR* MyOSXStuffW[] = { PicturesW, MoviesW, MusicW };
> > - int acsidlMyStuff[] = { CSIDL_MYPICTURES, CSIDL_MYVIDEO,
> CSIDL_MYMUSIC };
> > - static const char * const xdg_dirs[] = { "PICTURES", "VIDEOS",
> "MUSIC", "DOCUMENTS", "DESKTOP" };
> > - static const unsigned int num = ARRAY_SIZE(xdg_dirs);
> > - WCHAR wszTempPath[MAX_PATH];
> > - char szPersonalTarget[FILENAME_MAX], *pszPersonal;
> > - char szMyStuffTarget[FILENAME_MAX], *pszMyStuff;
> > - char szDesktopTarget[FILENAME_MAX], *pszDesktop;
> > - struct stat statFolder;
> > - const char *pszHome;
> > - HRESULT hr;
> > - char ** xdg_results;
> > - char * xdg_desktop_dir;
> > -
> > - /* Create all necessary profile sub-dirs up to 'My Documents' and
> get the unix path. */
> > - hr = SHGetFolderPathW(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL,
> > - SHGFP_TYPE_DEFAULT, wszTempPath);
> > - if (FAILED(hr)) return;
> > - pszPersonal = wine_get_unix_file_name(wszTempPath);
> > - if (!pszPersonal) return;
> > +static HRESULT compare_pathft_to_bootft(const WCHAR * ws_path, int *
> time_difference)
> > +{
> > + static ULONG64 time_system_start = 0;
> > + SYSTEMTIME system_time_st;
> > + FILETIME dummy_ft, system_time_ft, last_write_ft;
> > + ULONG64 tick_count, time_last_write;
> > + HANDLE fhandle;
> > + DWORD ft_errorc = 0;
> >
> > - hr = XDG_UserDirLookup(xdg_dirs, num, &xdg_results);
> > - if (FAILED(hr)) xdg_results = NULL;
> > + if (!time_difference) return E_FAIL;
> >
> > - pszHome = getenv("HOME");
> > - if (pszHome && !stat(pszHome, &statFolder) &&
> S_ISDIR(statFolder.st_mode))
> > + if (!time_system_start)
> > {
> > - while (1)
> > + tick_count = (ULONG64) GetTickCount64();
> > + GetSystemTime(&system_time_st);
> > + if (!SystemTimeToFileTime( &system_time_st, &system_time_ft))
> > {
> > - /* Check if there's already a Wine-specific 'My Documents'
> folder */
> > - strcpy(szPersonalTarget, pszHome);
> > - if (_SHAppendToUnixPath(szPersonalTarget,
> MAKEINTRESOURCEW(IDS_PERSONAL)) &&
> > - !stat(szPersonalTarget, &statFolder) &&
> S_ISDIR(statFolder.st_mode))
> > - {
> > - /* '$HOME/My Documents' exists. Create 'My Pictures',
> > - * 'My Videos' and 'My Music' subfolders or fail
> silently if
> > - * they already exist.
> > - */
> > - for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++)
> > - {
> > - strcpy(szMyStuffTarget, szPersonalTarget);
> > - if (_SHAppendToUnixPath(szMyStuffTarget,
> MAKEINTRESOURCEW(aidsMyStuff[i])))
> > - mkdir(szMyStuffTarget, 0777);
> > - }
> > - break;
> > - }
> > -
> > - /* Try to point to the XDG Documents folder */
> > - if (xdg_results && xdg_results[num-2] &&
> > - !stat(xdg_results[num-2], &statFolder) &&
> > - S_ISDIR(statFolder.st_mode))
> > - {
> > - strcpy(szPersonalTarget, xdg_results[num-2]);
> > - break;
> > - }
> > -
> > - /* Or the hardcoded / OS X Documents folder */
> > - strcpy(szPersonalTarget, pszHome);
> > - if (_SHAppendToUnixPath(szPersonalTarget, DocumentsW) &&
> > - !stat(szPersonalTarget, &statFolder) &&
> > - S_ISDIR(statFolder.st_mode))
> > - break;
> > -
> > - /* As a last resort point to $HOME. */
> > - strcpy(szPersonalTarget, pszHome);
> > - break;
> > + ERR("SystemTimeToFileTime call failed (%d)\n",
> GetLastError());
> > + return E_FAIL;
> > }
> > -
> > - /* Replace 'My Documents' directory with a symlink or fail
> silently if not empty. */
> > - remove(pszPersonal);
> > - symlink(szPersonalTarget, pszPersonal);
> > + time_system_start = (((ULONG64)system_time_ft.dwHighDateTime)
> << 32)
> > + + system_time_ft.dwLowDateTime
> > + - (tick_count * 10000);
> > }
> > - else
> > + fhandle = CreateFileW( ws_path, 0, FILE_SHARE_READ, NULL,
> > + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS,
> NULL);
> > + if (fhandle == INVALID_HANDLE_VALUE)
> > {
> > - /* '$HOME' doesn't exist. Create 'My Pictures', 'My Videos' and
> 'My Music' subdirs
> > - * in '%USERPROFILE%\\My Documents' or fail silently if they
> already exist. */
> > - pszHome = NULL;
> > - strcpy(szPersonalTarget, pszPersonal);
> > - for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++) {
> > - strcpy(szMyStuffTarget, szPersonalTarget);
> > - if (_SHAppendToUnixPath(szMyStuffTarget,
> MAKEINTRESOURCEW(aidsMyStuff[i])))
> > - mkdir(szMyStuffTarget, 0777);
> > - }
> > + ERR("Open file handle failed for path: %s (%d)\n",
> > + debugstr_w(ws_path), GetLastError());
> > + return E_FAIL;
> > }
> > -
> > - /* Create symbolic links for 'My Pictures', 'My Videos' and 'My
> Music'. */
> > - for (i=0; i < ARRAY_SIZE(aidsMyStuff); i++)
> > + if (!GetFileTime(fhandle, &dummy_ft, &dummy_ft, &last_write_ft))
> > + ft_errorc = GetLastError();
> > + if (!CloseHandle(fhandle))
> > {
> > - /* Create the current 'My Whatever' folder and get its unix
> path. */
> > - hr = SHGetFolderPathW(NULL, acsidlMyStuff[i]|CSIDL_FLAG_CREATE,
> NULL,
> > - SHGFP_TYPE_DEFAULT, wszTempPath);
> > - if (FAILED(hr)) continue;
> > -
> > - pszMyStuff = wine_get_unix_file_name(wszTempPath);
> > - if (!pszMyStuff) continue;
> > -
> > - while (1)
> > - {
> > - /* Check for the Wine-specific '$HOME/My Documents'
> subfolder */
> > - strcpy(szMyStuffTarget, szPersonalTarget);
> > - if (_SHAppendToUnixPath(szMyStuffTarget,
> MAKEINTRESOURCEW(aidsMyStuff[i])) &&
> > - !stat(szMyStuffTarget, &statFolder) &&
> S_ISDIR(statFolder.st_mode))
> > - break;
> > + ERR("Close file handle failed: %p (%d)\n",
> > + fhandle, GetLastError());
> > + return E_FAIL;
> > + }
> > + if (ft_errorc)
> > + {
> > + ERR("Get file time failed: %p (%d)\n",
> > + fhandle, ft_errorc);
> > + return E_FAIL;
> > + }
> > + time_last_write = (((ULONG64)last_write_ft.dwHighDateTime) << 32)
> > + + last_write_ft.dwLowDateTime;
> > + *time_difference = ((time_last_write > time_system_start) ? 1 :
> > + ((time_last_write < time_system_start) ? -1 :
> > + 0));
> >
> > - /* Try the XDG_XXX_DIR folder */
> > - if (xdg_results && xdg_results[i])
> > - {
> > - strcpy(szMyStuffTarget, xdg_results[i]);
> > - break;
> > - }
> > + return S_OK;
> > +}
> >
> > - /* Or the OS X folder (these are never localized) */
> > - if (pszHome)
> > - {
> > - strcpy(szMyStuffTarget, pszHome);
> > - if (_SHAppendToUnixPath(szMyStuffTarget,
> MyOSXStuffW[i]) &&
> > - !stat(szMyStuffTarget, &statFolder) &&
> > - S_ISDIR(statFolder.st_mode))
> > - break;
> > - }
> > +/**********************************************************
> ********************
> > + * create_homedir_symbolic_link [Internal]
> > + *
> > + * Creates a symbolic link from the current Wineprefix to an appropriate
> > + * HOME subdirectory (if one is found).
> > + *
> > + * Creates 'XXXX' directory in Wineprefix.
> > + * Then create a 'My XXXX' symbolic link in Wineprefix:
> > + * 1) If '$HOME/XXXX' (IDS directory) exists then target this.
> > + * 2) If '$HOME/XXXX' (XDG_XXXX_DIR) exists then target this.
> > + * 3) If '$HOME/XXXX' (MacOS XXXX media directory) exists then target
> this.
> > + *
> > + * PARAMS
> > + * env_enabled [I]
> > + * TRUE The user has enabled this Shell Folder to be
> symlinked (default).
> > + * FALSE The user has chosen to disable symlinking this
> Shell Folder.
> > + * The Shell Folder will be created, in the current
> Wineprefix (if not pre-existing).
> > + * ids_dir [I] Windows Resource Identifier code for current Shell
> Folder.
> > + * csidl_dir [I] Constant Special Item ID List identifier for
> current Shell Folder.
> > + * xdg_dir [I] Full path of external Unix XDG directory
> corresponding to current Shell Folder.
> > + * ws_osx_dir [I] Fallback directory name to use, corresponding to
> current Shell Folder (OSX specific).
> > + *
> > + */
> > +void create_homedir_symbolic_link(BOOL env_enabled,
> > + UINT ids_dir,
> > + int csidl_dir,
> > + const char * xdg_dir,
> > + const WCHAR * ws_osx_dir)
> > +{
> > + static const char * env_homedir = NULL;
> > + WCHAR ws_temp_path[MAX_PATH];
> > + char home_target[FILENAME_MAX], * prefix_dir;
> > + struct stat stat_folder, stat_home_folder;
> > + HRESULT hr;
> > + BOOL target_ok;
> > + int time_difference;
> >
> > - /* As a last resort point to the same location as 'My
> Documents' */
> > - strcpy(szMyStuffTarget, szPersonalTarget);
> > - break;
> > + hr = SHGetFolderPathW(NULL, csidl_dir, NULL,
> > + SHGFP_TYPE_DEFAULT, ws_temp_path);
> > + if (SUCCEEDED(hr))
> > + {
> > + if (ids_dir != IDS_DESKTOPDIRECTORY) return;
> > +
> > + if ((compare_pathft_to_bootft(ws_temp_path, &time_difference)
> == S_OK)
> > + && (time_difference < 0))
> > + {
> > + TRACE("%s directory created before wineboot\n",
> > + debugstr_w(ws_temp_path));
> > + return;
> > }
> > - remove(pszMyStuff);
> > - symlink(szMyStuffTarget, pszMyStuff);
> > - heap_free(pszMyStuff);
> > }
> > -
> > - /* Last but not least, the Desktop folder */
> > - if (pszHome)
> > - strcpy(szDesktopTarget, pszHome);
> > + else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
> > + {
> > + hr = SHGetFolderPathW(NULL, csidl_dir|CSIDL_FLAG_CREATE, NULL,
> > + SHGFP_TYPE_DEFAULT, ws_temp_path);
> > + if (FAILED(hr)) return;
> > + }
> > else
> > - strcpy(szDesktopTarget, pszPersonal);
> > - heap_free(pszPersonal);
> > + {
> > + ERR("Failed to get Wineprefix path corresponding to %d CSIDL\n",
> > + csidl_dir);
> > + return;
> > + }
> > + if (!env_enabled) return;
> > + prefix_dir = wine_get_unix_file_name(ws_temp_path);
> > + if (!prefix_dir)
> > + {
> > + ERR("Failed to get Unix Wineprefix directory for: %s\n",
> > + debugstr_w(ws_temp_path));
> > + return;
> > + }
> > + if (!env_homedir) env_homedir = getenv("HOME");
> > + if (!(env_homedir
> > + && (stat(env_homedir, &stat_home_folder) != 1)
> > + && S_ISDIR(stat_home_folder.st_mode)))
> > + {
> > + if (prefix_dir) heap_free(prefix_dir);
> > + return;
> > + }
> >
> > - xdg_desktop_dir = xdg_results ? xdg_results[num - 1] : NULL;
> > - if (xdg_desktop_dir ||
> > - (_SHAppendToUnixPath(szDesktopTarget, DesktopW) &&
> > - !stat(szDesktopTarget, &statFolder) &&
> S_ISDIR(statFolder.st_mode)))
> > + /* Check for:
> > + * '$HOME/XXXX' (IDS directory)
> > + * or '$HOME/XXXX' (XDG directory)
> > + * or '$HOME/XXXX' (MacOS directory)
> > + */
> > + target_ok = FALSE;
> > + strcpy(home_target, env_homedir);
> > + if (append_to_unix_path(home_target, MAKEINTRESOURCEW(ids_dir))
> > + && (stat(home_target, &stat_folder) != -1)
> > + && S_ISDIR(stat_folder.st_mode))
> > {
> > - hr = SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE,
> NULL,
> > - SHGFP_TYPE_DEFAULT, wszTempPath);
> > - if (SUCCEEDED(hr) && (pszDesktop =
> wine_get_unix_file_name(wszTempPath)))
> > - {
> > - remove(pszDesktop);
> > - if (xdg_desktop_dir)
> > - symlink(xdg_desktop_dir, pszDesktop);
> > - else
> > - symlink(szDesktopTarget, pszDesktop);
> > - heap_free(pszDesktop);
> > - }
> > + target_ok = TRUE;
> > + }
> > + else if (xdg_dir && stat(xdg_dir, &stat_folder))
> > + {
> > + strcpy(home_target, xdg_dir);
> > + /* Only link to the XDG directory, if it does not point directly
> > + * to the user's HOME directory (XDG specification fallback
> path). */
> > + target_ok = (stat_folder.st_ino != stat_home_folder.st_ino);
> > + }
> > + else
> > + {
> > + strcpy(home_target, env_homedir);
> > + target_ok = append_to_unix_path(home_target, ws_osx_dir)
> > + && (stat(home_target, &stat_folder) != -1)
> > + && S_ISDIR(stat_folder.st_mode);
> > }
> >
> > - /* Free resources allocated by XDG_UserDirLookup() */
> > - if (xdg_results)
> > + if (target_ok)
> > {
> > - for (i = 0; i < num; i++)
> > - heap_free(xdg_results[i]);
> > - heap_free(xdg_results);
> > + remove(prefix_dir);
> > + symlink(home_target, prefix_dir);
> > }
> > +
> > +
> > + if (prefix_dir) heap_free(prefix_dir);
> > }
> >
> > /***********************************************************
> *******************
> > @@ -6126,15 +6133,139 @@ static void register_system_knownfolders(void)
> > }
> > }
> >
> > +/**********************************************************
> ********************
> > + * parse_symlinks_env_variable [Internal]
> > + *
> > + * PARAMS
> > + * xdg_dir [I] Unix XDG directory name (without "XDG_" prefix and
> "_DIR" suffix).
> > + *
> > + * RETURNS
> > + * TRUE "WINESYMLINK" contains the specified XDG directory string.
> > + * FALSE "WINESYMLINK" does not contain the specified XDG directory
> string.
> > + * Any error condition.
> > + *
> > + * Note: "WINESYMLINK", defaults to "ALL", when unset. This enables all
> symlinks.
> > + * "WINESYMLINK" can also be manually set to "ALL", enabling all
> symlinks.
> > + *
> > + */
> > +static BOOL parse_symlinks_env_variable(const char * xdg_dir)
> > +{
> > + static const char * matchall_env_var = "ALL";
> > + static char env_var[MAX_PATH+1];
> > + static char * env_winesymlink = NULL;
> > + char * sstr, * sstr_stop, * tstr, * word_start = NULL;
> > + char seperator_ch = '\0';
> > + BOOL end_string, in_word = FALSE, matched = FALSE;
> > + size_t slength = 0, matchall_length, xdg_dir_slength;
> > +
> > + if (!xdg_dir) return matched;
> > +
> > + if (!env_winesymlink)
> > + {
> > + env_winesymlink = getenv("WINESYMLINK");
> > + if (!env_winesymlink) env_winesymlink = (char*)
> matchall_env_var;
> > + tstr = env_var;
> > + sstr_stop = env_winesymlink + MAX_PATH;
> > + for (sstr = env_winesymlink; *sstr && (sstr != sstr_stop);
> ++sstr)
> > + {
> > + if (!seperator_ch && (ispunct(*sstr) || isspace(*sstr)))
> > + seperator_ch = *sstr;
> > + if (!isalpha(*sstr)) continue;
> > +
> > + if (seperator_ch && in_word)
> > + {
> > + *tstr++ = seperator_ch;
> > + ++slength;
> > + }
> > + in_word = TRUE;
> > + seperator_ch = '\0';
> > + *tstr++ = toupper(*sstr);
> > + ++slength;
> > + }
> > + env_var[slength] = '\0';
> > + }
> > +
> > + TRACE("processed env variable: %s\n", debugstr_a(&env_var[0]));
> > + matchall_length = strlen(matchall_env_var);
> > + xdg_dir_slength = strlen(xdg_dir);
> > + end_string = !(env_var[0]);
> > + for (sstr = &env_var[0]; !end_string; ++sstr)
> > + {
> > + end_string = !(*(sstr+1));
> > + in_word = isalpha(*sstr);
> > + if (in_word && !word_start) word_start = sstr;
> > + in_word = in_word && !end_string;
> > + if (in_word || !word_start) continue;
> > +
> > + slength = ((size_t) (sstr-word_start))+(end_string ? 1 : 0);
> > + matched = ( (slength == xdg_dir_slength) &&
> (strncmp(word_start, xdg_dir, slength) == 0) )
> > + || ( (slength == matchall_length) &&
> (strncmp(word_start, "ALL", slength) == 0) );
> > + if (matched) break;
> > +
> > + word_start = NULL;
> > + }
> > + TRACE("%s symlinking for %s\n", matched ? "Enabled" : "Disabled",
> debugstr_a(xdg_dir));
> > +
> > + return matched;
> > +}
> > +
> > +/**********************************************************
> ********************
> > + * create_homedir_symbolic_links [Internal]
> > + *
> > + * Parse WINESYMLINK env variable, for each XDG directory argument. To
> test if symlinking is
> > + * enabled for that XDG directory / Wine Profile Folder.
> > + * Then calls the function create_homedir_symbolic_link to potentially
> symlink from a Shell Folder,
> > + * in the current Wineprefix, to a subdirectory of the current user's
> HOME directory.
> > + *
> > + * PARAMS
> > + * xdg_dirnames [I] Pointer to an array of Unix XDG directory names
> > + * (without "XDG_" prefix and "_DIR" suffix).
> > + * xdg_dir_count [I] Item count of array (above).
> > + *
> > + */
> > +static void create_homedir_symbolic_links(const char * const
> xdg_dirnames[], const UINT xdg_dir_count)
> > +{
> > + char ** xdg_dirs_array;
> > + char * xdg_dir;
> > + HRESULT hr;
> > + UINT i;
> > + BOOL env_enabled;
> > +
> > + if (!xdg_dirnames) return;
> > +
> > + hr = XDG_UserDirLookup(xdg_dirnames, xdg_dir_count,
> &xdg_dirs_array);
> > + if (FAILED(hr)) xdg_dirs_array = NULL;
> > +
> > + for (i = 0; i < xdg_dir_count; ++i)
> > + {
> > + env_enabled = parse_symlinks_env_variable(xdg_dirnames[i]);
> > + xdg_dir = xdg_dirs_array ? xdg_dirs_array[i] : NULL;
> > + if (!strcmp(xdg_dirnames[i],"DOCUMENTS"))
> > + create_homedir_symbolic_link(env_enabled, IDS_PERSONAL,
> CSIDL_PERSONAL, xdg_dir, DocumentsW);
> > + else if (!strcmp(xdg_dirnames[i],"PICTURES"))
> > + create_homedir_symbolic_link(env_enabled, IDS_MYPICTURES,
> CSIDL_MYPICTURES, xdg_dir, PicturesW);
> > + else if (!strcmp(xdg_dirnames[i],"VIDEOS"))
> > + create_homedir_symbolic_link(env_enabled, IDS_MYVIDEOS,
> CSIDL_MYVIDEO, xdg_dir, MoviesW);
> > + else if (!strcmp(xdg_dirnames[i],"MUSIC"))
> > + create_homedir_symbolic_link(env_enabled, IDS_MYMUSIC,
> CSIDL_MYMUSIC, xdg_dir, MusicW);
> > + else if (!strcmp(xdg_dirnames[i],"DESKTOP"))
> > + create_homedir_symbolic_link(env_enabled,
> IDS_DESKTOPDIRECTORY, CSIDL_DESKTOPDIRECTORY, xdg_dir, DesktopW);
> > + else
> > + ERR("XDG directory name specifier invalid: %s\n",
> debugstr_a(xdg_dirnames[i]));
> > + if (xdg_dir) heap_free(xdg_dirs_array[i]);
> > + }
> > + if (xdg_dirs_array) heap_free(xdg_dirs_array);
> > +}
> > +
> > HRESULT SHELL_RegisterShellFolders(void)
> > {
> > + static const char * const xdg_dirnames[] = { "DOCUMENTS",
> "PICTURES", "VIDEOS", "MUSIC", "DESKTOP" };
> > + const UINT xdg_dir_count = 5;
> > HRESULT hr;
> >
> > - /* Set up '$HOME' targeted symlinks for 'My Documents', 'My
> Pictures',
> > - * 'My Videos', 'My Music' and 'Desktop' in advance, so that the
> > - * _SHRegister*ShellFolders() functions will find everything nice
> and clean
> > - * and thus will not attempt to create them in the profile
> directory. */
> > - _SHCreateSymbolicLinks();
> > + /* Early setup of symlinks from specific User Shell Folders, in
> > + * current Wineprefix, to subdirecties of the user's HOME
> directory. */
> > + create_homedir_symbolic_links(xdg_dirnames, xdg_dir_count);
> >
> > hr = _SHRegisterUserShellFolders(TRUE);
> > if (SUCCEEDED(hr))
> > @@ -6147,5 +6278,6 @@ HRESULT SHELL_RegisterShellFolders(void)
> > hr = set_folder_attributes();
> > if (SUCCEEDED(hr))
> > register_system_knownfolders();
> > +
> > return hr;
> > }
> > --
> > 2.17.1
> >
> >
> >
>
June 7, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Henri Verbeet
On 6 June 2018 at 00:32, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
> ---
> dlls/wined3d/glsl_shader.c | 116 ++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 109 insertions(+), 7 deletions(-)
>
This fails the tests here:
../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
d3d10core.dll -p d3d10core_test.exe.so device && touch device.ok
device.c:11300: Test failed: Got 0xff0000ff, expected 0xff00ff00 at
(0, 0), sub-resource 0.
device.c:11307: Test failed: Got 0xff0000ff, expected 0xff00ff00 at
(0, 0), sub-resource 0.
../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
d3d11.dll -p d3d11_test.exe.so d3d11 && touch d3d11.ok
d3d11.c:14777: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0,
0, 0), sub-resource 0.
d3d11.c:14784: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0,
0, 0), sub-resource 0.
d3d11.c:20644: Tests skipped: Raw buffers are not supported.
d3d11.c:20644: Tests skipped: Raw buffers are not supported.
June 7, 2018
Re: [PATCH vkd3d] libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 7, 2018
Re: [PATCH vkd3d] libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.
by Józef Kucia
On Thu, Jun 7, 2018 at 4:03 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
> On 7 June 2018 at 15:52, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
>> + if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D
>> + && desc->Width == desc->Height && desc->DepthOrArraySize >= 6)
>> image_info.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
> Should that be a multiple of 6? I.e., are partial cubemap arrays a
> thing in Direct3D 12?
I think you can create a cube shader resource view for 2D textures,
even if the array size is not a multiple of 6. At least, it works that
way in Direct3D 11. We have some tests in
test_create_shader_resource_view().
June 7, 2018
Re: [PATCH vkd3d] libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.
by Henri Verbeet
On 7 June 2018 at 15:52, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
> + if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D
> + && desc->Width == desc->Height && desc->DepthOrArraySize >= 6)
> image_info.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
Should that be a multiple of 6? I.e., are partial cubemap arrays a
thing in Direct3D 12?
June 7, 2018
[PATCH vkd3d] libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
libs/vkd3d/resource.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index acd3bada63ec..2ccb84797514 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -132,7 +132,8 @@ static HRESULT vkd3d_create_image(struct d3d12_resource *resource, struct d3d12_
image_info.flags = 0;
if (!(desc->Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) && dxgi_format_is_typeless(desc->Format))
image_info.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
- if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D && desc->Width == desc->Height)
+ if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D
+ && desc->Width == desc->Height && desc->DepthOrArraySize >= 6)
image_info.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
image_info.imageType = vk_image_type_from_d3d12_resource_dimension(desc->Dimension);
--
2.16.4
June 7, 2018
Re: [PATCH v2 1/4] kernel32: Return BIOS info from GetSystemFirmwareTable on Linux
by Huw Davies
On Mon, May 28, 2018 at 10:05:26PM -0600, Alex Henrie wrote:
> /***********************************************************************
> * GetSystemFirmwareTable (KERNEL32.@)
> */
> UINT WINAPI GetSystemFirmwareTable(DWORD provider, DWORD id, PVOID buffer, DWORD size)
> {
> - FIXME("(%d %d %p %d):stub\n", provider, id, buffer, size);
> + FIXME("(%08x %08x %p %d): semi-stub\n", provider, id, buffer, size);
This should probably be forwarded to
NtQuerySystemInformation(SystemFirmwareTableInformation, ...).
Huw.
June 7, 2018
Re: [PATCH] shellpath.c: Fix creation of HOME directory symbolic links
by Huw Davies
On Wed, Jun 06, 2018 at 08:46:49AM +0100, Rob Walker wrote:
> Fixes: https://bugs.winehq.org/show_bug.cgi?id=41668 (1)
> https://bugs.winehq.org/show_bug.cgi?id=28216 (2)
>
> (1) Introduces a "WINESYMLINK" env variable that allows a user to
> control what shell folder links are created to the HOME folder, when
> a WINEPREFIX is initially created.
> The Wineprefix Shell Folders, that Wine symlinks to the user's HOME directory,
> are only (re-)created on each Wine boot if they: do not pre-exist or are broken
> symbolic links.
>
> (2) The XDG Directory specification automatically falls back to the user HOME
> directory for any XDG_*_DIR that does not exist (xdg-user-dirs-update).
> The implemented solution is to block Wine from symlinking directly
> to HOME directory.
Hi Rob,
There's an awful lot going on in this patch which makes it very
difficult to review. Please avoid re-naming and re-indenting
existing functions so that we can actually see the real changes.
Then please split the changes into separate patches. A clue
that you're not doing this is that you have a list of two
items in the commit message. If the patch is doing two
things, it should be two patches.
Huw.
>
> Test on Gentoo GNU/Linux.
>
> Signed-off-by: Rob Walker <bob.mt.wya(a)gmail.com>
> ---
> dlls/shell32/shellpath.c | 554 ++++++++++++++++++++++++---------------
> 1 file changed, 343 insertions(+), 211 deletions(-)
>
> diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
> index a551e93aa8..b8c74273c6 100644
> --- a/dlls/shell32/shellpath.c
> +++ b/dlls/shell32/shellpath.c
> @@ -4326,252 +4326,259 @@ static HRESULT _SHRegisterCommonShellFolders(void)
> }
>
> /******************************************************************************
> - * _SHAppendToUnixPath [Internal]
> + * append_to_unix_path [Internal]
> *
> - * Helper function for _SHCreateSymbolicLinks. Appends pwszSubPath (or the
> - * corresponding resource, if IS_INTRESOURCE) to the unix base path 'szBasePath'
> - * and replaces backslashes with slashes.
> + * Helper function for create_home_subdir_symbolic_link.
> + * Appends 'subpath', or the corresponding resource (if it is a
> + * resource identifier), to the Unix base path 'base_dir'.
> + * Replace backslashes with forward slashes.
> *
> * PARAMS
> - * szBasePath [IO] The unix base path, which will be appended to (CP_UNXICP).
> - * pwszSubPath [I] Sub-path or resource id (use MAKEINTRESOURCEW).
> + * base_dir [IO] The Unix base path, which will be appended to (CP_UNXICP).
> + * subpath [I] Sub-path or resource id (use MAKEINTRESOURCEW, pre-call).
> *
> * RETURNS
> - * Success: TRUE,
> + * Success: TRUE
> * Failure: FALSE
> */
> -static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) {
> - WCHAR wszSubPath[MAX_PATH];
> - int cLen = strlen(szBasePath);
> - char *pBackslash;
> -
> - if (IS_INTRESOURCE(pwszSubPath)) {
> - if (!LoadStringW(shell32_hInstance, LOWORD(pwszSubPath), wszSubPath, MAX_PATH)) {
> - /* Fall back to hard coded defaults. */
> - switch (LOWORD(pwszSubPath)) {
> - case IDS_PERSONAL:
> - lstrcpyW(wszSubPath, DocumentsW);
> - break;
> - case IDS_MYMUSIC:
> - lstrcpyW(wszSubPath, My_MusicW);
> - break;
> - case IDS_MYPICTURES:
> - lstrcpyW(wszSubPath, My_PicturesW);
> - break;
> - case IDS_MYVIDEOS:
> - lstrcpyW(wszSubPath, My_VideosW);
> - break;
> - default:
> - ERR("LoadString(%d) failed!\n", LOWORD(pwszSubPath));
> - return FALSE;
> - }
> +static inline BOOL append_to_unix_path(char *base_dir, LPCWSTR subpath)
> +{
> + WCHAR ws_subpath[MAX_PATH];
> + int cLen = strlen(base_dir);
> + char *back_slash;
> +
> + if (!IS_INTRESOURCE(subpath))
> + {
> + lstrcpyW(ws_subpath, subpath);
> + }
> + else if (!LoadStringW(shell32_hInstance, LOWORD(subpath), ws_subpath, MAX_PATH))
> + {
> + /* Fall back to hard coded defaults. */
> + switch (LOWORD(subpath)) {
> + case IDS_PERSONAL:
> + lstrcpyW(ws_subpath, DocumentsW);
> + break;
> + case IDS_MYMUSIC:
> + lstrcpyW(ws_subpath, My_MusicW);
> + break;
> + case IDS_MYPICTURES:
> + lstrcpyW(ws_subpath, My_PicturesW);
> + break;
> + case IDS_MYVIDEOS:
> + lstrcpyW(ws_subpath, My_VideosW);
> + break;
> + case IDS_DESKTOP:
> + lstrcpyW(ws_subpath, DesktopW);
> + break;
> + default:
> + ERR("LoadString(%d) failed!\n", LOWORD(subpath));
> + return FALSE;
> }
> - } else {
> - lstrcpyW(wszSubPath, pwszSubPath);
> }
> -
> - if (szBasePath[cLen-1] != '/') szBasePath[cLen++] = '/';
> -
> - if (!WideCharToMultiByte(CP_UNIXCP, 0, wszSubPath, -1, szBasePath + cLen,
> +
> + if (!cLen || (base_dir[cLen-1] != '/')) base_dir[cLen++] = '/';
> +
> + if (!WideCharToMultiByte(CP_UNIXCP, 0, ws_subpath, -1, base_dir + cLen,
> FILENAME_MAX - cLen, NULL, NULL))
> {
> return FALSE;
> }
> -
> - pBackslash = szBasePath + cLen;
> - while ((pBackslash = strchr(pBackslash, '\\'))) *pBackslash = '/';
> -
> +
> + back_slash = base_dir + cLen;
> + while ((back_slash = strchr(back_slash, '\\'))) *back_slash = '/';
> +
> return TRUE;
> }
>
> /******************************************************************************
> - * _SHCreateSymbolicLinks [Internal]
> + * compare_pathft_to_bootft [Internal]
> *
> - * Sets up symbol links for various shell folders to point into the users home
> - * directory. We do an educated guess about what the user would probably want:
> - * - If there is a 'My Documents' directory in $HOME, the user probably wants
> - * wine's 'My Documents' to point there. Furthermore, we imply that the user
> - * is a Windows lover and has no problem with wine creating 'My Pictures',
> - * 'My Music' and 'My Videos' subfolders under '$HOME/My Documents', if those
> - * do not already exits. We put appropriate symbolic links in place for those,
> - * too.
> - * - If there is no 'My Documents' directory in $HOME, we let 'My Documents'
> - * point directly to $HOME. We assume the user to be a unix hacker who does not
> - * want wine to create anything anywhere besides the .wine directory. So, if
> - * there already is a 'My Music' directory in $HOME, we symlink the 'My Music'
> - * shell folder to it. But if not, then we check XDG_MUSIC_DIR - "well known"
> - * directory, and try to link to that. If that fails, then we symlink to
> - * $HOME directly. The same holds fo 'My Pictures' and 'My Videos'.
> - * - The Desktop shell folder is symlinked to XDG_DESKTOP_DIR. If that does not
> - * exist, then we try '$HOME/Desktop'. If that does not exist, then we leave
> - * it alone.
> - * ('My Music',... above in fact means LoadString(IDS_MYMUSIC))
> + * Function to compare the FILETIME of ws_path (a Windows path) to the (estimated)
> + * Wine System boot time.
> + *
> + * PARAMS
> + * ws_path [I] The Windows path, for which provides the FS write time.
> + * time_difference [O] -1 Windows path last written before time of Wine boot.
> + * 0 Windows path last written at time of Wine boot.
> + * +1 Windows path last written after time of Wine boot.
> + * RETURNS
> + * Success: S_OK
> + * Failure: E_FAIL
> + *
> + * NOTES
> + * Pre-allocate storage for time_difference pointer variable externally.
> */
> -static void _SHCreateSymbolicLinks(void)
> -{
> - UINT aidsMyStuff[] = { IDS_MYPICTURES, IDS_MYVIDEOS, IDS_MYMUSIC }, i;
> - const WCHAR* MyOSXStuffW[] = { PicturesW, MoviesW, MusicW };
> - int acsidlMyStuff[] = { CSIDL_MYPICTURES, CSIDL_MYVIDEO, CSIDL_MYMUSIC };
> - static const char * const xdg_dirs[] = { "PICTURES", "VIDEOS", "MUSIC", "DOCUMENTS", "DESKTOP" };
> - static const unsigned int num = ARRAY_SIZE(xdg_dirs);
> - WCHAR wszTempPath[MAX_PATH];
> - char szPersonalTarget[FILENAME_MAX], *pszPersonal;
> - char szMyStuffTarget[FILENAME_MAX], *pszMyStuff;
> - char szDesktopTarget[FILENAME_MAX], *pszDesktop;
> - struct stat statFolder;
> - const char *pszHome;
> - HRESULT hr;
> - char ** xdg_results;
> - char * xdg_desktop_dir;
> -
> - /* Create all necessary profile sub-dirs up to 'My Documents' and get the unix path. */
> - hr = SHGetFolderPathW(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL,
> - SHGFP_TYPE_DEFAULT, wszTempPath);
> - if (FAILED(hr)) return;
> - pszPersonal = wine_get_unix_file_name(wszTempPath);
> - if (!pszPersonal) return;
> +static HRESULT compare_pathft_to_bootft(const WCHAR * ws_path, int * time_difference)
> +{
> + static ULONG64 time_system_start = 0;
> + SYSTEMTIME system_time_st;
> + FILETIME dummy_ft, system_time_ft, last_write_ft;
> + ULONG64 tick_count, time_last_write;
> + HANDLE fhandle;
> + DWORD ft_errorc = 0;
>
> - hr = XDG_UserDirLookup(xdg_dirs, num, &xdg_results);
> - if (FAILED(hr)) xdg_results = NULL;
> + if (!time_difference) return E_FAIL;
>
> - pszHome = getenv("HOME");
> - if (pszHome && !stat(pszHome, &statFolder) && S_ISDIR(statFolder.st_mode))
> + if (!time_system_start)
> {
> - while (1)
> + tick_count = (ULONG64) GetTickCount64();
> + GetSystemTime(&system_time_st);
> + if (!SystemTimeToFileTime( &system_time_st, &system_time_ft))
> {
> - /* Check if there's already a Wine-specific 'My Documents' folder */
> - strcpy(szPersonalTarget, pszHome);
> - if (_SHAppendToUnixPath(szPersonalTarget, MAKEINTRESOURCEW(IDS_PERSONAL)) &&
> - !stat(szPersonalTarget, &statFolder) && S_ISDIR(statFolder.st_mode))
> - {
> - /* '$HOME/My Documents' exists. Create 'My Pictures',
> - * 'My Videos' and 'My Music' subfolders or fail silently if
> - * they already exist.
> - */
> - for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++)
> - {
> - strcpy(szMyStuffTarget, szPersonalTarget);
> - if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])))
> - mkdir(szMyStuffTarget, 0777);
> - }
> - break;
> - }
> -
> - /* Try to point to the XDG Documents folder */
> - if (xdg_results && xdg_results[num-2] &&
> - !stat(xdg_results[num-2], &statFolder) &&
> - S_ISDIR(statFolder.st_mode))
> - {
> - strcpy(szPersonalTarget, xdg_results[num-2]);
> - break;
> - }
> -
> - /* Or the hardcoded / OS X Documents folder */
> - strcpy(szPersonalTarget, pszHome);
> - if (_SHAppendToUnixPath(szPersonalTarget, DocumentsW) &&
> - !stat(szPersonalTarget, &statFolder) &&
> - S_ISDIR(statFolder.st_mode))
> - break;
> -
> - /* As a last resort point to $HOME. */
> - strcpy(szPersonalTarget, pszHome);
> - break;
> + ERR("SystemTimeToFileTime call failed (%d)\n", GetLastError());
> + return E_FAIL;
> }
> -
> - /* Replace 'My Documents' directory with a symlink or fail silently if not empty. */
> - remove(pszPersonal);
> - symlink(szPersonalTarget, pszPersonal);
> + time_system_start = (((ULONG64)system_time_ft.dwHighDateTime) << 32)
> + + system_time_ft.dwLowDateTime
> + - (tick_count * 10000);
> }
> - else
> + fhandle = CreateFileW( ws_path, 0, FILE_SHARE_READ, NULL,
> + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
> + if (fhandle == INVALID_HANDLE_VALUE)
> {
> - /* '$HOME' doesn't exist. Create 'My Pictures', 'My Videos' and 'My Music' subdirs
> - * in '%USERPROFILE%\\My Documents' or fail silently if they already exist. */
> - pszHome = NULL;
> - strcpy(szPersonalTarget, pszPersonal);
> - for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++) {
> - strcpy(szMyStuffTarget, szPersonalTarget);
> - if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])))
> - mkdir(szMyStuffTarget, 0777);
> - }
> + ERR("Open file handle failed for path: %s (%d)\n",
> + debugstr_w(ws_path), GetLastError());
> + return E_FAIL;
> }
> -
> - /* Create symbolic links for 'My Pictures', 'My Videos' and 'My Music'. */
> - for (i=0; i < ARRAY_SIZE(aidsMyStuff); i++)
> + if (!GetFileTime(fhandle, &dummy_ft, &dummy_ft, &last_write_ft))
> + ft_errorc = GetLastError();
> + if (!CloseHandle(fhandle))
> {
> - /* Create the current 'My Whatever' folder and get its unix path. */
> - hr = SHGetFolderPathW(NULL, acsidlMyStuff[i]|CSIDL_FLAG_CREATE, NULL,
> - SHGFP_TYPE_DEFAULT, wszTempPath);
> - if (FAILED(hr)) continue;
> -
> - pszMyStuff = wine_get_unix_file_name(wszTempPath);
> - if (!pszMyStuff) continue;
> -
> - while (1)
> - {
> - /* Check for the Wine-specific '$HOME/My Documents' subfolder */
> - strcpy(szMyStuffTarget, szPersonalTarget);
> - if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])) &&
> - !stat(szMyStuffTarget, &statFolder) && S_ISDIR(statFolder.st_mode))
> - break;
> + ERR("Close file handle failed: %p (%d)\n",
> + fhandle, GetLastError());
> + return E_FAIL;
> + }
> + if (ft_errorc)
> + {
> + ERR("Get file time failed: %p (%d)\n",
> + fhandle, ft_errorc);
> + return E_FAIL;
> + }
> + time_last_write = (((ULONG64)last_write_ft.dwHighDateTime) << 32)
> + + last_write_ft.dwLowDateTime;
> + *time_difference = ((time_last_write > time_system_start) ? 1 :
> + ((time_last_write < time_system_start) ? -1 :
> + 0));
>
> - /* Try the XDG_XXX_DIR folder */
> - if (xdg_results && xdg_results[i])
> - {
> - strcpy(szMyStuffTarget, xdg_results[i]);
> - break;
> - }
> + return S_OK;
> +}
>
> - /* Or the OS X folder (these are never localized) */
> - if (pszHome)
> - {
> - strcpy(szMyStuffTarget, pszHome);
> - if (_SHAppendToUnixPath(szMyStuffTarget, MyOSXStuffW[i]) &&
> - !stat(szMyStuffTarget, &statFolder) &&
> - S_ISDIR(statFolder.st_mode))
> - break;
> - }
> +/******************************************************************************
> + * create_homedir_symbolic_link [Internal]
> + *
> + * Creates a symbolic link from the current Wineprefix to an appropriate
> + * HOME subdirectory (if one is found).
> + *
> + * Creates 'XXXX' directory in Wineprefix.
> + * Then create a 'My XXXX' symbolic link in Wineprefix:
> + * 1) If '$HOME/XXXX' (IDS directory) exists then target this.
> + * 2) If '$HOME/XXXX' (XDG_XXXX_DIR) exists then target this.
> + * 3) If '$HOME/XXXX' (MacOS XXXX media directory) exists then target this.
> + *
> + * PARAMS
> + * env_enabled [I]
> + * TRUE The user has enabled this Shell Folder to be symlinked (default).
> + * FALSE The user has chosen to disable symlinking this Shell Folder.
> + * The Shell Folder will be created, in the current Wineprefix (if not pre-existing).
> + * ids_dir [I] Windows Resource Identifier code for current Shell Folder.
> + * csidl_dir [I] Constant Special Item ID List identifier for current Shell Folder.
> + * xdg_dir [I] Full path of external Unix XDG directory corresponding to current Shell Folder.
> + * ws_osx_dir [I] Fallback directory name to use, corresponding to current Shell Folder (OSX specific).
> + *
> + */
> +void create_homedir_symbolic_link(BOOL env_enabled,
> + UINT ids_dir,
> + int csidl_dir,
> + const char * xdg_dir,
> + const WCHAR * ws_osx_dir)
> +{
> + static const char * env_homedir = NULL;
> + WCHAR ws_temp_path[MAX_PATH];
> + char home_target[FILENAME_MAX], * prefix_dir;
> + struct stat stat_folder, stat_home_folder;
> + HRESULT hr;
> + BOOL target_ok;
> + int time_difference;
>
> - /* As a last resort point to the same location as 'My Documents' */
> - strcpy(szMyStuffTarget, szPersonalTarget);
> - break;
> + hr = SHGetFolderPathW(NULL, csidl_dir, NULL,
> + SHGFP_TYPE_DEFAULT, ws_temp_path);
> + if (SUCCEEDED(hr))
> + {
> + if (ids_dir != IDS_DESKTOPDIRECTORY) return;
> +
> + if ((compare_pathft_to_bootft(ws_temp_path, &time_difference) == S_OK)
> + && (time_difference < 0))
> + {
> + TRACE("%s directory created before wineboot\n",
> + debugstr_w(ws_temp_path));
> + return;
> }
> - remove(pszMyStuff);
> - symlink(szMyStuffTarget, pszMyStuff);
> - heap_free(pszMyStuff);
> }
> -
> - /* Last but not least, the Desktop folder */
> - if (pszHome)
> - strcpy(szDesktopTarget, pszHome);
> + else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
> + {
> + hr = SHGetFolderPathW(NULL, csidl_dir|CSIDL_FLAG_CREATE, NULL,
> + SHGFP_TYPE_DEFAULT, ws_temp_path);
> + if (FAILED(hr)) return;
> + }
> else
> - strcpy(szDesktopTarget, pszPersonal);
> - heap_free(pszPersonal);
> + {
> + ERR("Failed to get Wineprefix path corresponding to %d CSIDL\n",
> + csidl_dir);
> + return;
> + }
> + if (!env_enabled) return;
> + prefix_dir = wine_get_unix_file_name(ws_temp_path);
> + if (!prefix_dir)
> + {
> + ERR("Failed to get Unix Wineprefix directory for: %s\n",
> + debugstr_w(ws_temp_path));
> + return;
> + }
> + if (!env_homedir) env_homedir = getenv("HOME");
> + if (!(env_homedir
> + && (stat(env_homedir, &stat_home_folder) != 1)
> + && S_ISDIR(stat_home_folder.st_mode)))
> + {
> + if (prefix_dir) heap_free(prefix_dir);
> + return;
> + }
>
> - xdg_desktop_dir = xdg_results ? xdg_results[num - 1] : NULL;
> - if (xdg_desktop_dir ||
> - (_SHAppendToUnixPath(szDesktopTarget, DesktopW) &&
> - !stat(szDesktopTarget, &statFolder) && S_ISDIR(statFolder.st_mode)))
> + /* Check for:
> + * '$HOME/XXXX' (IDS directory)
> + * or '$HOME/XXXX' (XDG directory)
> + * or '$HOME/XXXX' (MacOS directory)
> + */
> + target_ok = FALSE;
> + strcpy(home_target, env_homedir);
> + if (append_to_unix_path(home_target, MAKEINTRESOURCEW(ids_dir))
> + && (stat(home_target, &stat_folder) != -1)
> + && S_ISDIR(stat_folder.st_mode))
> {
> - hr = SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, NULL,
> - SHGFP_TYPE_DEFAULT, wszTempPath);
> - if (SUCCEEDED(hr) && (pszDesktop = wine_get_unix_file_name(wszTempPath)))
> - {
> - remove(pszDesktop);
> - if (xdg_desktop_dir)
> - symlink(xdg_desktop_dir, pszDesktop);
> - else
> - symlink(szDesktopTarget, pszDesktop);
> - heap_free(pszDesktop);
> - }
> + target_ok = TRUE;
> + }
> + else if (xdg_dir && stat(xdg_dir, &stat_folder))
> + {
> + strcpy(home_target, xdg_dir);
> + /* Only link to the XDG directory, if it does not point directly
> + * to the user's HOME directory (XDG specification fallback path). */
> + target_ok = (stat_folder.st_ino != stat_home_folder.st_ino);
> + }
> + else
> + {
> + strcpy(home_target, env_homedir);
> + target_ok = append_to_unix_path(home_target, ws_osx_dir)
> + && (stat(home_target, &stat_folder) != -1)
> + && S_ISDIR(stat_folder.st_mode);
> }
>
> - /* Free resources allocated by XDG_UserDirLookup() */
> - if (xdg_results)
> + if (target_ok)
> {
> - for (i = 0; i < num; i++)
> - heap_free(xdg_results[i]);
> - heap_free(xdg_results);
> + remove(prefix_dir);
> + symlink(home_target, prefix_dir);
> }
> +
> +
> + if (prefix_dir) heap_free(prefix_dir);
> }
>
> /******************************************************************************
> @@ -6126,15 +6133,139 @@ static void register_system_knownfolders(void)
> }
> }
>
> +/******************************************************************************
> + * parse_symlinks_env_variable [Internal]
> + *
> + * PARAMS
> + * xdg_dir [I] Unix XDG directory name (without "XDG_" prefix and "_DIR" suffix).
> + *
> + * RETURNS
> + * TRUE "WINESYMLINK" contains the specified XDG directory string.
> + * FALSE "WINESYMLINK" does not contain the specified XDG directory string.
> + * Any error condition.
> + *
> + * Note: "WINESYMLINK", defaults to "ALL", when unset. This enables all symlinks.
> + * "WINESYMLINK" can also be manually set to "ALL", enabling all symlinks.
> + *
> + */
> +static BOOL parse_symlinks_env_variable(const char * xdg_dir)
> +{
> + static const char * matchall_env_var = "ALL";
> + static char env_var[MAX_PATH+1];
> + static char * env_winesymlink = NULL;
> + char * sstr, * sstr_stop, * tstr, * word_start = NULL;
> + char seperator_ch = '\0';
> + BOOL end_string, in_word = FALSE, matched = FALSE;
> + size_t slength = 0, matchall_length, xdg_dir_slength;
> +
> + if (!xdg_dir) return matched;
> +
> + if (!env_winesymlink)
> + {
> + env_winesymlink = getenv("WINESYMLINK");
> + if (!env_winesymlink) env_winesymlink = (char*) matchall_env_var;
> + tstr = env_var;
> + sstr_stop = env_winesymlink + MAX_PATH;
> + for (sstr = env_winesymlink; *sstr && (sstr != sstr_stop); ++sstr)
> + {
> + if (!seperator_ch && (ispunct(*sstr) || isspace(*sstr)))
> + seperator_ch = *sstr;
> + if (!isalpha(*sstr)) continue;
> +
> + if (seperator_ch && in_word)
> + {
> + *tstr++ = seperator_ch;
> + ++slength;
> + }
> + in_word = TRUE;
> + seperator_ch = '\0';
> + *tstr++ = toupper(*sstr);
> + ++slength;
> + }
> + env_var[slength] = '\0';
> + }
> +
> + TRACE("processed env variable: %s\n", debugstr_a(&env_var[0]));
> + matchall_length = strlen(matchall_env_var);
> + xdg_dir_slength = strlen(xdg_dir);
> + end_string = !(env_var[0]);
> + for (sstr = &env_var[0]; !end_string; ++sstr)
> + {
> + end_string = !(*(sstr+1));
> + in_word = isalpha(*sstr);
> + if (in_word && !word_start) word_start = sstr;
> + in_word = in_word && !end_string;
> + if (in_word || !word_start) continue;
> +
> + slength = ((size_t) (sstr-word_start))+(end_string ? 1 : 0);
> + matched = ( (slength == xdg_dir_slength) && (strncmp(word_start, xdg_dir, slength) == 0) )
> + || ( (slength == matchall_length) && (strncmp(word_start, "ALL", slength) == 0) );
> + if (matched) break;
> +
> + word_start = NULL;
> + }
> + TRACE("%s symlinking for %s\n", matched ? "Enabled" : "Disabled", debugstr_a(xdg_dir));
> +
> + return matched;
> +}
> +
> +/******************************************************************************
> + * create_homedir_symbolic_links [Internal]
> + *
> + * Parse WINESYMLINK env variable, for each XDG directory argument. To test if symlinking is
> + * enabled for that XDG directory / Wine Profile Folder.
> + * Then calls the function create_homedir_symbolic_link to potentially symlink from a Shell Folder,
> + * in the current Wineprefix, to a subdirectory of the current user's HOME directory.
> + *
> + * PARAMS
> + * xdg_dirnames [I] Pointer to an array of Unix XDG directory names
> + * (without "XDG_" prefix and "_DIR" suffix).
> + * xdg_dir_count [I] Item count of array (above).
> + *
> + */
> +static void create_homedir_symbolic_links(const char * const xdg_dirnames[], const UINT xdg_dir_count)
> +{
> + char ** xdg_dirs_array;
> + char * xdg_dir;
> + HRESULT hr;
> + UINT i;
> + BOOL env_enabled;
> +
> + if (!xdg_dirnames) return;
> +
> + hr = XDG_UserDirLookup(xdg_dirnames, xdg_dir_count, &xdg_dirs_array);
> + if (FAILED(hr)) xdg_dirs_array = NULL;
> +
> + for (i = 0; i < xdg_dir_count; ++i)
> + {
> + env_enabled = parse_symlinks_env_variable(xdg_dirnames[i]);
> + xdg_dir = xdg_dirs_array ? xdg_dirs_array[i] : NULL;
> + if (!strcmp(xdg_dirnames[i],"DOCUMENTS"))
> + create_homedir_symbolic_link(env_enabled, IDS_PERSONAL, CSIDL_PERSONAL, xdg_dir, DocumentsW);
> + else if (!strcmp(xdg_dirnames[i],"PICTURES"))
> + create_homedir_symbolic_link(env_enabled, IDS_MYPICTURES, CSIDL_MYPICTURES, xdg_dir, PicturesW);
> + else if (!strcmp(xdg_dirnames[i],"VIDEOS"))
> + create_homedir_symbolic_link(env_enabled, IDS_MYVIDEOS, CSIDL_MYVIDEO, xdg_dir, MoviesW);
> + else if (!strcmp(xdg_dirnames[i],"MUSIC"))
> + create_homedir_symbolic_link(env_enabled, IDS_MYMUSIC, CSIDL_MYMUSIC, xdg_dir, MusicW);
> + else if (!strcmp(xdg_dirnames[i],"DESKTOP"))
> + create_homedir_symbolic_link(env_enabled, IDS_DESKTOPDIRECTORY, CSIDL_DESKTOPDIRECTORY, xdg_dir, DesktopW);
> + else
> + ERR("XDG directory name specifier invalid: %s\n", debugstr_a(xdg_dirnames[i]));
> + if (xdg_dir) heap_free(xdg_dirs_array[i]);
> + }
> + if (xdg_dirs_array) heap_free(xdg_dirs_array);
> +}
> +
> HRESULT SHELL_RegisterShellFolders(void)
> {
> + static const char * const xdg_dirnames[] = { "DOCUMENTS", "PICTURES", "VIDEOS", "MUSIC", "DESKTOP" };
> + const UINT xdg_dir_count = 5;
> HRESULT hr;
>
> - /* Set up '$HOME' targeted symlinks for 'My Documents', 'My Pictures',
> - * 'My Videos', 'My Music' and 'Desktop' in advance, so that the
> - * _SHRegister*ShellFolders() functions will find everything nice and clean
> - * and thus will not attempt to create them in the profile directory. */
> - _SHCreateSymbolicLinks();
> + /* Early setup of symlinks from specific User Shell Folders, in
> + * current Wineprefix, to subdirecties of the user's HOME directory. */
> + create_homedir_symbolic_links(xdg_dirnames, xdg_dir_count);
>
> hr = _SHRegisterUserShellFolders(TRUE);
> if (SUCCEEDED(hr))
> @@ -6147,5 +6278,6 @@ HRESULT SHELL_RegisterShellFolders(void)
> hr = set_folder_attributes();
> if (SUCCEEDED(hr))
> register_system_knownfolders();
> +
> return hr;
> }
> --
> 2.17.1
>
>
>
June 7, 2018
Re: [PATCH] ntoskrnl: Have MmIsAddressValid use IsBadReadPtr.
by Thomas Faber
On 2018-06-06 17:11, Derek Lesho wrote:
> Hi Thomas, in your example, does &Base refer to the base of
> ntoskrnl.exe? If so, why are you allocating a buffer there, wouldn't
> that corrupt the memory of ntoskrnl, or am I misunderstanding what
> your code is doing. On windows, do drivers have access to change the
> memory of ntoskrnl?
My intention was to simply make a user mode memory allocation, so there
should be a "Base = NULL;" before the call to ZwAllocateVirtualMemory.
This function cannot allocate kernel address space (or overwrite loaded
modules), so it wouldn't do anything unexpected. I was just suggesting
it to demonstrate behavior with NOACCESS/READONLY/READWRITE pages.
As for your actual use case, I'd assume ntoskrnl's code is most likely
write-protected on Windows as well, much like you encountered on Wine,
but I haven't verified.
Since your patch was committed I don't know if you're still interested
in adding the test. If you are, I'd suggest to go with the simpler
second version, since like I said the "full test" won't be very useful
in Wine.
> On Wed, Jun 6, 2018 at 3:51 AM, Thomas Faber <thomas.faber(a)reactos.org> wrote:
>> void test_function()
>> {
>> ok(MmIsAddressValid((void*)test_function), ...); // fails in master, succeeds with patch?
>> ptr = ExAllocatePoolWithTag(NonPagedPool, ...)
>> ok(MmIsAddressValid(ptr), ...);
>> ExFreePoolWithTag...
>> ok(!MmIsAddressValid(NULL), ...);
>> }
Perhaps also
ok(MmIsAddressValid((void*)MmIsAddressValid), ...);
to specifically test ntoskrnl instead of the test driver's binary.
-Thomas
June 7, 2018
Re: [PATCH 3/4 v5] riched20: Support external HDC in ME_WrapMarkedParagraphs().
by Huw Davies
On Wed, Jun 06, 2018 at 05:24:31PM +0800, Jactry Zeng wrote:
> Superseded patch 146572.
>
> Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
> ---
> dlls/riched20/editor.c | 13 +++++++------
> dlls/riched20/editor.h | 2 +-
> dlls/riched20/editstr.h | 1 +
> dlls/riched20/paint.c | 10 +++++-----
> dlls/riched20/table.c | 4 ++--
> dlls/riched20/wrap.c | 11 +++++++++--
> 6 files changed, 25 insertions(+), 16 deletions(-)
>
> diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
> index 820b0380c7..82132761f0 100644
> --- a/dlls/riched20/editor.c
> +++ b/dlls/riched20/editor.c
> @@ -3028,6 +3028,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
>
> ed->hWnd = NULL;
> ed->hwndParent = NULL;
> + ed->hdcDraw = NULL;
> ed->sizeWindow.cx = ed->sizeWindow.cy = 0;
> ed->texthost = texthost;
> ed->reOle = NULL;
> @@ -3494,7 +3495,7 @@ static LRESULT ME_WmCreate(ME_TextEditor *editor, LPARAM lParam, BOOL unicode)
> }
>
> ME_CommitUndo(editor);
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_MoveCaret(editor);
> return 0;
> }
> @@ -3645,7 +3646,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
> cf.yHeight = size * 20; /* convert twips to points */
> ME_SetSelectionCharFormat(editor, &cf);
> ME_CommitUndo(editor);
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_UpdateScrollBar(editor);
> ME_Repaint(editor);
>
> @@ -3934,7 +3935,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
> ME_CommitUndo(editor);
> if (bRepaint)
> {
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_UpdateScrollBar(editor);
> ME_Repaint(editor);
> }
> @@ -3959,7 +3960,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
> case EM_SETPARAFORMAT:
> {
> BOOL result = ME_SetSelectionParaFormat(editor, (PARAFORMAT2 *)lParam);
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_UpdateScrollBar(editor);
> ME_Repaint(editor);
> ME_CommitUndo(editor);
> @@ -4054,7 +4055,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
>
> ME_CommitUndo(editor);
> ME_MarkAllForWrapping(editor);
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_UpdateScrollBar(editor);
> if (bRepaint)
> ME_Repaint(editor);
> @@ -4714,7 +4715,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
> editor->bDefaultFormatRect = TRUE;
> }
> ME_MarkAllForWrapping(editor);
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_UpdateScrollBar(editor);
> if (msg != EM_SETRECTNP)
> ME_Repaint(editor);
> diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
> index 0f0e56ecd1..425a34f0c2 100644
> --- a/dlls/riched20/editor.h
> +++ b/dlls/riched20/editor.h
> @@ -182,7 +182,7 @@ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC) DECLSPEC_HIDD
> void ME_DestroyContext(ME_Context *c) DECLSPEC_HIDDEN;
>
> /* wrap.c */
> -BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) DECLSPEC_HIDDEN;
> +BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor, HDC hdc) DECLSPEC_HIDDEN;
> void ME_InvalidateParagraphRange(ME_TextEditor *editor, ME_DisplayItem *start_para, ME_DisplayItem *last_para) DECLSPEC_HIDDEN;
> void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN;
>
> diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h
> index 206ce85287..1d811e1c2a 100644
> --- a/dlls/riched20/editstr.h
> +++ b/dlls/riched20/editstr.h
> @@ -383,6 +383,7 @@ typedef struct tagME_InStream ME_InStream;
> typedef struct tagME_TextEditor
> {
> HWND hWnd, hwndParent;
> + HDC hdcDraw;
> ITextHost *texthost;
> IRichEditOle *reOle;
> BOOL bEmulateVersion10;
> diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
> index fcc4e105a3..f2429081fc 100644
> --- a/dlls/riched20/paint.c
> +++ b/dlls/riched20/paint.c
> @@ -105,7 +105,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
>
> void ME_Repaint(ME_TextEditor *editor)
> {
> - if (ME_WrapMarkedParagraphs(editor))
> + if (ME_WrapMarkedParagraphs(editor, NULL))
> {
> ME_UpdateScrollBar(editor);
> FIXME("ME_Repaint had to call ME_WrapMarkedParagraphs\n");
> @@ -118,7 +118,7 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now)
> /* Should be called whenever the contents of the control have changed */
> BOOL wrappedParagraphs;
>
> - wrappedParagraphs = ME_WrapMarkedParagraphs(editor);
> + wrappedParagraphs = ME_WrapMarkedParagraphs(editor, NULL);
> if (wrappedParagraphs)
> ME_UpdateScrollBar(editor);
>
> @@ -145,7 +145,7 @@ ME_RewrapRepaint(ME_TextEditor *editor)
> * looks, but not content. Like resizing. */
>
> ME_MarkAllForWrapping(editor);
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_UpdateScrollBar(editor);
> ME_Repaint(editor);
> }
> @@ -1163,7 +1163,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
> SCROLLINFO si;
> BOOL bScrollBarWasVisible, bScrollBarWillBeVisible;
>
> - if (ME_WrapMarkedParagraphs(editor))
> + if (ME_WrapMarkedParagraphs(editor, NULL))
> FIXME("ME_UpdateScrollBar had to call ME_WrapMarkedParagraphs\n");
>
> si.cbSize = sizeof(si);
> @@ -1336,7 +1336,7 @@ ME_InvalidateSelection(ME_TextEditor *editor)
> there's no (inverted) area to be repainted, neither old nor new */
> if (nStart == nEnd && editor->nLastSelStart == editor->nLastSelEnd)
> return;
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> ME_GetSelectionParas(editor, &sel_start, &sel_end);
> assert(sel_start->type == diParagraph);
> assert(sel_end->type == diParagraph);
> diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c
> index 4cd77eb399..5457935dfa 100644
> --- a/dlls/riched20/table.c
> +++ b/dlls/riched20/table.c
> @@ -499,7 +499,7 @@ static void ME_SelectOrInsertNextCell(ME_TextEditor *editor,
> editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
> editor->pCursors[0].nOffset = 0;
> editor->pCursors[1] = editor->pCursors[0];
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> return;
> }
> }
> @@ -544,7 +544,7 @@ static void ME_SelectOrInsertNextCell(ME_TextEditor *editor,
> editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
> editor->pCursors[0].nOffset = 0;
> editor->pCursors[1] = editor->pCursors[0];
> - ME_WrapMarkedParagraphs(editor);
> + ME_WrapMarkedParagraphs(editor, NULL);
> return;
> }
> }
> diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c
> index e3a70f07d1..4c92252547 100644
> --- a/dlls/riched20/wrap.c
> +++ b/dlls/riched20/wrap.c
> @@ -980,14 +980,21 @@ static void ME_MarkRepaintEnd(ME_DisplayItem *para,
> *repaint_end = para;
> }
>
> -BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
> +BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor, HDC hdc)
> {
> ME_DisplayItem *item;
> ME_Context c;
> int totalWidth = 0;
> ME_DisplayItem *repaint_start = NULL, *repaint_end = NULL;
>
> - ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
> + if (!hdc)
> + hdc = ITextHost_TxGetDC(editor->texthost);
> + if (hdc != editor->hdcDraw)
> + {
> + ME_MarkAllForWrapping(editor);
> + editor->hdcDraw = hdc;
> + }
> + ME_InitContext(&c, editor, hdc);
> c.pt.x = 0;
> item = editor->pBuffer->pFirst->next;
> while(item != editor->pBuffer->pLast) {
Unfortunately it's more complicated than this because
the styles cache font metrics and uniscribe data. These
will need to be recalculated for a new hdc.
We'll probably also want to re-think how the windowed and window-less
controls handle hdcs in general.
Huw.
June 7, 2018
Re: [PATCH 1/4 v5] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
by Huw Davies
On Thu, Jun 07, 2018 at 05:21:25PM +0800, Jactry Zeng wrote:
> Huw Davies <huw(a)codeweavers.com> 于2018年6月7日周四 下午4:54写道:
> >
> > On Wed, Jun 06, 2018 at 05:24:13PM +0800, Jactry Zeng wrote:
> > > Superseded patch 146570.
> > >
>
> > > + LONG expected_width, expected_height;
> > > +
> > > + GetClientRect(WindowFromDC(hdc), &rect);
> > > + DrawTextW(hdc, string, -1, &rect, DT_LEFT | DT_CALCRECT | DT_NOCLIP | DT_EDITCONTROL | DT_WORDBREAK);
> >
> > Why can't you use GetTextExtentPointW() here? This would avoid the
> > GetClientRect() call too.
> >
>
> In 0003 there are some tests about multiline support. It seems that
> using DrawText can make it more simple or we will need to compute
> a max width of it by ourselves.
Ok, then please pass the client rect to CHECK_TXGETNATURALSIZE so that
it doesn't need to be queried from there.
Also, this patch series seems out-of-order. Perhaps move 0001 after
0002 and 0003 (or put 0004 before 0002 and 0003).
Huw.
June 7, 2018
Re: [PATCH 2/4 v5] riched20: Call ITextHost_TxGetCharFormat() for setting default charformat.
by Huw Davies
On Wed, Jun 06, 2018 at 05:24:22PM +0800, Jactry Zeng wrote:
> Superseded patch 146571.
>
> ChangeLog:
> v5:
> - Remove an unnecessary newline.
>
> Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
> ---
> dlls/riched20/para.c | 5 ++++
> dlls/riched20/tests/txtsrv.c | 58 +++++++++++++++++++++++++++++++++++-
> 2 files changed, 62 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
> index f2a70e5746..ffb017c123 100644
> --- a/dlls/riched20/para.c
> +++ b/dlls/riched20/para.c
> @@ -36,6 +36,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
> {
> ME_Context c;
> CHARFORMAT2W cf;
> + const CHARFORMATW *host_cf;
> LOGFONTW lf;
> HFONT hf;
> ME_TextBuffer *text = editor->pBuffer;
> @@ -44,6 +45,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
> ME_Style *style;
> int eol_len;
> WCHAR cr_lf[] = {'\r','\n',0};
> + HRESULT hr;
>
> ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
>
> @@ -73,6 +75,9 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
> cf.bCharSet = lf.lfCharSet;
> cf.lcid = GetSystemDefaultLCID();
>
> + hr = ITextHost_TxGetCharFormat(editor->texthost, (const CHARFORMATW **)&host_cf);
> + if (hr == S_OK && (host_cf->cbSize >= sizeof(CHARFORMATW)))
> + ME_ToCF2W(&cf, (CHARFORMAT2W *)host_cf);
Hmm, you need to use the return value of ME_ToCF2W() is this case.
However, ME_ToCF2W() and ME_ToCFAny() should be cleaned up. They
should both do the copy even if the from argument is of the
correct type (basically what ME_CopyToCFAny() does).
Something like:
BOOL cfany_to_cf2w(CHARFORMAT2W *dst, const *CHARFORMAT2W *src);
BOOL cf2w_to_cfany(CHARFORMAT2W *dst, const *CHARFORMAT2W *src);
> style = ME_MakeStyle(&cf);
> text->pDefaultStyle = style;
>
> diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
> index 6e61392dc5..ac06aa868e 100644
> --- a/dlls/riched20/tests/txtsrv.c
> +++ b/dlls/riched20/tests/txtsrv.c
> @@ -85,6 +85,7 @@ typedef struct ITextHostTestImpl
> {
> ITextHost ITextHost_iface;
> LONG refCount;
> + CHARFORMATW char_format;
> } ITextHostTestImpl;
>
> static inline ITextHostTestImpl *impl_from_ITextHost(ITextHost *iface)
> @@ -330,7 +331,8 @@ static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface,
> {
> ITextHostTestImpl *This = impl_from_ITextHost(iface);
> TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF);
> - return E_NOTIMPL;
> + *ppCF = &This->char_format;
> + return S_OK;
> }
>
> static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface,
> @@ -609,6 +611,8 @@ static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret)
> ITextHostTestImpl *dummyTextHost;
> IUnknown *init;
> HRESULT result;
> + LOGFONTW lf;
> + HFONT hf;
>
> dummyTextHost = CoTaskMemAlloc(sizeof(*dummyTextHost));
> if (dummyTextHost == NULL) {
> @@ -617,6 +621,19 @@ static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret)
> }
> dummyTextHost->ITextHost_iface.lpVtbl = &itextHostVtbl;
> dummyTextHost->refCount = 1;
> + memset(&dummyTextHost->char_format, 0, sizeof(dummyTextHost->char_format));
> + dummyTextHost->char_format.cbSize = sizeof(dummyTextHost->char_format);
> + dummyTextHost->char_format.dwMask = CFM_FACE | CFM_SIZE | CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT;
> + hf = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
No cast.
> + GetObjectW(hf, sizeof(LOGFONTW), &lf);
> + lstrcpyW(dummyTextHost->char_format.szFaceName, lf.lfFaceName);
> + dummyTextHost->char_format.yHeight = MulDiv(abs(lf.lfHeight), 1440, GetDeviceCaps(GetDC(NULL), LOGPIXELSY));
> + if (lf.lfWeight > FW_NORMAL) dummyTextHost->char_format.dwEffects |= CFE_BOLD;
> + if (lf.lfItalic) dummyTextHost->char_format.dwEffects |= CFE_ITALIC;
> + if (lf.lfUnderline) dummyTextHost->char_format.dwEffects |= CFE_UNDERLINE;
> + if (lf.lfStrikeOut) dummyTextHost->char_format.dwEffects |= CFE_SUBSCRIPT;
> + dummyTextHost->char_format.bPitchAndFamily = lf.lfPitchAndFamily;
> + dummyTextHost->char_format.bCharSet = lf.lfCharSet;
You do the same thing in the previous patch, so this should be a
helper function.
> /* MSDN states that an IUnknown object is returned by
> CreateTextServices which is then queried to obtain a
> @@ -947,6 +964,44 @@ static void test_QueryInterface(void)
> ITextHost_Release(host);
> }
>
> +static void test_default_format(void)
> +{
> + ITextServices *txtserv;
> + ITextHost *host;
> + HRESULT result;
> + LRESULT lresult;
> + CHARFORMAT2W cf2;
> + HFONT hf;
> + LOGFONTW lf;
> + LONG expected_height;
> +
> + if (!init_texthost(&txtserv, &host))
> + return;
> +
> + cf2.cbSize = sizeof(CHARFORMAT2W);
> + result = ITextServices_TxSendMessage(txtserv, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2, &lresult);
> + ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result);
> + hf = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
> + GetObjectW(hf, sizeof(LOGFONTW), &lf);
Rather than getting the font here, why not call ITextHost_GetCharFormat() ?
> + expected_height = MulDiv(abs(lf.lfHeight), 1440, GetDeviceCaps(GetDC(NULL), LOGPIXELSY));
> + ok(!lstrcmpW(lf.lfFaceName, cf2.szFaceName), "got wrong font name: %s.\n", wine_dbgstr_w(cf2.szFaceName));
> + ok(cf2.yHeight == expected_height, "got wrong yHeight: %d, expetced %d.\n", cf2.yHeight, expected_height);
> + if (lf.lfWeight > FW_NORMAL)
> + ok(cf2.dwEffects & CFE_BOLD, "got dwEffects without CFE_BOLD: %x.\n", cf2.dwEffects);
> + if (lf.lfItalic)
> + ok(cf2.dwEffects & CFE_ITALIC, "got dwEffects without CFE_ITALIC: %x.\n", cf2.dwEffects);
> + if (lf.lfUnderline)
> + ok(cf2.dwEffects & CFE_UNDERLINE, "got dwEffects without CFE_UNDERLINE: %x.\n", cf2.dwEffects);
> + if (lf.lfStrikeOut)
> + ok(cf2.dwEffects & CFE_STRIKEOUT, "got dwEffects without CFE_STRIKEOUT: %x.\n", cf2.dwEffects);
> + ok(cf2.bPitchAndFamily == lf.lfPitchAndFamily, "got wrong bPitchAndFamily: %x, expected %x.\n",
> + cf2.bPitchAndFamily, lf.lfPitchAndFamily);
> + ok(cf2.bCharSet == lf.lfCharSet, "got wrong bCharSet: %x, expected %x.\n", cf2.bCharSet, lf.lfCharSet);
> +
> + ITextServices_Release(txtserv);
> + ITextHost_Release(host);
> +}
> +
> START_TEST( txtsrv )
> {
> ITextServices *txtserv;
> @@ -977,6 +1032,7 @@ START_TEST( txtsrv )
> test_TxGetNaturalSize();
> test_TxDraw();
> test_QueryInterface();
> + test_default_format();
> }
> if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE);
> }
> --
> 2.17.1
>
>
>
>
June 7, 2018
Re: [PATCH 1/4 v5] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
by Jactry Zeng
Jactry Zeng <jactry92(a)gmail.com> 于2018年6月7日周四 下午5:21写道:
>
>
> In 0003 there are some tests about multiline support. It seems that
> using DrawText can make it more simple or we will need to compute
> a max width of it by ourselves.
Sorry, it is in 0004.
> --
> Regards,
> Jactry Zeng
--
Regards,
Jactry Zeng
June 7, 2018
Re: [PATCH 1/4 v5] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
by Jactry Zeng
Huw Davies <huw(a)codeweavers.com> 于2018年6月7日周四 下午4:54写道:
>
> On Wed, Jun 06, 2018 at 05:24:13PM +0800, Jactry Zeng wrote:
> > Superseded patch 146570.
> >
> > + LONG expected_width, expected_height;
> > +
> > + GetClientRect(WindowFromDC(hdc), &rect);
> > + DrawTextW(hdc, string, -1, &rect, DT_LEFT | DT_CALCRECT | DT_NOCLIP | DT_EDITCONTROL | DT_WORDBREAK);
>
> Why can't you use GetTextExtentPointW() here? This would avoid the
> GetClientRect() call too.
>
In 0003 there are some tests about multiline support. It seems that
using DrawText can make it more simple or we will need to compute
a max width of it by ourselves.
--
Regards,
Jactry Zeng
June 7, 2018
Re: [PATCH 1/2] schedsvc: Load job files at the service start up.
by Dmitry Timoshkov
There is a problem with this patchset, please ignore it for now.
--
Dmitry.
June 7, 2018
Re: [PATCH 1/4 v5] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
by Huw Davies
On Wed, Jun 06, 2018 at 05:24:13PM +0800, Jactry Zeng wrote:
> Superseded patch 146570.
>
> ChangeLog:
> v5:
> - Use DrawTextW for calculating expected values;
> - Simplify format setting with EM_SETCHARFORMAT.
>
> Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
> ---
> dlls/riched20/tests/txtsrv.c | 125 +++++++++++++++++------------------
> 1 file changed, 61 insertions(+), 64 deletions(-)
>
> diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
> index 88b5adf13c..6e61392dc5 100644
> --- a/dlls/riched20/tests/txtsrv.c
> +++ b/dlls/riched20/tests/txtsrv.c
> @@ -697,81 +697,78 @@ static void test_TxSetText(void)
> ITextHost_Release(host);
> }
>
> +#define CHECK_TXGETNATURALSIZE(res,width,height,hdc,string) \
> + _check_txgetnaturalsize(res, width, height, hdc, string, __LINE__)
> +static void _check_txgetnaturalsize(HRESULT res, LONG width, LONG height, HDC hdc, LPCWSTR string, int line)
> +{
> + RECT rect;
> + LONG expected_width, expected_height;
> +
> + GetClientRect(WindowFromDC(hdc), &rect);
> + DrawTextW(hdc, string, -1, &rect, DT_LEFT | DT_CALCRECT | DT_NOCLIP | DT_EDITCONTROL | DT_WORDBREAK);
Why can't you use GetTextExtentPointW() here? This would avoid the
GetClientRect() call too.
> + expected_width = rect.right - rect.left;
> + expected_height = rect.bottom - rect.top;
> + ok_(__FILE__,line)(res == S_OK, "ITextServices_TxGetNaturalSize failed: 0x%08x.\n", res);
> + ok_(__FILE__,line)(width >= expected_width && width <= expected_width + 1,
> + "got wrong width: %d, expected: %d {+1}.\n", width, expected_width);
> + ok_(__FILE__,line)(height == expected_height, "got wrong height: %d, expected: %d.\n",
> + height, expected_height);
> +}
> +
> static void test_TxGetNaturalSize(void)
> {
> ITextServices *txtserv;
> ITextHost *host;
> HRESULT result;
> - BOOL ret;
> -
> - /* This value is used when calling TxGetNaturalSize. MSDN says
> - that this is not supported however a null pointer cannot be
> - used as it will cause a segmentation violation. The values in
> - the structure being pointed to are required to be INT_MAX
> - otherwise calculations can give wrong values. */
> - const SIZEL psizelExtent = {INT_MAX,INT_MAX};
> -
> - static const WCHAR oneA[] = {'A',0};
> -
> - /* Results of measurements */
> - LONG xdim, ydim;
> -
> - /* The device context to do the tests in */
> + SIZEL psizelExtent = {-1,-1};
Let's just call this 'extent';
> + static const WCHAR test_text[] = {'T','e','s','t','S','o','m','e','T','e','x','t',0};
> + LONG width, height;
> HDC hdcDraw;
> -
> - /* Variables with the text metric information */
> - INT charwidth_caps_text[26];
> - TEXTMETRICA tmInfo_text;
> + HWND hwnd;
> + RECT rect;
> + CHARFORMAT2W cf;
> + LRESULT lresult;
> + HFONT hf;
> + LOGFONTW lf;
>
> if (!init_texthost(&txtserv, &host))
> return;
>
> - hdcDraw = GetDC(NULL);
> - SaveDC(hdcDraw);
> -
> - /* Populate the metric strucs */
> - SetMapMode(hdcDraw,MM_TEXT);
> - GetTextMetricsA(hdcDraw, &tmInfo_text);
> - SetLastError(0xdeadbeef);
> - ret = GetCharWidth32A(hdcDraw,'A','Z',charwidth_caps_text);
> - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) {
> - win_skip("GetCharWidth32 is not available\n");
> - goto cleanup;
> - }
> -
> - /* Make measurements in MM_TEXT */
> + hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
> + 0, 0, 100, 100, 0, 0, 0, NULL);
> + hdcDraw = GetDC(hwnd);
> SetMapMode(hdcDraw,MM_TEXT);
> - xdim = 0; ydim = 0;
> -
> - result = ITextServices_TxSetText(txtserv, oneA);
> - ok(result == S_OK, "ITextServices_TxSetText failed (result = %x)\n", result);
> - if (result != S_OK) {
> - skip("Could not set text\n");
> - goto cleanup;
> - }
> -
> - SetLastError(0xdeadbeef);
> - result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT,
> - hdcDraw, NULL, NULL,
> - TXTNS_FITTOCONTENT, &psizelExtent,
> - &xdim, &ydim);
> - todo_wine ok(result == S_OK || broken(result == E_FAIL), /* WINXP Arabic Language */
> - "TxGetNaturalSize gave unexpected return value (result = %x)\n", result);
> - if (result == S_OK) {
> - todo_wine ok(ydim == tmInfo_text.tmHeight,
> - "Height calculated incorrectly (expected %d, got %d)\n",
> - tmInfo_text.tmHeight, ydim);
> - /* The native DLL adds one pixel extra when calculating widths. */
> - todo_wine ok(xdim >= charwidth_caps_text[0] && xdim <= charwidth_caps_text[0] + 1,
> - "Width calculated incorrectly (expected %d {+1}, got %d)\n",
> - charwidth_caps_text[0], xdim);
> - } else
> - skip("TxGetNaturalSize measurements not performed (xdim = %d, ydim = %d, result = %x, error = %x)\n",
> - xdim, ydim, result, GetLastError());
> -
> -cleanup:
> - RestoreDC(hdcDraw,1);
> - ReleaseDC(NULL,hdcDraw);
> + GetClientRect(hwnd, &rect);
> +
> + memset(&cf, 0, sizeof(cf));
> + cf.cbSize = sizeof(cf);
> + cf.dwMask = CFM_ALL2;
> + hf = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
No need for cast.
> + GetObjectW(hf, sizeof(LOGFONTW), &lf);
> + lstrcpyW(cf.szFaceName, lf.lfFaceName);
> + cf.yHeight = MulDiv(abs(lf.lfHeight), 1440, GetDeviceCaps(GetDC(NULL), LOGPIXELSY));
> + if (lf.lfWeight > FW_NORMAL) cf.dwEffects |= CFE_BOLD;
> + if (lf.lfItalic) cf.dwEffects |= CFE_ITALIC;
> + if (lf.lfUnderline) cf.dwEffects |= CFE_UNDERLINE;
> + if (lf.lfStrikeOut) cf.dwEffects |= CFE_SUBSCRIPT;
> + cf.bPitchAndFamily = lf.lfPitchAndFamily;
> + cf.bCharSet = lf.lfCharSet;
> + result = ITextServices_TxSendMessage(txtserv, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf, &lresult);
> + ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result);
> + SelectObject(hdcDraw, hf);
> +
> + result = ITextServices_TxSetText(txtserv, test_text);
> + ok(result == S_OK, "ITextServices_TxSetText failed: 0x%08x.\n", result);
> +
> + psizelExtent.cx = -1; psizelExtent.cy = -1;
This is already initialised.
> + width = rect.right - rect.left;
> + height = 0;
> + result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
> + TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
> + todo_wine CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, test_text);
> +
> + ReleaseDC(hwnd, hdcDraw);
> + DestroyWindow(hwnd);
> ITextServices_Release(txtserv);
> ITextHost_Release(host);
> }
> --
> 2.17.1
>
>
>
>
June 7, 2018
Re: [PATCH 4/4] wsdapi: Add initial support for reading messages; identify Probe message.
by Huw Davies
On Wed, Jun 06, 2018 at 09:58:52PM +0100, Owen Rudge wrote:
> Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
> ---
> dlls/wsdapi/soap.c | 340
> +++++++++++++++++++++++++++++++++++++++++-
> dlls/wsdapi/tests/discovery.c | 6 +-
> 2 files changed, 341 insertions(+), 5 deletions(-)
>
>
> diff --git a/dlls/wsdapi/soap.c b/dlls/wsdapi/soap.c
> index 4e191a5c82..2bc974f111 100644
> --- a/dlls/wsdapi/soap.c
> +++ b/dlls/wsdapi/soap.c
> @@ -45,6 +45,13 @@ static const WCHAR actionHello[] = {
> 'd','i','s','c','o','v','e','r','y','/',
> 'H','e','l','l','o', 0 };
>
> +static const WCHAR actionProbe[] = {
> + 'h','t','t','p',':','/','/',
> + 's','c','h','e','m','a','s','.','x','m','l','s','o','a','p','.','o','r','g','/',
> + 'w','s','/','2','0','0','5','/','0','4','/',
> + 'd','i','s','c','o','v','e','r','y','/',
> + 'P','r','o','b','e', 0 };
> +
> static const WCHAR actionBye[] = {
> 'h','t','t','p',':','/','/',
> 's','c','h','e','m','a','s','.','x','m','l','s','o','a','p','.','o','r','g','/',
> @@ -98,6 +105,27 @@ struct discovered_namespace
> LPCWSTR uri;
> };
>
> +static LPWSTR utf8_to_wide(void *parent, const char *utf8_str, int length)
> +{
> + int utf8_str_len = 0, chars_needed = 0, bytes_needed = 0;
> + LPWSTR new_str = NULL;
> +
> + if (utf8_str == NULL) return NULL;
> +
> + utf8_str_len = (length < 0) ? lstrlenA(utf8_str) : length;
> + chars_needed = MultiByteToWideChar(CP_UTF8, 0, utf8_str, utf8_str_len, NULL, 0);
> +
> + if (chars_needed <= 0) return NULL;
> +
> + bytes_needed = sizeof(WCHAR) * (chars_needed + 1);
> + new_str = WSDAllocateLinkedMemory(parent, bytes_needed);
> +
> + MultiByteToWideChar(CP_UTF8, 0, utf8_str, utf8_str_len, new_str, chars_needed);
> + new_str[chars_needed] = 0;
> +
> + return new_str;
> +}
> +
> static char *wide_to_utf8(LPCWSTR wide_string, int *length)
> {
> char *new_string = NULL;
> @@ -1081,8 +1109,316 @@ cleanup:
> return ret;
> }
>
> +static LPWSTR xml_text_to_wide_string(void *parent_memory, WS_XML_TEXT *text)
> +{
> + if (text->textType == WS_XML_TEXT_TYPE_UTF8)
> + {
> + WS_XML_UTF8_TEXT *utf8_text = (WS_XML_UTF8_TEXT *) text;
> + return utf8_to_wide(parent_memory, (const char *) utf8_text->value.bytes, utf8_text->value.length);
> + }
> + else if (text->textType == WS_XML_TEXT_TYPE_UTF16)
> + {
> + WS_XML_UTF16_TEXT *utf_16_text = (WS_XML_UTF16_TEXT *) text;
> + return duplicate_string(parent_memory, (LPCWSTR) utf_16_text->bytes);
> + }
> +
> + FIXME("Support for text type %d not implemented.\n", text->textType);
> + return NULL;
> +}
> +
> +static BOOL move_to_element(WS_XML_READER *reader, const char *element_name, WS_XML_STRING *uri)
return HRESULT
> +{
> + WS_XML_STRING envelope;
> + BOOL found = FALSE;
> +
> + envelope.bytes = (BYTE *) element_name;
> + envelope.length = strlen(element_name);
> + envelope.dictionary = NULL;
> + envelope.id = 0;
> +
> + return SUCCEEDED(WsReadToStartElement(reader, &envelope, uri, &found, NULL)) && found;
> +}
> +
> +static BOOL ws_element_to_wsdxml_element(WS_XML_READER *reader, IWSDXMLContext *context, WSDXML_ELEMENT *parent_element)
and here.
> +{
> + WSDXML_ATTRIBUTE *cur_wsd_attrib = NULL, *new_wsd_attrib = NULL;
> + const WS_XML_ELEMENT_NODE *element_node = NULL;
> + WSDXML_ELEMENT *cur_element = parent_element;
> + const WS_XML_TEXT_NODE *text_node = NULL;
> + LPWSTR uri = NULL, element_name = NULL;
> + WS_XML_STRING *ns_string = NULL;
> + WS_XML_ATTRIBUTE *attrib = NULL;
> + WSDXML_ELEMENT *element = NULL;
> + const WS_XML_NODE *node = NULL;
> + WSDXML_NAME *name = NULL;
> + WSDXML_TEXT *text = NULL;
> + HRESULT ret;
> + int i;
> +
> + for (;;)
> + {
> + if (cur_element == NULL) break;
> +
> + ret = WsReadNode(reader, NULL);
> + if (FAILED(ret)) goto cleanup;
> +
> + ret = WsGetReaderNode(reader, &node, NULL);
> + if (FAILED(ret)) goto cleanup;
> +
> + switch (node->nodeType)
> + {
> + case WS_XML_NODE_TYPE_ELEMENT:
> + element_node = (const WS_XML_ELEMENT_NODE *) node;
> +
> + uri = utf8_to_wide(NULL, (const char *) element_node->ns->bytes, element_node->ns->length);
> + if (uri == NULL) goto cleanup;
> +
> + /* Link element_name to uri so they will be freed at the same time */
> + element_name = utf8_to_wide(uri, (const char *) element_node->localName->bytes,
> + element_node->localName->length);
> + if (element_name == NULL) goto cleanup;
> +
> + if (FAILED(IWSDXMLContext_AddNameToNamespace(context, uri, element_name, &name))) goto cleanup;
> +
> + WSDFreeLinkedMemory(uri);
> + uri = NULL;
> +
> + if (FAILED(WSDXMLBuildAnyForSingleElement(name, NULL, &element))) goto cleanup;
> + WSDXMLAddChild(cur_element, element);
> +
> + cur_wsd_attrib = NULL;
> +
> + /* Add attributes */
> + for (i = 0; i < element_node->attributeCount; i++)
> + {
> + attrib = element_node->attributes[i];
> + if (attrib->isXmlNs) continue;
> +
> + new_wsd_attrib = WSDAllocateLinkedMemory(element, sizeof(WSDXML_ATTRIBUTE));
> + if (new_wsd_attrib == NULL) goto cleanup;
> +
> + ns_string = attrib->ns;
> + if (ns_string->length == 0) ns_string = element_node->ns;
> +
> + uri = utf8_to_wide(NULL, (const char *) ns_string->bytes, ns_string->length);
> + if (uri == NULL) goto cleanup;
> +
> + /* Link element_name to uri so they will be freed at the same time */
> + element_name = utf8_to_wide(uri, (const char *) attrib->localName->bytes, attrib->localName->length);
> + if (element_name == NULL) goto cleanup;
> +
> + if (FAILED(IWSDXMLContext_AddNameToNamespace(context, uri, element_name, &name))) goto cleanup;
> +
> + WSDFreeLinkedMemory(uri);
> + uri = NULL;
> +
> + new_wsd_attrib->Value = xml_text_to_wide_string(new_wsd_attrib, attrib->value);
> + if (new_wsd_attrib->Value == NULL) goto cleanup;
> +
> + new_wsd_attrib->Name = name;
> + new_wsd_attrib->Element = cur_element;
> + new_wsd_attrib->Next = NULL;
> +
> + if (cur_wsd_attrib == NULL)
> + element->FirstAttribute = new_wsd_attrib;
> + else
> + cur_wsd_attrib->Next = new_wsd_attrib;
> +
> + cur_wsd_attrib = new_wsd_attrib;
> + }
> +
> + cur_element = element;
> + break;
> +
> + case WS_XML_NODE_TYPE_TEXT:
> + text_node = (const WS_XML_TEXT_NODE *) node;
> +
> + if (cur_element == NULL)
> + {
> + WARN("No parent element open but encountered text element!\n");
> + continue;
> + }
> +
> + if (cur_element->FirstChild != NULL)
> + {
> + WARN("Text node encountered but parent already has child!\n");
> + continue;
> + }
> +
> + text = WSDAllocateLinkedMemory(element, sizeof(WSDXML_TEXT));
> + if (text == NULL) goto cleanup;
> +
> + text->Node.Parent = element;
> + text->Node.Next = NULL;
> + text->Node.Type = TextType;
> + text->Text = xml_text_to_wide_string(text, text_node->text);
> +
> + if (text->Text == NULL)
> + {
> + WARN("Text node returned null string.\n");
> + WSDFreeLinkedMemory(text);
> + continue;
> + }
> +
> + cur_element->FirstChild = (WSDXML_NODE *) text;
> + break;
> +
> + case WS_XML_NODE_TYPE_END_ELEMENT:
> + /* Go up a level to the parent element */
> + cur_element = cur_element->Node.Parent;
> + break;
> +
> + default:
> + break;
> + }
> + }
> +
> + return TRUE;
> +
> +cleanup:
> + /* Free uri and element_name if applicable */
> + WSDFreeLinkedMemory(uri);
> + return FALSE;
> +}
> +
> +static WSDXML_ELEMENT *find_element(WSDXML_ELEMENT *parent, LPCWSTR name, LPCWSTR ns_uri)
> +{
> + WSDXML_ELEMENT *cur = (WSDXML_ELEMENT *) parent->FirstChild;
> +
> + while (cur != NULL)
> + {
> + if ((lstrcmpW(cur->Name->LocalName, name) == 0) && (lstrcmpW(cur->Name->Space->Uri, ns_uri) == 0))
> + return cur;
> +
> + cur = (WSDXML_ELEMENT *) cur->Node.Next;
> + }
> +
> + return NULL;
> +}
> +
> int read_message(const char *xml, int xml_length, WSD_SOAP_MESSAGE **out_msg)
This is also looking like a good contender to return HRESULT and
take an [out] int *type parameter.
> {
> - /* TODO: Parse and read message */
> - return MSGTYPE_UNKNOWN;
> + WSDXML_ELEMENT *envelope = NULL, *header_element, *body_element;
> + WS_XML_READER_TEXT_ENCODING encoding;
> + WS_XML_ELEMENT_NODE *envelope_node;
> + WSD_SOAP_MESSAGE *soap_msg = NULL;
> + WS_XML_READER_BUFFER_INPUT input;
> + WS_XML_ATTRIBUTE *attrib = NULL;
> + IWSDXMLContext *context = NULL;
> + WS_XML_STRING *soap_uri = NULL;
> + const WS_XML_NODE *node;
> + WS_XML_READER *reader;
> + LPCWSTR value = NULL;
> + int i, message_type;
> + LPWSTR uri, prefix;
> + WS_HEAP *heap;
> + HRESULT ret;
> +
> + message_type = MSGTYPE_UNKNOWN;
> +
> + ret = WsCreateHeap(16384, 4096, NULL, 0, &heap, NULL);
> + if (FAILED(ret)) goto cleanup;
> +
> + ret = WsCreateReader(NULL, 0, &reader, NULL);
> + if (FAILED(ret)) goto cleanup;
> +
> + encoding.encoding.encodingType = WS_XML_READER_ENCODING_TYPE_TEXT;
> + encoding.charSet = WS_CHARSET_AUTO;
> +
> + input.input.inputType = WS_XML_READER_INPUT_TYPE_BUFFER;
> + input.encodedData = (char *) xml;
> + input.encodedDataSize = xml_length;
> +
> + ret = WsSetInput(reader, (WS_XML_READER_ENCODING *) &encoding, (WS_XML_READER_INPUT *) &input, NULL, 0, NULL);
> + if (FAILED(ret)) goto cleanup;
> +
> + soap_uri = populate_xml_string(envelopeNsUri);
> + if (soap_uri == NULL) goto cleanup;
> +
> + if (!move_to_element(reader, "Envelope", soap_uri)) goto cleanup;
> +
> + ret = WsGetReaderNode(reader, &node, NULL);
> + if (FAILED(ret)) goto cleanup;
> +
> + if (node->nodeType != WS_XML_NODE_TYPE_ELEMENT) goto cleanup;
> +
> + envelope_node = (WS_XML_ELEMENT_NODE *) node;
> +
> + if (FAILED(WSDXMLCreateContext(&context))) goto cleanup;
> +
> + /* Find XML namespaces from the envelope element's attributes */
> + for (i = 0; i < envelope_node->attributeCount; i++)
> + {
> + attrib = envelope_node->attributes[i];
> +
> + if (attrib->isXmlNs)
> + {
> + uri = utf8_to_wide(NULL, (const char *) attrib->ns->bytes, attrib->ns->length);
> + if (uri == NULL) continue;
> +
> + prefix = utf8_to_wide(uri, (const char *) attrib->localName->bytes, attrib->localName->length);
> +
> + if (prefix == NULL)
> + {
> + WSDFreeLinkedMemory(uri);
> + continue;
> + }
> +
> + IWSDXMLContext_AddNamespace(context, uri, prefix, NULL);
> + WSDFreeLinkedMemory(uri);
> + }
> + }
> +
> + /* Create the SOAP message to return to the caller */
> + soap_msg = WSDAllocateLinkedMemory(NULL, sizeof(WSD_SOAP_MESSAGE));
> + if (soap_msg == NULL) goto cleanup;
> +
> + ZeroMemory(soap_msg, sizeof(WSD_SOAP_MESSAGE));
> +
> + envelope = WSDAllocateLinkedMemory(soap_msg, sizeof(WSDXML_ELEMENT));
> + if (envelope == NULL) goto cleanup;
> +
> + ZeroMemory(envelope, sizeof(WSDXML_ELEMENT));
> +
> + if (!ws_element_to_wsdxml_element(reader, context, envelope)) goto cleanup;
> +
> + /* Find the header element */
> + header_element = find_element(envelope, headerString, envelopeNsUri);
> + if (header_element == NULL) goto cleanup;
> +
> + if (FAILED(WSDXMLGetValueFromAny(addressingNsUri, actionString, (WSDXML_ELEMENT *) header_element->FirstChild,
> + &value))) goto cleanup;
> + soap_msg->Header.Action = duplicate_string(soap_msg, value);
> + if (soap_msg->Header.Action == NULL) goto cleanup;
> +
> + if (FAILED(WSDXMLGetValueFromAny(addressingNsUri, toString, (WSDXML_ELEMENT *) header_element->FirstChild,
> + &value))) goto cleanup;
> + soap_msg->Header.To = duplicate_string(soap_msg, value);
> + if (soap_msg->Header.To == NULL) goto cleanup;
> +
> + if (FAILED(WSDXMLGetValueFromAny(addressingNsUri, messageIdString, (WSDXML_ELEMENT *) header_element->FirstChild,
> + &value))) goto cleanup;
> + soap_msg->Header.MessageID = duplicate_string(soap_msg, value);
> + if (soap_msg->Header.MessageID == NULL) goto cleanup;
> +
> + /* Find the body element */
> + body_element = find_element(envelope, bodyString, envelopeNsUri);
> + if (body_element == NULL) goto cleanup;
> +
> + /* Now figure out which message we've been sent */
> + if (lstrcmpW(soap_msg->Header.Action, actionProbe) == 0)
> + {
> + /* TODO: Parse the Probe message */
> +
> + *out_msg = soap_msg;
> + soap_msg = NULL; /* caller will clean this up */
> + message_type = MSGTYPE_PROBE;
> + }
> +
> +cleanup:
> + free_xml_string(soap_uri);
> + WSDFreeLinkedMemory(soap_msg);
> + if (context != NULL) IWSDXMLContext_Release(context);
> +
> + return message_type;
> }
> diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c
> index 96c2ead7f9..0599123a46 100644
> --- a/dlls/wsdapi/tests/discovery.c
> +++ b/dlls/wsdapi/tests/discovery.c
> @@ -491,7 +491,7 @@ static void verify_wsdxml_any_text(const char *debug_prefix, WSDXML_ELEMENT *any
> {
> WSDXML_TEXT *child;
>
> - ok(any != NULL, "%s: any == NULL\n", debug_prefix);
> + todo_wine ok(any != NULL, "%s: any == NULL\n", debug_prefix);
You'll need to have a really good reason for doing this. Can you
re-order things so you don't break the tests?
> if (any == NULL) return;
>
> child = (WSDXML_TEXT *) any->FirstChild;
> @@ -534,7 +534,7 @@ static HRESULT WINAPI IWSDiscoveryPublisherNotifyImpl_ProbeHandler(IWSDiscoveryP
> static const WCHAR extra_info[] = {'E','x','t','r','a','I','n','f','o',0};
> WSD_PROBE *probe_msg = (WSD_PROBE *) pSoap->Body;
>
> - ok(pSoap->Body != NULL, "pSoap->Body == NULL\n");
> + todo_wine ok(pSoap->Body != NULL, "pSoap->Body == NULL\n");
> ok(pSoap->Header.To != NULL && lstrcmpW(pSoap->Header.To, discoveryTo) == 0,
> "pSoap->Header.To == '%s'\n", wine_dbgstr_w(pSoap->Header.To));
> ok(pSoap->Header.Action != NULL && lstrcmpW(pSoap->Header.Action, actionProbe) == 0,
> @@ -939,7 +939,7 @@ after_publish_test:
> sprintf(probe_message, testProbeMessage, probe_uuid_str);
>
> ok(send_udp_multicast_of_type(probe_message, strlen(probe_message), AF_INET) == TRUE, "Sending Probe message failed\n");
> - todo_wine ok(WaitForSingleObject(probe_event, 2000) == WAIT_OBJECT_0, "Probe message not received\n");
> + ok(WaitForSingleObject(probe_event, 2000) == WAIT_OBJECT_0, "Probe message not received\n");
>
> RpcStringFreeA(&probe_uuid_str);
> }
>
>
June 7, 2018
Re: [PATCH 3/4] wsdapi: Add stub for Probe message parsing, prepare notification sink message.
by Huw Davies
On Wed, Jun 06, 2018 at 09:58:49PM +0100, Owen Rudge wrote:
> Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
> ---
> dlls/wsdapi/network.c | 52
> ++++++++++++++++++++++++++++++++++++++++++-
> dlls/wsdapi/soap.c | 6 +++++
> dlls/wsdapi/wsdapi_internal.h | 5 +++++
> 3 files changed, 62 insertions(+), 1 deletion(-)
>
>
> diff --git a/dlls/wsdapi/network.c b/dlls/wsdapi/network.c
> index 3e7509bfa3..7f6cee3ab0 100644
> --- a/dlls/wsdapi/network.c
> +++ b/dlls/wsdapi/network.c
> @@ -292,6 +292,56 @@ typedef struct listener_thread_params
> BOOL ipv6;
> } listener_thread_params;
>
> +static void process_received_message(listener_thread_params *params, char *message, int message_len,
> + SOCKADDR_STORAGE *source_addr)
This should return HRESULT.
> +{
> + IWSDUdpMessageParameters *msg_params = NULL;
> + IWSDUdpAddress *remote_addr = NULL;
> + struct notificationSink *sink;
> + WSD_SOAP_MESSAGE *msg = NULL;
> + int msg_type;
> +
> + msg_type = read_message(message, message_len, &msg);
> +
> + switch (msg_type)
> + {
> + case MSGTYPE_PROBE:
> + TRACE("Received probe message\n");
> +
> + if (FAILED(WSDCreateUdpMessageParameters(&msg_params)))
> + {
> + ERR("Unable to create IWSDUdpMessageParameters, not processing message.\n");
> + goto cleanup;
> + }
> +
> + if (FAILED(WSDCreateUdpAddress(&remote_addr)))
> + {
> + ERR("Unable to create IWSDUdpAddress, not processing message.\n");
> + goto cleanup;
> + }
> +
> + IWSDUdpAddress_SetSockaddr(remote_addr, source_addr);
> + IWSDUdpMessageParameters_SetRemoteAddress(msg_params, (IWSDAddress *)remote_addr);
> +
> + EnterCriticalSection(¶ms->impl->notification_sink_critical_section);
> +
> + LIST_FOR_EACH_ENTRY(sink, ¶ms->impl->notificationSinks, struct notificationSink, entry)
> + {
> + IWSDiscoveryPublisherNotify_ProbeHandler(sink->notificationSink, msg, (IWSDMessageParameters *)msg_params);
> + }
> +
> + LeaveCriticalSection(¶ms->impl->notification_sink_critical_section);
> +
> + break;
> + }
> +
> +cleanup:
> + WSDFreeLinkedMemory(msg);
> +
> + if (remote_addr != NULL) IWSDUdpAddress_Release(remote_addr);
> + if (msg_params != NULL) IWSDUdpMessageParameters_Release(msg_params);
> +}
> +
> #define RECEIVE_BUFFER_SIZE 65536
>
> static DWORD WINAPI listening_thread(LPVOID params)
> @@ -321,7 +371,7 @@ static DWORD WINAPI listening_thread(LPVOID params)
> }
> else
> {
> - /* TODO: Process received message */
> + process_received_message(parameter, buffer, bytes_received, &source_addr);
> }
> }
>
> diff --git a/dlls/wsdapi/soap.c b/dlls/wsdapi/soap.c
> index d0fb0afb0c..4e191a5c82 100644
> --- a/dlls/wsdapi/soap.c
> +++ b/dlls/wsdapi/soap.c
> @@ -1080,3 +1080,9 @@ cleanup:
>
> return ret;
> }
> +
> +int read_message(const char *xml, int xml_length, WSD_SOAP_MESSAGE **out_msg)
> +{
> + /* TODO: Parse and read message */
> + return MSGTYPE_UNKNOWN;
> +}
> diff --git a/dlls/wsdapi/wsdapi_internal.h b/dlls/wsdapi/wsdapi_internal.h
> index 3e5e163f3a..5c62627bba 100644
> --- a/dlls/wsdapi/wsdapi_internal.h
> +++ b/dlls/wsdapi/wsdapi_internal.h
> @@ -72,6 +72,11 @@ HRESULT send_bye_message(IWSDiscoveryPublisherImpl *impl, LPCWSTR id, ULONGLONG
>
> HRESULT register_namespaces(IWSDXMLContext *xml_context);
>
> +int read_message(const char *xml, int xml_length, WSD_SOAP_MESSAGE **out_msg);
> +
> +#define MSGTYPE_UNKNOWN 0
> +#define MSGTYPE_PROBE 1
> +
> /* xml.c */
>
> LPWSTR duplicate_string(void *parentMemoryBlock, LPCWSTR value);
>
>
June 7, 2018
Re: [PATCH 1/4] wsdapi: Add support for listening for UDP multicast broadcasts.
by Huw Davies
On Wed, Jun 06, 2018 at 09:58:45PM +0100, Owen Rudge wrote:
> Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
> ---
> dlls/wsdapi/network.c | 278
> +++++++++++++++++++++++++++++++++++++++++-
> dlls/wsdapi/wsdapi_internal.h | 4 +
> 2 files changed, 281 insertions(+), 1 deletion(-)
>
>
> diff --git a/dlls/wsdapi/network.c b/dlls/wsdapi/network.c
> index f86b3b4a3e..3e7509bfa3 100644
> --- a/dlls/wsdapi/network.c
> +++ b/dlls/wsdapi/network.c
> @@ -231,11 +231,278 @@ BOOL send_udp_multicast(IWSDiscoveryPublisherImpl *impl, char *data, int length,
> return TRUE;
> }
>
> +static int join_multicast_group(SOCKET s, SOCKADDR_STORAGE *group, SOCKADDR_STORAGE *iface)
> +{
> + int level, optname, optlen;
> + struct ipv6_mreq mreqv6;
> + struct ip_mreq mreqv4;
> + char *optval;
> +
> + if (iface->ss_family == AF_INET6)
> + {
> + level = IPPROTO_IPV6;
> + optname = IPV6_ADD_MEMBERSHIP;
> + optval = (char *)&mreqv6;
> + optlen = sizeof(mreqv6);
> +
> + mreqv6.ipv6mr_multiaddr = ((SOCKADDR_IN6 *)group)->sin6_addr;
> + mreqv6.ipv6mr_interface = ((SOCKADDR_IN6 *)iface)->sin6_scope_id;
> + }
> + else
> + {
> + level = IPPROTO_IP;
> + optname = IP_ADD_MEMBERSHIP;
> + optval = (char *)&mreqv4;
> + optlen = sizeof(mreqv4);
> +
> + mreqv4.imr_multiaddr.s_addr = ((SOCKADDR_IN *)group)->sin_addr.s_addr;
> + mreqv4.imr_interface.s_addr = ((SOCKADDR_IN *)iface)->sin_addr.s_addr;
> + }
> +
> + return setsockopt(s, level, optname, optval, optlen);
> +}
> +
> +static int set_send_interface(SOCKET s, SOCKADDR_STORAGE *iface)
> +{
> + int level, optname, optlen;
> + char *optval = NULL;
> +
> + if (iface->ss_family == AF_INET6)
> + {
> + level = IPPROTO_IPV6;
> + optname = IPV6_MULTICAST_IF;
> + optval = (char *) &((SOCKADDR_IN6 *)iface)->sin6_scope_id;
> + optlen = sizeof(((SOCKADDR_IN6 *)iface)->sin6_scope_id);
> + }
> + else
> + {
> + level = IPPROTO_IP;
> + optname = IP_MULTICAST_IF;
> + optval = (char *) &((SOCKADDR_IN *)iface)->sin_addr.s_addr;
> + optlen = sizeof(((SOCKADDR_IN *)iface)->sin_addr.s_addr);
> + }
> +
> + return setsockopt(s, level, optname, optval, optlen);
> +}
> +
> +typedef struct listener_thread_params
> +{
> + IWSDiscoveryPublisherImpl *impl;
> + SOCKET listening_socket;
> + BOOL ipv6;
> +} listener_thread_params;
> +
> +#define RECEIVE_BUFFER_SIZE 65536
> +
> +static DWORD WINAPI listening_thread(LPVOID params)
> +{
> + listener_thread_params *parameter = (listener_thread_params *)params;
> + int bytes_received, address_len, err;
> + SOCKADDR_STORAGE source_addr;
> + char *buffer;
> +
> + buffer = heap_alloc(RECEIVE_BUFFER_SIZE);
> + address_len = parameter->ipv6 ? sizeof(SOCKADDR_IN6) : sizeof(SOCKADDR_IN);
> +
> + while (parameter->impl->publisherStarted)
> + {
> + bytes_received = recvfrom(parameter->listening_socket, buffer, RECEIVE_BUFFER_SIZE, 0,
> + (LPSOCKADDR) &source_addr, &address_len);
> +
> + if (bytes_received == SOCKET_ERROR)
> + {
> + err = WSAGetLastError();
> +
> + if (err != WSAETIMEDOUT)
> + {
> + WARN("Received error when trying to read from socket: %d. Stopping listener.\n", err);
> + return 0;
> + }
> + }
> + else
> + {
> + /* TODO: Process received message */
> + }
> + }
> +
> + /* The publisher has been stopped */
> + closesocket(parameter->listening_socket);
> +
> + heap_free(buffer);
> + heap_free(parameter);
> +
> + return 0;
> +}
> +
> +static void start_listening(IWSDiscoveryPublisherImpl *impl, SOCKADDR_STORAGE *bind_address)
This should probably return an indication of success (even if it's not
possible for the caller to do something sensible with the result).
> +{
> + SOCKADDR_STORAGE multicast_addr, bind_addr, interface_addr;
> + listener_thread_params *parameter = NULL;
> + const DWORD receive_timeout = 5000;
> + const UINT reuse_addr = 1;
> + HANDLE thread_handle;
> + int address_length;
> + SOCKET s = 0;
> +
> + TRACE("(%p, %p) family %d\n", impl, bind_address, bind_address->ss_family);
> +
> + /* Populate the multicast address */
> + ZeroMemory(&multicast_addr, sizeof(SOCKADDR_STORAGE));
> +
> + if (bind_address->ss_family == AF_INET)
> + {
> + SOCKADDR_IN *sockaddr4 = (SOCKADDR_IN *)&multicast_addr;
> +
> + sockaddr4->sin_port = htons(SEND_PORT);
> + sockaddr4->sin_addr.S_un.S_addr = htonl(SEND_ADDRESS_IPV4);
> + address_length = sizeof(SOCKADDR_IN);
> + }
> + else
> + {
> + SOCKADDR_IN6 *sockaddr6 = (SOCKADDR_IN6 *)&multicast_addr;
> +
> + sockaddr6->sin6_port = htons(SEND_PORT);
> + memcpy(&sockaddr6->sin6_addr, &send_address_ipv6, sizeof(send_address_ipv6));
> + address_length = sizeof(SOCKADDR_IN6);
> + }
> +
> + /* Update the port for the binding address */
> + memcpy(&bind_addr, bind_address, address_length);
> + ((SOCKADDR_IN *)&bind_addr)->sin_port = htons(SEND_PORT);
> +
> + /* Update the port for the interface address */
> + memcpy(&interface_addr, bind_address, address_length);
> + ((SOCKADDR_IN *)&interface_addr)->sin_port = htons(0);
> +
> + /* Create the socket */
> + s = socket(bind_address->ss_family, SOCK_DGRAM, IPPROTO_UDP);
> +
> + if (s == INVALID_SOCKET)
> + {
> + WARN("socket() failed (error %d)\n", WSAGetLastError());
> + goto cleanup;
> + }
> +
> + /* Ensure the socket can be reused */
> + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuse_addr, sizeof(reuse_addr)) == SOCKET_ERROR)
> + {
> + WARN("setsockopt(SO_REUSEADDR) failed (error %d)\n", WSAGetLastError());
> + goto cleanup;
> + }
> +
> + /* Bind the socket to the local interface so we can receive data */
> + if (bind(s, (struct sockaddr *)&bind_addr, address_length) == SOCKET_ERROR)
> + {
> + WARN("bind() failed (error %d)\n", WSAGetLastError());
> + goto cleanup;
> + }
> +
> + /* Join the multicast group */
> + if (join_multicast_group(s, &multicast_addr, &interface_addr) == SOCKET_ERROR)
> + {
> + WARN("Unable to join multicast group (error %d)\n", WSAGetLastError());
> + goto cleanup;
> + }
> +
> + /* Set the outgoing interface */
> + if (set_send_interface(s, &interface_addr) == SOCKET_ERROR)
> + {
> + WARN("Unable to set outgoing interface (error %d)\n", WSAGetLastError());
> + goto cleanup;
> + }
> +
> + /* Set a 5-second receive timeout */
> + if (setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (const char *)&receive_timeout, sizeof(receive_timeout)) == SOCKET_ERROR)
> + {
> + WARN("setsockopt(SO_RCVTIME0) failed (error %d)\n", WSAGetLastError());
> + goto cleanup;
> + }
> +
> + /* Allocate memory for thread parameters */
> + parameter = heap_alloc(sizeof(listener_thread_params));
> +
> + parameter->impl = impl;
> + parameter->listening_socket = s;
> + parameter->ipv6 = (bind_address->ss_family == AF_INET6);
> +
> + thread_handle = CreateThread(NULL, 0, listening_thread, parameter, 0, NULL);
> +
> + if (thread_handle == NULL)
> + {
> + WARN("CreateThread failed (error %d)\n", GetLastError());
> + goto cleanup;
> + }
> +
> + impl->thread_handles[impl->num_thread_handles] = thread_handle;
> + impl->num_thread_handles++;
> +
> + return;
> +
> +cleanup:
> + closesocket(s);
> + heap_free(parameter);
> +}
> +
> +static BOOL start_listening_on_all_addresses(IWSDiscoveryPublisherImpl *impl, ULONG family)
> +{
> + IP_ADAPTER_ADDRESSES *adapter_addresses = NULL, *adapter_address;
> + ULONG bufferSize = 0;
> + ULONG ret;
> +
> + ret = GetAdaptersAddresses(family, 0, NULL, NULL, &bufferSize); /* family should be AF_INET or AF_INET6 */
> +
> + if (ret != ERROR_BUFFER_OVERFLOW)
> + {
> + WARN("GetAdaptorsAddresses failed with error %08x\n", ret);
> + return FALSE;
> + }
> +
> + /* Get size of buffer for adapters */
> + adapter_addresses = (IP_ADAPTER_ADDRESSES *)heap_alloc(bufferSize);
> +
> + if (adapter_addresses == NULL)
> + {
> + WARN("Out of memory allocating space for adapter information\n");
> + return FALSE;
> + }
> +
> + /* Get list of adapters */
> + ret = GetAdaptersAddresses(family, 0, NULL, adapter_addresses, &bufferSize);
> +
> + if (ret != ERROR_SUCCESS)
> + {
> + WARN("GetAdaptorsAddresses failed with error %08x\n", ret);
> + goto cleanup;
> + }
> +
> + for (adapter_address = adapter_addresses; adapter_address != NULL; adapter_address = adapter_address->Next)
> + {
> + if (impl->num_thread_handles >= MAX_WSD_THREADS)
> + {
> + WARN("Exceeded maximum number of supported listener threads; too many network interfaces.");
> + goto cleanup;
> + }
> +
> + if (adapter_address->FirstUnicastAddress == NULL)
> + {
> + TRACE("No address found for adaptor '%s' (%p)\n", adapter_address->AdapterName, adapter_address);
> + continue;
> + }
> +
> + start_listening(impl, (SOCKADDR_STORAGE *)adapter_address->FirstUnicastAddress->Address.lpSockaddr);
> + }
> +
> +cleanup:
> + heap_free(adapter_addresses);
> + return ret == ERROR_SUCCESS;
> +}
> +
> void terminate_networking(IWSDiscoveryPublisherImpl *impl)
> {
> BOOL needsCleanup = impl->publisherStarted;
>
> impl->publisherStarted = FALSE;
> + WaitForMultipleObjects(impl->num_thread_handles, impl->thread_handles, TRUE, INFINITE);
>
> if (needsCleanup)
> WSACleanup();
> @@ -254,6 +521,15 @@ BOOL init_networking(IWSDiscoveryPublisherImpl *impl)
>
> impl->publisherStarted = TRUE;
>
> - /* TODO: Start listening */
> + if ((impl->addressFamily & WSDAPI_ADDRESSFAMILY_IPV4) && (!start_listening_on_all_addresses(impl, AF_INET)))
> + goto cleanup;
> +
> + if ((impl->addressFamily & WSDAPI_ADDRESSFAMILY_IPV6) && (!start_listening_on_all_addresses(impl, AF_INET6)))
> + goto cleanup;
> +
> return TRUE;
> +
> +cleanup:
> + terminate_networking(impl);
> + return FALSE;
> }
> diff --git a/dlls/wsdapi/wsdapi_internal.h b/dlls/wsdapi/wsdapi_internal.h
> index 45d54c2ef1..f88822d5ef 100644
> --- a/dlls/wsdapi/wsdapi_internal.h
> +++ b/dlls/wsdapi/wsdapi_internal.h
> @@ -40,6 +40,8 @@ struct notificationSink
> IWSDiscoveryPublisherNotify *notificationSink;
> };
>
> +#define MAX_WSD_THREADS 20
> +
> typedef struct IWSDiscoveryPublisherImpl {
> IWSDiscoveryPublisher IWSDiscoveryPublisher_iface;
> LONG ref;
> @@ -47,6 +49,8 @@ typedef struct IWSDiscoveryPublisherImpl {
> DWORD addressFamily;
> struct list notificationSinks;
> BOOL publisherStarted;
> + HANDLE thread_handles[MAX_WSD_THREADS];
> + int num_thread_handles;
> } IWSDiscoveryPublisherImpl;
>
> /* network.c */
>
>
June 7, 2018
[PATCH 2/2] schedsvc: Add support for running missed tasks at the service start.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 24 ++++++++++++++++++++++++
dlls/schedsvc/schedsvc_private.h | 1 +
dlls/schedsvc/svc_main.c | 1 +
3 files changed, 26 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index da837d8a8e..6c6e3e109e 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -1033,6 +1033,30 @@ void check_task_time(void)
LeaveCriticalSection(&at_job_list_section);
}
+void check_missed_task_time(void)
+{
+ FILETIME current_ft, last_ft;
+ struct job_t *job;
+
+ GetSystemTimeAsFileTime(¤t_ft);
+ FileTimeToLocalFileTime(¤t_ft, ¤t_ft);
+
+ EnterCriticalSection(&at_job_list_section);
+
+ LIST_FOR_EACH_ENTRY(job, &at_job_list, struct job_t, entry)
+ {
+ if (SystemTimeToFileTime(&job->data.last_runtime, &last_ft))
+ {
+ if (job_runs_at(job, &last_ft, ¤t_ft))
+ {
+ run_job(job);
+ }
+ }
+ }
+
+ LeaveCriticalSection(&at_job_list_section);
+}
+
void remove_job(const WCHAR *name)
{
struct job_t *job;
diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h
index 10892d55ca..117c6f51ed 100644
--- a/dlls/schedsvc/schedsvc_private.h
+++ b/dlls/schedsvc/schedsvc_private.h
@@ -31,6 +31,7 @@ void update_process_status(DWORD pid) DECLSPEC_HIDDEN;
BOOL get_next_runtime(LARGE_INTEGER *rt) DECLSPEC_HIDDEN;
void check_task_time(void) DECLSPEC_HIDDEN;
void load_at_tasks(void) DECLSPEC_HIDDEN;
+void check_missed_task_time(void) DECLSPEC_HIDDEN;
static inline WCHAR *heap_strdupW(const WCHAR *src)
{
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 2bba674b07..8e23a049db 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -54,6 +54,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
TRACE("Starting...\n");
load_at_tasks();
+ check_missed_task_time();
htimer = CreateWaitableTimerW(NULL, FALSE, NULL);
if (htimer == NULL)
--
2.16.3
June 7, 2018
[PATCH 1/2] schedsvc: Load job files at the service start up.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 41 ++++++++++++++++++++++++++++++++++++++++
dlls/schedsvc/schedsvc_private.h | 1 +
dlls/schedsvc/svc_main.c | 2 ++
3 files changed, 44 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index 91ef3edca0..da837d8a8e 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -617,6 +617,47 @@ void add_job(const WCHAR *name)
LeaveCriticalSection(&at_job_list_section);
}
+static inline BOOL is_file(const WIN32_FIND_DATAW *data)
+{
+ return !(data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
+}
+
+void load_at_tasks(void)
+{
+ static const WCHAR tasksW[] = { '\\','T','a','s','k','s','\\',0 };
+ static const WCHAR allW[] = { '*',0 };
+ WCHAR windir[MAX_PATH], path[MAX_PATH];
+ WIN32_FIND_DATAW data;
+ HANDLE handle;
+
+ GetWindowsDirectoryW(windir, MAX_PATH);
+ lstrcpyW(path, windir);
+ lstrcatW(path, tasksW);
+ lstrcatW(path, allW);
+
+ handle = FindFirstFileW(path, &data);
+ if (handle == INVALID_HANDLE_VALUE) return;
+
+ do
+ {
+ if (is_file(&data))
+ {
+ lstrcpyW(path, windir);
+ lstrcatW(path, tasksW);
+
+ if (lstrlenW(path) + lstrlenW(data.cFileName) < MAX_PATH)
+ {
+ lstrcatW(path, data.cFileName);
+ add_job(path);
+ }
+ else
+ FIXME("too long file name %s\n", debugstr_w(data.cFileName));
+ }
+ } while (FindNextFileW(handle, &data));
+
+ FindClose(handle);
+}
+
static BOOL write_signature(HANDLE hfile)
{
struct
diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h
index d601030e78..10892d55ca 100644
--- a/dlls/schedsvc/schedsvc_private.h
+++ b/dlls/schedsvc/schedsvc_private.h
@@ -30,6 +30,7 @@ void add_process_to_queue(HANDLE hproc) DECLSPEC_HIDDEN;
void update_process_status(DWORD pid) DECLSPEC_HIDDEN;
BOOL get_next_runtime(LARGE_INTEGER *rt) DECLSPEC_HIDDEN;
void check_task_time(void) DECLSPEC_HIDDEN;
+void load_at_tasks(void) DECLSPEC_HIDDEN;
static inline WCHAR *heap_strdupW(const WCHAR *src)
{
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 0dfac818fd..2bba674b07 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -53,6 +53,8 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
TRACE("Starting...\n");
+ load_at_tasks();
+
htimer = CreateWaitableTimerW(NULL, FALSE, NULL);
if (htimer == NULL)
{
--
2.16.3
June 7, 2018
[PATCH 4/4] testbot: Switch Patches::Submit() to the new job staging standard.
by Francois Gouget
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/Patches.pm | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm
index 4f428133f..e349dfe88 100644
--- a/testbot/lib/WineTestBot/Patches.pm
+++ b/testbot/lib/WineTestBot/Patches.pm
@@ -166,7 +166,6 @@ sub Submit($$$)
# Create a new job for this patch
my $NewJob = $Jobs->Add();
- $NewJob->Status("queued");
$NewJob->User($User);
$NewJob->Priority(6);
my $PropertyDescriptor = $Jobs->GetPropertyDescriptorByName("Remarks");
@@ -181,11 +180,9 @@ sub Submit($$$)
# Add build step to the job
my $Steps = $NewJob->Steps;
my $NewStep = $Steps->Add();
- # Create a link to the patch file in the staging dir
- my $StagingFileName = CreateNewLink($PatchFileName, "$DataDir/staging", "_patch.diff");
- $NewStep->FileName(basename($StagingFileName));
+ $NewStep->FileName("patch.diff");
$NewStep->FileType($TestInfo->{Type});
- $NewStep->InStaging(1);
+ $NewStep->InStaging(!1);
$NewStep->Type("build");
$NewStep->DebugLevel(0);
@@ -198,7 +195,7 @@ sub Submit($$$)
$Task->VM($BuildVM);
$Task->Timeout($BuildTimeout);
- # Save this step (&job+task) so the others can reference it
+ # Save the build step so other steps can reference it
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined($ErrMessage))
{
@@ -206,6 +203,13 @@ sub Submit($$$)
return $ErrMessage;
}
+ # Stage the patch so it can be picked up by the job
+ if (!link($PatchFileName, "$DataDir/staging/job". $NewJob->Id ."_patch.diff"))
+ {
+ $self->Disposition("Failed to prepare patch file");
+ return $!;
+ }
+
foreach my $Unit (sort keys %{$TestInfo->{Units}})
{
# Add 32 and 64-bit tasks
@@ -217,7 +221,7 @@ sub Submit($$$)
if (@{$VMs->GetKeys()})
{
# Create the corresponding Step
- $NewStep = $Steps->Add();
+ my $NewStep = $Steps->Add();
$NewStep->PreviousNo(1);
my $FileName = $TestInfo->{ExeBase};
$FileName .= "64" if ($Bits eq "64");
@@ -240,13 +244,23 @@ sub Submit($$$)
}
}
+ # Save it all
($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
- if (defined($ErrMessage))
+ if (defined $ErrMessage)
{
$self->Disposition("Failed to submit job");
return $ErrMessage;
}
+ # Switch Status to staging to indicate we are done setting up the job
+ $NewJob->Status("staging");
+ ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
+ if (defined $ErrMessage)
+ {
+ $self->Disposition("Failed to submit job (staging)");
+ return $ErrMessage;
+ }
+
if ($First)
{
$First = !1;
--
2.17.0
June 6, 2018
[PATCH 3/4] testbot/web: Switch Submit to the new job staging standard.
by Francois Gouget
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/web/Submit.pl | 63 ++++++++++++++++++++-----------------------
1 file changed, 29 insertions(+), 34 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 8e22621fd..d5265a3b3 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -753,28 +753,11 @@ sub OnSubmit($)
my $BaseName = $self->ValidateAndGetFileName("FileName");
return !1 if (!$BaseName);
- # Store the file in the staging directory until the relevant Job and Step
- # IDs are known and it can be moved to the jobs directory tree. But rename
- # it so it does not get overwritten if the user submits another one before
- # the Engine gets around to doing so.
- my $StagingFileName = CreateNewFile("$DataDir/staging", "_$BaseName");
-
- my $TmpStagingFullPath = $self->GetTmpStagingFullPath($BaseName);
- if ($StagingFileName and !rename($TmpStagingFullPath, $StagingFileName))
- {
- $self->{ErrMessage} = "Could not rename '$TmpStagingFullPath' to '$StagingFileName': $!\n";
- unlink($StagingFileName);
- $StagingFileName = undef;
- }
- # If needed fall back to the existing staging file and hope for the best.
- $StagingFileName = basename($StagingFileName || $TmpStagingFullPath);
-
# See also Patches::Submit() in lib/WineTestBot/Patches.pm
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
- $NewJob->Status("queued");
$NewJob->User($self->GetCurrentSession()->User);
$NewJob->Priority(5);
if ($self->GetParam("Remarks"))
@@ -792,15 +775,15 @@ sub OnSubmit($)
}
my $Steps = $NewJob->Steps;
+ my $BuildStep;
my $FileType = $self->GetParam("FileType");
- my $BuildStepNo;
if ($FileType eq "patchdlls" || $FileType eq "patchprograms")
{
# This is a patch so add a build step...
- my $BuildStep = $Steps->Add();
- $BuildStep->FileName($StagingFileName);
+ $BuildStep = $Steps->Add();
+ $BuildStep->FileName($BaseName);
$BuildStep->FileType($FileType);
- $BuildStep->InStaging(1);
+ $BuildStep->InStaging(!1);
$BuildStep->Type("build");
$BuildStep->DebugLevel(0);
@@ -813,14 +796,13 @@ sub OnSubmit($)
$Task->VM($BuildVM);
$Task->Timeout($BuildTimeout);
- # Save this step (&job+task) so the others can reference it
+ # Save the build step so the others can reference it
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined($ErrMessage))
{
$self->{ErrMessage} = $ErrMessage;
return !1;
}
- $BuildStepNo = 1;
}
# Add steps and tasks for the 32 and 64-bit tests
@@ -844,22 +826,18 @@ sub OnSubmit($)
{
# First create the test step
my $TestStep = $Steps->Add();
- $TestStep->PreviousNo($BuildStepNo);
if ($FileType eq "patchdlls" || $FileType eq "patchprograms")
{
- my $FileName=$self->GetParam("TestExecutable");
- if ($Bits eq "64")
- {
- $FileName =~ s/_test\.exe$/_test64.exe/;
- }
- $TestStep->FileName($FileName);
- $TestStep->InStaging(!1);
+ $TestStep->PreviousNo($BuildStep->No);
+ my $TestExe = basename($self->GetParam("TestExecutable"));
+ $TestExe =~ s/_test\.exe$/_test64.exe/ if ($Bits eq "64");
+ $TestStep->FileName($TestExe);
}
else
{
- $TestStep->FileName($StagingFileName);
- $TestStep->InStaging(1);
+ $TestStep->FileName($BaseName);
}
+ $TestStep->InStaging(!1);
$TestStep->FileType("exe$Bits");
$TestStep->Type("single");
$TestStep->DebugLevel($self->GetParam("DebugLevel"));
@@ -875,7 +853,7 @@ sub OnSubmit($)
}
}
- # Now save the whole thing (or whatever's left to save)
+ # Now save it all (or whatever's left to save)
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined($ErrMessage))
{
@@ -883,6 +861,23 @@ sub OnSubmit($)
return !1;
}
+ # Stage the test patch/executable so the job can pick it up
+ my $TmpStagingFullPath = $self->GetTmpStagingFullPath($BaseName);
+ if (!rename($TmpStagingFullPath, "$DataDir/staging/job". $NewJob->Id ."_$BaseName"))
+ {
+ $self->{ErrMessage} = "Could not stage '$BaseName': $!\n";
+ return !1;
+ }
+
+ # Switch Status to staging to indicate we are done setting up the job
+ $NewJob->Status("staging");
+ ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
+ if (defined($ErrMessage))
+ {
+ $self->{ErrMessage} = $ErrMessage;
+ return !1;
+ }
+
# Notify engine
my $ErrMessage = RescheduleJobs();
if (defined $ErrMessage)
--
2.17.0
June 6, 2018
[PATCH 2/4] testbot: Switch CheckForWinetestUpdate.pl to the new job staging standard.
by Francois Gouget
The new approach ensures there is no race condition with the TestBot
Engine between saving the job and saving the steps.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/CheckForWinetestUpdate.pl | 46 +++++++++++++++++++--------
1 file changed, 32 insertions(+), 14 deletions(-)
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index 17dab8236..137db572c 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -192,15 +192,9 @@ sub AddJob($$$)
return 1;
}
- # Create a hard link in staging so it can then be moved into the job
- # directory. This is ok because the latest file is never overwritten.
- my $StagingFileName = CreateNewLink("$DataDir/latest/$LatestBaseName",
- "$DataDir/staging", "_$LatestBaseName");
-
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
- $NewJob->Status("queued");
$NewJob->User(GetBatchUser());
$NewJob->Priority($BaseJob && $Bits == 32 ? 8 : 9);
$NewJob->Remarks($Remarks);
@@ -210,9 +204,9 @@ sub AddJob($$$)
my $NewStep = $Steps->Add();
my $BitsSuffix = ($Bits == 64 ? "64" : "");
$NewStep->Type("suite");
- $NewStep->FileName(basename($StagingFileName));
+ $NewStep->FileName($LatestBaseName);
$NewStep->FileType($Bits == 64 ? "exe64" : "exe32");
- $NewStep->InStaging(1);
+ $NewStep->InStaging(!1);
# Add a task for each VM
my $Tasks = $NewStep->Tasks;
@@ -224,12 +218,28 @@ sub AddJob($$$)
$Task->Timeout($SuiteTimeout);
}
- # Now save the whole thing
+ # Save it all
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined $ErrMessage)
{
- Error "Failed to save job: $ErrMessage\n";
- unlink($StagingFileName);
+ LogMsg "Failed to save the $LatestBaseName job: $ErrMessage\n";
+ return 0;
+ }
+
+ # Stage the test file so it can be picked up by the job
+ if (!link("$DataDir/latest/$LatestBaseName",
+ "$DataDir/staging/job". $NewJob->Id ."_$LatestBaseName"))
+ {
+ Error "Failed to stage $LatestBaseName: $!\n";
+ return 0;
+ }
+
+ # Switch Status to staging to indicate we are done setting up the job
+ $NewJob->Status("staging");
+ ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
+ if (defined $ErrMessage)
+ {
+ Error "Failed to save the $LatestBaseName job (staging): $ErrMessage\n";
return 0;
}
@@ -244,7 +254,6 @@ sub AddReconfigJob()
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
- $NewJob->Status("queued");
$NewJob->User(GetBatchUser());
$NewJob->Priority(3);
$NewJob->Remarks($Remarks);
@@ -266,11 +275,20 @@ sub AddReconfigJob()
$Task->VM($BuildVM);
$Task->Timeout($ReconfigTimeout);
- # Now save the whole thing
+ # Save it all
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined $ErrMessage)
{
- Error "Failed to save reconfig job: $ErrMessage\n";
+ Error "Failed to save the Reconfig job: $ErrMessage\n";
+ return 0;
+ }
+
+ # Switch Status to staging to indicate we are done setting up the job
+ $NewJob->Status("staging");
+ ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
+ if (defined $ErrMessage)
+ {
+ Error "Failed to save the Reconfig job (staging): $ErrMessage\n";
return 0;
}
}
--
2.17.0
June 6, 2018
[PATCH 1/4] testbot: Handle staging at the Job level and avoid race conditions.
by Francois Gouget
When a patch or executable is submitted for testing it is stored in the
staging directory for two reasons, first because the corresponding Job
does not exist yet, and second because the process may not have write
permissions to the Job directory.
So far transfering the file to the Job directory was the responsibility
of the Step that needs it. However this breaks down when more than one
Step needs that file (e.g. a Windows executable build Step and a Wine
testing one).
There is also a (very unlikely) race condition between the scheduler
and the Job creation: the Scheduler could run the first saved Task, mark
it and the Job as completed before the Job's other Steps and Tasks get
saved to the database. Those would then never get run since the Jobs
has completed.
So this patch makes staging the responsibility of the Job and introduces
a staging Status for it.
It also introduces a new Status which indicates the Job is still being
set up to avoid race conditions.
Note that this patch preserves the Step-based staging mechanism for
backward compatibility during the transition.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
Note:
* This requires updating the database schema and restarting the TestBot
Engine and web server.
* The following patches switch each Job creator to the new scheme.
testbot/bin/CheckForWinetestUpdate.pl | 2 ++
testbot/ddl/update36.sql | 4 +++
testbot/ddl/winetestbot.sql | 2 +-
testbot/lib/WineTestBot/Engine/Scheduler.pm | 30 ++++++++++++++++++++-
testbot/lib/WineTestBot/Jobs.pm | 20 +++++++++++---
testbot/lib/WineTestBot/Patches.pm | 1 +
testbot/web/Submit.pl | 1 +
7 files changed, 54 insertions(+), 6 deletions(-)
create mode 100644 testbot/ddl/update36.sql
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index f41148f12..17dab8236 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -200,6 +200,7 @@ sub AddJob($$$)
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
+ $NewJob->Status("queued");
$NewJob->User(GetBatchUser());
$NewJob->Priority($BaseJob && $Bits == 32 ? 8 : 9);
$NewJob->Remarks($Remarks);
@@ -243,6 +244,7 @@ sub AddReconfigJob()
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
+ $NewJob->Status("queued");
$NewJob->User(GetBatchUser());
$NewJob->Priority(3);
$NewJob->Remarks($Remarks);
diff --git a/testbot/ddl/update36.sql b/testbot/ddl/update36.sql
new file mode 100644
index 000000000..2f4bf7fa2
--- /dev/null
+++ b/testbot/ddl/update36.sql
@@ -0,0 +1,4 @@
+USE winetestbot;
+
+ALTER TABLE Jobs
+ MODIFY Status ENUM('new', 'staging', 'queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled') NOT NULL;
diff --git a/testbot/ddl/winetestbot.sql b/testbot/ddl/winetestbot.sql
index 9a28385a9..1e7b1edd1 100644
--- a/testbot/ddl/winetestbot.sql
+++ b/testbot/ddl/winetestbot.sql
@@ -113,7 +113,7 @@ CREATE TABLE Jobs
BranchName VARCHAR(20) NOT NULL,
UserName VARCHAR(40) NOT NULL,
Priority INT(1) NOT NULL,
- Status ENUM('queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled') NOT NULL,
+ Status ENUM('new', 'staging', 'queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled') NOT NULL,
Remarks VARCHAR(128) NULL,
Submitted DATETIME NOT NULL,
Ended DATETIME NULL,
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index 10c0b70ed..85bc0f397 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -30,6 +30,8 @@ WineTestBot::Engine::Scheduler - Schedules the TestBot tasks
use Exporter 'import';
our @EXPORT = qw(ScheduleJobs CheckJobs);
+use File::Copy;
+
use WineTestBot::Config;
use WineTestBot::Engine::Events;
use WineTestBot::Jobs;
@@ -524,11 +526,37 @@ sub _ScheduleTasks($)
# Process the jobs in decreasing priority order
my $JobRank;
my $Jobs = CreateJobs($Sched->{VMs});
- $Jobs->AddFilter("Status", ["queued", "running"]);
+ $Jobs->AddFilter("Status", ["staging", "queued", "running"]);
foreach my $Job (sort CompareJobPriority @{$Jobs->GetItems()})
{
$JobRank++;
+ if ($Job->Status eq "staging")
+ {
+ # Move the file(s) from the staging directory to the job directory
+ my %Staged;
+ my $JobDir = $Job->CreateDir();
+ foreach my $Step (@{$Job->Steps->Clone()->GetItems()})
+ {
+ # Ignore steps that need a file provided by the previous step
+ next if ($Step->PreviousNo or !defined $Step->FileName);
+ # Skip the step if its file has already been staged
+ next if ($Staged{$Step->FileName});
+
+ my $StagingFile = "job". $Job->Id ."_". $Step->FileName;
+ if (move("$DataDir/staging/$StagingFile", "$JobDir/". $Step->FileName))
+ {
+ $Staged{$Step->FileName} = 1;
+ }
+ else
+ {
+ LogMsg "Could not move the '$StagingFile' staging file: $!";
+ }
+ }
+ $Job->Status("queued");
+ $Job->Save();
+ }
+
# The per-step lists of VMs that should be getting ready to run
# before we prepare the next step
my %StepVMs = ("" => []); # no dependency for the first step
diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm
index 13a389586..3fd78aaa2 100644
--- a/testbot/lib/WineTestBot/Jobs.pm
+++ b/testbot/lib/WineTestBot/Jobs.pm
@@ -1,6 +1,6 @@
# -*- Mode: Perl; perl-indent-level: 2; indent-tabs-mode: nil -*-
# Copyright 2009 Ge van Geldorp
-# Copyright 2012-2017 Francois Gouget
+# Copyright 2012-2018 Francois Gouget
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -52,7 +52,19 @@ A Job's lifecycle is as follows:
=over
=item *
-A Job is created with Status set to queued which means it is ready to run.
+A Job is created with Status set to new. During this time the process setting
+up the Job can add new Steps and Tasks to it. It can also put the required
+input files into place in the staging directory with a name of the form
+'job<JobID>_<FileName>' where <JobId> is the Id of the new Job, and FileName is
+the name of a file a Step depends on.
+
+=item *
+Once the Job set up is complete its Status is set to staging. This indicates
+that the TestBot Engine can retrieve the files it depends on from the staging
+directory and move them to the Job's directory.
+
+=item *
+Then the Status is set to queued which indicates the Job is ready to run.
=item *
As soon as one of the Step starts running, the Job's Status field is set to
@@ -93,7 +105,7 @@ sub InitializeNew($$)
my ($self, $Collection) = @_;
$self->Branch(CreateBranches()->GetDefaultBranch());
- $self->Status("queued");
+ $self->Status("new");
$self->Submitted(time());
$self->SUPER::InitializeNew($Collection);
@@ -446,7 +458,7 @@ my @PropertyDescriptors = (
CreateItemrefPropertyDescriptor("Branch", "Branch", !1, 1, \&CreateBranches, ["BranchName"]),
CreateItemrefPropertyDescriptor("User", "Author", !1, 1, \&CreateUsers, ["UserName"]),
CreateBasicPropertyDescriptor("Priority", "Priority", !1, 1, "N", 1),
- CreateEnumPropertyDescriptor("Status", "Status", !1, 1, ['queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled']),
+ CreateEnumPropertyDescriptor("Status", "Status", !1, 1, ['new', 'staging', 'queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled']),
CreateBasicPropertyDescriptor("Remarks", "Remarks", !1, !1, "A", 128),
CreateBasicPropertyDescriptor("Submitted", "Submitted", !1, !1, "DT", 19),
CreateBasicPropertyDescriptor("Ended", "Ended", !1, !1, "DT", 19),
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm
index d5be1b355..4f428133f 100644
--- a/testbot/lib/WineTestBot/Patches.pm
+++ b/testbot/lib/WineTestBot/Patches.pm
@@ -166,6 +166,7 @@ sub Submit($$$)
# Create a new job for this patch
my $NewJob = $Jobs->Add();
+ $NewJob->Status("queued");
$NewJob->User($User);
$NewJob->Priority(6);
my $PropertyDescriptor = $Jobs->GetPropertyDescriptorByName("Remarks");
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index ae69e7ce5..8e22621fd 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -774,6 +774,7 @@ sub OnSubmit($)
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
+ $NewJob->Status("queued");
$NewJob->User($self->GetCurrentSession()->User);
$NewJob->Priority(5);
if ($self->GetParam("Remarks"))
--
2.17.0
June 6, 2018
[PATCH] testbot: Also mark the VM for maintenance if the reverts get stuck.
by Francois Gouget
When a VM takes a long time to revert the LibvirtTool.pl process
typically remains stuck in the Sys::Virt::DomainSnapshot::revert_to()
call and cannot enforce the timeout itself, thus causing the timeout to
be detected at the TestBot Engine level.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
Live QEmu snapshots are still unusable when when the clock is set to the
LibVirt default, that is:
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
testbot/lib/WineTestBot/Engine/Scheduler.pm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index a191f0e1c..10c0b70ed 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -267,8 +267,15 @@ sub _CheckAndClassifyVMs()
{
# The child process got stuck!
$FoundVMErrors = 1;
+ my $NewStatus = "dirty";
+ if ($VM->Status eq "reverting" or $VM->Status eq "sleeping")
+ {
+ my $Errors = ($VM->Errors || 0) + 1;
+ $VM->Errors($Errors);
+ $NewStatus = "maintenance" if ($Errors >= $MaxVMErrors);
+ }
+ $VM->Status($NewStatus);
$VM->KillChild();
- $VM->Status("dirty");
$VM->Save();
$VM->RecordResult($Sched->{records}, "boterror stuck process");
$Sched->{lambvms}->{$VMKey} = 1;
--
2.17.0
June 6, 2018
[PATCH 4/4] wsdapi: Add initial support for reading messages; identify Probe message.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/soap.c | 340
+++++++++++++++++++++++++++++++++++++++++-
dlls/wsdapi/tests/discovery.c | 6 +-
2 files changed, 341 insertions(+), 5 deletions(-)
June 6, 2018
[PATCH 3/4] wsdapi: Add stub for Probe message parsing, prepare notification sink message.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/network.c | 52
++++++++++++++++++++++++++++++++++++++++++-
dlls/wsdapi/soap.c | 6 +++++
dlls/wsdapi/wsdapi_internal.h | 5 +++++
3 files changed, 62 insertions(+), 1 deletion(-)
June 6, 2018
[PATCH 2/4] wsdapi: Add critical section around notification sinks.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/discovery.c | 9 +++++++++
dlls/wsdapi/wsdapi_internal.h | 1 +
2 files changed, 10 insertions(+)
June 6, 2018
[PATCH 1/4] wsdapi: Add support for listening for UDP multicast broadcasts.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/network.c | 278
+++++++++++++++++++++++++++++++++++++++++-
dlls/wsdapi/wsdapi_internal.h | 4 +
2 files changed, 281 insertions(+), 1 deletion(-)
June 6, 2018
Re: [PATCH] comctl32/tests: Use the available ARRAY_SIZE() macro
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39020
Your paranoid android.
=== wvistau64_zh_CN (32 bit ipaddress) ===
TestBot process got stuck or died unexpectedly
The previous 1 run(s) terminated abnormally
=== wvistau64 (32 bit listbox) ===
listbox.c:939: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_zh_CN (32 bit listbox) ===
listbox.c:939: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_fr (32 bit listbox) ===
listbox.c:939: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_he (32 bit listbox) ===
listbox.c:939: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64 (64 bit listbox) ===
listbox.c:939: Test failed: SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err 18
=== wvistau64_zh_CN (32 bit edit) ===
edit.c:1542: Test failed: 0: got 2, 1
edit.c:1563: Test failed: 0: got 2, 1
edit.c:1577: Test failed: 0: got 2, 1
edit.c:1591: Test failed: 0: got 2, 1
edit.c:1717: Test failed: got 1
edit.c:1718: Test failed: got 1
edit.c:1724: Test failed: got 1
edit.c:1740: Test failed: got 2
edit.c:1763: Test failed: got 1
June 6, 2018
Re: [PATCH] comctl32/taskdialog/tests: Add a basic taskdialog creator as interactive test
by Fabian Maurer
> Personally I don't think this is useful, because it won't run
> automatically and detect any problems.
I figured it'd be useful for interactive testing, I mean all interactive tests don't run
automatically. And I don't see a better way for visual testing here.
> If you want to see what it looks
> like or interact with it, it's trivial to make any taskdialog test not
> to close the dialog automatically.
That sounds hacky, I'd prefer real tests for that. Isn't that what interactvie tests are for?
I mean sure, we could add a bunch of special tests that we then pause when we want to
see what it looks like, but it's a lot easier to do visual checks with the creator I proposed -
without having to edit any code.
Regards,
Fabian Maurer
June 6, 2018
Re: [PATCH v2] comctl32/edit/tests: Add interactive test showing a rendering glitch
by Fabian Maurer
On Mittwoch, 6. Juni 2018 12:23:48 CEST Nikolay Sivov wrote:
> Do you know what's going on there? Is this about Edit painting
logic, or
> about Edit being used in a dialog?
I don't know what exactly causes this issue, but it seems comctl32
specific. Probably unrelated to a dialog, but I noticed it while
working on my interactive taskdialog-creator.
Regards,
Fabian Maurer
June 6, 2018
[PATCH 2/2] kernel32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
Just format_msg.c for now as the diff is huge.
Same object is generated with or without this patch when adding
"-g0 -DWINETEST_NO_LINE_NUMBERS" to the CFLAGS.
dlls/kernel32/tests/format_msg.c | 408 ++++++++++++++++-----------------------
1 file changed, 164 insertions(+), 244 deletions(-)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c
index 43e4d35c8a..57ee78af9e 100644
--- a/dlls/kernel32/tests/format_msg.c
+++ b/dlls/kernel32/tests/format_msg.c
@@ -136,8 +136,7 @@ static void test_message_from_string_wide(void)
DWORD r, error;
/* the basics */
- r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4, "failed: r=%d\n", r);
@@ -146,15 +145,13 @@ static void test_message_from_string_wide(void)
{
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- FormatMessageW(FORMAT_MESSAGE_FROM_STRING, NULL, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ FormatMessageW(FORMAT_MESSAGE_FROM_STRING, NULL, 0, 0, out, ARRAY_SIZE(out), NULL);
}
/* empty string */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, empty, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, empty, 0, 0, out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(!lstrcmpW(empty, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==0, "succeeded: r=%d\n", r);
@@ -163,8 +160,7 @@ static void test_message_from_string_wide(void)
/* format placeholder with no specifier */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_null, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_null, 0, 0, out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the buffer to be unchanged\n");
@@ -174,8 +170,7 @@ static void test_message_from_string_wide(void)
/* test string with format placeholder with no specifier */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_tnull, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_tnull, 0, 0, out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(!memcmp(out, init_buf, sizeof(init_buf)) ||
broken(!memcmp(out, broken_buf, sizeof(broken_buf))), /* W2K3+ */
@@ -186,8 +181,7 @@ static void test_message_from_string_wide(void)
/* insertion with no variadic arguments */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0, 0, out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the buffer to be unchanged\n");
@@ -197,7 +191,7 @@ static void test_message_from_string_wide(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, fmt_1, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ 0, out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the buffer to be unchanged\n");
@@ -205,86 +199,72 @@ static void test_message_from_string_wide(void)
ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error);
/* using the format feature */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1s, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), test);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1s, 0, 0, out, ARRAY_SIZE(out), test);
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* no format */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), test);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0, 0, out, ARRAY_SIZE(out), test);
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* two pieces */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_12, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), te, st);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_12, 0, 0, out, ARRAY_SIZE(out), te, st);
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* three pieces */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), t, s, e);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123, 0, 0, out, ARRAY_SIZE(out), t, s, e);
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* s doesn't seem to work in format strings */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_s, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), test);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_s, 0, 0, out, ARRAY_SIZE(out), test);
ok(!lstrcmpW(&fmt_s[1], out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==3, "failed: r=%d\n", r);
/* nor ls */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_ls, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), test);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_ls, 0, 0, out, ARRAY_SIZE(out), test);
ok(!lstrcmpW(&fmt_ls[1], out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4, "failed: r=%d\n", r);
/* nor S */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_S, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), test);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_S, 0, 0, out, ARRAY_SIZE(out), test);
ok(!lstrcmpW(&fmt_S[1], out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==3, "failed: r=%d\n", r);
/* nor ws */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_ws, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), test);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_ws, 0, 0, out, ARRAY_SIZE(out), test);
ok(!lstrcmpW(&fmt_ws[1], out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4, "failed: r=%d\n", r);
/* as characters */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123c, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's');
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123c, 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's');
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* lc is unicode */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123lc, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's');
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123lc, 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's');
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* wc is unicode */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123wc, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's');
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123wc, 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's');
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* C is unicode */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123C, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's');
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123C, 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's');
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* some numbers */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123d, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 1, 2, 3);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123d, 0, 0, out, ARRAY_SIZE(out), 1, 2, 3);
ok(!lstrcmpW(s_123d, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==3,"failed: r=%d\n", r);
/* a single digit with some spacing */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14d, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 1);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14d, 0, 0, out, ARRAY_SIZE(out), 1);
ok(!lstrcmpW(s_14d, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
@@ -294,125 +274,105 @@ static void test_message_from_string_wide(void)
ok(r==4,"failed: r=%d\n", r);
/* two digit decimal number */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14d, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 11);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14d, 0, 0, out, ARRAY_SIZE(out), 11);
ok(!lstrcmpW(s_14d2, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* a hex number */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14x, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 11);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14x, 0, 0, out, ARRAY_SIZE(out), 11);
ok(!lstrcmpW(s_14x, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* a hex number, upper case */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14X, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 11);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14X, 0, 0, out, ARRAY_SIZE(out), 11);
ok(!lstrcmpW(s_14X, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* a hex number, upper case, left justified */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1_4X, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 11);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1_4X, 0, 0, out, ARRAY_SIZE(out), 11);
ok(!lstrcmpW(s_1_4X, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* a long hex number, upper case */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14X, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 0x1ab);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14X, 0, 0, out, ARRAY_SIZE(out), 0x1ab);
ok(!lstrcmpW(s_1AB, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* two percent... */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_2pct, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_2pct, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_2pct, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* periods are special cases */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_2dot1d, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), 0x1ab);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_2dot1d, 0, 0, out, ARRAY_SIZE(out), 0x1ab);
ok(!lstrcmpW(s_2dot147, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==8,"failed: r=%d\n", r);
/* %0 ends the line */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_t0t, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_t0t, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* %! prints an exclamation */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_yah, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_yah, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_yah, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* %space */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_space, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_space, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_space, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* %n yields \r\n, %r yields \r, %t yields \t */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_nrt, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_nrt, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_nrt, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* line feed */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_hi_lf, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_hi_lf, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_hi_crlf, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* carriage return line feed */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_hi_crlf, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_hi_crlf, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_hi_crlf, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* carriage return */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_cr, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_cr, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_crlf, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==2,"failed: r=%d\n", r);
/* double carriage return line feed */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_crcrlf, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_crcrlf, 0, 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_crlfcrlf, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
/* null string as argument */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0,
- 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!lstrcmpW(s_null, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==6,"failed: r=%d\n",r);
/* precision and width */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_13s,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), t );
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_13s, 0, 0, out, ARRAY_SIZE(out), t );
ok(!lstrcmpW(s_spt, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==3, "failed: r=%d\n",r);
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1os,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), 4, t );
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1os, 0, 0, out, ARRAY_SIZE(out), 4, t );
ok(!lstrcmpW( s_sp3t, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n",r);
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_142u,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), 3 );
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_142u, 0, 0, out, ARRAY_SIZE(out), 3 );
ok(!lstrcmpW( s_sp03, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n",r);
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), 5, 3, 1 );
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou, 0, 0, out, ARRAY_SIZE(out), 5, 3, 1 );
ok(!lstrcmpW( s_sp001, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==5,"failed: r=%d\n",r);
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou1oou,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), 5, 3, 1, 4, 2 );
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou1oou, 0, 0, out, ARRAY_SIZE(out),
+ 5, 3, 1, 4, 2 );
ok(!lstrcmpW( s_sp001002, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==11,"failed: r=%d\n",r);
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou3oou,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), 5, 3, 1, 6, 4, 2 );
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou3oou, 0, 0, out, ARRAY_SIZE(out),
+ 5, 3, 1, 6, 4, 2 );
ok(!lstrcmpW( s_sp001sp002, out) ||
broken(!lstrcmpW(s_sp001004, out)), /* NT4/Win2k */
"failed out=[%s]\n", wine_dbgstr_w(out));
@@ -421,11 +381,11 @@ static void test_message_from_string_wide(void)
{
ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 };
r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, fmt_1oou1oou,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), (__ms_va_list *)args );
+ 0, 0, out, ARRAY_SIZE(out), (__ms_va_list *)args );
ok(!lstrcmpW(s_sp002sp003, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==13,"failed: r=%d\n",r);
r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, fmt_1oou4oou,
- 0, 0, out, sizeof(out)/sizeof(WCHAR), (__ms_va_list *)args );
+ 0, 0, out, ARRAY_SIZE(out), (__ms_va_list *)args );
ok(!lstrcmpW(s_sp002sp001, out),"failed out=[%s]\n", wine_dbgstr_w(out));
ok(r==12,"failed: r=%d\n",r);
}
@@ -434,25 +394,25 @@ static void test_message_from_string_wide(void)
/* line feed */
r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_lf, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_hi_sp, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==3,"failed: r=%d\n", r);
/* carriage return line feed */
r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_crlf, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_hi_sp, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==3,"failed: r=%d\n", r);
/* carriage return */
r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_cr, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_sp, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==1,"failed: r=%d\n", r);
/* double carriage return line feed */
r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_crcrlf, 0,
- 0, out, sizeof(out)/sizeof(WCHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!lstrcmpW(s_2sp, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==2,"failed: r=%d\n", r);
}
@@ -465,8 +425,7 @@ static void test_message_from_string(void)
static const WCHAR szwTest[] = { 't','e','s','t',0};
/* the basics */
- r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0,
- 0, out, sizeof(out)/sizeof(CHAR),NULL);
+ r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, ARRAY_SIZE(out),NULL);
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
@@ -475,15 +434,13 @@ static void test_message_from_string(void)
{
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- FormatMessageA(FORMAT_MESSAGE_FROM_STRING, NULL, 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ FormatMessageA(FORMAT_MESSAGE_FROM_STRING, NULL, 0, 0, out, ARRAY_SIZE(out), NULL);
}
/* empty string */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "", 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n");
ok(r==0, "succeeded: r=%d\n", r);
ok(GetLastError()==0xdeadbeef,
@@ -492,8 +449,7 @@ static void test_message_from_string(void)
/* format placeholder with no specifier */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%", 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the buffer to be untouched\n");
ok(r==0, "succeeded: r=%d\n", r);
@@ -503,8 +459,7 @@ static void test_message_from_string(void)
/* test string with format placeholder with no specifier */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test%", 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test%", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the buffer to be untouched\n");
ok(r==0, "succeeded: r=%d\n", r);
@@ -514,8 +469,7 @@ static void test_message_from_string(void)
/* insertion with no variadic arguments */
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%1", 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n");
ok(r==0, "succeeded: r=%d\n", r);
ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %u\n", GetLastError());
@@ -523,194 +477,167 @@ static void test_message_from_string(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, "%1", 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ 0, out, ARRAY_SIZE(out), NULL);
ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n");
ok(r==0, "succeeded: r=%d\n", r);
ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %u\n", GetLastError());
/* using the format feature */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!s!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), "test");
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!s!", 0, 0, out, ARRAY_SIZE(out), "test");
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* no format */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0,
- 0, out, sizeof(out)/sizeof(CHAR), "test");
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, out, ARRAY_SIZE(out), "test");
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* two pieces */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%2", 0,
- 0, out, sizeof(out)/sizeof(CHAR), "te","st");
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%2", 0, 0, out, ARRAY_SIZE(out), "te","st");
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* three pieces */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%3%2%1", 0,
- 0, out, sizeof(out)/sizeof(CHAR), "t","s","e");
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%3%2%1", 0, 0, out, ARRAY_SIZE(out), "t","s","e");
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* s doesn't seem to work in format strings */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%!s!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), "test");
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%!s!", 0, 0, out, ARRAY_SIZE(out), "test");
ok(!strcmp("!s!", out),"failed out=[%s]\n",out);
ok(r==3,"failed: r=%d\n",r);
/* ls is unicode */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ls!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), szwTest);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ls!", 0, 0, out, ARRAY_SIZE(out), szwTest);
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* S is unicode */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!S!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), szwTest);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!S!", 0, 0, out, ARRAY_SIZE(out), szwTest);
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* ws is unicode */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ws!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), szwTest);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ws!", 0, 0, out, ARRAY_SIZE(out), szwTest);
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* as characters */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!c!%2!c!%3!c!%1!c!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 't','e','s');
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!c!%2!c!%3!c!%1!c!", 0, 0, out, ARRAY_SIZE(out),
+ 't','e','s');
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* lc is unicode */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!lc!%2!lc!%3!lc!%1!lc!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 't','e','s');
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!lc!%2!lc!%3!lc!%1!lc!", 0, 0, out, ARRAY_SIZE(out),
+ 't','e','s');
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* wc is unicode */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!wc!%2!wc!%3!wc!%1!wc!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 't','e','s');
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!wc!%2!wc!%3!wc!%1!wc!", 0, 0, out, ARRAY_SIZE(out),
+ 't','e','s');
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* C is unicode */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!C!%2!C!%3!C!%1!C!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 't','e','s');
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!C!%2!C!%3!C!%1!C!", 0, 0, out, ARRAY_SIZE(out),
+ 't','e','s');
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* some numbers */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!d!%2!d!%3!d!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 1,2,3);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!d!%2!d!%3!d!", 0, 0, out, ARRAY_SIZE(out), 1,2,3);
ok(!strcmp("123", out),"failed out=[%s]\n",out);
ok(r==3,"failed: r=%d\n",r);
/* a single digit with some spacing */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 1);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0, 0, out, ARRAY_SIZE(out), 1);
ok(!strcmp(" 1", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* a single digit, left justified */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4d!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 1);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4d!", 0, 0, out, ARRAY_SIZE(out), 1);
ok(!strcmp("1 ", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* two digit decimal number */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 11);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0, 0, out, ARRAY_SIZE(out), 11);
ok(!strcmp(" 11", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* a hex number */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4x!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 11);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4x!", 0, 0, out, ARRAY_SIZE(out), 11);
ok(!strcmp(" b", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* a hex number, upper case */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 11);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0, 0, out, ARRAY_SIZE(out), 11);
ok(!strcmp(" B", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* a hex number, upper case, left justified */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4X!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 11);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4X!", 0, 0, out, ARRAY_SIZE(out), 11);
ok(!strcmp("B ", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* a long hex number, upper case */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 0x1ab);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0, 0, out, ARRAY_SIZE(out), 0x1ab);
ok(!strcmp(" 1AB", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* two percent... */
- r = doit(FORMAT_MESSAGE_FROM_STRING, " %%%% ", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, " %%%% ", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp(" %% ", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* periods are special cases */
- r = doit(FORMAT_MESSAGE_FROM_STRING, " %.%. %1!d!", 0,
- 0, out, sizeof(out)/sizeof(CHAR), 0x1ab);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, " %.%. %1!d!", 0, 0, out, ARRAY_SIZE(out), 0x1ab);
ok(!strcmp(" .. 427", out),"failed out=[%s]\n",out);
ok(r==7,"failed: r=%d\n",r);
/* %0 ends the line */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "test%0test", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "test%0test", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("test", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* %! prints an exclamation */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "yah%!%0 ", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "yah%!%0 ", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("yah!", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* %space */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "% % ", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "% % ", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp(" ", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* %n yields \r\n, %r yields \r, %t yields \t */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%n%r%t", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%n%r%t", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("\r\n\r\t", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* line feed */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\n", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\n", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("hi\r\n", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* carriage return line feed */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\r\n", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\r\n", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("hi\r\n", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* carriage return */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "\r", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "\r", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("\r\n", out),"failed out=[%s]\n",out);
ok(r==2,"failed: r=%d\n",r);
/* double carriage return line feed */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "\r\r\n", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "\r\r\n", 0, 0, out, ARRAY_SIZE(out));
ok(!strcmp("\r\n\r\n", out),"failed out=[%s]\n",out);
ok(r==4,"failed: r=%d\n",r);
/* null string as argument */
- r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0,
- 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!strcmp("(null)", out),"failed out=[%s]\n",out);
ok(r==6,"failed: r=%d\n",r);
@@ -765,25 +692,25 @@ static void test_message_from_string(void)
/* line feed */
r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!strcmp("hi ", out), "failed out=[%s]\n",out);
ok(r==3, "failed: r=%d\n",r);
/* carriage return line feed */
r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!strcmp("hi ", out),"failed out=[%s]\n",out);
ok(r==3,"failed: r=%d\n",r);
/* carriage return */
r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!strcmp(" ", out),"failed out=[%s]\n",out);
ok(r==1,"failed: r=%d\n",r);
/* double carriage return line feed */
r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0,
- 0, out, sizeof(out)/sizeof(CHAR));
+ 0, out, ARRAY_SIZE(out));
ok(!strcmp(" ", out),"failed out=[%s]\n",out);
ok(r==2,"failed: r=%d\n",r);
}
@@ -796,18 +723,18 @@ static void test_message_ignore_inserts(void)
CHAR out[256];
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("test", out), "Expected output string \"test\", got %s\n", out);
/* The %0 escape sequence is handled. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%0", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("test", out), "Expected output string \"test\", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%0test", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("test", out), "Expected output string \"test\", got %s\n", out);
@@ -815,71 +742,67 @@ static void test_message_ignore_inserts(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%0test", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %d\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer to be untouched\n");
ok(GetLastError() == 0xdeadbeef, "Expected GetLastError() to return 0xdeadbeef, got %u\n", GetLastError());
/* Insert sequences are ignored. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%1%2!*.*s!%99", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 17, "Expected FormatMessageA to return 17, got %d\n", ret);
ok(!strcmp("test%1%2!*.*s!%99", out), "Expected output string \"test%%1%%2!*.*s!%%99\", got %s\n", out);
/* Only the "%n", "%r", and "%t" escape sequences are processed. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%%% %.%!", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 8, "Expected FormatMessageA to return 8, got %d\n", ret);
ok(!strcmp("%%% %.%!", out), "Expected output string \"%%%%%% %%.%%!\", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%n%r%t", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("\r\n\r\t", out), "Expected output string \"\\r\\n\\r\\t\", got %s\n", out);
/* CRLF characters are processed normally. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "hi\n", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("hi\r\n", out), "Expected output string \"hi\\r\\n\", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "hi\r\n", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("hi\r\n", out), "Expected output string \"hi\\r\\n\", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "\r", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 2, "Expected FormatMessageA to return 2, got %d\n", ret);
ok(!strcmp("\r\n", out), "Expected output string \"\\r\\n\", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "\r\r\n", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret);
ok(!strcmp("\r\n\r\n", out), "Expected output string \"\\r\\n\\r\\n\", got %s\n", out);
/* The width parameter is handled the same also. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
- FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(!strcmp("hi ", out), "Expected output string \"hi \", got %s\n", out);
ok(ret == 3, "Expected FormatMessageA to return 3, got %d\n", ret);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
- FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 3, "Expected FormatMessageA to return 3, got %d\n", ret);
ok(!strcmp("hi ", out), "Expected output string \"hi \", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
- FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 1, "Expected FormatMessageA to return 1, got %d\n", ret);
ok(!strcmp(" ", out), "Expected output string \" \", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
- FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 2, "Expected FormatMessageA to return 2, got %d\n", ret);
ok(!strcmp(" ", out), "Expected output string \" \", got %s\n", out);
}
@@ -911,89 +834,88 @@ static void test_message_ignore_inserts_wide(void)
WCHAR out[256];
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, test, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(test, out), "Expected output string \"test\", got %s\n", wine_dbgstr_w(out));
/* The %0 escape sequence is handled. */
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_t0, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(test, out), "Expected output string \"test\", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_t0t, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(test, out), "Expected output string \"test\", got %s\n", wine_dbgstr_w(out));
/* While FormatMessageA returns 0 in this case, no last error code is set. */
SetLastError(0xdeadbeef);
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_0t, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageW to return 0, got %d\n", ret);
ok(!lstrcmpW(empty, out), "Expected the output buffer to be the empty string, got %s\n", wine_dbgstr_w(out));
ok(GetLastError() == 0xdeadbeef, "Expected GetLastError() to return 0xdeadbeef, got %u\n", GetLastError());
/* Insert sequences are ignored. */
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_t12oos99, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret);
ok(!lstrcmpW(fmt_t12oos99, out), "Expected output string \"test%%1%%2!*.*s!%%99\", got %s\n", wine_dbgstr_w(out));
/* Only the "%n", "%r", and "%t" escape sequences are processed. */
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_pctspacedot, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 8, "Expected FormatMessageW to return 8, got %d\n", ret);
ok(!lstrcmpW(fmt_pctspacedot, out), "Expected output string \"%%%%%% %%.%%!\", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_nrt, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(s_nrt, out), "Expected output string \"\\r\\n\\r\\t\", got %s\n", wine_dbgstr_w(out));
/* CRLF characters are processed normally. */
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_hi_lf, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(s_hi_crlf, out), "Expected output string \"hi\\r\\n\", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_hi_crlf, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(s_hi_crlf, out), "Expected output string \"hi\\r\\n\", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_cr, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 2, "Expected FormatMessageW to return 2, got %d\n", ret);
ok(!lstrcmpW(s_crlf, out), "Expected output string \"\\r\\n\", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_crcrlf, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret);
ok(!lstrcmpW(s_crlfcrlf, out), "Expected output string \"\\r\\n\\r\\n\", got %s\n", wine_dbgstr_w(out));
/* The width parameter is handled the same also. */
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_lf, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 3, "Expected FormatMessageW to return 3, got %d\n", ret);
ok(!lstrcmpW(s_hi_sp, out), "Expected output string \"hi \", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_crlf, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 3, "Expected FormatMessageW to return 3, got %d\n", ret);
ok(!lstrcmpW(s_hi_sp, out), "Expected output string \"hi \", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
- FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_cr, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_cr, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 1, "Expected FormatMessageW to return 1, got %d\n", ret);
ok(!lstrcmpW(s_sp, out), "Expected output string \" \", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_crcrlf, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ ARRAY_SIZE(out), NULL);
ok(ret == 2, "Expected FormatMessageW to return 2, got %d\n", ret);
ok(!lstrcmpW(s_2sp, out), "Expected output string \" \", got %s\n", wine_dbgstr_w(out));
}
@@ -1216,7 +1138,7 @@ static void test_message_insufficient_buffer(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, sizeof(out)/sizeof(out[0]) - 1, NULL);
+ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, ARRAY_SIZE(out) - 1, NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n",
@@ -1261,7 +1183,7 @@ static void test_message_insufficient_buffer_wide(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, 0, out, sizeof(out)/sizeof(out[0]) - 1, NULL);
+ ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, 0, out, ARRAY_SIZE(out) - 1, NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n",
@@ -1487,7 +1409,7 @@ static void test_message_allocate_buffer_wide(void)
buf = (WCHAR *)0xdeadbeef;
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER,
- test, 0, 0, (WCHAR *)&buf, sizeof(test)/sizeof(WCHAR) - 1, NULL);
+ test, 0, 0, (WCHAR *)&buf, ARRAY_SIZE(test) - 1, NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret);
ok(buf != NULL && buf != (WCHAR *)0xdeadbeef,
"Expected output buffer pointer to be valid\n");
@@ -1500,7 +1422,7 @@ static void test_message_allocate_buffer_wide(void)
buf = (WCHAR *)0xdeadbeef;
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER,
- test, 0, 0, (WCHAR *)&buf, sizeof(test)/sizeof(WCHAR), NULL);
+ test, 0, 0, (WCHAR *)&buf, ARRAY_SIZE(test), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret);
ok(buf != NULL && buf != (WCHAR *)0xdeadbeef,
"Expected output buffer pointer to be valid\n");
@@ -1513,7 +1435,7 @@ static void test_message_allocate_buffer_wide(void)
buf = (WCHAR *)0xdeadbeef;
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER,
- test, 0, 0, (WCHAR *)&buf, sizeof(test)/sizeof(WCHAR) + 1, NULL);
+ test, 0, 0, (WCHAR *)&buf, ARRAY_SIZE(test) + 1, NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret);
ok(buf != NULL && buf != (WCHAR *)0xdeadbeef,
"Expected output buffer pointer to be valid\n");
@@ -1550,53 +1472,53 @@ static void test_message_from_hmodule(void)
/*Test existing messageID; as the message strings from wine's kernel32 differ from windows' kernel32 we don't compare
the strings but only test that FormatMessage doesn't return 0*/
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 7/*=ERROR_ARENA_TRASHED*/,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL);
ok(ret != 0, "FormatMessageA returned 0\n");
/* Test HRESULT. It's not documented but in practice _com_error::ErrorMessage relies on this. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 0x80070005 /* E_ACCESSDENIED */,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL);
ok(ret != 0, "FormatMessageA returned 0\n");
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, TRUST_E_NOSIGNATURE,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL);
ok(ret != 0, "FormatMessageA returned 0\n");
/* Test a message string with an insertion without passing any variadic arguments. */
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 193 /* ERROR_BAD_EXE_FORMAT */,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "FormatMessageA returned non-zero\n");
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE |
FORMAT_MESSAGE_ARGUMENT_ARRAY, h, 193 /* ERROR_BAD_EXE_FORMAT */,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "FormatMessageA returned non-zero\n");
/*Test nonexistent messageID with varying language IDs Note: FormatMessageW behaves the same*/
SetLastError(0xdeadbeef);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret);
ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_FOUND, "last error %u\n", error);
SetLastError(0xdeadbeef);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret);
ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED, "last error %u\n", error);
SetLastError(0xdeadbeef);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT), out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret);
ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED, "last error %u\n", error);
SetLastError(0xdeadbeef);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044,
- MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret);
ok(error == ERROR_RESOURCE_LANG_NOT_FOUND ||
@@ -1607,7 +1529,7 @@ static void test_message_from_hmodule(void)
SetLastError(0xdeadbeef);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044,
- MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), out, sizeof(out)/sizeof(CHAR), NULL);
+ MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), out, ARRAY_SIZE(out), NULL);
error = GetLastError();
ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret);
ok(error == ERROR_RESOURCE_LANG_NOT_FOUND ||
@@ -1627,7 +1549,7 @@ static void test_message_invalid_flags(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageA(0, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ ret = FormatMessageA(0, "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1646,7 +1568,7 @@ static void test_message_invalid_flags(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ ret = FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1656,7 +1578,7 @@ static void test_message_invalid_flags(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageA(FORMAT_MESSAGE_ARGUMENT_ARRAY, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ ret = FormatMessageA(FORMAT_MESSAGE_ARGUMENT_ARRAY, "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1666,7 +1588,7 @@ static void test_message_invalid_flags(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageA(FORMAT_MESSAGE_MAX_WIDTH_MASK, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ ret = FormatMessageA(FORMAT_MESSAGE_MAX_WIDTH_MASK, "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1680,22 +1602,21 @@ static void test_message_invalid_flags(void)
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_SYSTEM,
- "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret);
ok(!strcmp("test", out),
"Expected the output buffer to be untouched\n");
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE,
- "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL);
+ "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret);
ok(!strcmp("test", out),
"Expected the output buffer to be untouched\n");
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE |
- FORMAT_MESSAGE_FROM_SYSTEM, "test", 0, 0, out,
- sizeof(out)/sizeof(CHAR), NULL);
+ FORMAT_MESSAGE_FROM_SYSTEM, "test", 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret);
ok(!strcmp("test", out),
"Expected the output buffer to be untouched\n");
@@ -1712,7 +1633,7 @@ static void test_message_invalid_flags_wide(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageW(0, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ ret = FormatMessageW(0, test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1731,7 +1652,7 @@ static void test_message_invalid_flags_wide(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ ret = FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS, test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1741,7 +1662,7 @@ static void test_message_invalid_flags_wide(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageW(FORMAT_MESSAGE_ARGUMENT_ARRAY, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ ret = FormatMessageW(FORMAT_MESSAGE_ARGUMENT_ARRAY, test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1751,7 +1672,7 @@ static void test_message_invalid_flags_wide(void)
SetLastError(0xdeadbeef);
memcpy(out, init_buf, sizeof(init_buf));
- ret = FormatMessageW(FORMAT_MESSAGE_MAX_WIDTH_MASK, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ ret = FormatMessageW(FORMAT_MESSAGE_MAX_WIDTH_MASK, test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret);
ok(!memcmp(out, init_buf, sizeof(init_buf)),
"Expected the output buffer to be untouched\n");
@@ -1765,22 +1686,21 @@ static void test_message_invalid_flags_wide(void)
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_SYSTEM,
- test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret);
ok(!lstrcmpW(test, out),
"Expected the output buffer to be untouched\n");
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE,
- test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL);
+ test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret);
ok(!lstrcmpW(test, out),
"Expected the output buffer to be untouched\n");
memcpy(out, init_buf, sizeof(init_buf));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE |
- FORMAT_MESSAGE_FROM_SYSTEM, test, 0, 0, out,
- sizeof(out)/sizeof(WCHAR), NULL);
+ FORMAT_MESSAGE_FROM_SYSTEM, test, 0, 0, out, ARRAY_SIZE(out), NULL);
ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret);
ok(!lstrcmpW(test, out),
"Expected the output buffer to be untouched\n");
@@ -1821,11 +1741,11 @@ static void test_message_from_64bit_number(void)
};
int i;
- for (i = 0; i < sizeof(unsigned_tests) / sizeof(unsigned_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(unsigned_tests); i++)
{
- r = doitW(FORMAT_MESSAGE_FROM_STRING, I64u,
- 0, 0, outW, sizeof(outW) / sizeof(WCHAR), unsigned_tests[i].number);
- MultiByteToWideChar(CP_ACP, 0, unsigned_tests[i].expected, -1, expW, sizeof(expW) / sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, I64u, 0, 0, outW, ARRAY_SIZE(outW),
+ unsigned_tests[i].number);
+ MultiByteToWideChar(CP_ACP, 0, unsigned_tests[i].expected, -1, expW, ARRAY_SIZE(expW));
todo_wine {
ok(!lstrcmpW(outW, expW),"[%d] failed, expected %s, got %s\n", i,
unsigned_tests[i].expected, wine_dbgstr_w(outW));
@@ -1840,11 +1760,11 @@ todo_wine {
}
}
- for (i = 0; i < sizeof(signed_tests) / sizeof(signed_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(signed_tests); i++)
{
- r = doitW(FORMAT_MESSAGE_FROM_STRING, I64d,
- 0, 0, outW, sizeof(outW) / sizeof(WCHAR), signed_tests[i].number);
- MultiByteToWideChar(CP_ACP, 0, signed_tests[i].expected, -1, expW, sizeof(expW) / sizeof(WCHAR));
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, I64d, 0, 0, outW, ARRAY_SIZE(outW),
+ signed_tests[i].number);
+ MultiByteToWideChar(CP_ACP, 0, signed_tests[i].expected, -1, expW, ARRAY_SIZE(expW));
todo_wine {
ok(!lstrcmpW(outW, expW),"[%d] failed, expected %s, got %s\n", i,
signed_tests[i].expected, wine_dbgstr_w(outW));
--
2.14.4
June 6, 2018
[PATCH 1/2] kernel32/tests: Correct the buffer size passed to FormatMessageW()
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/kernel32/tests/format_msg.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c
index 290bce9f71..43e4d35c8a 100644
--- a/dlls/kernel32/tests/format_msg.c
+++ b/dlls/kernel32/tests/format_msg.c
@@ -289,8 +289,7 @@ static void test_message_from_string_wide(void)
ok(r==4,"failed: r=%d\n", r);
/* a single digit, left justified */
- r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1_4d, 0,
- 0, out, sizeof(out)/sizeof(CHAR), 1);
+ r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1_4d, 0, 0, out, ARRAY_SIZE(out), 1);
ok(!lstrcmpW(s_1_4d, out), "failed out=%s\n", wine_dbgstr_w(out));
ok(r==4,"failed: r=%d\n", r);
--
2.14.4
June 6, 2018
[PATCH] comctl32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
Same object is generated with or without this patch when adding
"-g0 -DNDEBUG -DWINETEST_NO_LINE_NUMBERS" to the CFLAGS.
dlls/comctl32/tests/combo.c | 4 ++--
dlls/comctl32/tests/edit.c | 6 +++---
dlls/comctl32/tests/header.c | 4 ++--
dlls/comctl32/tests/imagelist.c | 2 +-
dlls/comctl32/tests/ipaddress.c | 4 ++--
dlls/comctl32/tests/listbox.c | 2 +-
dlls/comctl32/tests/listview.c | 14 +++++++-------
dlls/comctl32/tests/monthcal.c | 7 +++----
dlls/comctl32/tests/mru.c | 4 ++--
dlls/comctl32/tests/progress.c | 2 +-
dlls/comctl32/tests/rebar.c | 4 ++--
dlls/comctl32/tests/status.c | 2 +-
dlls/comctl32/tests/taskdialog.c | 3 +--
dlls/comctl32/tests/toolbar.c | 16 ++++++++--------
dlls/comctl32/tests/tooltips.c | 4 ++--
dlls/comctl32/tests/treeview.c | 14 +++++++-------
dlls/comctl32/tests/updown.c | 12 ++++++------
17 files changed, 51 insertions(+), 53 deletions(-)
diff --git a/dlls/comctl32/tests/combo.c b/dlls/comctl32/tests/combo.c
index 83b36f212f..5fee206fd1 100644
--- a/dlls/comctl32/tests/combo.c
+++ b/dlls/comctl32/tests/combo.c
@@ -264,7 +264,7 @@ static void test_comboex_WM_LBUTTONDOWN(void)
WS_VISIBLE|WS_CHILD|CBS_DROPDOWN, 0, 0, 200, 150,
hComboExParentWnd, NULL, hMainHinst, NULL);
- for (i = 0; i < sizeof(choices)/sizeof(UINT); i++){
+ for (i = 0; i < ARRAY_SIZE(choices); i++){
COMBOBOXEXITEMW cbexItem;
wsprintfW(buffer, stringFormat, choices[i]);
@@ -1169,7 +1169,7 @@ static void test_combo_dropdown_size(DWORD style)
{15, 50, 3},
};
- for (test = 0; test < sizeof(info_height) / sizeof(info_height[0]); test++)
+ for (test = 0; test < ARRAY_SIZE(info_height); test++)
{
const struct list_size_info *info_test = &info_height[test];
int height_item; /* Height of a list item */
diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c
index 7e9e7e7634..a5097d1cbb 100644
--- a/dlls/comctl32/tests/edit.c
+++ b/dlls/comctl32/tests/edit.c
@@ -2969,7 +2969,7 @@ static void test_EM_GETLINE(void)
hwnd[0] = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
hwnd[1] = create_editcontrolW(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
- for (i = 0; i < sizeof(hwnd)/sizeof(hwnd[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(hwnd); i++)
{
static const WCHAR strW[] = {'t','e','x','t',0};
static const char *str = "text";
@@ -2994,13 +2994,13 @@ static void test_EM_GETLINE(void)
ok(!strcmp(buff, str), "Unexpected line data %s.\n", buff);
memset(buffW, 0, sizeof(buffW));
- *(WORD *)buffW = sizeof(buffW)/sizeof(buffW[0]);
+ *(WORD *)buffW = ARRAY_SIZE(buffW);
r = SendMessageW(hwnd[i], EM_GETLINE, 0, (LPARAM)buffW);
ok(r == lstrlenW(strW), "Failed to get a line %d.\n", r);
ok(!lstrcmpW(buffW, strW), "Unexpected line data %s.\n", wine_dbgstr_w(buffW));
memset(buffW, 0, sizeof(buffW));
- *(WORD *)buffW = sizeof(buffW)/sizeof(buffW[0]);
+ *(WORD *)buffW = ARRAY_SIZE(buffW);
r = SendMessageW(hwnd[i], EM_GETLINE, 1, (LPARAM)buffW);
ok(r == lstrlenW(strW), "Failed to get a line %d.\n", r);
ok(!lstrcmpW(buffW, strW), "Unexpected line data %s.\n", wine_dbgstr_w(buffW));
diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c
index 7ea80519a6..3428936cd7 100644
--- a/dlls/comctl32/tests/header.c
+++ b/dlls/comctl32/tests/header.c
@@ -1130,7 +1130,7 @@ static void test_hdm_index_messages(HWND hParent)
ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq,
"adder header control to parent", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
- for (i = 0; i < sizeof(item_texts)/sizeof(item_texts[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(item_texts); i++)
{
hdItem.mask = HDI_TEXT | HDI_WIDTH | HDI_FORMAT;
hdItem.pszText = (char*)item_texts[i];
@@ -1170,7 +1170,7 @@ static void test_hdm_index_messages(HWND hParent)
hdItem.mask = HDI_TEXT | HDI_WIDTH;
hdItem.pszText = buffA;
- hdItem.cchTextMax = sizeof(buffA)/sizeof(buffA[0]);
+ hdItem.cchTextMax = ARRAY_SIZE(buffA);
retVal = SendMessageA(hChild, HDM_GETITEMA, 0, (LPARAM) &hdItem);
ok(retVal == TRUE, "Getting the 1st header item should return TRUE, got %d\n", retVal);
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 1c307e4ed3..3bb7902a13 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -1096,7 +1096,7 @@ static void image_list_init(HIMAGELIST himl, INT grow)
check_iml_data(himl, BMP_CX, BMP_CX, 0, 2, grow, ILC_COLOR24, "total 0");
- for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(td); i++)
{
image_list_add_bitmap(himl, td[i].grey, i + 1);
check_iml_data(himl, td[i].cx, td[i].cy, td[i].cur, td[i].max, grow, td[i].bpp, td[i].comment);
diff --git a/dlls/comctl32/tests/ipaddress.c b/dlls/comctl32/tests/ipaddress.c
index 52581899a7..cc79b7bf11 100644
--- a/dlls/comctl32/tests/ipaddress.c
+++ b/dlls/comctl32/tests/ipaddress.c
@@ -50,12 +50,12 @@ static void test_get_set_text(void)
}
/* check text just after creation */
- r = GetWindowTextA(hwnd, ip, sizeof(ip)/sizeof(CHAR));
+ r = GetWindowTextA(hwnd, ip, ARRAY_SIZE(ip));
expect(7, r);
ok(strcmp(ip, "0.0.0.0") == 0, "Expected null IP address, got %s\n", ip);
SendMessageA(hwnd, IPM_SETADDRESS, 0, MAKEIPADDRESS(127, 0, 0, 1));
- r = GetWindowTextA(hwnd, ip, sizeof(ip)/sizeof(CHAR));
+ r = GetWindowTextA(hwnd, ip, ARRAY_SIZE(ip));
expect(9, r);
ok(strcmp(ip, "127.0.0.1") == 0, "Expected 127.0.0.1, got %s\n", ip);
diff --git a/dlls/comctl32/tests/listbox.c b/dlls/comctl32/tests/listbox.c
index 1513bea7f5..f44fdff77f 100644
--- a/dlls/comctl32/tests/listbox.c
+++ b/dlls/comctl32/tests/listbox.c
@@ -48,7 +48,7 @@ static int strcmp_aw(LPCWSTR strw, const char *stra)
WCHAR buf[1024];
if (!stra) return 1;
- MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf)/sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, ARRAY_SIZE(buf));
return lstrcmpW(strw, buf);
}
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index c2d33c41f5..e9b715ee41 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -2328,7 +2328,7 @@ static void test_multiselect(void)
r = SendMessageA(hwnd, LVM_GETSELECTIONMARK, 0, 0);
ok(r == 0, "got %d\n", r);
- for (i = 0; i < sizeof(task_list)/sizeof(task_list[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(task_list); i++) {
DWORD selected_count;
LVITEMA item;
@@ -3481,7 +3481,7 @@ static void test_norecompute(void)
item.mask = LVIF_TEXT | LVIF_NORECOMPUTE;
item.iItem = 0;
item.pszText = buff;
- item.cchTextMax = sizeof(buff)/sizeof(CHAR);
+ item.cchTextMax = ARRAY_SIZE(buff);
res = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, res);
ok(lstrcmpA(buff, testA) == 0, "Expected (%s), got (%s)\n", testA, buff);
@@ -3495,7 +3495,7 @@ static void test_norecompute(void)
item.mask = LVIF_TEXT | LVIF_NORECOMPUTE;
item.iItem = 1;
item.pszText = buff;
- item.cchTextMax = sizeof(buff)/sizeof(CHAR);
+ item.cchTextMax = ARRAY_SIZE(buff);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
res = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item);
@@ -3520,7 +3520,7 @@ static void test_norecompute(void)
item.mask = LVIF_TEXT | LVIF_NORECOMPUTE;
item.iItem = 0;
item.pszText = buff;
- item.cchTextMax = sizeof(buff)/sizeof(CHAR);
+ item.cchTextMax = ARRAY_SIZE(buff);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
res = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, res);
@@ -4662,7 +4662,7 @@ static void test_canceleditlabel(void)
ok(!IsWindow(hwndedit), "Expected edit control to be destroyed\n");
memset(&itema, 0, sizeof(itema));
itema.pszText = buff;
- itema.cchTextMax = sizeof(buff)/sizeof(CHAR);
+ itema.cchTextMax = ARRAY_SIZE(buff);
ret = SendMessageA(hwnd, LVM_GETITEMTEXTA, 0, (LPARAM)&itema);
expect(5, ret);
ok(strcmp(buff, test1) == 0, "Expected label text not to change\n");
@@ -5658,7 +5658,7 @@ static void test_dispinfo(void)
g_disp_A_to_W = TRUE;
item.pszText = (char*)buff;
- item.cchTextMax = sizeof(buff)/sizeof(WCHAR);
+ item.cchTextMax = ARRAY_SIZE(buff);
ret = SendMessageA(hwnd, LVM_GETITEMTEXTA, 0, (LPARAM)&item);
ok(ret == sizeof(testA)-1, "got %d, expected 4\n", ret);
g_disp_A_to_W = FALSE;
@@ -6177,7 +6177,7 @@ static void test_state_image(void)
};
int i;
- for (i = 0; i < sizeof(styles)/sizeof(styles[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(styles); i++)
{
static char text[] = "Item";
static char subtext[] = "Subitem";
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 85822a320c..7c78540333 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -1216,7 +1216,7 @@ if (0)
} else {
title_index++;
- if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index)
+ if (ARRAY_SIZE(title_hits) <= title_index)
break;
todo_wine_if(title_hits[title_index].todo)
@@ -1241,8 +1241,7 @@ if (0)
todo_wine ok(month_count + year_count >= 1, "Not enough month and year items\n");
- ok(r.right <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]),
- "Wrong title layout\n");
+ ok(r.right <= x && title_index + 1 == ARRAY_SIZE(title_hits), "Wrong title layout\n");
DestroyWindow(hwnd);
}
@@ -2016,7 +2015,7 @@ static void test_sel_notify(void)
};
int i;
- for(i = 0; i < sizeof styles / sizeof styles[0]; i++)
+ for(i = 0; i < ARRAY_SIZE(styles); i++)
{
hwnd = create_monthcal_control(styles[i].val);
SetWindowLongPtrA(hwnd, GWLP_ID, SEL_NOTIFY_TEST_ID);
diff --git a/dlls/comctl32/tests/mru.c b/dlls/comctl32/tests/mru.c
index dfad6f859d..b3d3e7a265 100644
--- a/dlls/comctl32/tests/mru.c
+++ b/dlls/comctl32/tests/mru.c
@@ -118,7 +118,7 @@ static LSTATUS mru_RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
dwMaxSubkeyLen++;
dwMaxValueLen++;
dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen);
- if (dwMaxLen > sizeof(szNameBuf)/sizeof(CHAR))
+ if (dwMaxLen > ARRAY_SIZE(szNameBuf))
{
/* Name too big: alloc a buffer for it */
if (!(lpszName = heap_alloc(dwMaxLen * sizeof(CHAR))))
@@ -480,7 +480,7 @@ static void test_CreateMRUListLazyA(void)
return;
}
- for (i = 0; i < sizeof(create_lazyA)/sizeof(create_lazya_t); i++)
+ for (i = 0; i < ARRAY_SIZE(create_lazyA); i++)
{
const create_lazya_t *ptr = &create_lazyA[i];
HANDLE hMRU;
diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c
index b911021be0..497cb47d3c 100644
--- a/dlls/comctl32/tests/progress.c
+++ b/dlls/comctl32/tests/progress.c
@@ -258,7 +258,7 @@ static void test_PBM_STEPIT(void)
HWND progress;
int i, j;
- for (i = 0; i < sizeof(stepit_tests)/sizeof(stepit_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(stepit_tests); i++)
{
struct stepit_test *test = &stepit_tests[i];
LRESULT ret;
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c
index 7dae3a7dbe..3b1be77497 100644
--- a/dlls/comctl32/tests/rebar.c
+++ b/dlls/comctl32/tests/rebar.c
@@ -826,7 +826,7 @@ static DWORD resize_numtests = 0;
RECT r; \
int value; \
const rbresize_test_result_t *res = &resize_results[resize_numtests++]; \
- assert(resize_numtests <= sizeof(resize_results)/sizeof(resize_results[0])); \
+ assert(resize_numtests <= ARRAY_SIZE(resize_results)); \
GetWindowRect(hRebar, &r); \
MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); \
if ((dwStyles[i] & (CCS_NOPARENTALIGN|CCS_NODIVIDER)) == CCS_NOPARENTALIGN) {\
@@ -853,7 +853,7 @@ static void test_resize(void)
CCS_TOP | WS_BORDER, CCS_NOPARENTALIGN | CCS_NODIVIDER | WS_BORDER, CCS_NORESIZE | WS_BORDER,
CCS_NOMOVEY | WS_BORDER};
- const int styles_count = sizeof(dwStyles) / sizeof(dwStyles[0]);
+ const int styles_count = ARRAY_SIZE(dwStyles);
int i;
for (i = 0; i < styles_count; i++)
diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c
index 2308974761..d78bd20262 100644
--- a/dlls/comctl32/tests/status.c
+++ b/dlls/comctl32/tests/status.c
@@ -127,7 +127,7 @@ static int CALLBACK check_height_font_enumproc(ENUMLOGFONTEXA *enumlf, NEWTEXTME
if (type != TRUETYPE_FONTTYPE)
facename = enumlf->elfLogFont.lfFaceName;
- for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(sizes); i++)
{
HFONT hFont;
TEXTMETRICA tm;
diff --git a/dlls/comctl32/tests/taskdialog.c b/dlls/comctl32/tests/taskdialog.c
index 432b89bd15..cca700cd18 100644
--- a/dlls/comctl32/tests/taskdialog.c
+++ b/dlls/comctl32/tests/taskdialog.c
@@ -152,8 +152,7 @@ static void init_test_message(UINT message, WPARAM wParam, LPARAM lParam, struct
}
#define run_test(info, expect_button, seq, context) \
- run_test_(info, expect_button, seq, context, \
- sizeof(seq)/sizeof(seq[0]) - 1, __FILE__, __LINE__)
+ run_test_(info, expect_button, seq, context, ARRAY_SIZE(seq) - 1, __FILE__, __LINE__)
static void run_test_(TASKDIALOGCONFIG *info, int expect_button, const struct message_info *test_messages,
const char *context, int test_messages_len, const char *file, int line)
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index 5fd6133e1f..41807258f4 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -387,7 +387,7 @@ static void basic_test(void)
WS_CHILD | TBSTYLE_LIST,
100,
0, NULL, 0,
- buttons, sizeof(buttons)/sizeof(buttons[0]),
+ buttons, ARRAY_SIZE(buttons),
0, 0, 20, 16, sizeof(TBBUTTON));
ok(hToolbar != NULL, "Toolbar creation\n");
SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"test\000");
@@ -1315,7 +1315,7 @@ static DWORD tbsize_alt_numtests = 0;
compare(buttonCount, res->nButtons, "%d"); \
for (i=0; i<min(buttonCount, res->nButtons); i++) { \
ok(SendMessageA(hToolbar, TB_GETITEMRECT, i, (LPARAM)&rc) == 1, "TB_GETITEMRECT\n"); \
- if (broken(tbsize_alt_numtests < sizeof(tbsize_alt_results)/sizeof(tbsize_alt_results[0]) && \
+ if (broken(tbsize_alt_numtests < ARRAY_SIZE(tbsize_alt_results) && \
EqualRect(&rc, &tbsize_alt_results[tbsize_alt_numtests].rcButton))) { \
win_skip("Alternate rect found\n"); \
tbsize_alt_numtests++; \
@@ -1939,13 +1939,13 @@ static void test_setrows(void)
| CCS_NOMOVEY | CCS_TOP,
0,
0, NULL, 0,
- buttons, sizeof(buttons)/sizeof(buttons[0]),
+ buttons, ARRAY_SIZE(buttons),
20, 20, 0, 0, sizeof(TBBUTTON));
ok(hToolbar != NULL, "Toolbar creation\n");
ok(SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n");
/* test setting rows to each of 1-10 with bLarger true and false */
- for (i=0; i<(sizeof(tbrows_results) / sizeof(tbrows_result_t)); i++) {
+ for (i=0; i<ARRAY_SIZE(tbrows_results); i++) {
RECT rc;
int rows;
@@ -2058,7 +2058,7 @@ static void test_get_set_style(void)
WS_CHILD | TBSTYLE_LIST,
100,
0, NULL, 0,
- buttons, sizeof(buttons)/sizeof(buttons[0]),
+ buttons, ARRAY_SIZE(buttons),
0, 0, 20, 16, sizeof(TBBUTTON));
ok(hToolbar != NULL, "Toolbar creation\n");
SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"test\000");
@@ -2276,7 +2276,7 @@ static void test_TB_GET_SET_EXTENDEDSTYLE(void)
return;
}
- for (i = 0; i < sizeof(extended_style_test)/sizeof(extended_style_t); i++)
+ for (i = 0; i < ARRAY_SIZE(extended_style_test); i++)
{
ptr = &extended_style_test[i];
@@ -2397,7 +2397,7 @@ static void test_save(void)
params.pszValueName = value;
rebuild_toolbar_with_buttons( &wnd );
- SendMessageW( wnd, TB_ADDBUTTONSW, sizeof(more_btns) / sizeof(more_btns[0]), (LPARAM)more_btns );
+ SendMessageW(wnd, TB_ADDBUTTONSW, ARRAY_SIZE(more_btns), (LPARAM)more_btns);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
res = SendMessageW( wnd, TB_SAVERESTOREW, TRUE, (LPARAM)¶ms );
@@ -2423,7 +2423,7 @@ static void test_save(void)
ok( res, "restoring failed\n" );
ok_sequence(sequences, PARENT_SEQ_INDEX, restore_parent_seq, "restore", FALSE);
count = SendMessageW( wnd, TB_BUTTONCOUNT, 0, 0 );
- ok( count == sizeof(expect_btns) / sizeof(expect_btns[0]), "got %d\n", count );
+ ok( count == ARRAY_SIZE(expect_btns), "got %d\n", count );
for (i = 0; i < count; i++)
{
diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c
index af95a569bb..0cb7afd688 100644
--- a/dlls/comctl32/tests/tooltips.c
+++ b/dlls/comctl32/tests/tooltips.c
@@ -183,7 +183,7 @@ static void test_customdraw(void) {
GetCursorPos(&orig_pos);
for (iterationNumber = 0;
- iterationNumber < sizeof(expectedResults)/sizeof(expectedResults[0]);
+ iterationNumber < ARRAY_SIZE(expectedResults);
iterationNumber++) {
HWND parent, hwndTip;
@@ -821,7 +821,7 @@ static void test_longtextW(void)
toolinfoW.hinst = GetModuleHandleW(NULL);
toolinfoW.uFlags = 0;
toolinfoW.uId = 0x1234ABCD;
- MultiByteToWideChar(CP_ACP, 0, longtextA, -1, bufW, sizeof(bufW)/sizeof(bufW[0]));
+ MultiByteToWideChar(CP_ACP, 0, longtextA, -1, bufW, ARRAY_SIZE(bufW));
lenW = lstrlenW(bufW);
toolinfoW.lpszText = bufW;
toolinfoW.lParam = 0xdeadbeef;
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 5cf397f3af..33edaaf4b4 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -527,7 +527,7 @@ static void test_callback(void)
tvi.hItem = hRoot;
tvi.mask = TVIF_TEXT;
tvi.pszText = buf;
- tvi.cchTextMax = sizeof(buf)/sizeof(buf[0]);
+ tvi.cchTextMax = ARRAY_SIZE(buf);
ret = TreeView_GetItemA(hTree, &tvi);
expect(TRUE, ret);
ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Callback item text mismatch %s vs %s\n",
@@ -706,7 +706,7 @@ static void test_getitemtext(void)
HWND hTree;
CHAR szBuffer[80] = "Blah";
- int nBufferSize = sizeof(szBuffer)/sizeof(CHAR);
+ int nBufferSize = ARRAY_SIZE(szBuffer);
hTree = create_treeview_control(0);
fill_tree(hTree);
@@ -1630,7 +1630,7 @@ static void test_itemedit(void)
item.mask = TVIF_TEXT;
item.hItem = hRoot;
item.pszText = buffA;
- item.cchTextMax = sizeof(buffA)/sizeof(CHAR);
+ item.cchTextMax = ARRAY_SIZE(buffA);
r = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, r);
ok(!strcmp("x", buffA), "Expected item text to change\n");
@@ -1664,7 +1664,7 @@ static void test_itemedit(void)
ok(IsWindow(edit), "Expected valid handle\n");
g_beginedit_alter_text = FALSE;
- GetWindowTextA(edit, buffA, sizeof(buffA)/sizeof(CHAR));
+ GetWindowTextA(edit, buffA, ARRAY_SIZE(buffA));
ok(!strcmp(buffA, "<edittextaltered>"), "got string %s\n", buffA);
DestroyWindow(hTree);
@@ -1991,7 +1991,7 @@ static void test_TVS_SINGLEEXPAND(void)
SetWindowLongA(hTree, GWL_STYLE, GetWindowLongA(hTree, GWL_STYLE) | TVS_SINGLEEXPAND);
/* to avoid painting related notifications */
ShowWindow(hTree, SW_HIDE);
- for (i = 0; i < sizeof(items)/sizeof(items[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(items); i++)
{
ins.hParent = items[i].parent ? *items[i].parent : TVI_ROOT;
ins.hInsertAfter = TVI_FIRST;
@@ -2000,7 +2000,7 @@ static void test_TVS_SINGLEEXPAND(void)
*items[i].handle = TreeView_InsertItemA(hTree, &ins);
}
- for (i = 0; i < sizeof(sequence_tests)/sizeof(sequence_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(sequence_tests); i++)
{
flush_sequences(sequences, NUM_MSG_SEQUENCES);
ret = SendMessageA(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)(*sequence_tests[i].select));
@@ -2009,7 +2009,7 @@ static void test_TVS_SINGLEEXPAND(void)
ok_sequence(sequences, PARENT_SEQ_INDEX, sequence_tests[i].sequence, context, FALSE);
}
- for (i = 0; i < sizeof(items)/sizeof(items[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(items); i++)
{
ret = SendMessageA(hTree, TVM_GETITEMSTATE, (WPARAM)(*items[i].handle), 0xFFFF);
ok(ret == items[i].final_state, "singleexpand items[%d]: expected state 0x%x got 0x%x\n",
diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c
index f549c41583..1f4e38f0eb 100644
--- a/dlls/comctl32/tests/updown.c
+++ b/dlls/comctl32/tests/updown.c
@@ -697,13 +697,13 @@ static void test_updown_base(void)
r = SendMessageA(updown, UDM_SETPOS, 0, 10);
expect(50, r);
- GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR));
+ GetWindowTextA(g_edit, text, ARRAY_SIZE(text));
ok(lstrcmpA(text, "10") == 0, "Expected '10', got '%s'\n", text);
r = SendMessageA(updown, UDM_SETBASE, 16, 0);
expect(10, r);
- GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR));
+ GetWindowTextA(g_edit, text, ARRAY_SIZE(text));
/* FIXME: currently hex output isn't properly formatted, but for this
test only change from initial text matters */
ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text);
@@ -837,20 +837,20 @@ static void test_UDS_SETBUDDYINT(void)
style = GetWindowLongA(updown, GWL_STYLE);
ok(style & UDS_SETBUDDYINT, "Expected UDS_SETBUDDY to be set\n");
SendMessageA(updown, UDM_SETPOS, 0, 20);
- GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR));
+ GetWindowTextA(g_edit, text, ARRAY_SIZE(text));
ok(lstrlenA(text) == 0, "Expected empty string\n");
DestroyWindow(updown);
/* creating with UDS_SETBUDDYINT */
updown = create_updown_control(UDS_SETBUDDYINT | UDS_ALIGNRIGHT, g_edit);
- GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR));
+ GetWindowTextA(g_edit, text, ARRAY_SIZE(text));
/* 50 is initial value here */
ok(lstrcmpA(text, "50") == 0, "Expected '50', got '%s'\n", text);
/* now remove style flag */
style = GetWindowLongA(updown, GWL_STYLE);
SetWindowLongA(updown, GWL_STYLE, style & ~UDS_SETBUDDYINT);
SendMessageA(updown, UDM_SETPOS, 0, 20);
- GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR));
+ GetWindowTextA(g_edit, text, ARRAY_SIZE(text));
ok(lstrcmpA(text, "20") == 0, "Expected '20', got '%s'\n", text);
/* set edit text directly, check position */
strcpy(text, "10");
@@ -872,7 +872,7 @@ static void test_UDS_SETBUDDYINT(void)
style = GetWindowLongA(updown, GWL_STYLE);
SetWindowLongA(updown, GWL_STYLE, style | UDS_SETBUDDYINT);
SendMessageA(updown, UDM_SETPOS, 0, 30);
- GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR));
+ GetWindowTextA(g_edit, text, ARRAY_SIZE(text));
ok(lstrcmpA(text, "30") == 0, "Expected '30', got '%s'\n", text);
DestroyWindow(updown);
}
--
2.14.4
June 6, 2018
[PATCH] include: Add an option to disable line numbers in the tests
by Michael Stefaniuc
Two use cases for this:
- No-op changes that change the line count will generate now the exact
same object file.
- While writing new tests that change the line count this allows for an
easier diff between the two test runs.
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
include/wine/test.h | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/include/wine/test.h b/include/wine/test.h
index 476b4d9847..e73f40d575 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -113,10 +113,17 @@ extern void __winetest_cdecl winetest_skip( const char *msg, ... ) WINETEST_PRIN
extern void __winetest_cdecl winetest_win_skip( const char *msg, ... ) WINETEST_PRINTF_ATTR(1,2);
extern void __winetest_cdecl winetest_trace( const char *msg, ... ) WINETEST_PRINTF_ATTR(1,2);
-#define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok
-#define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip
-#define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip
-#define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
+#ifdef WINETEST_NO_LINE_NUMBERS
+# define ok_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_ok
+# define skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_skip
+# define win_skip_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_win_skip
+# define trace_(file, line) (winetest_set_location(file, 0), 0) ? (void)0 : winetest_trace
+#else
+# define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok
+# define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip
+# define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip
+# define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
+#endif
#define ok ok_(__FILE__, __LINE__)
#define skip skip_(__FILE__, __LINE__)
--
2.14.4
June 6, 2018
[PATCH v3 5/5] kernel32: Implement Wow64SetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/thread.c | 17 +++++++++++++++++
include/winbase.h | 1 +
include/winternl.h | 1 +
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 1cb0b54..de6f007 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1603,7 +1603,7 @@
@ stdcall Wow64GetThreadContext(long ptr)
# @ stub Wow64GetThreadSelectorEntry
@ stdcall Wow64RevertWow64FsRedirection(ptr)
-# @ stub Wow64SetThreadContext
+@ stdcall Wow64SetThreadContext(long ptr)
# @ stub Wow64SuspendThread
@ stdcall WriteConsoleA(long ptr long ptr ptr)
@ stdcall WriteConsoleInputA(long ptr long ptr)
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index 3aa2887..eb304dc 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -236,6 +236,23 @@ BOOL WINAPI SetThreadContext( HANDLE handle, /* [in] Handle to thread
/***********************************************************************
+ * Wow64SetThreadContext [KERNEL32.@]
+ */
+BOOL WINAPI Wow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context)
+{
+#ifdef __i386__
+ NTSTATUS status = NtSetContextThread( handle, (const CONTEXT *)context );
+#elif defined(_WIN64)
+ NTSTATUS status = RtlWow64SetThreadContext( handle, context );
+#else
+ NTSTATUS status = STATUS_NOT_IMPLEMENTED;
+ FIXME("not implemented on this platform\n");
+#endif
+ if (status) SetLastError( RtlNtStatusToDosError(status) );
+ return !status;
+}
+
+/***********************************************************************
* GetThreadContext [KERNEL32.@] Retrieves context of thread.
*
* RETURNS
diff --git a/include/winbase.h b/include/winbase.h
index f7239b8..667df96 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2708,6 +2708,7 @@ WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
WINBASEAPI BOOL WINAPI Wow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
+WINBASEAPI BOOL WINAPI Wow64SetThreadContext(HANDLE, const WOW64_CONTEXT *);
WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
diff --git a/include/winternl.h b/include/winternl.h
index 9361825..9341c40 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2838,6 +2838,7 @@ NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
#ifdef _WIN64
NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
+NTSYSAPI NTSTATUS WINAPI RtlWow64SetThreadContext(HANDLE, const WOW64_CONTEXT *);
#endif
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
--
2.7.4
June 6, 2018
[PATCH v3 4/5] kernel32: Implement Wow64GetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/thread.c | 18 ++++++++++++++++++
include/winbase.h | 1 +
include/winternl.h | 3 +++
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 9ed5dfb..1cb0b54 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1600,7 +1600,7 @@
@ stdcall WinExec(str long)
@ stdcall Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(ptr)
-# @ stub Wow64GetThreadContext
+@ stdcall Wow64GetThreadContext(long ptr)
# @ stub Wow64GetThreadSelectorEntry
@ stdcall Wow64RevertWow64FsRedirection(ptr)
# @ stub Wow64SetThreadContext
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index b6ca9f260..3aa2887 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -251,6 +251,24 @@ BOOL WINAPI GetThreadContext( HANDLE handle, /* [in] Handle to thread with
}
+/***********************************************************************
+ * Wow64GetThreadContext [KERNEL32.@]
+ */
+BOOL WINAPI Wow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context)
+{
+#ifdef __i386__
+ NTSTATUS status = NtGetContextThread( handle, (CONTEXT *)context );
+#elif defined(_WIN64)
+ NTSTATUS status = RtlWow64GetThreadContext( handle, context );
+#else
+ NTSTATUS status = STATUS_NOT_IMPLEMENTED;
+ FIXME("not implemented on this platform\n");
+#endif
+ if (status) SetLastError( RtlNtStatusToDosError(status) );
+ return !status;
+}
+
+
/**********************************************************************
* SuspendThread [KERNEL32.@] Suspends a thread.
*
diff --git a/include/winbase.h b/include/winbase.h
index 4ddc1d3..f7239b8 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2706,6 +2706,7 @@ WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE);
WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT);
WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
+WINBASEAPI BOOL WINAPI Wow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
diff --git a/include/winternl.h b/include/winternl.h
index 3ecd068..9361825 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2836,6 +2836,9 @@ NTSYSAPI void WINAPI RtlWakeConditionVariable(RTL_CONDITION_VARIABLE *);
NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
+#ifdef _WIN64
+NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
+#endif
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
--
2.7.4
June 6, 2018
[PATCH v3 3/5] ntdll: Implement RtlWow64SetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/tests/exception.c | 6 +++
dlls/ntdll/thread.c | 96 +++++++++++++++++++++++++++++++++++++++-----
3 files changed, 93 insertions(+), 10 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index f1dd6ed..77cc1ae 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -978,6 +978,7 @@
@ stdcall RtlWow64EnableFsRedirection(long)
@ stdcall RtlWow64EnableFsRedirectionEx(long ptr)
@ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
+@ stdcall -arch=win64 RtlWow64SetThreadContext(long ptr)
@ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 9310297..e30cd59 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -150,6 +150,7 @@ static EXCEPTION_DISPOSITION (WINAPI *p__C_specific_handler)(EXCEPTION_RECORD*,
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
static VOID (CDECL *pRtlRestoreContext)(CONTEXT*, EXCEPTION_RECORD*);
static NTSTATUS (WINAPI *pRtlWow64GetThreadContext)(HANDLE, WOW64_CONTEXT *);
+static NTSTATUS (WINAPI *pRtlWow64SetThreadContext)(HANDLE, const WOW64_CONTEXT *);
static VOID (CDECL *pRtlUnwindEx)(VOID*, VOID*, EXCEPTION_RECORD*, VOID*, CONTEXT*, UNWIND_HISTORY_TABLE*);
static int (CDECL *p_setjmp)(_JUMP_BUFFER*);
#endif
@@ -2520,6 +2521,9 @@ static void test_wow64_context(void)
ok(*(WORD *)ctx.ExtendedRegisters == 0x27f, "got SSE control word %04x\n",
*(WORD *)ctx.ExtendedRegisters);
+ ret = pRtlWow64SetThreadContext( pi.hThread, &ctx );
+ ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
+
pNtTerminateProcess(pi.hProcess, 0);
}
@@ -3163,6 +3167,8 @@ START_TEST(exception)
"RtlUnwindEx" );
pRtlWow64GetThreadContext = (void *)GetProcAddress( hntdll,
"RtlWow64GetThreadContext" );
+ pRtlWow64SetThreadContext = (void *)GetProcAddress( hntdll,
+ "RtlWow64SetThreadContext" );
p_setjmp = (void *)GetProcAddress( hmsvcrt,
"_setjmp" );
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index df04b33..52c7953 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -851,23 +851,16 @@ TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void)
return NtCurrentTeb()->ActiveFrame;
}
-
-/***********************************************************************
- * set_thread_context
- */
-NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
+static NTSTATUS set_server_context( HANDLE handle, const context_t *context, BOOL *self )
{
NTSTATUS ret;
DWORD dummy, i;
- context_t server_context;
-
- context_to_server( &server_context, context );
SERVER_START_REQ( set_thread_context )
{
req->handle = wine_server_obj_handle( handle );
req->suspend = 1;
- wine_server_add_data( req, &server_context, sizeof(server_context) );
+ wine_server_add_data( req, context, sizeof(*context) );
ret = wine_server_call( req );
*self = reply->self;
}
@@ -881,7 +874,7 @@ NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
{
req->handle = wine_server_obj_handle( handle );
req->suspend = 0;
- wine_server_add_data( req, &server_context, sizeof(server_context) );
+ wine_server_add_data( req, context, sizeof(*context) );
ret = wine_server_call( req );
}
SERVER_END_REQ;
@@ -900,6 +893,12 @@ NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
return ret;
}
+NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
+{
+ context_t server_context;
+ context_to_server( &server_context, context );
+ return set_server_context( handle, &server_context, self );
+}
/* convert CPU-specific flags to generic server flags */
static inline unsigned int get_server_context_flags( DWORD flags )
@@ -978,6 +977,83 @@ NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self)
}
#ifdef _WIN64
+static NTSTATUS wow64_context_to_server( context_t *to, const WOW64_CONTEXT *from )
+{
+ DWORD flags = from->ContextFlags & ~WOW64_CONTEXT_i386; /* get rid of CPU id */
+
+ memset( to, 0, sizeof(*to) );
+ to->cpu = CPU_x86;
+
+ if (flags & WOW64_CONTEXT_CONTROL)
+ {
+ to->flags |= SERVER_CTX_CONTROL;
+ to->ctl.i386_regs.ebp = from->Ebp;
+ to->ctl.i386_regs.esp = from->Esp;
+ to->ctl.i386_regs.eip = from->Eip;
+ to->ctl.i386_regs.cs = from->SegCs;
+ to->ctl.i386_regs.ss = from->SegSs;
+ to->ctl.i386_regs.eflags = from->EFlags;
+ }
+ if (flags & WOW64_CONTEXT_INTEGER)
+ {
+ to->flags |= SERVER_CTX_INTEGER;
+ to->integer.i386_regs.eax = from->Eax;
+ to->integer.i386_regs.ebx = from->Ebx;
+ to->integer.i386_regs.ecx = from->Ecx;
+ to->integer.i386_regs.edx = from->Edx;
+ to->integer.i386_regs.esi = from->Esi;
+ to->integer.i386_regs.edi = from->Edi;
+ }
+ if (flags & WOW64_CONTEXT_SEGMENTS)
+ {
+ to->flags |= SERVER_CTX_SEGMENTS;
+ to->seg.i386_regs.ds = from->SegDs;
+ to->seg.i386_regs.es = from->SegEs;
+ to->seg.i386_regs.fs = from->SegFs;
+ to->seg.i386_regs.gs = from->SegGs;
+ }
+ if (flags & WOW64_CONTEXT_FLOATING_POINT)
+ {
+ to->flags |= SERVER_CTX_FLOATING_POINT;
+ to->fp.i386_regs.ctrl = from->FloatSave.ControlWord;
+ to->fp.i386_regs.status = from->FloatSave.StatusWord;
+ to->fp.i386_regs.tag = from->FloatSave.TagWord;
+ to->fp.i386_regs.err_off = from->FloatSave.ErrorOffset;
+ to->fp.i386_regs.err_sel = from->FloatSave.ErrorSelector;
+ to->fp.i386_regs.data_off = from->FloatSave.DataOffset;
+ to->fp.i386_regs.data_sel = from->FloatSave.DataSelector;
+ to->fp.i386_regs.cr0npx = from->FloatSave.Cr0NpxState;
+ memcpy( to->fp.i386_regs.regs, from->FloatSave.RegisterArea, sizeof(to->fp.i386_regs.regs) );
+ }
+ if (flags & WOW64_CONTEXT_DEBUG_REGISTERS)
+ {
+ to->flags |= SERVER_CTX_DEBUG_REGISTERS;
+ to->debug.i386_regs.dr0 = from->Dr0;
+ to->debug.i386_regs.dr1 = from->Dr1;
+ to->debug.i386_regs.dr2 = from->Dr2;
+ to->debug.i386_regs.dr3 = from->Dr3;
+ to->debug.i386_regs.dr6 = from->Dr6;
+ to->debug.i386_regs.dr7 = from->Dr7;
+ }
+ if (flags & WOW64_CONTEXT_EXTENDED_REGISTERS)
+ {
+ to->flags |= SERVER_CTX_EXTENDED_REGISTERS;
+ memcpy( to->ext.i386_regs, from->ExtendedRegisters, sizeof(to->ext.i386_regs) );
+ }
+ return STATUS_SUCCESS;
+}
+
+/******************************************************************************
+ * RtlWow64SetThreadContext (NTDLL.@)
+ */
+NTSTATUS WINAPI RtlWow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context )
+{
+ BOOL self;
+ context_t server_context;
+ wow64_context_to_server( &server_context, context );
+ return set_server_context( handle, &server_context, &self );
+}
+
/* convert CPU-specific flags to generic server flags */
static inline unsigned int wow64_get_server_context_flags( DWORD flags )
{
--
2.7.4
June 6, 2018
[PATCH v3 2/5] ntdll: Implement RtlWow64GetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
v3: fix test failures on Vista
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/tests/exception.c | 36 ++++++++++++++
dlls/ntdll/thread.c | 114 ++++++++++++++++++++++++++++++++++++++++---
3 files changed, 143 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index c0f5d6f..f1dd6ed 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -977,6 +977,7 @@
@ stdcall RtlWalkHeap(long ptr)
@ stdcall RtlWow64EnableFsRedirection(long)
@ stdcall RtlWow64EnableFsRedirectionEx(long ptr)
+@ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
@ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index c47c8cb..9310297 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -149,6 +149,7 @@ static PRUNTIME_FUNCTION (WINAPI *pRtlLookupFunctionEntry)(ULONG64, ULONG64*, UN
static EXCEPTION_DISPOSITION (WINAPI *p__C_specific_handler)(EXCEPTION_RECORD*, ULONG64, CONTEXT*, DISPATCHER_CONTEXT*);
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
static VOID (CDECL *pRtlRestoreContext)(CONTEXT*, EXCEPTION_RECORD*);
+static NTSTATUS (WINAPI *pRtlWow64GetThreadContext)(HANDLE, WOW64_CONTEXT *);
static VOID (CDECL *pRtlUnwindEx)(VOID*, VOID*, EXCEPTION_RECORD*, VOID*, CONTEXT*, UNWIND_HISTORY_TABLE*);
static int (CDECL *p_setjmp)(_JUMP_BUFFER*);
#endif
@@ -2490,6 +2491,38 @@ static void test_dpe_exceptions(void)
pRtlRemoveVectoredExceptionHandler(handler);
}
+static void test_wow64_context(void)
+{
+ char cmdline[] = "C:\\windows\\syswow64\\notepad.exe";
+ PROCESS_INFORMATION pi;
+ STARTUPINFOA si = {0};
+ WOW64_CONTEXT ctx;
+ NTSTATUS ret;
+
+ memset(&ctx, 0x55, sizeof(ctx));
+ ctx.ContextFlags = WOW64_CONTEXT_ALL;
+ ret = pRtlWow64GetThreadContext( GetCurrentThread(), &ctx );
+ ok(ret == STATUS_INVALID_PARAMETER || broken(ret == STATUS_PARTIAL_COPY), "got %#x\n", ret);
+
+ CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi);
+
+ ret = pRtlWow64GetThreadContext( pi.hThread, &ctx );
+ ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
+ ok(ctx.ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#x\n", ctx.ContextFlags);
+ ok(!ctx.Ebp, "got ebp %08x\n", ctx.Ebp);
+ ok(!ctx.Ecx, "got ecx %08x\n", ctx.Ecx);
+ ok(!ctx.Edx, "got edx %08x\n", ctx.Edx);
+ ok(!ctx.Esi, "got esi %08x\n", ctx.Esi);
+ ok(!ctx.Edi, "got edi %08x\n", ctx.Edi);
+ ok((ctx.EFlags & ~2) == 0x200, "got eflags %08x\n", ctx.EFlags);
+ ok((WORD) ctx.FloatSave.ControlWord == 0x27f, "got control word %08x\n",
+ ctx.FloatSave.ControlWord);
+ ok(*(WORD *)ctx.ExtendedRegisters == 0x27f, "got SSE control word %04x\n",
+ *(WORD *)ctx.ExtendedRegisters);
+
+ pNtTerminateProcess(pi.hProcess, 0);
+}
+
#endif /* __x86_64__ */
#if defined(__i386__) || defined(__x86_64__)
@@ -3128,6 +3161,8 @@ START_TEST(exception)
"RtlRestoreContext" );
pRtlUnwindEx = (void *)GetProcAddress( hntdll,
"RtlUnwindEx" );
+ pRtlWow64GetThreadContext = (void *)GetProcAddress( hntdll,
+ "RtlWow64GetThreadContext" );
p_setjmp = (void *)GetProcAddress( hmsvcrt,
"_setjmp" );
@@ -3143,6 +3178,7 @@ START_TEST(exception)
test_restore_context();
test_prot_fault();
test_dpe_exceptions();
+ test_wow64_context();
if (pRtlAddFunctionTable && pRtlDeleteFunctionTable && pRtlInstallFunctionTableCallback && pRtlLookupFunctionEntry)
test_dynamic_unwind();
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 35e23d2..df04b33 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -924,22 +924,18 @@ static inline unsigned int get_server_context_flags( DWORD flags )
return ret;
}
-/***********************************************************************
- * get_thread_context
- */
-NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self )
+static NTSTATUS get_server_context( HANDLE handle, unsigned int server_flags,
+ context_t *context, BOOL *self )
{
NTSTATUS ret;
DWORD dummy, i;
- unsigned int server_flags = get_server_context_flags( context->ContextFlags );
- context_t server_context;
SERVER_START_REQ( get_thread_context )
{
req->handle = wine_server_obj_handle( handle );
req->flags = server_flags;
req->suspend = 1;
- wine_server_set_reply( req, &server_context, sizeof(server_context) );
+ wine_server_set_reply( req, context, sizeof(*context) );
ret = wine_server_call( req );
*self = reply->self;
}
@@ -954,7 +950,7 @@ NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self )
req->handle = wine_server_obj_handle( handle );
req->flags = server_flags;
req->suspend = 0;
- wine_server_set_reply( req, &server_context, sizeof(server_context) );
+ wine_server_set_reply( req, context, sizeof(*context) );
ret = wine_server_call( req );
}
SERVER_END_REQ;
@@ -969,10 +965,112 @@ NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self )
NtResumeThread( handle, &dummy );
if (ret == STATUS_PENDING) ret = STATUS_ACCESS_DENIED;
}
+ return ret;
+}
+
+NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self)
+{
+ context_t server_context;
+ unsigned int server_flags = get_server_context_flags( context->ContextFlags );
+ NTSTATUS ret = get_server_context( handle, server_flags, &server_context, self);
if (!ret) ret = context_from_server( context, &server_context );
return ret;
}
+#ifdef _WIN64
+/* convert CPU-specific flags to generic server flags */
+static inline unsigned int wow64_get_server_context_flags( DWORD flags )
+{
+ unsigned int ret = 0;
+
+ flags &= 0x3f; /* mask CPU id flags */
+ if (flags & WOW64_CONTEXT_CONTROL) ret |= SERVER_CTX_CONTROL;
+ if (flags & WOW64_CONTEXT_INTEGER) ret |= SERVER_CTX_INTEGER;
+ if (flags & WOW64_CONTEXT_SEGMENTS) ret |= SERVER_CTX_SEGMENTS;
+ if (flags & WOW64_CONTEXT_FLOATING_POINT) ret |= SERVER_CTX_FLOATING_POINT;
+ if (flags & WOW64_CONTEXT_DEBUG_REGISTERS) ret |= SERVER_CTX_DEBUG_REGISTERS;
+ if (flags & WOW64_CONTEXT_EXTENDED_REGISTERS) ret |= SERVER_CTX_EXTENDED_REGISTERS;
+ return ret;
+}
+
+static NTSTATUS wow64_context_from_server( WOW64_CONTEXT *to, const context_t *from )
+{
+ if (from->cpu != CPU_x86) return STATUS_INVALID_PARAMETER;
+
+ to->ContextFlags = WOW64_CONTEXT_i386;
+ if (from->flags & SERVER_CTX_CONTROL)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_CONTROL;
+ to->Ebp = from->ctl.i386_regs.ebp;
+ to->Esp = from->ctl.i386_regs.esp;
+ to->Eip = from->ctl.i386_regs.eip;
+ to->SegCs = from->ctl.i386_regs.cs;
+ to->SegSs = from->ctl.i386_regs.ss;
+ to->EFlags = from->ctl.i386_regs.eflags;
+ }
+ if (from->flags & SERVER_CTX_INTEGER)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_INTEGER;
+ to->Eax = from->integer.i386_regs.eax;
+ to->Ebx = from->integer.i386_regs.ebx;
+ to->Ecx = from->integer.i386_regs.ecx;
+ to->Edx = from->integer.i386_regs.edx;
+ to->Esi = from->integer.i386_regs.esi;
+ to->Edi = from->integer.i386_regs.edi;
+ }
+ if (from->flags & SERVER_CTX_SEGMENTS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_SEGMENTS;
+ to->SegDs = from->seg.i386_regs.ds;
+ to->SegEs = from->seg.i386_regs.es;
+ to->SegFs = from->seg.i386_regs.fs;
+ to->SegGs = from->seg.i386_regs.gs;
+ }
+ if (from->flags & SERVER_CTX_FLOATING_POINT)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_FLOATING_POINT;
+ to->FloatSave.ControlWord = from->fp.i386_regs.ctrl;
+ to->FloatSave.StatusWord = from->fp.i386_regs.status;
+ to->FloatSave.TagWord = from->fp.i386_regs.tag;
+ to->FloatSave.ErrorOffset = from->fp.i386_regs.err_off;
+ to->FloatSave.ErrorSelector = from->fp.i386_regs.err_sel;
+ to->FloatSave.DataOffset = from->fp.i386_regs.data_off;
+ to->FloatSave.DataSelector = from->fp.i386_regs.data_sel;
+ to->FloatSave.Cr0NpxState = from->fp.i386_regs.cr0npx;
+ memcpy( to->FloatSave.RegisterArea, from->fp.i386_regs.regs, sizeof(to->FloatSave.RegisterArea) );
+ }
+ if (from->flags & SERVER_CTX_DEBUG_REGISTERS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_DEBUG_REGISTERS;
+ to->Dr0 = from->debug.i386_regs.dr0;
+ to->Dr1 = from->debug.i386_regs.dr1;
+ to->Dr2 = from->debug.i386_regs.dr2;
+ to->Dr3 = from->debug.i386_regs.dr3;
+ to->Dr6 = from->debug.i386_regs.dr6;
+ to->Dr7 = from->debug.i386_regs.dr7;
+ }
+ if (from->flags & SERVER_CTX_EXTENDED_REGISTERS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_EXTENDED_REGISTERS;
+ memcpy( to->ExtendedRegisters, from->ext.i386_regs, sizeof(to->ExtendedRegisters) );
+ }
+ return STATUS_SUCCESS;
+}
+
+
+/******************************************************************************
+ * RtlWow64GetThreadContext (NTDLL.@)
+ */
+NTSTATUS WINAPI RtlWow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context )
+{
+ BOOL self;
+ context_t server_context;
+ unsigned int server_flags = wow64_get_server_context_flags( context->ContextFlags );
+ NTSTATUS ret = get_server_context( handle, server_flags, &server_context, &self );
+ if (!ret) ret = wow64_context_from_server( context, &server_context );
+ return ret;
+}
+#endif
/******************************************************************************
* NtQueryInformationThread (NTDLL.@)
--
2.7.4
June 6, 2018
[PATCH v3 1/5] winnt.h: Add some WOW64 definitions.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
include/winnt.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h
index 54bf11d..c41eff4 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -2112,6 +2112,96 @@ typedef CONTEXT *PCONTEXT;
NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*);
+#define WOW64_CONTEXT_i386 0x00010000
+#define WOW64_CONTEXT_i486 0x00010000
+#define WOW64_CONTEXT_CONTROL (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000001))
+#define WOW64_CONTEXT_INTEGER (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000002))
+#define WOW64_CONTEXT_SEGMENTS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000004))
+#define WOW64_CONTEXT_FLOATING_POINT (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000008))
+#define WOW64_CONTEXT_DEBUG_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000010))
+#define WOW64_CONTEXT_EXTENDED_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000020))
+#define WOW64_CONTEXT_FULL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS)
+#define WOW64_CONTEXT_ALL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | \
+ WOW64_CONTEXT_SEGMENTS | WOW64_CONTEXT_FLOATING_POINT | \
+ WOW64_CONTEXT_DEBUG_REGISTERS | WOW64_CONTEXT_EXTENDED_REGISTERS)
+
+#define WOW64_CONTEXT_XSTATE (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000040))
+
+#define WOW64_CONTEXT_EXCEPTION_ACTIVE 0x08000000
+#define WOW64_CONTEXT_SERVICE_ACTIVE 0x10000000
+#define WOW64_CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define WOW64_CONTEXT_EXCEPTION_REPORTING 0x80000000
+
+#define WOW64_SIZE_OF_80387_REGISTERS 80
+#define WOW64_MAXIMUM_SUPPORTED_EXTENSION 512
+
+typedef struct _WOW64_FLOATING_SAVE_AREA {
+ DWORD ControlWord;
+ DWORD StatusWord;
+ DWORD TagWord;
+ DWORD ErrorOffset;
+ DWORD ErrorSelector;
+ DWORD DataOffset;
+ DWORD DataSelector;
+ BYTE RegisterArea[WOW64_SIZE_OF_80387_REGISTERS];
+ DWORD Cr0NpxState;
+} WOW64_FLOATING_SAVE_AREA, *PWOW64_FLOATING_SAVE_AREA;
+
+#include "pshpack4.h"
+typedef struct _WOW64_CONTEXT {
+ DWORD ContextFlags;
+ DWORD Dr0;
+ DWORD Dr1;
+ DWORD Dr2;
+ DWORD Dr3;
+ DWORD Dr6;
+ DWORD Dr7;
+ WOW64_FLOATING_SAVE_AREA FloatSave;
+ DWORD SegGs;
+ DWORD SegFs;
+ DWORD SegEs;
+ DWORD SegDs;
+ DWORD Edi;
+ DWORD Esi;
+ DWORD Ebx;
+ DWORD Edx;
+ DWORD Ecx;
+ DWORD Eax;
+ DWORD Ebp;
+ DWORD Eip;
+ DWORD SegCs;
+ DWORD EFlags;
+ DWORD Esp;
+ DWORD SegSs;
+ BYTE ExtendedRegisters[WOW64_MAXIMUM_SUPPORTED_EXTENSION];
+} WOW64_CONTEXT, *PWOW64_CONTEXT;
+#include "poppack.h"
+
+typedef struct _WOW64_LDT_ENTRY {
+ WORD LimitLow;
+ WORD BaseLow;
+ union {
+ struct {
+ BYTE BaseMid;
+ BYTE Flags1;
+ BYTE Flags2;
+ BYTE BaseHi;
+ } Bytes;
+ struct {
+ DWORD BaseMid : 8;
+ DWORD Type : 5;
+ DWORD Dpl : 2;
+ DWORD Pres : 1;
+ DWORD LimitHi : 4;
+ DWORD Sys : 1;
+ DWORD Reserved_0 : 1;
+ DWORD Default_Big : 1;
+ DWORD Granularity : 1;
+ DWORD BaseHi : 8;
+ } Bits;
+ } HighWord;
+} WOW64_LDT_ENTRY, *PWOW64_LDT_ENTRY;
+
/*
* Product types
*/
--
2.7.4
June 6, 2018
Re: [PATCH v2 3/5] ntdll: Implement RtlWow64SetThreadContext().
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39017
Your paranoid android.
=== wvistau64 (64 bit exception) ===
exception.c:2506: Test failed: got 0x8000000d
=== w2008s64 (64 bit exception) ===
exception.c:2506: Test failed: got 0x8000000d
June 6, 2018
Re: [PATCH v2 2/5] ntdll: Implement RtlWow64GetThreadContext().
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39016
Your paranoid android.
=== wvistau64 (64 bit exception) ===
exception.c:2505: Test failed: got 0x8000000d
=== w2008s64 (64 bit exception) ===
exception.c:2505: Test failed: got 0x8000000d
June 6, 2018
Out for a few days
by Alexandre Julliard
Folks,
I'm going to be out from tomorrow until Sunday, so release 3.10 is going
to be delayed until Monday.
--
Alexandre Julliard
julliard(a)winehq.org
June 6, 2018
Re: [PATCH 2/3] kernel32: Implement Wow64GetThreadContext().
by Zebediah Figura
On 06/06/2018 09:34 AM, Alexandre Julliard wrote:
> Zebediah Figura <zfigura(a)codeweavers.com> writes:
>
>> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
>> ---
>> With code essentially copied from ntdll. As far as I can tell there is no
>> ntdll entry point for this function.
>
> RtlWow64GetThreadContext() is probably what you are looking for. It will
> need some test cases obviously.
>
Thanks; I can see I was looking in the wrong place. I've sent updated
patches.
June 6, 2018
[PATCH v2 5/5] kernel32: Implement Wow64SetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/thread.c | 17 +++++++++++++++++
include/winbase.h | 1 +
include/winternl.h | 1 +
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 1cb0b54..de6f007 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1603,7 +1603,7 @@
@ stdcall Wow64GetThreadContext(long ptr)
# @ stub Wow64GetThreadSelectorEntry
@ stdcall Wow64RevertWow64FsRedirection(ptr)
-# @ stub Wow64SetThreadContext
+@ stdcall Wow64SetThreadContext(long ptr)
# @ stub Wow64SuspendThread
@ stdcall WriteConsoleA(long ptr long ptr ptr)
@ stdcall WriteConsoleInputA(long ptr long ptr)
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index 3aa2887..eb304dc 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -236,6 +236,23 @@ BOOL WINAPI SetThreadContext( HANDLE handle, /* [in] Handle to thread
/***********************************************************************
+ * Wow64SetThreadContext [KERNEL32.@]
+ */
+BOOL WINAPI Wow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context)
+{
+#ifdef __i386__
+ NTSTATUS status = NtSetContextThread( handle, (const CONTEXT *)context );
+#elif defined(_WIN64)
+ NTSTATUS status = RtlWow64SetThreadContext( handle, context );
+#else
+ NTSTATUS status = STATUS_NOT_IMPLEMENTED;
+ FIXME("not implemented on this platform\n");
+#endif
+ if (status) SetLastError( RtlNtStatusToDosError(status) );
+ return !status;
+}
+
+/***********************************************************************
* GetThreadContext [KERNEL32.@] Retrieves context of thread.
*
* RETURNS
diff --git a/include/winbase.h b/include/winbase.h
index f7239b8..667df96 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2708,6 +2708,7 @@ WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
WINBASEAPI BOOL WINAPI Wow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
+WINBASEAPI BOOL WINAPI Wow64SetThreadContext(HANDLE, const WOW64_CONTEXT *);
WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
diff --git a/include/winternl.h b/include/winternl.h
index 9361825..9341c40 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2838,6 +2838,7 @@ NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
#ifdef _WIN64
NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
+NTSYSAPI NTSTATUS WINAPI RtlWow64SetThreadContext(HANDLE, const WOW64_CONTEXT *);
#endif
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
--
2.7.4
June 6, 2018
[PATCH v2 4/5] kernel32: Implement Wow64GetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/thread.c | 18 ++++++++++++++++++
include/winbase.h | 1 +
include/winternl.h | 3 +++
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 9ed5dfb..1cb0b54 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1600,7 +1600,7 @@
@ stdcall WinExec(str long)
@ stdcall Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(ptr)
-# @ stub Wow64GetThreadContext
+@ stdcall Wow64GetThreadContext(long ptr)
# @ stub Wow64GetThreadSelectorEntry
@ stdcall Wow64RevertWow64FsRedirection(ptr)
# @ stub Wow64SetThreadContext
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index b6ca9f260..3aa2887 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -251,6 +251,24 @@ BOOL WINAPI GetThreadContext( HANDLE handle, /* [in] Handle to thread with
}
+/***********************************************************************
+ * Wow64GetThreadContext [KERNEL32.@]
+ */
+BOOL WINAPI Wow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context)
+{
+#ifdef __i386__
+ NTSTATUS status = NtGetContextThread( handle, (CONTEXT *)context );
+#elif defined(_WIN64)
+ NTSTATUS status = RtlWow64GetThreadContext( handle, context );
+#else
+ NTSTATUS status = STATUS_NOT_IMPLEMENTED;
+ FIXME("not implemented on this platform\n");
+#endif
+ if (status) SetLastError( RtlNtStatusToDosError(status) );
+ return !status;
+}
+
+
/**********************************************************************
* SuspendThread [KERNEL32.@] Suspends a thread.
*
diff --git a/include/winbase.h b/include/winbase.h
index 4ddc1d3..f7239b8 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2706,6 +2706,7 @@ WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE);
WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT);
WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
+WINBASEAPI BOOL WINAPI Wow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
diff --git a/include/winternl.h b/include/winternl.h
index 3ecd068..9361825 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2836,6 +2836,9 @@ NTSYSAPI void WINAPI RtlWakeConditionVariable(RTL_CONDITION_VARIABLE *);
NTSYSAPI NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirection(BOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlWow64EnableFsRedirectionEx(ULONG,ULONG*);
+#ifdef _WIN64
+NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
+#endif
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI RtlZombifyActivationContext(HANDLE);
NTSYSAPI NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
--
2.7.4
June 6, 2018
[PATCH v2 3/5] ntdll: Implement RtlWow64SetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/tests/exception.c | 6 +++
dlls/ntdll/thread.c | 96 +++++++++++++++++++++++++++++++++++++++-----
3 files changed, 93 insertions(+), 10 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index f1dd6ed..77cc1ae 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -978,6 +978,7 @@
@ stdcall RtlWow64EnableFsRedirection(long)
@ stdcall RtlWow64EnableFsRedirectionEx(long ptr)
@ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
+@ stdcall -arch=win64 RtlWow64SetThreadContext(long ptr)
@ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 0ab3812..f09e86d 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -150,6 +150,7 @@ static EXCEPTION_DISPOSITION (WINAPI *p__C_specific_handler)(EXCEPTION_RECORD*,
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
static VOID (CDECL *pRtlRestoreContext)(CONTEXT*, EXCEPTION_RECORD*);
static NTSTATUS (WINAPI *pRtlWow64GetThreadContext)(HANDLE, WOW64_CONTEXT *);
+static NTSTATUS (WINAPI *pRtlWow64SetThreadContext)(HANDLE, const WOW64_CONTEXT *);
static VOID (CDECL *pRtlUnwindEx)(VOID*, VOID*, EXCEPTION_RECORD*, VOID*, CONTEXT*, UNWIND_HISTORY_TABLE*);
static int (CDECL *p_setjmp)(_JUMP_BUFFER*);
#endif
@@ -2520,6 +2521,9 @@ static void test_wow64_context(void)
ok(*(WORD *)ctx.ExtendedRegisters == 0x27f, "got SSE control word %04x\n",
*(WORD *)ctx.ExtendedRegisters);
+ ret = pRtlWow64SetThreadContext( pi.hThread, &ctx );
+ ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
+
pNtTerminateProcess(pi.hProcess, 0);
}
@@ -3163,6 +3167,8 @@ START_TEST(exception)
"RtlUnwindEx" );
pRtlWow64GetThreadContext = (void *)GetProcAddress( hntdll,
"RtlWow64GetThreadContext" );
+ pRtlWow64SetThreadContext = (void *)GetProcAddress( hntdll,
+ "RtlWow64SetThreadContext" );
p_setjmp = (void *)GetProcAddress( hmsvcrt,
"_setjmp" );
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index df04b33..52c7953 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -851,23 +851,16 @@ TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void)
return NtCurrentTeb()->ActiveFrame;
}
-
-/***********************************************************************
- * set_thread_context
- */
-NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
+static NTSTATUS set_server_context( HANDLE handle, const context_t *context, BOOL *self )
{
NTSTATUS ret;
DWORD dummy, i;
- context_t server_context;
-
- context_to_server( &server_context, context );
SERVER_START_REQ( set_thread_context )
{
req->handle = wine_server_obj_handle( handle );
req->suspend = 1;
- wine_server_add_data( req, &server_context, sizeof(server_context) );
+ wine_server_add_data( req, context, sizeof(*context) );
ret = wine_server_call( req );
*self = reply->self;
}
@@ -881,7 +874,7 @@ NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
{
req->handle = wine_server_obj_handle( handle );
req->suspend = 0;
- wine_server_add_data( req, &server_context, sizeof(server_context) );
+ wine_server_add_data( req, context, sizeof(*context) );
ret = wine_server_call( req );
}
SERVER_END_REQ;
@@ -900,6 +893,12 @@ NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
return ret;
}
+NTSTATUS set_thread_context( HANDLE handle, const CONTEXT *context, BOOL *self )
+{
+ context_t server_context;
+ context_to_server( &server_context, context );
+ return set_server_context( handle, &server_context, self );
+}
/* convert CPU-specific flags to generic server flags */
static inline unsigned int get_server_context_flags( DWORD flags )
@@ -978,6 +977,83 @@ NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self)
}
#ifdef _WIN64
+static NTSTATUS wow64_context_to_server( context_t *to, const WOW64_CONTEXT *from )
+{
+ DWORD flags = from->ContextFlags & ~WOW64_CONTEXT_i386; /* get rid of CPU id */
+
+ memset( to, 0, sizeof(*to) );
+ to->cpu = CPU_x86;
+
+ if (flags & WOW64_CONTEXT_CONTROL)
+ {
+ to->flags |= SERVER_CTX_CONTROL;
+ to->ctl.i386_regs.ebp = from->Ebp;
+ to->ctl.i386_regs.esp = from->Esp;
+ to->ctl.i386_regs.eip = from->Eip;
+ to->ctl.i386_regs.cs = from->SegCs;
+ to->ctl.i386_regs.ss = from->SegSs;
+ to->ctl.i386_regs.eflags = from->EFlags;
+ }
+ if (flags & WOW64_CONTEXT_INTEGER)
+ {
+ to->flags |= SERVER_CTX_INTEGER;
+ to->integer.i386_regs.eax = from->Eax;
+ to->integer.i386_regs.ebx = from->Ebx;
+ to->integer.i386_regs.ecx = from->Ecx;
+ to->integer.i386_regs.edx = from->Edx;
+ to->integer.i386_regs.esi = from->Esi;
+ to->integer.i386_regs.edi = from->Edi;
+ }
+ if (flags & WOW64_CONTEXT_SEGMENTS)
+ {
+ to->flags |= SERVER_CTX_SEGMENTS;
+ to->seg.i386_regs.ds = from->SegDs;
+ to->seg.i386_regs.es = from->SegEs;
+ to->seg.i386_regs.fs = from->SegFs;
+ to->seg.i386_regs.gs = from->SegGs;
+ }
+ if (flags & WOW64_CONTEXT_FLOATING_POINT)
+ {
+ to->flags |= SERVER_CTX_FLOATING_POINT;
+ to->fp.i386_regs.ctrl = from->FloatSave.ControlWord;
+ to->fp.i386_regs.status = from->FloatSave.StatusWord;
+ to->fp.i386_regs.tag = from->FloatSave.TagWord;
+ to->fp.i386_regs.err_off = from->FloatSave.ErrorOffset;
+ to->fp.i386_regs.err_sel = from->FloatSave.ErrorSelector;
+ to->fp.i386_regs.data_off = from->FloatSave.DataOffset;
+ to->fp.i386_regs.data_sel = from->FloatSave.DataSelector;
+ to->fp.i386_regs.cr0npx = from->FloatSave.Cr0NpxState;
+ memcpy( to->fp.i386_regs.regs, from->FloatSave.RegisterArea, sizeof(to->fp.i386_regs.regs) );
+ }
+ if (flags & WOW64_CONTEXT_DEBUG_REGISTERS)
+ {
+ to->flags |= SERVER_CTX_DEBUG_REGISTERS;
+ to->debug.i386_regs.dr0 = from->Dr0;
+ to->debug.i386_regs.dr1 = from->Dr1;
+ to->debug.i386_regs.dr2 = from->Dr2;
+ to->debug.i386_regs.dr3 = from->Dr3;
+ to->debug.i386_regs.dr6 = from->Dr6;
+ to->debug.i386_regs.dr7 = from->Dr7;
+ }
+ if (flags & WOW64_CONTEXT_EXTENDED_REGISTERS)
+ {
+ to->flags |= SERVER_CTX_EXTENDED_REGISTERS;
+ memcpy( to->ext.i386_regs, from->ExtendedRegisters, sizeof(to->ext.i386_regs) );
+ }
+ return STATUS_SUCCESS;
+}
+
+/******************************************************************************
+ * RtlWow64SetThreadContext (NTDLL.@)
+ */
+NTSTATUS WINAPI RtlWow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context )
+{
+ BOOL self;
+ context_t server_context;
+ wow64_context_to_server( &server_context, context );
+ return set_server_context( handle, &server_context, &self );
+}
+
/* convert CPU-specific flags to generic server flags */
static inline unsigned int wow64_get_server_context_flags( DWORD flags )
{
--
2.7.4
June 6, 2018
[PATCH v2 2/5] ntdll: Implement RtlWow64GetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/tests/exception.c | 36 ++++++++++++++
dlls/ntdll/thread.c | 114 ++++++++++++++++++++++++++++++++++++++++---
3 files changed, 143 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index c0f5d6f..f1dd6ed 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -977,6 +977,7 @@
@ stdcall RtlWalkHeap(long ptr)
@ stdcall RtlWow64EnableFsRedirection(long)
@ stdcall RtlWow64EnableFsRedirectionEx(long ptr)
+@ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
@ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index c47c8cb..0ab3812 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -149,6 +149,7 @@ static PRUNTIME_FUNCTION (WINAPI *pRtlLookupFunctionEntry)(ULONG64, ULONG64*, UN
static EXCEPTION_DISPOSITION (WINAPI *p__C_specific_handler)(EXCEPTION_RECORD*, ULONG64, CONTEXT*, DISPATCHER_CONTEXT*);
static VOID (WINAPI *pRtlCaptureContext)(CONTEXT*);
static VOID (CDECL *pRtlRestoreContext)(CONTEXT*, EXCEPTION_RECORD*);
+static NTSTATUS (WINAPI *pRtlWow64GetThreadContext)(HANDLE, WOW64_CONTEXT *);
static VOID (CDECL *pRtlUnwindEx)(VOID*, VOID*, EXCEPTION_RECORD*, VOID*, CONTEXT*, UNWIND_HISTORY_TABLE*);
static int (CDECL *p_setjmp)(_JUMP_BUFFER*);
#endif
@@ -2490,6 +2491,38 @@ static void test_dpe_exceptions(void)
pRtlRemoveVectoredExceptionHandler(handler);
}
+static void test_wow64_context(void)
+{
+ char cmdline[] = "C:\\windows\\syswow64\\notepad.exe";
+ PROCESS_INFORMATION pi;
+ STARTUPINFOA si = {0};
+ WOW64_CONTEXT ctx;
+ NTSTATUS ret;
+
+ memset(&ctx, 0x55, sizeof(ctx));
+ ctx.ContextFlags = WOW64_CONTEXT_ALL;
+ ret = pRtlWow64GetThreadContext( GetCurrentThread(), &ctx );
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#x\n", ret);
+
+ CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi);
+
+ ret = pRtlWow64GetThreadContext( pi.hThread, &ctx );
+ ok(ret == STATUS_SUCCESS, "got %#x\n", ret);
+ ok(ctx.ContextFlags == WOW64_CONTEXT_ALL, "got context flags %#x\n", ctx.ContextFlags);
+ ok(!ctx.Ebp, "got ebp %08x\n", ctx.Ebp);
+ ok(!ctx.Ecx, "got ecx %08x\n", ctx.Ecx);
+ ok(!ctx.Edx, "got edx %08x\n", ctx.Edx);
+ ok(!ctx.Esi, "got esi %08x\n", ctx.Esi);
+ ok(!ctx.Edi, "got edi %08x\n", ctx.Edi);
+ ok((ctx.EFlags & ~2) == 0x200, "got eflags %08x\n", ctx.EFlags);
+ ok((WORD) ctx.FloatSave.ControlWord == 0x27f, "got control word %08x\n",
+ ctx.FloatSave.ControlWord);
+ ok(*(WORD *)ctx.ExtendedRegisters == 0x27f, "got SSE control word %04x\n",
+ *(WORD *)ctx.ExtendedRegisters);
+
+ pNtTerminateProcess(pi.hProcess, 0);
+}
+
#endif /* __x86_64__ */
#if defined(__i386__) || defined(__x86_64__)
@@ -3128,6 +3161,8 @@ START_TEST(exception)
"RtlRestoreContext" );
pRtlUnwindEx = (void *)GetProcAddress( hntdll,
"RtlUnwindEx" );
+ pRtlWow64GetThreadContext = (void *)GetProcAddress( hntdll,
+ "RtlWow64GetThreadContext" );
p_setjmp = (void *)GetProcAddress( hmsvcrt,
"_setjmp" );
@@ -3143,6 +3178,7 @@ START_TEST(exception)
test_restore_context();
test_prot_fault();
test_dpe_exceptions();
+ test_wow64_context();
if (pRtlAddFunctionTable && pRtlDeleteFunctionTable && pRtlInstallFunctionTableCallback && pRtlLookupFunctionEntry)
test_dynamic_unwind();
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 35e23d2..df04b33 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -924,22 +924,18 @@ static inline unsigned int get_server_context_flags( DWORD flags )
return ret;
}
-/***********************************************************************
- * get_thread_context
- */
-NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self )
+static NTSTATUS get_server_context( HANDLE handle, unsigned int server_flags,
+ context_t *context, BOOL *self )
{
NTSTATUS ret;
DWORD dummy, i;
- unsigned int server_flags = get_server_context_flags( context->ContextFlags );
- context_t server_context;
SERVER_START_REQ( get_thread_context )
{
req->handle = wine_server_obj_handle( handle );
req->flags = server_flags;
req->suspend = 1;
- wine_server_set_reply( req, &server_context, sizeof(server_context) );
+ wine_server_set_reply( req, context, sizeof(*context) );
ret = wine_server_call( req );
*self = reply->self;
}
@@ -954,7 +950,7 @@ NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self )
req->handle = wine_server_obj_handle( handle );
req->flags = server_flags;
req->suspend = 0;
- wine_server_set_reply( req, &server_context, sizeof(server_context) );
+ wine_server_set_reply( req, context, sizeof(*context) );
ret = wine_server_call( req );
}
SERVER_END_REQ;
@@ -969,10 +965,112 @@ NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self )
NtResumeThread( handle, &dummy );
if (ret == STATUS_PENDING) ret = STATUS_ACCESS_DENIED;
}
+ return ret;
+}
+
+NTSTATUS get_thread_context( HANDLE handle, CONTEXT *context, BOOL *self)
+{
+ context_t server_context;
+ unsigned int server_flags = get_server_context_flags( context->ContextFlags );
+ NTSTATUS ret = get_server_context( handle, server_flags, &server_context, self);
if (!ret) ret = context_from_server( context, &server_context );
return ret;
}
+#ifdef _WIN64
+/* convert CPU-specific flags to generic server flags */
+static inline unsigned int wow64_get_server_context_flags( DWORD flags )
+{
+ unsigned int ret = 0;
+
+ flags &= 0x3f; /* mask CPU id flags */
+ if (flags & WOW64_CONTEXT_CONTROL) ret |= SERVER_CTX_CONTROL;
+ if (flags & WOW64_CONTEXT_INTEGER) ret |= SERVER_CTX_INTEGER;
+ if (flags & WOW64_CONTEXT_SEGMENTS) ret |= SERVER_CTX_SEGMENTS;
+ if (flags & WOW64_CONTEXT_FLOATING_POINT) ret |= SERVER_CTX_FLOATING_POINT;
+ if (flags & WOW64_CONTEXT_DEBUG_REGISTERS) ret |= SERVER_CTX_DEBUG_REGISTERS;
+ if (flags & WOW64_CONTEXT_EXTENDED_REGISTERS) ret |= SERVER_CTX_EXTENDED_REGISTERS;
+ return ret;
+}
+
+static NTSTATUS wow64_context_from_server( WOW64_CONTEXT *to, const context_t *from )
+{
+ if (from->cpu != CPU_x86) return STATUS_INVALID_PARAMETER;
+
+ to->ContextFlags = WOW64_CONTEXT_i386;
+ if (from->flags & SERVER_CTX_CONTROL)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_CONTROL;
+ to->Ebp = from->ctl.i386_regs.ebp;
+ to->Esp = from->ctl.i386_regs.esp;
+ to->Eip = from->ctl.i386_regs.eip;
+ to->SegCs = from->ctl.i386_regs.cs;
+ to->SegSs = from->ctl.i386_regs.ss;
+ to->EFlags = from->ctl.i386_regs.eflags;
+ }
+ if (from->flags & SERVER_CTX_INTEGER)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_INTEGER;
+ to->Eax = from->integer.i386_regs.eax;
+ to->Ebx = from->integer.i386_regs.ebx;
+ to->Ecx = from->integer.i386_regs.ecx;
+ to->Edx = from->integer.i386_regs.edx;
+ to->Esi = from->integer.i386_regs.esi;
+ to->Edi = from->integer.i386_regs.edi;
+ }
+ if (from->flags & SERVER_CTX_SEGMENTS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_SEGMENTS;
+ to->SegDs = from->seg.i386_regs.ds;
+ to->SegEs = from->seg.i386_regs.es;
+ to->SegFs = from->seg.i386_regs.fs;
+ to->SegGs = from->seg.i386_regs.gs;
+ }
+ if (from->flags & SERVER_CTX_FLOATING_POINT)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_FLOATING_POINT;
+ to->FloatSave.ControlWord = from->fp.i386_regs.ctrl;
+ to->FloatSave.StatusWord = from->fp.i386_regs.status;
+ to->FloatSave.TagWord = from->fp.i386_regs.tag;
+ to->FloatSave.ErrorOffset = from->fp.i386_regs.err_off;
+ to->FloatSave.ErrorSelector = from->fp.i386_regs.err_sel;
+ to->FloatSave.DataOffset = from->fp.i386_regs.data_off;
+ to->FloatSave.DataSelector = from->fp.i386_regs.data_sel;
+ to->FloatSave.Cr0NpxState = from->fp.i386_regs.cr0npx;
+ memcpy( to->FloatSave.RegisterArea, from->fp.i386_regs.regs, sizeof(to->FloatSave.RegisterArea) );
+ }
+ if (from->flags & SERVER_CTX_DEBUG_REGISTERS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_DEBUG_REGISTERS;
+ to->Dr0 = from->debug.i386_regs.dr0;
+ to->Dr1 = from->debug.i386_regs.dr1;
+ to->Dr2 = from->debug.i386_regs.dr2;
+ to->Dr3 = from->debug.i386_regs.dr3;
+ to->Dr6 = from->debug.i386_regs.dr6;
+ to->Dr7 = from->debug.i386_regs.dr7;
+ }
+ if (from->flags & SERVER_CTX_EXTENDED_REGISTERS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_EXTENDED_REGISTERS;
+ memcpy( to->ExtendedRegisters, from->ext.i386_regs, sizeof(to->ExtendedRegisters) );
+ }
+ return STATUS_SUCCESS;
+}
+
+
+/******************************************************************************
+ * RtlWow64GetThreadContext (NTDLL.@)
+ */
+NTSTATUS WINAPI RtlWow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context )
+{
+ BOOL self;
+ context_t server_context;
+ unsigned int server_flags = wow64_get_server_context_flags( context->ContextFlags );
+ NTSTATUS ret = get_server_context( handle, server_flags, &server_context, &self );
+ if (!ret) ret = wow64_context_from_server( context, &server_context );
+ return ret;
+}
+#endif
/******************************************************************************
* NtQueryInformationThread (NTDLL.@)
--
2.7.4
June 6, 2018
[PATCH v2 1/5] winnt.h: Add some WOW64 definitions.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
include/winnt.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h
index 54bf11d..c41eff4 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -2112,6 +2112,96 @@ typedef CONTEXT *PCONTEXT;
NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*);
+#define WOW64_CONTEXT_i386 0x00010000
+#define WOW64_CONTEXT_i486 0x00010000
+#define WOW64_CONTEXT_CONTROL (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000001))
+#define WOW64_CONTEXT_INTEGER (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000002))
+#define WOW64_CONTEXT_SEGMENTS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000004))
+#define WOW64_CONTEXT_FLOATING_POINT (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000008))
+#define WOW64_CONTEXT_DEBUG_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000010))
+#define WOW64_CONTEXT_EXTENDED_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000020))
+#define WOW64_CONTEXT_FULL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS)
+#define WOW64_CONTEXT_ALL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | \
+ WOW64_CONTEXT_SEGMENTS | WOW64_CONTEXT_FLOATING_POINT | \
+ WOW64_CONTEXT_DEBUG_REGISTERS | WOW64_CONTEXT_EXTENDED_REGISTERS)
+
+#define WOW64_CONTEXT_XSTATE (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000040))
+
+#define WOW64_CONTEXT_EXCEPTION_ACTIVE 0x08000000
+#define WOW64_CONTEXT_SERVICE_ACTIVE 0x10000000
+#define WOW64_CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define WOW64_CONTEXT_EXCEPTION_REPORTING 0x80000000
+
+#define WOW64_SIZE_OF_80387_REGISTERS 80
+#define WOW64_MAXIMUM_SUPPORTED_EXTENSION 512
+
+typedef struct _WOW64_FLOATING_SAVE_AREA {
+ DWORD ControlWord;
+ DWORD StatusWord;
+ DWORD TagWord;
+ DWORD ErrorOffset;
+ DWORD ErrorSelector;
+ DWORD DataOffset;
+ DWORD DataSelector;
+ BYTE RegisterArea[WOW64_SIZE_OF_80387_REGISTERS];
+ DWORD Cr0NpxState;
+} WOW64_FLOATING_SAVE_AREA, *PWOW64_FLOATING_SAVE_AREA;
+
+#include "pshpack4.h"
+typedef struct _WOW64_CONTEXT {
+ DWORD ContextFlags;
+ DWORD Dr0;
+ DWORD Dr1;
+ DWORD Dr2;
+ DWORD Dr3;
+ DWORD Dr6;
+ DWORD Dr7;
+ WOW64_FLOATING_SAVE_AREA FloatSave;
+ DWORD SegGs;
+ DWORD SegFs;
+ DWORD SegEs;
+ DWORD SegDs;
+ DWORD Edi;
+ DWORD Esi;
+ DWORD Ebx;
+ DWORD Edx;
+ DWORD Ecx;
+ DWORD Eax;
+ DWORD Ebp;
+ DWORD Eip;
+ DWORD SegCs;
+ DWORD EFlags;
+ DWORD Esp;
+ DWORD SegSs;
+ BYTE ExtendedRegisters[WOW64_MAXIMUM_SUPPORTED_EXTENSION];
+} WOW64_CONTEXT, *PWOW64_CONTEXT;
+#include "poppack.h"
+
+typedef struct _WOW64_LDT_ENTRY {
+ WORD LimitLow;
+ WORD BaseLow;
+ union {
+ struct {
+ BYTE BaseMid;
+ BYTE Flags1;
+ BYTE Flags2;
+ BYTE BaseHi;
+ } Bytes;
+ struct {
+ DWORD BaseMid : 8;
+ DWORD Type : 5;
+ DWORD Dpl : 2;
+ DWORD Pres : 1;
+ DWORD LimitHi : 4;
+ DWORD Sys : 1;
+ DWORD Reserved_0 : 1;
+ DWORD Default_Big : 1;
+ DWORD Granularity : 1;
+ DWORD BaseHi : 8;
+ } Bits;
+ } HighWord;
+} WOW64_LDT_ENTRY, *PWOW64_LDT_ENTRY;
+
/*
* Product types
*/
--
2.7.4
June 6, 2018
Re: [PATCH 4/5] d3d9: Get rid of an unnecessary wined3d_device_set_base_vertex_index() call.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 6, 2018
Re: [PATCH 5/5] d3d11/tests: Add test for negative viewport coordinates.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 6, 2018
Re: [PATCH] d3d8/tests: Use the available ARRAY_SIZE() macro
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 6, 2018
Re: [PATCH 2/5] d3d9/tests: Test how state is reset after DrawPrimitive[Indexed]UP().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 6, 2018
Re: [PATCH 3/5] wined3d: Set stream stride and offset even when buffer is NULL.
by Matteo Bruni
2018-06-06 18:35 GMT+02:00 Henri Verbeet <hverbeet(a)gmail.com>:
> On 6 June 2018 at 00:32, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
>> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
>> ---
>> dlls/d3d8/device.c | 8 ++++++++
>> dlls/d3d9/device.c | 8 ++++++++
>> dlls/d3d9/tests/device.c | 2 +-
>> dlls/d3d9/tests/visual.c | 2 +-
>> dlls/wined3d/device.c | 6 ++----
>> 5 files changed, 20 insertions(+), 6 deletions(-)
>>
> This introduces test failures:
>
> ../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
> d3d10core.dll -p d3d10core_test.exe.so device && touch device.ok
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 0.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 0.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 1.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 1.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 2.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 2.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 3.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 3.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 4.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 4.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 5.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 5.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 6.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 6.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 7.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 7.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 8.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 8.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 9.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 9.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 10.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 10.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 11.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 11.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 12.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 12.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 13.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 13.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 14.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 14.
> device.c:5496: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 15.
> device.c:5497: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 15.
>
> ../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
> d3d11.dll -p d3d11_test.exe.so d3d11 && touch d3d11.ok
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 0.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 0.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 1.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 1.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 2.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 2.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 3.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 3.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 4.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 4.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 5.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 5.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 6.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 6.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 7.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 7.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 8.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 8.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 9.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 9.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 10.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 10.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 11.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 11.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 12.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 12.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 13.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 13.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 14.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 14.
> d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 15.
> d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 15.
> d3d11.c:20644: Tests skipped: Raw buffers are not supported.
> d3d11.c:20644: Tests skipped: Raw buffers are not supported.
>
> ../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
> d3dx10_43.dll -p d3dx10_43_test.exe.so d3dx10 && touch d3dx10.ok
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 0.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 0.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 1.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 1.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 2.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 2.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 3.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 3.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 4.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 4.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 5.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 5.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 6.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 6.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 7.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 7.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 8.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 8.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 9.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 9.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 10.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 10.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 11.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 11.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 12.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 12.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 13.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 13.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 14.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 14.
> d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
> 0 in slot 15.
> d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
> 0 in slot 15.
Urgh, not sure how I missed these...
June 6, 2018
Re: [PATCH 3/5] wined3d: Set stream stride and offset even when buffer is NULL.
by Henri Verbeet
On 6 June 2018 at 00:32, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
> ---
> dlls/d3d8/device.c | 8 ++++++++
> dlls/d3d9/device.c | 8 ++++++++
> dlls/d3d9/tests/device.c | 2 +-
> dlls/d3d9/tests/visual.c | 2 +-
> dlls/wined3d/device.c | 6 ++----
> 5 files changed, 20 insertions(+), 6 deletions(-)
>
This introduces test failures:
../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
d3d10core.dll -p d3d10core_test.exe.so device && touch device.ok
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 0.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 0.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 1.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 1.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 2.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 2.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 3.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 3.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 4.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 4.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 5.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 5.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 6.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 6.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 7.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 7.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 8.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 8.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 9.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 9.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 10.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 10.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 11.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 11.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 12.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 12.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 13.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 13.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 14.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 14.
device.c:5496: Test succeeded inside todo block: Got unexpected stride
0 in slot 15.
device.c:5497: Test succeeded inside todo block: Got unexpected offset
0 in slot 15.
../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
d3d11.dll -p d3d11_test.exe.so d3d11 && touch d3d11.ok
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 0.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 0.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 1.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 1.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 2.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 2.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 3.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 3.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 4.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 4.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 5.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 5.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 6.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 6.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 7.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 7.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 8.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 8.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 9.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 9.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 10.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 10.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 11.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 11.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 12.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 12.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 13.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 13.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 14.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 14.
d3d11.c:10652: Test succeeded inside todo block: Got unexpected stride
0 in slot 15.
d3d11.c:10653: Test succeeded inside todo block: Got unexpected offset
0 in slot 15.
d3d11.c:20644: Tests skipped: Raw buffers are not supported.
d3d11.c:20644: Tests skipped: Raw buffers are not supported.
../../../../../src/wine-git/tools/runtest -q -P wine -T ../../.. -M
d3dx10_43.dll -p d3dx10_43_test.exe.so d3dx10 && touch d3dx10.ok
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 0.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 0.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 1.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 1.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 2.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 2.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 3.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 3.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 4.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 4.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 5.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 5.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 6.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 6.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 7.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 7.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 8.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 8.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 9.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 9.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 10.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 10.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 11.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 11.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 12.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 12.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 13.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 13.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 14.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 14.
d3dx10.c:483: Test succeeded inside todo block: Got unexpected stride
0 in slot 15.
d3dx10.c:484: Test succeeded inside todo block: Got unexpected offset
0 in slot 15.
June 6, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Matteo Bruni
2018-06-06 18:30 GMT+02:00 Henri Verbeet <hverbeet(a)gmail.com>:
> On 6 June 2018 at 18:25, Matteo Bruni <matteo.mystral(a)gmail.com> wrote:
>> Hmm, it was intentional but it looks like it doesn't matter in
>> practice. We only execute that if (!needs_legacy_glsl_syntax()), which
>> means GLSL 1.30+ and thus OpenGL 3.0+. That requires that
>> GL_MAX_DRAW_BUFFERS is >= 8. OpenGL ES apparently only mandates 4 draw
>> buffers so things would be a bit more murky there, except that there
>> is no glBindFragDataLocation() in ES at all (you're supposed to use
>> layout qualifiers in the fragment shader instead - I guess I'll have
>> to rework it again to handle that).
>>
>> Anyway, I can switch to gl_info->limits.buffers, it shouldn't hurt and
>> I have to resend it anyway...
>>
> I don't think it (currently) happens in practice, but
> gl_info->limits.buffers can potentially be larger than
> MAX_RENDER_TARGET_VIEWS.
Yeah, it's currently clamped to MAX_RENDER_TARGET_VIEWS.
I can also leave this as-is :)
June 6, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Henri Verbeet
On 6 June 2018 at 18:25, Matteo Bruni <matteo.mystral(a)gmail.com> wrote:
> Hmm, it was intentional but it looks like it doesn't matter in
> practice. We only execute that if (!needs_legacy_glsl_syntax()), which
> means GLSL 1.30+ and thus OpenGL 3.0+. That requires that
> GL_MAX_DRAW_BUFFERS is >= 8. OpenGL ES apparently only mandates 4 draw
> buffers so things would be a bit more murky there, except that there
> is no glBindFragDataLocation() in ES at all (you're supposed to use
> layout qualifiers in the fragment shader instead - I guess I'll have
> to rework it again to handle that).
>
> Anyway, I can switch to gl_info->limits.buffers, it shouldn't hurt and
> I have to resend it anyway...
>
I don't think it (currently) happens in practice, but
gl_info->limits.buffers can potentially be larger than
MAX_RENDER_TARGET_VIEWS.
June 6, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Matteo Bruni
2018-06-06 3:32 GMT+02:00 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>:
> Hi Matteo,
>
>
> On 06/06/18 08:32, Matteo Bruni wrote:
>> {
>> - GL_EXTCALL(glBindFragDataLocation(program_id, 0, "ps_out"));
>> - checkGLcall("glBindFragDataLocation");
>> + for (i = 0; i < MAX_RENDER_TARGET_VIEWS; ++i)
> Is there a reason why MAX_RENDER_TARGET_VIEWS is used instead of
> "gl_info->limits.buffers"?
Hmm, it was intentional but it looks like it doesn't matter in
practice. We only execute that if (!needs_legacy_glsl_syntax()), which
means GLSL 1.30+ and thus OpenGL 3.0+. That requires that
GL_MAX_DRAW_BUFFERS is >= 8. OpenGL ES apparently only mandates 4 draw
buffers so things would be a bit more murky there, except that there
is no glBindFragDataLocation() in ES at all (you're supposed to use
layout qualifiers in the fragment shader instead - I guess I'll have
to rework it again to handle that).
Anyway, I can switch to gl_info->limits.buffers, it shouldn't hurt and
I have to resend it anyway...
June 6, 2018
Re: [PATCH 4/4] winevulkan: Update Vulkan support to 1.0.76.
by Roderick Colenbrander
On Wed, Jun 6, 2018 at 2:20 AM, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
> On Tue, Jun 5, 2018 at 3:19 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
>> Roderick Colenbrander <thunderbird2k(a)gmail.com> writes:
>>
>>> Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com>
>>> ---
>>> dlls/vulkan-1/vulkan-1.spec | 28 +
>>> dlls/winevulkan/make_vulkan | 206 +-
>>> dlls/winevulkan/vk.xml | 6448 ++++++++++++++++++++++++++-------------
>>
>> I'd suggest downloading vk.xml like we do for the OpenGL spec
>> files. It's not clear that the license exception also applies to the
>> source file, so I think it would be better if we didn't distribute it.
>
> Thanks. I've submitted a patch to remove vk.xml from the repository.
> The patch is probably stuck in the moderation queue.
Thanks, I didn't have time for it yet (busy week).
June 6, 2018
Re: [PATCH 4/4] msi: Implement deferral for standard and custom actions.
by Zebediah Figura
On 06/06/18 04:05, Hans Leidekker wrote:
> On Wed, 2018-06-06 at 00:59 -0500, Zebediah Figura wrote:
>> Fixes https://bugs.winehq.org/show_bug.cgi?id=34989.
>>
>> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
>> ---
>> Tested for regressions against winetricks-test and Microsoft Office 2010.
>
> The patch looks good but it introduces an error in the wine-mono installer:
>
> 0017:trace:msi:HANDLE_CustomType34 cmd L"rundll32 setupapi.dll,InstallHinfSection DefaultInstall 128 C:\\windows\\mono\\mono-2.0\\support\\dotnetfakedlls.inf" dir L"C:\\windows\\mono\\mono-2.0\\support\\"
> 0017:err:msi:execute_command unable to execute command 267
>
> Looks like custom action INSTALLFAKEDLLS depended on the wrong order. Marking
> it as a deferred custom action should fix that.
>
>
>
Thanks; I've sent a pull request to wine-mono.
June 6, 2018
Re: [PATCH] imm32/tests: Use the available ARRAY_SIZE() macro
by Aric Stewart
Signed-off-by: Aric Stewart <aric(a)codeweavers.com>
On 6/5/18 1:09 PM, Michael Stefaniuc wrote:
> Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
> ---
> dlls/imm32/tests/imm32.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
> index be3ddfce03..ee1aeb3965 100644
> --- a/dlls/imm32/tests/imm32.c
> +++ b/dlls/imm32/tests/imm32.c
> @@ -26,8 +26,6 @@
> #include "imm.h"
> #include "ddk/imm.h"
>
> -#define NUMELEMS(array) (sizeof((array))/sizeof((array)[0]))
> -
> static BOOL (WINAPI *pImmAssociateContextEx)(HWND,HIMC,DWORD);
> static BOOL (WINAPI *pImmIsUIMessageA)(HWND,UINT,WPARAM,LPARAM);
> static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
> @@ -73,7 +71,7 @@ static LRESULT CALLBACK get_msg_filter(int nCode, WPARAM wParam, LPARAM lParam)
> MSG *msg = (MSG*)lParam;
>
> if ((msg->hwnd == msg_spy.hwnd || msg_spy.hwnd == NULL) &&
> - (msg_spy.i_msg < NUMELEMS(msg_spy.msgs)))
> + (msg_spy.i_msg < ARRAY_SIZE(msg_spy.msgs)))
> {
> msg_spy.msgs[msg_spy.i_msg].msg.hwnd = msg->hwnd;
> msg_spy.msgs[msg_spy.i_msg].msg.message = msg->message;
> @@ -94,7 +92,7 @@ static LRESULT CALLBACK call_wnd_proc_filter(int nCode, WPARAM wParam,
> CWPSTRUCT *cwp = (CWPSTRUCT*)lParam;
>
> if (((cwp->hwnd == msg_spy.hwnd || msg_spy.hwnd == NULL)) &&
> - (msg_spy.i_msg < NUMELEMS(msg_spy.msgs)))
> + (msg_spy.i_msg < ARRAY_SIZE(msg_spy.msgs)))
> {
> memcpy(&msg_spy.msgs[msg_spy.i_msg].msg, cwp, sizeof(msg_spy.msgs[0].msg));
> msg_spy.msgs[msg_spy.i_msg].post = FALSE;
> @@ -126,7 +124,7 @@ static imm_msgs* msg_spy_find_next_msg(UINT message, UINT *start) {
>
> msg_spy_pump_msg_queue();
>
> - if (msg_spy.i_msg >= NUMELEMS(msg_spy.msgs))
> + if (msg_spy.i_msg >= ARRAY_SIZE(msg_spy.msgs))
> fprintf(stdout, "%s:%d: msg_spy: message buffer overflow!\n",
> __FILE__, __LINE__);
>
> @@ -1067,8 +1065,8 @@ static BOOL CALLBACK is_ime_window_proc(HWND hWnd, LPARAM param)
> static const WCHAR imeW[] = {'I','M','E',0};
> WCHAR class_nameW[16];
> HWND *ime_window = (HWND *)param;
> - if (GetClassNameW(hWnd, class_nameW, sizeof(class_nameW)/sizeof(class_nameW[0])) &&
> - !lstrcmpW(class_nameW, imeW)) {
> + if (GetClassNameW(hWnd, class_nameW, ARRAY_SIZE(class_nameW)) && !lstrcmpW(class_nameW, imeW))
> + {
> *ime_window = hWnd;
> return FALSE;
> }
> @@ -1229,7 +1227,7 @@ static void test_default_ime_window_creation(void)
> { FALSE, FALSE }
> };
>
> - for (i = 0; i < sizeof(testcases)/sizeof(testcases[0]); i++)
> + for (i = 0; i < ARRAY_SIZE(testcases); i++)
> {
> thread = CreateThread(NULL, 0, test_default_ime_window_cb, &testcases[i], 0, NULL);
> ok(thread != NULL, "CreateThread failed with error %u\n", GetLastError());
>
June 6, 2018
Re: [PATCH] ntoskrnl: Have MmIsAddressValid use IsBadReadPtr.
by Derek Lesho
Hi Thomas, in your example, does &Base refer to the base of
ntoskrnl.exe? If so, why are you allocating a buffer there, wouldn't
that corrupt the memory of ntoskrnl, or am I misunderstanding what
your code is doing. On windows, do drivers have access to change the
memory of ntoskrnl?
Atleast in EAC, they find the address of a function inside of the
ntoskrnl address space, and continuously decrement the address until
MMisAddressValid returns FALSE. Without my patch, wine always returns
FALSE to EAC, even on the first address check.
On Wed, Jun 6, 2018 at 3:51 AM, Thomas Faber <thomas.faber(a)reactos.org> wrote:
>
> On 2018-06-06 04:36, Zhiyi Zhang wrote:
> > The function is meant to be used in nt kernel space, however wineserver is
> > in user space as far as I know. So we would need different implementation.
> >
> > May be we could do something like return !IsBadWritePtr(VirtualAddress, 1) || !IsBadReadPtr(VirtualAddress, 1).
> > And write a test to verify such behavior.
>
> IsBadReadPtr(x) implies IsBadWritePtr(x), since Windows does not have a
> concept of "write-only" access to pages. So checking both seems
> unnecessary.
> The real difference between IsBadReadPtr and MmIsAddressValid is that
> the former can actually _make_ the address valid by causing a page
> fault (and paging in or zeroing the page). MmIsAddressValid on the
> other hand would simply look at the current state of the page table
> entry without side effects.
>
> This stuff isn't hard to test per se, but a full test that's correct for
> Windows kernel land will not currently work in Wine due to unimplemented
> Mm stuff, e.g.
>
> for (protection in [PAGE_NOACCESS, PAGE_READONLY, PAGE_READWRITE])
> {
> ZwAllocateVirtualMemory(..., &Base, ..., MEM_COMMIT, protection);
> // physical page is not assigned until first access
> todo_wine ok(!MmIsAddressValid(Base, 1), ...);
> // force a physical page to appear and prevent it from getting paged out
> mdl = IoAllocateMdl(Base, 1, FALSE, FALSE, NULL);
> __TRY { MmProbeAndLockPages(mdl, UserMode, IoModifyAccess); todo_wine ok(protection != PAGE_NOACCESS, ...); }
> __EXCEPT_PAGE_FAULT { ok(protection == PAGE_NOACCESS, ...); goto Next; }
> // the system address is now guaranteed to be valid
> todo_wine ok(MmIsAddressValid(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority), 1), ...);
> MmUnlockPages...
> Next:
> IoFreeMdl...
> ZwFreeVirtualMemory...
> }
>
> ... has a todo with pretty much every ok(), with or without the patch :\
>
>
> With some luck, the simpler
> void test_function()
> {
> ok(MmIsAddressValid((void*)test_function, ...); // fails in master, succeeds with patch?
> ptr = ExAllocatePoolWithTag(NonPagedPool, ...)
> ok(MmIsAddressValid(ptr, ...);
> ExFreePoolWithTag...
> ok(!MmIsAddressValid(NULL), ...);
> }
>
> might be enough to show that the patch is correct though.
June 6, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Henri Verbeet
On 6 June 2018 at 00:32, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
> +static void shader_glsl_generate_color_output(struct wined3d_string_buffer *buffer,
> + const struct wined3d_gl_info *gl_info, const struct wined3d_shader *shader)
> +{
> + const struct wined3d_shader_signature *output_signature = &shader->output_signature;
> + unsigned int i;
> +
> + if (output_signature->element_count)
> + {
> + for (i = 0; i < output_signature->element_count; ++i)
> + {
> + const struct wined3d_shader_signature_element *output = &output_signature->elements[i];
> +
> + if (strncasecmp(output->semantic_name, "SV_Target", sizeof("SV_Target")))
> + continue;
Should this really match against the "semantic_name" string, or does
the "sysval_semantic" field also contain that information?
> + switch (output->component_type)
> + {
> + case WINED3D_TYPE_UINT:
> + shader_addline(buffer, "color_out%u = floatBitsToUint(ps_out[%u]);\n",
> + output->semantic_idx, output->semantic_idx);
> + break;
> + case WINED3D_TYPE_INT:
> + shader_addline(buffer, "color_out%u = floatBitsToInt(ps_out[%u]);\n",
> + output->semantic_idx, output->semantic_idx);
> + break;
> +
> + default:
> + FIXME("Unhandled type %#x.\n", output->component_type);
> + /* Fall through. */
> + case WINED3D_TYPE_UNKNOWN:
> + case WINED3D_TYPE_FLOAT:
> + shader_addline(buffer, "color_out%u = ps_out[%u];\n",
> + output->semantic_idx, output->semantic_idx);
> + }
I think shader_glsl_sprintf_cast() with appropriate arguments could
also handle this.
June 6, 2018
Re: [PATCH 2/3] kernel32: Implement Wow64GetThreadContext().
by Alexandre Julliard
Zebediah Figura <zfigura(a)codeweavers.com> writes:
> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
> ---
> With code essentially copied from ntdll. As far as I can tell there is no
> ntdll entry point for this function.
RtlWow64GetThreadContext() is probably what you are looking for. It will
need some test cases obviously.
--
Alexandre Julliard
julliard(a)winehq.org
June 6, 2018
Re: [PATCH] jscript/tests: Use the available ARRAY_SIZE() macro
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
June 6, 2018
Re: [PATCH 0/4] winevulkan: Update to 1.0.76
by Józef Kucia
On Mon, Jun 4, 2018 at 12:52 AM, Roderick Colenbrander
<thunderbird2k(a)gmail.com> wrote:
> Vulkan 1.1 moved a lot of extensions into its Core including interop extensions
> for memory, fences and semaphores. These rely on platform specific functionality
> and would need some more implementation work to support. (It is also the question
> how we would deal with these. Probably needs to be implemented in winex11.drv to
> allow vkd3d to use them).
I think it would be better to simply implement external objects
extensions in winevulkan, at least initially.
June 6, 2018
[PATCH 4/4] webservices: Fix handling of empty text field mappings.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/webservices/reader.c | 355 +++++++++++++++++++---------------------
dlls/webservices/tests/reader.c | 150 +++++++++++++++++
2 files changed, 314 insertions(+), 191 deletions(-)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 6925200a59..087ad0a9cc 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -4442,24 +4442,24 @@ static HRESULT text_to_bool( const WS_XML_TEXT *text, BOOL *val )
static HRESULT read_type_bool( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_BOOL_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
- BOOL found, val = FALSE;
+ BOOL val = FALSE;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_bool( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_bool( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4468,7 +4468,7 @@ static HRESULT read_type_bool( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4476,7 +4476,7 @@ static HRESULT read_type_bool( struct reader *reader, WS_TYPE_MAPPING mapping,
{
BOOL *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -4524,25 +4524,24 @@ static HRESULT text_to_int8( const WS_XML_TEXT *text, INT64 *val )
static HRESULT read_type_int8( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_INT8_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
INT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_int8( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_int8( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4551,7 +4550,7 @@ static HRESULT read_type_int8( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4559,7 +4558,7 @@ static HRESULT read_type_int8( struct reader *reader, WS_TYPE_MAPPING mapping,
{
INT8 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -4607,25 +4606,24 @@ static HRESULT text_to_int16( const WS_XML_TEXT *text, INT64 *val )
static HRESULT read_type_int16( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_INT16_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
INT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_int16( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_int16( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4634,7 +4632,7 @@ static HRESULT read_type_int16( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4642,7 +4640,7 @@ static HRESULT read_type_int16( struct reader *reader, WS_TYPE_MAPPING mapping,
{
INT16 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -4688,25 +4686,24 @@ static HRESULT text_to_int32( const WS_XML_TEXT *text, INT64 *val )
static HRESULT read_type_int32( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_INT32_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
INT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_int32( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_int32( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4715,7 +4712,7 @@ static HRESULT read_type_int32( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4723,7 +4720,7 @@ static HRESULT read_type_int32( struct reader *reader, WS_TYPE_MAPPING mapping,
{
INT32 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -4769,25 +4766,24 @@ static HRESULT text_to_int64( const WS_XML_TEXT *text, INT64 *val )
static HRESULT read_type_int64( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_INT64_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
INT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_int64( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_int64( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4796,7 +4792,7 @@ static HRESULT read_type_int64( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4804,7 +4800,7 @@ static HRESULT read_type_int64( struct reader *reader, WS_TYPE_MAPPING mapping,
{
INT64 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -4851,25 +4847,24 @@ static HRESULT text_to_uint8( const WS_XML_TEXT *text, UINT64 *val )
static HRESULT read_type_uint8( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_UINT8_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
UINT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_uint8( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_uint8( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4878,7 +4873,7 @@ static HRESULT read_type_uint8( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4886,7 +4881,7 @@ static HRESULT read_type_uint8( struct reader *reader, WS_TYPE_MAPPING mapping,
{
UINT8 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -4942,25 +4937,24 @@ static HRESULT text_to_uint16( const WS_XML_TEXT *text, UINT64 *val )
static HRESULT read_type_uint16( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_UINT16_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
UINT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_uint16( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_uint16( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -4969,7 +4963,7 @@ static HRESULT read_type_uint16( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -4977,7 +4971,7 @@ static HRESULT read_type_uint16( struct reader *reader, WS_TYPE_MAPPING mapping,
{
UINT16 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5032,25 +5026,24 @@ static HRESULT text_to_uint32( const WS_XML_TEXT *text, UINT64 *val )
static HRESULT read_type_uint32( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_UINT32_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
UINT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_uint32( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_uint32( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5059,7 +5052,7 @@ static HRESULT read_type_uint32( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5067,7 +5060,7 @@ static HRESULT read_type_uint32( struct reader *reader, WS_TYPE_MAPPING mapping,
{
UINT32 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5120,25 +5113,24 @@ static HRESULT text_to_uint64( const WS_XML_TEXT *text, UINT64 *val )
static HRESULT read_type_uint64( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_UINT64_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
UINT64 val = 0;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_uint64( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_uint64( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5147,7 +5139,7 @@ static HRESULT read_type_uint64( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5155,7 +5147,7 @@ static HRESULT read_type_uint64( struct reader *reader, WS_TYPE_MAPPING mapping,
{
UINT64 *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5201,22 +5193,21 @@ static HRESULT text_to_float( const WS_XML_TEXT *text, float *val )
static HRESULT read_type_float( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_FLOAT_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
float val = 0.0;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_float( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_float( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5225,7 +5216,7 @@ static HRESULT read_type_float( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5233,7 +5224,7 @@ static HRESULT read_type_float( struct reader *reader, WS_TYPE_MAPPING mapping,
{
float *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5279,22 +5270,21 @@ static HRESULT text_to_double( const WS_XML_TEXT *text, double *val )
static HRESULT read_type_double( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_DOUBLE_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
double val = 0.0;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_double( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_double( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5303,7 +5293,7 @@ static HRESULT read_type_double( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5311,7 +5301,7 @@ static HRESULT read_type_double( struct reader *reader, WS_TYPE_MAPPING mapping,
{
double *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5343,20 +5333,19 @@ static HRESULT text_to_wsz( const WS_XML_TEXT *text, WS_HEAP *heap, WCHAR **ret
static HRESULT read_type_wsz( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_WSZ_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, WCHAR **ret, ULONG size )
+ WS_HEAP *heap, WCHAR **ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
WCHAR *str = NULL;
- BOOL found;
if (desc)
{
FIXME( "description not supported\n" );
return E_NOTIMPL;
}
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_wsz( text, heap, &str )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_wsz( text, heap, &str )) != S_OK) return hr;
switch (option)
{
@@ -5398,22 +5387,21 @@ static HRESULT get_enum_value( const WS_XML_TEXT *text, const WS_ENUM_DESCRIPTIO
static HRESULT read_type_enum( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_ENUM_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
int val = 0;
- BOOL found;
if (!desc) return E_INVALIDARG;
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = get_enum_value( text, desc, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = get_enum_value( text, desc, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5422,7 +5410,7 @@ static HRESULT read_type_enum( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5430,7 +5418,7 @@ static HRESULT read_type_enum( struct reader *reader, WS_TYPE_MAPPING mapping,
{
int *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5476,22 +5464,21 @@ static HRESULT text_to_datetime( const WS_XML_TEXT *text, WS_DATETIME *val )
static HRESULT read_type_datetime( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_DATETIME_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
HRESULT hr;
WS_DATETIME val = {0, WS_DATETIME_FORMAT_UTC};
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_datetime( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_datetime( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5500,7 +5487,7 @@ static HRESULT read_type_datetime( struct reader *reader, WS_TYPE_MAPPING mappin
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5508,7 +5495,7 @@ static HRESULT read_type_datetime( struct reader *reader, WS_TYPE_MAPPING mappin
{
WS_DATETIME *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5554,22 +5541,21 @@ static HRESULT text_to_guid( const WS_XML_TEXT *text, GUID *val )
static HRESULT read_type_guid( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_GUID_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
GUID val = {0};
HRESULT hr;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_guid( text, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_guid( text, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5578,7 +5564,7 @@ static HRESULT read_type_guid( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5586,7 +5572,7 @@ static HRESULT read_type_guid( struct reader *reader, WS_TYPE_MAPPING mapping,
{
GUID *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5634,22 +5620,21 @@ static HRESULT text_to_unique_id( const WS_XML_TEXT *text, WS_HEAP *heap, WS_UNI
static HRESULT read_type_unique_id( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_UNIQUE_ID_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
WS_UNIQUE_ID val = {{0}};
HRESULT hr;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_unique_id( text, heap, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_unique_id( text, heap, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5658,7 +5643,7 @@ static HRESULT read_type_unique_id( struct reader *reader, WS_TYPE_MAPPING mappi
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5666,7 +5651,7 @@ static HRESULT read_type_unique_id( struct reader *reader, WS_TYPE_MAPPING mappi
{
WS_UNIQUE_ID *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5714,17 +5699,16 @@ static HRESULT text_to_string( const WS_XML_TEXT *text, WS_HEAP *heap, WS_STRING
static HRESULT read_type_string( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_STRING_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
WS_STRING val = {0};
HRESULT hr;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_string( text, heap, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_string( text, heap, &val )) != S_OK) return hr;
switch (option)
{
@@ -5748,7 +5732,7 @@ static HRESULT read_type_string( struct reader *reader, WS_TYPE_MAPPING mapping,
{
WS_STRING *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5796,17 +5780,16 @@ static HRESULT text_to_bytes( const WS_XML_TEXT *text, WS_HEAP *heap, WS_BYTES *
static HRESULT read_type_bytes( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_BYTES_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
WS_BYTES val = {0};
HRESULT hr;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_bytes( text, heap, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_bytes( text, heap, &val )) != S_OK) return hr;
switch (option)
{
@@ -5830,7 +5813,7 @@ static HRESULT read_type_bytes( struct reader *reader, WS_TYPE_MAPPING mapping,
{
WS_BYTES *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5856,17 +5839,16 @@ static HRESULT text_to_xml_string( const WS_XML_TEXT *text, WS_HEAP *heap, WS_XM
static HRESULT read_type_xml_string( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_XML_STRING_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
WS_XML_STRING val = {0};
HRESULT hr;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_xml_string( text, heap, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_xml_string( text, heap, &val )) != S_OK) return hr;
switch (option)
{
@@ -5890,7 +5872,7 @@ static HRESULT read_type_xml_string( struct reader *reader, WS_TYPE_MAPPING mapp
{
WS_XML_STRING *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -5941,12 +5923,11 @@ static HRESULT text_to_qname( struct reader *reader, const WS_XML_TEXT *text, WS
static HRESULT read_type_qname( struct reader *reader, WS_TYPE_MAPPING mapping,
const WS_XML_STRING *localname, const WS_XML_STRING *ns,
const WS_XML_QNAME_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
const WS_XML_TEXT *text;
WS_XML_QNAME val = {{0}};
HRESULT hr;
- BOOL found;
if (desc) FIXME( "ignoring description\n" );
@@ -5954,13 +5935,13 @@ static HRESULT read_type_qname( struct reader *reader, WS_TYPE_MAPPING mapping,
if ((hr = read_startelement( reader )) != S_OK) return hr;
if (node_type( reader->current ) != WS_XML_NODE_TYPE_TEXT) return WS_E_INVALID_FORMAT;
- if ((hr = get_text( reader, mapping, localname, ns, &text, &found )) != S_OK) return hr;
- if (found && (hr = text_to_qname( reader, text, heap, &val )) != S_OK) return hr;
+ if ((hr = get_text( reader, mapping, localname, ns, &text, found )) != S_OK) return hr;
+ if (*found && (hr = text_to_qname( reader, text, heap, &val )) != S_OK) return hr;
switch (option)
{
case WS_READ_REQUIRED_VALUE:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_NILLABLE_VALUE:
@@ -5969,7 +5950,7 @@ static HRESULT read_type_qname( struct reader *reader, WS_TYPE_MAPPING mapping,
break;
case WS_READ_REQUIRED_POINTER:
- if (!found) return WS_E_INVALID_FORMAT;
+ if (!*found) return WS_E_INVALID_FORMAT;
/* fall through */
case WS_READ_OPTIONAL_POINTER:
@@ -5977,7 +5958,7 @@ static HRESULT read_type_qname( struct reader *reader, WS_TYPE_MAPPING mapping,
{
WS_XML_QNAME *heap_val = NULL;
if (size != sizeof(heap_val)) return E_INVALIDARG;
- if (found)
+ if (*found)
{
if (!(heap_val = ws_alloc( heap, sizeof(*heap_val) ))) return WS_E_QUOTA_EXCEEDED;
*heap_val = val;
@@ -6224,7 +6205,7 @@ static HRESULT read_type_union( struct reader *reader, const WS_UNION_DESCRIPTIO
static HRESULT read_type( struct reader *, WS_TYPE_MAPPING, WS_TYPE, const WS_XML_STRING *,
const WS_XML_STRING *, const void *, WS_READ_OPTION, WS_HEAP *,
- void *, ULONG );
+ void *, ULONG, BOOL * );
static HRESULT read_type_array( struct reader *reader, const WS_FIELD_DESCRIPTION *desc, WS_HEAP *heap,
void **ret, ULONG *count )
@@ -6232,6 +6213,7 @@ static HRESULT read_type_array( struct reader *reader, const WS_FIELD_DESCRIPTIO
HRESULT hr;
ULONG item_size, nb_items = 0, nb_allocated = 1, offset = 0;
WS_READ_OPTION option;
+ BOOL found;
char *buf;
if (!(option = get_field_read_option( desc->type, desc->options ))) return E_INVALIDARG;
@@ -6257,7 +6239,6 @@ static HRESULT read_type_array( struct reader *reader, const WS_FIELD_DESCRIPTIO
if (desc->type == WS_UNION_TYPE)
{
- BOOL found;
hr = read_type_union( reader, desc->typeDescription, heap, buf + offset, item_size, &found );
if (hr != S_OK)
{
@@ -6269,7 +6250,7 @@ static HRESULT read_type_array( struct reader *reader, const WS_FIELD_DESCRIPTIO
else
{
hr = read_type( reader, WS_ELEMENT_TYPE_MAPPING, desc->type, desc->itemLocalName, desc->itemNs,
- desc->typeDescription, option, heap, buf + offset, item_size );
+ desc->typeDescription, option, heap, buf + offset, item_size, &found );
if (hr == WS_E_INVALID_FORMAT) break;
if (hr != S_OK)
{
@@ -6301,18 +6282,22 @@ static HRESULT read_type_array( struct reader *reader, const WS_FIELD_DESCRIPTIO
static HRESULT read_type_text( struct reader *reader, const WS_FIELD_DESCRIPTION *desc,
WS_READ_OPTION option, WS_HEAP *heap, void *ret, ULONG size )
{
+ struct reader_pos pos;
+ BOOL found;
HRESULT hr;
+
if (reader->current == reader->last)
{
- BOOL found;
if ((hr = read_to_startelement( reader, &found )) != S_OK) return hr;
if (!found) return WS_E_INVALID_FORMAT;
}
- if ((hr = read_next_node( reader )) != S_OK) return hr;
- if (node_type( reader->current ) != WS_XML_NODE_TYPE_TEXT) return WS_E_INVALID_FORMAT;
- return read_type( reader, WS_ANY_ELEMENT_TYPE_MAPPING, desc->type, NULL, NULL,
- desc->typeDescription, option, heap, ret, size );
+ save_reader_position( reader, &pos );
+ if ((hr = read_next_node( reader )) != S_OK) return hr;
+ hr = read_type( reader, WS_ANY_ELEMENT_TYPE_MAPPING, desc->type, NULL, NULL,
+ desc->typeDescription, option, heap, ret, size, &found );
+ if (hr == S_OK && !found) restore_reader_position( reader, &pos );
+ return hr;
}
static HRESULT read_type_field( struct reader *reader, const WS_FIELD_DESCRIPTION *desc, WS_HEAP *heap, char *buf,
@@ -6322,6 +6307,7 @@ static HRESULT read_type_field( struct reader *reader, const WS_FIELD_DESCRIPTIO
WS_READ_OPTION option;
ULONG size;
HRESULT hr;
+ BOOL found;
if (!desc) return E_INVALIDARG;
if (desc->options & ~(WS_FIELD_POINTER|WS_FIELD_OPTIONAL|WS_FIELD_NILLABLE|WS_FIELD_NILLABLE_ITEM))
@@ -6345,17 +6331,16 @@ static HRESULT read_type_field( struct reader *reader, const WS_FIELD_DESCRIPTIO
case WS_ATTRIBUTE_FIELD_MAPPING:
hr = read_type( reader, WS_ATTRIBUTE_TYPE_MAPPING, desc->type, desc->localName, desc->ns,
- desc->typeDescription, option, heap, ptr, size );
+ desc->typeDescription, option, heap, ptr, size, &found );
break;
case WS_ELEMENT_FIELD_MAPPING:
hr = read_type( reader, WS_ELEMENT_TYPE_MAPPING, desc->type, desc->localName, desc->ns,
- desc->typeDescription, option, heap, ptr, size );
+ desc->typeDescription, option, heap, ptr, size, &found );
break;
case WS_ELEMENT_CHOICE_FIELD_MAPPING:
{
- BOOL found;
if (desc->type != WS_UNION_TYPE || !desc->typeDescription ||
(desc->options & (WS_FIELD_POINTER|WS_FIELD_NILLABLE))) return E_INVALIDARG;
hr = read_type_union( reader, desc->typeDescription, heap, ptr, size, &found );
@@ -6406,7 +6391,7 @@ static HRESULT read_type_field( struct reader *reader, const WS_FIELD_DESCRIPTIO
static HRESULT read_type_struct( struct reader *reader, WS_TYPE_MAPPING mapping, const WS_XML_STRING *localname,
const WS_XML_STRING *ns, const WS_STRUCT_DESCRIPTION *desc, WS_READ_OPTION option,
- WS_HEAP *heap, void *ret, ULONG size )
+ WS_HEAP *heap, void *ret, ULONG size, BOOL *found )
{
ULONG i, offset;
HRESULT hr;
@@ -6481,6 +6466,8 @@ static HRESULT read_type_struct( struct reader *reader, WS_TYPE_MAPPING mapping,
struct node *parent = find_parent( reader );
parent->flags |= NODE_FLAG_IGNORE_TRAILING_ELEMENT_CONTENT;
}
+
+ *found = TRUE;
return S_OK;
}
@@ -6576,7 +6563,7 @@ static HRESULT is_nil_element( const WS_XML_ELEMENT_NODE *elem )
static HRESULT read_type( struct reader *reader, WS_TYPE_MAPPING mapping, WS_TYPE type,
const WS_XML_STRING *localname, const WS_XML_STRING *ns, const void *desc,
- WS_READ_OPTION option, WS_HEAP *heap, void *value, ULONG size )
+ WS_READ_OPTION option, WS_HEAP *heap, void *value, ULONG size, BOOL *found )
{
HRESULT hr;
@@ -6585,114 +6572,94 @@ static HRESULT read_type( struct reader *reader, WS_TYPE_MAPPING mapping, WS_TYP
if (mapping == WS_ELEMENT_TYPE_MAPPING && is_nil_element( &reader->current->hdr ))
{
if (option != WS_READ_NILLABLE_POINTER && option != WS_READ_NILLABLE_VALUE) return WS_E_INVALID_FORMAT;
+ *found = TRUE;
return end_mapping( reader, mapping );
}
switch (type)
{
case WS_BOOL_TYPE:
- if ((hr = read_type_bool( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_bool( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_INT8_TYPE:
- if ((hr = read_type_int8( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_int8( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_INT16_TYPE:
- if ((hr = read_type_int16( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_int16( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_INT32_TYPE:
- if ((hr = read_type_int32( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_int32( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_INT64_TYPE:
- if ((hr = read_type_int64( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_int64( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_UINT8_TYPE:
- if ((hr = read_type_uint8( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_uint8( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_UINT16_TYPE:
- if ((hr = read_type_uint16( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_uint16( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_UINT32_TYPE:
- if ((hr = read_type_uint32( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_uint32( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_UINT64_TYPE:
- if ((hr = read_type_uint64( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_uint64( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_FLOAT_TYPE:
- if ((hr = read_type_float( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_float( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_DOUBLE_TYPE:
- if ((hr = read_type_double( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_double( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_DATETIME_TYPE:
- if ((hr = read_type_datetime( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_datetime( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_GUID_TYPE:
- if ((hr = read_type_guid( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_guid( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_UNIQUE_ID_TYPE:
- if ((hr = read_type_unique_id( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_unique_id( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_STRING_TYPE:
- if ((hr = read_type_string( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_string( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_WSZ_TYPE:
- if ((hr = read_type_wsz( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_wsz( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_BYTES_TYPE:
- if ((hr = read_type_bytes( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_bytes( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_XML_STRING_TYPE:
- if ((hr = read_type_xml_string( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_xml_string( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_XML_QNAME_TYPE:
- if ((hr = read_type_qname( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_qname( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_STRUCT_TYPE:
- if ((hr = read_type_struct( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_struct( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
case WS_ENUM_TYPE:
- if ((hr = read_type_enum( reader, mapping, localname, ns, desc, option, heap, value, size )) != S_OK)
- return hr;
+ hr = read_type_enum( reader, mapping, localname, ns, desc, option, heap, value, size, found );
break;
default:
@@ -6700,6 +6667,7 @@ static HRESULT read_type( struct reader *reader, WS_TYPE_MAPPING mapping, WS_TYP
return E_NOTIMPL;
}
+ if (hr != S_OK) return hr;
return end_mapping( reader, mapping );
}
@@ -6711,6 +6679,7 @@ HRESULT WINAPI WsReadType( WS_XML_READER *handle, WS_TYPE_MAPPING mapping, WS_TY
ULONG size, WS_ERROR *error )
{
struct reader *reader = (struct reader *)handle;
+ BOOL found;
HRESULT hr;
TRACE( "%p %u %u %p %u %p %p %u %p\n", handle, mapping, type, desc, option, heap, value,
@@ -6727,7 +6696,7 @@ HRESULT WINAPI WsReadType( WS_XML_READER *handle, WS_TYPE_MAPPING mapping, WS_TY
return E_INVALIDARG;
}
- if ((hr = read_type( reader, mapping, type, NULL, NULL, desc, option, heap, value, size )) != S_OK)
+ if ((hr = read_type( reader, mapping, type, NULL, NULL, desc, option, heap, value, size, &found )) != S_OK)
{
LeaveCriticalSection( &reader->cs );
return hr;
@@ -6754,6 +6723,7 @@ HRESULT read_header( WS_XML_READER *handle, const WS_XML_STRING *localname, cons
ULONG size )
{
struct reader *reader = (struct reader *)handle;
+ BOOL found;
HRESULT hr;
EnterCriticalSection( &reader->cs );
@@ -6765,7 +6735,7 @@ HRESULT read_header( WS_XML_READER *handle, const WS_XML_STRING *localname, cons
}
hr = read_type( reader, WS_ELEMENT_CONTENT_TYPE_MAPPING, type, localname, ns, desc, option, heap,
- value, size );
+ value, size, &found );
LeaveCriticalSection( &reader->cs );
return hr;
@@ -6779,6 +6749,7 @@ HRESULT WINAPI WsReadElement( WS_XML_READER *handle, const WS_ELEMENT_DESCRIPTIO
WS_ERROR *error )
{
struct reader *reader = (struct reader *)handle;
+ BOOL found;
HRESULT hr;
TRACE( "%p %p %u %p %p %u %p\n", handle, desc, option, heap, value, size, error );
@@ -6795,7 +6766,7 @@ HRESULT WINAPI WsReadElement( WS_XML_READER *handle, const WS_ELEMENT_DESCRIPTIO
}
hr = read_type( reader, WS_ELEMENT_TYPE_MAPPING, desc->type, desc->elementLocalName,
- desc->elementNs, desc->typeDescription, option, heap, value, size );
+ desc->elementNs, desc->typeDescription, option, heap, value, size, &found );
LeaveCriticalSection( &reader->cs );
return hr;
@@ -6809,6 +6780,7 @@ HRESULT WINAPI WsReadValue( WS_XML_READER *handle, WS_VALUE_TYPE value_type, voi
{
struct reader *reader = (struct reader *)handle;
WS_TYPE type = map_value_type( value_type );
+ BOOL found;
HRESULT hr;
TRACE( "%p %u %p %u %p\n", handle, type, value, size, error );
@@ -6825,7 +6797,7 @@ HRESULT WINAPI WsReadValue( WS_XML_READER *handle, WS_VALUE_TYPE value_type, voi
}
hr = read_type( reader, WS_ELEMENT_TYPE_MAPPING, type, NULL, NULL, NULL, WS_READ_REQUIRED_VALUE,
- NULL, value, size );
+ NULL, value, size, &found );
LeaveCriticalSection( &reader->cs );
return hr;
@@ -6839,6 +6811,7 @@ HRESULT WINAPI WsReadAttribute( WS_XML_READER *handle, const WS_ATTRIBUTE_DESCRI
WS_ERROR *error )
{
struct reader *reader = (struct reader *)handle;
+ BOOL found;
HRESULT hr;
TRACE( "%p %p %u %p %p %u %p\n", handle, desc, option, heap, value, size, error );
@@ -6861,7 +6834,7 @@ HRESULT WINAPI WsReadAttribute( WS_XML_READER *handle, const WS_ATTRIBUTE_DESCRI
}
hr = read_type( reader, WS_ATTRIBUTE_TYPE_MAPPING, desc->type, desc->attributeLocalName,
- desc->attributeNs, desc->typeDescription, option, heap, value, size );
+ desc->attributeNs, desc->typeDescription, option, heap, value, size, &found );
LeaveCriticalSection( &reader->cs );
return hr;
diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c
index 7dd7979522..bd8a37cc52 100644
--- a/dlls/webservices/tests/reader.c
+++ b/dlls/webservices/tests/reader.c
@@ -6539,6 +6539,155 @@ static void test_repeating_element_choice(void)
WsFreeHeap( heap );
}
+static void test_empty_text_field(void)
+{
+ static WS_XML_STRING str_ns = {0, NULL}, str_t = {1, (BYTE *)"t"};
+ HRESULT hr;
+ WS_XML_READER *reader;
+ WS_HEAP *heap;
+ WS_FIELD_DESCRIPTION f, *fields[1];
+ WS_STRUCT_DESCRIPTION s;
+ struct test
+ {
+ WS_STRING str;
+ } *test;
+ struct test2
+ {
+ WCHAR *str;
+ } *test2;
+ struct test3
+ {
+ BOOL bool;
+ } *test3;
+ struct test4
+ {
+ WS_XML_STRING str;
+ } *test4;
+ struct test5
+ {
+ WS_BYTES bytes;
+ } *test5;
+
+ hr = WsCreateHeap( 1 << 16, 0, NULL, 0, &heap, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = WsCreateReader( NULL, 0, &reader, NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ memset( &f, 0, sizeof(f) );
+ f.mapping = WS_TEXT_FIELD_MAPPING;
+ f.type = WS_STRING_TYPE;
+ f.offset = FIELD_OFFSET(struct test, str);
+ fields[0] = &f;
+
+ memset( &s, 0, sizeof(s) );
+ s.size = sizeof(struct test);
+ s.alignment = TYPE_ALIGNMENT(struct test);
+ s.fields = fields;
+ s.fieldCount = 1;
+ s.typeLocalName = &str_t;
+ s.typeNs = &str_ns;
+
+ test = NULL;
+ prepare_struct_type_test( reader, "<t></t>" );
+ hr = WsReadType( reader, WS_ELEMENT_TYPE_MAPPING, WS_STRUCT_TYPE, &s,
+ WS_READ_REQUIRED_POINTER, heap, &test, sizeof(test), NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( test != NULL, "test not set\n" );
+ ok( !test->str.length, "got %u\n", test->str.length );
+ todo_wine ok( test->str.chars != NULL, "chars not set\n" );
+
+ memset( &f, 0, sizeof(f) );
+ f.mapping = WS_TEXT_FIELD_MAPPING;
+ f.type = WS_WSZ_TYPE;
+ f.offset = FIELD_OFFSET(struct test2, str);
+ fields[0] = &f;
+
+ memset( &s, 0, sizeof(s) );
+ s.size = sizeof(struct test2);
+ s.alignment = TYPE_ALIGNMENT(struct test2);
+ s.fields = fields;
+ s.fieldCount = 1;
+ s.typeLocalName = &str_t;
+ s.typeNs = &str_ns;
+
+ test2 = NULL;
+ prepare_struct_type_test( reader, "<t></t>" );
+ hr = WsReadType( reader, WS_ELEMENT_TYPE_MAPPING, WS_STRUCT_TYPE, &s,
+ WS_READ_REQUIRED_POINTER, heap, &test2, sizeof(test2), NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( test2 != NULL, "test2 not set\n" );
+ ok( test2->str != NULL, "str not set\n" );
+ ok( !test2->str[0], "not empty\n" );
+
+ memset( &f, 0, sizeof(f) );
+ f.mapping = WS_TEXT_FIELD_MAPPING;
+ f.type = WS_BOOL_TYPE;
+ f.offset = FIELD_OFFSET(struct test3, bool);
+ fields[0] = &f;
+
+ memset( &s, 0, sizeof(s) );
+ s.size = sizeof(struct test3);
+ s.alignment = TYPE_ALIGNMENT(struct test3);
+ s.fields = fields;
+ s.fieldCount = 1;
+ s.typeLocalName = &str_t;
+ s.typeNs = &str_ns;
+
+ prepare_struct_type_test( reader, "<t></t>" );
+ hr = WsReadType( reader, WS_ELEMENT_TYPE_MAPPING, WS_STRUCT_TYPE, &s,
+ WS_READ_REQUIRED_POINTER, heap, &test3, sizeof(test3), NULL );
+ ok( hr == WS_E_INVALID_FORMAT, "got %08x\n", hr );
+
+ memset( &f, 0, sizeof(f) );
+ f.mapping = WS_TEXT_FIELD_MAPPING;
+ f.type = WS_XML_STRING_TYPE;
+ f.offset = FIELD_OFFSET(struct test4, str);
+ fields[0] = &f;
+
+ memset( &s, 0, sizeof(s) );
+ s.size = sizeof(struct test4);
+ s.alignment = TYPE_ALIGNMENT(struct test4);
+ s.fields = fields;
+ s.fieldCount = 1;
+ s.typeLocalName = &str_t;
+ s.typeNs = &str_ns;
+
+ test4 = NULL;
+ prepare_struct_type_test( reader, "<t></t>" );
+ hr = WsReadType( reader, WS_ELEMENT_TYPE_MAPPING, WS_STRUCT_TYPE, &s,
+ WS_READ_REQUIRED_POINTER, heap, &test4, sizeof(test4), NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( test4 != NULL, "test4 not set\n" );
+ ok( !test4->str.length, "got %u\n", test4->str.length );
+ todo_wine ok( test4->str.bytes != NULL, "bytes not set\n" );
+
+ memset( &f, 0, sizeof(f) );
+ f.mapping = WS_TEXT_FIELD_MAPPING;
+ f.type = WS_BYTES_TYPE;
+ f.offset = FIELD_OFFSET(struct test5, bytes);
+ fields[0] = &f;
+
+ memset( &s, 0, sizeof(s) );
+ s.size = sizeof(struct test5);
+ s.alignment = TYPE_ALIGNMENT(struct test5);
+ s.fields = fields;
+ s.fieldCount = 1;
+ s.typeLocalName = &str_t;
+ s.typeNs = &str_ns;
+
+ test5 = NULL;
+ prepare_struct_type_test( reader, "<t></t>" );
+ hr = WsReadType( reader, WS_ELEMENT_TYPE_MAPPING, WS_STRUCT_TYPE, &s,
+ WS_READ_REQUIRED_POINTER, heap, &test5, sizeof(test5), NULL );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( test5 != NULL, "test5 not set\n" );
+ ok( !test5->bytes.length, "got %u\n", test5->bytes.length );
+ todo_wine ok( test5->bytes.bytes != NULL, "bytes not set\n" );
+
+ WsFreeReader( reader );
+ WsFreeHeap( heap );
+}
START_TEST(reader)
{
@@ -6588,4 +6737,5 @@ START_TEST(reader)
test_union_type();
test_float();
test_repeating_element_choice();
+ test_empty_text_field();
}
--
2.11.0
June 6, 2018
[PATCH 3/4] webservices: Handle WS_XML_TEXT_TYPE_INT64 in text_to_uint64.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/webservices/reader.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 79a1af63bf..6925200a59 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -5095,6 +5095,13 @@ static HRESULT text_to_uint64( const WS_XML_TEXT *text, UINT64 *val )
hr = str_to_uint64( text_utf8->value.bytes, text_utf8->value.length, MAX_UINT64, val );
break;
}
+ case WS_XML_TEXT_TYPE_INT64:
+ {
+ const WS_XML_INT64_TEXT *text_int64 = (const WS_XML_INT64_TEXT *)text;
+ *val = text_int64->value;
+ hr = S_OK;
+ break;
+ }
case WS_XML_TEXT_TYPE_UINT64:
{
const WS_XML_UINT64_TEXT *text_uint64 = (const WS_XML_UINT64_TEXT *)text;
--
2.11.0
June 6, 2018
[PATCH 2/4] webservices/tests: Make test data local if it's only used in one place.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/webservices/tests/reader.c | 116 +++++++++++++++++++---------------------
1 file changed, 54 insertions(+), 62 deletions(-)
diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c
index 7064cf0f82..7dd7979522 100644
--- a/dlls/webservices/tests/reader.c
+++ b/dlls/webservices/tests/reader.c
@@ -67,57 +67,6 @@ static const char data9[] =
static const char data10[] =
"<a></b>";
-static const char data11[] =
- "<o:OfficeConfig xmlns:o=\"urn:schemas-microsoft-com:office:office\">"
- "<o:services o:GenerationTime=\"2015-09-03T18:47:54\">"
- "<!--Build: 16.0.6202.6852-->"
- "</o:services>"
- "</o:OfficeConfig>";
-
-static const char data11b[] =
- "<o:OfficeConfig xmlns:o=\"urn:schemas-microsoft-com:office:office\">"
- "<o:services o:GenerationTime=\"2015-09-03T18:47:54\"></o:services>"
- "<trailing>content</trailing>"
- "</o:OfficeConfig>";
-
-static const char data12[] =
- "<services>"
- "<service><id>1</id></service>"
- "<service><id>2</id></service>"
- "</services>";
-
-static const char data13[] =
- "<services></services>";
-
-static const char data14[] =
- "<services>"
- "<wrapper>"
- "<service><id>1</id></service>"
- "<service><id>2</id></service>"
- "</wrapper>"
- "</services>";
-
-static const char data15[] =
- "<services>"
- "<wrapper>"
- "<service>1</service>"
- "<service>2</service>"
- "</wrapper>"
- "</services>";
-
-static const char data16[] =
- "<services>"
- "<wrapper>"
- "<service name='1'>1</service>"
- "<service name='2'>2</service>"
- "</wrapper>"
- "</services>";
-
-static const char data17[] =
- "<services>"
- "<service><name></name></service>"
- "</services>";
-
static void test_WsCreateError(void)
{
HRESULT hr;
@@ -2997,6 +2946,17 @@ static void test_text_field_mapping(void)
static void test_complex_struct_type(void)
{
+ static const char data[] =
+ "<o:OfficeConfig xmlns:o=\"urn:schemas-microsoft-com:office:office\">"
+ "<o:services o:GenerationTime=\"2015-09-03T18:47:54\">"
+ "<!--Build: 16.0.6202.6852-->"
+ "</o:services>"
+ "</o:OfficeConfig>";
+ static const char data2[] =
+ "<o:OfficeConfig xmlns:o=\"urn:schemas-microsoft-com:office:office\">"
+ "<o:services o:GenerationTime=\"2015-09-03T18:47:54\"></o:services>"
+ "<trailing>content</trailing>"
+ "</o:OfficeConfig>";
static const WCHAR timestampW[] =
{'2','0','1','5','-','0','9','-','0','3','T','1','8',':','4','7',':','5','4',0};
HRESULT hr;
@@ -3035,7 +2995,7 @@ static void test_complex_struct_type(void)
ok( hr == S_OK, "got %08x\n", hr );
/* element content type mapping */
- prepare_struct_type_test( reader, data11 );
+ prepare_struct_type_test( reader, data );
hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -3112,7 +3072,7 @@ static void test_complex_struct_type(void)
ok( hr == WS_E_INVALID_FORMAT, "got %08x\n", hr );
/* element type mapping */
- prepare_struct_type_test( reader, data11 );
+ prepare_struct_type_test( reader, data );
hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -3136,7 +3096,7 @@ static void test_complex_struct_type(void)
ok( node->nodeType == WS_XML_NODE_TYPE_EOF, "got %u\n", node->nodeType );
/* trailing content */
- prepare_struct_type_test( reader, data11b );
+ prepare_struct_type_test( reader, data2 );
hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -3149,7 +3109,7 @@ static void test_complex_struct_type(void)
ok( hr == S_OK, "got %08x\n", hr );
ok( node->nodeType == WS_XML_NODE_TYPE_EOF, "got %u\n", node->nodeType );
- prepare_struct_type_test( reader, data11b );
+ prepare_struct_type_test( reader, data2 );
hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL );
ok( hr == S_OK, "got %08x\n", hr );
@@ -3165,6 +3125,38 @@ static void test_complex_struct_type(void)
static void test_repeating_element(void)
{
+ static const char data[] =
+ "<services>"
+ "<service><id>1</id></service>"
+ "<service><id>2</id></service>"
+ "</services>";
+ static const char data2[] =
+ "<services></services>";
+ static const char data3[] =
+ "<services>"
+ "<wrapper>"
+ "<service><id>1</id></service>"
+ "<service><id>2</id></service>"
+ "</wrapper>"
+ "</services>";
+ static const char data4[] =
+ "<services>"
+ "<wrapper>"
+ "<service>1</service>"
+ "<service>2</service>"
+ "</wrapper>"
+ "</services>";
+ static const char data5[] =
+ "<services>"
+ "<wrapper>"
+ "<service name='1'>1</service>"
+ "<service name='2'>2</service>"
+ "</wrapper>"
+ "</services>";
+ static const char data6[] =
+ "<services>"
+ "<service><name></name></service>"
+ "</services>";
static const WCHAR oneW[] = {'1',0}, twoW[] = {'2',0};
WS_XML_STRING str_name = {4, (BYTE *)"name"};
WS_XML_STRING str_services = {8, (BYTE *)"services"};
@@ -3214,7 +3206,7 @@ static void test_repeating_element(void)
hr = WsCreateReader( NULL, 0, &reader, NULL );
ok( hr == S_OK, "got %08x\n", hr );
- prepare_struct_type_test( reader, data12 );
+ prepare_struct_type_test( reader, data );
memset( &f2, 0, sizeof(f2) );
f2.mapping = WS_ELEMENT_FIELD_MAPPING;
@@ -3257,7 +3249,7 @@ static void test_repeating_element(void)
ok( test->service[1].id == 2, "got %u\n", test->service[1].id );
/* array of pointers */
- prepare_struct_type_test( reader, data12 );
+ prepare_struct_type_test( reader, data );
f.options = WS_FIELD_POINTER;
test4 = NULL;
hr = WsReadType( reader, WS_ELEMENT_TYPE_MAPPING, WS_STRUCT_TYPE, &s,
@@ -3272,7 +3264,7 @@ static void test_repeating_element(void)
}
/* item range */
- prepare_struct_type_test( reader, data13 );
+ prepare_struct_type_test( reader, data2 );
f.options = 0;
range.minItemCount = 0;
range.maxItemCount = 1;
@@ -3286,7 +3278,7 @@ static void test_repeating_element(void)
ok( !test->service_count, "got %u\n", test->service_count );
/* wrapper element */
- prepare_struct_type_test( reader, data14 );
+ prepare_struct_type_test( reader, data3 );
f.itemRange = NULL;
f.localName = &str_wrapper;
f.ns = &str_ns;
@@ -3301,7 +3293,7 @@ static void test_repeating_element(void)
ok( test->service[1].id == 2, "got %u\n", test->service[1].id );
/* repeating text field mapping */
- prepare_struct_type_test( reader, data15 );
+ prepare_struct_type_test( reader, data4 );
f2.mapping = WS_TEXT_FIELD_MAPPING;
f2.localName = NULL;
f2.ns = NULL;
@@ -3319,7 +3311,7 @@ static void test_repeating_element(void)
ok( !lstrcmpW( test2->service[1].id, twoW ), "wrong data\n" );
/* repeating attribute field + text field mapping */
- prepare_struct_type_test( reader, data16 );
+ prepare_struct_type_test( reader, data5 );
f2.offset = FIELD_OFFSET(struct service3, id);
memset( &f3, 0, sizeof(f3) );
f3.mapping = WS_ATTRIBUTE_FIELD_MAPPING;
@@ -3344,7 +3336,7 @@ static void test_repeating_element(void)
ok( !lstrcmpW( test3->service[1].id, twoW ), "wrong data\n" );
/* empty text, item range */
- prepare_struct_type_test( reader, data17 );
+ prepare_struct_type_test( reader, data6 );
memset( &f2, 0, sizeof(f2) );
f2.mapping = WS_ELEMENT_FIELD_MAPPING;
--
2.11.0
June 6, 2018
[PATCH 1/4] webservices: Call WSACleanup when the dll is unloaded.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/webservices/listener.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/dlls/webservices/listener.c b/dlls/webservices/listener.c
index a178e276e4..357a1c6a53 100644
--- a/dlls/webservices/listener.c
+++ b/dlls/webservices/listener.c
@@ -31,6 +31,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(webservices);
+HINSTANCE webservices_instance;
+
static BOOL winsock_loaded;
static BOOL WINAPI winsock_startup( INIT_ONCE *once, void *param, void **ctx )
@@ -48,6 +50,26 @@ void winsock_init(void)
InitOnceExecuteOnce( &once, winsock_startup, NULL, NULL );
}
+/******************************************************************
+ * DllMain (webservices.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved )
+{
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ webservices_instance = hinst;
+ DisableThreadLibraryCalls( hinst );
+ break;
+
+ case DLL_PROCESS_DETACH:
+ if (reserved) break;
+ if (winsock_loaded) WSACleanup();
+ break;
+ }
+ return TRUE;
+}
+
static const struct prop_desc listener_props[] =
{
{ sizeof(ULONG), FALSE }, /* WS_LISTENER_PROPERTY_LISTEN_BACKLOG */
--
2.11.0
June 6, 2018
Re: [PATCH v2] comctl32/edit/tests: Add interactive test showing a rendering glitch
by Nikolay Sivov
Do you know what's going on there? Is this about Edit painting logic, or
about Edit being used in a dialog?
June 6, 2018
[PATCH] winevulkan: Add copyright headers to files generated from vk.xml.
by Józef Kucia
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
This patch could be applied after 147041.
---
dlls/vulkan-1/vulkan-1.spec | 34 ++++++++++++++++++++++++++++++++++
dlls/winevulkan/make_vulkan | 26 +++++++++++++++++++-------
dlls/winevulkan/vulkan_thunks.c | 37 ++++++++++++++++++++++++++++++++++++-
dlls/winevulkan/vulkan_thunks.h | 37 ++++++++++++++++++++++++++++++++++++-
dlls/winevulkan/winevulkan.spec | 34 ++++++++++++++++++++++++++++++++++
include/wine/vulkan.h | 37 ++++++++++++++++++++++++++++++++++++-
include/wine/vulkan_driver.h | 37 ++++++++++++++++++++++++++++++++++++-
7 files changed, 231 insertions(+), 11 deletions(-)
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 3d457749b46a..0a4e85e96859 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -1,4 +1,38 @@
# Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+#
+# This file is generated from Vulkan vk.xml file covered
+# by the following copyright and permission notice:
+#
+# Copyright (c) 2015-2018 The Khronos Group Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ---- Exceptions to the Apache 2.0 License: ----
+#
+# As an exception, if you use this Software to generate code and portions of
+# this Software are embedded into the generated code as a result, you may
+# redistribute such product without providing attribution as would otherwise
+# be required by Sections 4(a), 4(b) and 4(d) of the License.
+#
+# In addition, if you combine or link code generated by this Software with
+# software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+# ("`Combined Software`") and if a court of competent jurisdiction determines
+# that the patent provision (Section 3), the indemnity provision (Section 9)
+# or other Section of the License conflicts with the conditions of the
+# applicable GPL or LGPL license, you may retroactively and prospectively
+# choose to deem waived or otherwise exclude such Section(s) of the License,
+# but only in their entirety and only with respect to the Combined Software.
+#
@ stdcall vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr) winevulkan.wine_vkAcquireNextImageKHR
@ stdcall vkAllocateCommandBuffers(ptr ptr ptr) winevulkan.wine_vkAllocateCommandBuffers
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 69ea807389e7..ea64c052fa5f 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -1893,9 +1893,19 @@ class VkGenerator(object):
if not any(s.name == conv.struct.name for s in self.host_structs):
self.host_structs.append(conv.struct)
- def generate_thunks_c(self, f, prefix):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ def _generate_copyright(self, f, spec_file=False):
+ c = "# " if spec_file else " * "
+ f.write("# " if spec_file else "/* ")
+ f.write("Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n")
+ lines = ["", "This file is generated from Vulkan vk.xml file covered",
+ "by the following copyright and permission notice:"]
+ lines.extend([l.rstrip(" ") for l in self.registry.copyright.splitlines()])
+ for line in lines:
+ f.write("{0}{1}".format("# " if spec_file else " * ", line).rstrip(" ") + "\n")
+ f.write("\n" if spec_file else " */\n\n")
+ def generate_thunks_c(self, f, prefix):
+ self._generate_copyright(f)
f.write("#include \"config.h\"\n")
f.write("#include \"wine/port.h\"\n\n")
@@ -2011,7 +2021,7 @@ class VkGenerator(object):
f.write("}\n")
def generate_thunks_h(self, f, prefix):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ self._generate_copyright(f)
f.write("#ifndef __WINE_VULKAN_THUNKS_H\n")
f.write("#define __WINE_VULKAN_THUNKS_H\n\n")
@@ -2109,7 +2119,7 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_THUNKS_H */\n")
def generate_vulkan_h(self, f):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ self._generate_copyright(f)
f.write("#ifndef __WINE_VULKAN_H\n")
f.write("#define __WINE_VULKAN_H\n\n")
@@ -2203,7 +2213,7 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_H */\n")
def generate_vulkan_driver_h(self, f):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ self._generate_copyright(f)
f.write("#ifndef __WINE_VULKAN_DRIVER_H\n")
f.write("#define __WINE_VULKAN_DRIVER_H\n\n")
@@ -2231,7 +2241,7 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_DRIVER_H */\n")
def generate_vulkan_spec(self, f):
- f.write("# Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n\n")
+ self._generate_copyright(f, spec_file=True)
f.write("@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
f.write("@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
@@ -2252,7 +2262,7 @@ class VkGenerator(object):
f.write("@ stub {0}\n".format(func.name))
def generate_vulkan_loader_spec(self, f):
- f.write("# Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n\n")
+ self._generate_copyright(f, spec_file=True)
# Export symbols for all Vulkan Core functions.
for func in self.registry.funcs.values():
@@ -2303,6 +2313,8 @@ class VkRegistry(object):
self._parse_features(root)
self._parse_extensions(root)
+ self.copyright = root.find('./comment').text
+
def _mark_command_required(self, command):
""" Helper function to mark a certain command and the datatypes it needs as required."""
def mark_bitmask_dependencies(bitmask, types):
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c
index cdb229d7df32..2f89fdb5bde4 100644
--- a/dlls/winevulkan/vulkan_thunks.c
+++ b/dlls/winevulkan/vulkan_thunks.c
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#include "config.h"
#include "wine/port.h"
diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h
index f193c4310761..55645afd4735 100644
--- a/dlls/winevulkan/vulkan_thunks.h
+++ b/dlls/winevulkan/vulkan_thunks.h
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#ifndef __WINE_VULKAN_THUNKS_H
#define __WINE_VULKAN_THUNKS_H
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 551c7fd89724..b923c6422518 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -1,4 +1,38 @@
# Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+#
+# This file is generated from Vulkan vk.xml file covered
+# by the following copyright and permission notice:
+#
+# Copyright (c) 2015-2018 The Khronos Group Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ---- Exceptions to the Apache 2.0 License: ----
+#
+# As an exception, if you use this Software to generate code and portions of
+# this Software are embedded into the generated code as a result, you may
+# redistribute such product without providing attribution as would otherwise
+# be required by Sections 4(a), 4(b) and 4(d) of the License.
+#
+# In addition, if you combine or link code generated by this Software with
+# software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+# ("`Combined Software`") and if a court of competent jurisdiction determines
+# that the patent provision (Section 3), the indemnity provision (Section 9)
+# or other Section of the License conflicts with the conditions of the
+# applicable GPL or LGPL license, you may retroactively and prospectively
+# choose to deem waived or otherwise exclude such Section(s) of the License,
+# but only in their entirety and only with respect to the Combined Software.
+#
@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index 74ff22b52e08..93e0d0118ff8 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#ifndef __WINE_VULKAN_H
#define __WINE_VULKAN_H
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h
index 60d16dd52a24..c11cf33e9c88 100644
--- a/include/wine/vulkan_driver.h
+++ b/include/wine/vulkan_driver.h
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#ifndef __WINE_VULKAN_DRIVER_H
#define __WINE_VULKAN_DRIVER_H
--
2.16.4
June 6, 2018
Re: [PATCH] comctl32/taskdialog/tests: Add a basic taskdialog creator as interactive test
by Nikolay Sivov
Personally I don't think this is useful, because it won't run
automatically and detect any problems. If you want to see what it looks
like or interact with it, it's trivial to make any taskdialog test not
to close the dialog automatically.
June 6, 2018
Re: [PATCH 1/4 v4] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
by Jactry Zeng
Thanks! I sent another try.
Huw Davies <huw(a)codeweavers.com> 于2018年6月4日周一 下午5:28写道:
>
> On Tue, May 29, 2018 at 12:12:06PM +0800, Jactry Zeng wrote:
> > Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
> > ---
> > dlls/riched20/tests/Makefile.in | 2 +-
> > dlls/riched20/tests/txtsrv.c | 189 ++++++++++++++++++++++++++--------------
> > 2 files changed, 126 insertions(+), 65 deletions(-)
> >
> > diff --git a/dlls/riched20/tests/Makefile.in b/dlls/riched20/tests/Makefile.in
> > index 34c00afa7c..ca381d9dc2 100644
> > --- a/dlls/riched20/tests/Makefile.in
> > +++ b/dlls/riched20/tests/Makefile.in
> > @@ -1,5 +1,5 @@
> > TESTDLL = riched20.dll
> > -IMPORTS = ole32 oleaut32 user32 gdi32
> > +IMPORTS = ole32 oleaut32 user32 gdi32 usp10
> >
> > C_SRCS = \
> > editor.c \
> > diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
> > index 88b5adf13c..76b4eb34f6 100644
> > --- a/dlls/riched20/tests/txtsrv.c
> > +++ b/dlls/riched20/tests/txtsrv.c
> > @@ -37,6 +37,7 @@
> > #include <wine/test.h>
> > #include <oleauto.h>
> > #include <limits.h>
> > +#include <usp10.h>
> >
> > static HMODULE hmoduleRichEdit;
> > static IID *pIID_ITextServices;
> > @@ -697,81 +698,141 @@ static void test_TxSetText(void)
> > ITextHost_Release(host);
> > }
> >
> > +static void hf_from_cf(HFONT *hf, CHARFORMAT2W cf)
> > +{
> > + LOGFONTW lf;
> > +
> > + memset(&lf, 0, sizeof(lf));
> > + lstrcpyW(lf.lfFaceName, cf.szFaceName);
> > + lf.lfHeight = MulDiv(-cf.yHeight, GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 1440);
> > + lf.lfWeight = FW_NORMAL;
> > + if (cf.dwEffects & cf.dwMask & CFM_BOLD)
> > + lf.lfWeight = FW_BOLD;
> > + if (cf.dwMask & CFM_WEIGHT)
> > + lf.lfWeight = cf.wWeight;
> > + if (cf.dwEffects & cf.dwMask & CFM_ITALIC)
> > + lf.lfItalic = TRUE;
> > + if ((cf.dwEffects & cf.dwMask & CFM_UNDERLINE) &&
> > + !(cf.dwEffects & CFE_LINK) &&
> > + cf.bUnderlineType == CFU_CF1UNDERLINE)
> > + lf.lfUnderline = TRUE;
> > + if (cf.dwEffects & cf.dwMask & CFM_STRIKEOUT)
> > + lf.lfStrikeOut = TRUE;
> > + if (cf.dwEffects & cf.dwMask & (CFM_SUBSCRIPT | CFM_SUPERSCRIPT))
> > + lf.lfHeight = (lf.lfHeight * 2) / 3;
> > + if (cf.dwMask & CFM_FACE)
> > + lf.lfPitchAndFamily = cf.bPitchAndFamily;
> > + if (cf.dwMask & CFM_CHARSET)
> > + lf.lfCharSet = cf.bCharSet;
> > + *hf = CreateFontIndirectW(&lf);
> > +}
> > +
> > +static LONG get_max_width(HDC hdc, LPCWSTR string, LONG avail_width, LONG *lines)
> > +{
> > + SCRIPT_ITEM buf[16], *items = buf;
> > + LONG items_passed = sizeof(buf) / sizeof(buf[0]), num_items;
> > + SCRIPT_CONTROL control = {LANG_USER_DEFAULT, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
> > + FALSE, FALSE, 0};
> > + SCRIPT_STATE state = {0, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 0, 0};
> > + SCRIPT_CACHE script_cache = NULL;
> > + LONG max_glyphs = 1.5 * lstrlenW(string) + 16;
> > + LONG max_clusters = lstrlenW(string) * 2;
> > + WORD *clusters = HeapAlloc(GetProcessHeap(), 0, max_clusters * sizeof(WORD));
> > + WORD *glyphs = HeapAlloc(GetProcessHeap(), 0, max_glyphs *
> > + (sizeof(WORD) + sizeof(SCRIPT_VISATTR) + sizeof(LONG) + sizeof(GOFFSET)));
> > + SCRIPT_VISATTR *vis_attrs = (SCRIPT_VISATTR *)((char *)glyphs + max_glyphs * sizeof(WORD));
> > + GOFFSET *offsets = (GOFFSET *)((char *)glyphs + max_glyphs * (sizeof(WORD) + sizeof(SCRIPT_VISATTR)
> > + + sizeof(LONG)));
> > + LONG num_glyphs = 0;
> > + LONG *advances = (LONG *)((char *)glyphs + max_glyphs * (sizeof(WORD) + sizeof(SCRIPT_VISATTR)));
> > + LONG i, width = 0, max_width = 0;
> > +
> > + ScriptItemize(string, lstrlenW(string), items_passed, &control, &state, items, &num_items);
> > + ScriptShape(hdc, &script_cache, string, lstrlenW(string), max_glyphs, &items[0].a, glyphs,
> > + clusters, vis_attrs, &num_glyphs);
> > + ScriptPlace(hdc, &script_cache, glyphs, num_glyphs, vis_attrs, &items[0].a, advances, offsets,
> > + NULL);
> > +
> > + *lines = 1;
> > + for (i = 0; i < num_glyphs; i++)
> > + {
> > + width += advances[i];
> > + if (width >= avail_width)
> > + {
> > + (*lines)++;
> > + width -= advances[i];
> > + if (width > max_width)
> > + max_width = width;
> > + width = advances[i];
> > + }
> > + if (width > max_width)
> > + max_width = width;
> > + }
>
> Since we'll probably just use ascii characters for this test, you could
> avoid using uniscribe here and just use gdi32 directly.
>
> > + HeapFree(GetProcessHeap(), 0, clusters);
> > + HeapFree(GetProcessHeap(), 0, glyphs);
> > + return max_width;
> > +}
> > +
> > +#define CHECK_TXGETNATURALSIZE(res,width,height,expected_width,expected_height) \
> > + _check_txgetnaturalsize(res, width, height, expected_width, expected_height, __LINE__)
> > +static void _check_txgetnaturalsize(HRESULT res, LONG width, LONG height, LONG expected_width,
> > + LONG expected_height, int line)
> > +{
> > + ok_(__FILE__,line)(res == S_OK, "TxGetNaturalSize failed: 0x%08x.\n", res);
> > + ok_(__FILE__,line)(width >= expected_width && width <= expected_width + 1,
> > + "got wrong width: %d, expected: %d {+1}.\n", width, expected_width);
> > + ok_(__FILE__,line)(height == expected_height, "got wrong height: %d, expected: %d.\n",
> > + height, expected_height);
> > +}
> > +
> > static void test_TxGetNaturalSize(void)
> > {
> > ITextServices *txtserv;
> > ITextHost *host;
> > HRESULT result;
> > - BOOL ret;
> > -
> > - /* This value is used when calling TxGetNaturalSize. MSDN says
> > - that this is not supported however a null pointer cannot be
> > - used as it will cause a segmentation violation. The values in
> > - the structure being pointed to are required to be INT_MAX
> > - otherwise calculations can give wrong values. */
> > - const SIZEL psizelExtent = {INT_MAX,INT_MAX};
> > -
> > - static const WCHAR oneA[] = {'A',0};
> > -
> > - /* Results of measurements */
> > - LONG xdim, ydim;
> > -
> > - /* The device context to do the tests in */
> > + SIZEL psizelExtent = {-1,-1};
> > + static const WCHAR test_text[] = {'T','e','s','t','S','o','m','e','T','e','x','t',0};
> > + LONG width, height, expected_width, expected_height, lines;
> > HDC hdcDraw;
> > -
> > - /* Variables with the text metric information */
> > - INT charwidth_caps_text[26];
> > - TEXTMETRICA tmInfo_text;
> > + HWND hwnd;
> > + RECT rect;
> > + CHARFORMAT2W cf;
> > + LRESULT lresult;
> > + HFONT hf, old_hf;
> > + TEXTMETRICA tm;
> >
> > if (!init_texthost(&txtserv, &host))
> > return;
> >
> > - hdcDraw = GetDC(NULL);
> > - SaveDC(hdcDraw);
> > -
> > - /* Populate the metric strucs */
> > - SetMapMode(hdcDraw,MM_TEXT);
> > - GetTextMetricsA(hdcDraw, &tmInfo_text);
> > - SetLastError(0xdeadbeef);
> > - ret = GetCharWidth32A(hdcDraw,'A','Z',charwidth_caps_text);
> > - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) {
> > - win_skip("GetCharWidth32 is not available\n");
> > - goto cleanup;
> > - }
> > -
> > - /* Make measurements in MM_TEXT */
> > + hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
> > + 0, 0, 100, 100, 0, 0, 0, NULL);
> > + hdcDraw = GetDC(hwnd);
> > SetMapMode(hdcDraw,MM_TEXT);
> > - xdim = 0; ydim = 0;
> > -
> > - result = ITextServices_TxSetText(txtserv, oneA);
> > - ok(result == S_OK, "ITextServices_TxSetText failed (result = %x)\n", result);
> > - if (result != S_OK) {
> > - skip("Could not set text\n");
> > - goto cleanup;
> > - }
> > -
> > - SetLastError(0xdeadbeef);
> > - result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT,
> > - hdcDraw, NULL, NULL,
> > - TXTNS_FITTOCONTENT, &psizelExtent,
> > - &xdim, &ydim);
> > - todo_wine ok(result == S_OK || broken(result == E_FAIL), /* WINXP Arabic Language */
> > - "TxGetNaturalSize gave unexpected return value (result = %x)\n", result);
> > - if (result == S_OK) {
> > - todo_wine ok(ydim == tmInfo_text.tmHeight,
> > - "Height calculated incorrectly (expected %d, got %d)\n",
> > - tmInfo_text.tmHeight, ydim);
> > - /* The native DLL adds one pixel extra when calculating widths. */
> > - todo_wine ok(xdim >= charwidth_caps_text[0] && xdim <= charwidth_caps_text[0] + 1,
> > - "Width calculated incorrectly (expected %d {+1}, got %d)\n",
> > - charwidth_caps_text[0], xdim);
> > - } else
> > - skip("TxGetNaturalSize measurements not performed (xdim = %d, ydim = %d, result = %x, error = %x)\n",
> > - xdim, ydim, result, GetLastError());
> > -
> > -cleanup:
> > - RestoreDC(hdcDraw,1);
> > - ReleaseDC(NULL,hdcDraw);
> > + GetClientRect(hwnd, &rect);
> > +
> > + result = ITextServices_TxSetText(txtserv, test_text);
> > + ok(result == S_OK, "ITextServices_TxSetText failed: 0x%08x.\n", result);
> > +
> > + cf.cbSize = sizeof(cf);
> > + result = ITextServices_TxSendMessage(txtserv, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf, &lresult);
> > + ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result);
> > + hf_from_cf(&hf, cf);
> > +
> > + old_hf = SelectObject(hdcDraw, hf);
>
> How about doing this the other way around - create an hfont, fill out
> an appropriate cf and use that to set the character format of the
> text? I think that would end up being simpler.
>
>
> > + expected_width = get_max_width(hdcDraw, test_text, rect.right - rect.left, &lines);
> > + GetTextMetricsA(hdcDraw, &tm);
> > + expected_height = (tm.tmAscent + tm.tmDescent) * lines;
> > + SelectObject(hdcDraw, old_hf);
> > +
> > + psizelExtent.cx = -1; psizelExtent.cy = -1;
> > + width = rect.right - rect.left;
> > + height = 0;
> > + result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
> > + TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
> > + todo_wine CHECK_TXGETNATURALSIZE(result, width, height, expected_width, expected_height);
> > +
> > + ReleaseDC(hwnd, hdcDraw);
> > + DestroyWindow(hwnd);
> > ITextServices_Release(txtserv);
> > ITextHost_Release(host);
> > }
> > --
> > 2.15.1 (Apple Git-101)
> >
> >
> >
> >
>
>
--
Regards,
Jactry Zeng
June 6, 2018
[PATCH 4/4 v5] riched20: Partially implement ITextServices_TxGetNaturalSize().
by Jactry Zeng
Superseded patch 146573.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/tests/txtsrv.c | 54 ++++++++++++++++++++++++++++++++++--
dlls/riched20/txtsrv.c | 33 ++++++++++++++++++++--
2 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index ac06aa868e..f9c545938a 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -423,9 +423,10 @@ static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface,
DWORD *pdwBits)
{
ITextHostTestImpl *This = impl_from_ITextHost(iface);
+ DWORD bits = TXTBIT_MULTILINE | TXTBIT_WORDWRAP;
TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n",
This, dwMask, pdwBits);
- *pdwBits = 0;
+ *pdwBits = bits & dwMask;
return S_OK;
}
@@ -739,6 +740,13 @@ static void test_TxGetNaturalSize(void)
HRESULT result;
SIZEL psizelExtent = {-1,-1};
static const WCHAR test_text[] = {'T','e','s','t','S','o','m','e','T','e','x','t',0};
+ static const WCHAR long_text[] = {'T','e','s','t','W','i','t','h','A','L','o','n','g',
+ 'L','i','n','e','S','t','r','i','n','g',0};
+ static const WCHAR long_text1[] = {'T','e','s','t','W','i','t','h','Y','e','t','A','n',
+ 'o','t','h','o','r','L', 'o','n','g','L','i','n','e',
+ 'S','t','r','i','n','g','W','h','i','c','h','H','a',
+ 's','M','o','r','e','T','h','a','n','T','w','o','L',
+ 'i','n','e','s',0};
LONG width, height;
HDC hdcDraw;
HWND hwnd;
@@ -782,7 +790,49 @@ static void test_TxGetNaturalSize(void)
height = 0;
result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
- todo_wine CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, test_text);
+ CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, test_text);
+
+ psizelExtent.cx = 1; psizelExtent.cy = 1;
+ width = rect.right - rect.left;
+ height = 0;
+ result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
+ TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
+ CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, test_text);
+
+ psizelExtent.cx = 0; psizelExtent.cy = 0;
+ width = rect.right - rect.left;
+ height = 0;
+ result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
+ TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
+ ok(result == S_OK, "ITextServices_TxGetNaturalSize failed: 0x%08x.\n", result);
+ ok(!width && !height, "got wrong width and height: (%d, %d) expected (0, 0).\n", width, height);
+
+ psizelExtent.cx = 1; psizelExtent.cy = 1;
+ result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
+ TXTNS_FITTOCONTENT, &psizelExtent, NULL, NULL);
+ ok(result == E_INVALIDARG, "ITextServices_TxGetNaturalSize should fail: 0x%08x.\n", result);
+
+ /* Test with a long line string */
+ result = ITextServices_TxSetText(txtserv, long_text);
+ ok(result == S_OK, "ITextServices_TxSetText failed result: 0x%08x.\n", result);
+
+ psizelExtent.cx = 1; psizelExtent.cy = 1;
+ width = rect.right - rect.left;
+ height = 0;
+ result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
+ TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
+ CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, long_text);
+
+ /* Test with string which has more than two lines */
+ result = ITextServices_TxSetText(txtserv, long_text1);
+ ok(result == S_OK, "ITextServices_TxSetText failed result: 0x%08x.\n", result);
+
+ psizelExtent.cx = 1; psizelExtent.cy = 1;
+ width = rect.right - rect.left;
+ height = 0;
+ result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
+ TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
+ CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, long_text1);
ReleaseDC(hwnd, hdcDraw);
DestroyWindow(hwnd);
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index eb61e4eff6..f417f46ad1 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -320,8 +320,37 @@ DECLSPEC_HIDDEN HRESULT WINAPI fnTextSrv_TxGetNaturalSize(ITextServices *iface,
{
ITextServicesImpl *This = impl_from_ITextServices(iface);
- FIXME("%p: STUB\n", This);
- return E_NOTIMPL;
+ if (!pwidth || !pheight)
+ return E_INVALIDARG;
+
+ TRACE("(%p)->(%p, %x, %p, %p, %p, %x, %p, %p, %p\n)", This, iface, dwAspect, hdcDraw,
+ hicTargetDev, ptd, dwMode, psizelExtent, pwidth, pheight);
+
+ if (dwAspect != DVASPECT_CONTENT)
+ FIXME("Unsupported aspect: %x\n", dwAspect);
+ if (hicTargetDev)
+ FIXME("Unsupported hicTargetDev: %p\n", hicTargetDev);
+ if (ptd)
+ FIXME("Unsupported ptd: %p\n", ptd);
+ if (dwMode != TXTNS_FITTOCONTENT)
+ FIXME("Unsupported mode: %x\n", dwMode);
+
+ if (!psizelExtent->cy)
+ {
+ *pwidth = 0;
+ *pheight = 0;
+ return S_OK;
+ }
+
+ SetRectEmpty(&This->editor->rcFormat);
+ This->editor->rcFormat.right = *pwidth;
+ This->editor->rcFormat.bottom = *pheight;
+ ME_MarkAllForWrapping(This->editor);
+ ME_WrapMarkedParagraphs(This->editor, hdcDraw);
+ *pwidth = This->editor->nTotalWidth;
+ *pheight = This->editor->nTotalLength;
+
+ return S_OK;
}
DECLSPEC_HIDDEN HRESULT WINAPI fnTextSrv_TxGetDropTarget(ITextServices *iface, IDropTarget **ppDropTarget)
--
2.17.1
June 6, 2018
[PATCH 3/4 v5] riched20: Support external HDC in ME_WrapMarkedParagraphs().
by Jactry Zeng
Superseded patch 146572.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/editor.c | 13 +++++++------
dlls/riched20/editor.h | 2 +-
dlls/riched20/editstr.h | 1 +
dlls/riched20/paint.c | 10 +++++-----
dlls/riched20/table.c | 4 ++--
dlls/riched20/wrap.c | 11 +++++++++--
6 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 820b0380c7..82132761f0 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3028,6 +3028,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
ed->hWnd = NULL;
ed->hwndParent = NULL;
+ ed->hdcDraw = NULL;
ed->sizeWindow.cx = ed->sizeWindow.cy = 0;
ed->texthost = texthost;
ed->reOle = NULL;
@@ -3494,7 +3495,7 @@ static LRESULT ME_WmCreate(ME_TextEditor *editor, LPARAM lParam, BOOL unicode)
}
ME_CommitUndo(editor);
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_MoveCaret(editor);
return 0;
}
@@ -3645,7 +3646,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
cf.yHeight = size * 20; /* convert twips to points */
ME_SetSelectionCharFormat(editor, &cf);
ME_CommitUndo(editor);
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
@@ -3934,7 +3935,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_CommitUndo(editor);
if (bRepaint)
{
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
}
@@ -3959,7 +3960,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case EM_SETPARAFORMAT:
{
BOOL result = ME_SetSelectionParaFormat(editor, (PARAFORMAT2 *)lParam);
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
ME_CommitUndo(editor);
@@ -4054,7 +4055,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_CommitUndo(editor);
ME_MarkAllForWrapping(editor);
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_UpdateScrollBar(editor);
if (bRepaint)
ME_Repaint(editor);
@@ -4714,7 +4715,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
editor->bDefaultFormatRect = TRUE;
}
ME_MarkAllForWrapping(editor);
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_UpdateScrollBar(editor);
if (msg != EM_SETRECTNP)
ME_Repaint(editor);
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index 0f0e56ecd1..425a34f0c2 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -182,7 +182,7 @@ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC) DECLSPEC_HIDD
void ME_DestroyContext(ME_Context *c) DECLSPEC_HIDDEN;
/* wrap.c */
-BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) DECLSPEC_HIDDEN;
+BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor, HDC hdc) DECLSPEC_HIDDEN;
void ME_InvalidateParagraphRange(ME_TextEditor *editor, ME_DisplayItem *start_para, ME_DisplayItem *last_para) DECLSPEC_HIDDEN;
void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN;
diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h
index 206ce85287..1d811e1c2a 100644
--- a/dlls/riched20/editstr.h
+++ b/dlls/riched20/editstr.h
@@ -383,6 +383,7 @@ typedef struct tagME_InStream ME_InStream;
typedef struct tagME_TextEditor
{
HWND hWnd, hwndParent;
+ HDC hdcDraw;
ITextHost *texthost;
IRichEditOle *reOle;
BOOL bEmulateVersion10;
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index fcc4e105a3..f2429081fc 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -105,7 +105,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate)
void ME_Repaint(ME_TextEditor *editor)
{
- if (ME_WrapMarkedParagraphs(editor))
+ if (ME_WrapMarkedParagraphs(editor, NULL))
{
ME_UpdateScrollBar(editor);
FIXME("ME_Repaint had to call ME_WrapMarkedParagraphs\n");
@@ -118,7 +118,7 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now)
/* Should be called whenever the contents of the control have changed */
BOOL wrappedParagraphs;
- wrappedParagraphs = ME_WrapMarkedParagraphs(editor);
+ wrappedParagraphs = ME_WrapMarkedParagraphs(editor, NULL);
if (wrappedParagraphs)
ME_UpdateScrollBar(editor);
@@ -145,7 +145,7 @@ ME_RewrapRepaint(ME_TextEditor *editor)
* looks, but not content. Like resizing. */
ME_MarkAllForWrapping(editor);
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
}
@@ -1163,7 +1163,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
SCROLLINFO si;
BOOL bScrollBarWasVisible, bScrollBarWillBeVisible;
- if (ME_WrapMarkedParagraphs(editor))
+ if (ME_WrapMarkedParagraphs(editor, NULL))
FIXME("ME_UpdateScrollBar had to call ME_WrapMarkedParagraphs\n");
si.cbSize = sizeof(si);
@@ -1336,7 +1336,7 @@ ME_InvalidateSelection(ME_TextEditor *editor)
there's no (inverted) area to be repainted, neither old nor new */
if (nStart == nEnd && editor->nLastSelStart == editor->nLastSelEnd)
return;
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
ME_GetSelectionParas(editor, &sel_start, &sel_end);
assert(sel_start->type == diParagraph);
assert(sel_end->type == diParagraph);
diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c
index 4cd77eb399..5457935dfa 100644
--- a/dlls/riched20/table.c
+++ b/dlls/riched20/table.c
@@ -499,7 +499,7 @@ static void ME_SelectOrInsertNextCell(ME_TextEditor *editor,
editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
editor->pCursors[0].nOffset = 0;
editor->pCursors[1] = editor->pCursors[0];
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
return;
}
}
@@ -544,7 +544,7 @@ static void ME_SelectOrInsertNextCell(ME_TextEditor *editor,
editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
editor->pCursors[0].nOffset = 0;
editor->pCursors[1] = editor->pCursors[0];
- ME_WrapMarkedParagraphs(editor);
+ ME_WrapMarkedParagraphs(editor, NULL);
return;
}
}
diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c
index e3a70f07d1..4c92252547 100644
--- a/dlls/riched20/wrap.c
+++ b/dlls/riched20/wrap.c
@@ -980,14 +980,21 @@ static void ME_MarkRepaintEnd(ME_DisplayItem *para,
*repaint_end = para;
}
-BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
+BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor, HDC hdc)
{
ME_DisplayItem *item;
ME_Context c;
int totalWidth = 0;
ME_DisplayItem *repaint_start = NULL, *repaint_end = NULL;
- ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
+ if (!hdc)
+ hdc = ITextHost_TxGetDC(editor->texthost);
+ if (hdc != editor->hdcDraw)
+ {
+ ME_MarkAllForWrapping(editor);
+ editor->hdcDraw = hdc;
+ }
+ ME_InitContext(&c, editor, hdc);
c.pt.x = 0;
item = editor->pBuffer->pFirst->next;
while(item != editor->pBuffer->pLast) {
--
2.17.1
June 6, 2018
[PATCH 2/4 v5] riched20: Call ITextHost_TxGetCharFormat() for setting default charformat.
by Jactry Zeng
Superseded patch 146571.
ChangeLog:
v5:
- Remove an unnecessary newline.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/para.c | 5 ++++
dlls/riched20/tests/txtsrv.c | 58 +++++++++++++++++++++++++++++++++++-
2 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index f2a70e5746..ffb017c123 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -36,6 +36,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
{
ME_Context c;
CHARFORMAT2W cf;
+ const CHARFORMATW *host_cf;
LOGFONTW lf;
HFONT hf;
ME_TextBuffer *text = editor->pBuffer;
@@ -44,6 +45,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
ME_Style *style;
int eol_len;
WCHAR cr_lf[] = {'\r','\n',0};
+ HRESULT hr;
ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
@@ -73,6 +75,9 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
cf.bCharSet = lf.lfCharSet;
cf.lcid = GetSystemDefaultLCID();
+ hr = ITextHost_TxGetCharFormat(editor->texthost, (const CHARFORMATW **)&host_cf);
+ if (hr == S_OK && (host_cf->cbSize >= sizeof(CHARFORMATW)))
+ ME_ToCF2W(&cf, (CHARFORMAT2W *)host_cf);
style = ME_MakeStyle(&cf);
text->pDefaultStyle = style;
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index 6e61392dc5..ac06aa868e 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -85,6 +85,7 @@ typedef struct ITextHostTestImpl
{
ITextHost ITextHost_iface;
LONG refCount;
+ CHARFORMATW char_format;
} ITextHostTestImpl;
static inline ITextHostTestImpl *impl_from_ITextHost(ITextHost *iface)
@@ -330,7 +331,8 @@ static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface,
{
ITextHostTestImpl *This = impl_from_ITextHost(iface);
TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF);
- return E_NOTIMPL;
+ *ppCF = &This->char_format;
+ return S_OK;
}
static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface,
@@ -609,6 +611,8 @@ static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret)
ITextHostTestImpl *dummyTextHost;
IUnknown *init;
HRESULT result;
+ LOGFONTW lf;
+ HFONT hf;
dummyTextHost = CoTaskMemAlloc(sizeof(*dummyTextHost));
if (dummyTextHost == NULL) {
@@ -617,6 +621,19 @@ static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret)
}
dummyTextHost->ITextHost_iface.lpVtbl = &itextHostVtbl;
dummyTextHost->refCount = 1;
+ memset(&dummyTextHost->char_format, 0, sizeof(dummyTextHost->char_format));
+ dummyTextHost->char_format.cbSize = sizeof(dummyTextHost->char_format);
+ dummyTextHost->char_format.dwMask = CFM_FACE | CFM_SIZE | CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT;
+ hf = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
+ GetObjectW(hf, sizeof(LOGFONTW), &lf);
+ lstrcpyW(dummyTextHost->char_format.szFaceName, lf.lfFaceName);
+ dummyTextHost->char_format.yHeight = MulDiv(abs(lf.lfHeight), 1440, GetDeviceCaps(GetDC(NULL), LOGPIXELSY));
+ if (lf.lfWeight > FW_NORMAL) dummyTextHost->char_format.dwEffects |= CFE_BOLD;
+ if (lf.lfItalic) dummyTextHost->char_format.dwEffects |= CFE_ITALIC;
+ if (lf.lfUnderline) dummyTextHost->char_format.dwEffects |= CFE_UNDERLINE;
+ if (lf.lfStrikeOut) dummyTextHost->char_format.dwEffects |= CFE_SUBSCRIPT;
+ dummyTextHost->char_format.bPitchAndFamily = lf.lfPitchAndFamily;
+ dummyTextHost->char_format.bCharSet = lf.lfCharSet;
/* MSDN states that an IUnknown object is returned by
CreateTextServices which is then queried to obtain a
@@ -947,6 +964,44 @@ static void test_QueryInterface(void)
ITextHost_Release(host);
}
+static void test_default_format(void)
+{
+ ITextServices *txtserv;
+ ITextHost *host;
+ HRESULT result;
+ LRESULT lresult;
+ CHARFORMAT2W cf2;
+ HFONT hf;
+ LOGFONTW lf;
+ LONG expected_height;
+
+ if (!init_texthost(&txtserv, &host))
+ return;
+
+ cf2.cbSize = sizeof(CHARFORMAT2W);
+ result = ITextServices_TxSendMessage(txtserv, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2, &lresult);
+ ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result);
+ hf = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
+ GetObjectW(hf, sizeof(LOGFONTW), &lf);
+ expected_height = MulDiv(abs(lf.lfHeight), 1440, GetDeviceCaps(GetDC(NULL), LOGPIXELSY));
+ ok(!lstrcmpW(lf.lfFaceName, cf2.szFaceName), "got wrong font name: %s.\n", wine_dbgstr_w(cf2.szFaceName));
+ ok(cf2.yHeight == expected_height, "got wrong yHeight: %d, expetced %d.\n", cf2.yHeight, expected_height);
+ if (lf.lfWeight > FW_NORMAL)
+ ok(cf2.dwEffects & CFE_BOLD, "got dwEffects without CFE_BOLD: %x.\n", cf2.dwEffects);
+ if (lf.lfItalic)
+ ok(cf2.dwEffects & CFE_ITALIC, "got dwEffects without CFE_ITALIC: %x.\n", cf2.dwEffects);
+ if (lf.lfUnderline)
+ ok(cf2.dwEffects & CFE_UNDERLINE, "got dwEffects without CFE_UNDERLINE: %x.\n", cf2.dwEffects);
+ if (lf.lfStrikeOut)
+ ok(cf2.dwEffects & CFE_STRIKEOUT, "got dwEffects without CFE_STRIKEOUT: %x.\n", cf2.dwEffects);
+ ok(cf2.bPitchAndFamily == lf.lfPitchAndFamily, "got wrong bPitchAndFamily: %x, expected %x.\n",
+ cf2.bPitchAndFamily, lf.lfPitchAndFamily);
+ ok(cf2.bCharSet == lf.lfCharSet, "got wrong bCharSet: %x, expected %x.\n", cf2.bCharSet, lf.lfCharSet);
+
+ ITextServices_Release(txtserv);
+ ITextHost_Release(host);
+}
+
START_TEST( txtsrv )
{
ITextServices *txtserv;
@@ -977,6 +1032,7 @@ START_TEST( txtsrv )
test_TxGetNaturalSize();
test_TxDraw();
test_QueryInterface();
+ test_default_format();
}
if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE);
}
--
2.17.1
June 6, 2018
[PATCH 1/4 v5] riched20/tests: Rewrite tests for ITextServices_TxGetNaturalSize().
by Jactry Zeng
Superseded patch 146570.
ChangeLog:
v5:
- Use DrawTextW for calculating expected values;
- Simplify format setting with EM_SETCHARFORMAT.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/tests/txtsrv.c | 125 +++++++++++++++++------------------
1 file changed, 61 insertions(+), 64 deletions(-)
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index 88b5adf13c..6e61392dc5 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -697,81 +697,78 @@ static void test_TxSetText(void)
ITextHost_Release(host);
}
+#define CHECK_TXGETNATURALSIZE(res,width,height,hdc,string) \
+ _check_txgetnaturalsize(res, width, height, hdc, string, __LINE__)
+static void _check_txgetnaturalsize(HRESULT res, LONG width, LONG height, HDC hdc, LPCWSTR string, int line)
+{
+ RECT rect;
+ LONG expected_width, expected_height;
+
+ GetClientRect(WindowFromDC(hdc), &rect);
+ DrawTextW(hdc, string, -1, &rect, DT_LEFT | DT_CALCRECT | DT_NOCLIP | DT_EDITCONTROL | DT_WORDBREAK);
+ expected_width = rect.right - rect.left;
+ expected_height = rect.bottom - rect.top;
+ ok_(__FILE__,line)(res == S_OK, "ITextServices_TxGetNaturalSize failed: 0x%08x.\n", res);
+ ok_(__FILE__,line)(width >= expected_width && width <= expected_width + 1,
+ "got wrong width: %d, expected: %d {+1}.\n", width, expected_width);
+ ok_(__FILE__,line)(height == expected_height, "got wrong height: %d, expected: %d.\n",
+ height, expected_height);
+}
+
static void test_TxGetNaturalSize(void)
{
ITextServices *txtserv;
ITextHost *host;
HRESULT result;
- BOOL ret;
-
- /* This value is used when calling TxGetNaturalSize. MSDN says
- that this is not supported however a null pointer cannot be
- used as it will cause a segmentation violation. The values in
- the structure being pointed to are required to be INT_MAX
- otherwise calculations can give wrong values. */
- const SIZEL psizelExtent = {INT_MAX,INT_MAX};
-
- static const WCHAR oneA[] = {'A',0};
-
- /* Results of measurements */
- LONG xdim, ydim;
-
- /* The device context to do the tests in */
+ SIZEL psizelExtent = {-1,-1};
+ static const WCHAR test_text[] = {'T','e','s','t','S','o','m','e','T','e','x','t',0};
+ LONG width, height;
HDC hdcDraw;
-
- /* Variables with the text metric information */
- INT charwidth_caps_text[26];
- TEXTMETRICA tmInfo_text;
+ HWND hwnd;
+ RECT rect;
+ CHARFORMAT2W cf;
+ LRESULT lresult;
+ HFONT hf;
+ LOGFONTW lf;
if (!init_texthost(&txtserv, &host))
return;
- hdcDraw = GetDC(NULL);
- SaveDC(hdcDraw);
-
- /* Populate the metric strucs */
- SetMapMode(hdcDraw,MM_TEXT);
- GetTextMetricsA(hdcDraw, &tmInfo_text);
- SetLastError(0xdeadbeef);
- ret = GetCharWidth32A(hdcDraw,'A','Z',charwidth_caps_text);
- if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) {
- win_skip("GetCharWidth32 is not available\n");
- goto cleanup;
- }
-
- /* Make measurements in MM_TEXT */
+ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE,
+ 0, 0, 100, 100, 0, 0, 0, NULL);
+ hdcDraw = GetDC(hwnd);
SetMapMode(hdcDraw,MM_TEXT);
- xdim = 0; ydim = 0;
-
- result = ITextServices_TxSetText(txtserv, oneA);
- ok(result == S_OK, "ITextServices_TxSetText failed (result = %x)\n", result);
- if (result != S_OK) {
- skip("Could not set text\n");
- goto cleanup;
- }
-
- SetLastError(0xdeadbeef);
- result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT,
- hdcDraw, NULL, NULL,
- TXTNS_FITTOCONTENT, &psizelExtent,
- &xdim, &ydim);
- todo_wine ok(result == S_OK || broken(result == E_FAIL), /* WINXP Arabic Language */
- "TxGetNaturalSize gave unexpected return value (result = %x)\n", result);
- if (result == S_OK) {
- todo_wine ok(ydim == tmInfo_text.tmHeight,
- "Height calculated incorrectly (expected %d, got %d)\n",
- tmInfo_text.tmHeight, ydim);
- /* The native DLL adds one pixel extra when calculating widths. */
- todo_wine ok(xdim >= charwidth_caps_text[0] && xdim <= charwidth_caps_text[0] + 1,
- "Width calculated incorrectly (expected %d {+1}, got %d)\n",
- charwidth_caps_text[0], xdim);
- } else
- skip("TxGetNaturalSize measurements not performed (xdim = %d, ydim = %d, result = %x, error = %x)\n",
- xdim, ydim, result, GetLastError());
-
-cleanup:
- RestoreDC(hdcDraw,1);
- ReleaseDC(NULL,hdcDraw);
+ GetClientRect(hwnd, &rect);
+
+ memset(&cf, 0, sizeof(cf));
+ cf.cbSize = sizeof(cf);
+ cf.dwMask = CFM_ALL2;
+ hf = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
+ GetObjectW(hf, sizeof(LOGFONTW), &lf);
+ lstrcpyW(cf.szFaceName, lf.lfFaceName);
+ cf.yHeight = MulDiv(abs(lf.lfHeight), 1440, GetDeviceCaps(GetDC(NULL), LOGPIXELSY));
+ if (lf.lfWeight > FW_NORMAL) cf.dwEffects |= CFE_BOLD;
+ if (lf.lfItalic) cf.dwEffects |= CFE_ITALIC;
+ if (lf.lfUnderline) cf.dwEffects |= CFE_UNDERLINE;
+ if (lf.lfStrikeOut) cf.dwEffects |= CFE_SUBSCRIPT;
+ cf.bPitchAndFamily = lf.lfPitchAndFamily;
+ cf.bCharSet = lf.lfCharSet;
+ result = ITextServices_TxSendMessage(txtserv, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf, &lresult);
+ ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result);
+ SelectObject(hdcDraw, hf);
+
+ result = ITextServices_TxSetText(txtserv, test_text);
+ ok(result == S_OK, "ITextServices_TxSetText failed: 0x%08x.\n", result);
+
+ psizelExtent.cx = -1; psizelExtent.cy = -1;
+ width = rect.right - rect.left;
+ height = 0;
+ result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, hdcDraw, NULL, NULL,
+ TXTNS_FITTOCONTENT, &psizelExtent, &width, &height);
+ todo_wine CHECK_TXGETNATURALSIZE(result, width, height, hdcDraw, test_text);
+
+ ReleaseDC(hwnd, hdcDraw);
+ DestroyWindow(hwnd);
ITextServices_Release(txtserv);
ITextHost_Release(host);
}
--
2.17.1
June 6, 2018
Re: [PATCH 4/4] winevulkan: Update Vulkan support to 1.0.76.
by Józef Kucia
On Tue, Jun 5, 2018 at 3:19 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
> Roderick Colenbrander <thunderbird2k(a)gmail.com> writes:
>
>> Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com>
>> ---
>> dlls/vulkan-1/vulkan-1.spec | 28 +
>> dlls/winevulkan/make_vulkan | 206 +-
>> dlls/winevulkan/vk.xml | 6448 ++++++++++++++++++++++++++-------------
>
> I'd suggest downloading vk.xml like we do for the OpenGL spec
> files. It's not clear that the license exception also applies to the
> source file, so I think it would be better if we didn't distribute it.
Thanks. I've submitted a patch to remove vk.xml from the repository.
The patch is probably stuck in the moderation queue.
June 6, 2018
[PATCH 2/2] winevulkan: Update vk.xml to 1.1.76.
by Józef Kucia
From: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/vulkan-1/vulkan-1.spec | 28 +
dlls/winevulkan/make_vulkan | 212 ++++-
dlls/winevulkan/vulkan_thunks.c | 377 ++++++++-
dlls/winevulkan/vulkan_thunks.h | 156 +++-
dlls/winevulkan/winevulkan.spec | 28 +
include/wine/vulkan.h | 1711 ++++++++++++++++++++++++---------------
6 files changed, 1756 insertions(+), 756 deletions(-)
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 49af817d57e5..3d457749b46a 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -6,7 +6,9 @@
@ stdcall vkAllocateMemory(ptr ptr ptr ptr) winevulkan.wine_vkAllocateMemory
@ stdcall vkBeginCommandBuffer(ptr ptr) winevulkan.wine_vkBeginCommandBuffer
@ stdcall vkBindBufferMemory(ptr int64 int64 int64) winevulkan.wine_vkBindBufferMemory
+@ stub vkBindBufferMemory2
@ stdcall vkBindImageMemory(ptr int64 int64 int64) winevulkan.wine_vkBindImageMemory
+@ stub vkBindImageMemory2
@ stdcall vkCmdBeginQuery(ptr int64 long long) winevulkan.wine_vkCmdBeginQuery
@ stdcall vkCmdBeginRenderPass(ptr ptr long) winevulkan.wine_vkCmdBeginRenderPass
@ stdcall vkCmdBindDescriptorSets(ptr long int64 long long ptr long ptr) winevulkan.wine_vkCmdBindDescriptorSets
@@ -23,6 +25,7 @@
@ stdcall vkCmdCopyImageToBuffer(ptr int64 long int64 long ptr) winevulkan.wine_vkCmdCopyImageToBuffer
@ stdcall vkCmdCopyQueryPoolResults(ptr int64 long long int64 int64 int64 long) winevulkan.wine_vkCmdCopyQueryPoolResults
@ stdcall vkCmdDispatch(ptr long long long) winevulkan.wine_vkCmdDispatch
+@ stub vkCmdDispatchBase
@ stdcall vkCmdDispatchIndirect(ptr int64 int64) winevulkan.wine_vkCmdDispatchIndirect
@ stdcall vkCmdDraw(ptr long long long long) winevulkan.wine_vkCmdDraw
@ stdcall vkCmdDrawIndexed(ptr long long long long long) winevulkan.wine_vkCmdDrawIndexed
@@ -41,6 +44,7 @@
@ stdcall vkCmdSetBlendConstants(ptr ptr) winevulkan.wine_vkCmdSetBlendConstants
@ stdcall vkCmdSetDepthBias(ptr float float float) winevulkan.wine_vkCmdSetDepthBias
@ stdcall vkCmdSetDepthBounds(ptr float float) winevulkan.wine_vkCmdSetDepthBounds
+@ stub vkCmdSetDeviceMask
@ stdcall vkCmdSetEvent(ptr int64 long) winevulkan.wine_vkCmdSetEvent
@ stdcall vkCmdSetLineWidth(ptr float) winevulkan.wine_vkCmdSetLineWidth
@ stdcall vkCmdSetScissor(ptr long long ptr) winevulkan.wine_vkCmdSetScissor
@@ -57,6 +61,7 @@
@ stdcall vkCreateComputePipelines(ptr int64 long ptr ptr ptr) winevulkan.wine_vkCreateComputePipelines
@ stdcall vkCreateDescriptorPool(ptr ptr ptr ptr) winevulkan.wine_vkCreateDescriptorPool
@ stdcall vkCreateDescriptorSetLayout(ptr ptr ptr ptr) winevulkan.wine_vkCreateDescriptorSetLayout
+@ stub vkCreateDescriptorUpdateTemplate
@ stdcall vkCreateDevice(ptr ptr ptr ptr) winevulkan.wine_vkCreateDevice
@ stub vkCreateDisplayModeKHR
@ stub vkCreateDisplayPlaneSurfaceKHR
@@ -72,6 +77,7 @@
@ stdcall vkCreateQueryPool(ptr ptr ptr ptr) winevulkan.wine_vkCreateQueryPool
@ stdcall vkCreateRenderPass(ptr ptr ptr ptr) winevulkan.wine_vkCreateRenderPass
@ stdcall vkCreateSampler(ptr ptr ptr ptr) winevulkan.wine_vkCreateSampler
+@ stub vkCreateSamplerYcbcrConversion
@ stdcall vkCreateSemaphore(ptr ptr ptr ptr) winevulkan.wine_vkCreateSemaphore
@ stdcall vkCreateShaderModule(ptr ptr ptr ptr) winevulkan.wine_vkCreateShaderModule
@ stub vkCreateSharedSwapchainsKHR
@@ -82,6 +88,7 @@
@ stdcall vkDestroyCommandPool(ptr int64 ptr) winevulkan.wine_vkDestroyCommandPool
@ stdcall vkDestroyDescriptorPool(ptr int64 ptr) winevulkan.wine_vkDestroyDescriptorPool
@ stdcall vkDestroyDescriptorSetLayout(ptr int64 ptr) winevulkan.wine_vkDestroyDescriptorSetLayout
+@ stub vkDestroyDescriptorUpdateTemplate
@ stdcall vkDestroyDevice(ptr ptr) winevulkan.wine_vkDestroyDevice
@ stdcall vkDestroyEvent(ptr int64 ptr) winevulkan.wine_vkDestroyEvent
@ stdcall vkDestroyFence(ptr int64 ptr) winevulkan.wine_vkDestroyFence
@@ -95,6 +102,7 @@
@ stdcall vkDestroyQueryPool(ptr int64 ptr) winevulkan.wine_vkDestroyQueryPool
@ stdcall vkDestroyRenderPass(ptr int64 ptr) winevulkan.wine_vkDestroyRenderPass
@ stdcall vkDestroySampler(ptr int64 ptr) winevulkan.wine_vkDestroySampler
+@ stub vkDestroySamplerYcbcrConversion
@ stdcall vkDestroySemaphore(ptr int64 ptr) winevulkan.wine_vkDestroySemaphore
@ stdcall vkDestroyShaderModule(ptr int64 ptr) winevulkan.wine_vkDestroyShaderModule
@ stdcall vkDestroySurfaceKHR(ptr int64 ptr) winevulkan.wine_vkDestroySurfaceKHR
@@ -105,33 +113,51 @@
@ stdcall vkEnumerateDeviceLayerProperties(ptr ptr ptr) winevulkan.wine_vkEnumerateDeviceLayerProperties
@ stdcall vkEnumerateInstanceExtensionProperties(str ptr ptr)
@ stdcall vkEnumerateInstanceLayerProperties(ptr ptr)
+@ stub vkEnumerateInstanceVersion
+@ stub vkEnumeratePhysicalDeviceGroups
@ stdcall vkEnumeratePhysicalDevices(ptr ptr ptr) winevulkan.wine_vkEnumeratePhysicalDevices
@ stdcall vkFlushMappedMemoryRanges(ptr long ptr) winevulkan.wine_vkFlushMappedMemoryRanges
@ stdcall vkFreeCommandBuffers(ptr int64 long ptr) winevulkan.wine_vkFreeCommandBuffers
@ stdcall vkFreeDescriptorSets(ptr int64 long ptr) winevulkan.wine_vkFreeDescriptorSets
@ stdcall vkFreeMemory(ptr int64 ptr) winevulkan.wine_vkFreeMemory
@ stdcall vkGetBufferMemoryRequirements(ptr int64 ptr) winevulkan.wine_vkGetBufferMemoryRequirements
+@ stub vkGetBufferMemoryRequirements2
+@ stub vkGetDescriptorSetLayoutSupport
+@ stub vkGetDeviceGroupPeerMemoryFeatures
@ stdcall vkGetDeviceMemoryCommitment(ptr int64 ptr) winevulkan.wine_vkGetDeviceMemoryCommitment
@ stdcall vkGetDeviceProcAddr(ptr str) winevulkan.wine_vkGetDeviceProcAddr
@ stdcall vkGetDeviceQueue(ptr long long ptr) winevulkan.wine_vkGetDeviceQueue
+@ stub vkGetDeviceQueue2
@ stub vkGetDisplayModePropertiesKHR
@ stub vkGetDisplayPlaneCapabilitiesKHR
@ stub vkGetDisplayPlaneSupportedDisplaysKHR
@ stdcall vkGetEventStatus(ptr int64) winevulkan.wine_vkGetEventStatus
@ stdcall vkGetFenceStatus(ptr int64) winevulkan.wine_vkGetFenceStatus
@ stdcall vkGetImageMemoryRequirements(ptr int64 ptr) winevulkan.wine_vkGetImageMemoryRequirements
+@ stub vkGetImageMemoryRequirements2
@ stdcall vkGetImageSparseMemoryRequirements(ptr int64 ptr ptr) winevulkan.wine_vkGetImageSparseMemoryRequirements
+@ stub vkGetImageSparseMemoryRequirements2
@ stdcall vkGetImageSubresourceLayout(ptr int64 ptr ptr) winevulkan.wine_vkGetImageSubresourceLayout
@ stdcall vkGetInstanceProcAddr(ptr str)
@ stub vkGetPhysicalDeviceDisplayPlanePropertiesKHR
@ stub vkGetPhysicalDeviceDisplayPropertiesKHR
+@ stub vkGetPhysicalDeviceExternalBufferProperties
+@ stub vkGetPhysicalDeviceExternalFenceProperties
+@ stub vkGetPhysicalDeviceExternalSemaphoreProperties
@ stdcall vkGetPhysicalDeviceFeatures(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceFeatures
+@ stub vkGetPhysicalDeviceFeatures2
@ stdcall vkGetPhysicalDeviceFormatProperties(ptr long ptr) winevulkan.wine_vkGetPhysicalDeviceFormatProperties
+@ stub vkGetPhysicalDeviceFormatProperties2
@ stdcall vkGetPhysicalDeviceImageFormatProperties(ptr long long long long long ptr) winevulkan.wine_vkGetPhysicalDeviceImageFormatProperties
+@ stub vkGetPhysicalDeviceImageFormatProperties2
@ stdcall vkGetPhysicalDeviceMemoryProperties(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceMemoryProperties
+@ stub vkGetPhysicalDeviceMemoryProperties2
@ stdcall vkGetPhysicalDeviceProperties(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceProperties
+@ stub vkGetPhysicalDeviceProperties2
@ stdcall vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr) winevulkan.wine_vkGetPhysicalDeviceQueueFamilyProperties
+@ stub vkGetPhysicalDeviceQueueFamilyProperties2
@ stdcall vkGetPhysicalDeviceSparseImageFormatProperties(ptr long long long long long ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSparseImageFormatProperties
+@ stub vkGetPhysicalDeviceSparseImageFormatProperties2
@ stdcall vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
@ stdcall vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceFormatsKHR
@ stdcall vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long) winevulkan.wine_vkGetPhysicalDeviceSurfacePresentModesKHR
@@ -154,6 +180,8 @@
@ stdcall vkResetEvent(ptr int64) winevulkan.wine_vkResetEvent
@ stdcall vkResetFences(ptr long ptr) winevulkan.wine_vkResetFences
@ stdcall vkSetEvent(ptr int64) winevulkan.wine_vkSetEvent
+@ stub vkTrimCommandPool
@ stdcall vkUnmapMemory(ptr int64) winevulkan.wine_vkUnmapMemory
+@ stub vkUpdateDescriptorSetWithTemplate
@ stdcall vkUpdateDescriptorSets(ptr long ptr long ptr) winevulkan.wine_vkUpdateDescriptorSets
@ stdcall vkWaitForFences(ptr long ptr long int64) winevulkan.wine_vkWaitForFences
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 8bd187674b1c..69ea807389e7 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -64,7 +64,7 @@ from enum import Enum
LOGGER = logging.Logger("vulkan")
LOGGER.addHandler(logging.StreamHandler())
-VK_XML_VERSION = "1.0.51"
+VK_XML_VERSION = "1.1.76"
# Filenames to create.
WINE_VULKAN_H = "../../include/wine/vulkan.h"
@@ -93,15 +93,18 @@ SUPPORTED_INSTANCE_EXTENSIONS = [
BLACKLISTED_EXTENSIONS = [
# Handling of VK_EXT_debug_report requires some consideration. The win32
- # loader already provides it for us and it is somewhat usable. . If we add
+ # loader already provides it for us and it is somewhat usable. If we add
# plumbing down to the native layer, we will get each message twice as we
# use 2 loaders (win32+native), but we may get output from the driver.
# In any case callback conversion is required.
"VK_EXT_debug_report",
"VK_EXT_display_control", # Requires VK_EXT_display_surface_counter
+ "VK_EXT_external_memory_dma_buf", # Linux specific
"VK_EXT_hdr_metadata", # Needs WSI work.
"VK_GOOGLE_display_timing",
+ "VK_KHR_device_group", # Needs some thought, but part of Vulkan 1.1 Core.
"VK_KHR_display", # Needs WSI work.
+ "VK_KHR_external_fence",
"VK_KHR_external_fence_fd",
"VK_KHR_external_fence_win32",
"VK_KHR_external_memory",
@@ -109,6 +112,7 @@ BLACKLISTED_EXTENSIONS = [
# Relates to external_semaphore and needs type conversions in bitflags.
"VK_KHR_external_semaphore_capabilities",
"VK_KHR_shared_presentable_image", # Needs WSI work.
+ "VK_KHR_win32_keyed_mutex",
"VK_NV_external_memory_win32"
]
@@ -184,7 +188,7 @@ class Direction(Enum):
class VkBaseType(object):
- def __init__(self, name, _type, requires=None):
+ def __init__(self, name, _type, alias=False, requires=None):
""" Vulkan base type class.
VkBaseType is mostly used by Vulkan to define its own
@@ -193,17 +197,23 @@ class VkBaseType(object):
Args:
name (:obj:'str'): Name of the base type.
_type (:obj:'str'): Underlaying type
+ alias (bool): type is an alias or not.
requires (:obj:'str', optional): Other types required.
Often bitmask values pull in a *FlagBits type.
"""
self.name = name
self.type = _type
+ self.alias = alias
self.requires = requires
self.required = False
def definition(self):
- text = "typedef {0} {1};\n".format(self.type, self.name)
- return text
+ # Definition is similar for alias or non-alias as type
+ # is already set to alias.
+ return "typedef {0} {1};\n".format(self.type, self.name)
+
+ def is_alias(self):
+ return self.alias
class VkConstant(object):
@@ -244,10 +254,13 @@ class VkDefine(object):
# <type category="define"><name>some_name</name>some_value</type>
name = name_elem.text
- # VK_API_VERSION is a deprecated constant and we don't really want to parse it or generate
- # code for it. However the vk.xml feature section still references it.
- if name == "VK_API_VERSION":
- return VkDefine(name, "")
+ # Perform minimal parsing for Vulkan constants, which we don't need, but are referenced
+ # elsewhere in vk.xml.
+ # - VK_API_VERSION is a messy, deprecated constant and we don't want generate code for it.
+ # - AHardwareBuffer/ANativeWindow are forard declarations for Android types, which leaked
+ # into the define region.
+ if name in ["VK_API_VERSION", "AHardwareBuffer", "ANativeWindow"]:
+ return VkDefine(name, None)
# The body of the define is basically unstructured C code. It is not meant for easy parsing.
# Some lines contain deprecated values or comments, which we try to filter out.
@@ -261,7 +274,11 @@ class VkDefine(object):
for child in define:
value += child.text
if child.tail is not None:
- value += child.tail
+ # Split comments for VK_API_VERSION_1_0 / VK_API_VERSION_1_1
+ if "//" in child.tail:
+ value += child.tail.split("//")[0]
+ else:
+ value += child.tail
return VkDefine(name, value.rstrip(' '))
@@ -274,10 +291,16 @@ class VkDefine(object):
class VkEnum(object):
- def __init__(self, name, values):
+ def __init__(self, name, values, alias=False):
self.name = name
self.values = values
self.required = False
+ self.alias = alias
+
+ @staticmethod
+ def from_alias(enum, alias):
+ name = enum.attrib.get("name")
+ return VkEnum(name, alias.values)
@staticmethod
def from_xml(enum):
@@ -309,6 +332,14 @@ class VkEnum(object):
def add(self, value):
""" Add a value to enum. """
+
+ # Extensions can add new enum values. When an extension is promoted to Core
+ # the registry defines the value twice once for old extension and once for
+ # new Core features. Ignore the duplicate entry.
+ for v in self.values:
+ if v.value == value.value:
+ LOGGER.debug("Adding duplicate enum value {0} to {1}".format(v, self.name))
+ return
self.values.append(value)
def definition(self):
@@ -321,6 +352,9 @@ class VkEnum(object):
text += "}} {0};\n\n".format(self.name)
return text
+ def is_alias(self):
+ return self.alias
+
class VkEnumValue(object):
def __init__(self, name, value, hex=False):
@@ -343,11 +377,12 @@ class VkEnumValue(object):
class VkFunction(object):
- def __init__(self, _type=None, name=None, params=[], extension=None):
+ def __init__(self, _type=None, name=None, params=[], extension=None, alias=False):
self.extension = extension
self.name = name
self.type = _type
self.params = params
+ self.alias = alias
# For some functions we need some extra metadata from FUNCTION_OVERRIDES.
func_info = FUNCTION_OVERRIDES.get(self.name, None)
@@ -359,10 +394,26 @@ class VkFunction(object):
# and is used by the code generation.
self.required = False
+ @staticmethod
+ def from_alias(command, alias):
+ """ Create VkFunction from an alias command.
+
+ Args:
+ command: xml data for command
+ alias (VkFunction): function to use as a base for types / parameters.
+
+ Returns:
+ VkFunction
+ """
+ func_name = command.attrib.get("name")
+ func_type = alias.type
+ params = alias.params
+
+ return VkFunction(_type=func_type, name=func_name, params=params, alias=True)
+
@staticmethod
def from_xml(command, types):
proto = command.find("proto")
-
func_name = proto.find("name").text
func_type = proto.find("type").text
@@ -388,6 +439,9 @@ class VkFunction(object):
return conversions
+ def is_alias(self):
+ return self.alias
+
def is_core_func(self):
""" Returns whether the function is a Vulkan core function.
Core functions are APIs defined by the Vulkan spec to be part of the
@@ -720,12 +774,18 @@ class VkFunctionPointer(object):
class VkHandle(object):
- def __init__(self, name, _type, parent):
+ def __init__(self, name, _type, parent, alias=None):
self.name = name
self.type = _type
self.parent = parent
+ self.alias = alias
self.required = False
+ @staticmethod
+ def from_alias(handle, alias):
+ name = handle.attrib.get("name")
+ return VkHandle(name, alias.type, alias.parent, alias=alias)
+
@staticmethod
def from_xml(handle):
name = handle.find("name").text
@@ -752,14 +812,25 @@ class VkHandle(object):
def definition(self):
""" Generates handle definition e.g. VK_DEFINE_HANDLE(vkInstance) """
+
+ # Legacy types are typedef'ed to the new type if they are aliases.
+ if self.is_alias():
+ return "typedef {0} {1};\n".format(self.alias.name, self.name)
+
return "{0}({1})\n".format(self.type, self.name)
+ def is_alias(self):
+ return self.alias is not None
+
def is_dispatchable(self):
""" Some handles like VkInstance, VkDevice are dispatchable objects,
which means they contain a dispatch table of function pointers.
"""
return self.type == "VK_DEFINE_HANDLE"
+ def is_required(self):
+ return self.required
+
def native_handle(self):
""" Provide access to the native handle of a dispatchable object.
@@ -1335,11 +1406,11 @@ class VkParam(object):
if not self.is_struct():
return False
- # VkSparseImageMemoryRequirements is used by vkGetImageSparseMemoryRequirements.
+ # VkSparseImageMemoryRequirements(2) is used by vkGetImageSparseMemoryRequirements(2).
# This function is tricky to wrap, because how to wrap depends on whether
- # pSparseMemoryRequirements is NULL or not. Luckily for VkSparseImageMemoryRequirements
+ # pSparseMemoryRequirements is NULL or not. Luckily for VkSparseImageMemoryRequirements(2)
# the alignment works out in such a way that no conversion is needed between win32 and Linux.
- if self.type == "VkSparseImageMemoryRequirements":
+ if self.type in ["VkSparseImageMemoryRequirements", "VkSparseImageMemoryRequirements2"]:
return False
# If a structure needs alignment changes, it means we need to
@@ -1409,11 +1480,12 @@ class VkParam(object):
class VkStruct(Sequence):
""" Class which represents the type union and struct. """
- def __init__(self, name, members, returnedonly, union=False):
+ def __init__(self, name, members, returnedonly, alias=False, union=False):
self.name = name
self.members = members
self.returnedonly = returnedonly
self.required = False
+ self.alias = alias
self.union = union
self.type_info = None # To be set later.
@@ -1423,6 +1495,11 @@ class VkStruct(Sequence):
def __len__(self):
return len(self.members)
+ @staticmethod
+ def from_alias(struct, alias):
+ name = struct.attrib.get("name")
+ return VkStruct(name, alias.members, alias.returnedonly, alias=True)
+
@staticmethod
def from_xml(struct):
# Unions and structs are the same parsing wise, but we need to
@@ -1466,6 +1543,10 @@ class VkStruct(Sequence):
if not (m.is_struct() or m.is_union()):
continue
+ # VkBaseInstructure and VkBaseOutStructure reference themselves.
+ if m.type == struct.name:
+ break
+
found = False
# Check if a struct we depend on has already been defined.
for s in decoupled_structs:
@@ -1523,6 +1604,9 @@ class VkStruct(Sequence):
text += "}} {0};\n\n".format(self.name)
return text
+ def is_alias(self):
+ return self.alias
+
def needs_alignment(self):
""" Check if structure needs alignment for 64-bit data.
Various structures need alignment on 64-bit variables due
@@ -2063,7 +2147,10 @@ class VkGenerator(object):
f.write(define.definition())
for handle in self.registry.handles:
- if handle.required:
+ # For backwards compatiblity also create definitions for aliases.
+ # These types normally don't get pulled in as we use the new types
+ # even in legacy functions if they are aliases.
+ if handle.is_required() or handle.is_alias():
f.write(handle.definition())
f.write("\n")
@@ -2273,10 +2360,29 @@ class VkRegistry(object):
""" Parse command section containing the Vulkan function calls. """
funcs = {}
commands = root.findall("./commands/")
+
+ # As of Vulkan 1.1, various extensions got promoted to Core.
+ # The old commands (e.g. KHR) are available for backwards compatibility
+ # and are marked in vk.xml as 'alias' to the non-extension type.
+ # The registry likes to avoid data duplication, so parameters and other
+ # metadata need to be looked up from the Core command.
+ # We parse the alias commands in a second pass.
+ alias_commands = []
for command in commands:
+ alias_name = command.attrib.get("alias")
+ if alias_name:
+ alias_commands.append(command)
+ continue
+
func = VkFunction.from_xml(command, self.types)
funcs[func.name] = func
+ for command in alias_commands:
+ alias_name = command.attrib.get("alias")
+ alias = funcs[alias_name]
+ func = VkFunction.from_alias(command, alias)
+ funcs[func.name] = func
+
# To make life easy for the code generation, separate all function
# calls out in the 3 types of Vulkan functions: device, global and instance.
device_funcs = []
@@ -2311,9 +2417,14 @@ class VkRegistry(object):
enums[name] = VkEnum.from_xml(enum)
else:
# If no type is set, we are dealing with API constants.
- values = []
for value in enum.findall("enum"):
- self.consts.append(VkConstant(value.attrib.get("name"), value.attrib.get("value")))
+ # If enum is an alias, set the value to the alias name.
+ # E.g. VK_LUID_SIZE_KHR is an alias to VK_LUID_SIZE.
+ alias = value.attrib.get("alias")
+ if alias:
+ self.consts.append(VkConstant(value.attrib.get("name"), alias))
+ else:
+ self.consts.append(VkConstant(value.attrib.get("name"), value.attrib.get("value")))
self.enums = OrderedDict(sorted(enums.items()))
@@ -2367,6 +2478,10 @@ class VkRegistry(object):
# different features (e.g. Vulkan 1.1). Parse each require section
# separately, so we can skip sections we don't want.
for require in ext.findall("require"):
+ feature = require.attrib.get("feature")
+ if feature == "VK_VERSION_1_1":
+ continue
+
# Extensions can add enum values to Core / extension enums, so add these.
for enum_elem in require.findall("enum"):
if "bitpos" in enum_elem.keys():
@@ -2416,7 +2531,10 @@ class VkRegistry(object):
def _parse_features(self, root):
""" Parse the feature section, which describes Core commands and types needed. """
- requires = root.findall("./feature/require")
+
+ # For now limit to 1.0 features as various 1.1 features need more work.
+ # In particular interop extensions promoted to Core.
+ requires = root.findall("./feature/[@name='VK_VERSION_1_0']/require")
for require in requires:
LOGGER.info("Including features for {0}".format(require.attrib.get("comment")))
@@ -2424,8 +2542,10 @@ class VkRegistry(object):
# Only deal with command. Other values which appear are enum and type for pulling in some
# constants and macros. Tricky to parse, so don't bother right now, we will generate them
# anyway for now.
- name = tag.attrib["name"]
- if tag.tag == "command":
+ if tag.tag == "comment":
+ continue
+ elif tag.tag == "command":
+ name = tag.attrib["name"]
self._mark_command_required(name)
elif tag.tag == "enum":
# We could pull in relevant constants here. Unfortunately
@@ -2435,6 +2555,7 @@ class VkRegistry(object):
pass
elif tag.tag == "type":
# Pull in types which may not have been pulled in through commands.
+ name = tag.attrib["name"]
# Skip pull in for vk_platform.h for now.
if name == "vk_platform":
@@ -2454,10 +2575,18 @@ class VkRegistry(object):
handles = []
structs = []
+ alias_types = []
for t in types:
type_info = {}
type_info["category"] = t.attrib.get("category", None)
+ # We parse aliases in a second pass when we know more.
+ alias = t.attrib.get("alias")
+ if alias:
+ LOGGER.debug("Alias found: {0}".format(alias))
+ alias_types.append(t)
+ continue
+
if type_info["category"] in ["include"]:
continue
@@ -2480,7 +2609,6 @@ class VkRegistry(object):
type_info["data"] = bitmask
if type_info["category"] == "define":
- name = t.attrib.get("name")
define = VkDefine.from_xml(t)
defines.append(define)
type_info["data"] = define
@@ -2529,6 +2657,37 @@ class VkRegistry(object):
# names.
self.types[type_info["name"]] = type_info
+ # Second pass for alias types, so we can retrieve all data from
+ # the aliased object.
+ for t in alias_types:
+ type_info = {}
+ type_info["category"] = t.attrib.get("category")
+ type_info["name"] = t.attrib.get("name")
+
+ alias = t.attrib.get("alias")
+
+ if type_info["category"] == "bitmask":
+ bitmask = VkBaseType(type_info["name"], alias, alias=True)
+ bitmasks.append(bitmask)
+ type_info["data"] = bitmask
+
+ if type_info["category"] == "enum":
+ enum = VkEnum.from_alias(t, self.types[alias]["data"])
+ type_info["data"] = enum
+ self.enums[enum.name] = enum
+
+ if type_info["category"] == "handle":
+ handle = VkHandle.from_alias(t, self.types[alias]["data"])
+ handles.append(handle)
+ type_info["data"] = handle
+
+ if type_info["category"] == "struct":
+ struct = VkStruct.from_alias(t, self.types[alias]["data"])
+ structs.append(struct)
+ type_info["data"] = struct
+
+ self.types[type_info["name"]] = type_info
+
# We need detailed type information during code generation
# on structs for alignment reasons. Unfortunately structs
# are parsed among other types, so there is no guarantee
@@ -2542,12 +2701,13 @@ class VkRegistry(object):
self.base_types = sorted(base_types, key=lambda base_type: base_type.name)
self.bitmasks = sorted(bitmasks, key=lambda bitmask: bitmask.name)
self.defines = defines
+ self.enums = OrderedDict(sorted(self.enums.items()))
self.funcpointers = sorted(funcpointers, key=lambda fp: fp.name)
self.handles = sorted(handles, key=lambda handle: handle.name)
self.structs = sorted(structs, key=lambda struct: struct.name)
def download_vk_xml(filename):
- url = "https://raw.github.com/KhronosGroup/Vulkan-Docs/v{0}-core/src/spec/vk.xml".format(VK_XML_VERSION)
+ url = "https://raw.github.com/KhronosGroup/Vulkan-Docs/v{0}/xml/vk.xml".format(VK_XML_VERSION)
if not os.path.isfile(filename):
urllib.request.urlretrieve(url, filename)
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c
index 31f78dcb3ae3..cdb229d7df32 100644
--- a/dlls/winevulkan/vulkan_thunks.c
+++ b/dlls/winevulkan/vulkan_thunks.c
@@ -74,6 +74,60 @@ static inline void free_VkCommandBufferBeginInfo(VkCommandBufferBeginInfo_host *
free_VkCommandBufferInheritanceInfo_array((VkCommandBufferInheritanceInfo_host *)in->pInheritanceInfo, 1);
}
+static inline VkBindBufferMemoryInfo_host *convert_VkBindBufferMemoryInfo_array_win_to_host(const VkBindBufferMemoryInfo *in, uint32_t count)
+{
+ VkBindBufferMemoryInfo_host *out;
+ unsigned int i;
+
+ if (!in) return NULL;
+
+ out = heap_alloc(count * sizeof(*out));
+ for (i = 0; i < count; i++)
+ {
+ out[i].sType = in[i].sType;
+ out[i].pNext = in[i].pNext;
+ out[i].buffer = in[i].buffer;
+ out[i].memory = in[i].memory;
+ out[i].memoryOffset = in[i].memoryOffset;
+ }
+
+ return out;
+}
+
+static inline void free_VkBindBufferMemoryInfo_array(VkBindBufferMemoryInfo_host *in, uint32_t count)
+{
+ if (!in) return;
+
+ heap_free(in);
+}
+
+static inline VkBindImageMemoryInfo_host *convert_VkBindImageMemoryInfo_array_win_to_host(const VkBindImageMemoryInfo *in, uint32_t count)
+{
+ VkBindImageMemoryInfo_host *out;
+ unsigned int i;
+
+ if (!in) return NULL;
+
+ out = heap_alloc(count * sizeof(*out));
+ for (i = 0; i < count; i++)
+ {
+ out[i].sType = in[i].sType;
+ out[i].pNext = in[i].pNext;
+ out[i].image = in[i].image;
+ out[i].memory = in[i].memory;
+ out[i].memoryOffset = in[i].memoryOffset;
+ }
+
+ return out;
+}
+
+static inline void free_VkBindImageMemoryInfo_array(VkBindImageMemoryInfo_host *in, uint32_t count)
+{
+ if (!in) return;
+
+ heap_free(in);
+}
+
static inline void convert_VkRenderPassBeginInfo_win_to_host(const VkRenderPassBeginInfo *in, VkRenderPassBeginInfo_host *out)
{
if (!in) return;
@@ -361,7 +415,7 @@ static inline void free_VkComputePipelineCreateInfo_array(VkComputePipelineCreat
heap_free(in);
}
-static inline void convert_VkDescriptorUpdateTemplateCreateInfoKHR_win_to_host(const VkDescriptorUpdateTemplateCreateInfoKHR *in, VkDescriptorUpdateTemplateCreateInfoKHR_host *out)
+static inline void convert_VkDescriptorUpdateTemplateCreateInfo_win_to_host(const VkDescriptorUpdateTemplateCreateInfo *in, VkDescriptorUpdateTemplateCreateInfo_host *out)
{
if (!in) return;
@@ -542,6 +596,50 @@ static inline void convert_VkMemoryRequirements_host_to_win(const VkMemoryRequir
out->memoryTypeBits = in->memoryTypeBits;
}
+static inline void convert_VkBufferMemoryRequirementsInfo2_win_to_host(const VkBufferMemoryRequirementsInfo2 *in, VkBufferMemoryRequirementsInfo2_host *out)
+{
+ if (!in) return;
+
+ out->sType = in->sType;
+ out->pNext = in->pNext;
+ out->buffer = in->buffer;
+}
+
+static inline void convert_VkMemoryRequirements2_win_to_host(const VkMemoryRequirements2 *in, VkMemoryRequirements2_host *out)
+{
+ if (!in) return;
+
+ out->pNext = in->pNext;
+ out->sType = in->sType;
+}
+
+static inline void convert_VkMemoryRequirements2_host_to_win(const VkMemoryRequirements2_host *in, VkMemoryRequirements2 *out)
+{
+ if (!in) return;
+
+ out->sType = in->sType;
+ out->pNext = in->pNext;
+ convert_VkMemoryRequirements_host_to_win(&in->memoryRequirements, &out->memoryRequirements);
+}
+
+static inline void convert_VkImageMemoryRequirementsInfo2_win_to_host(const VkImageMemoryRequirementsInfo2 *in, VkImageMemoryRequirementsInfo2_host *out)
+{
+ if (!in) return;
+
+ out->sType = in->sType;
+ out->pNext = in->pNext;
+ out->image = in->image;
+}
+
+static inline void convert_VkImageSparseMemoryRequirementsInfo2_win_to_host(const VkImageSparseMemoryRequirementsInfo2 *in, VkImageSparseMemoryRequirementsInfo2_host *out)
+{
+ if (!in) return;
+
+ out->sType = in->sType;
+ out->pNext = in->pNext;
+ out->image = in->image;
+}
+
static inline void convert_VkSubresourceLayout_host_to_win(const VkSubresourceLayout_host *in, VkSubresourceLayout *out)
{
if (!in) return;
@@ -564,7 +662,7 @@ static inline void convert_VkImageFormatProperties_host_to_win(const VkImageForm
out->maxResourceSize = in->maxResourceSize;
}
-static inline void convert_VkImageFormatProperties2KHR_win_to_host(const VkImageFormatProperties2KHR *in, VkImageFormatProperties2KHR_host *out)
+static inline void convert_VkImageFormatProperties2_win_to_host(const VkImageFormatProperties2 *in, VkImageFormatProperties2_host *out)
{
if (!in) return;
@@ -572,7 +670,7 @@ static inline void convert_VkImageFormatProperties2KHR_win_to_host(const VkImage
out->sType = in->sType;
}
-static inline void convert_VkImageFormatProperties2KHR_host_to_win(const VkImageFormatProperties2KHR_host *in, VkImageFormatProperties2KHR *out)
+static inline void convert_VkImageFormatProperties2_host_to_win(const VkImageFormatProperties2_host *in, VkImageFormatProperties2 *out)
{
if (!in) return;
@@ -604,7 +702,7 @@ static inline void convert_VkPhysicalDeviceMemoryProperties_host_to_win(const Vk
convert_VkMemoryHeap_static_array_host_to_win(in->memoryHeaps, out->memoryHeaps, VK_MAX_MEMORY_HEAPS);
}
-static inline void convert_VkPhysicalDeviceMemoryProperties2KHR_win_to_host(const VkPhysicalDeviceMemoryProperties2KHR *in, VkPhysicalDeviceMemoryProperties2KHR_host *out)
+static inline void convert_VkPhysicalDeviceMemoryProperties2_win_to_host(const VkPhysicalDeviceMemoryProperties2 *in, VkPhysicalDeviceMemoryProperties2_host *out)
{
if (!in) return;
@@ -612,7 +710,7 @@ static inline void convert_VkPhysicalDeviceMemoryProperties2KHR_win_to_host(cons
out->sType = in->sType;
}
-static inline void convert_VkPhysicalDeviceMemoryProperties2KHR_host_to_win(const VkPhysicalDeviceMemoryProperties2KHR_host *in, VkPhysicalDeviceMemoryProperties2KHR *out)
+static inline void convert_VkPhysicalDeviceMemoryProperties2_host_to_win(const VkPhysicalDeviceMemoryProperties2_host *in, VkPhysicalDeviceMemoryProperties2 *out)
{
if (!in) return;
@@ -748,7 +846,7 @@ static inline void convert_VkPhysicalDeviceProperties_host_to_win(const VkPhysic
out->sparseProperties = in->sparseProperties;
}
-static inline void convert_VkPhysicalDeviceProperties2KHR_win_to_host(const VkPhysicalDeviceProperties2KHR *in, VkPhysicalDeviceProperties2KHR_host *out)
+static inline void convert_VkPhysicalDeviceProperties2_win_to_host(const VkPhysicalDeviceProperties2 *in, VkPhysicalDeviceProperties2_host *out)
{
if (!in) return;
@@ -756,7 +854,7 @@ static inline void convert_VkPhysicalDeviceProperties2KHR_win_to_host(const VkPh
out->sType = in->sType;
}
-static inline void convert_VkPhysicalDeviceProperties2KHR_host_to_win(const VkPhysicalDeviceProperties2KHR_host *in, VkPhysicalDeviceProperties2KHR *out)
+static inline void convert_VkPhysicalDeviceProperties2_host_to_win(const VkPhysicalDeviceProperties2_host *in, VkPhysicalDeviceProperties2 *out)
{
if (!in) return;
@@ -1052,12 +1150,48 @@ VkResult WINAPI wine_vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDevi
return device->funcs.p_vkBindBufferMemory(device->device, buffer, memory, memoryOffset);
}
+static VkResult WINAPI wine_vkBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo *pBindInfos)
+{
+#if defined(USE_STRUCT_CONVERSION)
+ VkResult result;
+ VkBindBufferMemoryInfo_host *pBindInfos_host;
+ TRACE("%p, %u, %p\n", device, bindInfoCount, pBindInfos);
+
+ pBindInfos_host = convert_VkBindBufferMemoryInfo_array_win_to_host(pBindInfos, bindInfoCount);
+ result = device->funcs.p_vkBindBufferMemory2KHR(device->device, bindInfoCount, pBindInfos_host);
+
+ free_VkBindBufferMemoryInfo_array(pBindInfos_host, bindInfoCount);
+ return result;
+#else
+ TRACE("%p, %u, %p\n", device, bindInfoCount, pBindInfos);
+ return device->funcs.p_vkBindBufferMemory2KHR(device->device, bindInfoCount, pBindInfos);
+#endif
+}
+
VkResult WINAPI wine_vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
{
TRACE("%p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(image), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
return device->funcs.p_vkBindImageMemory(device->device, image, memory, memoryOffset);
}
+static VkResult WINAPI wine_vkBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo *pBindInfos)
+{
+#if defined(USE_STRUCT_CONVERSION)
+ VkResult result;
+ VkBindImageMemoryInfo_host *pBindInfos_host;
+ TRACE("%p, %u, %p\n", device, bindInfoCount, pBindInfos);
+
+ pBindInfos_host = convert_VkBindImageMemoryInfo_array_win_to_host(pBindInfos, bindInfoCount);
+ result = device->funcs.p_vkBindImageMemory2KHR(device->device, bindInfoCount, pBindInfos_host);
+
+ free_VkBindImageMemoryInfo_array(pBindInfos_host, bindInfoCount);
+ return result;
+#else
+ TRACE("%p, %u, %p\n", device, bindInfoCount, pBindInfos);
+ return device->funcs.p_vkBindImageMemory2KHR(device->device, bindInfoCount, pBindInfos);
+#endif
+}
+
void WINAPI wine_vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags)
{
TRACE("%p, 0x%s, %u, %#x\n", commandBuffer, wine_dbgstr_longlong(queryPool), query, flags);
@@ -1223,6 +1357,12 @@ static void WINAPI wine_vkCmdDrawIndexedIndirectCountAMD(VkCommandBuffer command
commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirectCountAMD(commandBuffer->command_buffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
}
+static void WINAPI wine_vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride)
+{
+ TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(countBuffer), wine_dbgstr_longlong(countBufferOffset), maxDrawCount, stride);
+ commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirectCountKHR(commandBuffer->command_buffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+}
+
void WINAPI wine_vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
{
TRACE("%p, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), drawCount, stride);
@@ -1235,6 +1375,12 @@ static void WINAPI wine_vkCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer,
commandBuffer->device->funcs.p_vkCmdDrawIndirectCountAMD(commandBuffer->command_buffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
}
+static void WINAPI wine_vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride)
+{
+ TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(countBuffer), wine_dbgstr_longlong(countBufferOffset), maxDrawCount, stride);
+ commandBuffer->device->funcs.p_vkCmdDrawIndirectCountKHR(commandBuffer->command_buffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
+}
+
void WINAPI wine_vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query)
{
TRACE("%p, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(queryPool), query);
@@ -1300,7 +1446,7 @@ static void WINAPI wine_vkCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer,
#endif
}
-static void WINAPI wine_vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData)
+static void WINAPI wine_vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData)
{
TRACE("%p, 0x%s, 0x%s, %u, %p\n", commandBuffer, wine_dbgstr_longlong(descriptorUpdateTemplate), wine_dbgstr_longlong(layout), set, pData);
commandBuffer->device->funcs.p_vkCmdPushDescriptorSetWithTemplateKHR(commandBuffer->command_buffer, descriptorUpdateTemplate, layout, set, pData);
@@ -1360,6 +1506,12 @@ void WINAPI wine_vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidt
commandBuffer->device->funcs.p_vkCmdSetLineWidth(commandBuffer->command_buffer, lineWidth);
}
+static void WINAPI wine_vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT *pSampleLocationsInfo)
+{
+ TRACE("%p, %p\n", commandBuffer, pSampleLocationsInfo);
+ commandBuffer->device->funcs.p_vkCmdSetSampleLocationsEXT(commandBuffer->command_buffer, pSampleLocationsInfo);
+}
+
void WINAPI wine_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors)
{
TRACE("%p, %u, %u, %p\n", commandBuffer, firstScissor, scissorCount, pScissors);
@@ -1421,6 +1573,12 @@ void WINAPI wine_vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCo
#endif
}
+static void WINAPI wine_vkCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker)
+{
+ TRACE("%p, %#x, 0x%s, 0x%s, %u\n", commandBuffer, pipelineStage, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), marker);
+ commandBuffer->device->funcs.p_vkCmdWriteBufferMarkerAMD(commandBuffer->command_buffer, pipelineStage, dstBuffer, dstOffset, marker);
+}
+
void WINAPI wine_vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query)
{
TRACE("%p, %#x, 0x%s, %u\n", commandBuffer, pipelineStage, wine_dbgstr_longlong(queryPool), query);
@@ -1497,14 +1655,14 @@ VkResult WINAPI wine_vkCreateDescriptorSetLayout(VkDevice device, const VkDescri
return device->funcs.p_vkCreateDescriptorSetLayout(device->device, pCreateInfo, NULL, pSetLayout);
}
-static VkResult WINAPI wine_vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate)
+static VkResult WINAPI wine_vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate)
{
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
- VkDescriptorUpdateTemplateCreateInfoKHR_host pCreateInfo_host;
+ VkDescriptorUpdateTemplateCreateInfo_host pCreateInfo_host;
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate);
- convert_VkDescriptorUpdateTemplateCreateInfoKHR_win_to_host(pCreateInfo, &pCreateInfo_host);
+ convert_VkDescriptorUpdateTemplateCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
result = device->funcs.p_vkCreateDescriptorUpdateTemplateKHR(device->device, &pCreateInfo_host, NULL, pDescriptorUpdateTemplate);
return result;
@@ -1614,6 +1772,12 @@ VkResult WINAPI wine_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo
return device->funcs.p_vkCreateSampler(device->device, pCreateInfo, NULL, pSampler);
}
+static VkResult WINAPI wine_vkCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSamplerYcbcrConversion *pYcbcrConversion)
+{
+ TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pYcbcrConversion);
+ return device->funcs.p_vkCreateSamplerYcbcrConversionKHR(device->device, pCreateInfo, NULL, pYcbcrConversion);
+}
+
VkResult WINAPI wine_vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
{
TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSemaphore);
@@ -1643,6 +1807,12 @@ VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCrea
#endif
}
+static VkResult WINAPI wine_vkCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkValidationCacheEXT *pValidationCache)
+{
+ TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pValidationCache);
+ return device->funcs.p_vkCreateValidationCacheEXT(device->device, pCreateInfo, NULL, pValidationCache);
+}
+
VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface)
{
TRACE("%p, %p, %p, %p\n", instance, pCreateInfo, pAllocator, pSurface);
@@ -1679,7 +1849,7 @@ void WINAPI wine_vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLa
device->funcs.p_vkDestroyDescriptorSetLayout(device->device, descriptorSetLayout, NULL);
}
-static void WINAPI wine_vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator)
+static void WINAPI wine_vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorUpdateTemplate), pAllocator);
device->funcs.p_vkDestroyDescriptorUpdateTemplateKHR(device->device, descriptorUpdateTemplate, NULL);
@@ -1751,6 +1921,12 @@ void WINAPI wine_vkDestroySampler(VkDevice device, VkSampler sampler, const VkAl
device->funcs.p_vkDestroySampler(device->device, sampler, NULL);
}
+static void WINAPI wine_vkDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks *pAllocator)
+{
+ TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(ycbcrConversion), pAllocator);
+ device->funcs.p_vkDestroySamplerYcbcrConversionKHR(device->device, ycbcrConversion, NULL);
+}
+
void WINAPI wine_vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(semaphore), pAllocator);
@@ -1775,6 +1951,12 @@ void WINAPI wine_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain
device->funcs.p_vkDestroySwapchainKHR(device->device, swapchain, NULL);
}
+static void WINAPI wine_vkDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks *pAllocator)
+{
+ TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(validationCache), pAllocator);
+ device->funcs.p_vkDestroyValidationCacheEXT(device->device, validationCache, NULL);
+}
+
VkResult WINAPI wine_vkDeviceWaitIdle(VkDevice device)
{
TRACE("%p\n", device);
@@ -1838,6 +2020,30 @@ void WINAPI wine_vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer,
#endif
}
+static void WINAPI wine_vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements)
+{
+#if defined(USE_STRUCT_CONVERSION)
+ VkBufferMemoryRequirementsInfo2_host pInfo_host;
+ VkMemoryRequirements2_host pMemoryRequirements_host;
+ TRACE("%p, %p, %p\n", device, pInfo, pMemoryRequirements);
+
+ convert_VkBufferMemoryRequirementsInfo2_win_to_host(pInfo, &pInfo_host);
+ convert_VkMemoryRequirements2_win_to_host(pMemoryRequirements, &pMemoryRequirements_host);
+ device->funcs.p_vkGetBufferMemoryRequirements2KHR(device->device, &pInfo_host, &pMemoryRequirements_host);
+
+ convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, pMemoryRequirements);
+#else
+ TRACE("%p, %p, %p\n", device, pInfo, pMemoryRequirements);
+ device->funcs.p_vkGetBufferMemoryRequirements2KHR(device->device, pInfo, pMemoryRequirements);
+#endif
+}
+
+static void WINAPI wine_vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport)
+{
+ TRACE("%p, %p, %p\n", device, pCreateInfo, pSupport);
+ device->funcs.p_vkGetDescriptorSetLayoutSupportKHR(device->device, pCreateInfo, pSupport);
+}
+
void WINAPI wine_vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes);
@@ -1871,12 +2077,45 @@ void WINAPI wine_vkGetImageMemoryRequirements(VkDevice device, VkImage image, Vk
#endif
}
+static void WINAPI wine_vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements)
+{
+#if defined(USE_STRUCT_CONVERSION)
+ VkImageMemoryRequirementsInfo2_host pInfo_host;
+ VkMemoryRequirements2_host pMemoryRequirements_host;
+ TRACE("%p, %p, %p\n", device, pInfo, pMemoryRequirements);
+
+ convert_VkImageMemoryRequirementsInfo2_win_to_host(pInfo, &pInfo_host);
+ convert_VkMemoryRequirements2_win_to_host(pMemoryRequirements, &pMemoryRequirements_host);
+ device->funcs.p_vkGetImageMemoryRequirements2KHR(device->device, &pInfo_host, &pMemoryRequirements_host);
+
+ convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, pMemoryRequirements);
+#else
+ TRACE("%p, %p, %p\n", device, pInfo, pMemoryRequirements);
+ device->funcs.p_vkGetImageMemoryRequirements2KHR(device->device, pInfo, pMemoryRequirements);
+#endif
+}
+
void WINAPI wine_vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
{
TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSparseMemoryRequirementCount, pSparseMemoryRequirements);
device->funcs.p_vkGetImageSparseMemoryRequirements(device->device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
}
+static void WINAPI wine_vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2 *pInfo, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements)
+{
+#if defined(USE_STRUCT_CONVERSION)
+ VkImageSparseMemoryRequirementsInfo2_host pInfo_host;
+ TRACE("%p, %p, %p, %p\n", device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+
+ convert_VkImageSparseMemoryRequirementsInfo2_win_to_host(pInfo, &pInfo_host);
+ device->funcs.p_vkGetImageSparseMemoryRequirements2KHR(device->device, &pInfo_host, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+
+#else
+ TRACE("%p, %p, %p, %p\n", device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+ device->funcs.p_vkGetImageSparseMemoryRequirements2KHR(device->device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
+#endif
+}
+
void WINAPI wine_vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout)
{
#if defined(USE_STRUCT_CONVERSION)
@@ -1898,7 +2137,7 @@ void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, Vk
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFeatures(physicalDevice->phys_dev, pFeatures);
}
-static void WINAPI wine_vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures)
+static void WINAPI wine_vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 *pFeatures)
{
TRACE("%p, %p\n", physicalDevice, pFeatures);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(physicalDevice->phys_dev, pFeatures);
@@ -1910,7 +2149,7 @@ void WINAPI wine_vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDe
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(physicalDevice->phys_dev, format, pFormatProperties);
}
-static void WINAPI wine_vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR *pFormatProperties)
+static void WINAPI wine_vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2 *pFormatProperties)
{
TRACE("%p, %#x, %p\n", physicalDevice, format, pFormatProperties);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(physicalDevice->phys_dev, format, pFormatProperties);
@@ -1933,17 +2172,17 @@ VkResult WINAPI wine_vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice p
#endif
}
-static VkResult WINAPI wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR *pImageFormatInfo, VkImageFormatProperties2KHR *pImageFormatProperties)
+static VkResult WINAPI wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties)
{
#if defined(USE_STRUCT_CONVERSION)
VkResult result;
- VkImageFormatProperties2KHR_host pImageFormatProperties_host;
+ VkImageFormatProperties2_host pImageFormatProperties_host;
TRACE("%p, %p, %p\n", physicalDevice, pImageFormatInfo, pImageFormatProperties);
- convert_VkImageFormatProperties2KHR_win_to_host(pImageFormatProperties, &pImageFormatProperties_host);
+ convert_VkImageFormatProperties2_win_to_host(pImageFormatProperties, &pImageFormatProperties_host);
result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice->phys_dev, pImageFormatInfo, &pImageFormatProperties_host);
- convert_VkImageFormatProperties2KHR_host_to_win(&pImageFormatProperties_host, pImageFormatProperties);
+ convert_VkImageFormatProperties2_host_to_win(&pImageFormatProperties_host, pImageFormatProperties);
return result;
#else
TRACE("%p, %p, %p\n", physicalDevice, pImageFormatInfo, pImageFormatProperties);
@@ -1966,22 +2205,28 @@ void WINAPI wine_vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDe
#endif
}
-static void WINAPI wine_vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties)
+static void WINAPI wine_vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 *pMemoryProperties)
{
#if defined(USE_STRUCT_CONVERSION)
- VkPhysicalDeviceMemoryProperties2KHR_host pMemoryProperties_host;
+ VkPhysicalDeviceMemoryProperties2_host pMemoryProperties_host;
TRACE("%p, %p\n", physicalDevice, pMemoryProperties);
- convert_VkPhysicalDeviceMemoryProperties2KHR_win_to_host(pMemoryProperties, &pMemoryProperties_host);
+ convert_VkPhysicalDeviceMemoryProperties2_win_to_host(pMemoryProperties, &pMemoryProperties_host);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(physicalDevice->phys_dev, &pMemoryProperties_host);
- convert_VkPhysicalDeviceMemoryProperties2KHR_host_to_win(&pMemoryProperties_host, pMemoryProperties);
+ convert_VkPhysicalDeviceMemoryProperties2_host_to_win(&pMemoryProperties_host, pMemoryProperties);
#else
TRACE("%p, %p\n", physicalDevice, pMemoryProperties);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(physicalDevice->phys_dev, pMemoryProperties);
#endif
}
+static void WINAPI wine_vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT *pMultisampleProperties)
+{
+ TRACE("%p, %#x, %p\n", physicalDevice, samples, pMultisampleProperties);
+ physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice->phys_dev, samples, pMultisampleProperties);
+}
+
void WINAPI wine_vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties)
{
#if defined(USE_STRUCT_CONVERSION)
@@ -1997,16 +2242,16 @@ void WINAPI wine_vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
#endif
}
-static void WINAPI wine_vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR *pProperties)
+static void WINAPI wine_vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties)
{
#if defined(USE_STRUCT_CONVERSION)
- VkPhysicalDeviceProperties2KHR_host pProperties_host;
+ VkPhysicalDeviceProperties2_host pProperties_host;
TRACE("%p, %p\n", physicalDevice, pProperties);
- convert_VkPhysicalDeviceProperties2KHR_win_to_host(pProperties, &pProperties_host);
+ convert_VkPhysicalDeviceProperties2_win_to_host(pProperties, &pProperties_host);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(physicalDevice->phys_dev, &pProperties_host);
- convert_VkPhysicalDeviceProperties2KHR_host_to_win(&pProperties_host, pProperties);
+ convert_VkPhysicalDeviceProperties2_host_to_win(&pProperties_host, pProperties);
#else
TRACE("%p, %p\n", physicalDevice, pProperties);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(physicalDevice->phys_dev, pProperties);
@@ -2019,7 +2264,7 @@ void WINAPI wine_vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physi
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice->phys_dev, pQueueFamilyPropertyCount, pQueueFamilyProperties);
}
-static void WINAPI wine_vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR *pQueueFamilyProperties)
+static void WINAPI wine_vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *pQueueFamilyProperties)
{
TRACE("%p, %p, %p\n", physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice->phys_dev, pQueueFamilyPropertyCount, pQueueFamilyProperties);
@@ -2031,7 +2276,7 @@ void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice->phys_dev, format, type, samples, usage, tiling, pPropertyCount, pProperties);
}
-static void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties)
+static void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2 *pProperties)
{
TRACE("%p, %p, %p, %p\n", physicalDevice, pFormatInfo, pPropertyCount, pProperties);
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice->phys_dev, pFormatInfo, pPropertyCount, pProperties);
@@ -2085,12 +2330,24 @@ void WINAPI wine_vkGetRenderAreaGranularity(VkDevice device, VkRenderPass render
device->funcs.p_vkGetRenderAreaGranularity(device->device, renderPass, pGranularity);
}
+static VkResult WINAPI wine_vkGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t *pInfoSize, void *pInfo)
+{
+ TRACE("%p, 0x%s, %#x, %#x, %p, %p\n", device, wine_dbgstr_longlong(pipeline), shaderStage, infoType, pInfoSize, pInfo);
+ return device->funcs.p_vkGetShaderInfoAMD(device->device, pipeline, shaderStage, infoType, pInfoSize, pInfo);
+}
+
VkResult WINAPI wine_vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages)
{
TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(swapchain), pSwapchainImageCount, pSwapchainImages);
return device->funcs.p_vkGetSwapchainImagesKHR(device->device, swapchain, pSwapchainImageCount, pSwapchainImages);
}
+static VkResult WINAPI wine_vkGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t *pDataSize, void *pData)
+{
+ TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(validationCache), pDataSize, pData);
+ return device->funcs.p_vkGetValidationCacheDataEXT(device->device, validationCache, pDataSize, pData);
+}
+
VkResult WINAPI wine_vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
{
#if defined(USE_STRUCT_CONVERSION)
@@ -2121,6 +2378,12 @@ VkResult WINAPI wine_vkMergePipelineCaches(VkDevice device, VkPipelineCache dstC
return device->funcs.p_vkMergePipelineCaches(device->device, dstCache, srcCacheCount, pSrcCaches);
}
+static VkResult WINAPI wine_vkMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT *pSrcCaches)
+{
+ TRACE("%p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(dstCache), srcCacheCount, pSrcCaches);
+ return device->funcs.p_vkMergeValidationCachesEXT(device->device, dstCache, srcCacheCount, pSrcCaches);
+}
+
VkResult WINAPI wine_vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence)
{
#if defined(USE_STRUCT_CONVERSION)
@@ -2187,7 +2450,7 @@ VkResult WINAPI wine_vkSetEvent(VkDevice device, VkEvent event)
return device->funcs.p_vkSetEvent(device->device, event);
}
-static void WINAPI wine_vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags)
+static void WINAPI wine_vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags)
{
TRACE("%p, 0x%s, %#x\n", device, wine_dbgstr_longlong(commandPool), flags);
device->funcs.p_vkTrimCommandPoolKHR(device->device, commandPool, flags);
@@ -2199,7 +2462,7 @@ void WINAPI wine_vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
device->funcs.p_vkUnmapMemory(device->device, memory);
}
-static void WINAPI wine_vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void *pData)
+static void WINAPI wine_vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData)
{
TRACE("%p, 0x%s, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorSet), wine_dbgstr_longlong(descriptorUpdateTemplate), pData);
device->funcs.p_vkUpdateDescriptorSetWithTemplateKHR(device->device, descriptorSet, descriptorUpdateTemplate, pData);
@@ -2238,7 +2501,9 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkAllocateMemory", &wine_vkAllocateMemory},
{"vkBeginCommandBuffer", &wine_vkBeginCommandBuffer},
{"vkBindBufferMemory", &wine_vkBindBufferMemory},
+ {"vkBindBufferMemory2KHR", &wine_vkBindBufferMemory2KHR},
{"vkBindImageMemory", &wine_vkBindImageMemory},
+ {"vkBindImageMemory2KHR", &wine_vkBindImageMemory2KHR},
{"vkCmdBeginQuery", &wine_vkCmdBeginQuery},
{"vkCmdBeginRenderPass", &wine_vkCmdBeginRenderPass},
{"vkCmdBindDescriptorSets", &wine_vkCmdBindDescriptorSets},
@@ -2260,8 +2525,10 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdDrawIndexed", &wine_vkCmdDrawIndexed},
{"vkCmdDrawIndexedIndirect", &wine_vkCmdDrawIndexedIndirect},
{"vkCmdDrawIndexedIndirectCountAMD", &wine_vkCmdDrawIndexedIndirectCountAMD},
+ {"vkCmdDrawIndexedIndirectCountKHR", &wine_vkCmdDrawIndexedIndirectCountKHR},
{"vkCmdDrawIndirect", &wine_vkCmdDrawIndirect},
{"vkCmdDrawIndirectCountAMD", &wine_vkCmdDrawIndirectCountAMD},
+ {"vkCmdDrawIndirectCountKHR", &wine_vkCmdDrawIndirectCountKHR},
{"vkCmdEndQuery", &wine_vkCmdEndQuery},
{"vkCmdEndRenderPass", &wine_vkCmdEndRenderPass},
{"vkCmdExecuteCommands", &wine_vkCmdExecuteCommands},
@@ -2280,6 +2547,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdSetDiscardRectangleEXT", &wine_vkCmdSetDiscardRectangleEXT},
{"vkCmdSetEvent", &wine_vkCmdSetEvent},
{"vkCmdSetLineWidth", &wine_vkCmdSetLineWidth},
+ {"vkCmdSetSampleLocationsEXT", &wine_vkCmdSetSampleLocationsEXT},
{"vkCmdSetScissor", &wine_vkCmdSetScissor},
{"vkCmdSetStencilCompareMask", &wine_vkCmdSetStencilCompareMask},
{"vkCmdSetStencilReference", &wine_vkCmdSetStencilReference},
@@ -2288,6 +2556,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdSetViewportWScalingNV", &wine_vkCmdSetViewportWScalingNV},
{"vkCmdUpdateBuffer", &wine_vkCmdUpdateBuffer},
{"vkCmdWaitEvents", &wine_vkCmdWaitEvents},
+ {"vkCmdWriteBufferMarkerAMD", &wine_vkCmdWriteBufferMarkerAMD},
{"vkCmdWriteTimestamp", &wine_vkCmdWriteTimestamp},
{"vkCreateBuffer", &wine_vkCreateBuffer},
{"vkCreateBufferView", &wine_vkCreateBufferView},
@@ -2307,9 +2576,11 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCreateQueryPool", &wine_vkCreateQueryPool},
{"vkCreateRenderPass", &wine_vkCreateRenderPass},
{"vkCreateSampler", &wine_vkCreateSampler},
+ {"vkCreateSamplerYcbcrConversionKHR", &wine_vkCreateSamplerYcbcrConversionKHR},
{"vkCreateSemaphore", &wine_vkCreateSemaphore},
{"vkCreateShaderModule", &wine_vkCreateShaderModule},
{"vkCreateSwapchainKHR", &wine_vkCreateSwapchainKHR},
+ {"vkCreateValidationCacheEXT", &wine_vkCreateValidationCacheEXT},
{"vkDestroyBuffer", &wine_vkDestroyBuffer},
{"vkDestroyBufferView", &wine_vkDestroyBufferView},
{"vkDestroyCommandPool", &wine_vkDestroyCommandPool},
@@ -2328,9 +2599,11 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkDestroyQueryPool", &wine_vkDestroyQueryPool},
{"vkDestroyRenderPass", &wine_vkDestroyRenderPass},
{"vkDestroySampler", &wine_vkDestroySampler},
+ {"vkDestroySamplerYcbcrConversionKHR", &wine_vkDestroySamplerYcbcrConversionKHR},
{"vkDestroySemaphore", &wine_vkDestroySemaphore},
{"vkDestroyShaderModule", &wine_vkDestroyShaderModule},
{"vkDestroySwapchainKHR", &wine_vkDestroySwapchainKHR},
+ {"vkDestroyValidationCacheEXT", &wine_vkDestroyValidationCacheEXT},
{"vkDeviceWaitIdle", &wine_vkDeviceWaitIdle},
{"vkEndCommandBuffer", &wine_vkEndCommandBuffer},
{"vkFlushMappedMemoryRanges", &wine_vkFlushMappedMemoryRanges},
@@ -2338,21 +2611,28 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkFreeDescriptorSets", &wine_vkFreeDescriptorSets},
{"vkFreeMemory", &wine_vkFreeMemory},
{"vkGetBufferMemoryRequirements", &wine_vkGetBufferMemoryRequirements},
+ {"vkGetBufferMemoryRequirements2KHR", &wine_vkGetBufferMemoryRequirements2KHR},
+ {"vkGetDescriptorSetLayoutSupportKHR", &wine_vkGetDescriptorSetLayoutSupportKHR},
{"vkGetDeviceMemoryCommitment", &wine_vkGetDeviceMemoryCommitment},
{"vkGetDeviceProcAddr", &wine_vkGetDeviceProcAddr},
{"vkGetDeviceQueue", &wine_vkGetDeviceQueue},
{"vkGetEventStatus", &wine_vkGetEventStatus},
{"vkGetFenceStatus", &wine_vkGetFenceStatus},
{"vkGetImageMemoryRequirements", &wine_vkGetImageMemoryRequirements},
+ {"vkGetImageMemoryRequirements2KHR", &wine_vkGetImageMemoryRequirements2KHR},
{"vkGetImageSparseMemoryRequirements", &wine_vkGetImageSparseMemoryRequirements},
+ {"vkGetImageSparseMemoryRequirements2KHR", &wine_vkGetImageSparseMemoryRequirements2KHR},
{"vkGetImageSubresourceLayout", &wine_vkGetImageSubresourceLayout},
{"vkGetPipelineCacheData", &wine_vkGetPipelineCacheData},
{"vkGetQueryPoolResults", &wine_vkGetQueryPoolResults},
{"vkGetRenderAreaGranularity", &wine_vkGetRenderAreaGranularity},
+ {"vkGetShaderInfoAMD", &wine_vkGetShaderInfoAMD},
{"vkGetSwapchainImagesKHR", &wine_vkGetSwapchainImagesKHR},
+ {"vkGetValidationCacheDataEXT", &wine_vkGetValidationCacheDataEXT},
{"vkInvalidateMappedMemoryRanges", &wine_vkInvalidateMappedMemoryRanges},
{"vkMapMemory", &wine_vkMapMemory},
{"vkMergePipelineCaches", &wine_vkMergePipelineCaches},
+ {"vkMergeValidationCachesEXT", &wine_vkMergeValidationCachesEXT},
{"vkQueueBindSparse", &wine_vkQueueBindSparse},
{"vkQueuePresentKHR", &wine_vkQueuePresentKHR},
{"vkQueueSubmit", &wine_vkQueueSubmit},
@@ -2387,6 +2667,7 @@ static const struct vulkan_func vk_instance_dispatch_table[] =
{"vkGetPhysicalDeviceImageFormatProperties2KHR", &wine_vkGetPhysicalDeviceImageFormatProperties2KHR},
{"vkGetPhysicalDeviceMemoryProperties", &wine_vkGetPhysicalDeviceMemoryProperties},
{"vkGetPhysicalDeviceMemoryProperties2KHR", &wine_vkGetPhysicalDeviceMemoryProperties2KHR},
+ {"vkGetPhysicalDeviceMultisamplePropertiesEXT", &wine_vkGetPhysicalDeviceMultisamplePropertiesEXT},
{"vkGetPhysicalDeviceProperties", &wine_vkGetPhysicalDeviceProperties},
{"vkGetPhysicalDeviceProperties2KHR", &wine_vkGetPhysicalDeviceProperties2KHR},
{"vkGetPhysicalDeviceQueueFamilyProperties", &wine_vkGetPhysicalDeviceQueueFamilyProperties},
@@ -2430,33 +2711,69 @@ void *wine_vk_get_instance_proc_addr(const char *name)
static const char * const vk_device_extensions[] =
{
+ "VK_AMD_buffer_marker",
"VK_AMD_draw_indirect_count",
"VK_AMD_gcn_shader",
"VK_AMD_gpu_shader_half_float",
+ "VK_AMD_gpu_shader_int16",
+ "VK_AMD_mixed_attachment_samples",
"VK_AMD_negative_viewport_height",
"VK_AMD_rasterization_order",
"VK_AMD_shader_ballot",
+ "VK_AMD_shader_core_properties",
"VK_AMD_shader_explicit_vertex_parameter",
+ "VK_AMD_shader_fragment_mask",
+ "VK_AMD_shader_image_load_store_lod",
+ "VK_AMD_shader_info",
"VK_AMD_shader_trinary_minmax",
"VK_AMD_texture_gather_bias_lod",
+ "VK_EXT_blend_operation_advanced",
+ "VK_EXT_conservative_rasterization",
+ "VK_EXT_depth_range_unrestricted",
+ "VK_EXT_descriptor_indexing",
"VK_EXT_discard_rectangles",
+ "VK_EXT_global_priority",
+ "VK_EXT_post_depth_coverage",
+ "VK_EXT_sample_locations",
+ "VK_EXT_sampler_filter_minmax",
+ "VK_EXT_shader_stencil_export",
"VK_EXT_shader_subgroup_ballot",
"VK_EXT_shader_subgroup_vote",
+ "VK_EXT_shader_viewport_index_layer",
+ "VK_EXT_validation_cache",
+ "VK_EXT_vertex_attribute_divisor",
"VK_IMG_filter_cubic",
"VK_IMG_format_pvrtc",
+ "VK_KHR_16bit_storage",
+ "VK_KHR_bind_memory2",
+ "VK_KHR_dedicated_allocation",
"VK_KHR_descriptor_update_template",
+ "VK_KHR_draw_indirect_count",
+ "VK_KHR_get_memory_requirements2",
+ "VK_KHR_image_format_list",
"VK_KHR_incremental_present",
"VK_KHR_maintenance1",
+ "VK_KHR_maintenance2",
+ "VK_KHR_maintenance3",
+ "VK_KHR_multiview",
"VK_KHR_push_descriptor",
+ "VK_KHR_relaxed_block_layout",
"VK_KHR_sampler_mirror_clamp_to_edge",
+ "VK_KHR_sampler_ycbcr_conversion",
"VK_KHR_shader_draw_parameters",
+ "VK_KHR_storage_buffer_storage_class",
"VK_KHR_swapchain",
+ "VK_KHR_variable_pointers",
"VK_NV_clip_space_w_scaling",
"VK_NV_dedicated_allocation",
"VK_NV_external_memory",
+ "VK_NV_fill_rectangle",
+ "VK_NV_fragment_coverage_to_color",
+ "VK_NV_framebuffer_mixed_samples",
"VK_NV_geometry_shader_passthrough",
"VK_NV_glsl_shader",
"VK_NV_sample_mask_override_coverage",
+ "VK_NV_shader_subgroup_partitioned",
"VK_NV_viewport_array2",
"VK_NV_viewport_swizzle",
};
diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h
index 67df71d3080a..f193c4310761 100644
--- a/dlls/winevulkan/vulkan_thunks.h
+++ b/dlls/winevulkan/vulkan_thunks.h
@@ -62,6 +62,24 @@ typedef struct VkCommandBufferBeginInfo_host
const VkCommandBufferInheritanceInfo_host *pInheritanceInfo;
} VkCommandBufferBeginInfo_host;
+typedef struct VkBindBufferMemoryInfo_host
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkBuffer buffer;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+} VkBindBufferMemoryInfo_host;
+
+typedef struct VkBindImageMemoryInfo_host
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkImage image;
+ VkDeviceMemory memory;
+ VkDeviceSize memoryOffset;
+} VkBindImageMemoryInfo_host;
+
typedef struct VkRenderPassBeginInfo_host
{
VkStructureType sType;
@@ -190,19 +208,19 @@ typedef struct VkComputePipelineCreateInfo_host
int32_t basePipelineIndex;
} VkComputePipelineCreateInfo_host;
-typedef struct VkDescriptorUpdateTemplateCreateInfoKHR_host
+typedef struct VkDescriptorUpdateTemplateCreateInfo_host
{
VkStructureType sType;
void *pNext;
- VkDescriptorUpdateTemplateCreateFlagsKHR flags;
+ VkDescriptorUpdateTemplateCreateFlags flags;
uint32_t descriptorUpdateEntryCount;
- const VkDescriptorUpdateTemplateEntryKHR *pDescriptorUpdateEntries;
- VkDescriptorUpdateTemplateTypeKHR templateType;
+ const VkDescriptorUpdateTemplateEntry *pDescriptorUpdateEntries;
+ VkDescriptorUpdateTemplateType templateType;
VkDescriptorSetLayout descriptorSetLayout;
VkPipelineBindPoint pipelineBindPoint;
VkPipelineLayout pipelineLayout;
uint32_t set;
-} VkDescriptorUpdateTemplateCreateInfoKHR_host;
+} VkDescriptorUpdateTemplateCreateInfo_host;
typedef struct VkFramebufferCreateInfo_host
{
@@ -290,6 +308,34 @@ typedef struct VkMemoryRequirements_host
uint32_t memoryTypeBits;
} VkMemoryRequirements_host;
+typedef struct VkBufferMemoryRequirementsInfo2_host
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkBuffer buffer;
+} VkBufferMemoryRequirementsInfo2_host;
+
+typedef struct VkMemoryRequirements2_host
+{
+ VkStructureType sType;
+ void *pNext;
+ VkMemoryRequirements_host memoryRequirements;
+} VkMemoryRequirements2_host;
+
+typedef struct VkImageMemoryRequirementsInfo2_host
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkImage image;
+} VkImageMemoryRequirementsInfo2_host;
+
+typedef struct VkImageSparseMemoryRequirementsInfo2_host
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkImage image;
+} VkImageSparseMemoryRequirementsInfo2_host;
+
typedef struct VkSubresourceLayout_host
{
VkDeviceSize offset;
@@ -308,12 +354,12 @@ typedef struct VkImageFormatProperties_host
VkDeviceSize maxResourceSize;
} VkImageFormatProperties_host;
-typedef struct VkImageFormatProperties2KHR_host
+typedef struct VkImageFormatProperties2_host
{
VkStructureType sType;
void *pNext;
VkImageFormatProperties_host imageFormatProperties;
-} VkImageFormatProperties2KHR_host;
+} VkImageFormatProperties2_host;
typedef struct VkMemoryHeap_host
{
@@ -329,12 +375,12 @@ typedef struct VkPhysicalDeviceMemoryProperties_host
VkMemoryHeap_host memoryHeaps[VK_MAX_MEMORY_HEAPS];
} VkPhysicalDeviceMemoryProperties_host;
-typedef struct VkPhysicalDeviceMemoryProperties2KHR_host
+typedef struct VkPhysicalDeviceMemoryProperties2_host
{
VkStructureType sType;
void *pNext;
VkPhysicalDeviceMemoryProperties_host memoryProperties;
-} VkPhysicalDeviceMemoryProperties2KHR_host;
+} VkPhysicalDeviceMemoryProperties2_host;
typedef struct VkPhysicalDeviceLimits_host
{
@@ -459,12 +505,12 @@ typedef struct VkPhysicalDeviceProperties_host
VkPhysicalDeviceSparseProperties sparseProperties;
} VkPhysicalDeviceProperties_host;
-typedef struct VkPhysicalDeviceProperties2KHR_host
+typedef struct VkPhysicalDeviceProperties2_host
{
VkStructureType sType;
void *pNext;
VkPhysicalDeviceProperties_host properties;
-} VkPhysicalDeviceProperties2KHR_host;
+} VkPhysicalDeviceProperties2_host;
typedef struct VkSparseMemoryBind_host
{
@@ -561,7 +607,17 @@ struct vulkan_device_funcs
VkResult (*p_vkBeginCommandBuffer)(VkCommandBuffer, const VkCommandBufferBeginInfo *);
#endif
VkResult (*p_vkBindBufferMemory)(VkDevice, VkBuffer, VkDeviceMemory, VkDeviceSize);
+#if defined(USE_STRUCT_CONVERSION)
+ VkResult (*p_vkBindBufferMemory2KHR)(VkDevice, uint32_t, const VkBindBufferMemoryInfo_host *);
+#else
+ VkResult (*p_vkBindBufferMemory2KHR)(VkDevice, uint32_t, const VkBindBufferMemoryInfo *);
+#endif
VkResult (*p_vkBindImageMemory)(VkDevice, VkImage, VkDeviceMemory, VkDeviceSize);
+#if defined(USE_STRUCT_CONVERSION)
+ VkResult (*p_vkBindImageMemory2KHR)(VkDevice, uint32_t, const VkBindImageMemoryInfo_host *);
+#else
+ VkResult (*p_vkBindImageMemory2KHR)(VkDevice, uint32_t, const VkBindImageMemoryInfo *);
+#endif
void (*p_vkCmdBeginQuery)(VkCommandBuffer, VkQueryPool, uint32_t, VkQueryControlFlags);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkCmdBeginRenderPass)(VkCommandBuffer, const VkRenderPassBeginInfo_host *, VkSubpassContents);
@@ -599,8 +655,10 @@ struct vulkan_device_funcs
void (*p_vkCmdDrawIndexed)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, int32_t, uint32_t);
void (*p_vkCmdDrawIndexedIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
+ void (*p_vkCmdDrawIndexedIndirectCountKHR)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdDrawIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdDrawIndirectCountAMD)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
+ void (*p_vkCmdDrawIndirectCountKHR)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
void (*p_vkCmdEndQuery)(VkCommandBuffer, VkQueryPool, uint32_t);
void (*p_vkCmdEndRenderPass)(VkCommandBuffer);
void (*p_vkCmdExecuteCommands)(VkCommandBuffer, uint32_t, const VkCommandBuffer *);
@@ -617,7 +675,7 @@ struct vulkan_device_funcs
#else
void (*p_vkCmdPushDescriptorSetKHR)(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t, const VkWriteDescriptorSet *);
#endif
- void (*p_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer, VkDescriptorUpdateTemplateKHR, VkPipelineLayout, uint32_t, const void *);
+ void (*p_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer, VkDescriptorUpdateTemplate, VkPipelineLayout, uint32_t, const void *);
void (*p_vkCmdResetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
void (*p_vkCmdResetQueryPool)(VkCommandBuffer, VkQueryPool, uint32_t, uint32_t);
void (*p_vkCmdResolveImage)(VkCommandBuffer, VkImage, VkImageLayout, VkImage, VkImageLayout, uint32_t, const VkImageResolve *);
@@ -627,6 +685,7 @@ struct vulkan_device_funcs
void (*p_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
void (*p_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
void (*p_vkCmdSetLineWidth)(VkCommandBuffer, float);
+ void (*p_vkCmdSetSampleLocationsEXT)(VkCommandBuffer, const VkSampleLocationsInfoEXT *);
void (*p_vkCmdSetScissor)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
void (*p_vkCmdSetStencilCompareMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
void (*p_vkCmdSetStencilReference)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
@@ -639,6 +698,7 @@ struct vulkan_device_funcs
#else
void (*p_vkCmdWaitEvents)(VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags, VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *);
#endif
+ void (*p_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer, VkPipelineStageFlagBits, VkBuffer, VkDeviceSize, uint32_t);
void (*p_vkCmdWriteTimestamp)(VkCommandBuffer, VkPipelineStageFlagBits, VkQueryPool, uint32_t);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkCreateBuffer)(VkDevice, const VkBufferCreateInfo_host *, const VkAllocationCallbacks *, VkBuffer *);
@@ -659,9 +719,9 @@ struct vulkan_device_funcs
VkResult (*p_vkCreateDescriptorPool)(VkDevice, const VkDescriptorPoolCreateInfo *, const VkAllocationCallbacks *, VkDescriptorPool *);
VkResult (*p_vkCreateDescriptorSetLayout)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, const VkAllocationCallbacks *, VkDescriptorSetLayout *);
#if defined(USE_STRUCT_CONVERSION)
- VkResult (*p_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfoKHR_host *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplateKHR *);
+ VkResult (*p_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfo_host *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplate *);
#else
- VkResult (*p_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfoKHR *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplateKHR *);
+ VkResult (*p_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfo *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplate *);
#endif
VkResult (*p_vkCreateEvent)(VkDevice, const VkEventCreateInfo *, const VkAllocationCallbacks *, VkEvent *);
VkResult (*p_vkCreateFence)(VkDevice, const VkFenceCreateInfo *, const VkAllocationCallbacks *, VkFence *);
@@ -686,6 +746,7 @@ struct vulkan_device_funcs
VkResult (*p_vkCreateQueryPool)(VkDevice, const VkQueryPoolCreateInfo *, const VkAllocationCallbacks *, VkQueryPool *);
VkResult (*p_vkCreateRenderPass)(VkDevice, const VkRenderPassCreateInfo *, const VkAllocationCallbacks *, VkRenderPass *);
VkResult (*p_vkCreateSampler)(VkDevice, const VkSamplerCreateInfo *, const VkAllocationCallbacks *, VkSampler *);
+ VkResult (*p_vkCreateSamplerYcbcrConversionKHR)(VkDevice, const VkSamplerYcbcrConversionCreateInfo *, const VkAllocationCallbacks *, VkSamplerYcbcrConversion *);
VkResult (*p_vkCreateSemaphore)(VkDevice, const VkSemaphoreCreateInfo *, const VkAllocationCallbacks *, VkSemaphore *);
VkResult (*p_vkCreateShaderModule)(VkDevice, const VkShaderModuleCreateInfo *, const VkAllocationCallbacks *, VkShaderModule *);
#if defined(USE_STRUCT_CONVERSION)
@@ -693,12 +754,13 @@ struct vulkan_device_funcs
#else
VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
#endif
+ VkResult (*p_vkCreateValidationCacheEXT)(VkDevice, const VkValidationCacheCreateInfoEXT *, const VkAllocationCallbacks *, VkValidationCacheEXT *);
void (*p_vkDestroyBuffer)(VkDevice, VkBuffer, const VkAllocationCallbacks *);
void (*p_vkDestroyBufferView)(VkDevice, VkBufferView, const VkAllocationCallbacks *);
void (*p_vkDestroyCommandPool)(VkDevice, VkCommandPool, const VkAllocationCallbacks *);
void (*p_vkDestroyDescriptorPool)(VkDevice, VkDescriptorPool, const VkAllocationCallbacks *);
void (*p_vkDestroyDescriptorSetLayout)(VkDevice, VkDescriptorSetLayout, const VkAllocationCallbacks *);
- void (*p_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice, VkDescriptorUpdateTemplateKHR, const VkAllocationCallbacks *);
+ void (*p_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice, VkDescriptorUpdateTemplate, const VkAllocationCallbacks *);
void (*p_vkDestroyDevice)(VkDevice, const VkAllocationCallbacks *);
void (*p_vkDestroyEvent)(VkDevice, VkEvent, const VkAllocationCallbacks *);
void (*p_vkDestroyFence)(VkDevice, VkFence, const VkAllocationCallbacks *);
@@ -711,9 +773,11 @@ struct vulkan_device_funcs
void (*p_vkDestroyQueryPool)(VkDevice, VkQueryPool, const VkAllocationCallbacks *);
void (*p_vkDestroyRenderPass)(VkDevice, VkRenderPass, const VkAllocationCallbacks *);
void (*p_vkDestroySampler)(VkDevice, VkSampler, const VkAllocationCallbacks *);
+ void (*p_vkDestroySamplerYcbcrConversionKHR)(VkDevice, VkSamplerYcbcrConversion, const VkAllocationCallbacks *);
void (*p_vkDestroySemaphore)(VkDevice, VkSemaphore, const VkAllocationCallbacks *);
void (*p_vkDestroyShaderModule)(VkDevice, VkShaderModule, const VkAllocationCallbacks *);
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
+ void (*p_vkDestroyValidationCacheEXT)(VkDevice, VkValidationCacheEXT, const VkAllocationCallbacks *);
VkResult (*p_vkDeviceWaitIdle)(VkDevice);
VkResult (*p_vkEndCommandBuffer)(VkCommandBuffer);
#if defined(USE_STRUCT_CONVERSION)
@@ -729,6 +793,12 @@ struct vulkan_device_funcs
#else
void (*p_vkGetBufferMemoryRequirements)(VkDevice, VkBuffer, VkMemoryRequirements *);
#endif
+#if defined(USE_STRUCT_CONVERSION)
+ void (*p_vkGetBufferMemoryRequirements2KHR)(VkDevice, const VkBufferMemoryRequirementsInfo2_host *, VkMemoryRequirements2_host *);
+#else
+ void (*p_vkGetBufferMemoryRequirements2KHR)(VkDevice, const VkBufferMemoryRequirementsInfo2 *, VkMemoryRequirements2 *);
+#endif
+ void (*p_vkGetDescriptorSetLayoutSupportKHR)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
void (*p_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
void (*p_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *);
VkResult (*p_vkGetEventStatus)(VkDevice, VkEvent);
@@ -737,8 +807,18 @@ struct vulkan_device_funcs
void (*p_vkGetImageMemoryRequirements)(VkDevice, VkImage, VkMemoryRequirements_host *);
#else
void (*p_vkGetImageMemoryRequirements)(VkDevice, VkImage, VkMemoryRequirements *);
+#endif
+#if defined(USE_STRUCT_CONVERSION)
+ void (*p_vkGetImageMemoryRequirements2KHR)(VkDevice, const VkImageMemoryRequirementsInfo2_host *, VkMemoryRequirements2_host *);
+#else
+ void (*p_vkGetImageMemoryRequirements2KHR)(VkDevice, const VkImageMemoryRequirementsInfo2 *, VkMemoryRequirements2 *);
#endif
void (*p_vkGetImageSparseMemoryRequirements)(VkDevice, VkImage, uint32_t *, VkSparseImageMemoryRequirements *);
+#if defined(USE_STRUCT_CONVERSION)
+ void (*p_vkGetImageSparseMemoryRequirements2KHR)(VkDevice, const VkImageSparseMemoryRequirementsInfo2_host *, uint32_t *, VkSparseImageMemoryRequirements2 *);
+#else
+ void (*p_vkGetImageSparseMemoryRequirements2KHR)(VkDevice, const VkImageSparseMemoryRequirementsInfo2 *, uint32_t *, VkSparseImageMemoryRequirements2 *);
+#endif
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout_host *);
#else
@@ -747,7 +827,9 @@ struct vulkan_device_funcs
VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *);
VkResult (*p_vkGetQueryPoolResults)(VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *, VkDeviceSize, VkQueryResultFlags);
void (*p_vkGetRenderAreaGranularity)(VkDevice, VkRenderPass, VkExtent2D *);
+ VkResult (*p_vkGetShaderInfoAMD)(VkDevice, VkPipeline, VkShaderStageFlagBits, VkShaderInfoTypeAMD, size_t *, void *);
VkResult (*p_vkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *);
+ VkResult (*p_vkGetValidationCacheDataEXT)(VkDevice, VkValidationCacheEXT, size_t *, void *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkInvalidateMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange_host *);
#else
@@ -755,6 +837,7 @@ struct vulkan_device_funcs
#endif
VkResult (*p_vkMapMemory)(VkDevice, VkDeviceMemory, VkDeviceSize, VkDeviceSize, VkMemoryMapFlags, void **);
VkResult (*p_vkMergePipelineCaches)(VkDevice, VkPipelineCache, uint32_t, const VkPipelineCache *);
+ VkResult (*p_vkMergeValidationCachesEXT)(VkDevice, VkValidationCacheEXT, uint32_t, const VkValidationCacheEXT *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkQueueBindSparse)(VkQueue, uint32_t, const VkBindSparseInfo_host *, VkFence);
#else
@@ -769,9 +852,9 @@ struct vulkan_device_funcs
VkResult (*p_vkResetEvent)(VkDevice, VkEvent);
VkResult (*p_vkResetFences)(VkDevice, uint32_t, const VkFence *);
VkResult (*p_vkSetEvent)(VkDevice, VkEvent);
- void (*p_vkTrimCommandPoolKHR)(VkDevice, VkCommandPool, VkCommandPoolTrimFlagsKHR);
+ void (*p_vkTrimCommandPoolKHR)(VkDevice, VkCommandPool, VkCommandPoolTrimFlags);
void (*p_vkUnmapMemory)(VkDevice, VkDeviceMemory);
- void (*p_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice, VkDescriptorSet, VkDescriptorUpdateTemplateKHR, const void *);
+ void (*p_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice, VkDescriptorSet, VkDescriptorUpdateTemplate, const void *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkUpdateDescriptorSets)(VkDevice, uint32_t, const VkWriteDescriptorSet_host *, uint32_t, const VkCopyDescriptorSet_host *);
#else
@@ -790,18 +873,18 @@ struct vulkan_instance_funcs
VkResult (*p_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice, uint32_t *, VkLayerProperties *);
VkResult (*p_vkEnumeratePhysicalDevices)(VkInstance, uint32_t *, VkPhysicalDevice *);
void (*p_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice, VkPhysicalDeviceFeatures *);
- void (*p_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice, VkPhysicalDeviceFeatures2KHR *);
+ void (*p_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice, VkPhysicalDeviceFeatures2 *);
void (*p_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice, VkFormat, VkFormatProperties *);
- void (*p_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice, VkFormat, VkFormatProperties2KHR *);
+ void (*p_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice, VkFormat, VkFormatProperties2 *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice, VkFormat, VkImageType, VkImageTiling, VkImageUsageFlags, VkImageCreateFlags, VkImageFormatProperties_host *);
#else
VkResult (*p_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice, VkFormat, VkImageType, VkImageTiling, VkImageUsageFlags, VkImageCreateFlags, VkImageFormatProperties *);
#endif
#if defined(USE_STRUCT_CONVERSION)
- VkResult (*p_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR *, VkImageFormatProperties2KHR_host *);
+ VkResult (*p_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceImageFormatInfo2 *, VkImageFormatProperties2_host *);
#else
- VkResult (*p_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR *, VkImageFormatProperties2KHR *);
+ VkResult (*p_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceImageFormatInfo2 *, VkImageFormatProperties2 *);
#endif
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties_host *);
@@ -809,24 +892,25 @@ struct vulkan_instance_funcs
void (*p_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties *);
#endif
#if defined(USE_STRUCT_CONVERSION)
- void (*p_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2KHR_host *);
+ void (*p_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2_host *);
#else
- void (*p_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2KHR *);
+ void (*p_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2 *);
#endif
+ void (*p_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice, VkSampleCountFlagBits, VkMultisamplePropertiesEXT *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetPhysicalDeviceProperties)(VkPhysicalDevice, VkPhysicalDeviceProperties_host *);
#else
void (*p_vkGetPhysicalDeviceProperties)(VkPhysicalDevice, VkPhysicalDeviceProperties *);
#endif
#if defined(USE_STRUCT_CONVERSION)
- void (*p_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2KHR_host *);
+ void (*p_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2_host *);
#else
- void (*p_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2KHR *);
+ void (*p_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2 *);
#endif
void (*p_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties *);
- void (*p_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties2KHR *);
+ void (*p_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties2 *);
void (*p_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice, VkFormat, VkImageType, VkSampleCountFlagBits, VkImageUsageFlags, VkImageTiling, uint32_t *, VkSparseImageFormatProperties *);
- void (*p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *, uint32_t *, VkSparseImageFormatProperties2KHR *);
+ void (*p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *, uint32_t *, VkSparseImageFormatProperties2 *);
VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *);
@@ -841,7 +925,9 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkAllocateMemory) \
USE_VK_FUNC(vkBeginCommandBuffer) \
USE_VK_FUNC(vkBindBufferMemory) \
+ USE_VK_FUNC(vkBindBufferMemory2KHR) \
USE_VK_FUNC(vkBindImageMemory) \
+ USE_VK_FUNC(vkBindImageMemory2KHR) \
USE_VK_FUNC(vkCmdBeginQuery) \
USE_VK_FUNC(vkCmdBeginRenderPass) \
USE_VK_FUNC(vkCmdBindDescriptorSets) \
@@ -863,8 +949,10 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdDrawIndexed) \
USE_VK_FUNC(vkCmdDrawIndexedIndirect) \
USE_VK_FUNC(vkCmdDrawIndexedIndirectCountAMD) \
+ USE_VK_FUNC(vkCmdDrawIndexedIndirectCountKHR) \
USE_VK_FUNC(vkCmdDrawIndirect) \
USE_VK_FUNC(vkCmdDrawIndirectCountAMD) \
+ USE_VK_FUNC(vkCmdDrawIndirectCountKHR) \
USE_VK_FUNC(vkCmdEndQuery) \
USE_VK_FUNC(vkCmdEndRenderPass) \
USE_VK_FUNC(vkCmdExecuteCommands) \
@@ -883,6 +971,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdSetDiscardRectangleEXT) \
USE_VK_FUNC(vkCmdSetEvent) \
USE_VK_FUNC(vkCmdSetLineWidth) \
+ USE_VK_FUNC(vkCmdSetSampleLocationsEXT) \
USE_VK_FUNC(vkCmdSetScissor) \
USE_VK_FUNC(vkCmdSetStencilCompareMask) \
USE_VK_FUNC(vkCmdSetStencilReference) \
@@ -891,6 +980,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdSetViewportWScalingNV) \
USE_VK_FUNC(vkCmdUpdateBuffer) \
USE_VK_FUNC(vkCmdWaitEvents) \
+ USE_VK_FUNC(vkCmdWriteBufferMarkerAMD) \
USE_VK_FUNC(vkCmdWriteTimestamp) \
USE_VK_FUNC(vkCreateBuffer) \
USE_VK_FUNC(vkCreateBufferView) \
@@ -910,9 +1000,11 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCreateQueryPool) \
USE_VK_FUNC(vkCreateRenderPass) \
USE_VK_FUNC(vkCreateSampler) \
+ USE_VK_FUNC(vkCreateSamplerYcbcrConversionKHR) \
USE_VK_FUNC(vkCreateSemaphore) \
USE_VK_FUNC(vkCreateShaderModule) \
USE_VK_FUNC(vkCreateSwapchainKHR) \
+ USE_VK_FUNC(vkCreateValidationCacheEXT) \
USE_VK_FUNC(vkDestroyBuffer) \
USE_VK_FUNC(vkDestroyBufferView) \
USE_VK_FUNC(vkDestroyCommandPool) \
@@ -931,9 +1023,11 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkDestroyQueryPool) \
USE_VK_FUNC(vkDestroyRenderPass) \
USE_VK_FUNC(vkDestroySampler) \
+ USE_VK_FUNC(vkDestroySamplerYcbcrConversionKHR) \
USE_VK_FUNC(vkDestroySemaphore) \
USE_VK_FUNC(vkDestroyShaderModule) \
USE_VK_FUNC(vkDestroySwapchainKHR) \
+ USE_VK_FUNC(vkDestroyValidationCacheEXT) \
USE_VK_FUNC(vkDeviceWaitIdle) \
USE_VK_FUNC(vkEndCommandBuffer) \
USE_VK_FUNC(vkFlushMappedMemoryRanges) \
@@ -941,20 +1035,27 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkFreeDescriptorSets) \
USE_VK_FUNC(vkFreeMemory) \
USE_VK_FUNC(vkGetBufferMemoryRequirements) \
+ USE_VK_FUNC(vkGetBufferMemoryRequirements2KHR) \
+ USE_VK_FUNC(vkGetDescriptorSetLayoutSupportKHR) \
USE_VK_FUNC(vkGetDeviceMemoryCommitment) \
USE_VK_FUNC(vkGetDeviceQueue) \
USE_VK_FUNC(vkGetEventStatus) \
USE_VK_FUNC(vkGetFenceStatus) \
USE_VK_FUNC(vkGetImageMemoryRequirements) \
+ USE_VK_FUNC(vkGetImageMemoryRequirements2KHR) \
USE_VK_FUNC(vkGetImageSparseMemoryRequirements) \
+ USE_VK_FUNC(vkGetImageSparseMemoryRequirements2KHR) \
USE_VK_FUNC(vkGetImageSubresourceLayout) \
USE_VK_FUNC(vkGetPipelineCacheData) \
USE_VK_FUNC(vkGetQueryPoolResults) \
USE_VK_FUNC(vkGetRenderAreaGranularity) \
+ USE_VK_FUNC(vkGetShaderInfoAMD) \
USE_VK_FUNC(vkGetSwapchainImagesKHR) \
+ USE_VK_FUNC(vkGetValidationCacheDataEXT) \
USE_VK_FUNC(vkInvalidateMappedMemoryRanges) \
USE_VK_FUNC(vkMapMemory) \
USE_VK_FUNC(vkMergePipelineCaches) \
+ USE_VK_FUNC(vkMergeValidationCachesEXT) \
USE_VK_FUNC(vkQueueBindSparse) \
USE_VK_FUNC(vkQueuePresentKHR) \
USE_VK_FUNC(vkQueueSubmit) \
@@ -986,6 +1087,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkGetPhysicalDeviceImageFormatProperties2KHR) \
USE_VK_FUNC(vkGetPhysicalDeviceMemoryProperties) \
USE_VK_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR) \
+ USE_VK_FUNC(vkGetPhysicalDeviceMultisamplePropertiesEXT) \
USE_VK_FUNC(vkGetPhysicalDeviceProperties) \
USE_VK_FUNC(vkGetPhysicalDeviceProperties2KHR) \
USE_VK_FUNC(vkGetPhysicalDeviceQueueFamilyProperties) \
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 3f96413f5ce8..551c7fd89724 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -8,7 +8,9 @@
@ stdcall wine_vkAllocateMemory(ptr ptr ptr ptr)
@ stdcall wine_vkBeginCommandBuffer(ptr ptr)
@ stdcall wine_vkBindBufferMemory(ptr int64 int64 int64)
+@ stub vkBindBufferMemory2
@ stdcall wine_vkBindImageMemory(ptr int64 int64 int64)
+@ stub vkBindImageMemory2
@ stdcall wine_vkCmdBeginQuery(ptr int64 long long)
@ stdcall wine_vkCmdBeginRenderPass(ptr ptr long)
@ stdcall wine_vkCmdBindDescriptorSets(ptr long int64 long long ptr long ptr)
@@ -25,6 +27,7 @@
@ stdcall wine_vkCmdCopyImageToBuffer(ptr int64 long int64 long ptr)
@ stdcall wine_vkCmdCopyQueryPoolResults(ptr int64 long long int64 int64 int64 long)
@ stdcall wine_vkCmdDispatch(ptr long long long)
+@ stub vkCmdDispatchBase
@ stdcall wine_vkCmdDispatchIndirect(ptr int64 int64)
@ stdcall wine_vkCmdDraw(ptr long long long long)
@ stdcall wine_vkCmdDrawIndexed(ptr long long long long long)
@@ -43,6 +46,7 @@
@ stdcall wine_vkCmdSetBlendConstants(ptr ptr)
@ stdcall wine_vkCmdSetDepthBias(ptr float float float)
@ stdcall wine_vkCmdSetDepthBounds(ptr float float)
+@ stub vkCmdSetDeviceMask
@ stdcall wine_vkCmdSetEvent(ptr int64 long)
@ stdcall wine_vkCmdSetLineWidth(ptr float)
@ stdcall wine_vkCmdSetScissor(ptr long long ptr)
@@ -59,6 +63,7 @@
@ stdcall wine_vkCreateComputePipelines(ptr int64 long ptr ptr ptr)
@ stdcall wine_vkCreateDescriptorPool(ptr ptr ptr ptr)
@ stdcall wine_vkCreateDescriptorSetLayout(ptr ptr ptr ptr)
+@ stub vkCreateDescriptorUpdateTemplate
@ stdcall wine_vkCreateDevice(ptr ptr ptr ptr)
@ stub vkCreateDisplayModeKHR
@ stub vkCreateDisplayPlaneSurfaceKHR
@@ -74,6 +79,7 @@
@ stdcall wine_vkCreateQueryPool(ptr ptr ptr ptr)
@ stdcall wine_vkCreateRenderPass(ptr ptr ptr ptr)
@ stdcall wine_vkCreateSampler(ptr ptr ptr ptr)
+@ stub vkCreateSamplerYcbcrConversion
@ stdcall wine_vkCreateSemaphore(ptr ptr ptr ptr)
@ stdcall wine_vkCreateShaderModule(ptr ptr ptr ptr)
@ stub vkCreateSharedSwapchainsKHR
@@ -84,6 +90,7 @@
@ stdcall wine_vkDestroyCommandPool(ptr int64 ptr)
@ stdcall wine_vkDestroyDescriptorPool(ptr int64 ptr)
@ stdcall wine_vkDestroyDescriptorSetLayout(ptr int64 ptr)
+@ stub vkDestroyDescriptorUpdateTemplate
@ stdcall wine_vkDestroyDevice(ptr ptr)
@ stdcall wine_vkDestroyEvent(ptr int64 ptr)
@ stdcall wine_vkDestroyFence(ptr int64 ptr)
@@ -97,6 +104,7 @@
@ stdcall wine_vkDestroyQueryPool(ptr int64 ptr)
@ stdcall wine_vkDestroyRenderPass(ptr int64 ptr)
@ stdcall wine_vkDestroySampler(ptr int64 ptr)
+@ stub vkDestroySamplerYcbcrConversion
@ stdcall wine_vkDestroySemaphore(ptr int64 ptr)
@ stdcall wine_vkDestroyShaderModule(ptr int64 ptr)
@ stdcall wine_vkDestroySurfaceKHR(ptr int64 ptr)
@@ -106,33 +114,51 @@
@ stdcall wine_vkEnumerateDeviceExtensionProperties(ptr str ptr ptr)
@ stdcall wine_vkEnumerateDeviceLayerProperties(ptr ptr ptr)
@ stdcall wine_vkEnumerateInstanceExtensionProperties(str ptr ptr)
+@ stub vkEnumerateInstanceVersion
+@ stub vkEnumeratePhysicalDeviceGroups
@ stdcall wine_vkEnumeratePhysicalDevices(ptr ptr ptr)
@ stdcall wine_vkFlushMappedMemoryRanges(ptr long ptr)
@ stdcall wine_vkFreeCommandBuffers(ptr int64 long ptr)
@ stdcall wine_vkFreeDescriptorSets(ptr int64 long ptr)
@ stdcall wine_vkFreeMemory(ptr int64 ptr)
@ stdcall wine_vkGetBufferMemoryRequirements(ptr int64 ptr)
+@ stub vkGetBufferMemoryRequirements2
+@ stub vkGetDescriptorSetLayoutSupport
+@ stub vkGetDeviceGroupPeerMemoryFeatures
@ stdcall wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
@ stdcall wine_vkGetDeviceProcAddr(ptr str)
@ stdcall wine_vkGetDeviceQueue(ptr long long ptr)
+@ stub vkGetDeviceQueue2
@ stub vkGetDisplayModePropertiesKHR
@ stub vkGetDisplayPlaneCapabilitiesKHR
@ stub vkGetDisplayPlaneSupportedDisplaysKHR
@ stdcall wine_vkGetEventStatus(ptr int64)
@ stdcall wine_vkGetFenceStatus(ptr int64)
@ stdcall wine_vkGetImageMemoryRequirements(ptr int64 ptr)
+@ stub vkGetImageMemoryRequirements2
@ stdcall wine_vkGetImageSparseMemoryRequirements(ptr int64 ptr ptr)
+@ stub vkGetImageSparseMemoryRequirements2
@ stdcall wine_vkGetImageSubresourceLayout(ptr int64 ptr ptr)
@ stdcall wine_vkGetInstanceProcAddr(ptr str)
@ stub vkGetPhysicalDeviceDisplayPlanePropertiesKHR
@ stub vkGetPhysicalDeviceDisplayPropertiesKHR
+@ stub vkGetPhysicalDeviceExternalBufferProperties
+@ stub vkGetPhysicalDeviceExternalFenceProperties
+@ stub vkGetPhysicalDeviceExternalSemaphoreProperties
@ stdcall wine_vkGetPhysicalDeviceFeatures(ptr ptr)
+@ stub vkGetPhysicalDeviceFeatures2
@ stdcall wine_vkGetPhysicalDeviceFormatProperties(ptr long ptr)
+@ stub vkGetPhysicalDeviceFormatProperties2
@ stdcall wine_vkGetPhysicalDeviceImageFormatProperties(ptr long long long long long ptr)
+@ stub vkGetPhysicalDeviceImageFormatProperties2
@ stdcall wine_vkGetPhysicalDeviceMemoryProperties(ptr ptr)
+@ stub vkGetPhysicalDeviceMemoryProperties2
@ stdcall wine_vkGetPhysicalDeviceProperties(ptr ptr)
+@ stub vkGetPhysicalDeviceProperties2
@ stdcall wine_vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr)
+@ stub vkGetPhysicalDeviceQueueFamilyProperties2
@ stdcall wine_vkGetPhysicalDeviceSparseImageFormatProperties(ptr long long long long long ptr ptr)
+@ stub vkGetPhysicalDeviceSparseImageFormatProperties2
@ stdcall wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr)
@ stdcall wine_vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr)
@ stdcall wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long)
@@ -155,6 +181,8 @@
@ stdcall wine_vkResetEvent(ptr int64)
@ stdcall wine_vkResetFences(ptr long ptr)
@ stdcall wine_vkSetEvent(ptr int64)
+@ stub vkTrimCommandPool
@ stdcall wine_vkUnmapMemory(ptr int64)
+@ stub vkUpdateDescriptorSetWithTemplate
@ stdcall wine_vkUpdateDescriptorSets(ptr long ptr long ptr)
@ stdcall wine_vkWaitForFences(ptr long ptr long int64)
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index 24b0ef990ee2..74ff22b52e08 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -26,7 +26,8 @@
#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256
#define VK_UUID_SIZE 16
-#define VK_LUID_SIZE_KHX 8
+#define VK_LUID_SIZE 8
+#define VK_LUID_SIZE_KHR VK_LUID_SIZE
#define VK_MAX_EXTENSION_NAME_SIZE 256
#define VK_MAX_DESCRIPTION_SIZE 256
#define VK_MAX_MEMORY_TYPES 32
@@ -39,18 +40,23 @@
#define VK_TRUE 1
#define VK_FALSE 0
#define VK_QUEUE_FAMILY_IGNORED (~0U)
-#define VK_QUEUE_FAMILY_EXTERNAL_KHX (~0U-1)
+#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)
+#define VK_QUEUE_FAMILY_EXTERNAL_KHR VK_QUEUE_FAMILY_EXTERNAL
+#define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2)
#define VK_SUBPASS_EXTERNAL (~0U)
-#define VK_MAX_DEVICE_GROUP_SIZE_KHX 32
+#define VK_MAX_DEVICE_GROUP_SIZE 32
+#define VK_MAX_DEVICE_GROUP_SIZE_KHR VK_MAX_DEVICE_GROUP_SIZE
#define VK_KHR_SURFACE_SPEC_VERSION 25
#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
#define VK_COLORSPACE_SRGB_NONLINEAR_KHR VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
-#define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
+#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70
#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
#define VK_NV_GLSL_SHADER_SPEC_VERSION 1
#define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader"
+#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
+#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted"
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
#define VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE 4
@@ -76,6 +82,12 @@
#define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot"
#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod"
+#define VK_AMD_SHADER_INFO_SPEC_VERSION 1
+#define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info"
+#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1
+#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod"
+#define VK_KHR_MULTIVIEW_SPEC_VERSION 1
+#define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview"
#define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
#define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc"
#define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
@@ -88,14 +100,17 @@
#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot"
#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote"
-#define VK_KHR_MAINTENANCE1_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE1_SPEC_VERSION 2
#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1"
-#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1
+#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2
#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
+#define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1
+#define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage"
#define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1
#define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present"
#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1
#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template"
+#define VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR 1
#define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
#define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling"
#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
@@ -108,15 +123,78 @@
#define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle"
#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
+#define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1
+#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization"
+#define VK_KHR_MAINTENANCE2_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2"
+#define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1
+#define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers"
+#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3
+#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
+#define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
+#define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
+#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1
+#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class"
+#define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
+#define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16"
+#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
+#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples"
+#define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1
+#define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask"
+#define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
+#define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export"
+#define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1
+#define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations"
+#define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1
+#define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout"
+#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1
+#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"
+#define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1
+#define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list"
+#define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
+#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
+#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
+#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color"
+#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
+#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples"
+#define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
+#define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle"
+#define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
+#define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage"
+#define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1
+#define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion"
+#define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1
+#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2"
+#define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1
+#define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache"
+#define VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT
+#define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2
+#define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing"
+#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
+#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer"
+#define VK_KHR_MAINTENANCE3_SPEC_VERSION 1
+#define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3"
+#define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
+#define VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_KHR_draw_indirect_count"
+#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2
+#define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority"
+#define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1
+#define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker"
+#define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 1
+#define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties"
+#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1
+#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor"
+#define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1
+#define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned"
#define VK_MAKE_VERSION(major, minor, patch) \
(((major) << 22) | ((minor) << 12) | (patch))
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
-
#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)
-#define VK_HEADER_VERSION 51
+#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)
+#define VK_HEADER_VERSION 76
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
#define VK_NULL_HANDLE 0
@@ -128,7 +206,8 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout)
-VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplateKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)
+typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR;
VK_DEFINE_HANDLE(VkDevice)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent)
@@ -145,10 +224,13 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool)
VK_DEFINE_HANDLE(VkQueue)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)
+typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR;
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
+VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT)
typedef uint32_t VkBool32;
typedef uint64_t VkDeviceSize;
@@ -166,29 +248,46 @@ typedef VkFlags VkCommandBufferResetFlags;
typedef VkFlags VkCommandBufferUsageFlags;
typedef VkFlags VkCommandPoolCreateFlags;
typedef VkFlags VkCommandPoolResetFlags;
-typedef VkFlags VkCommandPoolTrimFlagsKHR;
+typedef VkFlags VkCommandPoolTrimFlags;
+typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR;
typedef VkFlags VkCompositeAlphaFlagsKHR;
typedef VkFlags VkCullModeFlags;
typedef VkFlags VkDebugReportFlagsEXT;
+typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT;
+typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT;
+typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT;
+typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT;
typedef VkFlags VkDependencyFlags;
+typedef VkFlags VkDescriptorBindingFlagsEXT;
typedef VkFlags VkDescriptorPoolCreateFlags;
typedef VkFlags VkDescriptorPoolResetFlags;
typedef VkFlags VkDescriptorSetLayoutCreateFlags;
-typedef VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR;
+typedef VkFlags VkDescriptorUpdateTemplateCreateFlags;
+typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR;
typedef VkFlags VkDeviceCreateFlags;
-typedef VkFlags VkDeviceGroupPresentModeFlagsKHX;
+typedef VkFlags VkDeviceGroupPresentModeFlagsKHR;
typedef VkFlags VkDeviceQueueCreateFlags;
typedef VkFlags VkDisplayModeCreateFlagsKHR;
typedef VkFlags VkDisplayPlaneAlphaFlagsKHR;
typedef VkFlags VkDisplaySurfaceCreateFlagsKHR;
typedef VkFlags VkEventCreateFlags;
-typedef VkFlags VkExternalMemoryFeatureFlagsKHX;
+typedef VkFlags VkExternalFenceFeatureFlags;
+typedef VkExternalFenceFeatureFlags VkExternalFenceFeatureFlagsKHR;
+typedef VkFlags VkExternalFenceHandleTypeFlags;
+typedef VkExternalFenceHandleTypeFlags VkExternalFenceHandleTypeFlagsKHR;
+typedef VkFlags VkExternalMemoryFeatureFlags;
+typedef VkExternalMemoryFeatureFlags VkExternalMemoryFeatureFlagsKHR;
typedef VkFlags VkExternalMemoryFeatureFlagsNV;
-typedef VkFlags VkExternalMemoryHandleTypeFlagsKHX;
+typedef VkFlags VkExternalMemoryHandleTypeFlags;
+typedef VkExternalMemoryHandleTypeFlags VkExternalMemoryHandleTypeFlagsKHR;
typedef VkFlags VkExternalMemoryHandleTypeFlagsNV;
-typedef VkFlags VkExternalSemaphoreFeatureFlagsKHX;
-typedef VkFlags VkExternalSemaphoreHandleTypeFlagsKHX;
+typedef VkFlags VkExternalSemaphoreFeatureFlags;
+typedef VkExternalSemaphoreFeatureFlags VkExternalSemaphoreFeatureFlagsKHR;
+typedef VkFlags VkExternalSemaphoreHandleTypeFlags;
+typedef VkExternalSemaphoreHandleTypeFlags VkExternalSemaphoreHandleTypeFlagsKHR;
typedef VkFlags VkFenceCreateFlags;
+typedef VkFlags VkFenceImportFlags;
+typedef VkFenceImportFlags VkFenceImportFlagsKHR;
typedef VkFlags VkFormatFeatureFlags;
typedef VkFlags VkFramebufferCreateFlags;
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
@@ -199,15 +298,19 @@ typedef VkFlags VkImageViewCreateFlags;
typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX;
typedef VkFlags VkInstanceCreateFlags;
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
-typedef VkFlags VkMemoryAllocateFlagsKHX;
+typedef VkFlags VkMemoryAllocateFlags;
+typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR;
typedef VkFlags VkMemoryHeapFlags;
typedef VkFlags VkMemoryMapFlags;
typedef VkFlags VkMemoryPropertyFlags;
typedef VkFlags VkMirSurfaceCreateFlagsKHR;
typedef VkFlags VkObjectEntryUsageFlagsNVX;
-typedef VkFlags VkPeerMemoryFeatureFlagsKHX;
+typedef VkFlags VkPeerMemoryFeatureFlags;
+typedef VkPeerMemoryFeatureFlags VkPeerMemoryFeatureFlagsKHR;
typedef VkFlags VkPipelineCacheCreateFlags;
typedef VkFlags VkPipelineColorBlendStateCreateFlags;
+typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV;
+typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV;
typedef VkFlags VkPipelineCreateFlags;
typedef VkFlags VkPipelineDepthStencilStateCreateFlags;
typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT;
@@ -215,6 +318,7 @@ typedef VkFlags VkPipelineDynamicStateCreateFlags;
typedef VkFlags VkPipelineInputAssemblyStateCreateFlags;
typedef VkFlags VkPipelineLayoutCreateFlags;
typedef VkFlags VkPipelineMultisampleStateCreateFlags;
+typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT;
typedef VkFlags VkPipelineRasterizationStateCreateFlags;
typedef VkFlags VkPipelineShaderStageCreateFlags;
typedef VkFlags VkPipelineStageFlags;
@@ -231,15 +335,19 @@ typedef VkFlags VkRenderPassCreateFlags;
typedef VkFlags VkSampleCountFlags;
typedef VkFlags VkSamplerCreateFlags;
typedef VkFlags VkSemaphoreCreateFlags;
+typedef VkFlags VkSemaphoreImportFlags;
+typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR;
typedef VkFlags VkShaderModuleCreateFlags;
typedef VkFlags VkShaderStageFlags;
typedef VkFlags VkSparseImageFormatFlags;
typedef VkFlags VkSparseMemoryBindFlags;
typedef VkFlags VkStencilFaceFlags;
+typedef VkFlags VkSubgroupFeatureFlags;
typedef VkFlags VkSubpassDescriptionFlags;
typedef VkFlags VkSurfaceCounterFlagsEXT;
typedef VkFlags VkSurfaceTransformFlagsKHR;
typedef VkFlags VkSwapchainCreateFlagsKHR;
+typedef VkFlags VkValidationCacheCreateFlagsEXT;
typedef VkFlags VkViSurfaceCreateFlagsNN;
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
@@ -265,6 +373,7 @@ typedef enum VkAccessFlagBits
VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000,
+ VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000,
VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkAccessFlagBits;
@@ -320,6 +429,52 @@ typedef enum VkBlendOp
VK_BLEND_OP_REVERSE_SUBTRACT = 2,
VK_BLEND_OP_MIN = 3,
VK_BLEND_OP_MAX = 4,
+ VK_BLEND_OP_ZERO_EXT = 1000148000,
+ VK_BLEND_OP_SRC_EXT = 1000148001,
+ VK_BLEND_OP_DST_EXT = 1000148002,
+ VK_BLEND_OP_SRC_OVER_EXT = 1000148003,
+ VK_BLEND_OP_DST_OVER_EXT = 1000148004,
+ VK_BLEND_OP_SRC_IN_EXT = 1000148005,
+ VK_BLEND_OP_DST_IN_EXT = 1000148006,
+ VK_BLEND_OP_SRC_OUT_EXT = 1000148007,
+ VK_BLEND_OP_DST_OUT_EXT = 1000148008,
+ VK_BLEND_OP_SRC_ATOP_EXT = 1000148009,
+ VK_BLEND_OP_DST_ATOP_EXT = 1000148010,
+ VK_BLEND_OP_XOR_EXT = 1000148011,
+ VK_BLEND_OP_MULTIPLY_EXT = 1000148012,
+ VK_BLEND_OP_SCREEN_EXT = 1000148013,
+ VK_BLEND_OP_OVERLAY_EXT = 1000148014,
+ VK_BLEND_OP_DARKEN_EXT = 1000148015,
+ VK_BLEND_OP_LIGHTEN_EXT = 1000148016,
+ VK_BLEND_OP_COLORDODGE_EXT = 1000148017,
+ VK_BLEND_OP_COLORBURN_EXT = 1000148018,
+ VK_BLEND_OP_HARDLIGHT_EXT = 1000148019,
+ VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020,
+ VK_BLEND_OP_DIFFERENCE_EXT = 1000148021,
+ VK_BLEND_OP_EXCLUSION_EXT = 1000148022,
+ VK_BLEND_OP_INVERT_EXT = 1000148023,
+ VK_BLEND_OP_INVERT_RGB_EXT = 1000148024,
+ VK_BLEND_OP_LINEARDODGE_EXT = 1000148025,
+ VK_BLEND_OP_LINEARBURN_EXT = 1000148026,
+ VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027,
+ VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028,
+ VK_BLEND_OP_PINLIGHT_EXT = 1000148029,
+ VK_BLEND_OP_HARDMIX_EXT = 1000148030,
+ VK_BLEND_OP_HSL_HUE_EXT = 1000148031,
+ VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032,
+ VK_BLEND_OP_HSL_COLOR_EXT = 1000148033,
+ VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034,
+ VK_BLEND_OP_PLUS_EXT = 1000148035,
+ VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036,
+ VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037,
+ VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038,
+ VK_BLEND_OP_MINUS_EXT = 1000148039,
+ VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040,
+ VK_BLEND_OP_CONTRAST_EXT = 1000148041,
+ VK_BLEND_OP_INVERT_OVG_EXT = 1000148042,
+ VK_BLEND_OP_RED_EXT = 1000148043,
+ VK_BLEND_OP_GREEN_EXT = 1000148044,
+ VK_BLEND_OP_BLUE_EXT = 1000148045,
VK_BLEND_OP_MAX_ENUM = 0x7fffffff,
} VkBlendOp;
@@ -356,6 +511,13 @@ typedef enum VkBufferUsageFlagBits
VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkBufferUsageFlagBits;
+typedef enum VkChromaLocation
+{
+ VK_CHROMA_LOCATION_COSITED_EVEN = 0,
+ VK_CHROMA_LOCATION_MIDPOINT = 1,
+ VK_CHROMA_LOCATION_MAX_ENUM = 0x7fffffff,
+} VkChromaLocation;
+
typedef enum VkColorComponentFlagBits
{
VK_COLOR_COMPONENT_R_BIT = 0x00000001,
@@ -445,12 +607,14 @@ typedef enum VkDependencyFlagBits
typedef enum VkDescriptorPoolCreateFlagBits
{
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001,
+ VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = 0x00000002,
VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkDescriptorPoolCreateFlagBits;
typedef enum VkDescriptorSetLayoutCreateFlagBits
{
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001,
+ VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = 0x00000002,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkDescriptorSetLayoutCreateFlagBits;
@@ -470,12 +634,16 @@ typedef enum VkDescriptorType
VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7fffffff,
} VkDescriptorType;
-typedef enum VkDescriptorUpdateTemplateTypeKHR
+typedef enum VkDescriptorUpdateTemplateType
+{
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0,
+ VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7fffffff,
+} VkDescriptorUpdateTemplateType;
+
+typedef enum VkDeviceQueueCreateFlagBits
{
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0,
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1,
- VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_KHR_MAX_ENUM = 0x7fffffff,
-} VkDescriptorUpdateTemplateTypeKHR;
+ VK_DEVICE_QUEUE_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
+} VkDeviceQueueCreateFlagBits;
typedef enum VkDynamicState
{
@@ -490,6 +658,7 @@ typedef enum VkDynamicState
VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8,
VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000,
VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000,
+ VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000,
VK_DYNAMIC_STATE_MAX_ENUM = 0x7fffffff,
} VkDynamicState;
@@ -721,8 +890,7 @@ typedef enum VkFormatFeatureFlagBits
VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000,
- VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000,
- VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000,
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000,
VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkFormatFeatureFlagBits;
@@ -749,7 +917,7 @@ typedef enum VkImageCreateFlagBits
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010,
- VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020,
+ VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000,
VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkImageCreateFlagBits;
@@ -888,7 +1056,7 @@ typedef enum VkObjectType
VK_OBJECT_TYPE_COMMAND_POOL = 25,
VK_OBJECT_TYPE_SURFACE_KHR = 1000000000,
VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000,
- VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000,
+ VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000,
VK_OBJECT_TYPE_MAX_ENUM = 0x7fffffff,
} VkObjectType;
@@ -950,6 +1118,7 @@ typedef enum VkPolygonMode
VK_POLYGON_MODE_FILL = 0,
VK_POLYGON_MODE_LINE = 1,
VK_POLYGON_MODE_POINT = 2,
+ VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000,
VK_POLYGON_MODE_MAX_ENUM = 0x7fffffff,
} VkPolygonMode;
@@ -1019,7 +1188,8 @@ typedef enum VkQueueFlagBits
typedef enum VkResult
{
- VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000,
+ VK_ERROR_NOT_PERMITTED_EXT = -1000174001,
+ VK_ERROR_FRAGMENTATION_EXT = -1000161000,
VK_ERROR_INVALID_SHADER_NV = -1000012000,
VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
@@ -1074,6 +1244,31 @@ typedef enum VkSamplerMipmapMode
VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7fffffff,
} VkSamplerMipmapMode;
+typedef enum VkSamplerYcbcrModelConversion
+{
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4,
+ VK_SAMPLER_YCBCR_MODEL_CONVERSION_MAX_ENUM = 0x7fffffff,
+} VkSamplerYcbcrModelConversion;
+
+typedef enum VkSamplerYcbcrRange
+{
+ VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0,
+ VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1,
+ VK_SAMPLER_YCBCR_RANGE_MAX_ENUM = 0x7fffffff,
+} VkSamplerYcbcrRange;
+
+typedef enum VkShaderInfoTypeAMD
+{
+ VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0,
+ VK_SHADER_INFO_TYPE_BINARY_AMD = 1,
+ VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2,
+ VK_SHADER_INFO_TYPE_AMD_MAX_ENUM = 0x7fffffff,
+} VkShaderInfoTypeAMD;
+
typedef enum VkShaderStageFlagBits
{
VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
@@ -1182,22 +1377,38 @@ typedef enum VkStructureType
VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000,
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000,
VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001,
- VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002,
- VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004,
- VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006,
- VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000,
VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000,
- VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000,
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000,
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000,
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000,
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000,
+ VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001,
+ VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000,
+ VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001,
+ VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003,
+ VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004,
+ VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001,
+ VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002,
+ VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000,
+ VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000,
+ VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000,
+ VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003,
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004,
+ VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000,
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001,
VK_STRUCTURE_TYPE_MAX_ENUM = 0x7fffffff,
} VkStructureType;
@@ -1276,18 +1487,46 @@ typedef void* (VKAPI_PTR * PFN_vkReallocationFunction)(
typedef void (VKAPI_PTR * PFN_vkVoidFunction)(
void);
-typedef struct VkAttachmentDescription
+typedef struct VkApplicationInfo
{
- VkAttachmentDescriptionFlags flags;
- VkFormat format;
- VkSampleCountFlagBits samples;
- VkAttachmentLoadOp loadOp;
- VkAttachmentStoreOp storeOp;
- VkAttachmentLoadOp stencilLoadOp;
- VkAttachmentStoreOp stencilStoreOp;
- VkImageLayout initialLayout;
- VkImageLayout finalLayout;
-} VkAttachmentDescription;
+ VkStructureType sType;
+ const void *pNext;
+ const char *pApplicationName;
+ uint32_t applicationVersion;
+ const char *pEngineName;
+ uint32_t engineVersion;
+ uint32_t apiVersion;
+} VkApplicationInfo;
+
+typedef struct VkAttachmentReference
+{
+ uint32_t attachment;
+ VkImageLayout layout;
+} VkAttachmentReference;
+
+typedef struct VkBaseInStructure
+{
+ VkStructureType sType;
+ const struct VkBaseInStructure *pNext;
+} VkBaseInStructure;
+
+typedef struct VkBindBufferMemoryInfo
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkBuffer WINE_VK_ALIGN(8) buffer;
+ VkDeviceMemory WINE_VK_ALIGN(8) memory;
+ VkDeviceSize WINE_VK_ALIGN(8) memoryOffset;
+} VkBindBufferMemoryInfo;
+
+typedef struct VkBindImageMemoryInfo
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkImage WINE_VK_ALIGN(8) image;
+ VkDeviceMemory WINE_VK_ALIGN(8) memory;
+ VkDeviceSize WINE_VK_ALIGN(8) memoryOffset;
+} VkBindImageMemoryInfo;
typedef struct VkBufferCopy
{
@@ -1358,12 +1597,12 @@ typedef struct VkCopyDescriptorSet
uint32_t descriptorCount;
} VkCopyDescriptorSet;
-typedef struct VkDescriptorImageInfo
+typedef struct VkDescriptorBufferInfo
{
- VkSampler WINE_VK_ALIGN(8) sampler;
- VkImageView WINE_VK_ALIGN(8) imageView;
- VkImageLayout imageLayout;
-} VkDescriptorImageInfo;
+ VkBuffer WINE_VK_ALIGN(8) buffer;
+ VkDeviceSize WINE_VK_ALIGN(8) offset;
+ VkDeviceSize WINE_VK_ALIGN(8) range;
+} VkDescriptorBufferInfo;
typedef struct VkDescriptorPoolSize
{
@@ -1380,22 +1619,24 @@ typedef struct VkDescriptorSetLayoutBinding
const VkSampler *pImmutableSamplers;
} VkDescriptorSetLayoutBinding;
-typedef struct VkDescriptorUpdateTemplateEntryKHR
+typedef struct VkDescriptorSetLayoutCreateInfo
{
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- VkDescriptorType descriptorType;
- size_t offset;
- size_t stride;
-} VkDescriptorUpdateTemplateEntryKHR;
+ VkStructureType sType;
+ const void *pNext;
+ VkDescriptorSetLayoutCreateFlags flags;
+ uint32_t bindingCount;
+ const VkDescriptorSetLayoutBinding *pBindings;
+} VkDescriptorSetLayoutCreateInfo;
-typedef struct VkDispatchIndirectCommand
+typedef struct VkDeviceQueueCreateInfo
{
- uint32_t x;
- uint32_t y;
- uint32_t z;
-} VkDispatchIndirectCommand;
+ VkStructureType sType;
+ const void *pNext;
+ VkDeviceQueueCreateFlags flags;
+ uint32_t queueFamilyIndex;
+ uint32_t queueCount;
+ const float *pQueuePriorities;
+} VkDeviceQueueCreateInfo;
typedef struct VkDrawIndirectCommand
{
@@ -1405,18 +1646,11 @@ typedef struct VkDrawIndirectCommand
uint32_t firstInstance;
} VkDrawIndirectCommand;
-typedef struct VkExtensionProperties
-{
- char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
- uint32_t specVersion;
-} VkExtensionProperties;
-
-typedef struct VkExtent3D
+typedef struct VkExtent2D
{
uint32_t width;
uint32_t height;
- uint32_t depth;
-} VkExtent3D;
+} VkExtent2D;
typedef struct VkFormatProperties
{
@@ -1425,37 +1659,19 @@ typedef struct VkFormatProperties
VkFormatFeatureFlags bufferFeatures;
} VkFormatProperties;
-typedef struct VkFramebufferCreateInfo
+typedef struct VkImageMemoryRequirementsInfo2
{
VkStructureType sType;
const void *pNext;
- VkFramebufferCreateFlags flags;
- VkRenderPass WINE_VK_ALIGN(8) renderPass;
- uint32_t attachmentCount;
- const VkImageView *pAttachments;
- uint32_t width;
- uint32_t height;
- uint32_t layers;
-} VkFramebufferCreateInfo;
+ VkImage WINE_VK_ALIGN(8) image;
+} VkImageMemoryRequirementsInfo2;
-typedef struct VkImageCreateInfo
+typedef struct VkImageSparseMemoryRequirementsInfo2
{
VkStructureType sType;
const void *pNext;
- VkImageCreateFlags flags;
- VkImageType imageType;
- VkFormat format;
- VkExtent3D extent;
- uint32_t mipLevels;
- uint32_t arrayLayers;
- VkSampleCountFlagBits samples;
- VkImageTiling tiling;
- VkImageUsageFlags usage;
- VkSharingMode sharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t *pQueueFamilyIndices;
- VkImageLayout initialLayout;
-} VkImageCreateInfo;
+ VkImage WINE_VK_ALIGN(8) image;
+} VkImageSparseMemoryRequirementsInfo2;
typedef struct VkImageSubresource
{
@@ -1502,20 +1718,20 @@ typedef struct VkMappedMemoryRange
VkDeviceSize WINE_VK_ALIGN(8) size;
} VkMappedMemoryRange;
-typedef struct VkMemoryAllocateInfo
+typedef struct VkMemoryBarrier
{
VkStructureType sType;
const void *pNext;
- VkDeviceSize WINE_VK_ALIGN(8) allocationSize;
- uint32_t memoryTypeIndex;
-} VkMemoryAllocateInfo;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+} VkMemoryBarrier;
-typedef struct VkMemoryRequirements
+typedef struct VkMultisamplePropertiesEXT
{
- VkDeviceSize WINE_VK_ALIGN(8) size;
- VkDeviceSize WINE_VK_ALIGN(8) alignment;
- uint32_t memoryTypeBits;
-} VkMemoryRequirements;
+ VkStructureType sType;
+ void *pNext;
+ VkExtent2D maxSampleLocationGridSize;
+} VkMultisamplePropertiesEXT;
typedef struct VkOffset3D
{
@@ -1524,75 +1740,16 @@ typedef struct VkOffset3D
int32_t z;
} VkOffset3D;
-typedef struct VkPhysicalDeviceFeatures
-{
- VkBool32 robustBufferAccess;
- VkBool32 fullDrawIndexUint32;
- VkBool32 imageCubeArray;
- VkBool32 independentBlend;
- VkBool32 geometryShader;
- VkBool32 tessellationShader;
- VkBool32 sampleRateShading;
- VkBool32 dualSrcBlend;
- VkBool32 logicOp;
- VkBool32 multiDrawIndirect;
- VkBool32 drawIndirectFirstInstance;
- VkBool32 depthClamp;
- VkBool32 depthBiasClamp;
- VkBool32 fillModeNonSolid;
- VkBool32 depthBounds;
- VkBool32 wideLines;
- VkBool32 largePoints;
- VkBool32 alphaToOne;
- VkBool32 multiViewport;
- VkBool32 samplerAnisotropy;
- VkBool32 textureCompressionETC2;
- VkBool32 textureCompressionASTC_LDR;
- VkBool32 textureCompressionBC;
- VkBool32 occlusionQueryPrecise;
- VkBool32 pipelineStatisticsQuery;
- VkBool32 vertexPipelineStoresAndAtomics;
- VkBool32 fragmentStoresAndAtomics;
- VkBool32 shaderTessellationAndGeometryPointSize;
- VkBool32 shaderImageGatherExtended;
- VkBool32 shaderStorageImageExtendedFormats;
- VkBool32 shaderStorageImageMultisample;
- VkBool32 shaderStorageImageReadWithoutFormat;
- VkBool32 shaderStorageImageWriteWithoutFormat;
- VkBool32 shaderUniformBufferArrayDynamicIndexing;
- VkBool32 shaderSampledImageArrayDynamicIndexing;
- VkBool32 shaderStorageBufferArrayDynamicIndexing;
- VkBool32 shaderStorageImageArrayDynamicIndexing;
- VkBool32 shaderClipDistance;
- VkBool32 shaderCullDistance;
- VkBool32 shaderFloat64;
- VkBool32 shaderInt64;
- VkBool32 shaderInt16;
- VkBool32 shaderResourceResidency;
- VkBool32 shaderResourceMinLod;
- VkBool32 sparseBinding;
- VkBool32 sparseResidencyBuffer;
- VkBool32 sparseResidencyImage2D;
- VkBool32 sparseResidencyImage3D;
- VkBool32 sparseResidency2Samples;
- VkBool32 sparseResidency4Samples;
- VkBool32 sparseResidency8Samples;
- VkBool32 sparseResidency16Samples;
- VkBool32 sparseResidencyAliased;
- VkBool32 variableMultisampleRate;
- VkBool32 inheritedQueries;
-} VkPhysicalDeviceFeatures;
-
-typedef struct VkPhysicalDeviceImageFormatInfo2KHR
+typedef struct VkPhysicalDeviceSparseImageFormatInfo2
{
VkStructureType sType;
const void *pNext;
VkFormat format;
VkImageType type;
- VkImageTiling tiling;
+ VkSampleCountFlagBits samples;
VkImageUsageFlags usage;
- VkImageCreateFlags flags;
-} VkPhysicalDeviceImageFormatInfo2KHR;
+ VkImageTiling tiling;
+} VkPhysicalDeviceSparseImageFormatInfo2;
typedef struct VkPhysicalDeviceSparseProperties
{
@@ -1612,6 +1769,18 @@ typedef struct VkPipelineCacheCreateInfo
const void *pInitialData;
} VkPipelineCacheCreateInfo;
+typedef struct VkPipelineColorBlendAttachmentState
+{
+ VkBool32 blendEnable;
+ VkBlendFactor srcColorBlendFactor;
+ VkBlendFactor dstColorBlendFactor;
+ VkBlendOp colorBlendOp;
+ VkBlendFactor srcAlphaBlendFactor;
+ VkBlendFactor dstAlphaBlendFactor;
+ VkBlendOp alphaBlendOp;
+ VkColorComponentFlags colorWriteMask;
+} VkPipelineColorBlendAttachmentState;
+
typedef struct VkPipelineInputAssemblyStateCreateInfo
{
VkStructureType sType;
@@ -1634,6 +1803,23 @@ typedef struct VkPipelineMultisampleStateCreateInfo
VkBool32 alphaToOneEnable;
} VkPipelineMultisampleStateCreateInfo;
+typedef struct VkPipelineRasterizationStateCreateInfo
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkPipelineRasterizationStateCreateFlags flags;
+ VkBool32 depthClampEnable;
+ VkBool32 rasterizerDiscardEnable;
+ VkPolygonMode polygonMode;
+ VkCullModeFlags cullMode;
+ VkFrontFace frontFace;
+ VkBool32 depthBiasEnable;
+ float depthBiasConstantFactor;
+ float depthBiasClamp;
+ float depthBiasSlopeFactor;
+ float lineWidth;
+} VkPipelineRasterizationStateCreateInfo;
+
typedef struct VkPipelineTessellationStateCreateInfo
{
VkStructureType sType;
@@ -1654,48 +1840,55 @@ typedef struct VkPresentInfoKHR
VkResult *pResults;
} VkPresentInfoKHR;
-typedef struct VkQueryPoolCreateInfo
+typedef struct VkPushConstantRange
{
- VkStructureType sType;
- const void *pNext;
- VkQueryPoolCreateFlags flags;
- VkQueryType queryType;
- uint32_t queryCount;
- VkQueryPipelineStatisticFlags pipelineStatistics;
-} VkQueryPoolCreateInfo;
+ VkShaderStageFlags stageFlags;
+ uint32_t offset;
+ uint32_t size;
+} VkPushConstantRange;
-typedef struct VkSemaphoreCreateInfo
+typedef struct VkSamplerCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkSemaphoreCreateFlags flags;
-} VkSemaphoreCreateInfo;
-
-typedef struct VkSparseImageFormatProperties
-{
- VkImageAspectFlags aspectMask;
- VkExtent3D imageGranularity;
- VkSparseImageFormatFlags flags;
-} VkSparseImageFormatProperties;
+ VkSamplerCreateFlags flags;
+ VkFilter magFilter;
+ VkFilter minFilter;
+ VkSamplerMipmapMode mipmapMode;
+ VkSamplerAddressMode addressModeU;
+ VkSamplerAddressMode addressModeV;
+ VkSamplerAddressMode addressModeW;
+ float mipLodBias;
+ VkBool32 anisotropyEnable;
+ float maxAnisotropy;
+ VkBool32 compareEnable;
+ VkCompareOp compareOp;
+ float minLod;
+ float maxLod;
+ VkBorderColor borderColor;
+ VkBool32 unnormalizedCoordinates;
+} VkSamplerCreateInfo;
-typedef struct VkSparseImageMemoryBind
+typedef struct VkSamplerYcbcrConversionCreateInfo
{
- VkImageSubresource subresource;
- VkOffset3D offset;
- VkExtent3D extent;
- VkDeviceMemory WINE_VK_ALIGN(8) memory;
- VkDeviceSize WINE_VK_ALIGN(8) memoryOffset;
- VkSparseMemoryBindFlags flags;
-} VkSparseImageMemoryBind;
+ VkStructureType sType;
+ const void *pNext;
+ VkFormat format;
+ VkSamplerYcbcrModelConversion ycbcrModel;
+ VkSamplerYcbcrRange ycbcrRange;
+ VkComponentMapping components;
+ VkChromaLocation xChromaOffset;
+ VkChromaLocation yChromaOffset;
+ VkFilter chromaFilter;
+ VkBool32 forceExplicitReconstruction;
+} VkSamplerYcbcrConversionCreateInfo;
-typedef struct VkSparseImageMemoryRequirements
+typedef struct VkSemaphoreCreateInfo
{
- VkSparseImageFormatProperties formatProperties;
- uint32_t imageMipTailFirstLod;
- VkDeviceSize WINE_VK_ALIGN(8) imageMipTailSize;
- VkDeviceSize WINE_VK_ALIGN(8) imageMipTailOffset;
- VkDeviceSize WINE_VK_ALIGN(8) imageMipTailStride;
-} VkSparseImageMemoryRequirements;
+ VkStructureType sType;
+ const void *pNext;
+ VkSemaphoreCreateFlags flags;
+} VkSemaphoreCreateInfo;
typedef struct VkSparseMemoryBind
{
@@ -1726,6 +1919,20 @@ typedef struct VkSubmitInfo
const VkSemaphore *pSignalSemaphores;
} VkSubmitInfo;
+typedef struct VkSubpassDescription
+{
+ VkSubpassDescriptionFlags flags;
+ VkPipelineBindPoint pipelineBindPoint;
+ uint32_t inputAttachmentCount;
+ const VkAttachmentReference *pInputAttachments;
+ uint32_t colorAttachmentCount;
+ const VkAttachmentReference *pColorAttachments;
+ const VkAttachmentReference *pResolveAttachments;
+ const VkAttachmentReference *pDepthStencilAttachment;
+ uint32_t preserveAttachmentCount;
+ const uint32_t *pPreserveAttachments;
+} VkSubpassDescription;
+
typedef struct VkSubresourceLayout
{
VkDeviceSize WINE_VK_ALIGN(8) offset;
@@ -1735,13 +1942,12 @@ typedef struct VkSubresourceLayout
VkDeviceSize WINE_VK_ALIGN(8) depthPitch;
} VkSubresourceLayout;
-typedef struct VkVertexInputAttributeDescription
+typedef struct VkVertexInputBindingDescription
{
- uint32_t location;
uint32_t binding;
- VkFormat format;
- uint32_t offset;
-} VkVertexInputAttributeDescription;
+ uint32_t stride;
+ VkVertexInputRate inputRate;
+} VkVertexInputBindingDescription;
typedef struct VkAllocationCallbacks
{
@@ -1753,12 +1959,6 @@ typedef struct VkAllocationCallbacks
PFN_vkInternalFreeNotification pfnInternalFree;
} VkAllocationCallbacks;
-typedef struct VkAttachmentReference
-{
- uint32_t attachment;
- VkImageLayout layout;
-} VkAttachmentReference;
-
typedef struct VkBufferCreateInfo
{
VkStructureType sType;
@@ -1771,16 +1971,12 @@ typedef struct VkBufferCreateInfo
const uint32_t *pQueueFamilyIndices;
} VkBufferCreateInfo;
-typedef struct VkBufferViewCreateInfo
+typedef struct VkBufferMemoryRequirementsInfo2
{
VkStructureType sType;
const void *pNext;
- VkBufferViewCreateFlags flags;
VkBuffer WINE_VK_ALIGN(8) buffer;
- VkFormat format;
- VkDeviceSize WINE_VK_ALIGN(8) offset;
- VkDeviceSize WINE_VK_ALIGN(8) range;
-} VkBufferViewCreateInfo;
+} VkBufferMemoryRequirementsInfo2;
typedef struct VkClearDepthStencilValue
{
@@ -1802,35 +1998,25 @@ typedef struct VkCommandBufferBeginInfo
const VkCommandBufferInheritanceInfo *pInheritanceInfo;
} VkCommandBufferBeginInfo;
-typedef struct VkDescriptorBufferInfo
-{
- VkBuffer WINE_VK_ALIGN(8) buffer;
- VkDeviceSize WINE_VK_ALIGN(8) offset;
- VkDeviceSize WINE_VK_ALIGN(8) range;
-} VkDescriptorBufferInfo;
-
-typedef struct VkDescriptorSetAllocateInfo
+typedef struct VkDescriptorPoolCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkDescriptorPool WINE_VK_ALIGN(8) descriptorPool;
- uint32_t descriptorSetCount;
- const VkDescriptorSetLayout *pSetLayouts;
-} VkDescriptorSetAllocateInfo;
+ VkDescriptorPoolCreateFlags flags;
+ uint32_t maxSets;
+ uint32_t poolSizeCount;
+ const VkDescriptorPoolSize *pPoolSizes;
+} VkDescriptorPoolCreateInfo;
-typedef struct VkDescriptorUpdateTemplateCreateInfoKHR
+typedef struct VkDescriptorUpdateTemplateEntry
{
- VkStructureType sType;
- void *pNext;
- VkDescriptorUpdateTemplateCreateFlagsKHR flags;
- uint32_t descriptorUpdateEntryCount;
- const VkDescriptorUpdateTemplateEntryKHR *pDescriptorUpdateEntries;
- VkDescriptorUpdateTemplateTypeKHR templateType;
- VkDescriptorSetLayout WINE_VK_ALIGN(8) descriptorSetLayout;
- VkPipelineBindPoint pipelineBindPoint;
- VkPipelineLayout WINE_VK_ALIGN(8) pipelineLayout;
- uint32_t set;
-} VkDescriptorUpdateTemplateCreateInfoKHR;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ VkDescriptorType descriptorType;
+ size_t offset;
+ size_t stride;
+} VkDescriptorUpdateTemplateEntry;
typedef struct VkEventCreateInfo
{
@@ -1839,27 +2025,25 @@ typedef struct VkEventCreateInfo
VkEventCreateFlags flags;
} VkEventCreateInfo;
-typedef struct VkExtent2D
+typedef struct VkExtensionProperties
{
- uint32_t width;
- uint32_t height;
-} VkExtent2D;
+ char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
+ uint32_t specVersion;
+} VkExtensionProperties;
-typedef struct VkFormatProperties2KHR
+typedef struct VkFenceCreateInfo
{
VkStructureType sType;
- void *pNext;
- VkFormatProperties formatProperties;
-} VkFormatProperties2KHR;
+ const void *pNext;
+ VkFenceCreateFlags flags;
+} VkFenceCreateInfo;
-typedef struct VkImageFormatProperties
+typedef struct VkFormatProperties2
{
- VkExtent3D maxExtent;
- uint32_t maxMipLevels;
- uint32_t maxArrayLayers;
- VkSampleCountFlags sampleCounts;
- VkDeviceSize WINE_VK_ALIGN(8) maxResourceSize;
-} VkImageFormatProperties;
+ VkStructureType sType;
+ void *pNext;
+ VkFormatProperties formatProperties;
+} VkFormatProperties2;
typedef struct VkImageMemoryBarrier
{
@@ -1875,21 +2059,20 @@ typedef struct VkImageMemoryBarrier
VkImageSubresourceRange subresourceRange;
} VkImageMemoryBarrier;
-typedef struct VkImageSubresourceLayers
-{
- VkImageAspectFlags aspectMask;
- uint32_t mipLevel;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
-} VkImageSubresourceLayers;
-
-typedef struct VkMemoryBarrier
+typedef struct VkMemoryAllocateInfo
{
VkStructureType sType;
const void *pNext;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
-} VkMemoryBarrier;
+ VkDeviceSize WINE_VK_ALIGN(8) allocationSize;
+ uint32_t memoryTypeIndex;
+} VkMemoryAllocateInfo;
+
+typedef struct VkMemoryRequirements
+{
+ VkDeviceSize WINE_VK_ALIGN(8) size;
+ VkDeviceSize WINE_VK_ALIGN(8) alignment;
+ uint32_t memoryTypeBits;
+} VkMemoryRequirements;
typedef struct VkMemoryType
{
@@ -1897,28 +2080,93 @@ typedef struct VkMemoryType
uint32_t heapIndex;
} VkMemoryType;
-typedef struct VkPhysicalDeviceSparseImageFormatInfo2KHR
+typedef struct VkOffset2D
+{
+ int32_t x;
+ int32_t y;
+} VkOffset2D;
+
+typedef struct VkPhysicalDeviceFeatures
+{
+ VkBool32 robustBufferAccess;
+ VkBool32 fullDrawIndexUint32;
+ VkBool32 imageCubeArray;
+ VkBool32 independentBlend;
+ VkBool32 geometryShader;
+ VkBool32 tessellationShader;
+ VkBool32 sampleRateShading;
+ VkBool32 dualSrcBlend;
+ VkBool32 logicOp;
+ VkBool32 multiDrawIndirect;
+ VkBool32 drawIndirectFirstInstance;
+ VkBool32 depthClamp;
+ VkBool32 depthBiasClamp;
+ VkBool32 fillModeNonSolid;
+ VkBool32 depthBounds;
+ VkBool32 wideLines;
+ VkBool32 largePoints;
+ VkBool32 alphaToOne;
+ VkBool32 multiViewport;
+ VkBool32 samplerAnisotropy;
+ VkBool32 textureCompressionETC2;
+ VkBool32 textureCompressionASTC_LDR;
+ VkBool32 textureCompressionBC;
+ VkBool32 occlusionQueryPrecise;
+ VkBool32 pipelineStatisticsQuery;
+ VkBool32 vertexPipelineStoresAndAtomics;
+ VkBool32 fragmentStoresAndAtomics;
+ VkBool32 shaderTessellationAndGeometryPointSize;
+ VkBool32 shaderImageGatherExtended;
+ VkBool32 shaderStorageImageExtendedFormats;
+ VkBool32 shaderStorageImageMultisample;
+ VkBool32 shaderStorageImageReadWithoutFormat;
+ VkBool32 shaderStorageImageWriteWithoutFormat;
+ VkBool32 shaderUniformBufferArrayDynamicIndexing;
+ VkBool32 shaderSampledImageArrayDynamicIndexing;
+ VkBool32 shaderStorageBufferArrayDynamicIndexing;
+ VkBool32 shaderStorageImageArrayDynamicIndexing;
+ VkBool32 shaderClipDistance;
+ VkBool32 shaderCullDistance;
+ VkBool32 shaderFloat64;
+ VkBool32 shaderInt64;
+ VkBool32 shaderInt16;
+ VkBool32 shaderResourceResidency;
+ VkBool32 shaderResourceMinLod;
+ VkBool32 sparseBinding;
+ VkBool32 sparseResidencyBuffer;
+ VkBool32 sparseResidencyImage2D;
+ VkBool32 sparseResidencyImage3D;
+ VkBool32 sparseResidency2Samples;
+ VkBool32 sparseResidency4Samples;
+ VkBool32 sparseResidency8Samples;
+ VkBool32 sparseResidency16Samples;
+ VkBool32 sparseResidencyAliased;
+ VkBool32 variableMultisampleRate;
+ VkBool32 inheritedQueries;
+} VkPhysicalDeviceFeatures;
+
+typedef struct VkPhysicalDeviceImageFormatInfo2
{
VkStructureType sType;
const void *pNext;
VkFormat format;
VkImageType type;
- VkSampleCountFlagBits samples;
- VkImageUsageFlags usage;
VkImageTiling tiling;
-} VkPhysicalDeviceSparseImageFormatInfo2KHR;
+ VkImageUsageFlags usage;
+ VkImageCreateFlags flags;
+} VkPhysicalDeviceImageFormatInfo2;
-typedef struct VkPipelineColorBlendAttachmentState
+typedef struct VkPipelineColorBlendStateCreateInfo
{
- VkBool32 blendEnable;
- VkBlendFactor srcColorBlendFactor;
- VkBlendFactor dstColorBlendFactor;
- VkBlendOp colorBlendOp;
- VkBlendFactor srcAlphaBlendFactor;
- VkBlendFactor dstAlphaBlendFactor;
- VkBlendOp alphaBlendOp;
- VkColorComponentFlags colorWriteMask;
-} VkPipelineColorBlendAttachmentState;
+ VkStructureType sType;
+ const void *pNext;
+ VkPipelineColorBlendStateCreateFlags flags;
+ VkBool32 logicOpEnable;
+ VkLogicOp logicOp;
+ uint32_t attachmentCount;
+ const VkPipelineColorBlendAttachmentState *pAttachments;
+ float blendConstants[4];
+} VkPipelineColorBlendStateCreateInfo;
typedef struct VkPipelineDynamicStateCreateInfo
{
@@ -1929,52 +2177,38 @@ typedef struct VkPipelineDynamicStateCreateInfo
const VkDynamicState *pDynamicStates;
} VkPipelineDynamicStateCreateInfo;
-typedef struct VkPipelineRasterizationStateCreateInfo
+typedef struct VkQueryPoolCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkPipelineRasterizationStateCreateFlags flags;
- VkBool32 depthClampEnable;
- VkBool32 rasterizerDiscardEnable;
- VkPolygonMode polygonMode;
- VkCullModeFlags cullMode;
- VkFrontFace frontFace;
- VkBool32 depthBiasEnable;
- float depthBiasConstantFactor;
- float depthBiasClamp;
- float depthBiasSlopeFactor;
- float lineWidth;
-} VkPipelineRasterizationStateCreateInfo;
+ VkQueryPoolCreateFlags flags;
+ VkQueryType queryType;
+ uint32_t queryCount;
+ VkQueryPipelineStatisticFlags pipelineStatistics;
+} VkQueryPoolCreateInfo;
-typedef struct VkQueueFamilyProperties
+typedef struct VkRect2D
{
- VkQueueFlags queueFlags;
- uint32_t queueCount;
- uint32_t timestampValidBits;
- VkExtent3D minImageTransferGranularity;
-} VkQueueFamilyProperties;
+ VkOffset2D offset;
+ VkExtent2D extent;
+} VkRect2D;
-typedef struct VkSamplerCreateInfo
+typedef struct VkRenderPassBeginInfo
{
VkStructureType sType;
const void *pNext;
- VkSamplerCreateFlags flags;
- VkFilter magFilter;
- VkFilter minFilter;
- VkSamplerMipmapMode mipmapMode;
- VkSamplerAddressMode addressModeU;
- VkSamplerAddressMode addressModeV;
- VkSamplerAddressMode addressModeW;
- float mipLodBias;
- VkBool32 anisotropyEnable;
- float maxAnisotropy;
- VkBool32 compareEnable;
- VkCompareOp compareOp;
- float minLod;
- float maxLod;
- VkBorderColor borderColor;
- VkBool32 unnormalizedCoordinates;
-} VkSamplerCreateInfo;
+ VkRenderPass WINE_VK_ALIGN(8) renderPass;
+ VkFramebuffer WINE_VK_ALIGN(8) framebuffer;
+ VkRect2D renderArea;
+ uint32_t clearValueCount;
+ const VkClearValue *pClearValues;
+} VkRenderPassBeginInfo;
+
+typedef struct VkSampleLocationEXT
+{
+ float x;
+ float y;
+} VkSampleLocationEXT;
typedef struct VkSparseBufferMemoryBindInfo
{
@@ -1983,37 +2217,67 @@ typedef struct VkSparseBufferMemoryBindInfo
const VkSparseMemoryBind *pBinds;
} VkSparseBufferMemoryBindInfo;
-typedef struct VkSparseImageMemoryBindInfo
+typedef struct VkSparseImageOpaqueMemoryBindInfo
{
VkImage WINE_VK_ALIGN(8) image;
uint32_t bindCount;
- const VkSparseImageMemoryBind *pBinds;
-} VkSparseImageMemoryBindInfo;
+ const VkSparseMemoryBind *pBinds;
+} VkSparseImageOpaqueMemoryBindInfo;
-typedef struct VkSpecializationInfo
+typedef struct VkStencilOpState
{
- uint32_t mapEntryCount;
- const VkSpecializationMapEntry *pMapEntries;
- size_t dataSize;
- const void *pData;
-} VkSpecializationInfo;
+ VkStencilOp failOp;
+ VkStencilOp passOp;
+ VkStencilOp depthFailOp;
+ VkCompareOp compareOp;
+ uint32_t compareMask;
+ uint32_t writeMask;
+ uint32_t reference;
+} VkStencilOpState;
-typedef struct VkSubpassDependency
+typedef struct VkSurfaceCapabilitiesKHR
{
- uint32_t srcSubpass;
- uint32_t dstSubpass;
- VkPipelineStageFlags srcStageMask;
- VkPipelineStageFlags dstStageMask;
- VkAccessFlags srcAccessMask;
- VkAccessFlags dstAccessMask;
- VkDependencyFlags dependencyFlags;
-} VkSubpassDependency;
+ uint32_t minImageCount;
+ uint32_t maxImageCount;
+ VkExtent2D currentExtent;
+ VkExtent2D minImageExtent;
+ VkExtent2D maxImageExtent;
+ uint32_t maxImageArrayLayers;
+ VkSurfaceTransformFlagsKHR supportedTransforms;
+ VkSurfaceTransformFlagBitsKHR currentTransform;
+ VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
+ VkImageUsageFlags supportedUsageFlags;
+} VkSurfaceCapabilitiesKHR;
-typedef struct VkSurfaceFormatKHR
+typedef struct VkSwapchainCreateInfoKHR
{
+ VkStructureType sType;
+ const void *pNext;
+ VkSwapchainCreateFlagsKHR flags;
+ VkSurfaceKHR WINE_VK_ALIGN(8) surface;
+ uint32_t minImageCount;
+ VkFormat imageFormat;
+ VkColorSpaceKHR imageColorSpace;
+ VkExtent2D imageExtent;
+ uint32_t imageArrayLayers;
+ VkImageUsageFlags imageUsage;
+ VkSharingMode imageSharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t *pQueueFamilyIndices;
+ VkSurfaceTransformFlagBitsKHR preTransform;
+ VkCompositeAlphaFlagBitsKHR compositeAlpha;
+ VkPresentModeKHR presentMode;
+ VkBool32 clipped;
+ VkSwapchainKHR WINE_VK_ALIGN(8) oldSwapchain;
+} VkSwapchainCreateInfoKHR;
+
+typedef struct VkVertexInputAttributeDescription
+{
+ uint32_t location;
+ uint32_t binding;
VkFormat format;
- VkColorSpaceKHR colorSpace;
-} VkSurfaceFormatKHR;
+ uint32_t offset;
+} VkVertexInputAttributeDescription;
typedef struct VkViewport
{
@@ -2025,113 +2289,157 @@ typedef struct VkViewport
float maxDepth;
} VkViewport;
-typedef struct VkWriteDescriptorSet
+typedef struct VkBaseOutStructure
{
VkStructureType sType;
- const void *pNext;
- VkDescriptorSet WINE_VK_ALIGN(8) dstSet;
- uint32_t dstBinding;
- uint32_t dstArrayElement;
- uint32_t descriptorCount;
- VkDescriptorType descriptorType;
- const VkDescriptorImageInfo *pImageInfo;
- const VkDescriptorBufferInfo *pBufferInfo;
- const VkBufferView *pTexelBufferView;
-} VkWriteDescriptorSet;
+ struct VkBaseOutStructure *pNext;
+} VkBaseOutStructure;
-typedef struct VkApplicationInfo
+typedef struct VkBufferViewCreateInfo
{
VkStructureType sType;
const void *pNext;
- const char *pApplicationName;
- uint32_t applicationVersion;
- const char *pEngineName;
- uint32_t engineVersion;
- uint32_t apiVersion;
-} VkApplicationInfo;
+ VkBufferViewCreateFlags flags;
+ VkBuffer WINE_VK_ALIGN(8) buffer;
+ VkFormat format;
+ VkDeviceSize WINE_VK_ALIGN(8) offset;
+ VkDeviceSize WINE_VK_ALIGN(8) range;
+} VkBufferViewCreateInfo;
-typedef struct VkBufferImageCopy
+typedef struct VkClearRect
{
- VkDeviceSize WINE_VK_ALIGN(8) bufferOffset;
- uint32_t bufferRowLength;
- uint32_t bufferImageHeight;
- VkImageSubresourceLayers imageSubresource;
- VkOffset3D imageOffset;
- VkExtent3D imageExtent;
-} VkBufferImageCopy;
+ VkRect2D rect;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkClearRect;
-typedef struct VkDescriptorPoolCreateInfo
+typedef struct VkCommandPoolCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkDescriptorPoolCreateFlags flags;
- uint32_t maxSets;
- uint32_t poolSizeCount;
- const VkDescriptorPoolSize *pPoolSizes;
-} VkDescriptorPoolCreateInfo;
+ VkCommandPoolCreateFlags flags;
+ uint32_t queueFamilyIndex;
+} VkCommandPoolCreateInfo;
-typedef struct VkDeviceQueueCreateInfo
+typedef struct VkDescriptorSetAllocateInfo
{
VkStructureType sType;
const void *pNext;
- VkDeviceQueueCreateFlags flags;
- uint32_t queueFamilyIndex;
- uint32_t queueCount;
- const float *pQueuePriorities;
-} VkDeviceQueueCreateInfo;
+ VkDescriptorPool WINE_VK_ALIGN(8) descriptorPool;
+ uint32_t descriptorSetCount;
+ const VkDescriptorSetLayout *pSetLayouts;
+} VkDescriptorSetAllocateInfo;
-typedef struct VkFenceCreateInfo
+typedef struct VkDescriptorUpdateTemplateCreateInfo
{
VkStructureType sType;
- const void *pNext;
- VkFenceCreateFlags flags;
-} VkFenceCreateInfo;
+ void *pNext;
+ VkDescriptorUpdateTemplateCreateFlags flags;
+ uint32_t descriptorUpdateEntryCount;
+ const VkDescriptorUpdateTemplateEntry *pDescriptorUpdateEntries;
+ VkDescriptorUpdateTemplateType templateType;
+ VkDescriptorSetLayout WINE_VK_ALIGN(8) descriptorSetLayout;
+ VkPipelineBindPoint pipelineBindPoint;
+ VkPipelineLayout WINE_VK_ALIGN(8) pipelineLayout;
+ uint32_t set;
+} VkDescriptorUpdateTemplateCreateInfo;
-typedef struct VkImageBlit
+typedef struct VkDispatchIndirectCommand
{
- VkImageSubresourceLayers srcSubresource;
- VkOffset3D srcOffsets[2];
- VkImageSubresourceLayers dstSubresource;
- VkOffset3D dstOffsets[2];
-} VkImageBlit;
+ uint32_t x;
+ uint32_t y;
+ uint32_t z;
+} VkDispatchIndirectCommand;
+
+typedef struct VkDrawIndexedIndirectCommand
+{
+ uint32_t indexCount;
+ uint32_t instanceCount;
+ uint32_t firstIndex;
+ int32_t vertexOffset;
+ uint32_t firstInstance;
+} VkDrawIndexedIndirectCommand;
+
+typedef struct VkExtent3D
+{
+ uint32_t width;
+ uint32_t height;
+ uint32_t depth;
+} VkExtent3D;
-typedef struct VkImageFormatProperties2KHR
+typedef struct VkFramebufferCreateInfo
{
VkStructureType sType;
- void *pNext;
- VkImageFormatProperties WINE_VK_ALIGN(8) imageFormatProperties;
-} VkImageFormatProperties2KHR;
+ const void *pNext;
+ VkFramebufferCreateFlags flags;
+ VkRenderPass WINE_VK_ALIGN(8) renderPass;
+ uint32_t attachmentCount;
+ const VkImageView *pAttachments;
+ uint32_t width;
+ uint32_t height;
+ uint32_t layers;
+} VkFramebufferCreateInfo;
-typedef struct VkOffset2D
+typedef struct VkImageCreateInfo
{
- int32_t x;
- int32_t y;
-} VkOffset2D;
+ VkStructureType sType;
+ const void *pNext;
+ VkImageCreateFlags flags;
+ VkImageType imageType;
+ VkFormat format;
+ VkExtent3D extent;
+ uint32_t mipLevels;
+ uint32_t arrayLayers;
+ VkSampleCountFlagBits samples;
+ VkImageTiling tiling;
+ VkImageUsageFlags usage;
+ VkSharingMode sharingMode;
+ uint32_t queueFamilyIndexCount;
+ const uint32_t *pQueueFamilyIndices;
+ VkImageLayout initialLayout;
+} VkImageCreateInfo;
+
+typedef struct VkImageSubresourceLayers
+{
+ VkImageAspectFlags aspectMask;
+ uint32_t mipLevel;
+ uint32_t baseArrayLayer;
+ uint32_t layerCount;
+} VkImageSubresourceLayers;
-typedef struct VkPhysicalDeviceFeatures2KHR
+typedef struct VkMemoryRequirements2
{
VkStructureType sType;
void *pNext;
- VkPhysicalDeviceFeatures features;
-} VkPhysicalDeviceFeatures2KHR;
+ VkMemoryRequirements WINE_VK_ALIGN(8) memoryRequirements;
+} VkMemoryRequirements2;
-typedef struct VkPipelineShaderStageCreateInfo
+typedef struct VkPipelineDepthStencilStateCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkPipelineShaderStageCreateFlags flags;
- VkShaderStageFlagBits stage;
- VkShaderModule WINE_VK_ALIGN(8) module;
- const char *pName;
- const VkSpecializationInfo *pSpecializationInfo;
-} VkPipelineShaderStageCreateInfo;
+ VkPipelineDepthStencilStateCreateFlags flags;
+ VkBool32 depthTestEnable;
+ VkBool32 depthWriteEnable;
+ VkCompareOp depthCompareOp;
+ VkBool32 depthBoundsTestEnable;
+ VkBool32 stencilTestEnable;
+ VkStencilOpState front;
+ VkStencilOpState back;
+ float minDepthBounds;
+ float maxDepthBounds;
+} VkPipelineDepthStencilStateCreateInfo;
-typedef struct VkQueueFamilyProperties2KHR
+typedef struct VkPipelineViewportStateCreateInfo
{
VkStructureType sType;
- void *pNext;
- VkQueueFamilyProperties queueFamilyProperties;
-} VkQueueFamilyProperties2KHR;
+ const void *pNext;
+ VkPipelineViewportStateCreateFlags flags;
+ uint32_t viewportCount;
+ const VkViewport *pViewports;
+ uint32_t scissorCount;
+ const VkRect2D *pScissors;
+} VkPipelineViewportStateCreateInfo;
typedef struct VkShaderModuleCreateInfo
{
@@ -2142,48 +2450,48 @@ typedef struct VkShaderModuleCreateInfo
const uint32_t *pCode;
} VkShaderModuleCreateInfo;
-typedef struct VkSparseImageOpaqueMemoryBindInfo
+typedef struct VkSparseImageFormatProperties
{
- VkImage WINE_VK_ALIGN(8) image;
- uint32_t bindCount;
- const VkSparseMemoryBind *pBinds;
-} VkSparseImageOpaqueMemoryBindInfo;
+ VkImageAspectFlags aspectMask;
+ VkExtent3D imageGranularity;
+ VkSparseImageFormatFlags flags;
+} VkSparseImageFormatProperties;
-typedef struct VkSubpassDescription
+typedef struct VkSparseImageMemoryBind
{
- VkSubpassDescriptionFlags flags;
- VkPipelineBindPoint pipelineBindPoint;
- uint32_t inputAttachmentCount;
- const VkAttachmentReference *pInputAttachments;
- uint32_t colorAttachmentCount;
- const VkAttachmentReference *pColorAttachments;
- const VkAttachmentReference *pResolveAttachments;
- const VkAttachmentReference *pDepthStencilAttachment;
- uint32_t preserveAttachmentCount;
- const uint32_t *pPreserveAttachments;
-} VkSubpassDescription;
+ VkImageSubresource subresource;
+ VkOffset3D offset;
+ VkExtent3D extent;
+ VkDeviceMemory WINE_VK_ALIGN(8) memory;
+ VkDeviceSize WINE_VK_ALIGN(8) memoryOffset;
+ VkSparseMemoryBindFlags flags;
+} VkSparseImageMemoryBind;
-typedef struct VkSwapchainCreateInfoKHR
+typedef struct VkSparseImageMemoryRequirements
+{
+ VkSparseImageFormatProperties formatProperties;
+ uint32_t imageMipTailFirstLod;
+ VkDeviceSize WINE_VK_ALIGN(8) imageMipTailSize;
+ VkDeviceSize WINE_VK_ALIGN(8) imageMipTailOffset;
+ VkDeviceSize WINE_VK_ALIGN(8) imageMipTailStride;
+} VkSparseImageMemoryRequirements;
+
+typedef struct VkSpecializationInfo
+{
+ uint32_t mapEntryCount;
+ const VkSpecializationMapEntry *pMapEntries;
+ size_t dataSize;
+ const void *pData;
+} VkSpecializationInfo;
+
+typedef struct VkValidationCacheCreateInfoEXT
{
VkStructureType sType;
const void *pNext;
- VkSwapchainCreateFlagsKHR flags;
- VkSurfaceKHR WINE_VK_ALIGN(8) surface;
- uint32_t minImageCount;
- VkFormat imageFormat;
- VkColorSpaceKHR imageColorSpace;
- VkExtent2D imageExtent;
- uint32_t imageArrayLayers;
- VkImageUsageFlags imageUsage;
- VkSharingMode imageSharingMode;
- uint32_t queueFamilyIndexCount;
- const uint32_t *pQueueFamilyIndices;
- VkSurfaceTransformFlagBitsKHR preTransform;
- VkCompositeAlphaFlagBitsKHR compositeAlpha;
- VkPresentModeKHR presentMode;
- VkBool32 clipped;
- VkSwapchainKHR WINE_VK_ALIGN(8) oldSwapchain;
-} VkSwapchainCreateInfoKHR;
+ VkValidationCacheCreateFlagsEXT flags;
+ size_t initialDataSize;
+ const void *pInitialData;
+} VkValidationCacheCreateInfoEXT;
typedef struct VkViewportWScalingNV
{
@@ -2191,34 +2499,121 @@ typedef struct VkViewportWScalingNV
float ycoeff;
} VkViewportWScalingNV;
-typedef struct VkClearAttachment
+typedef struct VkAttachmentDescription
{
- VkImageAspectFlags aspectMask;
- uint32_t colorAttachment;
- VkClearValue clearValue;
-} VkClearAttachment;
+ VkAttachmentDescriptionFlags flags;
+ VkFormat format;
+ VkSampleCountFlagBits samples;
+ VkAttachmentLoadOp loadOp;
+ VkAttachmentStoreOp storeOp;
+ VkAttachmentLoadOp stencilLoadOp;
+ VkAttachmentStoreOp stencilStoreOp;
+ VkImageLayout initialLayout;
+ VkImageLayout finalLayout;
+} VkAttachmentDescription;
-typedef struct VkCommandPoolCreateInfo
+typedef struct VkBufferImageCopy
+{
+ VkDeviceSize WINE_VK_ALIGN(8) bufferOffset;
+ uint32_t bufferRowLength;
+ uint32_t bufferImageHeight;
+ VkImageSubresourceLayers imageSubresource;
+ VkOffset3D imageOffset;
+ VkExtent3D imageExtent;
+} VkBufferImageCopy;
+
+typedef struct VkDescriptorSetLayoutSupport
+{
+ VkStructureType sType;
+ void *pNext;
+ VkBool32 supported;
+} VkDescriptorSetLayoutSupport;
+
+typedef struct VkImageBlit
+{
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffsets[2];
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffsets[2];
+} VkImageBlit;
+
+typedef struct VkImageFormatProperties
+{
+ VkExtent3D maxExtent;
+ uint32_t maxMipLevels;
+ uint32_t maxArrayLayers;
+ VkSampleCountFlags sampleCounts;
+ VkDeviceSize WINE_VK_ALIGN(8) maxResourceSize;
+} VkImageFormatProperties;
+
+typedef struct VkImageResolve
+{
+ VkImageSubresourceLayers srcSubresource;
+ VkOffset3D srcOffset;
+ VkImageSubresourceLayers dstSubresource;
+ VkOffset3D dstOffset;
+ VkExtent3D extent;
+} VkImageResolve;
+
+typedef struct VkPhysicalDeviceFeatures2
+{
+ VkStructureType sType;
+ void *pNext;
+ VkPhysicalDeviceFeatures features;
+} VkPhysicalDeviceFeatures2;
+
+typedef struct VkPipelineShaderStageCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkCommandPoolCreateFlags flags;
- uint32_t queueFamilyIndex;
-} VkCommandPoolCreateInfo;
+ VkPipelineShaderStageCreateFlags flags;
+ VkShaderStageFlagBits stage;
+ VkShaderModule WINE_VK_ALIGN(8) module;
+ const char *pName;
+ const VkSpecializationInfo *pSpecializationInfo;
+} VkPipelineShaderStageCreateInfo;
-typedef struct VkDeviceCreateInfo
+typedef struct VkSampleLocationsInfoEXT
{
VkStructureType sType;
const void *pNext;
- VkDeviceCreateFlags flags;
- uint32_t queueCreateInfoCount;
- const VkDeviceQueueCreateInfo *pQueueCreateInfos;
- uint32_t enabledLayerCount;
- const char * const*ppEnabledLayerNames;
- uint32_t enabledExtensionCount;
- const char * const*ppEnabledExtensionNames;
- const VkPhysicalDeviceFeatures *pEnabledFeatures;
-} VkDeviceCreateInfo;
+ VkSampleCountFlagBits sampleLocationsPerPixel;
+ VkExtent2D sampleLocationGridSize;
+ uint32_t sampleLocationsCount;
+ const VkSampleLocationEXT *pSampleLocations;
+} VkSampleLocationsInfoEXT;
+
+typedef struct VkSparseImageMemoryBindInfo
+{
+ VkImage WINE_VK_ALIGN(8) image;
+ uint32_t bindCount;
+ const VkSparseImageMemoryBind *pBinds;
+} VkSparseImageMemoryBindInfo;
+
+typedef struct VkSubpassDependency
+{
+ uint32_t srcSubpass;
+ uint32_t dstSubpass;
+ VkPipelineStageFlags srcStageMask;
+ VkPipelineStageFlags dstStageMask;
+ VkAccessFlags srcAccessMask;
+ VkAccessFlags dstAccessMask;
+ VkDependencyFlags dependencyFlags;
+} VkSubpassDependency;
+
+typedef struct VkClearAttachment
+{
+ VkImageAspectFlags aspectMask;
+ uint32_t colorAttachment;
+ VkClearValue clearValue;
+} VkClearAttachment;
+
+typedef struct VkDescriptorImageInfo
+{
+ VkSampler WINE_VK_ALIGN(8) sampler;
+ VkImageView WINE_VK_ALIGN(8) imageView;
+ VkImageLayout imageLayout;
+} VkDescriptorImageInfo;
typedef struct VkImageCopy
{
@@ -2243,25 +2638,17 @@ typedef struct VkPhysicalDeviceMemoryProperties
VkMemoryHeap WINE_VK_ALIGN(8) memoryHeaps[VK_MAX_MEMORY_HEAPS];
} VkPhysicalDeviceMemoryProperties;
-typedef struct VkPipelineColorBlendStateCreateInfo
-{
- VkStructureType sType;
- const void *pNext;
- VkPipelineColorBlendStateCreateFlags flags;
- VkBool32 logicOpEnable;
- VkLogicOp logicOp;
- uint32_t attachmentCount;
- const VkPipelineColorBlendAttachmentState *pAttachments;
- float blendConstants[4];
-} VkPipelineColorBlendStateCreateInfo;
-
-typedef struct VkPushConstantRange
-{
- VkShaderStageFlags stageFlags;
- uint32_t offset;
- uint32_t size;
-} VkPushConstantRange;
-
+typedef struct VkPipelineVertexInputStateCreateInfo
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkPipelineVertexInputStateCreateFlags flags;
+ uint32_t vertexBindingDescriptionCount;
+ const VkVertexInputBindingDescription *pVertexBindingDescriptions;
+ uint32_t vertexAttributeDescriptionCount;
+ const VkVertexInputAttributeDescription *pVertexAttributeDescriptions;
+} VkPipelineVertexInputStateCreateInfo;
+
typedef struct VkRenderPassCreateInfo
{
VkStructureType sType;
@@ -2275,23 +2662,32 @@ typedef struct VkRenderPassCreateInfo
const VkSubpassDependency *pDependencies;
} VkRenderPassCreateInfo;
-typedef struct VkStencilOpState
+typedef struct VkSparseImageFormatProperties2
{
- VkStencilOp failOp;
- VkStencilOp passOp;
- VkStencilOp depthFailOp;
- VkCompareOp compareOp;
- uint32_t compareMask;
- uint32_t writeMask;
- uint32_t reference;
-} VkStencilOpState;
+ VkStructureType sType;
+ void *pNext;
+ VkSparseImageFormatProperties properties;
+} VkSparseImageFormatProperties2;
-typedef struct VkVertexInputBindingDescription
+typedef struct VkSurfaceFormatKHR
{
- uint32_t binding;
- uint32_t stride;
- VkVertexInputRate inputRate;
-} VkVertexInputBindingDescription;
+ VkFormat format;
+ VkColorSpaceKHR colorSpace;
+} VkSurfaceFormatKHR;
+
+typedef struct VkWriteDescriptorSet
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkDescriptorSet WINE_VK_ALIGN(8) dstSet;
+ uint32_t dstBinding;
+ uint32_t dstArrayElement;
+ uint32_t descriptorCount;
+ VkDescriptorType descriptorType;
+ const VkDescriptorImageInfo *pImageInfo;
+ const VkDescriptorBufferInfo *pBufferInfo;
+ const VkBufferView *pTexelBufferView;
+} VkWriteDescriptorSet;
typedef struct VkBindSparseInfo
{
@@ -2309,72 +2705,44 @@ typedef struct VkBindSparseInfo
const VkSemaphore *pSignalSemaphores;
} VkBindSparseInfo;
-typedef struct VkComputePipelineCreateInfo
+typedef struct VkDeviceCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkPipelineCreateFlags flags;
- VkPipelineShaderStageCreateInfo WINE_VK_ALIGN(8) stage;
- VkPipelineLayout WINE_VK_ALIGN(8) layout;
- VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
- int32_t basePipelineIndex;
-} VkComputePipelineCreateInfo;
-
-typedef struct VkImageResolve
-{
- VkImageSubresourceLayers srcSubresource;
- VkOffset3D srcOffset;
- VkImageSubresourceLayers dstSubresource;
- VkOffset3D dstOffset;
- VkExtent3D extent;
-} VkImageResolve;
+ VkDeviceCreateFlags flags;
+ uint32_t queueCreateInfoCount;
+ const VkDeviceQueueCreateInfo *pQueueCreateInfos;
+ uint32_t enabledLayerCount;
+ const char * const*ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char * const*ppEnabledExtensionNames;
+ const VkPhysicalDeviceFeatures *pEnabledFeatures;
+} VkDeviceCreateInfo;
-typedef struct VkPhysicalDeviceMemoryProperties2KHR
+typedef struct VkImageFormatProperties2
{
VkStructureType sType;
void *pNext;
- VkPhysicalDeviceMemoryProperties WINE_VK_ALIGN(8) memoryProperties;
-} VkPhysicalDeviceMemoryProperties2KHR;
+ VkImageFormatProperties WINE_VK_ALIGN(8) imageFormatProperties;
+} VkImageFormatProperties2;
-typedef struct VkPipelineDepthStencilStateCreateInfo
+typedef struct VkPhysicalDeviceMemoryProperties2
{
VkStructureType sType;
- const void *pNext;
- VkPipelineDepthStencilStateCreateFlags flags;
- VkBool32 depthTestEnable;
- VkBool32 depthWriteEnable;
- VkCompareOp depthCompareOp;
- VkBool32 depthBoundsTestEnable;
- VkBool32 stencilTestEnable;
- VkStencilOpState front;
- VkStencilOpState back;
- float minDepthBounds;
- float maxDepthBounds;
-} VkPipelineDepthStencilStateCreateInfo;
+ void *pNext;
+ VkPhysicalDeviceMemoryProperties WINE_VK_ALIGN(8) memoryProperties;
+} VkPhysicalDeviceMemoryProperties2;
-typedef struct VkPipelineVertexInputStateCreateInfo
+typedef struct VkPipelineLayoutCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkPipelineVertexInputStateCreateFlags flags;
- uint32_t vertexBindingDescriptionCount;
- const VkVertexInputBindingDescription *pVertexBindingDescriptions;
- uint32_t vertexAttributeDescriptionCount;
- const VkVertexInputAttributeDescription *pVertexAttributeDescriptions;
-} VkPipelineVertexInputStateCreateInfo;
-
-typedef struct VkRect2D
-{
- VkOffset2D offset;
- VkExtent2D extent;
-} VkRect2D;
-
-typedef struct VkSparseImageFormatProperties2KHR
-{
- VkStructureType sType;
- void *pNext;
- VkSparseImageFormatProperties properties;
-} VkSparseImageFormatProperties2KHR;
+ VkPipelineLayoutCreateFlags flags;
+ uint32_t setLayoutCount;
+ const VkDescriptorSetLayout *pSetLayouts;
+ uint32_t pushConstantRangeCount;
+ const VkPushConstantRange *pPushConstantRanges;
+} VkPipelineLayoutCreateInfo;
typedef struct VkWin32SurfaceCreateInfoKHR
{
@@ -2385,64 +2753,39 @@ typedef struct VkWin32SurfaceCreateInfoKHR
HWND hwnd;
} VkWin32SurfaceCreateInfoKHR;
-typedef struct VkClearRect
-{
- VkRect2D rect;
- uint32_t baseArrayLayer;
- uint32_t layerCount;
-} VkClearRect;
-
-typedef struct VkDrawIndexedIndirectCommand
-{
- uint32_t indexCount;
- uint32_t instanceCount;
- uint32_t firstIndex;
- int32_t vertexOffset;
- uint32_t firstInstance;
-} VkDrawIndexedIndirectCommand;
-
-typedef struct VkInstanceCreateInfo
-{
- VkStructureType sType;
- const void *pNext;
- VkInstanceCreateFlags flags;
- const VkApplicationInfo *pApplicationInfo;
- uint32_t enabledLayerCount;
- const char * const*ppEnabledLayerNames;
- uint32_t enabledExtensionCount;
- const char * const*ppEnabledExtensionNames;
-} VkInstanceCreateInfo;
-
-typedef struct VkPipelineLayoutCreateInfo
+typedef struct VkComputePipelineCreateInfo
{
VkStructureType sType;
const void *pNext;
- VkPipelineLayoutCreateFlags flags;
- uint32_t setLayoutCount;
- const VkDescriptorSetLayout *pSetLayouts;
- uint32_t pushConstantRangeCount;
- const VkPushConstantRange *pPushConstantRanges;
-} VkPipelineLayoutCreateInfo;
+ VkPipelineCreateFlags flags;
+ VkPipelineShaderStageCreateInfo WINE_VK_ALIGN(8) stage;
+ VkPipelineLayout WINE_VK_ALIGN(8) layout;
+ VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkComputePipelineCreateInfo;
-typedef struct VkRenderPassBeginInfo
+typedef struct VkGraphicsPipelineCreateInfo
{
VkStructureType sType;
const void *pNext;
+ VkPipelineCreateFlags flags;
+ uint32_t stageCount;
+ const VkPipelineShaderStageCreateInfo *pStages;
+ const VkPipelineVertexInputStateCreateInfo *pVertexInputState;
+ const VkPipelineInputAssemblyStateCreateInfo *pInputAssemblyState;
+ const VkPipelineTessellationStateCreateInfo *pTessellationState;
+ const VkPipelineViewportStateCreateInfo *pViewportState;
+ const VkPipelineRasterizationStateCreateInfo *pRasterizationState;
+ const VkPipelineMultisampleStateCreateInfo *pMultisampleState;
+ const VkPipelineDepthStencilStateCreateInfo *pDepthStencilState;
+ const VkPipelineColorBlendStateCreateInfo *pColorBlendState;
+ const VkPipelineDynamicStateCreateInfo *pDynamicState;
+ VkPipelineLayout WINE_VK_ALIGN(8) layout;
VkRenderPass WINE_VK_ALIGN(8) renderPass;
- VkFramebuffer WINE_VK_ALIGN(8) framebuffer;
- VkRect2D renderArea;
- uint32_t clearValueCount;
- const VkClearValue *pClearValues;
-} VkRenderPassBeginInfo;
-
-typedef struct VkDescriptorSetLayoutCreateInfo
-{
- VkStructureType sType;
- const void *pNext;
- VkDescriptorSetLayoutCreateFlags flags;
- uint32_t bindingCount;
- const VkDescriptorSetLayoutBinding *pBindings;
-} VkDescriptorSetLayoutCreateInfo;
+ uint32_t subpass;
+ VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
+ int32_t basePipelineIndex;
+} VkGraphicsPipelineCreateInfo;
typedef struct VkPhysicalDeviceLimits
{
@@ -2554,53 +2897,20 @@ typedef struct VkPhysicalDeviceLimits
VkDeviceSize WINE_VK_ALIGN(8) nonCoherentAtomSize;
} VkPhysicalDeviceLimits;
-typedef struct VkPipelineViewportStateCreateInfo
+typedef struct VkQueueFamilyProperties
{
- VkStructureType sType;
- const void *pNext;
- VkPipelineViewportStateCreateFlags flags;
- uint32_t viewportCount;
- const VkViewport *pViewports;
- uint32_t scissorCount;
- const VkRect2D *pScissors;
-} VkPipelineViewportStateCreateInfo;
+ VkQueueFlags queueFlags;
+ uint32_t queueCount;
+ uint32_t timestampValidBits;
+ VkExtent3D minImageTransferGranularity;
+} VkQueueFamilyProperties;
-typedef struct VkGraphicsPipelineCreateInfo
+typedef struct VkSparseImageMemoryRequirements2
{
VkStructureType sType;
- const void *pNext;
- VkPipelineCreateFlags flags;
- uint32_t stageCount;
- const VkPipelineShaderStageCreateInfo *pStages;
- const VkPipelineVertexInputStateCreateInfo *pVertexInputState;
- const VkPipelineInputAssemblyStateCreateInfo *pInputAssemblyState;
- const VkPipelineTessellationStateCreateInfo *pTessellationState;
- const VkPipelineViewportStateCreateInfo *pViewportState;
- const VkPipelineRasterizationStateCreateInfo *pRasterizationState;
- const VkPipelineMultisampleStateCreateInfo *pMultisampleState;
- const VkPipelineDepthStencilStateCreateInfo *pDepthStencilState;
- const VkPipelineColorBlendStateCreateInfo *pColorBlendState;
- const VkPipelineDynamicStateCreateInfo *pDynamicState;
- VkPipelineLayout WINE_VK_ALIGN(8) layout;
- VkRenderPass WINE_VK_ALIGN(8) renderPass;
- uint32_t subpass;
- VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
- int32_t basePipelineIndex;
-} VkGraphicsPipelineCreateInfo;
-
-typedef struct VkSurfaceCapabilitiesKHR
-{
- uint32_t minImageCount;
- uint32_t maxImageCount;
- VkExtent2D currentExtent;
- VkExtent2D minImageExtent;
- VkExtent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- VkSurfaceTransformFlagsKHR supportedTransforms;
- VkSurfaceTransformFlagBitsKHR currentTransform;
- VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
- VkImageUsageFlags supportedUsageFlags;
-} VkSurfaceCapabilitiesKHR;
+ void *pNext;
+ VkSparseImageMemoryRequirements WINE_VK_ALIGN(8) memoryRequirements;
+} VkSparseImageMemoryRequirements2;
typedef struct VkPhysicalDeviceProperties
{
@@ -2615,12 +2925,31 @@ typedef struct VkPhysicalDeviceProperties
VkPhysicalDeviceSparseProperties sparseProperties;
} VkPhysicalDeviceProperties;
-typedef struct VkPhysicalDeviceProperties2KHR
+typedef struct VkQueueFamilyProperties2
+{
+ VkStructureType sType;
+ void *pNext;
+ VkQueueFamilyProperties queueFamilyProperties;
+} VkQueueFamilyProperties2;
+
+typedef struct VkInstanceCreateInfo
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkInstanceCreateFlags flags;
+ const VkApplicationInfo *pApplicationInfo;
+ uint32_t enabledLayerCount;
+ const char * const*ppEnabledLayerNames;
+ uint32_t enabledExtensionCount;
+ const char * const*ppEnabledExtensionNames;
+} VkInstanceCreateInfo;
+
+typedef struct VkPhysicalDeviceProperties2
{
VkStructureType sType;
void *pNext;
VkPhysicalDeviceProperties WINE_VK_ALIGN(8) properties;
-} VkPhysicalDeviceProperties2KHR;
+} VkPhysicalDeviceProperties2;
typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t *);
typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice, const VkCommandBufferAllocateInfo *, VkCommandBuffer *);
@@ -2628,7 +2957,9 @@ typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice, const VkDes
typedef VkResult (VKAPI_PTR *PFN_vkAllocateMemory)(VkDevice, const VkMemoryAllocateInfo *, const VkAllocationCallbacks *, VkDeviceMemory *);
typedef VkResult (VKAPI_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer, const VkCommandBufferBeginInfo *);
typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory)(VkDevice, VkBuffer, VkDeviceMemory, VkDeviceSize);
+typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice, uint32_t, const VkBindBufferMemoryInfo *);
typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory)(VkDevice, VkImage, VkDeviceMemory, VkDeviceSize);
+typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice, uint32_t, const VkBindImageMemoryInfo *);
typedef void (VKAPI_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer, VkQueryPool, uint32_t, VkQueryControlFlags);
typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer, const VkRenderPassBeginInfo *, VkSubpassContents);
typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t, const VkDescriptorSet *, uint32_t, const uint32_t *);
@@ -2650,8 +2981,10 @@ typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer, uint32_t, uint32_t, uin
typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, int32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountKHR)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
+typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountKHR)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer, VkQueryPool, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer);
typedef void (VKAPI_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer, uint32_t, const VkCommandBuffer *);
@@ -2660,7 +2993,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer, VkSubpassContent
typedef void (VKAPI_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer, VkPipelineStageFlags, VkPipelineStageFlags, VkDependencyFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *);
typedef void (VKAPI_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer, VkPipelineLayout, VkShaderStageFlags, uint32_t, uint32_t, const void *);
typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t, const VkWriteDescriptorSet *);
-typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer, VkDescriptorUpdateTemplateKHR, VkPipelineLayout, uint32_t, const void *);
+typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer, VkDescriptorUpdateTemplate, VkPipelineLayout, uint32_t, const void *);
typedef void (VKAPI_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
typedef void (VKAPI_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer, VkQueryPool, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer, VkImage, VkImageLayout, VkImage, VkImageLayout, uint32_t, const VkImageResolve *);
@@ -2670,6 +3003,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer, float, float)
typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer, float);
+typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer, const VkSampleLocationsInfoEXT *);
typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
@@ -2678,6 +3012,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer, uint32_t, uint32
typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer, uint32_t, uint32_t, const VkViewportWScalingNV *);
typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize, const void *);
typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags, VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *);
+typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer, VkPipelineStageFlagBits, VkBuffer, VkDeviceSize, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer, VkPipelineStageFlagBits, VkQueryPool, uint32_t);
typedef VkResult (VKAPI_PTR *PFN_vkCreateBuffer)(VkDevice, const VkBufferCreateInfo *, const VkAllocationCallbacks *, VkBuffer *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferView)(VkDevice, const VkBufferViewCreateInfo *, const VkAllocationCallbacks *, VkBufferView *);
@@ -2685,7 +3020,7 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateCommandPool)(VkDevice, const VkCommandP
typedef VkResult (VKAPI_PTR *PFN_vkCreateComputePipelines)(VkDevice, VkPipelineCache, uint32_t, const VkComputePipelineCreateInfo *, const VkAllocationCallbacks *, VkPipeline *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorPool)(VkDevice, const VkDescriptorPoolCreateInfo *, const VkAllocationCallbacks *, VkDescriptorPool *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, const VkAllocationCallbacks *, VkDescriptorSetLayout *);
-typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfoKHR *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplateKHR *);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice, const VkDescriptorUpdateTemplateCreateInfo *, const VkAllocationCallbacks *, VkDescriptorUpdateTemplate *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateDevice)(VkPhysicalDevice, const VkDeviceCreateInfo *, const VkAllocationCallbacks *, VkDevice *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateEvent)(VkDevice, const VkEventCreateInfo *, const VkAllocationCallbacks *, VkEvent *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateFence)(VkDevice, const VkFenceCreateInfo *, const VkAllocationCallbacks *, VkFence *);
@@ -2699,16 +3034,18 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineLayout)(VkDevice, const VkPipel
typedef VkResult (VKAPI_PTR *PFN_vkCreateQueryPool)(VkDevice, const VkQueryPoolCreateInfo *, const VkAllocationCallbacks *, VkQueryPool *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass)(VkDevice, const VkRenderPassCreateInfo *, const VkAllocationCallbacks *, VkRenderPass *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateSampler)(VkDevice, const VkSamplerCreateInfo *, const VkAllocationCallbacks *, VkSampler *);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice, const VkSamplerYcbcrConversionCreateInfo *, const VkAllocationCallbacks *, VkSamplerYcbcrConversion *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateSemaphore)(VkDevice, const VkSemaphoreCreateInfo *, const VkAllocationCallbacks *, VkSemaphore *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModule)(VkDevice, const VkShaderModuleCreateInfo *, const VkAllocationCallbacks *, VkShaderModule *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
+typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice, const VkValidationCacheCreateInfoEXT *, const VkAllocationCallbacks *, VkValidationCacheEXT *);
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
typedef void (VKAPI_PTR *PFN_vkDestroyBuffer)(VkDevice, VkBuffer, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyBufferView)(VkDevice, VkBufferView, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyCommandPool)(VkDevice, VkCommandPool, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorPool)(VkDevice, VkDescriptorPool, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice, VkDescriptorSetLayout, const VkAllocationCallbacks *);
-typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice, VkDescriptorUpdateTemplateKHR, const VkAllocationCallbacks *);
+typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice, VkDescriptorUpdateTemplate, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyDevice)(VkDevice, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyEvent)(VkDevice, VkEvent, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyFence)(VkDevice, VkFence, const VkAllocationCallbacks *);
@@ -2722,10 +3059,12 @@ typedef void (VKAPI_PTR *PFN_vkDestroyPipelineLayout)(VkDevice, VkPipelineLayout
typedef void (VKAPI_PTR *PFN_vkDestroyQueryPool)(VkDevice, VkQueryPool, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyRenderPass)(VkDevice, VkRenderPass, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroySampler)(VkDevice, VkSampler, const VkAllocationCallbacks *);
+typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice, VkSamplerYcbcrConversion, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroySemaphore)(VkDevice, VkSemaphore, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroyShaderModule)(VkDevice, VkShaderModule, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
+typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice, VkValidationCacheEXT, const VkAllocationCallbacks *);
typedef VkResult (VKAPI_PTR *PFN_vkDeviceWaitIdle)(VkDevice);
typedef VkResult (VKAPI_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer);
typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice, const char *, uint32_t *, VkExtensionProperties *);
@@ -2738,29 +3077,34 @@ typedef void (VKAPI_PTR *PFN_vkFreeCommandBuffers)(VkDevice, VkCommandPool, uint
typedef VkResult (VKAPI_PTR *PFN_vkFreeDescriptorSets)(VkDevice, VkDescriptorPool, uint32_t, const VkDescriptorSet *);
typedef void (VKAPI_PTR *PFN_vkFreeMemory)(VkDevice, VkDeviceMemory, const VkAllocationCallbacks *);
typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice, VkBuffer, VkMemoryRequirements *);
+typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice, const VkBufferMemoryRequirementsInfo2 *, VkMemoryRequirements2 *);
+typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice, const char *);
typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *);
typedef VkResult (VKAPI_PTR *PFN_vkGetEventStatus)(VkDevice, VkEvent);
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceStatus)(VkDevice, VkFence);
typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice, VkImage, VkMemoryRequirements *);
+typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice, const VkImageMemoryRequirementsInfo2 *, VkMemoryRequirements2 *);
typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice, VkImage, uint32_t *, VkSparseImageMemoryRequirements *);
+typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice, const VkImageSparseMemoryRequirementsInfo2 *, uint32_t *, VkSparseImageMemoryRequirements2 *);
typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout *);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance, const char *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice, VkPhysicalDeviceFeatures *);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice, VkPhysicalDeviceFeatures2KHR *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice, VkPhysicalDeviceFeatures2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice, VkFormat, VkFormatProperties *);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice, VkFormat, VkFormatProperties2KHR *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice, VkFormat, VkFormatProperties2 *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice, VkFormat, VkImageType, VkImageTiling, VkImageUsageFlags, VkImageCreateFlags, VkImageFormatProperties *);
-typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR *, VkImageFormatProperties2KHR *);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceImageFormatInfo2 *, VkImageFormatProperties2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties *);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2KHR *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2 *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice, VkSampleCountFlagBits, VkMultisamplePropertiesEXT *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice, VkPhysicalDeviceProperties *);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2KHR *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties *);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties2KHR *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice, VkFormat, VkImageType, VkSampleCountFlagBits, VkImageUsageFlags, VkImageTiling, uint32_t *, VkSparseImageFormatProperties *);
-typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *, uint32_t *, VkSparseImageFormatProperties2KHR *);
+typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *, uint32_t *, VkSparseImageFormatProperties2 *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *);
@@ -2769,10 +3113,13 @@ typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)
typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *);
typedef VkResult (VKAPI_PTR *PFN_vkGetQueryPoolResults)(VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *, VkDeviceSize, VkQueryResultFlags);
typedef void (VKAPI_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice, VkRenderPass, VkExtent2D *);
+typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice, VkPipeline, VkShaderStageFlagBits, VkShaderInfoTypeAMD, size_t *, void *);
typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *);
+typedef VkResult (VKAPI_PTR *PFN_vkGetValidationCacheDataEXT)(VkDevice, VkValidationCacheEXT, size_t *, void *);
typedef VkResult (VKAPI_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange *);
typedef VkResult (VKAPI_PTR *PFN_vkMapMemory)(VkDevice, VkDeviceMemory, VkDeviceSize, VkDeviceSize, VkMemoryMapFlags, void **);
typedef VkResult (VKAPI_PTR *PFN_vkMergePipelineCaches)(VkDevice, VkPipelineCache, uint32_t, const VkPipelineCache *);
+typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice, VkValidationCacheEXT, uint32_t, const VkValidationCacheEXT *);
typedef VkResult (VKAPI_PTR *PFN_vkQueueBindSparse)(VkQueue, uint32_t, const VkBindSparseInfo *, VkFence);
typedef VkResult (VKAPI_PTR *PFN_vkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *);
typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit)(VkQueue, uint32_t, const VkSubmitInfo *, VkFence);
@@ -2783,9 +3130,9 @@ typedef VkResult (VKAPI_PTR *PFN_vkResetDescriptorPool)(VkDevice, VkDescriptorPo
typedef VkResult (VKAPI_PTR *PFN_vkResetEvent)(VkDevice, VkEvent);
typedef VkResult (VKAPI_PTR *PFN_vkResetFences)(VkDevice, uint32_t, const VkFence *);
typedef VkResult (VKAPI_PTR *PFN_vkSetEvent)(VkDevice, VkEvent);
-typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice, VkCommandPool, VkCommandPoolTrimFlagsKHR);
+typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice, VkCommandPool, VkCommandPoolTrimFlags);
typedef void (VKAPI_PTR *PFN_vkUnmapMemory)(VkDevice, VkDeviceMemory);
-typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice, VkDescriptorSet, VkDescriptorUpdateTemplateKHR, const void *);
+typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice, VkDescriptorSet, VkDescriptorUpdateTemplate, const void *);
typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice, uint32_t, const VkWriteDescriptorSet *, uint32_t, const VkCopyDescriptorSet *);
typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice, uint32_t, const VkFence *, VkBool32, uint64_t);
@@ -2796,7 +3143,9 @@ VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptor
VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory);
VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo);
VkResult VKAPI_CALL vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset);
+VkResult VKAPI_CALL vkBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo *pBindInfos);
VkResult VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset);
+VkResult VKAPI_CALL vkBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo *pBindInfos);
void VKAPI_CALL vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags);
void VKAPI_CALL vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, VkSubpassContents contents);
void VKAPI_CALL vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets);
@@ -2818,8 +3167,10 @@ void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, u
void VKAPI_CALL vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
void VKAPI_CALL vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
void VKAPI_CALL vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
void VKAPI_CALL vkCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
+void VKAPI_CALL vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
void VKAPI_CALL vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query);
void VKAPI_CALL vkCmdEndRenderPass(VkCommandBuffer commandBuffer);
void VKAPI_CALL vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers);
@@ -2828,7 +3179,7 @@ void VKAPI_CALL vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContent
void VKAPI_CALL vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers);
void VKAPI_CALL vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues);
void VKAPI_CALL vkCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites);
-void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData);
+void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData);
void VKAPI_CALL vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
void VKAPI_CALL vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions);
@@ -2838,6 +3189,7 @@ void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDept
void VKAPI_CALL vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles);
void VKAPI_CALL vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth);
+void VKAPI_CALL vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT *pSampleLocationsInfo);
void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors);
void VKAPI_CALL vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
@@ -2846,6 +3198,7 @@ void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstVi
void VKAPI_CALL vkCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV *pViewportWScalings);
void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData);
void VKAPI_CALL vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent *pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers);
+void VKAPI_CALL vkCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker);
void VKAPI_CALL vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query);
VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer);
VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBufferView *pView);
@@ -2853,7 +3206,7 @@ VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCrea
VkResult VKAPI_CALL vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines);
VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool);
VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout);
-VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplateKHR *pDescriptorUpdateTemplate);
+VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate);
VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice);
VkResult VKAPI_CALL vkCreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent);
VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence);
@@ -2867,16 +3220,18 @@ VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkPipelineLayo
VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool);
VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass);
VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler);
+VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSamplerYcbcrConversion *pYcbcrConversion);
VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore);
VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule);
VkResult VKAPI_CALL vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain);
+VkResult VKAPI_CALL vkCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkValidationCacheEXT *pValidationCache);
VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
void VKAPI_CALL vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator);
-void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator);
+void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator);
@@ -2890,10 +3245,12 @@ void VKAPI_CALL vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipeli
void VKAPI_CALL vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator);
+void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator);
+void VKAPI_CALL vkDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks *pAllocator);
VkResult VKAPI_CALL vkDeviceWaitIdle(VkDevice device);
VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer);
VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties);
@@ -2906,29 +3263,34 @@ void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool,
VkResult VKAPI_CALL vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets);
void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator);
void VKAPI_CALL vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements);
+void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements);
+void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport);
void VKAPI_CALL vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes);
PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char *pName);
void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue);
VkResult VKAPI_CALL vkGetEventStatus(VkDevice device, VkEvent event);
VkResult VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence);
void VKAPI_CALL vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements);
+void VKAPI_CALL vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements);
void VKAPI_CALL vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *pSparseMemoryRequirements);
+void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2 *pInfo, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements);
void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout);
PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName);
void VKAPI_CALL vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures);
-void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures);
+void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 *pFeatures);
void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatProperties);
-void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR *pFormatProperties);
+void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2 *pFormatProperties);
VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties *pImageFormatProperties);
-VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR *pImageFormatInfo, VkImageFormatProperties2KHR *pImageFormatProperties);
+VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties);
void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties);
-void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR *pMemoryProperties);
+void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 *pMemoryProperties);
+void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT *pMultisampleProperties);
void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties);
-void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR *pProperties);
+void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties);
void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties);
-void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR *pQueueFamilyProperties);
+void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *pQueueFamilyProperties);
void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t *pPropertyCount, VkSparseImageFormatProperties *pProperties);
-void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2KHR *pProperties);
+void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2 *pProperties);
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities);
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats);
VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes);
@@ -2937,10 +3299,13 @@ VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDev
VkResult VKAPI_CALL vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t *pDataSize, void *pData);
VkResult VKAPI_CALL vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *pData, VkDeviceSize stride, VkQueryResultFlags flags);
void VKAPI_CALL vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D *pGranularity);
+VkResult VKAPI_CALL vkGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t *pInfoSize, void *pInfo);
VkResult VKAPI_CALL vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages);
+VkResult VKAPI_CALL vkGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t *pDataSize, void *pData);
VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges);
VkResult VKAPI_CALL vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData);
VkResult VKAPI_CALL vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache *pSrcCaches);
+VkResult VKAPI_CALL vkMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT *pSrcCaches);
VkResult VKAPI_CALL vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence);
VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo);
VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence);
@@ -2951,9 +3316,9 @@ VkResult VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool desc
VkResult VKAPI_CALL vkResetEvent(VkDevice device, VkEvent event);
VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences);
VkResult VKAPI_CALL vkSetEvent(VkDevice device, VkEvent event);
-void VKAPI_CALL vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags);
+void VKAPI_CALL vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags);
void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory memory);
-void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void *pData);
+void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData);
void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies);
VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout);
#endif /* VK_NO_PROTOTYPES */
--
2.16.4
June 6, 2018
[PATCH 1/2] winevulkan: Remove vk.xml from repository.
by Józef Kucia
The make_vulkan script downloads vk.xml.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/winevulkan/make_vulkan | 12 +-
dlls/winevulkan/vk.xml | 6514 -------------------------------------------
2 files changed, 11 insertions(+), 6515 deletions(-)
delete mode 100644 dlls/winevulkan/vk.xml
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 594ebdd5708c..8bd187674b1c 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -20,8 +20,10 @@
import argparse
import logging
+import os
import re
import sys
+import urllib.request
import xml.etree.ElementTree as ET
from collections import OrderedDict
from collections.abc import Sequence
@@ -62,6 +64,8 @@ from enum import Enum
LOGGER = logging.Logger("vulkan")
LOGGER.addHandler(logging.StreamHandler())
+VK_XML_VERSION = "1.0.51"
+
# Filenames to create.
WINE_VULKAN_H = "../../include/wine/vulkan.h"
WINE_VULKAN_DRIVER_H = "../../include/wine/vulkan_driver.h"
@@ -2542,6 +2546,10 @@ class VkRegistry(object):
self.handles = sorted(handles, key=lambda handle: handle.name)
self.structs = sorted(structs, key=lambda struct: struct.name)
+def download_vk_xml(filename):
+ url = "https://raw.github.com/KhronosGroup/Vulkan-Docs/v{0}-core/src/spec/vk.xml".format(VK_XML_VERSION)
+ if not os.path.isfile(filename):
+ urllib.request.urlretrieve(url, filename)
def main():
parser = argparse.ArgumentParser()
@@ -2555,7 +2563,9 @@ def main():
else: # > 1
LOGGER.setLevel(logging.DEBUG)
- registry = VkRegistry("vk.xml")
+ vk_xml = "vk-{0}.xml".format(VK_XML_VERSION)
+ download_vk_xml(vk_xml)
+ registry = VkRegistry(vk_xml)
generator = VkGenerator(registry)
with open(WINE_VULKAN_H, "w") as f:
diff --git a/dlls/winevulkan/vk.xml b/dlls/winevulkan/vk.xml
deleted file mode 100644
index e013ce8b6035..000000000000
--- a/dlls/winevulkan/vk.xml
+++ /dev/null
@@ -1,6514 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<registry>
- <comment>
-Copyright (c) 2015-2017 The Khronos Group Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and/or associated documentation files (the
-"Materials"), to deal in the Materials without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Materials, and to
-permit persons to whom the Materials are furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Materials.
-
-THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-
-------------------------------------------------------------------------
-
-This file, vk.xml, is the Vulkan API Registry. It is a critically important
-and normative part of the Vulkan Specification, including a canonical
-machine-readable definition of the API, parameter and member validation
-language incorporated into the Specification and reference pages, and other
-material which is registered by Khronos, such as tags used by extension and
-layer authors. The only authoritative version of vk.xml is the one
-maintained in the master branch of the Khronos Vulkan GitHub project.
- </comment>
-
- <!-- SECTION: Vulkan vendor IDs for physical devices without PCI vendor IDs -->
- <vendorids>
- <vendorid name="KHR" id="0x10000" comment="This is the next available Khronos vendor ID"/>
- <vendorid name="VIV" id="0x10001" comment="Vivante vendor ID"/>
- <vendorid name="VSI" id="0x10002" comment="VeriSilicon vendor ID"/>
- </vendorids>
-
- <!-- SECTION: Vulkan vendor/author tags for extensions and layers -->
- <tags>
- <tag name="IMG" author="Imagination Technologies" contact="Michael Worcester @michaelworcester"/>
- <tag name="AMD" author="Advanced Micro Devices, Inc." contact="Daniel Rakos @aqnuep"/>
- <tag name="ARM" author="ARM Limited" contact="Jan-Harald Fredriksen @janharald"/>
- <tag name="FSL" author="Freescale Semiconductor, Inc." contact="Norbert Nopper @FslNopper"/>
- <tag name="BRCM" author="Broadcom Corporation" contact="Graeme Leese @gnl21"/>
- <tag name="NXP" author="NXP Semiconductors N.V." contact="Norbert Nopper @FslNopper"/>
- <tag name="NV" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/>
- <tag name="NVX" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/>
- <tag name="VIV" author="Vivante Corporation" contact="Yanjun Zhang @yanjunzhang"/>
- <tag name="VSI" author="VeriSilicon Holdings Co., Ltd." contact="Yanjun Zhang @yanjunzhang"/>
- <tag name="KDAB" author="KDAB" contact="Sean Harmer @seanharmer"/>
- <tag name="ANDROID" author="Google, Inc." contact="Jesse Hall @jessehall"/>
- <tag name="CHROMIUM" author="Google, Inc." contact="Jesse Hall @jessehall"/>
- <tag name="GOOGLE" author="Google, Inc." contact="Jesse Hall @jessehall"/>
- <tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Maurice Ribble @mribble"/>
- <tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @KarenGhavam"/>
- <tag name="SAMSUNG" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/>
- <tag name="SEC" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/>
- <tag name="TIZEN" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/>
- <tag name="RENDERDOC" author="RenderDoc (renderdoc.org)" contact="baldurk(a)baldurk.org"/>
- <tag name="NN" author="Nintendo Co., Ltd." contact="Yasuhiro Yoshioka @yoshioka_yasuhiro"/>
- <tag name="MVK" author="The Brenwill Workshop Ltd." contact="Bill Hollings @billhollings"/>
- <tag name="KHR" author="Khronos" contact="Tom Olson @tom.olson"/>
- <tag name="EXT" author="Multivendor" contact="Jon Leech @oddhack"/>
- <tag name="MESA" author="Mesa open source project" contact="Chad Versace @chadversary, Daniel Stone @fooishbar, David Airlie @airlied, Jason Ekstrand @jekstrand"/>
- </tags>
-
- <!-- SECTION: Vulkan type definitions -->
- <types>
- <type name="vk_platform" category="include">#include "vk_platform.h"</type>
- <!-- WSI extensions -->
- <type category="include">#include "<name>vulkan.h</name>"</type>
- <type category="include">#include <<name>X11/Xlib.h</name>></type>
- <type category="include">#include <<name>X11/extensions/Xrandr.h</name>></type>
- <type category="include">#include <<name>android/native_window.h</name>></type>
- <type category="include">#include <<name>mir_toolkit/client_types.h</name>></type>
- <type category="include">#include <<name>wayland-client.h</name>></type>
- <type category="include">#include <<name>windows.h</name>></type>
- <type category="include">#include <<name>xcb/xcb.h</name>></type>
-
- <type requires="X11/Xlib.h" name="Display"/>
- <type requires="X11/Xlib.h" name="VisualID"/>
- <type requires="X11/Xlib.h" name="Window"/>
- <type requires="X11/extensions/Xrandr.h" name="RROutput"/>
- <type requires="android/native_window.h" name="ANativeWindow"/>
- <type requires="mir_toolkit/client_types.h" name="MirConnection"/>
- <type requires="mir_toolkit/client_types.h" name="MirSurface"/>
- <type requires="wayland-client.h" name="wl_display"/>
- <type requires="wayland-client.h" name="wl_surface"/>
- <type requires="windows.h" name="HINSTANCE"/>
- <type requires="windows.h" name="HWND"/>
- <type requires="windows.h" name="HANDLE"/>
- <type requires="windows.h" name="SECURITY_ATTRIBUTES"/>
- <type requires="windows.h" name="DWORD"/>
- <type requires="windows.h" name="LPCWSTR"/>
- <type requires="xcb/xcb.h" name="xcb_connection_t"/>
- <type requires="xcb/xcb.h" name="xcb_visualid_t"/>
- <type requires="xcb/xcb.h" name="xcb_window_t"/>
-
- <type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \
- (((major) << 22) | ((minor) << 12) | (patch))</type>
- <type category="define">#define <name>VK_VERSION_MAJOR</name>(version) ((uint32_t)(version) >> 22)</type>
- <type category="define">#define <name>VK_VERSION_MINOR</name>(version) (((uint32_t)(version) >> 12) & 0x3ff)</type>
- <type category="define">#define <name>VK_VERSION_PATCH</name>(version) ((uint32_t)(version) & 0xfff)</type>
-
- <type category="define">// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead.
-//#define <name>VK_API_VERSION</name> <type>VK_MAKE_VERSION</type>(1, 0, 0)</type> <!-- The patch version here should never be set to anything other than 0 -->
- <type category="define">// Vulkan 1.0 version number
-#define <name>VK_API_VERSION_1_0</name> <type>VK_MAKE_VERSION</type>(1, 0, 0)</type> <!-- The patch version here should never be set to anything other than 0 -->
- <type category="define">// Version of this file
-#define <name>VK_HEADER_VERSION</name> 51</type>
-
- <type category="define">
-#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
-
- <type category="define" name="VK_DEFINE_NON_DISPATCHABLE_HANDLE">
-#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
- #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
-#else
- #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
-#endif
-#endif
- </type>
-
- <type category="define">
-#define <name>VK_NULL_HANDLE</name> 0
- </type>
-
- <type category="basetype">typedef <type>uint32_t</type> <name>VkSampleMask</name>;</type>
- <type category="basetype">typedef <type>uint32_t</type> <name>VkBool32</name>;</type>
- <type category="basetype">typedef <type>uint32_t</type> <name>VkFlags</name>;</type>
- <type category="basetype">typedef <type>uint64_t</type> <name>VkDeviceSize</name>;</type>
- <!-- Basic C types, pulled in via vk_platform.h -->
- <type requires="vk_platform" name="void"/>
- <type requires="vk_platform" name="char"/>
- <type requires="vk_platform" name="float"/>
- <type requires="vk_platform" name="uint8_t"/>
- <type requires="vk_platform" name="uint32_t"/>
- <type requires="vk_platform" name="uint64_t"/>
- <type requires="vk_platform" name="int32_t"/>
- <type requires="vk_platform" name="size_t"/>
- <type name="int"/>
- <!-- Bitmask types -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkFramebufferCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPoolCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkRenderPassCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkSamplerCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineLayoutCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCacheCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDepthStencilStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDynamicStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineColorBlendStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineMultisampleStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineViewportStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineTessellationStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineInputAssemblyStateCreateFlags</name>;</type><!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineVertexInputStateCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineShaderStageCreateFlags</name>;</type> <!-- creation flags -->
- <type requires="VkDescriptorSetLayoutCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorSetLayoutCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkBufferViewCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkInstanceCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceCreateFlags</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceQueueCreateFlags</name>;</type> <!-- creation flags -->
- <type requires="VkQueueFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueueFlags</name>;</type> <!-- Queue capabilities -->
- <type requires="VkMemoryPropertyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryPropertyFlags</name>;</type> <!-- Memory properties passed into vkAllocateMemory(). -->
- <type requires="VkMemoryHeapFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryHeapFlags</name>;</type> <!-- Memory heap flags -->
- <type requires="VkAccessFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAccessFlags</name>;</type> <!-- Memory access flags passed to barrier/dependency operations -->
- <type requires="VkBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferUsageFlags</name>;</type> <!-- Buffer usage flags -->
- <type requires="VkBufferCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferCreateFlags</name>;</type> <!-- Buffer creation flags -->
- <type requires="VkShaderStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkShaderStageFlags</name>;</type> <!-- Shader stage flags -->
- <type requires="VkImageUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageUsageFlags</name>;</type> <!-- Image usage flags -->
- <type requires="VkImageCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageCreateFlags</name>;</type> <!-- Image creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkImageViewCreateFlags</name>;</type> <!-- Image view creation flags (no bits yet) -->
- <type requires="VkPipelineCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreateFlags</name>;</type> <!-- Pipeline creation flags -->
- <type requires="VkColorComponentFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkColorComponentFlags</name>;</type> <!-- Color component flags -->
- <type requires="VkFenceCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFenceCreateFlags</name>;</type> <!-- Fence creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkSemaphoreCreateFlags</name>;</type> <!-- Semaphore creation flags -->
- <type requires="VkFormatFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFormatFeatureFlags</name>;</type> <!-- Format capability flags -->
- <type requires="VkQueryControlFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryControlFlags</name>;</type> <!-- Query control flags -->
- <type requires="VkQueryResultFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryResultFlags</name>;</type> <!-- Query result flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkShaderModuleCreateFlags</name>;</type> <!-- Shader module creation flags (no bits yet) -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkEventCreateFlags</name>;</type> <!-- Event creation flags (no bits yet) -->
- <type requires="VkCommandPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolCreateFlags</name>;</type> <!-- Command pool creation flags -->
- <type requires="VkCommandPoolResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolResetFlags</name>;</type> <!-- Command pool reset flags -->
- <type requires="VkCommandBufferResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferResetFlags</name>;</type> <!-- Command buffer reset flags -->
- <type requires="VkCommandBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferUsageFlags</name>;</type> <!-- Command buffer usage flags -->
- <type requires="VkQueryPipelineStatisticFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPipelineStatisticFlags</name>;</type> <!-- Pipeline statistics flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryMapFlags</name>;</type> <!-- Memory mapping flags (no bits yet) -->
- <type requires="VkImageAspectFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageAspectFlags</name>;</type> <!-- Bitmask of image aspects -->
- <type requires="VkSparseMemoryBindFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseMemoryBindFlags</name>;</type> <!-- Sparse memory bind flags -->
- <type requires="VkSparseImageFormatFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseImageFormatFlags</name>;</type> <!-- Sparse image memory requirements flags -->
- <type requires="VkSubpassDescriptionFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSubpassDescriptionFlags</name>;</type> <!-- Subpass description flags -->
- <type requires="VkPipelineStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineStageFlags</name>;</type> <!-- Pipeline stages -->
- <type requires="VkSampleCountFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSampleCountFlags</name>;</type> <!-- Pipeline stages -->
- <type requires="VkAttachmentDescriptionFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAttachmentDescriptionFlags</name>;</type> <!-- Render pass attachment description flags -->
- <type requires="VkStencilFaceFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkStencilFaceFlags</name>;</type> <!-- Stencil face flags -->
- <type requires="VkCullModeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCullModeFlags</name>;</type> <!-- Cull mode flags -->
- <type requires="VkDescriptorPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolCreateFlags</name>;</type> <!-- Descriptor pool creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolResetFlags</name>;</type> <!-- Descriptor pool reset flags -->
- <type requires="VkDependencyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDependencyFlags</name>;</type> <!-- Pipeline barrier and subpass dependency flags -->
-
- <type requires="VkIndirectCommandsLayoutUsageFlagBitsNVX" category="bitmask">typedef <type>VkFlags</type> <name>VkIndirectCommandsLayoutUsageFlagsNVX</name>;</type> <!-- Device generated commands usage flags -->
- <type requires="VkObjectEntryUsageFlagBitsNVX" category="bitmask">typedef <type>VkFlags</type> <name>VkObjectEntryUsageFlagsNVX</name>;</type> <!-- Object usage flags -->
-
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorUpdateTemplateCreateFlagsKHR</name>;</type> <!-- Descriptor update template creation flags -->
- <!-- WSI extensions -->
- <type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type>
- <type requires="VkDisplayPlaneAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayPlaneAlphaFlagsKHR</name>;</type>
- <type requires="VkSurfaceTransformFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceTransformFlagsKHR</name>;</type>
- <type requires="VkSwapchainCreateFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSwapchainCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayModeCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplaySurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkAndroidSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkMirSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkViSurfaceCreateFlagsNN</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkWaylandSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkWin32SurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkXlibSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkXcbSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkIOSSurfaceCreateFlagsMVK</name>;</type> <!-- creation flags -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkMacOSSurfaceCreateFlagsMVK</name>;</type> <!-- creation flags -->
- <type requires="VkPeerMemoryFeatureFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkPeerMemoryFeatureFlagsKHX</name>;</type> <!-- Peer memory feature flags -->
- <type requires="VkMemoryAllocateFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryAllocateFlagsKHX</name>;</type> <!-- Memory allocation flags -->
- <type requires="VkDeviceGroupPresentModeFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceGroupPresentModeFlagsKHX</name>;</type><!-- Device group present mode flags -->
-
- <type requires="VkDebugReportFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkDebugReportFlagsEXT</name>;</type>
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolTrimFlagsKHR</name>;</type>
- <type requires="VkExternalMemoryHandleTypeFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryHandleTypeFlagsNV</name>;</type>
- <type requires="VkExternalMemoryFeatureFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryFeatureFlagsNV</name>;</type>
- <type requires="VkExternalMemoryHandleTypeFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryHandleTypeFlagsKHX</name>;</type>
- <type requires="VkExternalMemoryFeatureFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryFeatureFlagsKHX</name>;</type>
- <type requires="VkExternalSemaphoreHandleTypeFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalSemaphoreHandleTypeFlagsKHX</name>;</type>
- <type requires="VkExternalSemaphoreFeatureFlagBitsKHX" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalSemaphoreFeatureFlagsKHX</name>;</type>
- <type requires="VkSurfaceCounterFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceCounterFlagsEXT</name>;</type>
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineViewportSwizzleStateCreateFlagsNV</name>;</type> <!-- creation flags (no bits yet) -->
- <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDiscardRectangleStateCreateFlagsEXT</name>;</type> <!-- creation flags (no bits yet) -->
-
- <!-- Types which can be void pointers or class pointers, selected at compile time -->
- <type category="handle"><type>VK_DEFINE_HANDLE</type>(<name>VkInstance</name>)</type>
- <type category="handle" parent="VkInstance"><type>VK_DEFINE_HANDLE</type>(<name>VkPhysicalDevice</name>)</type>
- <type category="handle" parent="VkPhysicalDevice"><type>VK_DEFINE_HANDLE</type>(<name>VkDevice</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_HANDLE</type>(<name>VkQueue</name>)</type>
- <type category="handle" parent="VkCommandPool"><type>VK_DEFINE_HANDLE</type>(<name>VkCommandBuffer</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDeviceMemory</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkCommandPool</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBuffer</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBufferView</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImage</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImageView</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkShaderModule</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipeline</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineLayout</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSampler</name>)</type>
- <type category="handle" parent="VkDescriptorPool"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSet</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSetLayout</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorPool</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFence</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSemaphore</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkEvent</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkQueryPool</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFramebuffer</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkRenderPass</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineCache</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkObjectTableNVX</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkIndirectCommandsLayoutNVX</name>)</type>
- <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorUpdateTemplateKHR</name>)</type>
-
- <!-- WSI extensions -->
- <type category="handle"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayKHR</name>)</type>
- <type category="handle" parent="VkPhysicalDevice,VkDisplayKHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayModeKHR</name>)</type>
- <type category="handle" parent="VkInstance"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSurfaceKHR</name>)</type>
- <type category="handle" parent="VkSurfaceKHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSwapchainKHR</name>)</type>
- <type category="handle" parent="VkInstance"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDebugReportCallbackEXT</name>)</type>
-
- <!-- Types generated from corresponding <enums> tags below -->
- <type name="VkAttachmentLoadOp" category="enum"/>
- <type name="VkAttachmentStoreOp" category="enum"/>
- <type name="VkBlendFactor" category="enum"/>
- <type name="VkBlendOp" category="enum"/>
- <type name="VkBorderColor" category="enum"/>
- <type name="VkFramebufferCreateFlagBits" category="enum"/>
- <type name="VkQueryPoolCreateFlagBits" category="enum"/>
- <type name="VkRenderPassCreateFlagBits" category="enum"/>
- <type name="VkSamplerCreateFlagBits" category="enum"/>
- <type name="VkPipelineCacheHeaderVersion" category="enum"/>
- <type name="VkPipelineLayoutCreateFlagBits" category="enum"/>
- <type name="VkPipelineCacheCreateFlagBits" category="enum"/>
- <type name="VkPipelineDepthStencilStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineDynamicStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineColorBlendStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineMultisampleStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineRasterizationStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineViewportStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineTessellationStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineInputAssemblyStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineVertexInputStateCreateFlagBits" category="enum"/>
- <type name="VkPipelineShaderStageCreateFlagBits" category="enum"/>
- <type name="VkDescriptorSetLayoutCreateFlagBits" category="enum"/>
- <type name="VkBufferViewCreateFlagBits" category="enum"/>
- <type name="VkInstanceCreateFlagBits" category="enum"/>
- <type name="VkDeviceQueueCreateFlagBits" category="enum"/>
- <type name="VkBufferCreateFlagBits" category="enum"/>
- <type name="VkBufferUsageFlagBits" category="enum"/>
- <type name="VkColorComponentFlagBits" category="enum"/>
- <type name="VkComponentSwizzle" category="enum"/>
- <type name="VkCommandPoolCreateFlagBits" category="enum"/>
- <type name="VkCommandPoolResetFlagBits" category="enum"/>
- <type name="VkCommandBufferResetFlagBits" category="enum"/>
- <type name="VkCommandBufferLevel" category="enum"/>
- <type name="VkCommandBufferUsageFlagBits" category="enum"/>
- <type name="VkCompareOp" category="enum"/>
- <type name="VkCullModeFlagBits" category="enum"/>
- <type name="VkDescriptorType" category="enum"/>
- <type name="VkDeviceCreateFlagBits" category="enum"/>
- <type name="VkDynamicState" category="enum"/>
- <type name="VkFenceCreateFlagBits" category="enum"/>
- <type name="VkPolygonMode" category="enum"/>
- <type name="VkFormat" category="enum"/>
- <type name="VkFormatFeatureFlagBits" category="enum"/>
- <type name="VkFrontFace" category="enum"/>
- <type name="VkImageAspectFlagBits" category="enum"/>
- <type name="VkImageCreateFlagBits" category="enum"/>
- <type name="VkImageLayout" category="enum"/>
- <type name="VkImageTiling" category="enum"/>
- <type name="VkImageType" category="enum"/>
- <type name="VkImageUsageFlagBits" category="enum"/>
- <type name="VkImageViewType" category="enum"/>
- <type name="VkSharingMode" category="enum"/>
- <type name="VkIndexType" category="enum"/>
- <type name="VkLogicOp" category="enum"/>
- <type name="VkMemoryHeapFlagBits" category="enum"/>
- <type name="VkAccessFlagBits" category="enum"/>
- <type name="VkMemoryPropertyFlagBits" category="enum"/>
- <type name="VkPhysicalDeviceType" category="enum"/>
- <type name="VkPipelineBindPoint" category="enum"/>
- <type name="VkPipelineCreateFlagBits" category="enum"/>
- <type name="VkPrimitiveTopology" category="enum"/>
- <type name="VkQueryControlFlagBits" category="enum"/>
- <type name="VkQueryPipelineStatisticFlagBits" category="enum"/>
- <type name="VkQueryResultFlagBits" category="enum"/>
- <type name="VkQueryType" category="enum"/>
- <type name="VkQueueFlagBits" category="enum"/>
- <type name="VkSubpassContents" category="enum"/>
- <type name="VkResult" category="enum"/>
- <type name="VkShaderStageFlagBits" category="enum"/>
- <type name="VkSparseMemoryBindFlagBits" category="enum"/>
- <type name="VkStencilFaceFlagBits" category="enum"/>
- <type name="VkStencilOp" category="enum"/>
- <type name="VkStructureType" category="enum"/>
- <type name="VkSystemAllocationScope" category="enum"/>
- <type name="VkInternalAllocationType" category="enum"/>
- <type name="VkSamplerAddressMode" category="enum"/>
- <type name="VkFilter" category="enum"/>
- <type name="VkSamplerMipmapMode" category="enum"/>
- <type name="VkVertexInputRate" category="enum"/>
- <type name="VkPipelineStageFlagBits" category="enum"/>
- <type name="VkSparseImageFormatFlagBits" category="enum"/>
- <type name="VkSampleCountFlagBits" category="enum"/>
- <type name="VkAttachmentDescriptionFlagBits" category="enum"/>
- <type name="VkDescriptorPoolCreateFlagBits" category="enum"/>
- <type name="VkDependencyFlagBits" category="enum"/>
- <type name="VkObjectType" category="enum"/>
- <!-- Extensions -->
- <type name="VkIndirectCommandsLayoutUsageFlagBitsNVX" category="enum"/>
- <type name="VkIndirectCommandsTokenTypeNVX" category="enum"/>
- <type name="VkObjectEntryUsageFlagBitsNVX" category="enum"/>
- <type name="VkObjectEntryTypeNVX" category="enum"/>
- <type name="VkDescriptorUpdateTemplateTypeKHR" category="enum"/>
- <type name="VkViewportCoordinateSwizzleNV" category="enum"/>
- <type name="VkDiscardRectangleModeEXT" category="enum"/>
- <type name="VkSubpassDescriptionFlagBits" category="enum"/>
- <!-- WSI extensions -->
- <type name="VkColorSpaceKHR" category="enum"/>
- <type name="VkCompositeAlphaFlagBitsKHR" category="enum"/>
- <type name="VkDisplayPlaneAlphaFlagBitsKHR" category="enum"/>
- <type name="VkPresentModeKHR" category="enum"/>
- <type name="VkSurfaceTransformFlagBitsKHR" category="enum"/>
- <type name="VkDebugReportFlagBitsEXT" category="enum"/>
- <type name="VkDebugReportObjectTypeEXT" category="enum"/>
- <type name="VkRasterizationOrderAMD" category="enum"/>
- <type name="VkExternalMemoryHandleTypeFlagBitsNV" category="enum"/>
- <type name="VkExternalMemoryFeatureFlagBitsNV" category="enum"/>
- <type name="VkValidationCheckEXT" category="enum"/>
- <type name="VkExternalMemoryHandleTypeFlagBitsKHX" category="enum"/>
- <type name="VkExternalMemoryFeatureFlagBitsKHX" category="enum"/>
- <type name="VkExternalSemaphoreHandleTypeFlagBitsKHX" category="enum"/>
- <type name="VkExternalSemaphoreFeatureFlagBitsKHX" category="enum"/>
- <type name="VkSurfaceCounterFlagBitsEXT" category="enum"/>
- <type name="VkDisplayPowerStateEXT" category="enum"/>
- <type name="VkDeviceEventTypeEXT" category="enum"/>
- <type name="VkDisplayEventTypeEXT" category="enum"/>
- <type name="VkPeerMemoryFeatureFlagBitsKHX" category="enum"/>
- <type name="VkMemoryAllocateFlagBitsKHX" category="enum"/>
- <type name="VkDeviceGroupPresentModeFlagBitsKHX" category="enum"/>
- <type name="VkSwapchainCreateFlagBitsKHR" category="enum"/>
-
- <!-- The PFN_vk*Function types are used by VkAllocationCallbacks below -->
- <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalAllocationNotification</name>)(
- <type>void</type>* pUserData,
- <type>size_t</type> size,
- <type>VkInternalAllocationType</type> allocationType,
- <type>VkSystemAllocationScope</type> allocationScope);</type>
- <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalFreeNotification</name>)(
- <type>void</type>* pUserData,
- <type>size_t</type> size,
- <type>VkInternalAllocationType</type> allocationType,
- <type>VkSystemAllocationScope</type> allocationScope);</type>
- <type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkReallocationFunction</name>)(
- <type>void</type>* pUserData,
- <type>void</type>* pOriginal,
- <type>size_t</type> size,
- <type>size_t</type> alignment,
- <type>VkSystemAllocationScope</type> allocationScope);</type>
- <type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkAllocationFunction</name>)(
- <type>void</type>* pUserData,
- <type>size_t</type> size,
- <type>size_t</type> alignment,
- <type>VkSystemAllocationScope</type> allocationScope);</type>
- <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkFreeFunction</name>)(
- <type>void</type>* pUserData,
- <type>void</type>* pMemory);</type>
-
- <!-- The PFN_vkVoidFunction type are used by VkGet*ProcAddr below -->
- <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkVoidFunction</name>)(void);</type>
-
- <!-- The PFN_vkDebugReportCallbackEXT type are used by the DEBUG_REPORT extension-->
- <type category="funcpointer">typedef VkBool32 (VKAPI_PTR *<name>PFN_vkDebugReportCallbackEXT</name>)(
- <type>VkDebugReportFlagsEXT</type> flags,
- <type>VkDebugReportObjectTypeEXT</type> objectType,
- <type>uint64_t</type> object,
- <type>size_t</type> location,
- <type>int32_t</type> messageCode,
- const <type>char</type>* pLayerPrefix,
- const <type>char</type>* pMessage,
- <type>void</type>* pUserData);</type>
-
- <!-- Struct types -->
- <type category="struct" name="VkOffset2D">
- <member><type>int32_t</type> <name>x</name></member>
- <member><type>int32_t</type> <name>y</name></member>
- </type>
- <type category="struct" name="VkOffset3D">
- <member><type>int32_t</type> <name>x</name></member>
- <member><type>int32_t</type> <name>y</name></member>
- <member><type>int32_t</type> <name>z</name></member>
- </type>
- <type category="struct" name="VkExtent2D">
- <member><type>uint32_t</type> <name>width</name></member>
- <member><type>uint32_t</type> <name>height</name></member>
- </type>
- <type category="struct" name="VkExtent3D">
- <member><type>uint32_t</type> <name>width</name></member>
- <member><type>uint32_t</type> <name>height</name></member>
- <member><type>uint32_t</type> <name>depth</name></member>
- </type>
- <type category="struct" name="VkViewport">
- <member><type>float</type> <name>x</name></member>
- <member><type>float</type> <name>y</name></member>
- <member><type>float</type> <name>width</name></member>
- <member><type>float</type> <name>height</name></member>
- <member><type>float</type> <name>minDepth</name></member>
- <member><type>float</type> <name>maxDepth</name></member>
- </type>
- <type category="struct" name="VkRect2D">
- <member><type>VkOffset2D</type> <name>offset</name></member>
- <member><type>VkExtent2D</type> <name>extent</name></member>
- </type>
- <type category="struct" name="VkRect3D">
- <member><type>VkOffset3D</type> <name>offset</name></member>
- <member><type>VkExtent3D</type> <name>extent</name></member>
- </type>
- <type category="struct" name="VkClearRect">
- <member><type>VkRect2D</type> <name>rect</name></member>
- <member><type>uint32_t</type> <name>baseArrayLayer</name></member>
- <member><type>uint32_t</type> <name>layerCount</name></member>
- </type>
- <type category="struct" name="VkComponentMapping">
- <member><type>VkComponentSwizzle</type> <name>r</name></member>
- <member><type>VkComponentSwizzle</type> <name>g</name></member>
- <member><type>VkComponentSwizzle</type> <name>b</name></member>
- <member><type>VkComponentSwizzle</type> <name>a</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceProperties" returnedonly="true">
- <member><type>uint32_t</type> <name>apiVersion</name></member>
- <member><type>uint32_t</type> <name>driverVersion</name></member>
- <member><type>uint32_t</type> <name>vendorID</name></member>
- <member><type>uint32_t</type> <name>deviceID</name></member>
- <member><type>VkPhysicalDeviceType</type> <name>deviceType</name></member>
- <member><type>char</type> <name>deviceName</name>[<enum>VK_MAX_PHYSICAL_DEVICE_NAME_SIZE</enum>]</member>
- <member><type>uint8_t</type> <name>pipelineCacheUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
- <member><type>VkPhysicalDeviceLimits</type> <name>limits</name></member>
- <member><type>VkPhysicalDeviceSparseProperties</type> <name>sparseProperties</name></member>
- </type>
- <type category="struct" name="VkExtensionProperties" returnedonly="true">
- <member><type>char</type> <name>extensionName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member> <!-- extension name -->
- <member><type>uint32_t</type> <name>specVersion</name></member> <!-- version of the extension specification implemented -->
- </type>
- <type category="struct" name="VkLayerProperties" returnedonly="true">
- <member><type>char</type> <name>layerName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member> <!-- layer name -->
- <member><type>uint32_t</type> <name>specVersion</name></member> <!-- version of the layer specification implemented -->
- <member><type>uint32_t</type> <name>implementationVersion</name></member> <!-- build or release version of the layer's library -->
- <member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member> <!-- Free-form description of the layer -->
- </type>
- <type category="struct" name="VkApplicationInfo">
- <member values="VK_STRUCTURE_TYPE_APPLICATION_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true" len="null-terminated">const <type>char</type>* <name>pApplicationName</name></member>
- <member><type>uint32_t</type> <name>applicationVersion</name></member>
- <member optional="true" len="null-terminated">const <type>char</type>* <name>pEngineName</name></member>
- <member><type>uint32_t</type> <name>engineVersion</name></member>
- <member><type>uint32_t</type> <name>apiVersion</name></member>
- </type>
- <type category="struct" name="VkAllocationCallbacks">
- <member optional="true"><type>void</type>* <name>pUserData</name></member>
- <member><type>PFN_vkAllocationFunction</type> <name>pfnAllocation</name></member>
- <member><type>PFN_vkReallocationFunction</type> <name>pfnReallocation</name></member>
- <member><type>PFN_vkFreeFunction</type> <name>pfnFree</name></member>
- <member optional="true"><type>PFN_vkInternalAllocationNotification</type> <name>pfnInternalAllocation</name></member>
- <member optional="true"><type>PFN_vkInternalFreeNotification</type> <name>pfnInternalFree</name></member>
- </type>
- <type category="struct" name="VkDeviceQueueCreateInfo">
- <member values="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDeviceQueueCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
- <member><type>uint32_t</type> <name>queueCount</name></member>
- <member len="queueCount">const <type>float</type>* <name>pQueuePriorities</name></member>
- </type>
- <type category="struct" name="VkDeviceCreateInfo">
- <member values="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkPhysicalDeviceFeatures2KHR,VkPhysicalDeviceMultiviewFeaturesKHX,VkDeviceGroupDeviceCreateInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDeviceCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>queueCreateInfoCount</name></member>
- <member len="queueCreateInfoCount">const <type>VkDeviceQueueCreateInfo</type>* <name>pQueueCreateInfos</name></member>
- <member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member>
- <member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name></member> <!-- Ordered list of layer names to be enabled -->
- <member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member>
- <member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member>
- <member optional="true">const <type>VkPhysicalDeviceFeatures</type>* <name>pEnabledFeatures</name></member>
- </type>
- <type category="struct" name="VkInstanceCreateInfo">
- <member values="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDebugReportCallbackCreateInfoEXT">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkInstanceCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member optional="true">const <type>VkApplicationInfo</type>* <name>pApplicationInfo</name></member>
- <member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member>
- <member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name></member> <!-- Ordered list of layer names to be enabled -->
- <member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member>
- <member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member> <!-- Extension names to be enabled -->
- </type>
- <type category="struct" name="VkQueueFamilyProperties" returnedonly="true">
- <member optional="true"><type>VkQueueFlags</type> <name>queueFlags</name></member> <!-- Queue flags -->
- <member><type>uint32_t</type> <name>queueCount</name></member>
- <member><type>uint32_t</type> <name>timestampValidBits</name></member>
- <member><type>VkExtent3D</type> <name>minImageTransferGranularity</name></member> <!-- Minimum alignment requirement for image transfers -->
- </type>
- <type category="struct" name="VkPhysicalDeviceMemoryProperties" returnedonly="true">
- <member><type>uint32_t</type> <name>memoryTypeCount</name></member>
- <member><type>VkMemoryType</type> <name>memoryTypes</name>[<enum>VK_MAX_MEMORY_TYPES</enum>]</member>
- <member><type>uint32_t</type> <name>memoryHeapCount</name></member>
- <member><type>VkMemoryHeap</type> <name>memoryHeaps</name>[<enum>VK_MAX_MEMORY_HEAPS</enum>]</member>
- </type>
- <type category="struct" name="VkMemoryAllocateInfo">
- <member values="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDedicatedAllocationMemoryAllocateInfoNV,VkMemoryAllocateFlagsInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDeviceSize</type> <name>allocationSize</name></member> <!-- Size of memory allocation -->
- <member><type>uint32_t</type> <name>memoryTypeIndex</name></member> <!-- Index of the of the memory type to allocate from -->
- </type>
- <type category="struct" name="VkMemoryRequirements" returnedonly="true">
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>alignment</name></member> <!-- Specified in bytes -->
- <member><type>uint32_t</type> <name>memoryTypeBits</name></member> <!-- Bitmask of the allowed memory type indices into memoryTypes[] for this object -->
- </type>
- <type category="struct" name="VkSparseImageFormatProperties" returnedonly="true">
- <member optional="true"><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
- <member><type>VkExtent3D</type> <name>imageGranularity</name></member>
- <member optional="true"><type>VkSparseImageFormatFlags</type> <name>flags</name></member>
- </type>
- <type category="struct" name="VkSparseImageMemoryRequirements" returnedonly="true">
- <member><type>VkSparseImageFormatProperties</type> <name>formatProperties</name></member>
- <member><type>uint32_t</type> <name>imageMipTailFirstLod</name></member>
- <member><type>VkDeviceSize</type> <name>imageMipTailSize</name></member> <!-- Specified in bytes, must be a multiple of sparse block size in bytes / alignment -->
- <member><type>VkDeviceSize</type> <name>imageMipTailOffset</name></member> <!-- Specified in bytes, must be a multiple of sparse block size in bytes / alignment -->
- <member><type>VkDeviceSize</type> <name>imageMipTailStride</name></member> <!-- Specified in bytes, must be a multiple of sparse block size in bytes / alignment -->
- </type>
- <type category="struct" name="VkMemoryType" returnedonly="true">
- <member optional="true"><type>VkMemoryPropertyFlags</type> <name>propertyFlags</name></member> <!-- Memory properties of this memory type -->
- <member><type>uint32_t</type> <name>heapIndex</name></member> <!-- Index of the memory heap allocations of this memory type are taken from -->
- </type>
- <type category="struct" name="VkMemoryHeap" returnedonly="true">
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Available memory in the heap-->
- <member optional="true"><type>VkMemoryHeapFlags</type> <name>flags</name></member> <!-- Flags for the heap-->
- </type>
- <type category="struct" name="VkMappedMemoryRange">
- <member values="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDeviceMemory</type> <name>memory</name></member> <!-- Mapped memory object -->
- <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Offset within the memory object where the range starts -->
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Size of the range within the memory object -->
- </type>
- <type category="struct" name="VkFormatProperties" returnedonly="true">
- <member optional="true"><type>VkFormatFeatureFlags</type> <name>linearTilingFeatures</name></member> <!-- Format features in case of linear tiling -->
- <member optional="true"><type>VkFormatFeatureFlags</type> <name>optimalTilingFeatures</name></member> <!-- Format features in case of optimal tiling -->
- <member optional="true"><type>VkFormatFeatureFlags</type> <name>bufferFeatures</name></member> <!-- Format features supported by buffers -->
- </type>
- <type category="struct" name="VkImageFormatProperties" returnedonly="true">
- <member><type>VkExtent3D</type> <name>maxExtent</name></member> <!-- max image dimensions for this resource type -->
- <member><type>uint32_t</type> <name>maxMipLevels</name></member> <!-- max number of mipmap levels for this resource type -->
- <member><type>uint32_t</type> <name>maxArrayLayers</name></member> <!-- max array size for this resource type -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>sampleCounts</name></member> <!-- supported sample counts for this resource type -->
- <member><type>VkDeviceSize</type> <name>maxResourceSize</name></member> <!-- max size (in bytes) of this resource type -->
- </type>
- <type category="struct" name="VkDescriptorBufferInfo">
- <member><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer used for this descriptor slot when the descriptor is UNIFORM_BUFFER[_DYNAMIC] or STORAGE_BUFFER[_DYNAMIC]. VK_NULL_HANDLE otherwise. -->
- <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Base offset from buffer start in bytes to update in the descriptor set. -->
- <member><type>VkDeviceSize</type> <name>range</name></member> <!-- Size in bytes of the buffer resource for this descriptor update. -->
- </type>
- <type category="struct" name="VkDescriptorImageInfo">
- <member noautovalidity="true"><type>VkSampler</type> <name>sampler</name></member> <!-- Sampler to write to the descriptor in case it is a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor. Ignored otherwise. -->
- <member noautovalidity="true"><type>VkImageView</type> <name>imageView</name></member> <!-- Image view to write to the descriptor in case it is a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor. Ignored otherwise. -->
- <member noautovalidity="true"><type>VkImageLayout</type> <name>imageLayout</name></member> <!-- Layout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE). -->
- </type>
- <type category="struct" name="VkWriteDescriptorSet">
- <member values="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member noautovalidity="true"><type>VkDescriptorSet</type> <name>dstSet</name></member> <!-- Destination descriptor set -->
- <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to write -->
- <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to write -->
- <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write (determines the size of the array pointed by pDescriptors) -->
- <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Descriptor type to write (determines which members of the array pointed by pDescriptors are going to be used) -->
- <member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorImageInfo</type>* <name>pImageInfo</name></member> <!-- Sampler, image view, and layout for SAMPLER, COMBINED_IMAGE_SAMPLER, {SAMPLED,STORAGE}_IMAGE, and INPUT_ATTACHMENT descriptor types. -->
- <member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorBufferInfo</type>* <name>pBufferInfo</name></member> <!-- Raw buffer, size, and offset for {UNIFORM,STORAGE}_BUFFER[_DYNAMIC] descriptor types. -->
- <member noautovalidity="true" len="descriptorCount">const <type>VkBufferView</type>* <name>pTexelBufferView</name></member> <!-- Buffer view to write to the descriptor for {UNIFORM,STORAGE}_TEXEL_BUFFER descriptor types. -->
- </type>
- <type category="struct" name="VkCopyDescriptorSet">
- <member values="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDescriptorSet</type> <name>srcSet</name></member> <!-- Source descriptor set -->
- <member><type>uint32_t</type> <name>srcBinding</name></member> <!-- Binding within the source descriptor set to copy from -->
- <member><type>uint32_t</type> <name>srcArrayElement</name></member> <!-- Array element within the source binding to copy from -->
- <member><type>VkDescriptorSet</type> <name>dstSet</name></member> <!-- Destination descriptor set -->
- <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to copy to -->
- <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to copy to -->
- <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write (determines the size of the array pointed by pDescriptors) -->
- </type>
- <type category="struct" name="VkBufferCreateInfo">
- <member values="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDedicatedAllocationBufferCreateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name></member> <!-- Buffer creation flags -->
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes -->
- <member><type>VkBufferUsageFlags</type> <name>usage</name></member> <!-- Buffer usage flags -->
- <member><type>VkSharingMode</type> <name>sharingMode</name></member>
- <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member>
- <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member>
- </type>
- <type category="struct" name="VkBufferViewCreateInfo">
- <member values="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>VkBufferViewCreateFlags</type><name>flags</name></member> <!-- Reserved -->
- <member><type>VkBuffer</type> <name>buffer</name></member>
- <member><type>VkFormat</type> <name>format</name></member> <!-- Optionally specifies format of elements -->
- <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>range</name></member> <!-- View size specified in bytes -->
- </type>
- <type category="struct" name="VkImageSubresource">
- <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
- <member><type>uint32_t</type> <name>mipLevel</name></member>
- <member><type>uint32_t</type> <name>arrayLayer</name></member>
- </type>
- <type category="struct" name="VkImageSubresourceLayers">
- <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
- <member><type>uint32_t</type> <name>mipLevel</name></member>
- <member><type>uint32_t</type> <name>baseArrayLayer</name></member>
- <member><type>uint32_t</type> <name>layerCount</name></member>
- </type>
- <type category="struct" name="VkImageSubresourceRange">
- <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
- <member><type>uint32_t</type> <name>baseMipLevel</name></member>
- <member><type>uint32_t</type> <name>levelCount</name></member>
- <member><type>uint32_t</type> <name>baseArrayLayer</name></member>
- <member><type>uint32_t</type> <name>layerCount</name></member>
- </type>
- <type category="struct" name="VkMemoryBarrier">
- <member values="VK_STRUCTURE_TYPE_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize -->
- <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize -->
- </type>
- <type category="struct" name="VkBufferMemoryBarrier">
- <member values="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize -->
- <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize -->
- <member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member> <!-- Queue family to transition ownership from -->
- <member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member> <!-- Queue family to transition ownership to -->
- <member><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer to sync -->
- <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Offset within the buffer to sync -->
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Amount of bytes to sync -->
- </type>
- <type category="struct" name="VkImageMemoryBarrier">
- <member values="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize -->
- <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize -->
- <member><type>VkImageLayout</type> <name>oldLayout</name></member> <!-- Current layout of the image -->
- <member><type>VkImageLayout</type> <name>newLayout</name></member> <!-- New layout to transition the image to -->
- <member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member> <!-- Queue family to transition ownership from -->
- <member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member> <!-- Queue family to transition ownership to -->
- <member><type>VkImage</type> <name>image</name></member> <!-- Image to sync -->
- <member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member> <!-- Subresource range to sync -->
- </type>
- <type category="struct" name="VkImageCreateInfo">
- <member values="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDedicatedAllocationImageCreateInfoNV,VkImageSwapchainCreateInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member> <!-- Image creation flags -->
- <member><type>VkImageType</type> <name>imageType</name></member>
- <member><type>VkFormat</type> <name>format</name></member>
- <member><type>VkExtent3D</type> <name>extent</name></member>
- <member><type>uint32_t</type> <name>mipLevels</name></member>
- <member><type>uint32_t</type> <name>arrayLayers</name></member>
- <member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
- <member><type>VkImageTiling</type> <name>tiling</name></member>
- <member><type>VkImageUsageFlags</type> <name>usage</name></member> <!-- Image usage flags -->
- <member><type>VkSharingMode</type> <name>sharingMode</name></member> <!-- Cross-queue-family sharing mode -->
- <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> <!-- Number of queue families to share across -->
- <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> <!-- Array of queue family indices to share across -->
- <member><type>VkImageLayout</type> <name>initialLayout</name></member> <!-- Initial image layout for all subresources -->
- </type>
- <type category="struct" name="VkSubresourceLayout" returnedonly="true">
- <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>rowPitch</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>arrayPitch</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>depthPitch</name></member> <!-- Specified in bytes -->
- </type>
- <type category="struct" name="VkImageViewCreateInfo">
- <member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkImageViewCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkImage</type> <name>image</name></member>
- <member><type>VkImageViewType</type> <name>viewType</name></member>
- <member><type>VkFormat</type> <name>format</name></member>
- <member><type>VkComponentMapping</type> <name>components</name></member>
- <member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member>
- </type>
- <type category="struct" name="VkBufferCopy">
- <member><type>VkDeviceSize</type> <name>srcOffset</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>dstOffset</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes -->
- </type>
- <type category="struct" name="VkSparseMemoryBind">
- <member><type>VkDeviceSize</type> <name>resourceOffset</name></member> <!-- Specified in bytes -->
- <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes -->
- <member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member>
- <member><type>VkDeviceSize</type> <name>memoryOffset</name></member> <!-- Specified in bytes -->
- <member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member> <!-- Reserved for future -->
- </type>
- <type category="struct" name="VkSparseImageMemoryBind">
- <member><type>VkImageSubresource</type> <name>subresource</name></member>
- <member><type>VkOffset3D</type> <name>offset</name></member>
- <member><type>VkExtent3D</type> <name>extent</name></member>
- <member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member>
- <member><type>VkDeviceSize</type> <name>memoryOffset</name></member> <!-- Specified in bytes -->
- <member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member> <!-- Reserved for future -->
- </type>
- <type category="struct" name="VkSparseBufferMemoryBindInfo">
- <member><type>VkBuffer</type> <name>buffer</name></member>
- <member><type>uint32_t</type> <name>bindCount</name></member>
- <member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member>
- </type>
- <type category="struct" name="VkSparseImageOpaqueMemoryBindInfo">
- <member><type>VkImage</type> <name>image</name></member>
- <member><type>uint32_t</type> <name>bindCount</name></member>
- <member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member>
- </type>
- <type category="struct" name="VkSparseImageMemoryBindInfo">
- <member><type>VkImage</type> <name>image</name></member>
- <member><type>uint32_t</type> <name>bindCount</name></member>
- <member len="bindCount">const <type>VkSparseImageMemoryBind</type>* <name>pBinds</name></member>
- </type>
- <type category="struct" name="VkBindSparseInfo">
- <member values="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDeviceGroupBindSparseInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
- <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member>
- <member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member>
- <member optional="true"><type>uint32_t</type> <name>bufferBindCount</name></member>
- <member len="bufferBindCount">const <type>VkSparseBufferMemoryBindInfo</type>* <name>pBufferBinds</name></member>
- <member optional="true"><type>uint32_t</type> <name>imageOpaqueBindCount</name></member>
- <member len="imageOpaqueBindCount">const <type>VkSparseImageOpaqueMemoryBindInfo</type>* <name>pImageOpaqueBinds</name></member>
- <member optional="true"><type>uint32_t</type> <name>imageBindCount</name></member>
- <member len="imageBindCount">const <type>VkSparseImageMemoryBindInfo</type>* <name>pImageBinds</name></member>
- <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member>
- <member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member>
- </type>
- <type category="struct" name="VkImageCopy">
- <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
- <member><type>VkOffset3D</type> <name>srcOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images -->
- <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
- <member><type>VkOffset3D</type> <name>dstOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images -->
- <member><type>VkExtent3D</type> <name>extent</name></member> <!-- Specified in pixels for both compressed and uncompressed images -->
- </type>
- <type category="struct" name="VkImageBlit">
- <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
- <member><type>VkOffset3D</type> <name>srcOffsets</name>[2]</member> <!-- Specified in pixels for both compressed and uncompressed images -->
- <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
- <member><type>VkOffset3D</type> <name>dstOffsets</name>[2]</member> <!-- Specified in pixels for both compressed and uncompressed images -->
- </type>
- <type category="struct" name="VkBufferImageCopy">
- <member><type>VkDeviceSize</type> <name>bufferOffset</name></member> <!-- Specified in bytes -->
- <member><type>uint32_t</type> <name>bufferRowLength</name></member> <!-- Specified in texels -->
- <member><type>uint32_t</type> <name>bufferImageHeight</name></member>
- <member><type>VkImageSubresourceLayers</type> <name>imageSubresource</name></member>
- <member><type>VkOffset3D</type> <name>imageOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images -->
- <member><type>VkExtent3D</type> <name>imageExtent</name></member> <!-- Specified in pixels for both compressed and uncompressed images -->
- </type>
- <type category="struct" name="VkImageResolve">
- <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
- <member><type>VkOffset3D</type> <name>srcOffset</name></member>
- <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
- <member><type>VkOffset3D</type> <name>dstOffset</name></member>
- <member><type>VkExtent3D</type> <name>extent</name></member>
- </type>
- <type category="struct" name="VkShaderModuleCreateInfo">
- <member values="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkShaderModuleCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>size_t</type> <name>codeSize</name></member> <!-- Specified in bytes -->
- <member len="latexmath:[codeSize \over 4]">const <type>uint32_t</type>* <name>pCode</name></member> <!-- Binary code of size codeSize -->
- </type>
- <type category="struct" name="VkDescriptorSetLayoutBinding">
- <member><type>uint32_t</type> <name>binding</name></member> <!-- Binding number for this entry -->
- <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Type of the descriptors in this binding -->
- <member optional="true"><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors in this binding -->
- <member noautovalidity="true"><type>VkShaderStageFlags</type> <name>stageFlags</name></member> <!-- Shader stages this binding is visible to -->
- <member noautovalidity="true" optional="true" len="descriptorCount">const <type>VkSampler</type>* <name>pImmutableSamplers</name></member> <!-- Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements) -->
- </type>
- <type category="struct" name="VkDescriptorSetLayoutCreateInfo">
- <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDescriptorSetLayoutCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member optional="true"><type>uint32_t</type> <name>bindingCount</name></member> <!-- Number of bindings in the descriptor set layout -->
- <member len="bindingCount">const <type>VkDescriptorSetLayoutBinding</type>* <name>pBindings</name></member> <!-- Array of descriptor set layout bindings -->
- </type>
- <type category="struct" name="VkDescriptorPoolSize">
- <member><type>VkDescriptorType</type> <name>type</name></member>
- <member><type>uint32_t</type> <name>descriptorCount</name></member>
- </type>
- <type category="struct" name="VkDescriptorPoolCreateInfo">
- <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDescriptorPoolCreateFlags</type> <name>flags</name></member>
- <member><type>uint32_t</type> <name>maxSets</name></member>
- <member><type>uint32_t</type> <name>poolSizeCount</name></member>
- <member len="poolSizeCount">const <type>VkDescriptorPoolSize</type>* <name>pPoolSizes</name></member>
- </type>
- <type category="struct" name="VkDescriptorSetAllocateInfo">
- <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDescriptorPool</type> <name>descriptorPool</name></member>
- <member><type>uint32_t</type> <name>descriptorSetCount</name></member>
- <member len="descriptorSetCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member>
- </type>
- <type category="struct" name="VkSpecializationMapEntry">
- <member><type>uint32_t</type> <name>constantID</name></member> <!-- The SpecConstant ID specified in the BIL -->
- <member><type>uint32_t</type> <name>offset</name></member> <!-- Offset of the value in the data block -->
- <member><type>size_t</type> <name>size</name></member> <!-- Size in bytes of the SpecConstant -->
- </type>
- <type category="struct" name="VkSpecializationInfo">
- <member optional="true"><type>uint32_t</type> <name>mapEntryCount</name></member> <!-- Number of entries in the map -->
- <member len="mapEntryCount" noautovalidity="true">const <type>VkSpecializationMapEntry</type>* <name>pMapEntries</name></member> <!-- Array of map entries -->
- <member optional="true"><type>size_t</type> <name>dataSize</name></member> <!-- Size in bytes of pData -->
- <member len="dataSize">const <type>void</type>* <name>pData</name></member> <!-- Pointer to SpecConstant data -->
- </type>
- <type category="struct" name="VkPipelineShaderStageCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineShaderStageCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkShaderStageFlagBits</type> <name>stage</name></member> <!-- Shader stage -->
- <member><type>VkShaderModule</type> <name>module</name></member> <!-- Module containing entry point -->
- <member len="null-terminated">const <type>char</type>* <name>pName</name></member> <!-- Null-terminated entry point name -->
- <member optional="true">const <type>VkSpecializationInfo</type>* <name>pSpecializationInfo</name></member>
- </type>
- <type category="struct" name="VkComputePipelineCreateInfo">
- <member values="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name></member> <!-- Pipeline creation flags -->
- <member><type>VkPipelineShaderStageCreateInfo</type> <name>stage</name></member>
- <member><type>VkPipelineLayout</type> <name>layout</name></member> <!-- Interface layout of the pipeline -->
- <member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of -->
- <member><type>int32_t</type> <name>basePipelineIndex</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of -->
- </type>
- <type category="struct" name="VkVertexInputBindingDescription">
- <member><type>uint32_t</type> <name>binding</name></member> <!-- Vertex buffer binding id -->
- <member><type>uint32_t</type> <name>stride</name></member> <!-- Distance between vertices in bytes (0 = no advancement) -->
- <member><type>VkVertexInputRate</type> <name>inputRate</name></member> <!-- The rate at which the vertex data is consumed -->
- </type>
- <type category="struct" name="VkVertexInputAttributeDescription">
- <member><type>uint32_t</type> <name>location</name></member> <!-- location of the shader vertex attrib -->
- <member><type>uint32_t</type> <name>binding</name></member> <!-- Vertex buffer binding id -->
- <member><type>VkFormat</type> <name>format</name></member> <!-- format of source data -->
- <member><type>uint32_t</type> <name>offset</name></member> <!-- Offset of first element in bytes from base of vertex -->
- </type>
- <type category="struct" name="VkPipelineVertexInputStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineVertexInputStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member optional="true"><type>uint32_t</type> <name>vertexBindingDescriptionCount</name></member> <!-- number of bindings -->
- <member len="vertexBindingDescriptionCount">const <type>VkVertexInputBindingDescription</type>* <name>pVertexBindingDescriptions</name></member>
- <member optional="true"><type>uint32_t</type> <name>vertexAttributeDescriptionCount</name></member> <!-- number of attributes -->
- <member len="vertexAttributeDescriptionCount">const <type>VkVertexInputAttributeDescription</type>* <name>pVertexAttributeDescriptions</name></member>
- </type>
- <type category="struct" name="VkPipelineInputAssemblyStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineInputAssemblyStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkPrimitiveTopology</type> <name>topology</name></member>
- <member><type>VkBool32</type> <name>primitiveRestartEnable</name></member>
- </type>
- <type category="struct" name="VkPipelineTessellationStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineTessellationStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>patchControlPoints</name></member>
- </type>
- <type category="struct" name="VkPipelineViewportStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkPipelineViewportWScalingStateCreateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineViewportStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>viewportCount</name></member>
- <member noautovalidity="true" optional="true" len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></member>
- <member><type>uint32_t</type> <name>scissorCount</name></member>
- <member noautovalidity="true" optional="true" len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></member>
- </type>
- <type category="struct" name="VkPipelineRasterizationStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkPipelineRasterizationStateRasterizationOrderAMD">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineRasterizationStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkBool32</type> <name>depthClampEnable</name></member>
- <member><type>VkBool32</type> <name>rasterizerDiscardEnable</name></member>
- <member><type>VkPolygonMode</type> <name>polygonMode</name></member> <!-- optional (GL45) -->
- <member optional="true"><type>VkCullModeFlags</type> <name>cullMode</name></member>
- <member><type>VkFrontFace</type> <name>frontFace</name></member>
- <member><type>VkBool32</type> <name>depthBiasEnable</name></member>
- <member><type>float</type> <name>depthBiasConstantFactor</name></member>
- <member><type>float</type> <name>depthBiasClamp</name></member>
- <member><type>float</type> <name>depthBiasSlopeFactor</name></member>
- <member><type>float</type> <name>lineWidth</name></member>
- </type>
- <type category="struct" name="VkPipelineMultisampleStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineMultisampleStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkSampleCountFlagBits</type> <name>rasterizationSamples</name></member> <!-- Number of samples used for rasterization -->
- <member><type>VkBool32</type> <name>sampleShadingEnable</name></member> <!-- optional (GL45) -->
- <member><type>float</type> <name>minSampleShading</name></member> <!-- optional (GL45) -->
- <member optional="true" len="latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil]">const <type>VkSampleMask</type>* <name>pSampleMask</name></member> <!-- Array of sampleMask words -->
- <member><type>VkBool32</type> <name>alphaToCoverageEnable</name></member>
- <member><type>VkBool32</type> <name>alphaToOneEnable</name></member>
- </type>
- <type category="struct" name="VkPipelineColorBlendAttachmentState">
- <member><type>VkBool32</type> <name>blendEnable</name></member>
- <member><type>VkBlendFactor</type> <name>srcColorBlendFactor</name></member>
- <member><type>VkBlendFactor</type> <name>dstColorBlendFactor</name></member>
- <member><type>VkBlendOp</type> <name>colorBlendOp</name></member>
- <member><type>VkBlendFactor</type> <name>srcAlphaBlendFactor</name></member>
- <member><type>VkBlendFactor</type> <name>dstAlphaBlendFactor</name></member>
- <member><type>VkBlendOp</type> <name>alphaBlendOp</name></member>
- <member optional="true"><type>VkColorComponentFlags</type> <name>colorWriteMask</name></member>
- </type>
- <type category="struct" name="VkPipelineColorBlendStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineColorBlendStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkBool32</type> <name>logicOpEnable</name></member>
- <member noautovalidity="true"><type>VkLogicOp</type> <name>logicOp</name></member>
- <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> <!-- # of pAttachments -->
- <member len="attachmentCount">const <type>VkPipelineColorBlendAttachmentState</type>* <name>pAttachments</name></member>
- <member><type>float</type> <name>blendConstants</name>[4]</member>
- </type>
- <type category="struct" name="VkPipelineDynamicStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineDynamicStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>dynamicStateCount</name></member>
- <member len="dynamicStateCount">const <type>VkDynamicState</type>* <name>pDynamicStates</name></member>
- </type>
- <type category="struct" name="VkStencilOpState">
- <member><type>VkStencilOp</type> <name>failOp</name></member>
- <member><type>VkStencilOp</type> <name>passOp</name></member>
- <member><type>VkStencilOp</type> <name>depthFailOp</name></member>
- <member><type>VkCompareOp</type> <name>compareOp</name></member>
- <member><type>uint32_t</type> <name>compareMask</name></member>
- <member><type>uint32_t</type> <name>writeMask</name></member>
- <member><type>uint32_t</type> <name>reference</name></member>
- </type>
- <type category="struct" name="VkPipelineDepthStencilStateCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineDepthStencilStateCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkBool32</type> <name>depthTestEnable</name></member>
- <member><type>VkBool32</type> <name>depthWriteEnable</name></member>
- <member><type>VkCompareOp</type> <name>depthCompareOp</name></member>
- <member><type>VkBool32</type> <name>depthBoundsTestEnable</name></member> <!-- optional (depth_bounds_test) -->
- <member><type>VkBool32</type> <name>stencilTestEnable</name></member>
- <member><type>VkStencilOpState</type> <name>front</name></member>
- <member><type>VkStencilOpState</type> <name>back</name></member>
- <member><type>float</type> <name>minDepthBounds</name></member>
- <member><type>float</type> <name>maxDepthBounds</name></member>
- </type>
- <type category="struct" name="VkGraphicsPipelineCreateInfo">
- <member values="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name></member> <!-- Pipeline creation flags -->
- <member><type>uint32_t</type> <name>stageCount</name></member>
- <member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name></member> <!-- One entry for each active shader stage -->
- <member>const <type>VkPipelineVertexInputStateCreateInfo</type>* <name>pVertexInputState</name></member>
- <member>const <type>VkPipelineInputAssemblyStateCreateInfo</type>* <name>pInputAssemblyState</name></member>
- <member noautovalidity="true" optional="true">const <type>VkPipelineTessellationStateCreateInfo</type>* <name>pTessellationState</name></member>
- <member noautovalidity="true" optional="true">const <type>VkPipelineViewportStateCreateInfo</type>* <name>pViewportState</name></member>
- <member>const <type>VkPipelineRasterizationStateCreateInfo</type>* <name>pRasterizationState</name></member>
- <member noautovalidity="true" optional="true">const <type>VkPipelineMultisampleStateCreateInfo</type>* <name>pMultisampleState</name></member>
- <member noautovalidity="true" optional="true">const <type>VkPipelineDepthStencilStateCreateInfo</type>* <name>pDepthStencilState</name></member>
- <member noautovalidity="true" optional="true">const <type>VkPipelineColorBlendStateCreateInfo</type>* <name>pColorBlendState</name></member>
- <member optional="true">const <type>VkPipelineDynamicStateCreateInfo</type>* <name>pDynamicState</name></member>
- <member><type>VkPipelineLayout</type> <name>layout</name></member> <!-- Interface layout of the pipeline -->
- <member><type>VkRenderPass</type> <name>renderPass</name></member>
- <member><type>uint32_t</type> <name>subpass</name></member>
- <member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of -->
- <member><type>int32_t</type> <name>basePipelineIndex</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of -->
- </type>
- <type category="struct" name="VkPipelineCacheCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineCacheCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member optional="true"><type>size_t</type> <name>initialDataSize</name></member> <!-- Size of initial data to populate cache, in bytes -->
- <member len="initialDataSize">const <type>void</type>* <name>pInitialData</name></member> <!-- Initial data to populate cache -->
- </type>
- <type category="struct" name="VkPushConstantRange">
- <member><type>VkShaderStageFlags</type> <name>stageFlags</name></member> <!-- Which stages use the range -->
- <member><type>uint32_t</type> <name>offset</name></member> <!-- Start of the range, in bytes -->
- <member><type>uint32_t</type> <name>size</name></member> <!-- Size of the range, in bytes -->
- </type>
- <type category="struct" name="VkPipelineLayoutCreateInfo">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineLayoutCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member optional="true"><type>uint32_t</type> <name>setLayoutCount</name></member> <!-- Number of descriptor sets interfaced by the pipeline -->
- <member len="setLayoutCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member> <!-- Array of setCount number of descriptor set layout objects defining the layout of the -->
- <member optional="true"><type>uint32_t</type> <name>pushConstantRangeCount</name></member> <!-- Number of push-constant ranges used by the pipeline -->
- <member len="pushConstantRangeCount">const <type>VkPushConstantRange</type>* <name>pPushConstantRanges</name></member> <!-- Array of pushConstantRangeCount number of ranges used by various shader stages -->
- </type>
- <type category="struct" name="VkSamplerCreateInfo">
- <member values="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkSamplerCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkFilter</type> <name>magFilter</name></member> <!-- Filter mode for magnification -->
- <member><type>VkFilter</type> <name>minFilter</name></member> <!-- Filter mode for minifiation -->
- <member><type>VkSamplerMipmapMode</type> <name>mipmapMode</name></member> <!-- Mipmap selection mode -->
- <member><type>VkSamplerAddressMode</type> <name>addressModeU</name></member>
- <member><type>VkSamplerAddressMode</type> <name>addressModeV</name></member>
- <member><type>VkSamplerAddressMode</type> <name>addressModeW</name></member>
- <member><type>float</type> <name>mipLodBias</name></member>
- <member><type>VkBool32</type> <name>anisotropyEnable</name></member>
- <member><type>float</type> <name>maxAnisotropy</name></member>
- <member><type>VkBool32</type> <name>compareEnable</name></member>
- <member noautovalidity="true"><type>VkCompareOp</type> <name>compareOp</name></member>
- <member><type>float</type> <name>minLod</name></member>
- <member><type>float</type> <name>maxLod</name></member>
- <member noautovalidity="true"><type>VkBorderColor</type> <name>borderColor</name></member>
- <member><type>VkBool32</type> <name>unnormalizedCoordinates</name></member>
- </type>
- <type category="struct" name="VkCommandPoolCreateInfo">
- <member values="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkCommandPoolCreateFlags</type> <name>flags</name></member> <!-- Command pool creation flags -->
- <member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
- </type>
- <type category="struct" name="VkCommandBufferAllocateInfo">
- <member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkCommandPool</type> <name>commandPool</name></member>
- <member><type>VkCommandBufferLevel</type> <name>level</name></member>
- <member><type>uint32_t</type> <name>commandBufferCount</name></member>
- </type>
- <type category="struct" name="VkCommandBufferInheritanceInfo">
- <member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true" noautovalidity="true"><type>VkRenderPass</type> <name>renderPass</name></member> <!-- Render pass for secondary command buffers -->
- <member><type>uint32_t</type> <name>subpass</name></member>
- <member optional="true" noautovalidity="true"><type>VkFramebuffer</type> <name>framebuffer</name></member> <!-- Framebuffer for secondary command buffers -->
- <member><type>VkBool32</type> <name>occlusionQueryEnable</name></member> <!-- Whether this secondary command buffer may be executed during an occlusion query -->
- <member optional="true" noautovalidity="true"><type>VkQueryControlFlags</type> <name>queryFlags</name></member> <!-- Query flags used by this secondary command buffer, if executed during an occlusion query -->
- <member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name></member> <!-- Pipeline statistics that may be counted for this secondary command buffer -->
- </type>
- <type category="struct" name="VkCommandBufferBeginInfo">
- <member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDeviceGroupCommandBufferBeginInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkCommandBufferUsageFlags</type> <name>flags</name></member> <!-- Command buffer usage flags -->
- <member optional="true" noautovalidity="true">const <type>VkCommandBufferInheritanceInfo</type>* <name>pInheritanceInfo</name></member> <!-- Pointer to inheritance info for secondary command buffers -->
- </type>
- <type category="struct" name="VkRenderPassBeginInfo">
- <member values="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDeviceGroupRenderPassBeginInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkRenderPass</type> <name>renderPass</name></member>
- <member><type>VkFramebuffer</type> <name>framebuffer</name></member>
- <member><type>VkRect2D</type> <name>renderArea</name></member>
- <member optional="true"><type>uint32_t</type> <name>clearValueCount</name></member>
- <member len="clearValueCount" noautovalidity="true">const <type>VkClearValue</type>* <name>pClearValues</name></member>
- </type>
- <type category="union" name="VkClearColorValue" comment="// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.">
- <member><type>float</type> <name>float32</name>[4]</member>
- <member><type>int32_t</type> <name>int32</name>[4]</member>
- <member><type>uint32_t</type> <name>uint32</name>[4]</member>
- </type>
- <type category="struct" name="VkClearDepthStencilValue">
- <member><type>float</type> <name>depth</name></member>
- <member><type>uint32_t</type> <name>stencil</name></member>
- </type>
- <type category="union" name="VkClearValue" comment="// Union allowing specification of color or depth and stencil values. Actual value selected is based on attachment being cleared.">
- <member><type>VkClearColorValue</type> <name>color</name></member>
- <member><type>VkClearDepthStencilValue</type> <name>depthStencil</name></member>
- </type>
- <type category="struct" name="VkClearAttachment">
- <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
- <member><type>uint32_t</type> <name>colorAttachment</name></member>
- <member><type>VkClearValue</type> <name>clearValue</name></member>
- </type>
- <type category="struct" name="VkAttachmentDescription">
- <member optional="true"><type>VkAttachmentDescriptionFlags</type> <name>flags</name></member>
- <member><type>VkFormat</type> <name>format</name></member>
- <member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
- <member><type>VkAttachmentLoadOp</type> <name>loadOp</name></member> <!-- Load operation for color or depth data -->
- <member><type>VkAttachmentStoreOp</type> <name>storeOp</name></member> <!-- Store operation for color or depth data -->
- <member><type>VkAttachmentLoadOp</type> <name>stencilLoadOp</name></member> <!-- Load operation for stencil data -->
- <member><type>VkAttachmentStoreOp</type> <name>stencilStoreOp</name></member> <!-- Store operation for stencil data -->
- <member><type>VkImageLayout</type> <name>initialLayout</name></member>
- <member><type>VkImageLayout</type> <name>finalLayout</name></member>
- </type>
- <type category="struct" name="VkAttachmentReference">
- <member><type>uint32_t</type> <name>attachment</name></member>
- <member><type>VkImageLayout</type> <name>layout</name></member>
- </type>
- <type category="struct" name="VkSubpassDescription">
- <member optional="true"><type>VkSubpassDescriptionFlags</type> <name>flags</name></member>
- <member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member> <!-- Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now -->
- <member optional="true"><type>uint32_t</type> <name>inputAttachmentCount</name></member>
- <member len="inputAttachmentCount">const <type>VkAttachmentReference</type>* <name>pInputAttachments</name></member>
- <member optional="true"><type>uint32_t</type> <name>colorAttachmentCount</name></member>
- <member len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pColorAttachments</name></member>
- <member optional="true" len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pResolveAttachments</name></member>
- <member optional="true">const <type>VkAttachmentReference</type>* <name>pDepthStencilAttachment</name></member>
- <member optional="true"><type>uint32_t</type> <name>preserveAttachmentCount</name></member>
- <member len="preserveAttachmentCount">const <type>uint32_t</type>* <name>pPreserveAttachments</name></member>
- </type>
- <type category="struct" name="VkSubpassDependency">
- <member><type>uint32_t</type> <name>srcSubpass</name></member>
- <member><type>uint32_t</type> <name>dstSubpass</name></member>
- <member><type>VkPipelineStageFlags</type> <name>srcStageMask</name></member>
- <member><type>VkPipelineStageFlags</type> <name>dstStageMask</name></member>
- <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize -->
- <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize -->
- <member optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></member>
- </type>
- <type category="struct" name="VkRenderPassCreateInfo">
- <member values="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkRenderPassCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member>
- <member len="attachmentCount">const <type>VkAttachmentDescription</type>* <name>pAttachments</name></member>
- <member><type>uint32_t</type> <name>subpassCount</name></member>
- <member len="subpassCount">const <type>VkSubpassDescription</type>* <name>pSubpasses</name></member>
- <member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member>
- <member len="dependencyCount">const <type>VkSubpassDependency</type>* <name>pDependencies</name></member>
- </type>
- <type category="struct" name="VkEventCreateInfo">
- <member values="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkEventCreateFlags</type> <name>flags</name></member> <!-- Event creation flags -->
- </type>
- <type category="struct" name="VkFenceCreateInfo">
- <member values="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkFenceCreateFlags</type> <name>flags</name></member> <!-- Fence creation flags -->
- </type>
- <type category="struct" name="VkPhysicalDeviceFeatures">
- <member><type>VkBool32</type> <name>robustBufferAccess</name></member> <!-- out of bounds buffer accesses are well defined -->
- <member><type>VkBool32</type> <name>fullDrawIndexUint32</name></member> <!-- full 32-bit range of indices for indexed draw calls -->
- <member><type>VkBool32</type> <name>imageCubeArray</name></member> <!-- image views which are arrays of cube maps -->
- <member><type>VkBool32</type> <name>independentBlend</name></member> <!-- blending operations are controlled per-attachment -->
- <member><type>VkBool32</type> <name>geometryShader</name></member> <!-- geometry stage -->
- <member><type>VkBool32</type> <name>tessellationShader</name></member> <!-- tessellation control and evaluation stage -->
- <member><type>VkBool32</type> <name>sampleRateShading</name></member> <!-- per-sample shading and interpolation -->
- <member><type>VkBool32</type> <name>dualSrcBlend</name></member> <!-- blend operations which take two sources -->
- <member><type>VkBool32</type> <name>logicOp</name></member> <!-- logic operations -->
- <member><type>VkBool32</type> <name>multiDrawIndirect</name></member> <!-- multi draw indirect -->
- <member><type>VkBool32</type> <name>drawIndirectFirstInstance</name></member> <!-- indirect draws can use non-zero firstInstance -->
- <member><type>VkBool32</type> <name>depthClamp</name></member> <!-- depth clamping -->
- <member><type>VkBool32</type> <name>depthBiasClamp</name></member> <!-- depth bias clamping -->
- <member><type>VkBool32</type> <name>fillModeNonSolid</name></member> <!-- point and wireframe fill modes -->
- <member><type>VkBool32</type> <name>depthBounds</name></member> <!-- depth bounds test -->
- <member><type>VkBool32</type> <name>wideLines</name></member> <!-- lines with width greater than 1 -->
- <member><type>VkBool32</type> <name>largePoints</name></member> <!-- points with size greater than 1 -->
- <member><type>VkBool32</type> <name>alphaToOne</name></member> <!-- the fragment alpha component can be forced to maximum representable alpha value -->
- <member><type>VkBool32</type> <name>multiViewport</name></member> <!-- viewport arrays -->
- <member><type>VkBool32</type> <name>samplerAnisotropy</name></member> <!-- anisotropic sampler filtering -->
- <member><type>VkBool32</type> <name>textureCompressionETC2</name></member> <!-- ETC texture compression formats -->
- <member><type>VkBool32</type> <name>textureCompressionASTC_LDR</name></member> <!-- ASTC LDR texture compression formats -->
- <member><type>VkBool32</type> <name>textureCompressionBC</name></member> <!-- BC1-7 texture compressed formats -->
- <member><type>VkBool32</type> <name>occlusionQueryPrecise</name></member> <!-- precise occlusion queries returning actual sample counts -->
- <member><type>VkBool32</type> <name>pipelineStatisticsQuery</name></member> <!-- pipeline statistics query -->
- <member><type>VkBool32</type> <name>vertexPipelineStoresAndAtomics</name></member> <!-- stores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages -->
- <member><type>VkBool32</type> <name>fragmentStoresAndAtomics</name></member> <!-- stores and atomic ops on storage buffers and images are supported in the fragment stage -->
- <member><type>VkBool32</type> <name>shaderTessellationAndGeometryPointSize</name></member><!-- tessellation and geometry stages can export point size -->
- <member><type>VkBool32</type> <name>shaderImageGatherExtended</name></member> <!-- image gather with run-time values and independent offsets -->
- <member><type>VkBool32</type> <name>shaderStorageImageExtendedFormats</name></member> <!-- the extended set of formats can be used for storage images -->
- <member><type>VkBool32</type> <name>shaderStorageImageMultisample</name></member> <!-- multisample images can be used for storage images -->
- <member><type>VkBool32</type> <name>shaderStorageImageReadWithoutFormat</name></member> <!-- read from storage image does not require format qualifier -->
- <member><type>VkBool32</type> <name>shaderStorageImageWriteWithoutFormat</name></member> <!-- write to storage image does not require format qualifier -->
- <member><type>VkBool32</type> <name>shaderUniformBufferArrayDynamicIndexing</name></member> <!-- arrays of uniform buffers can be accessed with dynamically uniform indices -->
- <member><type>VkBool32</type> <name>shaderSampledImageArrayDynamicIndexing</name></member> <!-- arrays of sampled images can be accessed with dynamically uniform indices -->
- <member><type>VkBool32</type> <name>shaderStorageBufferArrayDynamicIndexing</name></member> <!-- arrays of storage buffers can be accessed with dynamically uniform indices -->
- <member><type>VkBool32</type> <name>shaderStorageImageArrayDynamicIndexing</name></member> <!-- arrays of storage images can be accessed with dynamically uniform indices -->
- <member><type>VkBool32</type> <name>shaderClipDistance</name></member> <!-- clip distance in shaders -->
- <member><type>VkBool32</type> <name>shaderCullDistance</name></member> <!-- cull distance in shaders -->
- <member><type>VkBool32</type> <name>shaderFloat64</name></member> <!-- 64-bit floats (doubles) in shaders -->
- <member><type>VkBool32</type> <name>shaderInt64</name></member> <!-- 64-bit integers in shaders -->
- <member><type>VkBool32</type> <name>shaderInt16</name></member> <!-- 16-bit integers in shaders -->
- <member><type>VkBool32</type> <name>shaderResourceResidency</name></member> <!-- shader can use texture operations that return resource residency information (requires sparseNonResident support) -->
- <member><type>VkBool32</type> <name>shaderResourceMinLod</name></member> <!-- shader can use texture operations that specify minimum resource level of detail -->
- <member><type>VkBool32</type> <name>sparseBinding</name></member> <!-- Sparse resources support: Resource memory can be managed at opaque page level rather than object level -->
- <member><type>VkBool32</type> <name>sparseResidencyBuffer</name></member> <!-- Sparse resources support: GPU can access partially resident buffers -->
- <member><type>VkBool32</type> <name>sparseResidencyImage2D</name></member> <!-- Sparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images -->
- <member><type>VkBool32</type> <name>sparseResidencyImage3D</name></member> <!-- Sparse resources support: GPU can access partially resident 3D images -->
- <member><type>VkBool32</type> <name>sparseResidency2Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples -->
- <member><type>VkBool32</type> <name>sparseResidency4Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples -->
- <member><type>VkBool32</type> <name>sparseResidency8Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples -->
- <member><type>VkBool32</type> <name>sparseResidency16Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples -->
- <member><type>VkBool32</type> <name>sparseResidencyAliased</name></member> <!-- Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) -->
- <member><type>VkBool32</type> <name>variableMultisampleRate</name></member> <!-- multisample rate must be the same for all pipelines in a subpass -->
- <member><type>VkBool32</type> <name>inheritedQueries</name></member> <!-- Queries may be inherited from primary to secondary command buffers -->
- </type>
- <type category="struct" name="VkPhysicalDeviceSparseProperties" returnedonly="true">
- <member><type>VkBool32</type> <name>residencyStandard2DBlockShape</name></member> <!-- Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard sparse image block shapes (based on pixel format) -->
- <member><type>VkBool32</type> <name>residencyStandard2DMultisampleBlockShape</name></member> <!-- Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard sparse image block shapes (based on pixel format) -->
- <member><type>VkBool32</type> <name>residencyStandard3DBlockShape</name></member> <!-- Sparse resources support: GPU will access all 3D sparse resources using the standard sparse image block shapes (based on pixel format) -->
- <member><type>VkBool32</type> <name>residencyAlignedMipSize</name></member> <!-- Sparse resources support: Images with mip level dimensions that are NOT a multiple of the sparse image block dimensions will be placed in the mip tail -->
- <member><type>VkBool32</type> <name>residencyNonResidentStrict</name></member> <!-- Sparse resources support: GPU can consistently access non-resident regions of a resource, all reads return as if data is 0, writes are discarded -->
- </type>
- <type category="struct" name="VkPhysicalDeviceLimits" returnedonly="true">
- <!-- resource maximum sizes -->
- <member><type>uint32_t</type> <name>maxImageDimension1D</name></member> <!-- max 1D image dimension -->
- <member><type>uint32_t</type> <name>maxImageDimension2D</name></member> <!-- max 2D image dimension -->
- <member><type>uint32_t</type> <name>maxImageDimension3D</name></member> <!-- max 3D image dimension -->
- <member><type>uint32_t</type> <name>maxImageDimensionCube</name></member> <!-- max cubemap image dimension -->
- <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- max layers for image arrays -->
- <member><type>uint32_t</type> <name>maxTexelBufferElements</name></member> <!-- max texel buffer size (fstexels) -->
- <member><type>uint32_t</type> <name>maxUniformBufferRange</name></member> <!-- max uniform buffer range (bytes) -->
- <member><type>uint32_t</type> <name>maxStorageBufferRange</name></member> <!-- max storage buffer range (bytes) -->
- <member><type>uint32_t</type> <name>maxPushConstantsSize</name></member> <!-- max size of the push constants pool (bytes) -->
- <!-- memory limits -->
- <member><type>uint32_t</type> <name>maxMemoryAllocationCount</name></member> <!-- max number of device memory allocations supported -->
- <member><type>uint32_t</type> <name>maxSamplerAllocationCount</name></member> <!-- max number of samplers that can be allocated on a device -->
- <member><type>VkDeviceSize</type> <name>bufferImageGranularity</name></member> <!-- Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage -->
- <member><type>VkDeviceSize</type> <name>sparseAddressSpaceSize</name></member> <!-- Total address space available for sparse allocations (bytes) -->
- <!-- descriptor set limits -->
- <member><type>uint32_t</type> <name>maxBoundDescriptorSets</name></member> <!-- max number of descriptors sets that can be bound to a pipeline -->
- <member><type>uint32_t</type> <name>maxPerStageDescriptorSamplers</name></member> <!-- max number of samplers allowed per-stage in a descriptor set -->
- <member><type>uint32_t</type> <name>maxPerStageDescriptorUniformBuffers</name></member> <!-- max number of uniform buffers allowed per-stage in a descriptor set -->
- <member><type>uint32_t</type> <name>maxPerStageDescriptorStorageBuffers</name></member> <!-- max number of storage buffers allowed per-stage in a descriptor set -->
- <member><type>uint32_t</type> <name>maxPerStageDescriptorSampledImages</name></member> <!-- max number of sampled images allowed per-stage in a descriptor set -->
- <member><type>uint32_t</type> <name>maxPerStageDescriptorStorageImages</name></member> <!-- max number of storage images allowed per-stage in a descriptor set -->
- <member><type>uint32_t</type> <name>maxPerStageDescriptorInputAttachments</name></member> <!-- max number of input attachments allowed per-stage in a descriptor set -->
- <member><type>uint32_t</type> <name>maxPerStageResources</name></member> <!-- max number of resources allowed by a single stage -->
- <member><type>uint32_t</type> <name>maxDescriptorSetSamplers</name></member> <!-- max number of samplers allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetUniformBuffers</name></member> <!-- max number of uniform buffers allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetUniformBuffersDynamic</name></member> <!-- max number of dynamic uniform buffers allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetStorageBuffers</name></member> <!-- max number of storage buffers allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetStorageBuffersDynamic</name></member> <!-- max number of dynamic storage buffers allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetSampledImages</name></member> <!-- max number of sampled images allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetStorageImages</name></member> <!-- max number of storage images allowed in all stages in a descriptor set -->
- <member><type>uint32_t</type> <name>maxDescriptorSetInputAttachments</name></member> <!-- max number of input attachments allowed in all stages in a descriptor set -->
- <!-- vertex stage limits -->
- <member><type>uint32_t</type> <name>maxVertexInputAttributes</name></member> <!-- max number of vertex input attribute slots -->
- <member><type>uint32_t</type> <name>maxVertexInputBindings</name></member> <!-- max number of vertex input binding slots -->
- <member><type>uint32_t</type> <name>maxVertexInputAttributeOffset</name></member> <!-- max vertex input attribute offset added to vertex buffer offset -->
- <member><type>uint32_t</type> <name>maxVertexInputBindingStride</name></member> <!-- max vertex input binding stride -->
- <member><type>uint32_t</type> <name>maxVertexOutputComponents</name></member> <!-- max number of output components written by vertex shader -->
- <!-- tessellation control stage limits -->
- <member><type>uint32_t</type> <name>maxTessellationGenerationLevel</name></member> <!-- max level supported by tessellation primitive generator -->
- <member><type>uint32_t</type> <name>maxTessellationPatchSize</name></member> <!-- max patch size (vertices) -->
- <member><type>uint32_t</type> <name>maxTessellationControlPerVertexInputComponents</name></member> <!-- max number of input components per-vertex in TCS -->
- <member><type>uint32_t</type> <name>maxTessellationControlPerVertexOutputComponents</name></member> <!-- max number of output components per-vertex in TCS -->
- <member><type>uint32_t</type> <name>maxTessellationControlPerPatchOutputComponents</name></member> <!-- max number of output components per-patch in TCS -->
- <member><type>uint32_t</type> <name>maxTessellationControlTotalOutputComponents</name></member> <!-- max total number of per-vertex and per-patch output components in TCS -->
- <!-- tessellation evaluation stage limits -->
- <member><type>uint32_t</type> <name>maxTessellationEvaluationInputComponents</name></member> <!-- max number of input components per vertex in TES -->
- <member><type>uint32_t</type> <name>maxTessellationEvaluationOutputComponents</name></member> <!-- max number of output components per vertex in TES -->
- <!-- geometry stage limits -->
- <member><type>uint32_t</type> <name>maxGeometryShaderInvocations</name></member> <!-- max invocation count supported in geometry shader -->
- <member><type>uint32_t</type> <name>maxGeometryInputComponents</name></member> <!-- max number of input components read in geometry stage -->
- <member><type>uint32_t</type> <name>maxGeometryOutputComponents</name></member> <!-- max number of output components written in geometry stage -->
- <member><type>uint32_t</type> <name>maxGeometryOutputVertices</name></member> <!-- max number of vertices that can be emitted in geometry stage -->
- <member><type>uint32_t</type> <name>maxGeometryTotalOutputComponents</name></member> <!-- max total number of components (all vertices) written in geometry stage -->
- <!-- fragment stage limits -->
- <member><type>uint32_t</type> <name>maxFragmentInputComponents</name></member> <!-- max number of input compontents read in fragment stage -->
- <member><type>uint32_t</type> <name>maxFragmentOutputAttachments</name></member> <!-- max number of output attachments written in fragment stage -->
- <member><type>uint32_t</type> <name>maxFragmentDualSrcAttachments</name></member> <!-- max number of output attachments written when using dual source blending -->
- <member><type>uint32_t</type> <name>maxFragmentCombinedOutputResources</name></member><!-- max total number of storage buffers, storage images and output buffers -->
- <!-- compute stage limits -->
- <member><type>uint32_t</type> <name>maxComputeSharedMemorySize</name></member> <!-- max total storage size of work group local storage (bytes) -->
- <member><type>uint32_t</type> <name>maxComputeWorkGroupCount</name>[3]</member> <!-- max num of compute work groups that may be dispatched by a single command (x,y,z) -->
- <member><type>uint32_t</type> <name>maxComputeWorkGroupInvocations</name></member> <!-- max total compute invocations in a single local work group -->
- <member><type>uint32_t</type> <name>maxComputeWorkGroupSize</name>[3]</member> <!-- max local size of a compute work group (x,y,z) -->
- <member><type>uint32_t</type> <name>subPixelPrecisionBits</name></member> <!-- number bits of subpixel precision in screen x and y-->
- <member><type>uint32_t</type> <name>subTexelPrecisionBits</name></member> <!-- number bits of precision for selecting texel weights-->
- <member><type>uint32_t</type> <name>mipmapPrecisionBits</name></member> <!-- number bits of precision for selecting mipmap weights -->
- <member><type>uint32_t</type> <name>maxDrawIndexedIndexValue</name></member> <!-- max index value for indexed draw calls (for 32-bit indices) -->
- <member><type>uint32_t</type> <name>maxDrawIndirectCount</name></member> <!-- max draw count for indirect draw calls -->
- <member><type>float</type> <name>maxSamplerLodBias</name></member> <!-- max absolute sampler level of detail bias -->
- <member><type>float</type> <name>maxSamplerAnisotropy</name></member> <!-- max degree of sampler anisotropy -->
- <member><type>uint32_t</type> <name>maxViewports</name></member> <!-- max number of active viewports -->
- <member><type>uint32_t</type> <name>maxViewportDimensions</name>[2]</member> <!-- max viewport dimensions (x,y) -->
- <member><type>float</type> <name>viewportBoundsRange</name>[2]</member> <!-- viewport bounds range (min,max) -->
- <member><type>uint32_t</type> <name>viewportSubPixelBits</name></member> <!-- number bits of subpixel precision for viewport -->
- <member><type>size_t</type> <name>minMemoryMapAlignment</name></member> <!-- min required alignment of pointers returned by MapMemory (bytes) -->
- <member><type>VkDeviceSize</type> <name>minTexelBufferOffsetAlignment</name></member> <!-- min required alignment for texel buffer offsets (bytes) -->
- <member><type>VkDeviceSize</type> <name>minUniformBufferOffsetAlignment</name></member> <!-- min required alignment for uniform buffer sizes and offsets (bytes) -->
- <member><type>VkDeviceSize</type> <name>minStorageBufferOffsetAlignment</name></member> <!-- min required alignment for storage buffer offsets (bytes) -->
- <member><type>int32_t</type> <name>minTexelOffset</name></member> <!-- min texel offset for OpTextureSampleOffset -->
- <member><type>uint32_t</type> <name>maxTexelOffset</name></member> <!-- max texel offset for OpTextureSampleOffset -->
- <member><type>int32_t</type> <name>minTexelGatherOffset</name></member> <!-- min texel offset for OpTextureGatherOffset -->
- <member><type>uint32_t</type> <name>maxTexelGatherOffset</name></member> <!-- max texel offset for OpTextureGatherOffset -->
- <member><type>float</type> <name>minInterpolationOffset</name></member> <!-- furthest negative offset for interpolateAtOffset -->
- <member><type>float</type> <name>maxInterpolationOffset</name></member> <!-- furthest positive offset for interpolateAtOffset -->
- <member><type>uint32_t</type> <name>subPixelInterpolationOffsetBits</name></member> <!-- number of subpixel bits for interpolateAtOffset -->
- <member><type>uint32_t</type> <name>maxFramebufferWidth</name></member> <!-- max width for a framebuffer -->
- <member><type>uint32_t</type> <name>maxFramebufferHeight</name></member> <!-- max height for a framebuffer -->
- <member><type>uint32_t</type> <name>maxFramebufferLayers</name></member> <!-- max layer count for a layered framebuffer -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferColorSampleCounts</name></member> <!-- supported color sample counts for a framebuffer -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferDepthSampleCounts</name></member> <!-- supported depth sample counts for a framebuffer -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferStencilSampleCounts</name></member> <!-- supported stencil sample counts for a framebuffer -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferNoAttachmentsSampleCounts</name></member> <!-- supported sample counts for a framebuffer with no attachments -->
- <member><type>uint32_t</type> <name>maxColorAttachments</name></member> <!-- max number of color attachments per subpass -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageColorSampleCounts</name></member> <!-- supported color sample counts for a non-integer sampled image -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageIntegerSampleCounts</name></member> <!-- supported sample counts for an integer image -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageDepthSampleCounts</name></member> <!-- supported depth sample counts for a sampled image -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageStencilSampleCounts</name></member> <!-- supported stencil sample counts for a sampled image -->
- <member optional="true"><type>VkSampleCountFlags</type> <name>storageImageSampleCounts</name></member> <!-- supported sample counts for a storage image -->
- <member><type>uint32_t</type> <name>maxSampleMaskWords</name></member> <!-- max number of sample mask words -->
- <member><type>VkBool32</type> <name>timestampComputeAndGraphics</name></member> <!-- timestamps on graphics and compute queues -->
- <member><type>float</type> <name>timestampPeriod</name></member> <!-- number of nanoseconds it takes for timestamp query value to increment by 1 -->
- <member><type>uint32_t</type> <name>maxClipDistances</name></member> <!-- max number of clip distances -->
- <member><type>uint32_t</type> <name>maxCullDistances</name></member> <!-- max number of cull distances -->
- <member><type>uint32_t</type> <name>maxCombinedClipAndCullDistances</name></member> <!-- max combined number of user clipping -->
- <member><type>uint32_t</type> <name>discreteQueuePriorities</name></member> <!-- distinct queue priorities available -->
- <member><type>float</type> <name>pointSizeRange</name>[2]</member> <!-- range (min,max) of supported point sizes -->
- <member><type>float</type> <name>lineWidthRange</name>[2]</member> <!-- range (min,max) of supported line widths -->
- <member><type>float</type> <name>pointSizeGranularity</name></member> <!-- granularity of supported point sizes -->
- <member><type>float</type> <name>lineWidthGranularity</name></member> <!-- granularity of supported line widths -->
- <member><type>VkBool32</type> <name>strictLines</name></member> <!-- line rasterization follows preferred rules -->
- <member><type>VkBool32</type> <name>standardSampleLocations</name></member> <!-- supports standard sample locations for all supported sample counts -->
- <member><type>VkDeviceSize</type> <name>optimalBufferCopyOffsetAlignment</name></member> <!-- optimal offset of buffer copies -->
- <member><type>VkDeviceSize</type> <name>optimalBufferCopyRowPitchAlignment</name></member><!-- optimal pitch of buffer copies -->
- <member><type>VkDeviceSize</type> <name>nonCoherentAtomSize</name></member> <!-- minimum size and alignment for non-coherent host-mapped device memory access -->
- </type>
- <type category="struct" name="VkSemaphoreCreateInfo">
- <member values="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkSemaphoreCreateFlags</type> <name>flags</name></member> <!-- Semaphore creation flags -->
- </type>
- <type category="struct" name="VkQueryPoolCreateInfo">
- <member values="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkQueryPoolCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkQueryType</type> <name>queryType</name></member>
- <member><type>uint32_t</type> <name>queryCount</name></member>
- <member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name></member> <!-- Optional -->
- </type>
- <type category="struct" name="VkFramebufferCreateInfo">
- <member values="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkFramebufferCreateFlags</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkRenderPass</type> <name>renderPass</name></member>
- <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member>
- <member len="attachmentCount">const <type>VkImageView</type>* <name>pAttachments</name></member>
- <member><type>uint32_t</type> <name>width</name></member>
- <member><type>uint32_t</type> <name>height</name></member>
- <member><type>uint32_t</type> <name>layers</name></member>
- </type>
- <type category="struct" name="VkDrawIndirectCommand">
- <member><type>uint32_t</type> <name>vertexCount</name></member>
- <member><type>uint32_t</type> <name>instanceCount</name></member>
- <member><type>uint32_t</type> <name>firstVertex</name></member>
- <member><type>uint32_t</type> <name>firstInstance</name></member>
- </type>
- <type category="struct" name="VkDrawIndexedIndirectCommand">
- <member><type>uint32_t</type> <name>indexCount</name></member>
- <member><type>uint32_t</type> <name>instanceCount</name></member>
- <member><type>uint32_t</type> <name>firstIndex</name></member>
- <member><type>int32_t</type> <name>vertexOffset</name></member>
- <member><type>uint32_t</type> <name>firstInstance</name></member>
- </type>
- <type category="struct" name="VkDispatchIndirectCommand">
- <member><type>uint32_t</type> <name>x</name></member>
- <member><type>uint32_t</type> <name>y</name></member>
- <member><type>uint32_t</type> <name>z</name></member>
- </type>
- <type category="struct" name="VkSubmitInfo">
- <member values="VK_STRUCTURE_TYPE_SUBMIT_INFO"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkWin32KeyedMutexAcquireReleaseInfoNV,VkWin32KeyedMutexAcquireReleaseInfoKHX,VkD3D12FenceSubmitInfoKHX,VkDeviceGroupSubmitInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member>
- <member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member>
- <member len="waitSemaphoreCount">const <type>VkPipelineStageFlags</type>* <name>pWaitDstStageMask</name></member>
- <member optional="true"><type>uint32_t</type> <name>commandBufferCount</name></member>
- <member len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></member>
- <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member>
- <member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member>
- </type>
- <!-- WSI extensions -->
- <type category="struct" name="VkDisplayPropertiesKHR" returnedonly="true">
- <member><type>VkDisplayKHR</type> <name>display</name></member> <!-- Handle of the display object -->
- <member len="null-terminated">const <type>char</type>* <name>displayName</name></member> <!-- Name of the display -->
- <member><type>VkExtent2D</type> <name>physicalDimensions</name></member> <!-- In millimeters? -->
- <member><type>VkExtent2D</type> <name>physicalResolution</name></member> <!-- Max resolution for CRT? -->
- <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- one or more bits from VkSurfaceTransformFlagsKHR -->
- <member><type>VkBool32</type> <name>planeReorderPossible</name></member> <!-- VK_TRUE if the overlay plane's z-order can be changed on this display. -->
- <member><type>VkBool32</type> <name>persistentContent</name></member> <!-- VK_TRUE if this is a "smart" display that supports self-refresh/internal buffering. -->
- </type>
- <type category="struct" name="VkDisplayPlanePropertiesKHR" returnedonly="true">
- <member><type>VkDisplayKHR</type> <name>currentDisplay</name></member> <!-- Display the plane is currently associated with. Will be VK_NULL_HANDLE if the plane is not in use. -->
- <member><type>uint32_t</type> <name>currentStackIndex</name></member> <!-- Current z-order of the plane. -->
- </type>
- <type category="struct" name="VkDisplayModeParametersKHR">
- <member><type>VkExtent2D</type> <name>visibleRegion</name></member> <!-- Visible scanout region. -->
- <member><type>uint32_t</type> <name>refreshRate</name></member> <!-- Number of times per second the display is updated. -->
- </type>
- <type category="struct" name="VkDisplayModePropertiesKHR" returnedonly="true">
- <member><type>VkDisplayModeKHR</type> <name>displayMode</name></member> <!-- Handle of this display mode. -->
- <member><type>VkDisplayModeParametersKHR</type> <name>parameters</name></member> <!-- The parameters this mode uses. -->
- </type>
- <type category="struct" name="VkDisplayModeCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDisplayModeCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkDisplayModeParametersKHR</type> <name>parameters</name></member> <!-- The parameters this mode uses. -->
- </type>
- <type category="struct" name="VkDisplayPlaneCapabilitiesKHR" returnedonly="true">
- <member optional="true"><type>VkDisplayPlaneAlphaFlagsKHR</type> <name>supportedAlpha</name></member> <!-- Types of alpha blending supported, if any. -->
- <member><type>VkOffset2D</type> <name>minSrcPosition</name></member> <!-- Does the plane have any position and extent restrictions? -->
- <member><type>VkOffset2D</type> <name>maxSrcPosition</name></member>
- <member><type>VkExtent2D</type> <name>minSrcExtent</name></member>
- <member><type>VkExtent2D</type> <name>maxSrcExtent</name></member>
- <member><type>VkOffset2D</type> <name>minDstPosition</name></member>
- <member><type>VkOffset2D</type> <name>maxDstPosition</name></member>
- <member><type>VkExtent2D</type> <name>minDstExtent</name></member>
- <member><type>VkExtent2D</type> <name>maxDstExtent</name></member>
- </type>
- <type category="struct" name="VkDisplaySurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDisplaySurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkDisplayModeKHR</type> <name>displayMode</name></member> <!-- The mode to use when displaying this surface -->
- <member><type>uint32_t</type> <name>planeIndex</name></member> <!-- The plane on which this surface appears. Must be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR() in pPropertyCount. -->
- <member><type>uint32_t</type> <name>planeStackIndex</name></member> <!-- The z-order of the plane. -->
- <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name></member> <!-- Transform to apply to the images as part of the scanout operation -->
- <member><type>float</type> <name>globalAlpha</name></member> <!-- Global alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR -->
- <member><type>VkDisplayPlaneAlphaFlagBitsKHR</type> <name>alphaMode</name></member> <!-- What type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha. -->
- <member><type>VkExtent2D</type> <name>imageExtent</name></member> <!-- size of the images to use with this surface -->
- </type>
- <type category="struct" name="VkDisplayPresentInfoKHR">
- <member values="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkRect2D</type> <name>srcRect</name></member> <!-- Rectangle within the presentable image to read pixel data from when presenting to the display. -->
- <member><type>VkRect2D</type> <name>dstRect</name></member> <!-- Rectangle within the current display mode's visible region to display srcRectangle in. -->
- <member><type>VkBool32</type> <name>persistent</name></member> <!-- For smart displays, use buffered mode. If the display properties member "persistentMode" is VK_FALSE, this member must always be VK_FALSE. -->
- </type>
- <type category="struct" name="VkSurfaceCapabilitiesKHR" returnedonly="true">
- <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Supported minimum number of images for the surface -->
- <member><type>uint32_t</type> <name>maxImageCount</name></member> <!-- Supported maximum number of images for the surface, 0 for unlimited -->
- <member><type>VkExtent2D</type> <name>currentExtent</name></member> <!-- Current image width and height for the surface, (0, 0) if undefined -->
- <member><type>VkExtent2D</type> <name>minImageExtent</name></member> <!-- Supported minimum image width and height for the surface -->
- <member><type>VkExtent2D</type> <name>maxImageExtent</name></member> <!-- Supported maximum image width and height for the surface -->
- <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- Supported maximum number of image layers for the surface -->
- <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- 1 or more bits representing the transforms supported -->
- <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name></member> <!-- The surface's current transform relative to the device's natural orientation -->
- <member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name></member> <!-- 1 or more bits representing the alpha compositing modes supported -->
- <member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name></member> <!-- Supported image usage flags for the surface -->
- </type>
- <type category="struct" name="VkAndroidSurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkAndroidSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member noautovalidity="true"><type>ANativeWindow</type>* <name>window</name></member>
- </type>
- <type category="struct" name="VkMirSurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkMirSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member noautovalidity="true"><type>MirConnection</type>* <name>connection</name></member>
- <member noautovalidity="true"><type>MirSurface</type>* <name>mirSurface</name></member>
- </type>
- <type category="struct" name="VkViSurfaceCreateInfoNN">
- <member values="VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkViSurfaceCreateFlagsNN</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>void</type>* <name>window</name></member>
- </type>
- <type category="struct" name="VkWaylandSurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkWaylandSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member noautovalidity="true">struct <type>wl_display</type>* <name>display</name></member>
- <member noautovalidity="true">struct <type>wl_surface</type>* <name>surface</name></member>
- </type>
- <type category="struct" name="VkWin32SurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkWin32SurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>HINSTANCE</type> <name>hinstance</name></member>
- <member><type>HWND</type> <name>hwnd</name></member>
- </type>
- <type category="struct" name="VkXlibSurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkXlibSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member noautovalidity="true"><type>Display</type>* <name>dpy</name></member>
- <member><type>Window</type> <name>window</name></member>
- </type>
- <type category="struct" name="VkXcbSurfaceCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkXcbSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member noautovalidity="true"><type>xcb_connection_t</type>* <name>connection</name></member>
- <member><type>xcb_window_t</type> <name>window</name></member>
- </type>
- <type category="struct" name="VkSurfaceFormatKHR" returnedonly="true">
- <member><type>VkFormat</type> <name>format</name></member> <!-- Supported pair of rendering format -->
- <member><type>VkColorSpaceKHR</type> <name>colorSpace</name></member> <!-- and color space for the surface -->
- </type>
- <type category="struct" name="VkSwapchainCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDeviceGroupSwapchainCreateInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkSwapchainCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkSurfaceKHR</type> <name>surface</name></member> <!-- The swapchain's target surface -->
- <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Minimum number of presentation images the application needs -->
- <member><type>VkFormat</type> <name>imageFormat</name></member> <!-- Format of the presentation images -->
- <member><type>VkColorSpaceKHR</type> <name>imageColorSpace</name></member> <!-- Colorspace of the presentation images -->
- <member><type>VkExtent2D</type> <name>imageExtent</name></member> <!-- Dimensions of the presentation images -->
- <member><type>uint32_t</type> <name>imageArrayLayers</name></member> <!-- Determines the number of views for multiview/stereo presentation -->
- <member><type>VkImageUsageFlags</type> <name>imageUsage</name></member> <!-- Bits indicating how the presentation images will be used -->
- <member><type>VkSharingMode</type> <name>imageSharingMode</name></member> <!-- Sharing mode used for the presentation images -->
- <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> <!-- Number of queue families having access to the images in case of concurrent sharing mode -->
- <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> <!-- Array of queue family indices having access to the images in case of concurrent sharing mode -->
- <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>preTransform</name></member> <!-- The transform, relative to the device's natural orientation, applied to the image content prior to presentation -->
- <member><type>VkCompositeAlphaFlagBitsKHR</type> <name>compositeAlpha</name></member> <!-- The alpha blending mode used when compositing this surface with other surfaces in the window system -->
- <member><type>VkPresentModeKHR</type> <name>presentMode</name></member> <!-- Which presentation mode to use for presents on this swap chain -->
- <member><type>VkBool32</type> <name>clipped</name></member> <!-- Specifies whether presentable images may be affected by window clip regions -->
- <member optional="true"><type>VkSwapchainKHR</type> <name>oldSwapchain</name></member> <!-- Existing swap chain to replace, if any -->
- </type>
- <type category="struct" name="VkPresentInfoKHR">
- <member values="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkDisplayPresentInfoKHR,VkPresentRegionsKHR,VkDeviceGroupPresentInfoKHX,VkPresentTimesInfoGOOGLE">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member> <!-- Number of semaphores to wait for before presenting -->
- <member optional="true" len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> <!-- Semaphores to wait for before presenting -->
- <member><type>uint32_t</type> <name>swapchainCount</name></member> <!-- Number of swapchains to present in this call -->
- <member len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></member> <!-- Swapchains to present an image from -->
- <member len="swapchainCount">const <type>uint32_t</type>* <name>pImageIndices</name></member> <!-- Indices of which presentable images to present -->
- <member optional="true" len="swapchainCount"><type>VkResult</type>* <name>pResults</name></member> <!-- Optional (i.e. if non-NULL) VkResult for each swapchain -->
- </type>
- <type category="struct" name="VkDebugReportCallbackCreateInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDebugReportFlagsEXT</type> <name>flags</name></member> <!-- Indicates which events call this callback-->
- <member><type>PFN_vkDebugReportCallbackEXT</type> <name>pfnCallback</name></member> <!-- Function pointer of a callback function-->
- <member optional="true"><type>void</type>* <name>pUserData</name></member> <!-- User data provided to callback function -->
- </type>
- <type category="struct" name="VkValidationFlagsEXT">
- <member values="VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT"><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT -->
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>disabledValidationCheckCount</name></member> <!-- Number of validation checks to disable -->
- <member len="disabledValidationCheckCount"><type>VkValidationCheckEXT</type>* <name>pDisabledValidationChecks</name></member> <!-- Validation checks to disable -->
- </type>
- <type category="struct" name="VkPipelineRasterizationStateRasterizationOrderAMD">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkRasterizationOrderAMD</type> <name>rasterizationOrder</name></member> <!-- Rasterization order to use for the pipeline -->
- </type>
- <type category="struct" name="VkDebugMarkerObjectNameInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></member> <!-- The type of the object -->
- <member><type>uint64_t</type> <name>object</name></member> <!-- The handle of the object, cast to uint64_t -->
- <member len="null-terminated">const <type>char</type>* <name>pObjectName</name></member> <!-- Name to apply to the object -->
- </type>
- <type category="struct" name="VkDebugMarkerObjectTagInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></member> <!-- The type of the object -->
- <member><type>uint64_t</type> <name>object</name></member> <!-- The handle of the object, cast to uint64_t -->
- <member><type>uint64_t</type> <name>tagName</name></member> <!-- The name of the tag to set on the object -->
- <member><type>size_t</type> <name>tagSize</name></member> <!-- The length in bytes of the tag data -->
- <member len="tagSize">const <type>void</type>* <name>pTag</name></member> <!-- Tag data to attach to the object -->
- </type>
- <type category="struct" name="VkDebugMarkerMarkerInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member len="null-terminated">const <type>char</type>* <name>pMarkerName</name></member> <!-- Name of the debug marker -->
- <member optional="true"><type>float</type> <name>color</name>[4]</member> <!-- Optional color for debug marker -->
- </type>
- <type category="struct" name="VkDedicatedAllocationImageCreateInfoNV">
- <member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBool32</type> <name>dedicatedAllocation</name></member> <!-- Whether this image uses a dedicated allocation -->
- </type>
- <type category="struct" name="VkDedicatedAllocationBufferCreateInfoNV">
- <member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBool32</type> <name>dedicatedAllocation</name></member> <!-- Whether this buffer uses a dedicated allocation -->
- </type>
- <type category="struct" name="VkDedicatedAllocationMemoryAllocateInfoNV">
- <member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkImage</type> <name>image</name></member> <!-- Image that this allocation will be bound to -->
- <member optional="true"><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer that this allocation will be bound to -->
- </type>
- <type category="struct" name="VkExternalImageFormatPropertiesNV" returnedonly="true">
- <member><type>VkImageFormatProperties</type> <name>imageFormatProperties</name></member>
- <member optional="true"><type>VkExternalMemoryFeatureFlagsNV</type> <name>externalMemoryFeatures</name></member>
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>exportFromImportedHandleTypes</name></member>
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>compatibleHandleTypes</name></member>
- </type>
- <type category="struct" name="VkExternalMemoryImageCreateInfoNV">
- <member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleTypes</name></member>
- </type>
- <type category="struct" name="VkExportMemoryAllocateInfoNV">
- <member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleTypes</name></member>
- </type>
- <type category="struct" name="VkImportMemoryWin32HandleInfoNV">
- <member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleType</name></member>
- <member optional="true"><type>HANDLE</type> <name>handle</name></member>
- </type>
- <type category="struct" name="VkExportMemoryWin32HandleInfoNV">
- <member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
- <member optional="true"><type>DWORD</type> <name>dwAccess</name></member>
- </type>
- <type category="struct" name="VkWin32KeyedMutexAcquireReleaseInfoNV">
- <member values="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member>
- <member optional="true"><type>uint32_t</type> <name>acquireCount</name></member>
- <member len="acquireCount">const <type>VkDeviceMemory</type>* <name>pAcquireSyncs</name></member>
- <member len="acquireCount">const <type>uint64_t</type>* <name>pAcquireKeys</name></member>
- <member len="acquireCount">const <type>uint32_t</type>* <name>pAcquireTimeoutMilliseconds</name></member>
- <member optional="true"><type>uint32_t</type> <name>releaseCount</name></member>
- <member len="releaseCount">const <type>VkDeviceMemory</type>* <name>pReleaseSyncs</name></member>
- <member len="releaseCount">const <type>uint64_t</type>* <name>pReleaseKeys</name></member>
- </type>
- <type category="struct" name="VkDeviceGeneratedCommandsFeaturesNVX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkBool32</type> <name>computeBindingPointSupport</name></member>
- </type>
- <type category="struct" name="VkDeviceGeneratedCommandsLimitsNVX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>uint32_t</type> <name>maxIndirectCommandsLayoutTokenCount</name></member>
- <member><type>uint32_t</type> <name>maxObjectEntryCounts</name></member>
- <member><type>uint32_t</type> <name>minSequenceCountBufferOffsetAlignment</name></member>
- <member><type>uint32_t</type> <name>minSequenceIndexBufferOffsetAlignment</name></member>
- <member><type>uint32_t</type> <name>minCommandsTokenBufferOffsetAlignment</name></member>
- </type>
- <type category="struct" name="VkIndirectCommandsTokenNVX">
- <member><type>VkIndirectCommandsTokenTypeNVX</type> <name>tokenType</name></member>
- <member><type>VkBuffer</type> <name>buffer</name></member> <!-- buffer containing tableEntries and additional data for indirectCommands -->
- <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- offset from the base address of the buffer -->
- </type>
- <type category="struct" name="VkIndirectCommandsLayoutTokenNVX">
- <member><type>VkIndirectCommandsTokenTypeNVX</type> <name>tokenType</name></member>
- <member><type>uint32_t</type> <name>bindingUnit</name></member> <!-- Binding unit for vertex attribute / descriptor set, offset for pushconstants -->
- <member><type>uint32_t</type> <name>dynamicCount</name></member> <!-- Number of variable dynamic values for descriptor set / push constants -->
- <member><type>uint32_t</type> <name>divisor</name></member> <!-- Rate the which the array is advanced per element (must be power of 2, minimum 1) -->
- </type>
- <type category="struct" name="VkIndirectCommandsLayoutCreateInfoNVX">
- <member values="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
- <member><type>VkIndirectCommandsLayoutUsageFlagsNVX</type> <name>flags</name></member>
- <member><type>uint32_t</type> <name>tokenCount</name></member>
- <member len="tokenCount">const <type>VkIndirectCommandsLayoutTokenNVX</type>* <name>pTokens</name></member>
- </type>
- <type category="struct" name="VkCmdProcessCommandsInfoNVX">
- <member values="VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></member>
- <member><type>VkIndirectCommandsLayoutNVX</type> <name>indirectCommandsLayout</name></member>
- <member><type>uint32_t</type> <name>indirectCommandsTokenCount</name></member>
- <member len="indirectCommandsTokenCount">const <type>VkIndirectCommandsTokenNVX</type>* <name>pIndirectCommandsTokens</name></member>
- <member><type>uint32_t</type> <name>maxSequencesCount</name></member>
- <member optional="true" externsync="true"><type>VkCommandBuffer</type> <name>targetCommandBuffer</name></member>
- <member optional="true"><type>VkBuffer</type> <name>sequencesCountBuffer</name></member>
- <member optional="true"><type>VkDeviceSize</type> <name>sequencesCountOffset</name></member>
- <member optional="true"><type>VkBuffer</type> <name>sequencesIndexBuffer</name></member>
- <member optional="true"><type>VkDeviceSize</type> <name>sequencesIndexOffset</name></member>
- </type>
- <type category="struct" name="VkCmdReserveSpaceForCommandsInfoNVX">
- <member values="VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></member>
- <member><type>VkIndirectCommandsLayoutNVX</type> <name>indirectCommandsLayout</name></member>
- <member><type>uint32_t</type> <name>maxSequencesCount</name></member>
- </type>
- <type category="struct" name="VkObjectTableCreateInfoNVX">
- <member values="VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>uint32_t</type> <name>objectCount</name></member>
- <member len="objectCount">const <type>VkObjectEntryTypeNVX</type>* <name>pObjectEntryTypes</name></member>
- <member len="objectCount">const <type>uint32_t</type>* <name>pObjectEntryCounts</name></member>
- <member len="objectCount">const <type>VkObjectEntryUsageFlagsNVX</type>* <name>pObjectEntryUsageFlags</name></member>
-
- <member><type>uint32_t</type> <name>maxUniformBuffersPerDescriptor</name></member>
- <member><type>uint32_t</type> <name>maxStorageBuffersPerDescriptor</name></member>
- <member><type>uint32_t</type> <name>maxStorageImagesPerDescriptor</name></member>
- <member><type>uint32_t</type> <name>maxSampledImagesPerDescriptor</name></member>
- <member><type>uint32_t</type> <name>maxPipelineLayouts</name></member>
- </type>
- <type category="struct" name="VkObjectTableEntryNVX">
- <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member>
- <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member>
- </type>
- <type category="struct" name="VkObjectTablePipelineEntryNVX">
- <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member>
- <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member>
- <member><type>VkPipeline</type> <name>pipeline</name></member>
- </type>
- <type category="struct" name="VkObjectTableDescriptorSetEntryNVX">
- <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member>
- <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member>
- <member><type>VkPipelineLayout</type> <name>pipelineLayout</name></member>
- <member><type>VkDescriptorSet</type> <name>descriptorSet</name></member>
- </type>
- <type category="struct" name="VkObjectTableVertexBufferEntryNVX">
- <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member>
- <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member>
- <member><type>VkBuffer</type> <name>buffer</name></member>
- </type>
- <type category="struct" name="VkObjectTableIndexBufferEntryNVX">
- <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member>
- <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member>
- <member><type>VkBuffer</type> <name>buffer</name></member>
- <member><type>VkIndexType</type> <name>indexType</name></member>
- </type>
- <type category="struct" name="VkObjectTablePushConstantEntryNVX">
- <member><type>VkObjectEntryTypeNVX</type> <name>type</name></member>
- <member><type>VkObjectEntryUsageFlagsNVX</type> <name>flags</name></member>
- <member><type>VkPipelineLayout</type> <name>pipelineLayout</name></member>
- <member><type>VkShaderStageFlags</type> <name>stageFlags</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceFeatures2KHR">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkPhysicalDeviceMultiviewFeaturesKHX"><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkPhysicalDeviceFeatures</type> <name>features</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceProperties2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkPhysicalDevicePushDescriptorPropertiesKHR,VkPhysicalDeviceIDPropertiesKHX,VkPhysicalDeviceMultiviewPropertiesKHX,VkPhysicalDeviceDiscardRectanglePropertiesEXT,VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX"><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkPhysicalDeviceProperties</type> <name>properties</name></member>
- </type>
- <type category="struct" name="VkFormatProperties2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkFormatProperties</type> <name>formatProperties</name></member>
- </type>
- <type category="struct" name="VkImageFormatProperties2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkExternalImageFormatPropertiesKHX,VkTextureLODGatherFormatPropertiesAMD"><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkImageFormatProperties</type> <name>imageFormatProperties</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceImageFormatInfo2KHR">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkPhysicalDeviceExternalImageFormatInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkFormat</type> <name>format</name></member>
- <member><type>VkImageType</type> <name>type</name></member>
- <member><type>VkImageTiling</type> <name>tiling</name></member>
- <member><type>VkImageUsageFlags</type> <name>usage</name></member>
- <member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member>
- </type>
- <type category="struct" name="VkQueueFamilyProperties2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkQueueFamilyProperties</type> <name>queueFamilyProperties</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceMemoryProperties2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkPhysicalDeviceMemoryProperties</type> <name>memoryProperties</name></member>
- </type>
- <type category="struct" name="VkSparseImageFormatProperties2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkSparseImageFormatProperties</type> <name>properties</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceSparseImageFormatInfo2KHR">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkFormat</type> <name>format</name></member>
- <member><type>VkImageType</type> <name>type</name></member>
- <member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
- <member><type>VkImageUsageFlags</type> <name>usage</name></member>
- <member><type>VkImageTiling</type> <name>tiling</name></member>
- </type>
- <type category="struct" name="VkPhysicalDevicePushDescriptorPropertiesKHR">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>maxPushDescriptors</name></member>
- </type>
- <type category="struct" name="VkPresentRegionsKHR">
- <member values="VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>swapchainCount</name></member> <!-- Copy of VkPresentInfoKHR::swapchainCount -->
- <member len="swapchainCount" optional="true">const <type>VkPresentRegionKHR</type>* <name>pRegions</name></member> <!-- The regions that have changed -->
- </type>
- <type category="struct" name="VkPresentRegionKHR">
- <member optional="true"><type>uint32_t</type> <name>rectangleCount</name></member> <!-- Number of rectangles in pRectangles -->
- <member optional="true" len="rectangleCount">const <type>VkRectLayerKHR</type>* <name>pRectangles</name></member> <!-- Array of rectangles that have changed in a swapchain's image(s) -->
- </type>
- <type category="struct" name="VkRectLayerKHR">
- <member><type>VkOffset2D</type> <name>offset</name></member> <!-- upper-left corner of a rectangle that has not changed, in pixels of a presentation images -->
- <member><type>VkExtent2D</type> <name>extent</name></member> <!-- Dimensions of a rectangle that has not changed, in pixels of a presentation images -->
- <member><type>uint32_t</type> <name>layer</name></member> <!-- Layer of a swapchain's image(s), for stereoscopic-3D images -->
- </type>
- <type category="struct" name="VkExternalMemoryPropertiesKHX" returnedonly="true">
- <member><type>VkExternalMemoryFeatureFlagsKHX</type> <name>externalMemoryFeatures</name></member>
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsKHX</type> <name>exportFromImportedHandleTypes</name></member>
- <member><type>VkExternalMemoryHandleTypeFlagsKHX</type> <name>compatibleHandleTypes</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceExternalImageFormatInfoKHX">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></member>
- </type>
- <type category="struct" name="VkExternalImageFormatPropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkExternalMemoryPropertiesKHX</type> <name>externalMemoryProperties</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceExternalBufferInfoKHX">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name></member>
- <member><type>VkBufferUsageFlags</type> <name>usage</name></member>
- <member><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></member>
- </type>
- <type category="struct" name="VkExternalBufferPropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkExternalMemoryPropertiesKHX</type> <name>externalMemoryProperties</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceIDPropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint8_t</type> <name>deviceUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
- <member><type>uint8_t</type> <name>driverUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
- <member><type>uint8_t</type> <name>deviceLUID</name>[<enum>VK_LUID_SIZE_KHX</enum>]</member>
- <member><type>VkBool32</type> <name>deviceLUIDValid</name></member>
- </type>
- <type category="struct" name="VkExternalMemoryImageCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkExternalMemoryHandleTypeFlagsKHX</type> <name>handleTypes</name></member>
- </type>
- <type category="struct" name="VkExternalMemoryBufferCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsKHX</type> <name>handleTypes</name></member>
- </type>
- <type category="struct" name="VkExportMemoryAllocateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagsKHX</type> <name>handleTypes</name></member>
- </type>
- <type category="struct" name="VkImportMemoryWin32HandleInfoKHX">
- <member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></member>
- <member><type>HANDLE</type> <name>handle</name></member>
- </type>
- <type category="struct" name="VkExportMemoryWin32HandleInfoKHX">
- <member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
- <member><type>DWORD</type> <name>dwAccess</name></member>
- <member><type>LPCWSTR</type> <name>name</name></member>
- </type>
- <type category="struct" name="VkMemoryWin32HandlePropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>memoryTypeBits</name></member>
- </type>
- <type category="struct" name="VkImportMemoryFdInfoKHX">
- <member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></member>
- <member><type>int</type> <name>fd</name></member>
- </type>
- <type category="struct" name="VkMemoryFdPropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>memoryTypeBits</name></member>
- </type>
- <type category="struct" name="VkWin32KeyedMutexAcquireReleaseInfoKHX">
- <member values="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>acquireCount</name></member>
- <member len="acquireCount">const <type>VkDeviceMemory</type>* <name>pAcquireSyncs</name></member>
- <member len="acquireCount">const <type>uint64_t</type>* <name>pAcquireKeys</name></member>
- <member len="acquireCount">const <type>uint32_t</type>* <name>pAcquireTimeouts</name></member>
- <member optional="true"><type>uint32_t</type> <name>releaseCount</name></member>
- <member len="releaseCount">const <type>VkDeviceMemory</type>* <name>pReleaseSyncs</name></member>
- <member len="releaseCount">const <type>uint64_t</type>* <name>pReleaseKeys</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceExternalSemaphoreInfoKHX">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkExternalSemaphoreHandleTypeFlagBitsKHX</type> <name>handleType</name></member>
- </type>
- <type category="struct" name="VkExternalSemaphorePropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkExternalSemaphoreHandleTypeFlagsKHX</type> <name>exportFromImportedHandleTypes</name></member>
- <member><type>VkExternalSemaphoreHandleTypeFlagsKHX</type> <name>compatibleHandleTypes</name></member>
- <member optional="true"><type>VkExternalSemaphoreFeatureFlagsKHX</type> <name>externalSemaphoreFeatures</name></member>
- </type>
- <type category="struct" name="VkExportSemaphoreCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkExternalSemaphoreHandleTypeFlagsKHX</type> <name>handleTypes</name></member>
- </type>
- <type category="struct" name="VkImportSemaphoreWin32HandleInfoKHX">
- <member values="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkSemaphore</type> <name>semaphore</name></member>
- <member><type>VkExternalSemaphoreHandleTypeFlagsKHX</type> <name>handleType</name></member>
- <member><type>HANDLE</type> <name>handle</name></member>
- </type>
- <type category="struct" name="VkExportSemaphoreWin32HandleInfoKHX">
- <member values="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
- <member><type>DWORD</type> <name>dwAccess</name></member>
- <member><type>LPCWSTR</type> <name>name</name></member>
- </type>
- <type category="struct" name="VkD3D12FenceSubmitInfoKHX">
- <member values="VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>waitSemaphoreValuesCount</name></member>
- <member optional="true" len="waitSemaphoreValuesCount">const <type>uint64_t</type>* <name>pWaitSemaphoreValues</name></member>
- <member optional="true"><type>uint32_t</type> <name>signalSemaphoreValuesCount</name></member>
- <member optional="true" len="signalSemaphoreValuesCount">const <type>uint64_t</type>* <name>pSignalSemaphoreValues</name></member>
- </type>
- <type category="struct" name="VkImportSemaphoreFdInfoKHX">
- <member values="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkSemaphore</type> <name>semaphore</name></member>
- <member><type>VkExternalSemaphoreHandleTypeFlagBitsKHX</type> <name>handleType</name></member>
- <member><type>int</type> <name>fd</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceMultiviewFeaturesKHX">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true"><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBool32</type> <name>multiview</name></member> <!-- Multiple views in a renderpass -->
- <member><type>VkBool32</type> <name>multiviewGeometryShader</name></member> <!-- Multiple views in a renderpass w/ geometry shader -->
- <member><type>VkBool32</type> <name>multiviewTessellationShader</name></member> <!-- Multiple views in a renderpass w/ tessellation shader -->
- </type>
- <type category="struct" name="VkPhysicalDeviceMultiviewPropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>maxMultiviewViewCount</name></member> <!-- max number of views in a subpass -->
- <member><type>uint32_t</type> <name>maxMultiviewInstanceIndex</name></member> <!-- max instance index for a draw in a multiview subpass -->
- </type>
- <type category="struct" name="VkRenderPassMultiviewCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>subpassCount</name></member>
- <member len="subpassCount">const <type>uint32_t</type>* <name>pViewMasks</name></member>
- <member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member>
- <member len="dependencyCount">const <type>int32_t</type>* <name>pViewOffsets</name></member>
- <member optional="true"><type>uint32_t</type> <name>correlationMaskCount</name></member>
- <member len="correlationMaskCount">const <type>uint32_t</type>* <name>pCorrelationMasks</name></member>
- </type>
- <type category="struct" name="VkSurfaceCapabilities2EXT" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member>
- <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Supported minimum number of images for the surface -->
- <member><type>uint32_t</type> <name>maxImageCount</name></member> <!-- Supported maximum number of images for the surface, 0 for unlimited -->
- <member><type>VkExtent2D</type> <name>currentExtent</name></member> <!-- Current image width and height for the surface, (0, 0) if undefined -->
- <member><type>VkExtent2D</type> <name>minImageExtent</name></member> <!-- Supported minimum image width and height for the surface -->
- <member><type>VkExtent2D</type> <name>maxImageExtent</name></member> <!-- Supported maximum image width and height for the surface -->
- <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- Supported maximum number of image layers for the surface -->
- <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- 1 or more bits representing the transforms supported -->
- <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name></member> <!-- The surface's current transform relative to the device's natural orientation -->
- <member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name></member> <!-- 1 or more bits representing the alpha compositing modes supported -->
- <member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name></member> <!-- Supported image usage flags for the surface -->
- <member optional="true"><type>VkSurfaceCounterFlagsEXT</type> <name>supportedSurfaceCounters</name></member>
- </type>
- <type category="struct" name="VkDisplayPowerInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkDisplayPowerStateEXT</type> <name>powerState</name></member>
- </type>
- <type category="struct" name="VkDeviceEventInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkDeviceEventTypeEXT</type> <name>deviceEvent</name></member>
- </type>
- <type category="struct" name="VkDisplayEventInfoEXT">
- <member values="VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkDisplayEventTypeEXT</type> <name>displayEvent</name></member>
- </type>
- <type category="struct" name="VkSwapchainCounterCreateInfoEXT">
- <member values="VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member optional="true"><type>VkSurfaceCounterFlagsEXT</type> <name>surfaceCounters</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceGroupPropertiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>physicalDeviceCount</name></member>
- <member><type>VkPhysicalDevice</type> <name>physicalDevices</name>[<enum>VK_MAX_DEVICE_GROUP_SIZE_KHX</enum>]</member>
- <member><type>VkBool32</type> <name>subsetAllocation</name></member>
- </type>
- <type category="struct" name="VkMemoryAllocateFlagsInfoKHX">
- <member values="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkMemoryAllocateFlagsKHX</type> <name>flags</name></member>
- <member><type>uint32_t</type> <name>deviceMask</name></member>
- </type>
- <type category="struct" name="VkBindBufferMemoryInfoKHX">
- <member values="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBuffer</type> <name>buffer</name></member>
- <member><type>VkDeviceMemory</type> <name>memory</name></member>
- <member><type>VkDeviceSize</type> <name>memoryOffset</name></member>
- <member optional="true"><type>uint32_t</type> <name>deviceIndexCount</name></member>
- <member len="deviceIndexCount">const <type>uint32_t</type>* <name>pDeviceIndices</name></member>
- </type>
- <type category="struct" name="VkBindImageMemoryInfoKHX">
- <member values="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkBindImageMemorySwapchainInfoKHX">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkImage</type> <name>image</name></member>
- <member><type>VkDeviceMemory</type> <name>memory</name></member>
- <member><type>VkDeviceSize</type> <name>memoryOffset</name></member>
- <member optional="true"><type>uint32_t</type> <name>deviceIndexCount</name></member>
- <member len="deviceIndexCount">const <type>uint32_t</type>* <name>pDeviceIndices</name></member>
- <member optional="true"><type>uint32_t</type> <name>SFRRectCount</name></member>
- <member len="SFRRectCount">const <type>VkRect2D</type>* <name>pSFRRects</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupRenderPassBeginInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>deviceMask</name></member>
- <member optional="true"><type>uint32_t</type> <name>deviceRenderAreaCount</name></member>
- <member len="deviceRenderAreaCount">const <type>VkRect2D</type>* <name>pDeviceRenderAreas</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupCommandBufferBeginInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>deviceMask</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupSubmitInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member>
- <member len="waitSemaphoreCount">const <type>uint32_t</type>* <name>pWaitSemaphoreDeviceIndices</name></member>
- <member optional="true"><type>uint32_t</type> <name>commandBufferCount</name></member>
- <member len="commandBufferCount">const <type>uint32_t</type>* <name>pCommandBufferDeviceMasks</name></member>
- <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member>
- <member len="signalSemaphoreCount">const <type>uint32_t</type>* <name>pSignalSemaphoreDeviceIndices</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupBindSparseInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>resourceDeviceIndex</name></member>
- <member><type>uint32_t</type> <name>memoryDeviceIndex</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupPresentCapabilitiesKHX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>presentMask</name>[<enum>VK_MAX_DEVICE_GROUP_SIZE_KHX</enum>]</member>
- <member><type>VkDeviceGroupPresentModeFlagsKHX</type> <name>modes</name></member>
- </type>
- <type category="struct" name="VkImageSwapchainCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkSwapchainKHR</type> <name>swapchain</name></member>
- </type>
- <type category="struct" name="VkBindImageMemorySwapchainInfoKHX">
- <member values="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></member>
- <member><type>uint32_t</type> <name>imageIndex</name></member>
- </type>
- <type category="struct" name="VkAcquireNextImageInfoKHX">
- <member values="VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></member>
- <member><type>uint64_t</type> <name>timeout</name></member>
- <member optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></member>
- <member optional="true" externsync="true"><type>VkFence</type> <name>fence</name></member>
- <member><type>uint32_t</type> <name>deviceMask</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupPresentInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>swapchainCount</name></member>
- <member len="swapchainCount">const <type>uint32_t</type>* <name>pDeviceMasks</name></member>
- <member><type>VkDeviceGroupPresentModeFlagBitsKHX</type> <name>mode</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupDeviceCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>uint32_t</type> <name>physicalDeviceCount</name></member>
- <member len="physicalDeviceCount">const <type>VkPhysicalDevice</type>* <name>pPhysicalDevices</name></member>
- </type>
- <type category="struct" name="VkDeviceGroupSwapchainCreateInfoKHX">
- <member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkDeviceGroupPresentModeFlagsKHX</type> <name>modes</name></member>
- </type>
- <type category="struct" name="VkDescriptorUpdateTemplateEntryKHR">
- <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to write -->
- <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to write -->
- <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write -->
- <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Descriptor type to write -->
- <member><type>size_t</type> <name>offset</name></member> <!-- Offset into pData where the descriptors to update are stored -->
- <member><type>size_t</type> <name>stride</name></member> <!-- Stride between two descriptors in pData when writing more than one descriptor -->
- </type>
- <type category="struct" name="VkDescriptorUpdateTemplateCreateInfoKHR">
- <member values="VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkDescriptorUpdateTemplateCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>descriptorUpdateEntryCount</name></member> <!-- Number of descriptor update entries to use for the update template -->
- <member len="descriptorUpdateEntryCount">const <type>VkDescriptorUpdateTemplateEntryKHR</type>* <name>pDescriptorUpdateEntries</name></member> <!-- Descriptor update entries for the template -->
- <member><type>VkDescriptorUpdateTemplateTypeKHR</type> <name>templateType</name></member>
- <member optional="true"><type>VkDescriptorSetLayout</type> <name>descriptorSetLayout</name></member>
- <member optional="true"><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
- <member optional="true"><type>VkPipelineLayout</type><name>pipelineLayout</name></member> <!-- If used for push descriptors, this is the only allowed layout -->
- <member optional="true"><type>uint32_t</type> <name>set</name></member>
- </type>
- <type category="struct" name="VkXYColorEXT">
- <!-- chromaticity coordinate -->
- <member><type>float</type> <name>x</name></member>
- <member><type>float</type> <name>y</name></member>
- </type>
- <type category="struct" name="VkHdrMetadataEXT">
- <!-- Display primary in chromaticity coordinates -->
- <member values="VK_STRUCTURE_TYPE_HDR_METADATA_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <!-- From SMPTE 2086 -->
- <member><type>VkXYColorEXT</type> <name>displayPrimaryRed</name></member> <!-- Display primary's Red -->
- <member><type>VkXYColorEXT</type> <name>displayPrimaryGreen</name></member> <!-- Display primary's Green -->
- <member><type>VkXYColorEXT</type> <name>displayPrimaryBlue</name></member> <!-- Display primary's Blue -->
- <member><type>VkXYColorEXT</type> <name>whitePoint</name></member> <!-- Display primary's Blue -->
- <member><type>float</type> <name>maxLuminance</name></member> <!-- Display maximum luminance -->
- <member><type>float</type> <name>minLuminance</name></member> <!-- Display minimum luminance -->
- <!-- From CTA 861.3 -->
- <member><type>float</type> <name>maxContentLightLevel</name></member><!-- Content maximum luminance -->
- <member><type>float</type> <name>maxFrameAverageLightLevel</name></member>
- </type>
- <type category="struct" name="VkRefreshCycleDurationGOOGLE">
- <member><type>uint64_t</type> <name>refreshDuration</name></member> <!-- Number of nanoseconds from the start of one refresh cycle to the next -->
- </type>
- <type category="struct" name="VkPastPresentationTimingGOOGLE">
- <member><type>uint32_t</type> <name>presentID</name></member> <!-- Application-provided identifier, previously given to vkQueuePresentKHR -->
- <member><type>uint64_t</type> <name>desiredPresentTime</name></member> <!-- Earliest time an image should have been presented, previously given to vkQueuePresentKHR -->
- <member><type>uint64_t</type> <name>actualPresentTime</name></member> <!-- Time the image was actually displayed -->
- <member><type>uint64_t</type> <name>earliestPresentTime</name></member> <!-- Earliest time the image could have been displayed -->
- <member><type>uint64_t</type> <name>presentMargin</name></member> <!-- How early vkQueuePresentKHR was processed vs. how soon it needed to be and make earliestPresentTime -->
- </type>
- <type category="struct" name="VkPresentTimesInfoGOOGLE">
- <member values="VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>swapchainCount</name></member> <!-- Copy of VkPresentInfoKHR::swapchainCount -->
- <member len="swapchainCount" optional="true">const <type>VkPresentTimeGOOGLE</type>* <name>pTimes</name></member> <!-- The earliest times to present images -->
- </type>
- <type category="struct" name="VkPresentTimeGOOGLE">
- <member><type>uint32_t</type> <name>presentID</name></member> <!-- Application-provided identifier -->
- <member><type>uint64_t</type> <name>desiredPresentTime</name></member> <!-- Earliest time an image should be presented -->
- </type>
- <type category="struct" name="VkIOSSurfaceCreateInfoMVK">
- <member values="VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkIOSSurfaceCreateFlagsMVK</type> <name>flags</name></member> <!-- Reserved -->
- <member>const <type>void</type>* <name>pView</name></member>
- </type>
- <type category="struct" name="VkMacOSSurfaceCreateInfoMVK">
- <member values="VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkMacOSSurfaceCreateFlagsMVK</type> <name>flags</name></member> <!-- Reserved -->
- <member>const <type>void</type>* <name>pView</name></member>
- </type>
- <type category="struct" name="VkViewportWScalingNV">
- <member><type>float</type> <name>xcoeff</name></member>
- <member><type>float</type> <name>ycoeff</name></member>
- </type>
- <type category="struct" name="VkPipelineViewportWScalingStateCreateInfoNV">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBool32</type> <name>viewportWScalingEnable</name></member>
- <member><type>uint32_t</type> <name>viewportCount</name></member>
- <member noautovalidity="true" len="viewportCount">const <type>VkViewportWScalingNV</type>* <name>pViewportWScalings</name></member>
- </type>
- <type category="struct" name="VkViewportSwizzleNV">
- <member><type>VkViewportCoordinateSwizzleNV</type> <name>x</name></member>
- <member><type>VkViewportCoordinateSwizzleNV</type> <name>y</name></member>
- <member><type>VkViewportCoordinateSwizzleNV</type> <name>z</name></member>
- <member><type>VkViewportCoordinateSwizzleNV</type> <name>w</name></member>
- </type>
- <type category="struct" name="VkPipelineViewportSwizzleStateCreateInfoNV">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineViewportSwizzleStateCreateFlagsNV</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>uint32_t</type> <name>viewportCount</name></member>
- <member noautovalidity="true" optional="true" len="viewportCount">const <type>VkViewportSwizzleNV</type>* <name>pViewportSwizzles</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceDiscardRectanglePropertiesEXT">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>uint32_t</type> <name>maxDiscardRectangles</name></member> <!-- max number of active discard rectangles -->
- </type>
- <type category="struct" name="VkPipelineDiscardRectangleStateCreateInfoEXT">
- <member values="VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkPipelineDiscardRectangleStateCreateFlagsEXT</type> <name>flags</name></member> <!-- Reserved -->
- <member><type>VkDiscardRectangleModeEXT</type> <name>discardRectangleMode</name></member>
- <member optional="true"><type>uint32_t</type> <name>discardRectangleCount</name></member>
- <member noautovalidity="true" optional="true" len="discardRectangleCount">const <type>VkRect2D</type>* <name>pDiscardRectangles</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBool32</type> <name>perViewPositionAllComponents</name></member>
- </type>
- <type category="struct" name="VkPhysicalDeviceSurfaceInfo2KHR">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkSurfaceKHR</type> <name>surface</name></member>
- </type>
- <type category="struct" name="VkSurfaceCapabilities2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member validextensionstructs="VkSharedPresentSurfaceCapabilitiesKHR"><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkSurfaceCapabilitiesKHR</type> <name>surfaceCapabilities</name></member>
- </type>
- <type category="struct" name="VkSurfaceFormat2KHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member>
- <member><type>VkSurfaceFormatKHR</type> <name>surfaceFormat</name></member>
- </type>
- <type category="struct" name="VkSharedPresentSurfaceCapabilitiesKHR" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
- <member noautovalidity="true"><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member optional="true"><type>VkImageUsageFlags</type> <name>sharedPresentSupportedUsageFlags</name></member> <!-- Supported image usage flags if swapchain created using a shared present mode -->
- </type>
- <type category="struct" name="VkTextureLODGatherFormatPropertiesAMD" returnedonly="true">
- <member values="VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
- <member><type>VkBool32</type> <name>supportsTextureGatherLODBiasAMD</name></member>
- </type>
- </types>
-
- <!-- SECTION: Vulkan enumerant (token) definitions. -->
-
- <enums name="API Constants" comment="Misc. hardcoded constants - not an enumerated type">
- <!-- This is part of the header boilerplate -->
- <enum value="256" name="VK_MAX_PHYSICAL_DEVICE_NAME_SIZE"/>
- <enum value="16" name="VK_UUID_SIZE"/>
- <enum value="8" name="VK_LUID_SIZE_KHX"/>
- <enum value="256" name="VK_MAX_EXTENSION_NAME_SIZE"/>
- <enum value="256" name="VK_MAX_DESCRIPTION_SIZE"/>
- <enum value="32" name="VK_MAX_MEMORY_TYPES"/>
- <enum value="16" name="VK_MAX_MEMORY_HEAPS"/> <!-- The maximum number of unique memory heaps, each of which supporting 1 or more memory types. -->
- <enum value="1000.0f" name="VK_LOD_CLAMP_NONE"/>
- <enum value="(~0U)" name="VK_REMAINING_MIP_LEVELS"/>
- <enum value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/>
- <enum value="(~0ULL)" name="VK_WHOLE_SIZE"/>
- <enum value="(~0U)" name="VK_ATTACHMENT_UNUSED"/>
- <enum value="1" name="VK_TRUE"/>
- <enum value="0" name="VK_FALSE"/>
- <enum value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/>
- <enum value="(~0U-1)" name="VK_QUEUE_FAMILY_EXTERNAL_KHX"/>
- <enum value="(~0U)" name="VK_SUBPASS_EXTERNAL"/>
- <enum value="32" name="VK_MAX_DEVICE_GROUP_SIZE_KHX"/>
- </enums>
-
- <!-- Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in
- their own numeric namespaces. The "name" attribute is the C enum
- type name, and is pulled in from a <type> definition above
- (slightly clunky, but retains the type / enum distinction). "type"
- attributes of "enum" or "bitmask" indicate that these values should
- be generated inside an appropriate definition. -->
-
- <enums name="VkImageLayout" type="enum">
- <enum value="0" name="VK_IMAGE_LAYOUT_UNDEFINED" comment="Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)"/>
- <enum value="1" name="VK_IMAGE_LAYOUT_GENERAL" comment="General layout when image can be used for any kind of access"/>
- <enum value="2" name="VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for color attachment read/write"/>
- <enum value="3" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for depth/stencil attachment read/write"/>
- <enum value="4" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only depth/stencil attachment and shader access"/>
- <enum value="5" name="VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only shader access"/>
- <enum value="6" name="VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL" comment="Optimal layout when image is used only as source of transfer operations"/>
- <enum value="7" name="VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL" comment="Optimal layout when image is used only as destination of transfer operations"/>
- <enum value="8" name="VK_IMAGE_LAYOUT_PREINITIALIZED" comment="Initial layout used when the data is populated by the CPU"/>
- </enums>
- <enums name="VkAttachmentLoadOp" type="enum">
- <enum value="0" name="VK_ATTACHMENT_LOAD_OP_LOAD"/>
- <enum value="1" name="VK_ATTACHMENT_LOAD_OP_CLEAR"/>
- <enum value="2" name="VK_ATTACHMENT_LOAD_OP_DONT_CARE"/>
- </enums>
- <enums name="VkAttachmentStoreOp" type="enum">
- <enum value="0" name="VK_ATTACHMENT_STORE_OP_STORE"/>
- <enum value="1" name="VK_ATTACHMENT_STORE_OP_DONT_CARE"/>
- </enums>
- <enums name="VkImageType" type="enum">
- <enum value="0" name="VK_IMAGE_TYPE_1D"/>
- <enum value="1" name="VK_IMAGE_TYPE_2D"/>
- <enum value="2" name="VK_IMAGE_TYPE_3D"/>
- </enums>
- <enums name="VkImageTiling" type="enum">
- <enum value="0" name="VK_IMAGE_TILING_OPTIMAL"/>
- <enum value="1" name="VK_IMAGE_TILING_LINEAR"/>
- </enums>
- <enums name="VkImageViewType" type="enum">
- <enum value="0" name="VK_IMAGE_VIEW_TYPE_1D"/>
- <enum value="1" name="VK_IMAGE_VIEW_TYPE_2D"/>
- <enum value="2" name="VK_IMAGE_VIEW_TYPE_3D"/>
- <enum value="3" name="VK_IMAGE_VIEW_TYPE_CUBE"/>
- <enum value="4" name="VK_IMAGE_VIEW_TYPE_1D_ARRAY"/>
- <enum value="5" name="VK_IMAGE_VIEW_TYPE_2D_ARRAY"/>
- <enum value="6" name="VK_IMAGE_VIEW_TYPE_CUBE_ARRAY"/>
- </enums>
- <enums name="VkCommandBufferLevel" type="enum">
- <enum value="0" name="VK_COMMAND_BUFFER_LEVEL_PRIMARY"/>
- <enum value="1" name="VK_COMMAND_BUFFER_LEVEL_SECONDARY"/>
- </enums>
- <enums name="VkComponentSwizzle" type="enum">
- <enum value="0" name="VK_COMPONENT_SWIZZLE_IDENTITY"/>
- <enum value="1" name="VK_COMPONENT_SWIZZLE_ZERO"/>
- <enum value="2" name="VK_COMPONENT_SWIZZLE_ONE"/>
- <enum value="3" name="VK_COMPONENT_SWIZZLE_R"/>
- <enum value="4" name="VK_COMPONENT_SWIZZLE_G"/>
- <enum value="5" name="VK_COMPONENT_SWIZZLE_B"/>
- <enum value="6" name="VK_COMPONENT_SWIZZLE_A"/>
- </enums>
- <enums name="VkDescriptorType" type="enum">
- <enum value="0" name="VK_DESCRIPTOR_TYPE_SAMPLER"/>
- <enum value="1" name="VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER"/>
- <enum value="2" name="VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE"/>
- <enum value="3" name="VK_DESCRIPTOR_TYPE_STORAGE_IMAGE"/>
- <enum value="4" name="VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER"/>
- <enum value="5" name="VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER"/>
- <enum value="6" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER"/>
- <enum value="7" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER"/>
- <enum value="8" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC"/>
- <enum value="9" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC"/>
- <enum value="10" name="VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT"/>
- </enums>
- <enums name="VkQueryType" type="enum">
- <enum value="0" name="VK_QUERY_TYPE_OCCLUSION"/>
- <enum value="1" name="VK_QUERY_TYPE_PIPELINE_STATISTICS" comment="Optional"/>
- <enum value="2" name="VK_QUERY_TYPE_TIMESTAMP"/>
- </enums>
- <enums name="VkBorderColor" type="enum">
- <enum value="0" name="VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"/>
- <enum value="1" name="VK_BORDER_COLOR_INT_TRANSPARENT_BLACK"/>
- <enum value="2" name="VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK"/>
- <enum value="3" name="VK_BORDER_COLOR_INT_OPAQUE_BLACK"/>
- <enum value="4" name="VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE"/>
- <enum value="5" name="VK_BORDER_COLOR_INT_OPAQUE_WHITE"/>
- </enums>
- <enums name="VkPipelineBindPoint" type="enum">
- <enum value="0" name="VK_PIPELINE_BIND_POINT_GRAPHICS"/>
- <enum value="1" name="VK_PIPELINE_BIND_POINT_COMPUTE"/>
- </enums>
- <enums name="VkPipelineCacheHeaderVersion" type="enum">
- <enum value="1" name="VK_PIPELINE_CACHE_HEADER_VERSION_ONE"/>
- </enums>
- <enums name="VkPrimitiveTopology" type="enum">
- <enum value="0" name="VK_PRIMITIVE_TOPOLOGY_POINT_LIST"/>
- <enum value="1" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST"/>
- <enum value="2" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP"/>
- <enum value="3" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST"/>
- <enum value="4" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP"/>
- <enum value="5" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN"/>
- <enum value="6" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY"/>
- <enum value="7" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY"/>
- <enum value="8" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY"/>
- <enum value="9" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY"/>
- <enum value="10" name="VK_PRIMITIVE_TOPOLOGY_PATCH_LIST"/>
- </enums>
- <enums name="VkSharingMode" type="enum">
- <enum value="0" name="VK_SHARING_MODE_EXCLUSIVE"/>
- <enum value="1" name="VK_SHARING_MODE_CONCURRENT"/>
- </enums>
- <enums name="VkIndexType" type="enum">
- <enum value="0" name="VK_INDEX_TYPE_UINT16"/>
- <enum value="1" name="VK_INDEX_TYPE_UINT32"/>
- </enums>
- <enums name="VkFilter" type="enum">
- <enum value="0" name="VK_FILTER_NEAREST"/>
- <enum value="1" name="VK_FILTER_LINEAR"/>
- </enums>
- <enums name="VkSamplerMipmapMode" type="enum">
- <enum value="0" name="VK_SAMPLER_MIPMAP_MODE_NEAREST" comment="Choose nearest mip level"/>
- <enum value="1" name="VK_SAMPLER_MIPMAP_MODE_LINEAR" comment="Linear filter between mip levels"/>
- </enums>
- <enums name="VkSamplerAddressMode" type="enum">
- <enum value="0" name="VK_SAMPLER_ADDRESS_MODE_REPEAT"/>
- <enum value="1" name="VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT"/>
- <enum value="2" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE"/>
- <enum value="3" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER"/>
- <!-- <enum value="4" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="Reserved for VK_KHR_sampler_mirror_clamp_to_edge, do not alias!"/> -->
- </enums>
- <enums name="VkCompareOp" type="enum">
- <enum value="0" name="VK_COMPARE_OP_NEVER"/>
- <enum value="1" name="VK_COMPARE_OP_LESS"/>
- <enum value="2" name="VK_COMPARE_OP_EQUAL"/>
- <enum value="3" name="VK_COMPARE_OP_LESS_OR_EQUAL"/>
- <enum value="4" name="VK_COMPARE_OP_GREATER"/>
- <enum value="5" name="VK_COMPARE_OP_NOT_EQUAL"/>
- <enum value="6" name="VK_COMPARE_OP_GREATER_OR_EQUAL"/>
- <enum value="7" name="VK_COMPARE_OP_ALWAYS"/>
- </enums>
- <enums name="VkPolygonMode" type="enum">
- <enum value="0" name="VK_POLYGON_MODE_FILL"/>
- <enum value="1" name="VK_POLYGON_MODE_LINE"/>
- <enum value="2" name="VK_POLYGON_MODE_POINT"/>
- </enums>
- <enums name="VkCullModeFlagBits" type="bitmask">
- <enum value="0" name="VK_CULL_MODE_NONE"/>
- <enum bitpos="0" name="VK_CULL_MODE_FRONT_BIT"/>
- <enum bitpos="1" name="VK_CULL_MODE_BACK_BIT"/>
- <enum value="0x00000003" name="VK_CULL_MODE_FRONT_AND_BACK"/>
- </enums>
- <enums name="VkFrontFace" type="enum">
- <enum value="0" name="VK_FRONT_FACE_COUNTER_CLOCKWISE"/>
- <enum value="1" name="VK_FRONT_FACE_CLOCKWISE"/>
- </enums>
- <enums name="VkBlendFactor" type="enum">
- <enum value="0" name="VK_BLEND_FACTOR_ZERO"/>
- <enum value="1" name="VK_BLEND_FACTOR_ONE"/>
- <enum value="2" name="VK_BLEND_FACTOR_SRC_COLOR"/>
- <enum value="3" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR"/>
- <enum value="4" name="VK_BLEND_FACTOR_DST_COLOR"/>
- <enum value="5" name="VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR"/>
- <enum value="6" name="VK_BLEND_FACTOR_SRC_ALPHA"/>
- <enum value="7" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA"/>
- <enum value="8" name="VK_BLEND_FACTOR_DST_ALPHA"/>
- <enum value="9" name="VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA"/>
- <enum value="10" name="VK_BLEND_FACTOR_CONSTANT_COLOR"/>
- <enum value="11" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR"/>
- <enum value="12" name="VK_BLEND_FACTOR_CONSTANT_ALPHA"/>
- <enum value="13" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA"/>
- <enum value="14" name="VK_BLEND_FACTOR_SRC_ALPHA_SATURATE"/>
- <enum value="15" name="VK_BLEND_FACTOR_SRC1_COLOR"/>
- <enum value="16" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR"/>
- <enum value="17" name="VK_BLEND_FACTOR_SRC1_ALPHA"/>
- <enum value="18" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA"/>
- </enums>
- <enums name="VkBlendOp" type="enum">
- <enum value="0" name="VK_BLEND_OP_ADD"/>
- <enum value="1" name="VK_BLEND_OP_SUBTRACT"/>
- <enum value="2" name="VK_BLEND_OP_REVERSE_SUBTRACT"/>
- <enum value="3" name="VK_BLEND_OP_MIN"/>
- <enum value="4" name="VK_BLEND_OP_MAX"/>
- </enums>
- <enums name="VkStencilOp" type="enum">
- <enum value="0" name="VK_STENCIL_OP_KEEP"/>
- <enum value="1" name="VK_STENCIL_OP_ZERO"/>
- <enum value="2" name="VK_STENCIL_OP_REPLACE"/>
- <enum value="3" name="VK_STENCIL_OP_INCREMENT_AND_CLAMP"/>
- <enum value="4" name="VK_STENCIL_OP_DECREMENT_AND_CLAMP"/>
- <enum value="5" name="VK_STENCIL_OP_INVERT"/>
- <enum value="6" name="VK_STENCIL_OP_INCREMENT_AND_WRAP"/>
- <enum value="7" name="VK_STENCIL_OP_DECREMENT_AND_WRAP"/>
- </enums>
- <enums name="VkLogicOp" type="enum">
- <enum value="0" name="VK_LOGIC_OP_CLEAR"/>
- <enum value="1" name="VK_LOGIC_OP_AND"/>
- <enum value="2" name="VK_LOGIC_OP_AND_REVERSE"/>
- <enum value="3" name="VK_LOGIC_OP_COPY"/>
- <enum value="4" name="VK_LOGIC_OP_AND_INVERTED"/>
- <enum value="5" name="VK_LOGIC_OP_NO_OP"/>
- <enum value="6" name="VK_LOGIC_OP_XOR"/>
- <enum value="7" name="VK_LOGIC_OP_OR"/>
- <enum value="8" name="VK_LOGIC_OP_NOR"/>
- <enum value="9" name="VK_LOGIC_OP_EQUIVALENT"/>
- <enum value="10" name="VK_LOGIC_OP_INVERT"/>
- <enum value="11" name="VK_LOGIC_OP_OR_REVERSE"/>
- <enum value="12" name="VK_LOGIC_OP_COPY_INVERTED"/>
- <enum value="13" name="VK_LOGIC_OP_OR_INVERTED"/>
- <enum value="14" name="VK_LOGIC_OP_NAND"/>
- <enum value="15" name="VK_LOGIC_OP_SET"/>
- </enums>
- <enums name="VkInternalAllocationType" type="enum">
- <enum value="0" name="VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE"/>
- </enums>
- <enums name="VkSystemAllocationScope" type="enum">
- <enum value="0" name="VK_SYSTEM_ALLOCATION_SCOPE_COMMAND"/>
- <enum value="1" name="VK_SYSTEM_ALLOCATION_SCOPE_OBJECT"/>
- <enum value="2" name="VK_SYSTEM_ALLOCATION_SCOPE_CACHE"/>
- <enum value="3" name="VK_SYSTEM_ALLOCATION_SCOPE_DEVICE"/>
- <enum value="4" name="VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE"/>
- </enums>
- <enums name="VkPhysicalDeviceType" type="enum">
- <enum value="0" name="VK_PHYSICAL_DEVICE_TYPE_OTHER"/>
- <enum value="1" name="VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU"/>
- <enum value="2" name="VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"/>
- <enum value="3" name="VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU"/>
- <enum value="4" name="VK_PHYSICAL_DEVICE_TYPE_CPU"/>
- </enums>
- <enums name="VkVertexInputRate" type="enum">
- <enum value="0" name="VK_VERTEX_INPUT_RATE_VERTEX"/>
- <enum value="1" name="VK_VERTEX_INPUT_RATE_INSTANCE"/>
- </enums>
- <enums name="VkFormat" type="enum" comment="Vulkan format definitions">
- <enum value="0" name="VK_FORMAT_UNDEFINED"/>
- <enum value="1" name="VK_FORMAT_R4G4_UNORM_PACK8"/>
- <enum value="2" name="VK_FORMAT_R4G4B4A4_UNORM_PACK16"/>
- <enum value="3" name="VK_FORMAT_B4G4R4A4_UNORM_PACK16"/>
- <enum value="4" name="VK_FORMAT_R5G6B5_UNORM_PACK16"/>
- <enum value="5" name="VK_FORMAT_B5G6R5_UNORM_PACK16"/>
- <enum value="6" name="VK_FORMAT_R5G5B5A1_UNORM_PACK16"/>
- <enum value="7" name="VK_FORMAT_B5G5R5A1_UNORM_PACK16"/>
- <enum value="8" name="VK_FORMAT_A1R5G5B5_UNORM_PACK16"/>
- <enum value="9" name="VK_FORMAT_R8_UNORM"/>
- <enum value="10" name="VK_FORMAT_R8_SNORM"/>
- <enum value="11" name="VK_FORMAT_R8_USCALED"/>
- <enum value="12" name="VK_FORMAT_R8_SSCALED"/>
- <enum value="13" name="VK_FORMAT_R8_UINT"/>
- <enum value="14" name="VK_FORMAT_R8_SINT"/>
- <enum value="15" name="VK_FORMAT_R8_SRGB"/>
- <enum value="16" name="VK_FORMAT_R8G8_UNORM"/>
- <enum value="17" name="VK_FORMAT_R8G8_SNORM"/>
- <enum value="18" name="VK_FORMAT_R8G8_USCALED"/>
- <enum value="19" name="VK_FORMAT_R8G8_SSCALED"/>
- <enum value="20" name="VK_FORMAT_R8G8_UINT"/>
- <enum value="21" name="VK_FORMAT_R8G8_SINT"/>
- <enum value="22" name="VK_FORMAT_R8G8_SRGB"/>
- <enum value="23" name="VK_FORMAT_R8G8B8_UNORM"/>
- <enum value="24" name="VK_FORMAT_R8G8B8_SNORM"/>
- <enum value="25" name="VK_FORMAT_R8G8B8_USCALED"/>
- <enum value="26" name="VK_FORMAT_R8G8B8_SSCALED"/>
- <enum value="27" name="VK_FORMAT_R8G8B8_UINT"/>
- <enum value="28" name="VK_FORMAT_R8G8B8_SINT"/>
- <enum value="29" name="VK_FORMAT_R8G8B8_SRGB"/>
- <enum value="30" name="VK_FORMAT_B8G8R8_UNORM"/>
- <enum value="31" name="VK_FORMAT_B8G8R8_SNORM"/>
- <enum value="32" name="VK_FORMAT_B8G8R8_USCALED"/>
- <enum value="33" name="VK_FORMAT_B8G8R8_SSCALED"/>
- <enum value="34" name="VK_FORMAT_B8G8R8_UINT"/>
- <enum value="35" name="VK_FORMAT_B8G8R8_SINT"/>
- <enum value="36" name="VK_FORMAT_B8G8R8_SRGB"/>
- <enum value="37" name="VK_FORMAT_R8G8B8A8_UNORM"/>
- <enum value="38" name="VK_FORMAT_R8G8B8A8_SNORM"/>
- <enum value="39" name="VK_FORMAT_R8G8B8A8_USCALED"/>
- <enum value="40" name="VK_FORMAT_R8G8B8A8_SSCALED"/>
- <enum value="41" name="VK_FORMAT_R8G8B8A8_UINT"/>
- <enum value="42" name="VK_FORMAT_R8G8B8A8_SINT"/>
- <enum value="43" name="VK_FORMAT_R8G8B8A8_SRGB"/>
- <enum value="44" name="VK_FORMAT_B8G8R8A8_UNORM"/>
- <enum value="45" name="VK_FORMAT_B8G8R8A8_SNORM"/>
- <enum value="46" name="VK_FORMAT_B8G8R8A8_USCALED"/>
- <enum value="47" name="VK_FORMAT_B8G8R8A8_SSCALED"/>
- <enum value="48" name="VK_FORMAT_B8G8R8A8_UINT"/>
- <enum value="49" name="VK_FORMAT_B8G8R8A8_SINT"/>
- <enum value="50" name="VK_FORMAT_B8G8R8A8_SRGB"/>
- <enum value="51" name="VK_FORMAT_A8B8G8R8_UNORM_PACK32"/>
- <enum value="52" name="VK_FORMAT_A8B8G8R8_SNORM_PACK32"/>
- <enum value="53" name="VK_FORMAT_A8B8G8R8_USCALED_PACK32"/>
- <enum value="54" name="VK_FORMAT_A8B8G8R8_SSCALED_PACK32"/>
- <enum value="55" name="VK_FORMAT_A8B8G8R8_UINT_PACK32"/>
- <enum value="56" name="VK_FORMAT_A8B8G8R8_SINT_PACK32"/>
- <enum value="57" name="VK_FORMAT_A8B8G8R8_SRGB_PACK32"/>
- <enum value="58" name="VK_FORMAT_A2R10G10B10_UNORM_PACK32"/>
- <enum value="59" name="VK_FORMAT_A2R10G10B10_SNORM_PACK32"/>
- <enum value="60" name="VK_FORMAT_A2R10G10B10_USCALED_PACK32"/>
- <enum value="61" name="VK_FORMAT_A2R10G10B10_SSCALED_PACK32"/>
- <enum value="62" name="VK_FORMAT_A2R10G10B10_UINT_PACK32"/>
- <enum value="63" name="VK_FORMAT_A2R10G10B10_SINT_PACK32"/>
- <enum value="64" name="VK_FORMAT_A2B10G10R10_UNORM_PACK32"/>
- <enum value="65" name="VK_FORMAT_A2B10G10R10_SNORM_PACK32"/>
- <enum value="66" name="VK_FORMAT_A2B10G10R10_USCALED_PACK32"/>
- <enum value="67" name="VK_FORMAT_A2B10G10R10_SSCALED_PACK32"/>
- <enum value="68" name="VK_FORMAT_A2B10G10R10_UINT_PACK32"/>
- <enum value="69" name="VK_FORMAT_A2B10G10R10_SINT_PACK32"/>
- <enum value="70" name="VK_FORMAT_R16_UNORM"/>
- <enum value="71" name="VK_FORMAT_R16_SNORM"/>
- <enum value="72" name="VK_FORMAT_R16_USCALED"/>
- <enum value="73" name="VK_FORMAT_R16_SSCALED"/>
- <enum value="74" name="VK_FORMAT_R16_UINT"/>
- <enum value="75" name="VK_FORMAT_R16_SINT"/>
- <enum value="76" name="VK_FORMAT_R16_SFLOAT"/>
- <enum value="77" name="VK_FORMAT_R16G16_UNORM"/>
- <enum value="78" name="VK_FORMAT_R16G16_SNORM"/>
- <enum value="79" name="VK_FORMAT_R16G16_USCALED"/>
- <enum value="80" name="VK_FORMAT_R16G16_SSCALED"/>
- <enum value="81" name="VK_FORMAT_R16G16_UINT"/>
- <enum value="82" name="VK_FORMAT_R16G16_SINT"/>
- <enum value="83" name="VK_FORMAT_R16G16_SFLOAT"/>
- <enum value="84" name="VK_FORMAT_R16G16B16_UNORM"/>
- <enum value="85" name="VK_FORMAT_R16G16B16_SNORM"/>
- <enum value="86" name="VK_FORMAT_R16G16B16_USCALED"/>
- <enum value="87" name="VK_FORMAT_R16G16B16_SSCALED"/>
- <enum value="88" name="VK_FORMAT_R16G16B16_UINT"/>
- <enum value="89" name="VK_FORMAT_R16G16B16_SINT"/>
- <enum value="90" name="VK_FORMAT_R16G16B16_SFLOAT"/>
- <enum value="91" name="VK_FORMAT_R16G16B16A16_UNORM"/>
- <enum value="92" name="VK_FORMAT_R16G16B16A16_SNORM"/>
- <enum value="93" name="VK_FORMAT_R16G16B16A16_USCALED"/>
- <enum value="94" name="VK_FORMAT_R16G16B16A16_SSCALED"/>
- <enum value="95" name="VK_FORMAT_R16G16B16A16_UINT"/>
- <enum value="96" name="VK_FORMAT_R16G16B16A16_SINT"/>
- <enum value="97" name="VK_FORMAT_R16G16B16A16_SFLOAT"/>
- <enum value="98" name="VK_FORMAT_R32_UINT"/>
- <enum value="99" name="VK_FORMAT_R32_SINT"/>
- <enum value="100" name="VK_FORMAT_R32_SFLOAT"/>
- <enum value="101" name="VK_FORMAT_R32G32_UINT"/>
- <enum value="102" name="VK_FORMAT_R32G32_SINT"/>
- <enum value="103" name="VK_FORMAT_R32G32_SFLOAT"/>
- <enum value="104" name="VK_FORMAT_R32G32B32_UINT"/>
- <enum value="105" name="VK_FORMAT_R32G32B32_SINT"/>
- <enum value="106" name="VK_FORMAT_R32G32B32_SFLOAT"/>
- <enum value="107" name="VK_FORMAT_R32G32B32A32_UINT"/>
- <enum value="108" name="VK_FORMAT_R32G32B32A32_SINT"/>
- <enum value="109" name="VK_FORMAT_R32G32B32A32_SFLOAT"/>
- <enum value="110" name="VK_FORMAT_R64_UINT"/>
- <enum value="111" name="VK_FORMAT_R64_SINT"/>
- <enum value="112" name="VK_FORMAT_R64_SFLOAT"/>
- <enum value="113" name="VK_FORMAT_R64G64_UINT"/>
- <enum value="114" name="VK_FORMAT_R64G64_SINT"/>
- <enum value="115" name="VK_FORMAT_R64G64_SFLOAT"/>
- <enum value="116" name="VK_FORMAT_R64G64B64_UINT"/>
- <enum value="117" name="VK_FORMAT_R64G64B64_SINT"/>
- <enum value="118" name="VK_FORMAT_R64G64B64_SFLOAT"/>
- <enum value="119" name="VK_FORMAT_R64G64B64A64_UINT"/>
- <enum value="120" name="VK_FORMAT_R64G64B64A64_SINT"/>
- <enum value="121" name="VK_FORMAT_R64G64B64A64_SFLOAT"/>
- <enum value="122" name="VK_FORMAT_B10G11R11_UFLOAT_PACK32"/>
- <enum value="123" name="VK_FORMAT_E5B9G9R9_UFLOAT_PACK32"/>
- <enum value="124" name="VK_FORMAT_D16_UNORM"/>
- <enum value="125" name="VK_FORMAT_X8_D24_UNORM_PACK32"/>
- <enum value="126" name="VK_FORMAT_D32_SFLOAT"/>
- <enum value="127" name="VK_FORMAT_S8_UINT"/>
- <enum value="128" name="VK_FORMAT_D16_UNORM_S8_UINT"/>
- <enum value="129" name="VK_FORMAT_D24_UNORM_S8_UINT"/>
- <enum value="130" name="VK_FORMAT_D32_SFLOAT_S8_UINT"/>
- <enum value="131" name="VK_FORMAT_BC1_RGB_UNORM_BLOCK"/>
- <enum value="132" name="VK_FORMAT_BC1_RGB_SRGB_BLOCK"/>
- <enum value="133" name="VK_FORMAT_BC1_RGBA_UNORM_BLOCK"/>
- <enum value="134" name="VK_FORMAT_BC1_RGBA_SRGB_BLOCK"/>
- <enum value="135" name="VK_FORMAT_BC2_UNORM_BLOCK"/>
- <enum value="136" name="VK_FORMAT_BC2_SRGB_BLOCK"/>
- <enum value="137" name="VK_FORMAT_BC3_UNORM_BLOCK"/>
- <enum value="138" name="VK_FORMAT_BC3_SRGB_BLOCK"/>
- <enum value="139" name="VK_FORMAT_BC4_UNORM_BLOCK"/>
- <enum value="140" name="VK_FORMAT_BC4_SNORM_BLOCK"/>
- <enum value="141" name="VK_FORMAT_BC5_UNORM_BLOCK"/>
- <enum value="142" name="VK_FORMAT_BC5_SNORM_BLOCK"/>
- <enum value="143" name="VK_FORMAT_BC6H_UFLOAT_BLOCK"/>
- <enum value="144" name="VK_FORMAT_BC6H_SFLOAT_BLOCK"/>
- <enum value="145" name="VK_FORMAT_BC7_UNORM_BLOCK"/>
- <enum value="146" name="VK_FORMAT_BC7_SRGB_BLOCK"/>
- <enum value="147" name="VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK"/>
- <enum value="148" name="VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK"/>
- <enum value="149" name="VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK"/>
- <enum value="150" name="VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK"/>
- <enum value="151" name="VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK"/>
- <enum value="152" name="VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK"/>
- <enum value="153" name="VK_FORMAT_EAC_R11_UNORM_BLOCK"/>
- <enum value="154" name="VK_FORMAT_EAC_R11_SNORM_BLOCK"/>
- <enum value="155" name="VK_FORMAT_EAC_R11G11_UNORM_BLOCK"/>
- <enum value="156" name="VK_FORMAT_EAC_R11G11_SNORM_BLOCK"/>
- <enum value="157" name="VK_FORMAT_ASTC_4x4_UNORM_BLOCK"/>
- <enum value="158" name="VK_FORMAT_ASTC_4x4_SRGB_BLOCK"/>
- <enum value="159" name="VK_FORMAT_ASTC_5x4_UNORM_BLOCK"/>
- <enum value="160" name="VK_FORMAT_ASTC_5x4_SRGB_BLOCK"/>
- <enum value="161" name="VK_FORMAT_ASTC_5x5_UNORM_BLOCK"/>
- <enum value="162" name="VK_FORMAT_ASTC_5x5_SRGB_BLOCK"/>
- <enum value="163" name="VK_FORMAT_ASTC_6x5_UNORM_BLOCK"/>
- <enum value="164" name="VK_FORMAT_ASTC_6x5_SRGB_BLOCK"/>
- <enum value="165" name="VK_FORMAT_ASTC_6x6_UNORM_BLOCK"/>
- <enum value="166" name="VK_FORMAT_ASTC_6x6_SRGB_BLOCK"/>
- <enum value="167" name="VK_FORMAT_ASTC_8x5_UNORM_BLOCK"/>
- <enum value="168" name="VK_FORMAT_ASTC_8x5_SRGB_BLOCK"/>
- <enum value="169" name="VK_FORMAT_ASTC_8x6_UNORM_BLOCK"/>
- <enum value="170" name="VK_FORMAT_ASTC_8x6_SRGB_BLOCK"/>
- <enum value="171" name="VK_FORMAT_ASTC_8x8_UNORM_BLOCK"/>
- <enum value="172" name="VK_FORMAT_ASTC_8x8_SRGB_BLOCK"/>
- <enum value="173" name="VK_FORMAT_ASTC_10x5_UNORM_BLOCK"/>
- <enum value="174" name="VK_FORMAT_ASTC_10x5_SRGB_BLOCK"/>
- <enum value="175" name="VK_FORMAT_ASTC_10x6_UNORM_BLOCK"/>
- <enum value="176" name="VK_FORMAT_ASTC_10x6_SRGB_BLOCK"/>
- <enum value="177" name="VK_FORMAT_ASTC_10x8_UNORM_BLOCK"/>
- <enum value="178" name="VK_FORMAT_ASTC_10x8_SRGB_BLOCK"/>
- <enum value="179" name="VK_FORMAT_ASTC_10x10_UNORM_BLOCK"/>
- <enum value="180" name="VK_FORMAT_ASTC_10x10_SRGB_BLOCK"/>
- <enum value="181" name="VK_FORMAT_ASTC_12x10_UNORM_BLOCK"/>
- <enum value="182" name="VK_FORMAT_ASTC_12x10_SRGB_BLOCK"/>
- <enum value="183" name="VK_FORMAT_ASTC_12x12_UNORM_BLOCK"/>
- <enum value="184" name="VK_FORMAT_ASTC_12x12_SRGB_BLOCK"/>
- </enums>
- <enums name="VkStructureType" type="enum" comment="Structure type enumerant">
- <enum value="0" name="VK_STRUCTURE_TYPE_APPLICATION_INFO"/>
- <enum value="1" name="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"/>
- <enum value="2" name="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"/>
- <enum value="3" name="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"/>
- <enum value="4" name="VK_STRUCTURE_TYPE_SUBMIT_INFO"/>
- <enum value="5" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"/>
- <enum value="6" name="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"/>
- <enum value="7" name="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"/>
- <enum value="8" name="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"/>
- <enum value="9" name="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"/>
- <enum value="10" name="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"/>
- <enum value="11" name="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"/>
- <enum value="12" name="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"/>
- <enum value="13" name="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"/>
- <enum value="14" name="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"/>
- <enum value="15" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"/>
- <enum value="16" name="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"/>
- <enum value="17" name="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"/>
- <enum value="18" name="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"/>
- <enum value="19" name="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"/>
- <enum value="20" name="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"/>
- <enum value="21" name="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"/>
- <enum value="22" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"/>
- <enum value="23" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"/>
- <enum value="24" name="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"/>
- <enum value="25" name="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"/>
- <enum value="26" name="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"/>
- <enum value="27" name="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"/>
- <enum value="28" name="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"/>
- <enum value="29" name="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"/>
- <enum value="30" name="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"/>
- <enum value="31" name="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"/>
- <enum value="32" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"/>
- <enum value="33" name="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"/>
- <enum value="34" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"/>
- <enum value="35" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"/>
- <enum value="36" name="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"/>
- <enum value="37" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"/>
- <enum value="38" name="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"/>
- <enum value="39" name="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"/>
- <enum value="40" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"/>
- <enum value="41" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"/>
- <enum value="42" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"/>
- <enum value="43" name="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"/>
- <enum value="44" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"/>
- <enum value="45" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"/>
- <enum value="46" name="VK_STRUCTURE_TYPE_MEMORY_BARRIER"/>
- <enum value="47" name="VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO"/> <!-- Reserved for internal use by the loader, layers, and ICDs -->
- <enum value="48" name="VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO"/> <!-- Reserved for internal use by the loader, layers, and ICDs -->
- </enums>
- <enums name="VkSubpassContents" type="enum">
- <enum value="0" name="VK_SUBPASS_CONTENTS_INLINE"/>
- <enum value="1" name="VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS"/>
- </enums>
- <enums name="VkResult" type="enum" comment="Error and return codes">
- <!-- Return codes for successful operation execution (positive values) -->
- <enum value="0" name="VK_SUCCESS" comment="Command completed successfully"/>
- <enum value="1" name="VK_NOT_READY" comment="A fence or query has not yet completed"/>
- <enum value="2" name="VK_TIMEOUT" comment="A wait operation has not completed in the specified time"/>
- <enum value="3" name="VK_EVENT_SET" comment="An event is signaled"/>
- <enum value="4" name="VK_EVENT_RESET" comment="An event is unsignaled"/>
- <enum value="5" name="VK_INCOMPLETE" comment="A return array was too small for the result"/>
- <!-- Error codes (negative values) -->
- <enum value="-1" name="VK_ERROR_OUT_OF_HOST_MEMORY" comment="A host memory allocation has failed"/>
- <enum value="-2" name="VK_ERROR_OUT_OF_DEVICE_MEMORY" comment="A device memory allocation has failed"/>
- <enum value="-3" name="VK_ERROR_INITIALIZATION_FAILED" comment="Initialization of a object has failed"/>
- <enum value="-4" name="VK_ERROR_DEVICE_LOST" comment="The logical device has been lost. See <<devsandqueues-lost-device>>"/>
- <enum value="-5" name="VK_ERROR_MEMORY_MAP_FAILED" comment="Mapping of a memory object has failed"/>
- <enum value="-6" name="VK_ERROR_LAYER_NOT_PRESENT" comment="Layer specified does not exist"/>
- <enum value="-7" name="VK_ERROR_EXTENSION_NOT_PRESENT" comment="Extension specified does not exist"/>
- <enum value="-8" name="VK_ERROR_FEATURE_NOT_PRESENT" comment="Requested feature is not available on this device"/>
- <enum value="-9" name="VK_ERROR_INCOMPATIBLE_DRIVER" comment="Unable to find a Vulkan driver"/>
- <enum value="-10" name="VK_ERROR_TOO_MANY_OBJECTS" comment="Too many objects of the type have already been created"/>
- <enum value="-11" name="VK_ERROR_FORMAT_NOT_SUPPORTED" comment="Requested format is not supported on this device"/>
- <enum value="-12" name="VK_ERROR_FRAGMENTED_POOL" comment="A requested pool allocation has failed due to fragmentation of the pool's memory"/>
- <unused start="-12"/>
- </enums>
- <enums name="VkDynamicState" type="enum">
- <enum value="0" name="VK_DYNAMIC_STATE_VIEWPORT"/>
- <enum value="1" name="VK_DYNAMIC_STATE_SCISSOR"/>
- <enum value="2" name="VK_DYNAMIC_STATE_LINE_WIDTH"/>
- <enum value="3" name="VK_DYNAMIC_STATE_DEPTH_BIAS"/>
- <enum value="4" name="VK_DYNAMIC_STATE_BLEND_CONSTANTS"/>
- <enum value="5" name="VK_DYNAMIC_STATE_DEPTH_BOUNDS"/>
- <enum value="6" name="VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK"/>
- <enum value="7" name="VK_DYNAMIC_STATE_STENCIL_WRITE_MASK"/>
- <enum value="8" name="VK_DYNAMIC_STATE_STENCIL_REFERENCE"/>
- </enums>
- <enums name="VkDescriptorUpdateTemplateTypeKHR" type="enum">
- <enum value="0" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR" comment="Create descriptor update template for descriptor set updates"/>
- <enum value="1" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR" comment="Create descriptor update template for pushed descriptor updates"/>
- </enums>
- <enums name="VkObjectType" type="enum" comment="Enums to track objects of various types">
- <enum value="0" name="VK_OBJECT_TYPE_UNKNOWN"/>
- <enum value="1" name="VK_OBJECT_TYPE_INSTANCE" comment="VkInstance"/>
- <enum value="2" name="VK_OBJECT_TYPE_PHYSICAL_DEVICE" comment="VkPhysicalDevice"/>
- <enum value="3" name="VK_OBJECT_TYPE_DEVICE" comment="VkDevice"/>
- <enum value="4" name="VK_OBJECT_TYPE_QUEUE" comment="VkQueue"/>
- <enum value="5" name="VK_OBJECT_TYPE_SEMAPHORE" comment="VkSemaphore"/>
- <enum value="6" name="VK_OBJECT_TYPE_COMMAND_BUFFER" comment="VkCommandBuffer"/>
- <enum value="7" name="VK_OBJECT_TYPE_FENCE" comment="VkFence"/>
- <enum value="8" name="VK_OBJECT_TYPE_DEVICE_MEMORY" comment="VkDeviceMemory"/>
- <enum value="9" name="VK_OBJECT_TYPE_BUFFER" comment="VkBuffer"/>
- <enum value="10" name="VK_OBJECT_TYPE_IMAGE" comment="VkImage"/>
- <enum value="11" name="VK_OBJECT_TYPE_EVENT" comment="VkEvent"/>
- <enum value="12" name="VK_OBJECT_TYPE_QUERY_POOL" comment="VkQueryPool"/>
- <enum value="13" name="VK_OBJECT_TYPE_BUFFER_VIEW" comment="VkBufferView"/>
- <enum value="14" name="VK_OBJECT_TYPE_IMAGE_VIEW" comment="VkImageView"/>
- <enum value="15" name="VK_OBJECT_TYPE_SHADER_MODULE" comment="VkShaderModule"/>
- <enum value="16" name="VK_OBJECT_TYPE_PIPELINE_CACHE" comment="VkPipelineCache"/>
- <enum value="17" name="VK_OBJECT_TYPE_PIPELINE_LAYOUT" comment="VkPipelineLayout"/>
- <enum value="18" name="VK_OBJECT_TYPE_RENDER_PASS" comment="VkRenderPass"/>
- <enum value="19" name="VK_OBJECT_TYPE_PIPELINE" comment="VkPipeline"/>
- <enum value="20" name="VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT" comment="VkDescriptorSetLayout"/>
- <enum value="21" name="VK_OBJECT_TYPE_SAMPLER" comment="VkSampler"/>
- <enum value="22" name="VK_OBJECT_TYPE_DESCRIPTOR_POOL" comment="VkDescriptorPool"/>
- <enum value="23" name="VK_OBJECT_TYPE_DESCRIPTOR_SET" comment="VkDescriptorSet"/>
- <enum value="24" name="VK_OBJECT_TYPE_FRAMEBUFFER" comment="VkFramebuffer"/>
- <enum value="25" name="VK_OBJECT_TYPE_COMMAND_POOL" comment="VkCommandPool"/>
- </enums>
-
- <!-- Flags -->
- <enums name="VkQueueFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_QUEUE_GRAPHICS_BIT" comment="Queue supports graphics operations"/>
- <enum bitpos="1" name="VK_QUEUE_COMPUTE_BIT" comment="Queue supports compute operations"/>
- <enum bitpos="2" name="VK_QUEUE_TRANSFER_BIT" comment="Queue supports transfer operations"/>
- <enum bitpos="3" name="VK_QUEUE_SPARSE_BINDING_BIT" comment="Queue supports sparse resource memory management operations"/>
- </enums>
- <enums name="VkMemoryPropertyFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT" comment="If otherwise stated, then allocate memory on device"/>
- <enum bitpos="1" name="VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT" comment="Memory is mappable by host"/>
- <enum bitpos="2" name="VK_MEMORY_PROPERTY_HOST_COHERENT_BIT" comment="Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache"/>
- <enum bitpos="3" name="VK_MEMORY_PROPERTY_HOST_CACHED_BIT" comment="Memory will be cached by the host"/>
- <enum bitpos="4" name="VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT" comment="Memory may be allocated by the driver when it is required"/>
- </enums>
- <enums name="VkMemoryHeapFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_MEMORY_HEAP_DEVICE_LOCAL_BIT" comment="If set, heap represents device memory"/>
- </enums>
- <enums name="VkAccessFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_ACCESS_INDIRECT_COMMAND_READ_BIT" comment="Controls coherency of indirect command reads"/>
- <enum bitpos="1" name="VK_ACCESS_INDEX_READ_BIT" comment="Controls coherency of index reads"/>
- <enum bitpos="2" name="VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT" comment="Controls coherency of vertex attribute reads"/>
- <enum bitpos="3" name="VK_ACCESS_UNIFORM_READ_BIT" comment="Controls coherency of uniform buffer reads"/>
- <enum bitpos="4" name="VK_ACCESS_INPUT_ATTACHMENT_READ_BIT" comment="Controls coherency of input attachment reads"/>
- <enum bitpos="5" name="VK_ACCESS_SHADER_READ_BIT" comment="Controls coherency of shader reads"/>
- <enum bitpos="6" name="VK_ACCESS_SHADER_WRITE_BIT" comment="Controls coherency of shader writes"/>
- <enum bitpos="7" name="VK_ACCESS_COLOR_ATTACHMENT_READ_BIT" comment="Controls coherency of color attachment reads"/>
- <enum bitpos="8" name="VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT" comment="Controls coherency of color attachment writes"/>
- <enum bitpos="9" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT" comment="Controls coherency of depth/stencil attachment reads"/>
- <enum bitpos="10" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT" comment="Controls coherency of depth/stencil attachment writes"/>
- <enum bitpos="11" name="VK_ACCESS_TRANSFER_READ_BIT" comment="Controls coherency of transfer reads"/>
- <enum bitpos="12" name="VK_ACCESS_TRANSFER_WRITE_BIT" comment="Controls coherency of transfer writes"/>
- <enum bitpos="13" name="VK_ACCESS_HOST_READ_BIT" comment="Controls coherency of host reads"/>
- <enum bitpos="14" name="VK_ACCESS_HOST_WRITE_BIT" comment="Controls coherency of host writes"/>
- <enum bitpos="15" name="VK_ACCESS_MEMORY_READ_BIT" comment="Controls coherency of memory reads"/>
- <enum bitpos="16" name="VK_ACCESS_MEMORY_WRITE_BIT" comment="Controls coherency of memory writes"/>
- </enums>
- <enums name="VkBufferUsageFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_BUFFER_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/>
- <enum bitpos="1" name="VK_BUFFER_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/>
- <enum bitpos="2" name="VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT" comment="Can be used as TBO"/>
- <enum bitpos="3" name="VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT" comment="Can be used as IBO"/>
- <enum bitpos="4" name="VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT" comment="Can be used as UBO"/>
- <enum bitpos="5" name="VK_BUFFER_USAGE_STORAGE_BUFFER_BIT" comment="Can be used as SSBO"/>
- <enum bitpos="6" name="VK_BUFFER_USAGE_INDEX_BUFFER_BIT" comment="Can be used as source of fixed-function index fetch (index buffer)"/>
- <enum bitpos="7" name="VK_BUFFER_USAGE_VERTEX_BUFFER_BIT" comment="Can be used as source of fixed-function vertex fetch (VBO)"/>
- <enum bitpos="8" name="VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT" comment="Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)"/>
- </enums>
- <enums name="VkBufferCreateFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_BUFFER_CREATE_SPARSE_BINDING_BIT" comment="Buffer should support sparse backing"/>
- <enum bitpos="1" name="VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT" comment="Buffer should support sparse backing with partial residency"/>
- <enum bitpos="2" name="VK_BUFFER_CREATE_SPARSE_ALIASED_BIT" comment="Buffer should support constent data access to physical memory ranges mapped into multiple locations of sparse buffers"/>
- </enums>
- <enums name="VkShaderStageFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_SHADER_STAGE_VERTEX_BIT"/>
- <enum bitpos="1" name="VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT"/>
- <enum bitpos="2" name="VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT"/>
- <enum bitpos="3" name="VK_SHADER_STAGE_GEOMETRY_BIT"/>
- <enum bitpos="4" name="VK_SHADER_STAGE_FRAGMENT_BIT"/>
- <enum bitpos="5" name="VK_SHADER_STAGE_COMPUTE_BIT"/>
- <enum value="0x0000001F" name="VK_SHADER_STAGE_ALL_GRAPHICS"/>
- <enum value="0x7FFFFFFF" name="VK_SHADER_STAGE_ALL"/>
- </enums>
- <enums name="VkImageUsageFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_IMAGE_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/>
- <enum bitpos="1" name="VK_IMAGE_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/>
- <enum bitpos="2" name="VK_IMAGE_USAGE_SAMPLED_BIT" comment="Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/>
- <enum bitpos="3" name="VK_IMAGE_USAGE_STORAGE_BIT" comment="Can be used as storage image (STORAGE_IMAGE descriptor type)"/>
- <enum bitpos="4" name="VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" comment="Can be used as framebuffer color attachment"/>
- <enum bitpos="5" name="VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Can be used as framebuffer depth/stencil attachment"/>
- <enum bitpos="6" name="VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT" comment="Image data not needed outside of rendering"/>
- <enum bitpos="7" name="VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" comment="Can be used as framebuffer input attachment"/>
- </enums>
- <enums name="VkImageCreateFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_IMAGE_CREATE_SPARSE_BINDING_BIT" comment="Image should support sparse backing"/>
- <enum bitpos="1" name="VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" comment="Image should support sparse backing with partial residency"/>
- <enum bitpos="2" name="VK_IMAGE_CREATE_SPARSE_ALIASED_BIT" comment="Image should support constent data access to physical memory ranges mapped into multiple locations of sparse images"/>
- <enum bitpos="3" name="VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT" comment="Allows image views to have different format than the base image"/>
- <enum bitpos="4" name="VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT" comment="Allows creating image views with cube type from the created image"/>
- </enums>
- <enums name="VkPipelineCreateFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT"/>
- <enum bitpos="1" name="VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT"/>
- <enum bitpos="2" name="VK_PIPELINE_CREATE_DERIVATIVE_BIT"/>
- </enums>
- <enums name="VkColorComponentFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_COLOR_COMPONENT_R_BIT"/>
- <enum bitpos="1" name="VK_COLOR_COMPONENT_G_BIT"/>
- <enum bitpos="2" name="VK_COLOR_COMPONENT_B_BIT"/>
- <enum bitpos="3" name="VK_COLOR_COMPONENT_A_BIT"/>
- </enums>
- <enums name="VkFenceCreateFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_FENCE_CREATE_SIGNALED_BIT"/>
- </enums>
- <enums name="VkFormatFeatureFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" comment="Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/>
- <enum bitpos="1" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" comment="Format can be used for storage images (STORAGE_IMAGE descriptor type)"/>
- <enum bitpos="2" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT" comment="Format supports atomic operations in case it is used for storage images"/>
- <enum bitpos="3" name="VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" comment="Format can be used for uniform texel buffers (TBOs)"/>
- <enum bitpos="4" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT" comment="Format can be used for storage texel buffers (IBOs)"/>
- <enum bitpos="5" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" comment="Format supports atomic operations in case it is used for storage texel buffers"/>
- <enum bitpos="6" name="VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" comment="Format can be used for vertex buffers (VBOs)"/>
- <enum bitpos="7" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT" comment="Format can be used for color attachment images"/>
- <enum bitpos="8" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" comment="Format supports blending in case it is used for color attachment images"/>
- <enum bitpos="9" name="VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Format can be used for depth/stencil attachment images"/>
- <enum bitpos="10" name="VK_FORMAT_FEATURE_BLIT_SRC_BIT" comment="Format can be used as the source image of blits with vkCmdBlitImage"/>
- <enum bitpos="11" name="VK_FORMAT_FEATURE_BLIT_DST_BIT" comment="Format can be used as the destination image of blits with vkCmdBlitImage"/>
- <enum bitpos="12" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT" comment="Format can be filtered with VK_FILTER_LINEAR when being sampled"/>
- </enums>
- <enums name="VkQueryControlFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_QUERY_CONTROL_PRECISE_BIT" comment="Require precise results to be collected by the query"/>
- </enums>
- <enums name="VkQueryResultFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_QUERY_RESULT_64_BIT" comment="Results of the queries are written to the destination buffer as 64-bit values"/>
- <enum bitpos="1" name="VK_QUERY_RESULT_WAIT_BIT" comment="Results of the queries are waited on before proceeding with the result copy"/>
- <enum bitpos="2" name="VK_QUERY_RESULT_WITH_AVAILABILITY_BIT" comment="Besides the results of the query, the availability of the results is also written"/>
- <enum bitpos="3" name="VK_QUERY_RESULT_PARTIAL_BIT" comment="Copy the partial results of the query even if the final results are not available"/>
- </enums>
- <enums name="VkCommandBufferUsageFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT"/>
- <enum bitpos="1" name="VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT"/>
- <enum bitpos="2" name="VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT" comment="Command buffer may be submitted/executed more than once simultaneously"/>
- </enums>
- <enums name="VkQueryPipelineStatisticFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT" comment="Optional"/>
- <enum bitpos="1" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT" comment="Optional"/>
- <enum bitpos="2" name="VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT" comment="Optional"/>
- <enum bitpos="3" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT" comment="Optional"/>
- <enum bitpos="4" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT" comment="Optional"/>
- <enum bitpos="5" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT" comment="Optional"/>
- <enum bitpos="6" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT" comment="Optional"/>
- <enum bitpos="7" name="VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT" comment="Optional"/>
- <enum bitpos="8" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT" comment="Optional"/>
- <enum bitpos="9" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT" comment="Optional"/>
- <enum bitpos="10" name="VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT" comment="Optional"/>
- </enums>
- <enums name="VkImageAspectFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_IMAGE_ASPECT_COLOR_BIT"/>
- <enum bitpos="1" name="VK_IMAGE_ASPECT_DEPTH_BIT"/>
- <enum bitpos="2" name="VK_IMAGE_ASPECT_STENCIL_BIT"/>
- <enum bitpos="3" name="VK_IMAGE_ASPECT_METADATA_BIT"/>
- </enums>
- <enums name="VkSparseImageFormatFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT" comment="Image uses a single mip tail region for all array layers"/>
- <enum bitpos="1" name="VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT" comment="Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels."/>
- <enum bitpos="2" name="VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT" comment="Image uses a non-standard sparse image block dimensions"/>
- </enums>
- <enums name="VkSparseMemoryBindFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_SPARSE_MEMORY_BIND_METADATA_BIT" comment="Operation binds resource metadata to memory"/>
- </enums>
- <enums name="VkPipelineStageFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT" comment="Before subsequent commands are processed"/>
- <enum bitpos="1" name="VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT" comment="Draw/DispatchIndirect command fetch"/>
- <enum bitpos="2" name="VK_PIPELINE_STAGE_VERTEX_INPUT_BIT" comment="Vertex/index fetch"/>
- <enum bitpos="3" name="VK_PIPELINE_STAGE_VERTEX_SHADER_BIT" comment="Vertex shading"/>
- <enum bitpos="4" name="VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT" comment="Tessellation control shading"/>
- <enum bitpos="5" name="VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" comment="Tessellation evaluation shading"/>
- <enum bitpos="6" name="VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" comment="Geometry shading"/>
- <enum bitpos="7" name="VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT" comment="Fragment shading"/>
- <enum bitpos="8" name="VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT" comment="Early fragment (depth and stencil) tests"/>
- <enum bitpos="9" name="VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT" comment="Late fragment (depth and stencil) tests"/>
- <enum bitpos="10" name="VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT" comment="Color attachment writes"/>
- <enum bitpos="11" name="VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT" comment="Compute shading"/>
- <enum bitpos="12" name="VK_PIPELINE_STAGE_TRANSFER_BIT" comment="Transfer/copy operations"/>
- <enum bitpos="13" name="VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT" comment="After previous commands have completed"/>
- <enum bitpos="14" name="VK_PIPELINE_STAGE_HOST_BIT" comment="Indicates host (CPU) is a source/sink of the dependency"/>
- <enum bitpos="15" name="VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT" comment="All stages of the graphics pipeline"/>
- <enum bitpos="16" name="VK_PIPELINE_STAGE_ALL_COMMANDS_BIT" comment="All stages supported on the queue"/>
- </enums>
- <enums name="VkCommandPoolCreateFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_COMMAND_POOL_CREATE_TRANSIENT_BIT" comment="Command buffers have a short lifetime"/>
- <enum bitpos="1" name="VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" comment="Command buffers may release their memory individually"/>
- </enums>
- <enums name="VkCommandPoolResetFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the pool"/>
- </enums>
- <enums name="VkCommandBufferResetFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the buffer"/>
- </enums>
- <enums name="VkSampleCountFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_SAMPLE_COUNT_1_BIT" comment="Sample count 1 supported"/>
- <enum bitpos="1" name="VK_SAMPLE_COUNT_2_BIT" comment="Sample count 2 supported"/>
- <enum bitpos="2" name="VK_SAMPLE_COUNT_4_BIT" comment="Sample count 4 supported"/>
- <enum bitpos="3" name="VK_SAMPLE_COUNT_8_BIT" comment="Sample count 8 supported"/>
- <enum bitpos="4" name="VK_SAMPLE_COUNT_16_BIT" comment="Sample count 16 supported"/>
- <enum bitpos="5" name="VK_SAMPLE_COUNT_32_BIT" comment="Sample count 32 supported"/>
- <enum bitpos="6" name="VK_SAMPLE_COUNT_64_BIT" comment="Sample count 64 supported"/>
- </enums>
- <enums name="VkAttachmentDescriptionFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT" comment="The attachment may alias physical memory of another attachment in the same render pass"/>
- </enums>
- <enums name="VkStencilFaceFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_STENCIL_FACE_FRONT_BIT" comment="Front face"/>
- <enum bitpos="1" name="VK_STENCIL_FACE_BACK_BIT" comment="Back face"/>
- <enum value="0x00000003" name="VK_STENCIL_FRONT_AND_BACK" comment="Front and back faces"/>
- </enums>
- <enums name="VkDescriptorPoolCreateFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT" comment="Descriptor sets may be freed individually"/>
- </enums>
- <enums name="VkDependencyFlagBits" type="bitmask">
- <enum bitpos="0" name="VK_DEPENDENCY_BY_REGION_BIT" comment="Dependency is per pixel region "/>
- </enums>
- <!-- WSI extensions -->
- <enums name="VkPresentModeKHR" type="enum">
- <enum value="0" name="VK_PRESENT_MODE_IMMEDIATE_KHR"/>
- <enum value="1" name="VK_PRESENT_MODE_MAILBOX_KHR"/>
- <enum value="2" name="VK_PRESENT_MODE_FIFO_KHR"/>
- <enum value="3" name="VK_PRESENT_MODE_FIFO_RELAXED_KHR"/>
- </enums>
- <enums name="VkColorSpaceKHR" type="enum">
- <enum value="0" name="VK_COLOR_SPACE_SRGB_NONLINEAR_KHR"/>
- </enums>
- <enums name="VkDisplayPlaneAlphaFlagBitsKHR" type="bitmask">
- <enum bitpos="0" name="VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR"/>
- <enum bitpos="1" name="VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR"/>
- <enum bitpos="2" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR"/>
- <enum bitpos="3" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"/>
- </enums>
- <enums name="VkCompositeAlphaFlagBitsKHR" type="bitmask">
- <enum bitpos="0" name="VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR"/>
- <enum bitpos="1" name="VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"/>
- <enum bitpos="2" name="VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"/>
- <enum bitpos="3" name="VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR"/>
- </enums>
- <enums name="VkSurfaceTransformFlagBitsKHR" type="bitmask">
- <enum bitpos="0" name="VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR"/>
- <enum bitpos="1" name="VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"/>
- <enum bitpos="2" name="VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR"/>
- <enum bitpos="3" name="VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR"/>
- <enum bitpos="4" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR"/>
- <enum bitpos="5" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"/>
- <enum bitpos="6" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"/>
- <enum bitpos="7" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"/>
- <enum bitpos="8" name="VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR"/>
- </enums>
- <enums name="VkDebugReportFlagBitsEXT" type="bitmask">
- <enum bitpos="0" name="VK_DEBUG_REPORT_INFORMATION_BIT_EXT"/>
- <enum bitpos="1" name="VK_DEBUG_REPORT_WARNING_BIT_EXT"/>
- <enum bitpos="2" name="VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT"/>
- <enum bitpos="3" name="VK_DEBUG_REPORT_ERROR_BIT_EXT"/>
- <enum bitpos="4" name="VK_DEBUG_REPORT_DEBUG_BIT_EXT"/>
- </enums>
- <enums name="VkDebugReportObjectTypeEXT" type="enum">
- <enum value="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"/>
- <enum value="1" name="VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"/>
- <enum value="2" name="VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"/>
- <enum value="3" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"/>
- <enum value="4" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"/>
- <enum value="5" name="VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"/>
- <enum value="6" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"/>
- <enum value="7" name="VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"/>
- <enum value="8" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"/>
- <enum value="9" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"/>
- <enum value="10" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"/>
- <enum value="11" name="VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"/>
- <enum value="12" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"/>
- <enum value="13" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"/>
- <enum value="14" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"/>
- <enum value="15" name="VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"/>
- <enum value="16" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"/>
- <enum value="17" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"/>
- <enum value="18" name="VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"/>
- <enum value="19" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"/>
- <enum value="20" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"/>
- <enum value="21" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"/>
- <enum value="22" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"/>
- <enum value="23" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"/>
- <enum value="24" name="VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"/>
- <enum value="25" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"/>
- <enum value="26" name="VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"/>
- <enum value="27" name="VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"/>
- <enum value="28" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT"/>
- <enum value="29" name="VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT"/>
- <enum value="30" name="VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT"/>
- <enum value="31" name="VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT"/>
- <enum value="32" name="VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT"/>
- </enums>
- <enums name="VkRasterizationOrderAMD" type="enum">
- <enum value="0" name="VK_RASTERIZATION_ORDER_STRICT_AMD"/> <!-- Rasterization order strictly follows API order -->
- <enum value="1" name="VK_RASTERIZATION_ORDER_RELAXED_AMD"/> <!-- Rasterization order may not follow API order -->
- </enums>
- <enums name="VkExternalMemoryHandleTypeFlagBitsNV" type="bitmask">
- <enum bitpos="0" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV"/>
- <enum bitpos="1" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV"/>
- <enum bitpos="2" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV"/>
- <enum bitpos="3" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV"/>
- </enums>
- <enums name="VkExternalMemoryFeatureFlagBitsNV" type="bitmask">
- <enum bitpos="0" name="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV"/>
- <enum bitpos="1" name="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV"/>
- <enum bitpos="2" name="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV"/>
- </enums>
- <enums name="VkValidationCheckEXT" type="enum">
- <enum value="0" name="VK_VALIDATION_CHECK_ALL_EXT"/>
- <enum value="1" name="VK_VALIDATION_CHECK_SHADERS_EXT"/>
- <!-- Placeholder for validation enums to be defined for VK_EXT_Validation_flags extension -->
- </enums>
- <enums name="VkIndirectCommandsLayoutUsageFlagBitsNVX" type="bitmask">
- <enum bitpos="0" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX"/> <!-- sequences can be processed in implementation-dependent order -->
- <enum bitpos="1" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX"/> <!-- likely generated with a high difference in actual sequencesCount and maxSequencesCount -->
- <enum bitpos="2" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX"/> <!-- likely to contain draw/dispatch calls that are zero-sized -->
- <enum bitpos="3" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX"/> <!-- custom sequence index permutation (32-bit) is provided -->
- </enums>
- <enums name="VkObjectEntryUsageFlagBitsNVX" type="bitmask">
- <enum bitpos="0" name="VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX"/>
- <enum bitpos="1" name="VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX"/>
- </enums>
- <enums name="VkIndirectCommandsTokenTypeNVX" type="enum">
- <enum value="0" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX"/> <!-- array of 32bit tableEntry in the object table -->
- <enum value="1" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX"/> <!-- array of (32 bit tableEntry + variable count 32bit offsets) -->
- <enum value="2" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX"/> <!-- array of (32 bit tableEntry + optional 32bit offset) -->
- <enum value="3" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX"/> <!-- array of (32 bit tableEntry + optional 32bit offset) -->
- <enum value="4" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX"/> <!-- array of (32 bit tableEntry + variable count 32bit values ) -->
- <enum value="5" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX"/> <!-- array of VkDrawIndexedIndirectCommand -->
- <enum value="6" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX"/> <!-- array of VkDrawIndirectCommand -->
- <enum value="7" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX"/> <!-- array of VkDispatchIndirectCommand -->
- </enums>
- <enums name="VkObjectEntryTypeNVX" type="enum">
- <enum value="0" name="VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX"/>
- <enum value="1" name="VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX"/>
- <enum value="2" name="VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX"/>
- <enum value="3" name="VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX"/>
- <enum value="4" name="VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX"/>
- </enums>
- <enums name="VkDescriptorSetLayoutCreateFlagBits" type="bitmask">
- </enums>
- <enums name="VkExternalMemoryHandleTypeFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX"/>
- <enum bitpos="1" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX"/>
- <enum bitpos="2" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX"/>
- <enum bitpos="3" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX"/>
- <enum bitpos="4" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX"/>
- <enum bitpos="5" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX"/>
- <enum bitpos="6" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX"/>
- </enums>
- <enums name="VkExternalMemoryFeatureFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX"/>
- <enum bitpos="1" name="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX"/>
- <enum bitpos="2" name="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX"/>
- </enums>
- <enums name="VkExternalSemaphoreHandleTypeFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX"/>
- <enum bitpos="1" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX"/>
- <enum bitpos="2" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX"/>
- <enum bitpos="3" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX"/>
- <enum bitpos="4" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX"/>
- </enums>
- <enums name="VkExternalSemaphoreFeatureFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX"/>
- <enum bitpos="1" name="VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX"/>
- </enums>
- <enums name="VkSurfaceCounterFlagBitsEXT" type="bitmask">
- <enum bitpos="0" name="VK_SURFACE_COUNTER_VBLANK_EXT"/>
- </enums>
- <enums name="VkDisplayPowerStateEXT" type="enum">
- <enum value="0" name="VK_DISPLAY_POWER_STATE_OFF_EXT"/>
- <enum value="1" name="VK_DISPLAY_POWER_STATE_SUSPEND_EXT"/>
- <enum value="2" name="VK_DISPLAY_POWER_STATE_ON_EXT"/>
- </enums>
- <enums name="VkDeviceEventTypeEXT" type="enum">
- <enum value="0" name="VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT"/>
- </enums>
- <enums name="VkDisplayEventTypeEXT" type="enum">
- <enum value="0" name="VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT"/>
- </enums>
- <enums name="VkPeerMemoryFeatureFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX" comment="Can read with vkCmdCopy commands"/>
- <enum bitpos="1" name="VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX" comment="Can write with vkCmdCopy commands"/>
- <enum bitpos="2" name="VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX" comment="Can read with any access type/command"/>
- <enum bitpos="3" name="VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX" comment="Can write with and access type/command"/>
- </enums>
- <enums name="VkMemoryAllocateFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX" comment="Force allocation on specific devices"/>
- </enums>
- <enums name="VkDeviceGroupPresentModeFlagBitsKHX" type="bitmask">
- <enum bitpos="0" name="VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX" comment="Present from local memory"/>
- <enum bitpos="1" name="VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX" comment="Present from remote memory"/>
- <enum bitpos="2" name="VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX" comment="Present sum of local and/or remote memory"/>
- <enum bitpos="3" name="VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX" comment="Each physical device presents from local memory"/>
- </enums>
- <enums name="VkSwapchainCreateFlagBitsKHR" type="bitmask">
- </enums>
- <enums name="VkViewportCoordinateSwizzleNV" type="enum">
- <enum value="0" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV"/>
- <enum value="1" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV"/>
- <enum value="2" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV"/>
- <enum value="3" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV"/>
- <enum value="4" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV"/>
- <enum value="5" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV"/>
- <enum value="6" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV"/>
- <enum value="7" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV"/>
- </enums>
- <enums name="VkDiscardRectangleModeEXT" type="enum">
- <enum value="0" name="VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT"/>
- <enum value="1" name="VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT"/>
- </enums>
- <enums name="VkSubpassDescriptionFlagBits" type="bitmask">
- </enums>
-
-
- <!-- SECTION: Vulkan command definitions -->
- <commands>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INCOMPATIBLE_DRIVER">
- <proto><type>VkResult</type> <name>vkCreateInstance</name></proto>
- <param>const <type>VkInstanceCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkInstance</type>* <name>pInstance</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyInstance</name></proto>
- <param optional="true" externsync="true"><type>VkInstance</type> <name>instance</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
- <proto><type>VkResult</type> <name>vkEnumeratePhysicalDevices</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPhysicalDeviceCount</name></param>
- <param optional="true" len="pPhysicalDeviceCount"><type>VkPhysicalDevice</type>* <name>pPhysicalDevices</name></param>
- </command>
- <command>
- <proto><type>PFN_vkVoidFunction</type> <name>vkGetDeviceProcAddr</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param len="null-terminated">const <type>char</type>* <name>pName</name></param>
- </command>
- <command>
- <proto><type>PFN_vkVoidFunction</type> <name>vkGetInstanceProcAddr</name></proto>
- <param optional="true"><type>VkInstance</type> <name>instance</name></param>
- <param len="null-terminated">const <type>char</type>* <name>pName</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkPhysicalDeviceProperties</type>* <name>pProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param>
- <param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties</type>* <name>pQueueFamilyProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkPhysicalDeviceMemoryProperties</type>* <name>pMemoryProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceFeatures</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkPhysicalDeviceFeatures</type>* <name>pFeatures</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkFormat</type> <name>format</name></param>
- <param><type>VkFormatProperties</type>* <name>pFormatProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkFormat</type> <name>format</name></param>
- <param><type>VkImageType</type> <name>type</name></param>
- <param><type>VkImageTiling</type> <name>tiling</name></param>
- <param><type>VkImageUsageFlags</type> <name>usage</name></param>
- <param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param>
- <param><type>VkImageFormatProperties</type>* <name>pImageFormatProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_FEATURE_NOT_PRESENT,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkCreateDevice</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkDeviceCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDevice</type>* <name>pDevice</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyDevice</name></proto>
- <param optional="true" externsync="true"><type>VkDevice</type> <name>device</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkEnumerateInstanceLayerProperties</name></proto>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_LAYER_NOT_PRESENT">
- <proto><type>VkResult</type> <name>vkEnumerateInstanceExtensionProperties</name></proto>
- <param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkEnumerateDeviceLayerProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_LAYER_NOT_PRESENT">
- <proto><type>VkResult</type> <name>vkEnumerateDeviceExtensionProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetDeviceQueue</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- <param><type>uint32_t</type> <name>queueIndex</name></param>
- <param><type>VkQueue</type>* <name>pQueue</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkQueueSubmit</name></proto>
- <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
- <param optional="true"><type>uint32_t</type> <name>submitCount</name></param>
- <param len="submitCount" externsync="pSubmits[].pWaitSemaphores[],pSubmits[].pSignalSemaphores[]">const <type>VkSubmitInfo</type>* <name>pSubmits</name></param>
- <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkQueueWaitIdle</name></proto>
- <param><type>VkQueue</type> <name>queue</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkDeviceWaitIdle</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <implicitexternsyncparams>
- <param>all sname:VkQueue objects created from pname:device</param>
- </implicitexternsyncparams>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX">
- <proto><type>VkResult</type> <name>vkAllocateMemory</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkMemoryAllocateInfo</type>* <name>pAllocateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDeviceMemory</type>* <name>pMemory</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkFreeMemory</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_MEMORY_MAP_FAILED">
- <proto><type>VkResult</type> <name>vkMapMemory</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- <param><type>VkDeviceSize</type> <name>size</name></param>
- <param optional="true"><type>VkMemoryMapFlags</type> <name>flags</name></param>
- <param><type>void</type>** <name>ppData</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkUnmapMemory</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkFlushMappedMemoryRanges</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>memoryRangeCount</name></param>
- <param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkInvalidateMappedMemoryRanges</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>memoryRangeCount</name></param>
- <param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetDeviceMemoryCommitment</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkDeviceSize</type>* <name>pCommittedMemoryInBytes</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetBufferMemoryRequirements</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkBindBufferMemory</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkDeviceSize</type> <name>memoryOffset</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetImageMemoryRequirements</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkImage</type> <name>image</name></param>
- <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkBindImageMemory</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkImage</type> <name>image</name></param>
- <param><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkDeviceSize</type> <name>memoryOffset</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetImageSparseMemoryRequirements</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkImage</type> <name>image</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pSparseMemoryRequirementCount</name></param>
- <param optional="true" len="pSparseMemoryRequirementCount"><type>VkSparseImageMemoryRequirements</type>* <name>pSparseMemoryRequirements</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkFormat</type> <name>format</name></param>
- <param><type>VkImageType</type> <name>type</name></param>
- <param><type>VkSampleCountFlagBits</type> <name>samples</name></param>
- <param><type>VkImageUsageFlags</type> <name>usage</name></param>
- <param><type>VkImageTiling</type> <name>tiling</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties</type>* <name>pProperties</name></param>
- </command>
- <command queues="sparse_binding" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkQueueBindSparse</name></proto>
- <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
- <param optional="true"><type>uint32_t</type> <name>bindInfoCount</name></param>
- <param len="bindInfoCount" externsync="pBindInfo[].pWaitSemaphores[],pBindInfo[].pSignalSemaphores[],pBindInfo[].pBufferBinds[].buffer,pBindInfo[].pImageOpaqueBinds[].image,pBindInfo[].pImageBinds[].image">const <type>VkBindSparseInfo</type>* <name>pBindInfo</name></param>
- <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateFence</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkFenceCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkFence</type>* <name>pFence</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyFence</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkResetFences</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>fenceCount</name></param>
- <param len="fenceCount" externsync="true">const <type>VkFence</type>* <name>pFences</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkGetFenceStatus</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkFence</type> <name>fence</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_TIMEOUT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkWaitForFences</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>fenceCount</name></param>
- <param len="fenceCount">const <type>VkFence</type>* <name>pFences</name></param>
- <param><type>VkBool32</type> <name>waitAll</name></param>
- <param><type>uint64_t</type> <name>timeout</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateSemaphore</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkSemaphoreCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSemaphore</type>* <name>pSemaphore</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroySemaphore</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateEvent</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkEventCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkEvent</type>* <name>pEvent</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyEvent</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkEvent</type> <name>event</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_EVENT_SET,VK_EVENT_RESET" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkGetEventStatus</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkEvent</type> <name>event</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkSetEvent</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkEvent</type> <name>event</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkResetEvent</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkEvent</type> <name>event</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateQueryPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkQueryPoolCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkQueryPool</type>* <name>pQueryPool</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyQueryPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkQueryPool</type> <name>queryPool</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
- <proto><type>VkResult</type> <name>vkGetQueryPoolResults</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkQueryPool</type> <name>queryPool</name></param>
- <param><type>uint32_t</type> <name>firstQuery</name></param>
- <param><type>uint32_t</type> <name>queryCount</name></param>
- <param><type>size_t</type> <name>dataSize</name></param>
- <param len="dataSize"><type>void</type>* <name>pData</name></param>
- <param><type>VkDeviceSize</type> <name>stride</name></param>
- <param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateBuffer</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkBufferCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkBuffer</type>* <name>pBuffer</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyBuffer</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkBuffer</type> <name>buffer</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateBufferView</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkBufferViewCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkBufferView</type>* <name>pView</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyBufferView</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkBufferView</type> <name>bufferView</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateImage</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkImage</type>* <name>pImage</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyImage</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkImage</type> <name>image</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetImageSubresourceLayout</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkImage</type> <name>image</name></param>
- <param>const <type>VkImageSubresource</type>* <name>pSubresource</name></param>
- <param><type>VkSubresourceLayout</type>* <name>pLayout</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateImageView</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkImageViewCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkImageView</type>* <name>pView</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyImageView</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkImageView</type> <name>imageView</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
- <proto><type>VkResult</type> <name>vkCreateShaderModule</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkShaderModuleCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkShaderModule</type>* <name>pShaderModule</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyShaderModule</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkShaderModule</type> <name>shaderModule</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreatePipelineCache</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkPipelineCacheCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkPipelineCache</type>* <name>pPipelineCache</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyPipelineCache</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetPipelineCacheData</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkPipelineCache</type> <name>pipelineCache</name></param>
- <param optional="false,true"><type>size_t</type>* <name>pDataSize</name></param>
- <param optional="true" len="pDataSize"><type>void</type>* <name>pData</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkMergePipelineCaches</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkPipelineCache</type> <name>dstCache</name></param>
- <param><type>uint32_t</type> <name>srcCacheCount</name></param>
- <param len="srcCacheCount">const <type>VkPipelineCache</type>* <name>pSrcCaches</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
- <proto><type>VkResult</type> <name>vkCreateGraphicsPipelines</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
- <param><type>uint32_t</type> <name>createInfoCount</name></param>
- <param len="createInfoCount">const <type>VkGraphicsPipelineCreateInfo</type>* <name>pCreateInfos</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
- <proto><type>VkResult</type> <name>vkCreateComputePipelines</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
- <param><type>uint32_t</type> <name>createInfoCount</name></param>
- <param len="createInfoCount">const <type>VkComputePipelineCreateInfo</type>* <name>pCreateInfos</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyPipeline</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkPipeline</type> <name>pipeline</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreatePipelineLayout</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkPipelineLayoutCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkPipelineLayout</type>* <name>pPipelineLayout</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyPipelineLayout</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkPipelineLayout</type> <name>pipelineLayout</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS">
- <proto><type>VkResult</type> <name>vkCreateSampler</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkSamplerCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSampler</type>* <name>pSampler</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroySampler</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkSampler</type> <name>sampler</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateDescriptorSetLayout</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkDescriptorSetLayoutCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDescriptorSetLayout</type>* <name>pSetLayout</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyDescriptorSetLayout</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkDescriptorSetLayout</type> <name>descriptorSetLayout</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateDescriptorPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkDescriptorPoolCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDescriptorPool</type>* <name>pDescriptorPool</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyDescriptorPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkResetDescriptorPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
- <param optional="true"><type>VkDescriptorPoolResetFlags</type> <name>flags</name></param>
- <implicitexternsyncparams>
- <param>any sname:VkDescriptorSet objects allocated from pname:descriptorPool</param>
- </implicitexternsyncparams>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FRAGMENTED_POOL,VK_ERROR_OUT_OF_POOL_MEMORY_KHR">
- <proto><type>VkResult</type> <name>vkAllocateDescriptorSets</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="pAllocateInfo::descriptorPool">const <type>VkDescriptorSetAllocateInfo</type>* <name>pAllocateInfo</name></param>
- <param len="pAllocateInfo::descriptorSetCount"><type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkFreeDescriptorSets</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
- <param><type>uint32_t</type> <name>descriptorSetCount</name></param>
- <param noautovalidity="true" externsync="true" len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkUpdateDescriptorSets</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true"><type>uint32_t</type> <name>descriptorWriteCount</name></param>
- <param len="descriptorWriteCount" externsync="pDescriptorWrites[].dstSet">const <type>VkWriteDescriptorSet</type>* <name>pDescriptorWrites</name></param>
- <param optional="true"><type>uint32_t</type> <name>descriptorCopyCount</name></param>
- <param len="descriptorCopyCount" externsync="pDescriptorCopies[].dstSet">const <type>VkCopyDescriptorSet</type>* <name>pDescriptorCopies</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateFramebuffer</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkFramebufferCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkFramebuffer</type>* <name>pFramebuffer</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyFramebuffer</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkFramebuffer</type> <name>framebuffer</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateRenderPass</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkRenderPassCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkRenderPass</type>* <name>pRenderPass</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyRenderPass</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkRenderPass</type> <name>renderPass</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetRenderAreaGranularity</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkRenderPass</type> <name>renderPass</name></param>
- <param><type>VkExtent2D</type>* <name>pGranularity</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateCommandPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkCommandPoolCreateInfo</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkCommandPool</type>* <name>pCommandPool</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyCommandPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkResetCommandPool</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
- <param optional="true"><type>VkCommandPoolResetFlags</type> <name>flags</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkAllocateCommandBuffers</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="pAllocateInfo::commandPool">const <type>VkCommandBufferAllocateInfo</type>* <name>pAllocateInfo</name></param>
- <param len="pAllocateInfo::commandBufferCount"><type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkFreeCommandBuffers</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
- <param><type>uint32_t</type> <name>commandBufferCount</name></param>
- <param noautovalidity="true" externsync="true" len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkBeginCommandBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param>const <type>VkCommandBufferBeginInfo</type>* <name>pBeginInfo</name></param>
- <implicitexternsyncparams>
- <param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param>
- </implicitexternsyncparams>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkEndCommandBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <implicitexternsyncparams>
- <param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param>
- </implicitexternsyncparams>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkResetCommandBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param optional="true"><type>VkCommandBufferResetFlags</type> <name>flags</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdBindPipeline</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
- <param><type>VkPipeline</type> <name>pipeline</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetViewport</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>firstViewport</name></param>
- <param><type>uint32_t</type> <name>viewportCount</name></param>
- <param len="viewportCount" noautovalidity="true">const <type>VkViewport</type>* <name>pViewports</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetScissor</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>firstScissor</name></param>
- <param><type>uint32_t</type> <name>scissorCount</name></param>
- <param len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetLineWidth</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>float</type> <name>lineWidth</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetDepthBias</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>float</type> <name>depthBiasConstantFactor</name></param>
- <param><type>float</type> <name>depthBiasClamp</name></param>
- <param><type>float</type> <name>depthBiasSlopeFactor</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetBlendConstants</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param>const <type>float</type> <name>blendConstants</name>[4]</param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetDepthBounds</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>float</type> <name>minDepthBounds</name></param>
- <param><type>float</type> <name>maxDepthBounds</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetStencilCompareMask</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
- <param><type>uint32_t</type> <name>compareMask</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetStencilWriteMask</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
- <param><type>uint32_t</type> <name>writeMask</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetStencilReference</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
- <param><type>uint32_t</type> <name>reference</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdBindDescriptorSets</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
- <param><type>VkPipelineLayout</type> <name>layout</name></param>
- <param><type>uint32_t</type> <name>firstSet</name></param>
- <param><type>uint32_t</type> <name>descriptorSetCount</name></param>
- <param len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param>
- <param optional="true"><type>uint32_t</type> <name>dynamicOffsetCount</name></param>
- <param len="dynamicOffsetCount">const <type>uint32_t</type>* <name>pDynamicOffsets</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdBindIndexBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- <param><type>VkIndexType</type> <name>indexType</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdBindVertexBuffers</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>firstBinding</name></param>
- <param><type>uint32_t</type> <name>bindingCount</name></param>
- <param len="bindingCount">const <type>VkBuffer</type>* <name>pBuffers</name></param>
- <param len="bindingCount">const <type>VkDeviceSize</type>* <name>pOffsets</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdDraw</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>vertexCount</name></param>
- <param><type>uint32_t</type> <name>instanceCount</name></param>
- <param><type>uint32_t</type> <name>firstVertex</name></param>
- <param><type>uint32_t</type> <name>firstInstance</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdDrawIndexed</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>indexCount</name></param>
- <param><type>uint32_t</type> <name>instanceCount</name></param>
- <param><type>uint32_t</type> <name>firstIndex</name></param>
- <param><type>int32_t</type> <name>vertexOffset</name></param>
- <param><type>uint32_t</type> <name>firstInstance</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdDrawIndirect</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- <param><type>uint32_t</type> <name>drawCount</name></param>
- <param><type>uint32_t</type> <name>stride</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdDrawIndexedIndirect</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- <param><type>uint32_t</type> <name>drawCount</name></param>
- <param><type>uint32_t</type> <name>stride</name></param>
- </command>
- <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="compute">
- <proto><type>void</type> <name>vkCmdDispatch</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>groupCountX</name></param>
- <param><type>uint32_t</type> <name>groupCountY</name></param>
- <param><type>uint32_t</type> <name>groupCountZ</name></param>
- </command>
- <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="compute">
- <proto><type>void</type> <name>vkCmdDispatchIndirect</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdCopyBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>srcBuffer</name></param>
- <param><type>VkBuffer</type> <name>dstBuffer</name></param>
- <param><type>uint32_t</type> <name>regionCount</name></param>
- <param len="regionCount">const <type>VkBufferCopy</type>* <name>pRegions</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdCopyImage</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkImage</type> <name>srcImage</name></param>
- <param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
- <param><type>VkImage</type> <name>dstImage</name></param>
- <param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
- <param><type>uint32_t</type> <name>regionCount</name></param>
- <param len="regionCount">const <type>VkImageCopy</type>* <name>pRegions</name></param>
- </command>
- <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdBlitImage</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkImage</type> <name>srcImage</name></param>
- <param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
- <param><type>VkImage</type> <name>dstImage</name></param>
- <param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
- <param><type>uint32_t</type> <name>regionCount</name></param>
- <param len="regionCount">const <type>VkImageBlit</type>* <name>pRegions</name></param>
- <param><type>VkFilter</type> <name>filter</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdCopyBufferToImage</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>srcBuffer</name></param>
- <param><type>VkImage</type> <name>dstImage</name></param>
- <param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
- <param><type>uint32_t</type> <name>regionCount</name></param>
- <param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdCopyImageToBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkImage</type> <name>srcImage</name></param>
- <param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
- <param><type>VkBuffer</type> <name>dstBuffer</name></param>
- <param><type>uint32_t</type> <name>regionCount</name></param>
- <param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdUpdateBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>dstBuffer</name></param>
- <param><type>VkDeviceSize</type> <name>dstOffset</name></param>
- <param><type>VkDeviceSize</type> <name>dataSize</name></param>
- <param len="dataSize">const <type>void</type>* <name>pData</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer" comment="transfer support is only available when VK_KHR_maintenance1 is enabled, as documented in valid usage language in the specification">
- <proto><type>void</type> <name>vkCmdFillBuffer</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>dstBuffer</name></param>
- <param><type>VkDeviceSize</type> <name>dstOffset</name></param>
- <param><type>VkDeviceSize</type> <name>size</name></param>
- <param><type>uint32_t</type> <name>data</name></param>
- </command>
- <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdClearColorImage</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkImage</type> <name>image</name></param>
- <param><type>VkImageLayout</type> <name>imageLayout</name></param>
- <param>const <type>VkClearColorValue</type>* <name>pColor</name></param>
- <param><type>uint32_t</type> <name>rangeCount</name></param>
- <param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param>
- </command>
- <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdClearDepthStencilImage</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkImage</type> <name>image</name></param>
- <param><type>VkImageLayout</type> <name>imageLayout</name></param>
- <param>const <type>VkClearDepthStencilValue</type>* <name>pDepthStencil</name></param>
- <param><type>uint32_t</type> <name>rangeCount</name></param>
- <param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdClearAttachments</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>attachmentCount</name></param>
- <param len="attachmentCount">const <type>VkClearAttachment</type>* <name>pAttachments</name></param>
- <param><type>uint32_t</type> <name>rectCount</name></param>
- <param len="rectCount">const <type>VkClearRect</type>* <name>pRects</name></param>
- </command>
- <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdResolveImage</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkImage</type> <name>srcImage</name></param>
- <param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
- <param><type>VkImage</type> <name>dstImage</name></param>
- <param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
- <param><type>uint32_t</type> <name>regionCount</name></param>
- <param len="regionCount">const <type>VkImageResolve</type>* <name>pRegions</name></param>
- </command>
- <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetEvent</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkEvent</type> <name>event</name></param>
- <param><type>VkPipelineStageFlags</type> <name>stageMask</name></param>
- </command>
- <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdResetEvent</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkEvent</type> <name>event</name></param>
- <param><type>VkPipelineStageFlags</type> <name>stageMask</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdWaitEvents</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>eventCount</name></param>
- <param len="eventCount">const <type>VkEvent</type>* <name>pEvents</name></param>
- <param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param>
- <param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param>
- <param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param>
- <param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param>
- <param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param>
- <param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param>
- <param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param>
- <param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdPipelineBarrier</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param>
- <param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param>
- <param optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></param>
- <param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param>
- <param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param>
- <param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param>
- <param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param>
- <param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param>
- <param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdBeginQuery</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkQueryPool</type> <name>queryPool</name></param>
- <param><type>uint32_t</type> <name>query</name></param>
- <param optional="true"><type>VkQueryControlFlags</type> <name>flags</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdEndQuery</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkQueryPool</type> <name>queryPool</name></param>
- <param><type>uint32_t</type> <name>query</name></param>
- </command>
- <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdResetQueryPool</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkQueryPool</type> <name>queryPool</name></param>
- <param><type>uint32_t</type> <name>firstQuery</name></param>
- <param><type>uint32_t</type> <name>queryCount</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdWriteTimestamp</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkPipelineStageFlagBits</type> <name>pipelineStage</name></param>
- <param><type>VkQueryPool</type> <name>queryPool</name></param>
- <param><type>uint32_t</type> <name>query</name></param>
- </command>
- <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
- <proto><type>void</type> <name>vkCmdCopyQueryPoolResults</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkQueryPool</type> <name>queryPool</name></param>
- <param><type>uint32_t</type> <name>firstQuery</name></param>
- <param><type>uint32_t</type> <name>queryCount</name></param>
- <param><type>VkBuffer</type> <name>dstBuffer</name></param>
- <param><type>VkDeviceSize</type> <name>dstOffset</name></param>
- <param><type>VkDeviceSize</type> <name>stride</name></param>
- <param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdPushConstants</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkPipelineLayout</type> <name>layout</name></param>
- <param><type>VkShaderStageFlags</type> <name>stageFlags</name></param>
- <param><type>uint32_t</type> <name>offset</name></param>
- <param><type>uint32_t</type> <name>size</name></param>
- <param len="size">const <type>void</type>* <name>pValues</name></param>
- </command>
- <command queues="graphics" renderpass="outside" cmdbufferlevel="primary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdBeginRenderPass</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param>const <type>VkRenderPassBeginInfo</type>* <name>pRenderPassBegin</name></param>
- <param><type>VkSubpassContents</type> <name>contents</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdNextSubpass</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkSubpassContents</type> <name>contents</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdEndRenderPass</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- </command>
- <command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary">
- <proto><type>void</type> <name>vkCmdExecuteCommands</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>commandBufferCount</name></param>
- <param len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
- <proto><type>VkResult</type> <name>vkCreateAndroidSurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkAndroidSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPropertiesKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkDisplayPropertiesKHR</type>* <name>pProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPlanePropertiesKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkDisplayPlanePropertiesKHR</type>* <name>pProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetDisplayPlaneSupportedDisplaysKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>planeIndex</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pDisplayCount</name></param>
- <param optional="true" len="pDisplayCount"><type>VkDisplayKHR</type>* <name>pDisplays</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetDisplayModePropertiesKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkDisplayKHR</type> <name>display</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkDisplayModePropertiesKHR</type>* <name>pProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
- <proto><type>VkResult</type> <name>vkCreateDisplayModeKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param externsync="true"><type>VkDisplayKHR</type> <name>display</name></param>
- <param>const <type>VkDisplayModeCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDisplayModeKHR</type>* <name>pMode</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetDisplayPlaneCapabilitiesKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param externsync="true"><type>VkDisplayModeKHR</type> <name>mode</name></param>
- <param><type>uint32_t</type> <name>planeIndex</name></param>
- <param><type>VkDisplayPlaneCapabilitiesKHR</type>* <name>pCapabilities</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateDisplayPlaneSurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkDisplaySurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INCOMPATIBLE_DISPLAY_KHR,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkCreateSharedSwapchainsKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>swapchainCount</name></param>
- <param len="swapchainCount" externsync="pCreateInfos[].surface,pCreateInfos[].oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfos</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param len="swapchainCount"><type>VkSwapchainKHR</type>* <name>pSwapchains</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateMirSurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkMirSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command>
- <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceMirPresentationSupportKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- <param><type>MirConnection</type>* <name>connection</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroySurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param optional="true" externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceSupportKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- <param><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param><type>VkBool32</type>* <name>pSupported</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param><type>VkSurfaceCapabilitiesKHR</type>* <name>pSurfaceCapabilities</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceFormatsKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pSurfaceFormatCount</name></param>
- <param optional="true" len="pSurfaceFormatCount"><type>VkSurfaceFormatKHR</type>* <name>pSurfaceFormats</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModesKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param>
- <param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
- <proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="pCreateInfo.surface,pCreateInfo.oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSwapchainKHR</type>* <name>pSwapchain</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroySwapchainKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetSwapchainImagesKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pSwapchainImageCount</name></param>
- <param optional="true" len="pSwapchainImageCount"><type>VkImage</type>* <name>pSwapchainImages</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkAcquireNextImageKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- <param><type>uint64_t</type> <name>timeout</name></param>
- <param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param>
- <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
- <param><type>uint32_t</type>* <name>pImageIndex</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto>
- <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
- <param externsync="pPresentInfo.pWaitSemaphores[],pPresentInfo.pSwapchains[]">const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
- <proto><type>VkResult</type> <name>vkCreateViSurfaceNN</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkViSurfaceCreateInfoNN</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateWaylandSurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkWaylandSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command>
- <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWaylandPresentationSupportKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- <param>struct <type>wl_display</type>* <name>display</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateWin32SurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkWin32SurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command>
- <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWin32PresentationSupportKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateXlibSurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkXlibSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command>
- <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXlibPresentationSupportKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- <param><type>Display</type>* <name>dpy</name></param>
- <param><type>VisualID</type> <name>visualID</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateXcbSurfaceKHR</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkXcbSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command>
- <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXcbPresentationSupportKHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
- <param><type>xcb_connection_t</type>* <name>connection</name></param>
- <param><type>xcb_visualid_t</type> <name>visual_id</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkDebugReportCallbackCreateInfoEXT</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDebugReportCallbackEXT</type>* <name>pCallback</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyDebugReportCallbackEXT</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param externsync="true"><type>VkDebugReportCallbackEXT</type> <name>callback</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDebugReportMessageEXT</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param><type>VkDebugReportFlagsEXT</type> <name>flags</name></param>
- <param><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></param>
- <param><type>uint64_t</type> <name>object</name></param>
- <param><type>size_t</type> <name>location</name></param>
- <param><type>int32_t</type> <name>messageCode</name></param>
- <param len="null-terminated">const <type>char</type>* <name>pLayerPrefix</name></param>
- <param len="null-terminated">const <type>char</type>* <name>pMessage</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkDebugMarkerSetObjectNameEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="pNameInfo.object"><type>VkDebugMarkerObjectNameInfoEXT</type>* <name>pNameInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkDebugMarkerSetObjectTagEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="pTagInfo.object"><type>VkDebugMarkerObjectTagInfoEXT</type>* <name>pTagInfo</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdDebugMarkerBeginEXT</name></proto>
- <param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkDebugMarkerMarkerInfoEXT</type>* <name>pMarkerInfo</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdDebugMarkerEndEXT</name></proto>
- <param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdDebugMarkerInsertEXT</name></proto>
- <param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkDebugMarkerMarkerInfoEXT</type>* <name>pMarkerInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceExternalImageFormatPropertiesNV</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkFormat</type> <name>format</name></param>
- <param><type>VkImageType</type> <name>type</name></param>
- <param><type>VkImageTiling</type> <name>tiling</name></param>
- <param><type>VkImageUsageFlags</type> <name>usage</name></param>
- <param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param>
- <param optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>externalHandleType</name></param>
- <param><type>VkExternalImageFormatPropertiesNV</type>* <name>pExternalImageFormatProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
- <proto><type>VkResult</type> <name>vkGetMemoryWin32HandleNV</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleType</name></param>
- <param><type>HANDLE</type>* <name>pHandle</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdDrawIndirectCountAMD</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- <param><type>VkBuffer</type> <name>countBuffer</name></param>
- <param><type>VkDeviceSize</type> <name>countBufferOffset</name></param>
- <param><type>uint32_t</type> <name>maxDrawCount</name></param>
- <param><type>uint32_t</type> <name>stride</name></param>
- </command>
- <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
- <proto><type>void</type> <name>vkCmdDrawIndexedIndirectCountAMD</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkBuffer</type> <name>buffer</name></param>
- <param><type>VkDeviceSize</type> <name>offset</name></param>
- <param><type>VkBuffer</type> <name>countBuffer</name></param>
- <param><type>VkDeviceSize</type> <name>countBufferOffset</name></param>
- <param><type>uint32_t</type> <name>maxDrawCount</name></param>
- <param><type>uint32_t</type> <name>stride</name></param>
- </command>
- <command queues="graphics,compute" renderpass="inside" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdProcessCommandsNVX</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param>const <type>VkCmdProcessCommandsInfoNVX</type>* <name>pProcessCommandsInfo</name></param>
- </command>
- <command queues="graphics,compute" renderpass="inside" cmdbufferlevel="secondary">
- <proto><type>void</type> <name>vkCmdReserveSpaceForCommandsNVX</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param>const <type>VkCmdReserveSpaceForCommandsInfoNVX</type>* <name>pReserveSpaceInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateIndirectCommandsLayoutNVX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkIndirectCommandsLayoutCreateInfoNVX</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkIndirectCommandsLayoutNVX</type>* <name>pIndirectCommandsLayout</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyIndirectCommandsLayoutNVX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkIndirectCommandsLayoutNVX</type> <name>indirectCommandsLayout</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateObjectTableNVX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkObjectTableCreateInfoNVX</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkObjectTableNVX</type>* <name>pObjectTable</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyObjectTableNVX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkRegisterObjectsNVX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></param>
- <param><type>uint32_t</type> <name>objectCount</name></param>
- <param len="objectCount">const <type>VkObjectTableEntryNVX</type>* const* <name>ppObjectTableEntries</name></param>
- <param len="objectCount">const <type>uint32_t</type>* <name>pObjectIndices</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkUnregisterObjectsNVX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkObjectTableNVX</type> <name>objectTable</name></param>
- <param><type>uint32_t</type> <name>objectCount</name></param>
- <param len="objectCount">const <type>VkObjectEntryTypeNVX</type>* <name>pObjectEntryTypes</name></param>
- <param len="objectCount">const <type>uint32_t</type>* <name>pObjectIndices</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkDeviceGeneratedCommandsFeaturesNVX</type>* <name>pFeatures</name></param>
- <param><type>VkDeviceGeneratedCommandsLimitsNVX</type>* <name>pLimits</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceFeatures2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkPhysicalDeviceFeatures2KHR</type>* <name>pFeatures</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceProperties2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkPhysicalDeviceProperties2KHR</type>* <name>pProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkFormat</type> <name>format</name></param>
- <param><type>VkFormatProperties2KHR</type>* <name>pFormatProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkPhysicalDeviceImageFormatInfo2KHR</type>* <name>pImageFormatInfo</name></param>
- <param><type>VkImageFormatProperties2KHR</type>* <name>pImageFormatProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param>
- <param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties2KHR</type>* <name>pQueueFamilyProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkPhysicalDeviceMemoryProperties2KHR</type>* <name>pMemoryProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkPhysicalDeviceSparseImageFormatInfo2KHR</type>* <name>pFormatInfo</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
- <param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties2KHR</type>* <name>pProperties</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdPushDescriptorSetKHR</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
- <param><type>VkPipelineLayout</type> <name>layout</name></param>
- <param><type>uint32_t</type> <name>set</name></param>
- <param><type>uint32_t</type> <name>descriptorWriteCount</name></param>
- <param len="descriptorWriteCount">const <type>VkWriteDescriptorSet</type>* <name>pDescriptorWrites</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkTrimCommandPoolKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
- <param optional="true"><type>VkCommandPoolTrimFlagsKHR</type> <name>flags</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceExternalBufferPropertiesKHX</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkPhysicalDeviceExternalBufferInfoKHX</type>* <name>pExternalBufferInfo</name></param>
- <param><type>VkExternalBufferPropertiesKHX</type>* <name>pExternalBufferProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
- <proto><type>VkResult</type> <name>vkGetMemoryWin32HandleKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></param>
- <param><type>HANDLE</type>* <name>pHandle</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX">
- <proto><type>VkResult</type> <name>vkGetMemoryWin32HandlePropertiesKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></param>
- <param><type>HANDLE</type> <name>handle</name></param>
- <param><type>VkMemoryWin32HandlePropertiesKHX</type>* <name>pMemoryWin32HandleProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
- <proto><type>VkResult</type> <name>vkGetMemoryFdKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDeviceMemory</type> <name>memory</name></param>
- <param><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></param>
- <param><type>int</type>* <name>pFd</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX">
- <proto><type>VkResult</type> <name>vkGetMemoryFdPropertiesKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkExternalMemoryHandleTypeFlagBitsKHX</type> <name>handleType</name></param>
- <param><type>int</type> <name>fd</name></param>
- <param><type>VkMemoryFdPropertiesKHX</type>* <name>pMemoryFdProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetPhysicalDeviceExternalSemaphorePropertiesKHX</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkPhysicalDeviceExternalSemaphoreInfoKHX</type>* <name>pExternalSemaphoreInfo</name></param>
- <param><type>VkExternalSemaphorePropertiesKHX</type>* <name>pExternalSemaphoreProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
- <proto><type>VkResult</type> <name>vkGetSemaphoreWin32HandleKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkSemaphore</type> <name>semaphore</name></param>
- <param><type>VkExternalSemaphoreHandleTypeFlagBitsKHX</type> <name>handleType</name></param>
- <param><type>HANDLE</type>* <name>pHandle</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX">
- <proto><type>VkResult</type> <name>vkImportSemaphoreWin32HandleKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkImportSemaphoreWin32HandleInfoKHX</type>* <name>pImportSemaphoreWin32HandleInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
- <proto><type>VkResult</type> <name>vkGetSemaphoreFdKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkSemaphore</type> <name>semaphore</name></param>
- <param><type>VkExternalSemaphoreHandleTypeFlagBitsKHX</type> <name>handleType</name></param>
- <param><type>int</type>* <name>pFd</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX">
- <proto><type>VkResult</type> <name>vkImportSemaphoreFdKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkImportSemaphoreFdInfoKHX</type>* <name>pImportSemaphoreFdInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS">
- <proto><type>VkResult</type> <name>vkReleaseDisplayEXT</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkDisplayKHR</type> <name>display</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_INITIALIZATION_FAILED">
- <proto><type>VkResult</type> <name>vkAcquireXlibDisplayEXT</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>Display</type>* <name>dpy</name></param>
- <param><type>VkDisplayKHR</type> <name>display</name></param>
- </command>
- <command successcodes="VK_SUCCESS">
- <proto><type>VkResult</type> <name>vkGetRandROutputDisplayEXT</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>Display</type>* <name>dpy</name></param>
- <param><type>RROutput</type> <name>rrOutput</name></param>
- <param><type>VkDisplayKHR</type>* <name>pDisplay</name></param>
- </command>
- <command successcodes="VK_SUCCESS">
- <proto><type>VkResult</type> <name>vkDisplayPowerControlEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDisplayKHR</type> <name>display</name></param>
- <param>const <type>VkDisplayPowerInfoEXT</type>* <name>pDisplayPowerInfo</name></param>
- </command>
- <command successcodes="VK_SUCCESS">
- <proto><type>VkResult</type> <name>vkRegisterDeviceEventEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkDeviceEventInfoEXT</type>* <name>pDeviceEventInfo</name></param>
- <param>const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkFence</type>* <name>pFence</name></param>
- </command>
- <command successcodes="VK_SUCCESS">
- <proto><type>VkResult</type> <name>vkRegisterDisplayEventEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDisplayKHR</type> <name>display</name></param>
- <param>const <type>VkDisplayEventInfoEXT</type>* <name>pDisplayEventInfo</name></param>
- <param>const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkFence</type>* <name>pFence</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR">
- <proto><type>VkResult</type> <name>vkGetSwapchainCounterEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- <param><type>VkSurfaceCounterFlagBitsEXT</type> <name>counter</name></param>
- <param><type>uint64_t</type>* <name>pCounterValue</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilities2EXT</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param><type>VkSurfaceCapabilities2EXT</type>* <name>pSurfaceCapabilities</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
- <proto><type>VkResult</type> <name>vkEnumeratePhysicalDeviceGroupsKHX</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPhysicalDeviceGroupCount</name></param>
- <param optional="true" len="pPhysicalDeviceGroupCount"><type>VkPhysicalDeviceGroupPropertiesKHX</type>* <name>pPhysicalDeviceGroupProperties</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkGetDeviceGroupPeerMemoryFeaturesKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>heapIndex</name></param>
- <param><type>uint32_t</type> <name>localDeviceIndex</name></param>
- <param><type>uint32_t</type> <name>remoteDeviceIndex</name></param>
- <param><type>VkPeerMemoryFeatureFlagsKHX</type>* <name>pPeerMemoryFeatures</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkBindBufferMemory2KHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>bindInfoCount</name></param>
- <param len="bindInfoCount">const <type>VkBindBufferMemoryInfoKHX</type>* <name>pBindInfos</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkBindImageMemory2KHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>bindInfoCount</name></param>
- <param len="bindInfoCount">const <type>VkBindImageMemoryInfoKHX</type>* <name>pBindInfos</name></param>
- </command>
- <command queues="graphics,compute,transfer" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetDeviceMaskKHX</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>deviceMask</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetDeviceGroupPresentCapabilitiesKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>VkDeviceGroupPresentCapabilitiesKHX</type>* <name>pDeviceGroupPresentCapabilities</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetDeviceGroupSurfacePresentModesKHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param><type>VkDeviceGroupPresentModeFlagsKHX</type>* <name>pModes</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkAcquireNextImage2KHX</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkAcquireNextImageInfoKHX</type>* <name>pAcquireInfo</name></param>
- <param><type>uint32_t</type>* <name>pImageIndex</name></param>
- </command>
- <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdDispatchBaseKHX</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>baseGroupX</name></param>
- <param><type>uint32_t</type> <name>baseGroupY</name></param>
- <param><type>uint32_t</type> <name>baseGroupZ</name></param>
- <param><type>uint32_t</type> <name>groupCountX</name></param>
- <param><type>uint32_t</type> <name>groupCountY</name></param>
- <param><type>uint32_t</type> <name>groupCountZ</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkGetPhysicalDevicePresentRectanglesKHX</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pRectCount</name></param>
- <param optional="true" len="pRectCount"><type>VkRect2D</type>* <name>pRects</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
- <proto><type>VkResult</type> <name>vkCreateDescriptorUpdateTemplateKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param>const <type>VkDescriptorUpdateTemplateCreateInfoKHR</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkDescriptorUpdateTemplateKHR</type>* <name>pDescriptorUpdateTemplate</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkDestroyDescriptorUpdateTemplateKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param optional="true" externsync="true"><type>VkDescriptorUpdateTemplateKHR</type> <name>descriptorUpdateTemplate</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkUpdateDescriptorSetWithTemplateKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkDescriptorSet</type> <name>descriptorSet</name></param>
- <param><type>VkDescriptorUpdateTemplateKHR</type> <name>descriptorUpdateTemplate</name></param>
- <param>const <type>void</type>* <name>pData</name></param>
- </command>
- <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdPushDescriptorSetWithTemplateKHR</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>VkDescriptorUpdateTemplateKHR</type> <name>descriptorUpdateTemplate</name></param>
- <param><type>VkPipelineLayout</type> <name>layout</name></param>
- <param><type>uint32_t</type> <name>set</name></param>
- <param>const <type>void</type>* <name>pData</name></param>
- </command>
- <command>
- <proto><type>void</type> <name>vkSetHdrMetadataEXT</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param><type>uint32_t</type> <name>swapchainCount</name></param> <!-- Number of swap chains to update in this call -->
- <param len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></param> <!-- Swapchains to present an image from -->
- <param len="swapchainCount">const <type>VkHdrMetadataEXT</type>* <name>pMetadata</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetSwapchainStatusKHR</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetRefreshCycleDurationGOOGLE</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- <param><type>VkRefreshCycleDurationGOOGLE</type>* <name>pDisplayTimingProperties</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPastPresentationTimingGOOGLE</name></proto>
- <param><type>VkDevice</type> <name>device</name></param>
- <param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pPresentationTimingCount</name></param>
- <param optional="true" len="pPresentationTimingCount"><type>VkPastPresentationTimingGOOGLE</type>* <name>pPresentationTimings</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
- <proto><type>VkResult</type> <name>vkCreateIOSSurfaceMVK</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkIOSSurfaceCreateInfoMVK</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
- <proto><type>VkResult</type> <name>vkCreateMacOSSurfaceMVK</name></proto>
- <param><type>VkInstance</type> <name>instance</name></param>
- <param>const <type>VkMacOSSurfaceCreateInfoMVK</type>* <name>pCreateInfo</name></param>
- <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
- <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetViewportWScalingNV</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>firstViewport</name></param>
- <param><type>uint32_t</type> <name>viewportCount</name></param>
- <param len="viewportCount" noautovalidity="true">const <type>VkViewportWScalingNV</type>* <name>pViewportWScalings</name></param>
- </command>
- <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
- <proto><type>void</type> <name>vkCmdSetDiscardRectangleEXT</name></proto>
- <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
- <param><type>uint32_t</type> <name>firstDiscardRectangle</name></param>
- <param><type>uint32_t</type> <name>discardRectangleCount</name></param>
- <param len="discardRectangleCount">const <type>VkRect2D</type>* <name>pDiscardRectangles</name></param>
- </command>
- <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilities2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
- <param><type>VkSurfaceCapabilities2KHR</type>* <name>pSurfaceCapabilities</name></param>
- </command>
- <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
- <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceFormats2KHR</name></proto>
- <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
- <param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
- <param optional="false,true"><type>uint32_t</type>* <name>pSurfaceFormatCount</name></param>
- <param optional="true" len="pSurfaceFormatCount"><type>VkSurfaceFormat2KHR</type>* <name>pSurfaceFormats</name></param>
- </command>
- </commands>
-
- <!-- SECTION: Vulkan API interface definitions -->
- <feature api="vulkan" name="VK_VERSION_1_0" number="1.0">
- <require comment="Header boilerplate">
- <type name="vk_platform"/>
- </require>
- <require comment="API version">
- <type name="VK_API_VERSION"/>
- <type name="VK_API_VERSION_1_0"/>
- <type name="VK_VERSION_MAJOR"/>
- <type name="VK_VERSION_MINOR"/>
- <type name="VK_VERSION_PATCH"/>
- <type name="VK_HEADER_VERSION"/>
- </require>
- <require comment="API constants">
- <enum name="VK_LOD_CLAMP_NONE"/>
- <enum name="VK_REMAINING_MIP_LEVELS"/>
- <enum name="VK_REMAINING_ARRAY_LAYERS"/>
- <enum name="VK_WHOLE_SIZE"/>
- <enum name="VK_ATTACHMENT_UNUSED"/>
- <enum name="VK_TRUE"/>
- <enum name="VK_FALSE"/>
- <type name="VK_NULL_HANDLE"/>
- <enum name="VK_QUEUE_FAMILY_IGNORED"/>
- <enum name="VK_SUBPASS_EXTERNAL"/>
- <type name="VkPipelineCacheHeaderVersion"/>
- </require>
- <require comment="Device initialization">
- <command name="vkCreateInstance"/>
- <command name="vkDestroyInstance"/>
- <command name="vkEnumeratePhysicalDevices"/>
- <command name="vkGetPhysicalDeviceFeatures"/>
- <command name="vkGetPhysicalDeviceFormatProperties"/>
- <command name="vkGetPhysicalDeviceImageFormatProperties"/>
- <command name="vkGetPhysicalDeviceProperties"/>
- <command name="vkGetPhysicalDeviceQueueFamilyProperties"/>
- <command name="vkGetPhysicalDeviceMemoryProperties"/>
- <command name="vkGetInstanceProcAddr"/>
- <command name="vkGetDeviceProcAddr"/>
- </require>
- <require comment="Device commands">
- <command name="vkCreateDevice"/>
- <command name="vkDestroyDevice"/>
- </require>
- <require comment="Extension discovery commands">
- <command name="vkEnumerateInstanceExtensionProperties"/>
- <command name="vkEnumerateDeviceExtensionProperties"/>
- </require>
- <require comment="Layer discovery commands">
- <command name="vkEnumerateInstanceLayerProperties"/>
- <command name="vkEnumerateDeviceLayerProperties"/>
- </require>
- <require comment="queue commands">
- <command name="vkGetDeviceQueue"/>
- <command name="vkQueueSubmit"/>
- <command name="vkQueueWaitIdle"/>
- <command name="vkDeviceWaitIdle"/>
- </require>
- <require comment="Memory commands">
- <command name="vkAllocateMemory"/>
- <command name="vkFreeMemory"/>
- <command name="vkMapMemory"/>
- <command name="vkUnmapMemory"/>
- <command name="vkFlushMappedMemoryRanges"/>
- <command name="vkInvalidateMappedMemoryRanges"/>
- <command name="vkGetDeviceMemoryCommitment"/>
- </require>
- <require comment="Memory management API commands">
- <command name="vkBindBufferMemory"/>
- <command name="vkBindImageMemory"/>
- <command name="vkGetBufferMemoryRequirements"/>
- <command name="vkGetImageMemoryRequirements"/>
- </require>
- <require comment="Sparse resource memory management API commands">
- <command name="vkGetImageSparseMemoryRequirements"/>
- <command name="vkGetPhysicalDeviceSparseImageFormatProperties"/>
- <command name="vkQueueBindSparse"/>
- </require>
- <require comment="Fence commands">
- <command name="vkCreateFence"/>
- <command name="vkDestroyFence"/>
- <command name="vkResetFences"/>
- <command name="vkGetFenceStatus"/>
- <command name="vkWaitForFences"/>
- </require>
- <require comment="Queue semaphore commands">
- <command name="vkCreateSemaphore"/>
- <command name="vkDestroySemaphore"/>
- </require>
- <require comment="Event commands">
- <command name="vkCreateEvent"/>
- <command name="vkDestroyEvent"/>
- <command name="vkGetEventStatus"/>
- <command name="vkSetEvent"/>
- <command name="vkResetEvent"/>
- </require>
- <require comment="Query commands">
- <command name="vkCreateQueryPool"/>
- <command name="vkDestroyQueryPool"/>
- <command name="vkGetQueryPoolResults"/>
- </require>
- <require comment="Buffer commands">
- <command name="vkCreateBuffer"/>
- <command name="vkDestroyBuffer"/>
- </require>
- <require comment="Buffer view commands">
- <command name="vkCreateBufferView"/>
- <command name="vkDestroyBufferView"/>
- </require>
- <require comment="Image commands">
- <command name="vkCreateImage"/>
- <command name="vkDestroyImage"/>
- <command name="vkGetImageSubresourceLayout"/>
- </require>
- <require comment="Image view commands">
- <command name="vkCreateImageView"/>
- <command name="vkDestroyImageView"/>
- </require>
- <require comment="Shader commands">
- <command name="vkCreateShaderModule"/>
- <command name="vkDestroyShaderModule"/>
- </require>
- <require comment="Pipeline Cache commands">
- <command name="vkCreatePipelineCache"/>
- <command name="vkDestroyPipelineCache"/>
- <command name="vkGetPipelineCacheData"/>
- <command name="vkMergePipelineCaches"/>
- </require>
- <require comment="Pipeline commands">
- <command name="vkCreateGraphicsPipelines"/>
- <command name="vkCreateComputePipelines"/>
- <command name="vkDestroyPipeline"/>
- </require>
- <require comment="Pipeline layout commands">
- <command name="vkCreatePipelineLayout"/>
- <command name="vkDestroyPipelineLayout"/>
- </require>
- <require comment="Sampler commands">
- <command name="vkCreateSampler"/>
- <command name="vkDestroySampler"/>
- </require>
- <require comment="Descriptor set commands">
- <command name="vkCreateDescriptorSetLayout"/>
- <command name="vkDestroyDescriptorSetLayout"/>
- <command name="vkCreateDescriptorPool"/>
- <command name="vkDestroyDescriptorPool"/>
- <command name="vkResetDescriptorPool"/>
- <command name="vkAllocateDescriptorSets"/>
- <command name="vkFreeDescriptorSets"/>
- <command name="vkUpdateDescriptorSets"/>
- </require>
- <require comment="Pass commands">
- <command name="vkCreateFramebuffer"/>
- <command name="vkDestroyFramebuffer"/>
- <command name="vkCreateRenderPass"/>
- <command name="vkDestroyRenderPass"/>
- <command name="vkGetRenderAreaGranularity"/>
- </require>
- <require comment="Command pool commands">
- <command name="vkCreateCommandPool"/>
- <command name="vkDestroyCommandPool"/>
- <command name="vkResetCommandPool"/>
- </require>
- <require comment="Command buffer commands">
- <command name="vkAllocateCommandBuffers"/>
- <command name="vkFreeCommandBuffers"/>
- <command name="vkBeginCommandBuffer"/>
- <command name="vkEndCommandBuffer"/>
- <command name="vkResetCommandBuffer"/>
- </require>
- <require comment="Command buffer building commands">
- <command name="vkCmdBindPipeline"/>
- <command name="vkCmdSetViewport"/>
- <command name="vkCmdSetScissor"/>
- <command name="vkCmdSetLineWidth"/>
- <command name="vkCmdSetDepthBias"/>
- <command name="vkCmdSetBlendConstants"/>
- <command name="vkCmdSetDepthBounds"/>
- <command name="vkCmdSetStencilCompareMask"/>
- <command name="vkCmdSetStencilWriteMask"/>
- <command name="vkCmdSetStencilReference"/>
- <command name="vkCmdBindDescriptorSets"/>
- <command name="vkCmdBindIndexBuffer"/>
- <command name="vkCmdBindVertexBuffers"/>
- <command name="vkCmdDraw"/>
- <command name="vkCmdDrawIndexed"/>
- <command name="vkCmdDrawIndirect"/>
- <command name="vkCmdDrawIndexedIndirect"/>
- <command name="vkCmdDispatch"/>
- <command name="vkCmdDispatchIndirect"/>
- <command name="vkCmdCopyBuffer"/>
- <command name="vkCmdCopyImage"/>
- <command name="vkCmdBlitImage"/>
- <command name="vkCmdCopyBufferToImage"/>
- <command name="vkCmdCopyImageToBuffer"/>
- <command name="vkCmdUpdateBuffer"/>
- <command name="vkCmdFillBuffer"/>
- <command name="vkCmdClearColorImage"/>
- <command name="vkCmdClearDepthStencilImage"/>
- <command name="vkCmdClearAttachments"/>
- <command name="vkCmdResolveImage"/>
- <command name="vkCmdSetEvent"/>
- <command name="vkCmdResetEvent"/>
- <command name="vkCmdWaitEvents"/>
- <command name="vkCmdPipelineBarrier"/>
- <command name="vkCmdBeginQuery"/>
- <command name="vkCmdEndQuery"/>
- <command name="vkCmdResetQueryPool"/>
- <command name="vkCmdWriteTimestamp"/>
- <command name="vkCmdCopyQueryPoolResults"/>
- <command name="vkCmdPushConstants"/>
- <command name="vkCmdBeginRenderPass"/>
- <command name="vkCmdNextSubpass"/>
- <command name="vkCmdEndRenderPass"/>
- <command name="vkCmdExecuteCommands"/>
- </require>
- <require comment="Types not directly used by the API">
- <!-- Include <type name="typename"/> here for e.g. structs that
- are not parameter types of commands, but still need to be
- defined in the API.
- -->
- <type name="VkBufferMemoryBarrier"/>
- <type name="VkDispatchIndirectCommand"/>
- <type name="VkDrawIndexedIndirectCommand"/>
- <type name="VkDrawIndirectCommand"/>
- <type name="VkImageMemoryBarrier"/>
- <type name="VkMemoryBarrier"/>
- <type name="VkObjectType"/>
- </require>
- </feature>
-
- <!-- SECTION: Vulkan extension interface definitions -->
- <extensions>
- <!-- WSI extensions -->
- <extension name="VK_KHR_surface" number="1" type="instance" supported="vulkan">
- <require>
- <enum value="25" name="VK_KHR_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_surface"" name="VK_KHR_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_SURFACE_LOST_KHR"/>
- <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"/>
- <enum value="VK_COLOR_SPACE_SRGB_NONLINEAR_KHR" name="VK_COLORSPACE_SRGB_NONLINEAR_KHR"/>
- <enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_SURFACE_KHR" comment="VkSurfaceKHR"/>
- <command name="vkDestroySurfaceKHR"/>
- <command name="vkGetPhysicalDeviceSurfaceSupportKHR"/>
- <command name="vkGetPhysicalDeviceSurfaceCapabilitiesKHR"/>
- <command name="vkGetPhysicalDeviceSurfaceFormatsKHR"/>
- <command name="vkGetPhysicalDeviceSurfacePresentModesKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_swapchain" number="2" type="device" requires="VK_KHR_surface" supported="vulkan">
- <require>
- <enum value="68" name="VK_KHR_SWAPCHAIN_SPEC_VERSION"/>
- <enum value=""VK_KHR_swapchain"" name="VK_KHR_SWAPCHAIN_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"/>
- <enum offset="2" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_PRESENT_SRC_KHR"/>
- <enum offset="3" extends="VkResult" name="VK_SUBOPTIMAL_KHR"/>
- <enum offset="4" dir="-" extends="VkResult" name="VK_ERROR_OUT_OF_DATE_KHR"/>
- <enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_SWAPCHAIN_KHR" comment="VkSwapchainKHR"/>
- <command name="vkCreateSwapchainKHR"/>
- <command name="vkDestroySwapchainKHR"/>
- <command name="vkGetSwapchainImagesKHR"/>
- <command name="vkAcquireNextImageKHR"/>
- <command name="vkQueuePresentKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_display" number="3" type="instance" requires="VK_KHR_surface" supported="vulkan">
- <require>
- <enum value="21" name="VK_KHR_DISPLAY_SPEC_VERSION"/>
- <enum value=""VK_KHR_display"" name="VK_KHR_DISPLAY_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"/>
- <enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DISPLAY_KHR" comment="VkDisplayKHR"/>
- <enum offset="1" extends="VkObjectType" name="VK_OBJECT_TYPE_DISPLAY_MODE_KHR" comment="VkDisplayModeKHR"/>
- <type name="VkDisplayPlaneAlphaFlagsKHR"/>
- <type name="VkDisplayPlaneAlphaFlagBitsKHR"/>
- <type name="VkDisplayPropertiesKHR"/>
- <type name="VkDisplayModeParametersKHR"/>
- <type name="VkDisplayModePropertiesKHR"/>
- <type name="VkDisplayModeCreateInfoKHR"/>
- <type name="VkDisplayPlaneCapabilitiesKHR"/>
- <type name="VkDisplayPlanePropertiesKHR"/>
- <type name="VkDisplaySurfaceCreateInfoKHR"/>
- <command name="vkGetPhysicalDeviceDisplayPropertiesKHR"/>
- <command name="vkGetPhysicalDeviceDisplayPlanePropertiesKHR"/>
- <command name="vkGetDisplayPlaneSupportedDisplaysKHR"/>
- <command name="vkGetDisplayModePropertiesKHR"/>
- <command name="vkCreateDisplayModeKHR"/>
- <command name="vkGetDisplayPlaneCapabilitiesKHR"/>
- <command name="vkCreateDisplayPlaneSurfaceKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_display_swapchain" number="4" type="device" requires="VK_KHR_swapchain,VK_KHR_display" supported="vulkan">
- <require>
- <enum value="9" name="VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION"/>
- <enum value=""VK_KHR_display_swapchain"" name="VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"/>
- <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"/>
- <type name="VkDisplayPresentInfoKHR"/>
- <command name="vkCreateSharedSwapchainsKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_xlib_surface" number="5" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_XLIB_KHR" supported="vulkan">
- <require>
- <enum value="6" name="VK_KHR_XLIB_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_xlib_surface"" name="VK_KHR_XLIB_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"/>
- <type name="VkXlibSurfaceCreateFlagsKHR"/>
- <type name="VkXlibSurfaceCreateInfoKHR"/>
- <command name="vkCreateXlibSurfaceKHR"/>
- <command name="vkGetPhysicalDeviceXlibPresentationSupportKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_xcb_surface" number="6" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_XCB_KHR" supported="vulkan">
- <require>
- <enum value="6" name="VK_KHR_XCB_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_xcb_surface"" name="VK_KHR_XCB_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"/>
- <type name="VkXcbSurfaceCreateFlagsKHR"/>
- <type name="VkXcbSurfaceCreateInfoKHR"/>
- <command name="vkCreateXcbSurfaceKHR"/>
- <command name="vkGetPhysicalDeviceXcbPresentationSupportKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_wayland_surface" number="7" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_WAYLAND_KHR" supported="vulkan">
- <require>
- <enum value="6" name="VK_KHR_WAYLAND_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_wayland_surface"" name="VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"/>
- <type name="VkWaylandSurfaceCreateFlagsKHR"/>
- <type name="VkWaylandSurfaceCreateInfoKHR"/>
- <command name="vkCreateWaylandSurfaceKHR"/>
- <command name="vkGetPhysicalDeviceWaylandPresentationSupportKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_mir_surface" number="8" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_MIR_KHR" supported="vulkan">
- <require>
- <enum value="4" name="VK_KHR_MIR_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_mir_surface"" name="VK_KHR_MIR_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR"/>
- <type name="VkMirSurfaceCreateFlagsKHR"/>
- <type name="VkMirSurfaceCreateInfoKHR"/>
- <command name="vkCreateMirSurfaceKHR"/>
- <command name="vkGetPhysicalDeviceMirPresentationSupportKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_android_surface" number="9" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_ANDROID_KHR" supported="vulkan">
- <require>
- <enum value="6" name="VK_KHR_ANDROID_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_android_surface"" name="VK_KHR_ANDROID_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"/>
- <type name="VkAndroidSurfaceCreateFlagsKHR"/>
- <type name="VkAndroidSurfaceCreateInfoKHR"/>
- <command name="vkCreateAndroidSurfaceKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_win32_surface" number="10" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan">
- <require>
- <enum value="6" name="VK_KHR_WIN32_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_KHR_win32_surface"" name="VK_KHR_WIN32_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"/>
- <type name="VkWin32SurfaceCreateFlagsKHR"/>
- <type name="VkWin32SurfaceCreateInfoKHR"/>
- <command name="vkCreateWin32SurfaceKHR"/>
- <command name="vkGetPhysicalDeviceWin32PresentationSupportKHR"/>
- </require>
- </extension>
- <extension name="VK_ANDROID_native_buffer" number="11" supported="disabled">
- <require>
- <enum value="4" name="VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION"/>
- <enum value="11" name="VK_ANDROID_NATIVE_BUFFER_NUMBER"/>
- <enum value=""VK_ANDROID_native_buffer"" name="VK_ANDROID_NATIVE_BUFFER_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_debug_report" number="12" type="instance" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtney" supported="vulkan">
- <require>
- <enum value="8" name="VK_EXT_DEBUG_REPORT_SPEC_VERSION"/>
- <enum value=""VK_EXT_debug_report"" name="VK_EXT_DEBUG_REPORT_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"/>
- <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_VALIDATION_FAILED_EXT"/>
- <enum value="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT"/>
- <enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT" comment="VkDebugReportCallbackEXT"/>
- <enum value="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT"/>
- <type name="VkDebugReportObjectTypeEXT"/>
- <type name="VkDebugReportCallbackCreateInfoEXT"/>
- <command name="vkCreateDebugReportCallbackEXT"/>
- <command name="vkDestroyDebugReportCallbackEXT"/>
- <command name="vkDebugReportMessageEXT"/>
- </require>
- </extension>
- <extension name="VK_NV_glsl_shader" number="13" type="device" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_GLSL_SHADER_SPEC_VERSION"/>
- <enum value=""VK_NV_glsl_shader"" name="VK_NV_GLSL_SHADER_EXTENSION_NAME"/>
- <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_INVALID_SHADER_NV"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_1" number="14" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_1_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_1"" name="VK_NV_EXTENSION_1_EXTENSION_NAME"/>
- <enum offset="0" dir="-" extends="VkResult" name="VK_NV_EXTENSION_1_ERROR"/>
- </require>
- </extension>
- <extension name="VK_KHR_sampler_mirror_clamp_to_edge" type="device" number="15" author="KHR" contact="Tobias Hector @tobias" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION"/>
- <enum value=""VK_KHR_sampler_mirror_clamp_to_edge"" name="VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME"/>
- <enum value="4" extends="VkSamplerAddressMode" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="Note that this defines what was previously a core enum, and so uses the 'value' attribute rather than 'offset', and does not have a suffix. This is a special case, and should not be repeated"/>
- </require>
- </extension>
- <extension name="VK_IMG_filter_cubic" number="16" type="device" author="IMG" contact="Tobias Hector @tobias" supported="vulkan">
- <require>
- <enum value="1" name="VK_IMG_FILTER_CUBIC_SPEC_VERSION"/>
- <enum value=""VK_IMG_filter_cubic"" name="VK_IMG_FILTER_CUBIC_EXTENSION_NAME"/>
- <enum offset="0" extends="VkFilter" name="VK_FILTER_CUBIC_IMG"/>
- <enum bitpos="13" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG" comment="Format can be filtered with VK_FILTER_CUBIC_IMG when being sampled"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_17" number="17" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_17_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_17"" name="VK_AMD_EXTENSION_17_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_18" number="18" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_18_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_18"" name="VK_AMD_EXTENSION_18_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_rasterization_order" number="19" type="device" author="AMD" contact="Daniel Rakos @aqnuep" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION"/>
- <enum value=""VK_AMD_rasterization_order"" name="VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"/>
- <type name="VkRasterizationOrderAMD"/>
- <type name="VkPipelineRasterizationStateRasterizationOrderAMD"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_20" number="20" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_20_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_20"" name="VK_AMD_EXTENSION_20_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_shader_trinary_minmax" number="21" type="device" author="AMD" contact="quentin.lin(a)amd.com" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION"/>
- <enum value=""VK_AMD_shader_trinary_minmax"" name="VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_shader_explicit_vertex_parameter" number="22" type="device" author="AMD" contact="quentin.lin(a)amd.com" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION"/>
- <enum value=""VK_AMD_shader_explicit_vertex_parameter"" name="VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_debug_marker" number="23" type="device" requires="VK_EXT_debug_report" author="Baldur Karlsson" contact="baldurk(a)baldurk.org" supported="vulkan">
- <require>
- <enum value="4" name="VK_EXT_DEBUG_MARKER_SPEC_VERSION"/>
- <enum value=""VK_EXT_debug_marker"" name="VK_EXT_DEBUG_MARKER_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"/>
- <type name="VkDebugReportObjectTypeEXT"/>
- <type name="VkDebugMarkerObjectNameInfoEXT"/>
- <type name="VkDebugMarkerObjectTagInfoEXT"/>
- <type name="VkDebugMarkerMarkerInfoEXT"/>
- <command name="vkDebugMarkerSetObjectTagEXT"/>
- <command name="vkDebugMarkerSetObjectNameEXT"/>
- <command name="vkCmdDebugMarkerBeginEXT"/>
- <command name="vkCmdDebugMarkerEndEXT"/>
- <command name="vkCmdDebugMarkerInsertEXT"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_24" number="24" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_24_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_24"" name="VK_AMD_EXTENSION_24_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_25" number="25" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_25_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_25"" name="VK_AMD_EXTENSION_25_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_gcn_shader" number="26" type="device" author="AMD" contact="dominik.witczak(a)amd.com" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_GCN_SHADER_SPEC_VERSION"/>
- <enum value=""VK_AMD_gcn_shader"" name="VK_AMD_GCN_SHADER_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_dedicated_allocation" number="27" type="device" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION"/>
- <enum value=""VK_NV_dedicated_allocation"" name="VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"/>
- <type name="VkDedicatedAllocationImageCreateInfoNV"/>
- <type name="VkDedicatedAllocationBufferCreateInfoNV"/>
- <type name="VkDedicatedAllocationMemoryAllocateInfoNV"/>
- </require>
- </extension>
- <extension name="VK_EXT_extension_28" number="28" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="disabled">
- <require>
- <enum value="0" name="VK_EXT_EXTENSION_28_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_28"" name="VK_EXT_EXTENSION_28_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_extension_29" number="29" author="NVIDIA" contact="Jeff Juliano @jjuliano" supported="disabled">
- <require>
- <enum value="0" name="VK_NVX_EXTENSION_29_SPEC_VERSION"/>
- <enum value=""VK_NVX_extension_29"" name="VK_NVX_EXTENSION_29_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_extension_30" number="30" author="NVIDIA" contact="Jeff Juliano @jjuliano" supported="disabled">
- <require>
- <enum value="0" name="VK_NVX_EXTENSION_30_SPEC_VERSION"/>
- <enum value=""VK_NVX_extension_30"" name="VK_NVX_EXTENSION_30_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_extension_31" number="31" author="NVIDIA" contact="Jeff Juliano @jjuliano" supported="disabled">
- <require>
- <enum value="0" name="VK_NVX_EXTENSION_31_SPEC_VERSION"/>
- <enum value=""VK_NVX_extension_31"" name="VK_NVX_EXTENSION_31_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_32" number="32" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_32_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_32"" name="VK_AMD_EXTENSION_32_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_33" number="33" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_33_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_33"" name="VK_AMD_EXTENSION_33_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_draw_indirect_count" number="34" type="device" author="AMD" contact="Daniel Rakos @aqnuep" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION"/>
- <enum value=""VK_AMD_draw_indirect_count"" name="VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME"/>
- <command name="vkCmdDrawIndirectCountAMD"/>
- <command name="vkCmdDrawIndexedIndirectCountAMD"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_35" number="35" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_35_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_35"" name="VK_AMD_EXTENSION_35_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_negative_viewport_height" number="36" type="device" author="AMD" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION"/>
- <enum value=""VK_AMD_negative_viewport_height"" name="VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_gpu_shader_half_float" number="37" type="device" author="AMD" contact="Dominik Witczak @dominikwitczak_amd" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION"/>
- <enum value=""VK_AMD_gpu_shader_half_float"" name="VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_shader_ballot" number="38" type="device" author="AMD" contact="Dominik Witczak @dominikwitczak_amd" supported="vulkan">
- <require>
- <enum value="1" name="VK_AMD_SHADER_BALLOT_SPEC_VERSION"/>
- <enum value=""VK_AMD_shader_ballot"" name="VK_AMD_SHADER_BALLOT_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_39" number="39" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_39_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_39"" name="VK_AMD_EXTENSION_39_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_40" number="40" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_40_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_40"" name="VK_AMD_EXTENSION_40_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_41" number="41" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_41_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_41"" name="VK_AMD_EXTENSION_41_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_texture_gather_bias_lod" number="42" author="AMD" contact="Rex Xu @amdrexu" supported="vulkan" type="device" requires="VK_KHR_get_physical_device_properties2">
- <require>
- <enum value="1" name="VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION"/>
- <enum value=""VK_AMD_texture_gather_bias_lod"" name="VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD"/>
- <type name="VkTextureLODGatherFormatPropertiesAMD"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_43" number="43" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_43_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_43"" name="VK_AMD_EXTENSION_43_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_44" number="44" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_44_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_44"" name="VK_AMD_EXTENSION_44_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_45" number="45" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_45_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_45"" name="VK_AMD_EXTENSION_45_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_46" number="46" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_46_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_46"" name="VK_AMD_EXTENSION_46_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_47" number="47" author="AMD" contact="Daniel Rakos @aqnuep" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_47_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_47"" name="VK_AMD_EXTENSION_47_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_extension_48" number="48" author="NVIDIA" contact="James Jones @cubanismo" supported="disabled">
- <require>
- <enum value="0" name="VK_NVX_EXTENSION_48_SPEC_VERSION"/>
- <enum value=""VK_NVX_extension_48"" name="VK_NVX_EXTENSION_48_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_GOOGLE_extension_49" number="49" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
- <require>
- <enum value="0" name="VK_GOOGLE_EXTENSION_49_SPEC_VERSION"/>
- <enum value=""VK_GOOGLE_extension_49"" name="VK_GOOGLE_EXTENSION_49_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_GOOGLE_extension_50" number="50" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
- <require>
- <enum value="0" name="VK_GOOGLE_EXTENSION_50_SPEC_VERSION"/>
- <enum value=""VK_GOOGLE_extension_50"" name="VK_GOOGLE_EXTENSION_50_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_extension_51" number="51" author="NVIDIA" contact="James Jones @cubanismo" supported="disabled">
- <require>
- <enum value="0" name="VK_NVX_EXTENSION_51_SPEC_VERSION"/>
- <enum value=""VK_NVX_extension_51"" name="VK_NVX_EXTENSION_51_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_extension_52" number="52" author="NVIDIA" contact="James Jones @cubanismo" supported="disabled">
- <require>
- <enum value="0" name="VK_NVX_EXTENSION_52_SPEC_VERSION"/>
- <enum value=""VK_NVX_extension_52"" name="VK_NVX_EXTENSION_52_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_53" number="53" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_53_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_53"" name="VK_NV_EXTENSION_53_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHX_multiview" number="54" type="device" author="NVIDIA" requires="VK_KHR_get_physical_device_properties2" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_MULTIVIEW_SPEC_VERSION"/>
- <enum value=""VK_KHX_multiview"" name="VK_KHX_MULTIVIEW_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX"/>
- <enum bitpos="1" extends="VkDependencyFlagBits" name="VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX"/>
- <type name="VkRenderPassMultiviewCreateInfoKHX"/>
- <type name="VkPhysicalDeviceMultiviewFeaturesKHX"/>
- <type name="VkPhysicalDeviceMultiviewPropertiesKHX"/>
- </require>
- </extension>
- <extension name="VK_IMG_format_pvrtc" number="55" type="device" author="IMG" contact="Tobias Hector @tobias" supported="vulkan">
- <require>
- <enum value="1" name="VK_IMG_FORMAT_PVRTC_SPEC_VERSION"/>
- <enum value=""VK_IMG_format_pvrtc"" name="VK_IMG_FORMAT_PVRTC_EXTENSION_NAME"/>
- <enum offset="0" extends="VkFormat" name="VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG"/>
- <enum offset="1" extends="VkFormat" name="VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG"/>
- <enum offset="2" extends="VkFormat" name="VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG"/>
- <enum offset="3" extends="VkFormat" name="VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG"/>
- <enum offset="4" extends="VkFormat" name="VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG"/>
- <enum offset="5" extends="VkFormat" name="VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG"/>
- <enum offset="6" extends="VkFormat" name="VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG"/>
- <enum offset="7" extends="VkFormat" name="VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG"/>
- </require>
- </extension>
- <extension name="VK_NV_external_memory_capabilities" number="56" type="instance" author="NVIDIA" contact="James jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION"/>
- <enum value=""VK_NV_external_memory_capabilities"" name="VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME"/>
- <type name="VkExternalMemoryHandleTypeFlagsNV"/>
- <type name="VkExternalMemoryHandleTypeFlagBitsNV"/>
- <type name="VkExternalMemoryFeatureFlagsNV"/>
- <type name="VkExternalMemoryFeatureFlagBitsNV"/>
- <type name="VkExternalImageFormatPropertiesNV"/>
- <command name="vkGetPhysicalDeviceExternalImageFormatPropertiesNV"/>
- </require>
- </extension>
- <extension name="VK_NV_external_memory" number="57" type="device" requires="VK_NV_external_memory_capabilities" author="NVIDIA" contact="James jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_EXTERNAL_MEMORY_SPEC_VERSION"/>
- <enum value=""VK_NV_external_memory"" name="VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"/>
- <type name="VkExternalMemoryImageCreateInfoNV"/>
- <type name="VkExportMemoryAllocateInfoNV"/>
- </require>
- </extension>
- <extension name="VK_NV_external_memory_win32" number="58" type="device" requires="VK_NV_external_memory_capabilities,VK_NV_external_memory" author="NVIDIA" contact="James jones @cubanismo" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION"/>
- <enum value=""VK_NV_external_memory_win32"" name="VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"/>
- <type name="VkImportMemoryWin32HandleInfoNV"/>
- <type name="VkExportMemoryWin32HandleInfoNV"/>
- <command name="vkGetMemoryWin32HandleNV"/>
- </require>
- </extension>
- <extension name="VK_NV_win32_keyed_mutex" number="59" type="device" requires="VK_NV_external_memory_capabilities,VK_NV_external_memory_win32" author="NVIDIA" contact="Carsten Rohde" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION"/>
- <enum value=""VK_NV_win32_keyed_mutex"" name="VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"/>
- <type name="VkWin32KeyedMutexAcquireReleaseInfoNV"/>
- </require>
- </extension>
- <extension name="VK_KHR_get_physical_device_properties2" number="60" type="instance" author="KHR" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION"/>
- <enum value=""VK_KHR_get_physical_device_properties2"" name="VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR"/>
- <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR"/>
- <enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR"/>
- <enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR"/>
- <enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR"/>
- <enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR"/>
- <enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR"/>
- <type name="VkPhysicalDeviceFeatures2KHR"/>
- <type name="VkPhysicalDeviceProperties2KHR"/>
- <type name="VkFormatProperties2KHR"/>
- <type name="VkImageFormatProperties2KHR"/>
- <type name="VkPhysicalDeviceImageFormatInfo2KHR"/>
- <type name="VkQueueFamilyProperties2KHR"/>
- <type name="VkPhysicalDeviceMemoryProperties2KHR"/>
- <type name="VkSparseImageFormatProperties2KHR"/>
- <type name="VkPhysicalDeviceSparseImageFormatInfo2KHR"/>
- <command name="vkGetPhysicalDeviceFeatures2KHR"/>
- <command name="vkGetPhysicalDeviceProperties2KHR"/>
- <command name="vkGetPhysicalDeviceFormatProperties2KHR"/>
- <command name="vkGetPhysicalDeviceImageFormatProperties2KHR"/>
- <command name="vkGetPhysicalDeviceQueueFamilyProperties2KHR"/>
- <command name="vkGetPhysicalDeviceMemoryProperties2KHR"/>
- <command name="vkGetPhysicalDeviceSparseImageFormatProperties2KHR"/>
- </require>
- </extension>
- <extension name="VK_KHX_device_group" number="61" type="device" author="KHX" requires="VK_KHR_swapchain" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_DEVICE_GROUP_SPEC_VERSION"/>
- <enum value=""VK_KHX_device_group"" name="VK_KHX_DEVICE_GROUP_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX"/>
- <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX"/>
- <enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX"/>
- <enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX"/>
- <enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX"/>
- <enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX"/>
- <enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX"/>
- <enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX"/>
- <enum offset="10" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX"/>
- <enum offset="11" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX"/>
- <enum offset="12" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX"/>
- <type name="VkPeerMemoryFeatureFlagsKHX"/>
- <type name="VkPeerMemoryFeatureFlagBitsKHX"/>
- <type name="VkMemoryAllocateFlagsKHX"/>
- <type name="VkMemoryAllocateFlagBitsKHX"/>
- <type name="VkDeviceGroupPresentModeFlagBitsKHX"/>
- <type name="VkDeviceGroupPresentModeFlagsKHX"/>
- <type name="VkMemoryAllocateFlagsInfoKHX"/>
- <type name="VkBindBufferMemoryInfoKHX"/>
- <type name="VkBindImageMemoryInfoKHX"/>
- <type name="VkDeviceGroupRenderPassBeginInfoKHX"/>
- <type name="VkDeviceGroupCommandBufferBeginInfoKHX"/>
- <type name="VkDeviceGroupSubmitInfoKHX"/>
- <type name="VkDeviceGroupBindSparseInfoKHX"/>
- <type name="VkDeviceGroupPresentCapabilitiesKHX"/>
- <type name="VkImageSwapchainCreateInfoKHX"/>
- <type name="VkBindImageMemorySwapchainInfoKHX"/>
- <type name="VkAcquireNextImageInfoKHX"/>
- <type name="VkDeviceGroupPresentInfoKHX"/>
- <type name="VkDeviceGroupSwapchainCreateInfoKHX"/>
- <command name="vkGetDeviceGroupPeerMemoryFeaturesKHX"/>
- <command name="vkBindBufferMemory2KHX"/>
- <command name="vkBindImageMemory2KHX"/>
- <command name="vkCmdSetDeviceMaskKHX"/>
- <command name="vkGetDeviceGroupPresentCapabilitiesKHX"/>
- <command name="vkGetDeviceGroupSurfacePresentModesKHX"/>
- <command name="vkAcquireNextImage2KHX"/>
- <command name="vkCmdDispatchBaseKHX"/>
- <command name="vkGetPhysicalDevicePresentRectanglesKHX"/>
- <enum bitpos="6" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_BIND_SFR_BIT_KHX" comment="Allows using VkBindImageMemoryInfoKHX::pSFRRects when binding memory to the image"/>
- <enum bitpos="3" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX"/>
- <enum bitpos="4" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_DISPATCH_BASE_KHX"/>
- <enum bitpos="2" extends="VkDependencyFlagBits" name="VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX" comment="Dependency is across devices"/>
- <enum bitpos="0" extends="VkSwapchainCreateFlagBitsKHR" name="VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX" comment="Allow images with VK_IMAGE_CREATE_BIND_SFR_BIT_KHX"/>
- </require>
- </extension>
- <extension name="VK_EXT_validation_flags" number="62" type="instance" author="GOOGLE" contact="Tobin Ehlis @tobine" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_VALIDATION_FLAGS_SPEC_VERSION"/>
- <enum value=""VK_EXT_validation_flags"" name="VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT"/>
- <type name="VkValidationFlagsEXT"/>
- </require>
- </extension>
- <extension name="VK_NN_vi_surface" number="63" type="instance" author="NN" contact="Mathias Heyer @mheyer" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_VI_NN" supported="vulkan">
- <require>
- <enum value="1" name="VK_NN_VI_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_NN_vi_surface"" name="VK_NN_VI_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"/>
- <type name="VkViSurfaceCreateFlagsNN"/>
- <type name="VkViSurfaceCreateInfoNN"/>
- <command name="vkCreateViSurfaceNN"/>
- </require>
- </extension>
- <extension name="VK_KHR_shader_draw_parameters" number="64" type="device" author="KHR" contact="Daniel Koch @dgkoch" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION"/>
- <enum value=""VK_KHR_shader_draw_parameters"" name="VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_shader_subgroup_ballot" number="65" type="device" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION"/>
- <enum value=""VK_EXT_shader_subgroup_ballot"" name="VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_shader_subgroup_vote" number="66" type="device" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION"/>
- <enum value=""VK_EXT_shader_subgroup_vote"" name="VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_ARM_extension_01" number="67" type="device" author="ARM" contact="Jan-Harald Fredriksen @janharald" supported="disabled">
- <require>
- <enum value="0" name="VK_ARM_EXTENSION_01_SPEC_VERSION"/>
- <enum value=""VK_ARM_extension_01"" name="VK_ARM_EXTENSION_01_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_ARM_extension_02" number="68" type="device" author="ARM" contact="Jan-Harald Fredriksen @janharald" supported="disabled">
- <require>
- <enum value="0" name="VK_ARM_EXTENSION_02_SPEC_VERSION"/>
- <enum value=""VK_ARM_extension_02"" name="VK_ARM_EXTENSION_02_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_IMG_extension_69" number="69" type="device" author="IMG" contact="Tobias Hector @tobias" supported="disabled">
- <require>
- <enum value="0" name="VK_IMG_EXTENSION_69_SPEC_VERSION"/>
- <enum value=""VK_IMG_extension_69"" name="VK_IMG_EXTENSION_69_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_maintenance1" number="70" type="device" author="KHR" contact="Piers Daniell @pdaniell" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_MAINTENANCE1_SPEC_VERSION"/>
- <enum value=""VK_KHR_maintenance1"" name="VK_KHR_MAINTENANCE1_EXTENSION_NAME"/>
- <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_OUT_OF_POOL_MEMORY_KHR"/>
- <enum bitpos="14" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR" comment="Format can be used as the source image of image transfer commands"/>
- <enum bitpos="15" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR" comment="Format can be used as the destination image of image transfer commands"/>
- <enum bitpos="5" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR" comment="The 3D image can be viewed as a 2D or 2D array image"/>
- <command name="vkTrimCommandPoolKHR"/>
- </require>
- </extension>
- <extension name="VK_KHX_device_group_creation" number="71" type="instance" author="KHX" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION"/>
- <enum value=""VK_KHX_device_group_creation"" name="VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX"/>
- <enum name="VK_MAX_DEVICE_GROUP_SIZE_KHX"/>
- <type name="VkPhysicalDeviceGroupPropertiesKHX"/>
- <type name="VkDeviceGroupDeviceCreateInfoKHX"/>
- <command name="vkEnumeratePhysicalDeviceGroupsKHX"/>
- <enum bitpos="1" extends="VkMemoryHeapFlagBits" name="VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX" comment="If set, heap allocations allocate multiple instances by default"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_memory_capabilities" number="72" type="instance" author="KHX" requires="VK_KHR_get_physical_device_properties2" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_memory_capabilities"" name="VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX"/>
- <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX"/>
- <enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX"/>
- <enum name="VK_LUID_SIZE_KHX"/>
- <type name="VkExternalMemoryHandleTypeFlagsKHX"/>
- <type name="VkExternalMemoryHandleTypeFlagBitsKHX"/>
- <type name="VkExternalMemoryFeatureFlagsKHX"/>
- <type name="VkExternalMemoryFeatureFlagBitsKHX"/>
- <type name="VkExternalMemoryPropertiesKHX"/>
- <type name="VkPhysicalDeviceExternalImageFormatInfoKHX"/>
- <type name="VkExternalImageFormatPropertiesKHX"/>
- <type name="VkPhysicalDeviceExternalBufferInfoKHX"/>
- <type name="VkExternalBufferPropertiesKHX"/>
- <type name="VkPhysicalDeviceIDPropertiesKHX"/>
- <command name="vkGetPhysicalDeviceExternalBufferPropertiesKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_memory" number="73" type="device" requires="VK_KHX_external_memory_capabilities" author="KHX" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_memory"" name="VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX"/>
- <enum offset="3" dir="-" extends="VkResult" name="VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX"/>
- <enum name="VK_QUEUE_FAMILY_EXTERNAL_KHX"/>
- <type name="VkExternalMemoryImageCreateInfoKHX"/>
- <type name="VkExternalMemoryBufferCreateInfoKHX"/>
- <type name="VkExportMemoryAllocateInfoKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_memory_win32" number="74" type="device" requires="VK_KHX_external_memory_capabilities,VK_KHX_external_memory" author="KHX" contact="James Jones @cubanismo" protect="VK_USE_PLATFORM_WIN32_KHX" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_memory_win32"" name="VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX"/>
- <type name="VkImportMemoryWin32HandleInfoKHX"/>
- <type name="VkExportMemoryWin32HandleInfoKHX"/>
- <type name="VkMemoryWin32HandlePropertiesKHX"/>
- <command name="vkGetMemoryWin32HandleKHX"/>
- <command name="vkGetMemoryWin32HandlePropertiesKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_memory_fd" number="75" type="device" requires="VK_KHX_external_memory_capabilities,VK_KHX_external_memory" author="KHX" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_memory_fd"" name="VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX"/>
- <type name="VkImportMemoryFdInfoKHX"/>
- <type name="VkMemoryFdPropertiesKHX"/>
- <command name="vkGetMemoryFdKHX"/>
- <command name="vkGetMemoryFdPropertiesKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_win32_keyed_mutex" number="76" type="device" requires="VK_KHX_external_memory_capabilities,VK_KHX_external_memory,VK_KHX_external_memory_win32" author="KHX" contact="Carsten Rohde" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION"/>
- <enum value=""VK_KHX_win32_keyed_mutex"" name="VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX"/>
- <type name="VkWin32KeyedMutexAcquireReleaseInfoKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_semaphore_capabilities" number="77" type="instance" author="KHX" requires="VK_KHR_get_physical_device_properties2" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_semaphore_capabilities"" name="VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX"/>
- <enum name="VK_LUID_SIZE_KHX"/>
- <type name="VkExternalSemaphoreHandleTypeFlagsKHX"/>
- <type name="VkExternalSemaphoreHandleTypeFlagBitsKHX"/>
- <type name="VkExternalSemaphoreFeatureFlagsKHX"/>
- <type name="VkExternalSemaphoreFeatureFlagBitsKHX"/>
- <type name="VkPhysicalDeviceExternalSemaphoreInfoKHX"/>
- <type name="VkExternalSemaphorePropertiesKHX"/>
- <type name="VkPhysicalDeviceIDPropertiesKHX"/>
- <command name="vkGetPhysicalDeviceExternalSemaphorePropertiesKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_semaphore" number="78" type="device" requires="VK_KHX_external_semaphore_capabilities" author="KHX" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_semaphore"" name="VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX"/>
- <type name="VkExportSemaphoreCreateInfoKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_semaphore_win32" number="79" type="device" requires="VK_KHX_external_semaphore_capabilities,VK_KHX_external_semaphore" author="KHX" contact="James Jones @cubanismo" protect="VK_USE_PLATFORM_WIN32_KHX" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_semaphore_win32"" name="VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX"/>
- <type name="VkImportSemaphoreWin32HandleInfoKHX"/>
- <type name="VkExportSemaphoreWin32HandleInfoKHX"/>
- <type name="VkD3D12FenceSubmitInfoKHX"/>
- <command name="vkImportSemaphoreWin32HandleKHX"/>
- <command name="vkGetSemaphoreWin32HandleKHX"/>
- </require>
- </extension>
- <extension name="VK_KHX_external_semaphore_fd" number="80" type="device" requires="VK_KHX_external_semaphore_capabilities,VK_KHX_external_semaphore" author="KHX" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION"/>
- <enum value=""VK_KHX_external_semaphore_fd"" name="VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX"/>
- <type name="VkImportSemaphoreFdInfoKHX"/>
- <command name="vkImportSemaphoreFdKHX"/>
- <command name="vkGetSemaphoreFdKHX"/>
- </require>
- </extension>
- <extension name="VK_KHR_push_descriptor" number="81" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION"/>
- <enum value=""VK_KHR_push_descriptor"" name="VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR"/>
- <enum bitpos="0" extends="VkDescriptorSetLayoutCreateFlagBits" name="VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR" comment="Descriptors are pushed via flink:vkCmdPushDescriptorSetKHR"/>
- <command name="vkCmdPushDescriptorSetKHR"/>
- <type name="VkPhysicalDevicePushDescriptorPropertiesKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_82" number="82" author="KHR" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_82_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_82"" name="VK_KHR_EXTENSION_82_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_83" number="83" author="KHR" contact="Jan-Harald Fredriksen @janharald" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_83_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_83"" name="VK_KHR_EXTENSION_83_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_84" number="84" author="KHR" contact="Jan-Harald Fredriksen @janharald" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_84_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_84"" name="VK_KHR_EXTENSION_84_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_incremental_present" number="85" type="device" author="KHR" requires="VK_KHR_swapchain" contact="Ian Elliott ianelliott(a)google.com" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION"/>
- <enum value=""VK_KHR_incremental_present"" name="VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR"/>
- <type name="VkPresentRegionsKHR"/>
- <type name="VkPresentRegionKHR"/>
- <type name="VkRectLayerKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_descriptor_update_template" number="86" type="device" author="KHR" contact="Markus Tavenrath @mtavenrath" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION"/>
- <enum value=""VK_KHR_descriptor_update_template"" name="VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR"/>
- <enum offset="0" extends="VkDebugReportObjectTypeEXT" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT"/>
- <enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR" comment="VkDescriptorUpdateTemplateKHR"/>
- <command name="vkCreateDescriptorUpdateTemplateKHR"/>
- <command name="vkDestroyDescriptorUpdateTemplateKHR"/>
- <command name="vkUpdateDescriptorSetWithTemplateKHR"/>
- <command name="vkCmdPushDescriptorSetWithTemplateKHR"/>
- <type name="VkDescriptorUpdateTemplateKHR"/>
- <type name="VkDescriptorUpdateTemplateCreateFlagsKHR"/>
- <type name="VkDescriptorUpdateTemplateTypeKHR"/>
- <type name="VkDescriptorUpdateTemplateEntryKHR"/>
- <type name="VkDescriptorUpdateTemplateCreateInfoKHR"/>
- </require>
- </extension>
- <extension name="VK_NVX_device_generated_commands" number="87" type="device" author="NVIDIA" contact="Christoph Kubisch @pixeljetstream" supported="vulkan">
- <require>
- <enum value="1" name="VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION"/>
- <enum value=""VK_NVX_device_generated_commands"" name="VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX"/>
- <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX"/>
- <enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX"/>
- <enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX"/>
- <enum bitpos="17" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX"/>
- <enum bitpos="17" extends="VkAccessFlagBits" name="VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX"/>
- <enum bitpos="18" extends="VkAccessFlagBits" name="VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX"/>
- <enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_OBJECT_TABLE_NVX" comment="VkobjectTableNVX"/>
- <enum offset="1" extends="VkObjectType" name="VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX" comment="VkIndirectCommandsLayoutNVX"/>
- <type name="VkObjectTableNVX"/>
- <type name="VkIndirectCommandsLayoutNVX"/>
- <type name="VkIndirectCommandsLayoutUsageFlagsNVX"/>
- <type name="VkObjectEntryUsageFlagsNVX"/>
- <type name="VkIndirectCommandsLayoutUsageFlagBitsNVX"/>
- <type name="VkIndirectCommandsTokenTypeNVX"/>
- <type name="VkObjectEntryUsageFlagBitsNVX"/>
- <type name="VkObjectEntryTypeNVX"/>
- <type name="VkDeviceGeneratedCommandsFeaturesNVX"/>
- <type name="VkDeviceGeneratedCommandsLimitsNVX"/>
- <type name="VkIndirectCommandsTokenNVX"/>
- <type name="VkIndirectCommandsLayoutTokenNVX"/>
- <type name="VkIndirectCommandsLayoutCreateInfoNVX"/>
- <type name="VkCmdProcessCommandsInfoNVX"/>
- <type name="VkCmdReserveSpaceForCommandsInfoNVX"/>
- <type name="VkObjectTableCreateInfoNVX"/>
- <type name="VkObjectTableEntryNVX"/>
- <type name="VkObjectTablePipelineEntryNVX"/>
- <type name="VkObjectTableDescriptorSetEntryNVX"/>
- <type name="VkObjectTableVertexBufferEntryNVX"/>
- <type name="VkObjectTableIndexBufferEntryNVX"/>
- <type name="VkObjectTablePushConstantEntryNVX"/>
- <command name="vkCmdProcessCommandsNVX"/>
- <command name="vkCmdReserveSpaceForCommandsNVX"/>
- <command name="vkCreateIndirectCommandsLayoutNVX"/>
- <command name="vkDestroyIndirectCommandsLayoutNVX"/>
- <command name="vkCreateObjectTableNVX"/>
- <command name="vkDestroyObjectTableNVX"/>
- <command name="vkRegisterObjectsNVX"/>
- <command name="vkUnregisterObjectsNVX"/>
- <command name="vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX"/>
- </require>
- </extension>
- <extension name="VK_NV_clip_space_w_scaling" number="88" type="device" author="NV" contact="Eric Werness @ewerness" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION"/>
- <enum value=""VK_NV_clip_space_w_scaling"" name="VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV"/>
- <enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV"/>
- <type name="VkViewportWScalingNV"/>
- <type name="VkPipelineViewportWScalingStateCreateInfoNV"/>
- <command name="vkCmdSetViewportWScalingNV"/>
- </require>
- </extension>
- <extension name="VK_EXT_direct_mode_display" number="89" type="instance" requires="VK_KHR_display" author="NVIDIA" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION"/>
- <enum value=""VK_EXT_direct_mode_display"" name="VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME"/>
- <command name="vkReleaseDisplayEXT"/>
- </require>
- </extension>
- <extension name="VK_EXT_acquire_xlib_display" number="90" type="instance" requires="VK_EXT_direct_mode_display,VK_KHR_display" author="NVIDIA" contact="James Jones @cubanismo" protect="VK_USE_PLATFORM_XLIB_XRANDR_EXT" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION"/>
- <enum value=""VK_EXT_acquire_xlib_display"" name="VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME"/>
- <command name="vkAcquireXlibDisplayEXT"/>
- <command name="vkGetRandROutputDisplayEXT"/>
- </require>
- </extension>
- <extension name="VK_EXT_display_surface_counter" number="91" type="instance" requires="VK_KHR_display" author="NVIDIA" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION"/>
- <enum value=""VK_EXT_display_surface_counter"" name="VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT"/>
- <type name="VkSurfaceCounterFlagsEXT"/>
- <type name="VkSurfaceCounterFlagBitsEXT"/>
- <type name="VkSurfaceCapabilities2EXT"/>
- <command name="vkGetPhysicalDeviceSurfaceCapabilities2EXT"/>
- </require>
- </extension>
- <extension name="VK_EXT_display_control" number="92" type="device" requires="VK_KHR_display,VK_EXT_display_surface_counter,VK_KHR_swapchain" author="NVIDIA" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_DISPLAY_CONTROL_SPEC_VERSION"/>
- <enum value=""VK_EXT_display_control"" name="VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"/>
- <enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"/>
- <type name="VkDisplayPowerStateEXT"/>
- <type name="VkDeviceEventTypeEXT"/>
- <type name="VkDisplayEventTypeEXT"/>
- <type name="VkDisplayPowerInfoEXT"/>
- <type name="VkDeviceEventInfoEXT"/>
- <type name="VkDisplayEventInfoEXT"/>
- <type name="VkSwapchainCounterCreateInfoEXT"/>
- <command name="vkDisplayPowerControlEXT"/>
- <command name="vkRegisterDeviceEventEXT"/>
- <command name="vkRegisterDisplayEventEXT"/>
- <command name="vkGetSwapchainCounterEXT"/>
- </require>
- </extension>
- <extension name="VK_GOOGLE_display_timing" number="93" type="device" author="GOOGLE" requires="VK_KHR_swapchain" contact="Ian Elliott ianelliott(a)google.com" supported="vulkan">
- <require>
- <enum value="1" name="VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION"/>
- <enum value=""VK_GOOGLE_display_timing"" name="VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE"/>
- <type name="VkRefreshCycleDurationGOOGLE"/>
- <type name="VkPastPresentationTimingGOOGLE"/>
- <type name="VkPresentTimesInfoGOOGLE"/>
- <type name="VkPresentTimeGOOGLE"/>
- <command name="vkGetRefreshCycleDurationGOOGLE"/>
- <command name="vkGetPastPresentationTimingGOOGLE"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_94" number="94" author="Codeplay" contact="Neil Henning @neil_henning" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_94_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_94"" name="VK_KHR_EXTENSION_94_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_sample_mask_override_coverage" number="95" type="device" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION"/>
- <enum value=""VK_NV_sample_mask_override_coverage"" name="VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_geometry_shader_passthrough" number="96" type="device" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION"/>
- <enum value=""VK_NV_geometry_shader_passthrough"" name="VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_viewport_array2" number="97" type="device" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION"/>
- <enum value=""VK_NV_viewport_array2"" name="VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NVX_multiview_per_view_attributes" number="98" type="device" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="vulkan">
- <require>
- <enum value="1" name="VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION"/>
- <enum value=""VK_NVX_multiview_per_view_attributes"" name="VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX"/>
- <enum bitpos="0" extends="VkSubpassDescriptionFlagBits" name="VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX"/>
- <enum bitpos="1" extends="VkSubpassDescriptionFlagBits" name="VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX"/>
- <type name="VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX"/>
- </require>
- </extension>
- <extension name="VK_NV_viewport_swizzle" number="99" type="device" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="vulkan">
- <require>
- <enum value="1" name="VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION"/>
- <enum value=""VK_NV_viewport_swizzle"" name="VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV"/>
- <type name="VkViewportSwizzleNV"/>
- <type name="VkViewportCoordinateSwizzleNV"/>
- <type name="VkPipelineViewportSwizzleStateCreateInfoNV"/>
- <type name="VkPipelineViewportSwizzleStateCreateFlagsNV"/>
- </require>
- </extension>
- <extension name="VK_EXT_discard_rectangles" number="100" type="device" requires="VK_KHR_get_physical_device_properties2" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION"/>
- <enum value=""VK_EXT_discard_rectangles"" name="VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT"/>
- <enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT"/>
- <type name="VkPhysicalDeviceDiscardRectanglePropertiesEXT"/>
- <type name="VkPipelineDiscardRectangleStateCreateInfoEXT"/>
- <type name="VkPipelineDiscardRectangleStateCreateFlagsEXT"/>
- <type name="VkDiscardRectangleModeEXT"/>
- <command name="vkCmdSetDiscardRectangleEXT"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_101" number="101" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_101_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_101"" name="VK_NV_EXTENSION_101_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_102" number="102" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_102_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_102"" name="VK_NV_EXTENSION_102_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_103" number="103" author="NVIDIA" contact="Daniel Koch @dgkoch" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_103_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_103"" name="VK_NV_EXTENSION_103_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_104" number="104" author="NVIDIA" contact="Mathias Schott @mschott" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_104_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_104"" name="VK_NV_EXTENSION_104_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_swapchain_colorspace" number="105" type="instance" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtneygo" requires="VK_KHR_surface" supported="vulkan">
- <require>
- <enum value="2" name="VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION"/>
- <enum value=""VK_EXT_swapchain_colorspace"" name="VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME"/>
- <enum offset="1" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT"/>
- <enum offset="2" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT"/>
- <enum offset="3" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DCI_P3_LINEAR_EXT"/>
- <enum offset="4" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT"/>
- <enum offset="5" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT709_LINEAR_EXT"/>
- <enum offset="6" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT709_NONLINEAR_EXT"/>
- <enum offset="7" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT2020_LINEAR_EXT"/>
- <enum offset="8" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_HDR10_ST2084_EXT"/>
- <enum offset="9" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DOLBYVISION_EXT"/>
- <enum offset="10" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_HDR10_HLG_EXT"/>
- <enum offset="11" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT"/>
- <enum offset="12" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT"/>
- <enum offset="13" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_PASS_THROUGH_EXT"/>
- </require>
- </extension>
- <extension name="VK_EXT_hdr_metadata" number="106" type="device" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtneygo" supported="vulkan">
- <require>
- <enum value="1" name="VK_EXT_HDR_METADATA_SPEC_VERSION"/>
- <enum value=""VK_EXT_hdr_metadata"" name="VK_EXT_HDR_METADATA_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_HDR_METADATA_EXT"/>
- <type name="VkHdrMetadataEXT"/>
- <type name="VkXYColorEXT"/>
- <command name="vkSetHdrMetadataEXT"/>
- </require>
- </extension>
- <extension name="VK_IMG_extension_107" number="107" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_IMG_EXTENSION_107_SPEC_VERSION"/>
- <enum value=""VK_IMG_extension_107"" name="VK_IMG_EXTENSION_107_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_IMG_extension_108" number="108" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_IMG_EXTENSION_108_SPEC_VERSION"/>
- <enum value=""VK_IMG_extension_108"" name="VK_IMG_EXTENSION_108_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_IMG_extension_109" number="109" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_IMG_EXTENSION_109_SPEC_VERSION"/>
- <enum value=""VK_IMG_extension_109"" name="VK_IMG_EXTENSION_109_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_IMG_extension_110" number="110" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_IMG_EXTENSION_110_SPEC_VERSION"/>
- <enum value=""VK_IMG_extension_110"" name="VK_IMG_EXTENSION_110_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_IMG_extension_111" number="111" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_IMG_EXTENSION_111_SPEC_VERSION"/>
- <enum value=""VK_IMG_extension_111"" name="VK_IMG_EXTENSION_111_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_shared_presentable_image" number="112" type="device" requires="VK_KHR_surface,VK_KHR_swapchain,VK_KHR_get_physical_device_properties2,VK_KHR_get_surface_capabilities2" author="KHR" contact="Alon Or-bach @alonorbach" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION"/>
- <enum value=""VK_KHR_shared_presentable_image"" name="VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR"/>
- <enum offset="0" extends="VkPresentModeKHR" name="VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR"/>
- <enum offset="1" extends="VkPresentModeKHR" name="VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR"/>
- <enum offset="0" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR"/>
- <type name="VkSharedPresentSurfaceCapabilitiesKHR"/>
- <command name="vkGetSwapchainStatusKHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_113" number="113" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_113_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_113"" name="VK_KHR_EXTENSION_113_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_114" number="114" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_114_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_114"" name="VK_KHR_EXTENSION_114_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_115" number="115" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_115_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_115"" name="VK_KHR_EXTENSION_115_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_116" number="116" author="KHX" contact="Cass Everitt @casseveritt" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_116_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_116"" name="VK_KHR_EXTENSION_116_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_117" number="117" author="KHR" contact="Kenneth Benzie @kbenzie" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_117_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_117"" name="VK_KHR_EXTENSION_117_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_118" number="118" author="KHR" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_118_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_118"" name="VK_KHR_EXTENSION_118_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_119" number="119" author="KHR" contact="Michael Worcester @michaelworcester" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_119_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_119"" name="VK_KHR_EXTENSION_119_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_get_surface_capabilities2" number="120" type="instance" requires="VK_KHR_surface" author="KHR" contact="James Jones @cubanismo" supported="vulkan">
- <require>
- <enum value="1" name="VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION"/>
- <enum value=""VK_KHR_get_surface_capabilities2"" name="VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR"/>
- <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR"/>
- <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR"/>
- <type name="VkPhysicalDeviceSurfaceInfo2KHR"/>
- <type name="VkSurfaceCapabilities2KHR"/>
- <type name="VkSurfaceFormat2KHR"/>
- <command name="vkGetPhysicalDeviceSurfaceCapabilities2KHR"/>
- <command name="vkGetPhysicalDeviceSurfaceFormats2KHR"/>
- </require>
- </extension>
- <extension name="VK_KHR_variable_pointers" number="121" author="KHR" contact="John Kessenich @johnk" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_variable_pointers_SPEC_VERSION"/>
- <enum value=""VK_KHR_variable_pointers"" name="VK_KHR_variable_pointers_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_122" number="122" author="KHR" contact="James Jones @cubanismo" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_122_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_122"" name="VK_KHR_EXTENSION_122_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_MVK_ios_surface" number="123" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_IOS_MVK" supported="vulkan" author="MVK" contact="Bill Hollings @billhollings">
- <require>
- <enum value="2" name="VK_MVK_IOS_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_MVK_ios_surface"" name="VK_MVK_IOS_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK"/>
- <type name="VkIOSSurfaceCreateFlagsMVK"/>
- <type name="VkIOSSurfaceCreateInfoMVK"/>
- <command name="vkCreateIOSSurfaceMVK"/>
- </require>
- </extension>
- <extension name="VK_MVK_macos_surface" number="124" type="instance" requires="VK_KHR_surface" protect="VK_USE_PLATFORM_MACOS_MVK" supported="vulkan" author="MVK" contact="Bill Hollings @billhollings">
- <require>
- <enum value="2" name="VK_MVK_MACOS_SURFACE_SPEC_VERSION"/>
- <enum value=""VK_MVK_macos_surface"" name="VK_MVK_MACOS_SURFACE_EXTENSION_NAME"/>
- <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK"/>
- <type name="VkMacOSSurfaceCreateFlagsMVK"/>
- <type name="VkMacOSSurfaceCreateInfoMVK"/>
- <command name="vkCreateMacOSSurfaceMVK"/>
- </require>
- </extension>
- <extension name="VK_MVK_moltenvk" number="125" type="instance" author="MVK" contact="Bill Hollings @billhollings" supported="disabled">
- <require>
- <enum value="0" name="VK_MVK_MOLTENVK_SPEC_VERSION"/>
- <enum value=""VK_MVK_moltenvk"" name="VK_MVK_MOLTENVK_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_MESA_extension_126" number="126" author="MESA" contact="Chad Versace @chadversary" supported="disabled">
- <require>
- <enum value="0" name="VK_MESA_EXTENSION_126_SPEC_VERSION"/>
- <enum value=""VK_MESA_extension_126"" name="VK_MESA_EXTENSION_126_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_MESA_extension_127" number="127" author="MESA" contact="Chad Versace @chadversary" supported="disabled">
- <require>
- <enum value="0" name="VK_MESA_EXTENSION_127_SPEC_VERSION"/>
- <enum value=""VK_MESA_extension_127"" name="VK_MESA_EXTENSION_127_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_128" number="128" author="KHR" contact="James Jones @cubanismo" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_128_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_128"" name="VK_KHR_EXTENSION_128_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_extension_129" number="129" author="LUNARG" contact="Mark Young @MarkY_LunarG" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_129_SPEC_VERSION"/>
- <enum value=""VK_EXT_extension_129"" name="VK_KHR_EXTENSION_129_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_130" number="130" author="KHR" contact="Jesse Hall @jessehall" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_130_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_130"" name="VK_KHR_EXTENSION_130_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_131" number="131" author="KHR" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_131_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_131"" name="VK_KHR_EXTENSION_131_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_132" number="132" author="KHR" contact="Jan-Harald Fredriksen @janharald" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_132_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_132"" name="VK_KHR_EXTENSION_132_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_133" number="133" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_133_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_133"" name="VK_AMD_EXTENSION_133_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_134" number="134" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_134_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_134"" name="VK_AMD_EXTENSION_134_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_135" number="135" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_135_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_135"" name="VK_AMD_EXTENSION_135_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_136" number="136" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_136_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_136"" name="VK_AMD_EXTENSION_136_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_137" number="137" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_137_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_137"" name="VK_AMD_EXTENSION_137_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_138" number="138" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_138_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_138"" name="VK_AMD_EXTENSION_138_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_139" number="139" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_139_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_139"" name="VK_AMD_EXTENSION_139_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_140" number="140" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_140_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_140"" name="VK_AMD_EXTENSION_140_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_141" number="141" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_141_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_141"" name="VK_AMD_EXTENSION_141_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_142" number="142" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_142_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_142"" name="VK_AMD_EXTENSION_142_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_143" number="143" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_143_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_143"" name="VK_AMD_EXTENSION_143_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_AMD_extension_144" number="144" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
- <require>
- <enum value="0" name="VK_AMD_EXTENSION_144_SPEC_VERSION"/>
- <enum value=""VK_AMD_extension_144"" name="VK_AMD_EXTENSION_144_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_relaxed_block_layout" number="145" author="KHR" contact="John Kessenich @johnk" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_relaxed_block_layout_SPEC_VERSION"/>
- <enum value=""VK_KHR_relaxed_block_layout"" name="VK_KHR_relaxed_block_layout_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_146" number="146" author="KHR" contact="Bill Licea-Kane @billl" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_extension_146_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_146"" name="VK_KHR_extension_146_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_147" number="147" author="KHR" contact="Jason Ekstrand @jekstrand" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_extension_147_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_147"" name="VK_KHR_extension_147_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_extension_148" number="148" author="EXT" contact="Jason Ekstrand @jekstrand" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_148_SPEC_VERSION"/>
- <enum value=""VK_EXT_extension_148"" name="VK_KHR_EXTENSION_148_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_149" number="149" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_149_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_149"" name="VK_NV_EXTENSION_149_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_150" number="150" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_150_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_150"" name="VK_NV_EXTENSION_150_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_151" number="151" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_151_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_151"" name="VK_NV_EXTENSION_151_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_152" number="152" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_152_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_152"" name="VK_NV_EXTENSION_152_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_153" number="153" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_153_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_153"" name="VK_NV_EXTENSION_153_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_154" number="154" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_154_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_154"" name="VK_NV_EXTENSION_154_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_155" number="155" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_155_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_155"" name="VK_NV_EXTENSION_155_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_NV_extension_156" number="156" author="NV" contact="Jeff Bolz @jbolz" supported="disabled">
- <require>
- <enum value="0" name="VK_NV_EXTENSION_156_SPEC_VERSION"/>
- <enum value=""VK_NV_extension_156"" name="VK_NV_EXTENSION_156_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_157" number="157" author="KHR" contact="Andrew Garrard @fluppeteer" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_157_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_157"" name="VK_KHR_EXTENSION_157_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_KHR_extension_158" number="158" author="KHR" contact="Tobias Hector @tobias" supported="disabled">
- <require>
- <enum value="0" name="VK_KHR_EXTENSION_158_SPEC_VERSION"/>
- <enum value=""VK_KHR_extension_158"" name="VK_KHR_EXTENSION_158_EXTENSION_NAME"/>
- </require>
- </extension>
- <extension name="VK_EXT_extension_159" number="159" author="EXT" contact="Chad Versace @chadversary" supported="disabled">
- <require>
- <enum value="0" name="VK_EXT_EXTENSION_159_SPEC_VERSION"/>
- <enum value=""VK_EXT_extension_159"" name="VK_EXT_EXTENSION_159_EXTENSION_NAME"/>
- </require>
- </extension>
- </extensions>
-</registry>
--
2.16.4
June 6, 2018
Re: [PATCH 4/4] msi: Implement deferral for standard and custom actions.
by Hans Leidekker
On Wed, 2018-06-06 at 00:59 -0500, Zebediah Figura wrote:
> Fixes https://bugs.winehq.org/show_bug.cgi?id=34989.
>
> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
> ---
> Tested for regressions against winetricks-test and Microsoft Office 2010.
The patch looks good but it introduces an error in the wine-mono installer:
0017:trace:msi:HANDLE_CustomType34 cmd L"rundll32 setupapi.dll,InstallHinfSection DefaultInstall 128 C:\\windows\\mono\\mono-2.0\\support\\dotnetfakedlls.inf" dir L"C:\\windows\\mono\\mono-2.0\\support\\"
0017:err:msi:execute_command unable to execute command 267
Looks like custom action INSTALLFAKEDLLS depended on the wrong order. Marking
it as a deferred custom action should fix that.
June 6, 2018
Re: [PATCH 3/4] msi: Store the current script in the package.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 6, 2018
Re: [PATCH 2/4] msi: Resolve source when executing InstallFiles.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 6, 2018
Re: [PATCH 1/4] msi/tests: Test that some actions cause resolution of SourceDir.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 6, 2018
Re: [PATCH] ntoskrnl: Have MmIsAddressValid use IsBadReadPtr.
by Thomas Faber
On 2018-06-06 04:36, Zhiyi Zhang wrote:
> The function is meant to be used in nt kernel space, however wineserver is
> in user space as far as I know. So we would need different implementation.
>
> May be we could do something like return !IsBadWritePtr(VirtualAddress, 1) || !IsBadReadPtr(VirtualAddress, 1).
> And write a test to verify such behavior.
IsBadReadPtr(x) implies IsBadWritePtr(x), since Windows does not have a
concept of "write-only" access to pages. So checking both seems
unnecessary.
The real difference between IsBadReadPtr and MmIsAddressValid is that
the former can actually _make_ the address valid by causing a page
fault (and paging in or zeroing the page). MmIsAddressValid on the
other hand would simply look at the current state of the page table
entry without side effects.
This stuff isn't hard to test per se, but a full test that's correct for
Windows kernel land will not currently work in Wine due to unimplemented
Mm stuff, e.g.
for (protection in [PAGE_NOACCESS, PAGE_READONLY, PAGE_READWRITE])
{
ZwAllocateVirtualMemory(..., &Base, ..., MEM_COMMIT, protection);
// physical page is not assigned until first access
todo_wine ok(!MmIsAddressValid(Base, 1), ...);
// force a physical page to appear and prevent it from getting paged out
mdl = IoAllocateMdl(Base, 1, FALSE, FALSE, NULL);
__TRY { MmProbeAndLockPages(mdl, UserMode, IoModifyAccess); todo_wine ok(protection != PAGE_NOACCESS, ...); }
__EXCEPT_PAGE_FAULT { ok(protection == PAGE_NOACCESS, ...); goto Next; }
// the system address is now guaranteed to be valid
todo_wine ok(MmIsAddressValid(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority), 1), ...);
MmUnlockPages...
Next:
IoFreeMdl...
ZwFreeVirtualMemory...
}
... has a todo with pretty much every ok(), with or without the patch :\
With some luck, the simpler
void test_function()
{
ok(MmIsAddressValid((void*)test_function, ...); // fails in master, succeeds with patch?
ptr = ExAllocatePoolWithTag(NonPagedPool, ...)
ok(MmIsAddressValid(ptr, ...);
ExFreePoolWithTag...
ok(!MmIsAddressValid(NULL), ...);
}
might be enough to show that the patch is correct though.
June 6, 2018
[PATCH] shellpath.c: Fix creation of HOME directory symbolic links
by Rob Walker
Fixes: https://bugs.winehq.org/show_bug.cgi?id=41668 (1)
https://bugs.winehq.org/show_bug.cgi?id=28216 (2)
(1) Introduces a "WINESYMLINK" env variable that allows a user to
control what shell folder links are created to the HOME folder, when
a WINEPREFIX is initially created.
The Wineprefix Shell Folders, that Wine symlinks to the user's HOME directory,
are only (re-)created on each Wine boot if they: do not pre-exist or are broken
symbolic links.
(2) The XDG Directory specification automatically falls back to the user HOME
directory for any XDG_*_DIR that does not exist (xdg-user-dirs-update).
The implemented solution is to block Wine from symlinking directly
to HOME directory.
Test on Gentoo GNU/Linux.
Signed-off-by: Rob Walker <bob.mt.wya(a)gmail.com>
---
dlls/shell32/shellpath.c | 554 ++++++++++++++++++++++++---------------
1 file changed, 343 insertions(+), 211 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index a551e93aa8..b8c74273c6 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -4326,252 +4326,259 @@ static HRESULT _SHRegisterCommonShellFolders(void)
}
/******************************************************************************
- * _SHAppendToUnixPath [Internal]
+ * append_to_unix_path [Internal]
*
- * Helper function for _SHCreateSymbolicLinks. Appends pwszSubPath (or the
- * corresponding resource, if IS_INTRESOURCE) to the unix base path 'szBasePath'
- * and replaces backslashes with slashes.
+ * Helper function for create_home_subdir_symbolic_link.
+ * Appends 'subpath', or the corresponding resource (if it is a
+ * resource identifier), to the Unix base path 'base_dir'.
+ * Replace backslashes with forward slashes.
*
* PARAMS
- * szBasePath [IO] The unix base path, which will be appended to (CP_UNXICP).
- * pwszSubPath [I] Sub-path or resource id (use MAKEINTRESOURCEW).
+ * base_dir [IO] The Unix base path, which will be appended to (CP_UNXICP).
+ * subpath [I] Sub-path or resource id (use MAKEINTRESOURCEW, pre-call).
*
* RETURNS
- * Success: TRUE,
+ * Success: TRUE
* Failure: FALSE
*/
-static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) {
- WCHAR wszSubPath[MAX_PATH];
- int cLen = strlen(szBasePath);
- char *pBackslash;
-
- if (IS_INTRESOURCE(pwszSubPath)) {
- if (!LoadStringW(shell32_hInstance, LOWORD(pwszSubPath), wszSubPath, MAX_PATH)) {
- /* Fall back to hard coded defaults. */
- switch (LOWORD(pwszSubPath)) {
- case IDS_PERSONAL:
- lstrcpyW(wszSubPath, DocumentsW);
- break;
- case IDS_MYMUSIC:
- lstrcpyW(wszSubPath, My_MusicW);
- break;
- case IDS_MYPICTURES:
- lstrcpyW(wszSubPath, My_PicturesW);
- break;
- case IDS_MYVIDEOS:
- lstrcpyW(wszSubPath, My_VideosW);
- break;
- default:
- ERR("LoadString(%d) failed!\n", LOWORD(pwszSubPath));
- return FALSE;
- }
+static inline BOOL append_to_unix_path(char *base_dir, LPCWSTR subpath)
+{
+ WCHAR ws_subpath[MAX_PATH];
+ int cLen = strlen(base_dir);
+ char *back_slash;
+
+ if (!IS_INTRESOURCE(subpath))
+ {
+ lstrcpyW(ws_subpath, subpath);
+ }
+ else if (!LoadStringW(shell32_hInstance, LOWORD(subpath), ws_subpath, MAX_PATH))
+ {
+ /* Fall back to hard coded defaults. */
+ switch (LOWORD(subpath)) {
+ case IDS_PERSONAL:
+ lstrcpyW(ws_subpath, DocumentsW);
+ break;
+ case IDS_MYMUSIC:
+ lstrcpyW(ws_subpath, My_MusicW);
+ break;
+ case IDS_MYPICTURES:
+ lstrcpyW(ws_subpath, My_PicturesW);
+ break;
+ case IDS_MYVIDEOS:
+ lstrcpyW(ws_subpath, My_VideosW);
+ break;
+ case IDS_DESKTOP:
+ lstrcpyW(ws_subpath, DesktopW);
+ break;
+ default:
+ ERR("LoadString(%d) failed!\n", LOWORD(subpath));
+ return FALSE;
}
- } else {
- lstrcpyW(wszSubPath, pwszSubPath);
}
-
- if (szBasePath[cLen-1] != '/') szBasePath[cLen++] = '/';
-
- if (!WideCharToMultiByte(CP_UNIXCP, 0, wszSubPath, -1, szBasePath + cLen,
+
+ if (!cLen || (base_dir[cLen-1] != '/')) base_dir[cLen++] = '/';
+
+ if (!WideCharToMultiByte(CP_UNIXCP, 0, ws_subpath, -1, base_dir + cLen,
FILENAME_MAX - cLen, NULL, NULL))
{
return FALSE;
}
-
- pBackslash = szBasePath + cLen;
- while ((pBackslash = strchr(pBackslash, '\\'))) *pBackslash = '/';
-
+
+ back_slash = base_dir + cLen;
+ while ((back_slash = strchr(back_slash, '\\'))) *back_slash = '/';
+
return TRUE;
}
/******************************************************************************
- * _SHCreateSymbolicLinks [Internal]
+ * compare_pathft_to_bootft [Internal]
*
- * Sets up symbol links for various shell folders to point into the users home
- * directory. We do an educated guess about what the user would probably want:
- * - If there is a 'My Documents' directory in $HOME, the user probably wants
- * wine's 'My Documents' to point there. Furthermore, we imply that the user
- * is a Windows lover and has no problem with wine creating 'My Pictures',
- * 'My Music' and 'My Videos' subfolders under '$HOME/My Documents', if those
- * do not already exits. We put appropriate symbolic links in place for those,
- * too.
- * - If there is no 'My Documents' directory in $HOME, we let 'My Documents'
- * point directly to $HOME. We assume the user to be a unix hacker who does not
- * want wine to create anything anywhere besides the .wine directory. So, if
- * there already is a 'My Music' directory in $HOME, we symlink the 'My Music'
- * shell folder to it. But if not, then we check XDG_MUSIC_DIR - "well known"
- * directory, and try to link to that. If that fails, then we symlink to
- * $HOME directly. The same holds fo 'My Pictures' and 'My Videos'.
- * - The Desktop shell folder is symlinked to XDG_DESKTOP_DIR. If that does not
- * exist, then we try '$HOME/Desktop'. If that does not exist, then we leave
- * it alone.
- * ('My Music',... above in fact means LoadString(IDS_MYMUSIC))
+ * Function to compare the FILETIME of ws_path (a Windows path) to the (estimated)
+ * Wine System boot time.
+ *
+ * PARAMS
+ * ws_path [I] The Windows path, for which provides the FS write time.
+ * time_difference [O] -1 Windows path last written before time of Wine boot.
+ * 0 Windows path last written at time of Wine boot.
+ * +1 Windows path last written after time of Wine boot.
+ * RETURNS
+ * Success: S_OK
+ * Failure: E_FAIL
+ *
+ * NOTES
+ * Pre-allocate storage for time_difference pointer variable externally.
*/
-static void _SHCreateSymbolicLinks(void)
-{
- UINT aidsMyStuff[] = { IDS_MYPICTURES, IDS_MYVIDEOS, IDS_MYMUSIC }, i;
- const WCHAR* MyOSXStuffW[] = { PicturesW, MoviesW, MusicW };
- int acsidlMyStuff[] = { CSIDL_MYPICTURES, CSIDL_MYVIDEO, CSIDL_MYMUSIC };
- static const char * const xdg_dirs[] = { "PICTURES", "VIDEOS", "MUSIC", "DOCUMENTS", "DESKTOP" };
- static const unsigned int num = ARRAY_SIZE(xdg_dirs);
- WCHAR wszTempPath[MAX_PATH];
- char szPersonalTarget[FILENAME_MAX], *pszPersonal;
- char szMyStuffTarget[FILENAME_MAX], *pszMyStuff;
- char szDesktopTarget[FILENAME_MAX], *pszDesktop;
- struct stat statFolder;
- const char *pszHome;
- HRESULT hr;
- char ** xdg_results;
- char * xdg_desktop_dir;
-
- /* Create all necessary profile sub-dirs up to 'My Documents' and get the unix path. */
- hr = SHGetFolderPathW(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL,
- SHGFP_TYPE_DEFAULT, wszTempPath);
- if (FAILED(hr)) return;
- pszPersonal = wine_get_unix_file_name(wszTempPath);
- if (!pszPersonal) return;
+static HRESULT compare_pathft_to_bootft(const WCHAR * ws_path, int * time_difference)
+{
+ static ULONG64 time_system_start = 0;
+ SYSTEMTIME system_time_st;
+ FILETIME dummy_ft, system_time_ft, last_write_ft;
+ ULONG64 tick_count, time_last_write;
+ HANDLE fhandle;
+ DWORD ft_errorc = 0;
- hr = XDG_UserDirLookup(xdg_dirs, num, &xdg_results);
- if (FAILED(hr)) xdg_results = NULL;
+ if (!time_difference) return E_FAIL;
- pszHome = getenv("HOME");
- if (pszHome && !stat(pszHome, &statFolder) && S_ISDIR(statFolder.st_mode))
+ if (!time_system_start)
{
- while (1)
+ tick_count = (ULONG64) GetTickCount64();
+ GetSystemTime(&system_time_st);
+ if (!SystemTimeToFileTime( &system_time_st, &system_time_ft))
{
- /* Check if there's already a Wine-specific 'My Documents' folder */
- strcpy(szPersonalTarget, pszHome);
- if (_SHAppendToUnixPath(szPersonalTarget, MAKEINTRESOURCEW(IDS_PERSONAL)) &&
- !stat(szPersonalTarget, &statFolder) && S_ISDIR(statFolder.st_mode))
- {
- /* '$HOME/My Documents' exists. Create 'My Pictures',
- * 'My Videos' and 'My Music' subfolders or fail silently if
- * they already exist.
- */
- for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++)
- {
- strcpy(szMyStuffTarget, szPersonalTarget);
- if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])))
- mkdir(szMyStuffTarget, 0777);
- }
- break;
- }
-
- /* Try to point to the XDG Documents folder */
- if (xdg_results && xdg_results[num-2] &&
- !stat(xdg_results[num-2], &statFolder) &&
- S_ISDIR(statFolder.st_mode))
- {
- strcpy(szPersonalTarget, xdg_results[num-2]);
- break;
- }
-
- /* Or the hardcoded / OS X Documents folder */
- strcpy(szPersonalTarget, pszHome);
- if (_SHAppendToUnixPath(szPersonalTarget, DocumentsW) &&
- !stat(szPersonalTarget, &statFolder) &&
- S_ISDIR(statFolder.st_mode))
- break;
-
- /* As a last resort point to $HOME. */
- strcpy(szPersonalTarget, pszHome);
- break;
+ ERR("SystemTimeToFileTime call failed (%d)\n", GetLastError());
+ return E_FAIL;
}
-
- /* Replace 'My Documents' directory with a symlink or fail silently if not empty. */
- remove(pszPersonal);
- symlink(szPersonalTarget, pszPersonal);
+ time_system_start = (((ULONG64)system_time_ft.dwHighDateTime) << 32)
+ + system_time_ft.dwLowDateTime
+ - (tick_count * 10000);
}
- else
+ fhandle = CreateFileW( ws_path, 0, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
+ if (fhandle == INVALID_HANDLE_VALUE)
{
- /* '$HOME' doesn't exist. Create 'My Pictures', 'My Videos' and 'My Music' subdirs
- * in '%USERPROFILE%\\My Documents' or fail silently if they already exist. */
- pszHome = NULL;
- strcpy(szPersonalTarget, pszPersonal);
- for (i = 0; i < ARRAY_SIZE(aidsMyStuff); i++) {
- strcpy(szMyStuffTarget, szPersonalTarget);
- if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])))
- mkdir(szMyStuffTarget, 0777);
- }
+ ERR("Open file handle failed for path: %s (%d)\n",
+ debugstr_w(ws_path), GetLastError());
+ return E_FAIL;
}
-
- /* Create symbolic links for 'My Pictures', 'My Videos' and 'My Music'. */
- for (i=0; i < ARRAY_SIZE(aidsMyStuff); i++)
+ if (!GetFileTime(fhandle, &dummy_ft, &dummy_ft, &last_write_ft))
+ ft_errorc = GetLastError();
+ if (!CloseHandle(fhandle))
{
- /* Create the current 'My Whatever' folder and get its unix path. */
- hr = SHGetFolderPathW(NULL, acsidlMyStuff[i]|CSIDL_FLAG_CREATE, NULL,
- SHGFP_TYPE_DEFAULT, wszTempPath);
- if (FAILED(hr)) continue;
-
- pszMyStuff = wine_get_unix_file_name(wszTempPath);
- if (!pszMyStuff) continue;
-
- while (1)
- {
- /* Check for the Wine-specific '$HOME/My Documents' subfolder */
- strcpy(szMyStuffTarget, szPersonalTarget);
- if (_SHAppendToUnixPath(szMyStuffTarget, MAKEINTRESOURCEW(aidsMyStuff[i])) &&
- !stat(szMyStuffTarget, &statFolder) && S_ISDIR(statFolder.st_mode))
- break;
+ ERR("Close file handle failed: %p (%d)\n",
+ fhandle, GetLastError());
+ return E_FAIL;
+ }
+ if (ft_errorc)
+ {
+ ERR("Get file time failed: %p (%d)\n",
+ fhandle, ft_errorc);
+ return E_FAIL;
+ }
+ time_last_write = (((ULONG64)last_write_ft.dwHighDateTime) << 32)
+ + last_write_ft.dwLowDateTime;
+ *time_difference = ((time_last_write > time_system_start) ? 1 :
+ ((time_last_write < time_system_start) ? -1 :
+ 0));
- /* Try the XDG_XXX_DIR folder */
- if (xdg_results && xdg_results[i])
- {
- strcpy(szMyStuffTarget, xdg_results[i]);
- break;
- }
+ return S_OK;
+}
- /* Or the OS X folder (these are never localized) */
- if (pszHome)
- {
- strcpy(szMyStuffTarget, pszHome);
- if (_SHAppendToUnixPath(szMyStuffTarget, MyOSXStuffW[i]) &&
- !stat(szMyStuffTarget, &statFolder) &&
- S_ISDIR(statFolder.st_mode))
- break;
- }
+/******************************************************************************
+ * create_homedir_symbolic_link [Internal]
+ *
+ * Creates a symbolic link from the current Wineprefix to an appropriate
+ * HOME subdirectory (if one is found).
+ *
+ * Creates 'XXXX' directory in Wineprefix.
+ * Then create a 'My XXXX' symbolic link in Wineprefix:
+ * 1) If '$HOME/XXXX' (IDS directory) exists then target this.
+ * 2) If '$HOME/XXXX' (XDG_XXXX_DIR) exists then target this.
+ * 3) If '$HOME/XXXX' (MacOS XXXX media directory) exists then target this.
+ *
+ * PARAMS
+ * env_enabled [I]
+ * TRUE The user has enabled this Shell Folder to be symlinked (default).
+ * FALSE The user has chosen to disable symlinking this Shell Folder.
+ * The Shell Folder will be created, in the current Wineprefix (if not pre-existing).
+ * ids_dir [I] Windows Resource Identifier code for current Shell Folder.
+ * csidl_dir [I] Constant Special Item ID List identifier for current Shell Folder.
+ * xdg_dir [I] Full path of external Unix XDG directory corresponding to current Shell Folder.
+ * ws_osx_dir [I] Fallback directory name to use, corresponding to current Shell Folder (OSX specific).
+ *
+ */
+void create_homedir_symbolic_link(BOOL env_enabled,
+ UINT ids_dir,
+ int csidl_dir,
+ const char * xdg_dir,
+ const WCHAR * ws_osx_dir)
+{
+ static const char * env_homedir = NULL;
+ WCHAR ws_temp_path[MAX_PATH];
+ char home_target[FILENAME_MAX], * prefix_dir;
+ struct stat stat_folder, stat_home_folder;
+ HRESULT hr;
+ BOOL target_ok;
+ int time_difference;
- /* As a last resort point to the same location as 'My Documents' */
- strcpy(szMyStuffTarget, szPersonalTarget);
- break;
+ hr = SHGetFolderPathW(NULL, csidl_dir, NULL,
+ SHGFP_TYPE_DEFAULT, ws_temp_path);
+ if (SUCCEEDED(hr))
+ {
+ if (ids_dir != IDS_DESKTOPDIRECTORY) return;
+
+ if ((compare_pathft_to_bootft(ws_temp_path, &time_difference) == S_OK)
+ && (time_difference < 0))
+ {
+ TRACE("%s directory created before wineboot\n",
+ debugstr_w(ws_temp_path));
+ return;
}
- remove(pszMyStuff);
- symlink(szMyStuffTarget, pszMyStuff);
- heap_free(pszMyStuff);
}
-
- /* Last but not least, the Desktop folder */
- if (pszHome)
- strcpy(szDesktopTarget, pszHome);
+ else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
+ {
+ hr = SHGetFolderPathW(NULL, csidl_dir|CSIDL_FLAG_CREATE, NULL,
+ SHGFP_TYPE_DEFAULT, ws_temp_path);
+ if (FAILED(hr)) return;
+ }
else
- strcpy(szDesktopTarget, pszPersonal);
- heap_free(pszPersonal);
+ {
+ ERR("Failed to get Wineprefix path corresponding to %d CSIDL\n",
+ csidl_dir);
+ return;
+ }
+ if (!env_enabled) return;
+ prefix_dir = wine_get_unix_file_name(ws_temp_path);
+ if (!prefix_dir)
+ {
+ ERR("Failed to get Unix Wineprefix directory for: %s\n",
+ debugstr_w(ws_temp_path));
+ return;
+ }
+ if (!env_homedir) env_homedir = getenv("HOME");
+ if (!(env_homedir
+ && (stat(env_homedir, &stat_home_folder) != 1)
+ && S_ISDIR(stat_home_folder.st_mode)))
+ {
+ if (prefix_dir) heap_free(prefix_dir);
+ return;
+ }
- xdg_desktop_dir = xdg_results ? xdg_results[num - 1] : NULL;
- if (xdg_desktop_dir ||
- (_SHAppendToUnixPath(szDesktopTarget, DesktopW) &&
- !stat(szDesktopTarget, &statFolder) && S_ISDIR(statFolder.st_mode)))
+ /* Check for:
+ * '$HOME/XXXX' (IDS directory)
+ * or '$HOME/XXXX' (XDG directory)
+ * or '$HOME/XXXX' (MacOS directory)
+ */
+ target_ok = FALSE;
+ strcpy(home_target, env_homedir);
+ if (append_to_unix_path(home_target, MAKEINTRESOURCEW(ids_dir))
+ && (stat(home_target, &stat_folder) != -1)
+ && S_ISDIR(stat_folder.st_mode))
{
- hr = SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, NULL,
- SHGFP_TYPE_DEFAULT, wszTempPath);
- if (SUCCEEDED(hr) && (pszDesktop = wine_get_unix_file_name(wszTempPath)))
- {
- remove(pszDesktop);
- if (xdg_desktop_dir)
- symlink(xdg_desktop_dir, pszDesktop);
- else
- symlink(szDesktopTarget, pszDesktop);
- heap_free(pszDesktop);
- }
+ target_ok = TRUE;
+ }
+ else if (xdg_dir && stat(xdg_dir, &stat_folder))
+ {
+ strcpy(home_target, xdg_dir);
+ /* Only link to the XDG directory, if it does not point directly
+ * to the user's HOME directory (XDG specification fallback path). */
+ target_ok = (stat_folder.st_ino != stat_home_folder.st_ino);
+ }
+ else
+ {
+ strcpy(home_target, env_homedir);
+ target_ok = append_to_unix_path(home_target, ws_osx_dir)
+ && (stat(home_target, &stat_folder) != -1)
+ && S_ISDIR(stat_folder.st_mode);
}
- /* Free resources allocated by XDG_UserDirLookup() */
- if (xdg_results)
+ if (target_ok)
{
- for (i = 0; i < num; i++)
- heap_free(xdg_results[i]);
- heap_free(xdg_results);
+ remove(prefix_dir);
+ symlink(home_target, prefix_dir);
}
+
+
+ if (prefix_dir) heap_free(prefix_dir);
}
/******************************************************************************
@@ -6126,15 +6133,139 @@ static void register_system_knownfolders(void)
}
}
+/******************************************************************************
+ * parse_symlinks_env_variable [Internal]
+ *
+ * PARAMS
+ * xdg_dir [I] Unix XDG directory name (without "XDG_" prefix and "_DIR" suffix).
+ *
+ * RETURNS
+ * TRUE "WINESYMLINK" contains the specified XDG directory string.
+ * FALSE "WINESYMLINK" does not contain the specified XDG directory string.
+ * Any error condition.
+ *
+ * Note: "WINESYMLINK", defaults to "ALL", when unset. This enables all symlinks.
+ * "WINESYMLINK" can also be manually set to "ALL", enabling all symlinks.
+ *
+ */
+static BOOL parse_symlinks_env_variable(const char * xdg_dir)
+{
+ static const char * matchall_env_var = "ALL";
+ static char env_var[MAX_PATH+1];
+ static char * env_winesymlink = NULL;
+ char * sstr, * sstr_stop, * tstr, * word_start = NULL;
+ char seperator_ch = '\0';
+ BOOL end_string, in_word = FALSE, matched = FALSE;
+ size_t slength = 0, matchall_length, xdg_dir_slength;
+
+ if (!xdg_dir) return matched;
+
+ if (!env_winesymlink)
+ {
+ env_winesymlink = getenv("WINESYMLINK");
+ if (!env_winesymlink) env_winesymlink = (char*) matchall_env_var;
+ tstr = env_var;
+ sstr_stop = env_winesymlink + MAX_PATH;
+ for (sstr = env_winesymlink; *sstr && (sstr != sstr_stop); ++sstr)
+ {
+ if (!seperator_ch && (ispunct(*sstr) || isspace(*sstr)))
+ seperator_ch = *sstr;
+ if (!isalpha(*sstr)) continue;
+
+ if (seperator_ch && in_word)
+ {
+ *tstr++ = seperator_ch;
+ ++slength;
+ }
+ in_word = TRUE;
+ seperator_ch = '\0';
+ *tstr++ = toupper(*sstr);
+ ++slength;
+ }
+ env_var[slength] = '\0';
+ }
+
+ TRACE("processed env variable: %s\n", debugstr_a(&env_var[0]));
+ matchall_length = strlen(matchall_env_var);
+ xdg_dir_slength = strlen(xdg_dir);
+ end_string = !(env_var[0]);
+ for (sstr = &env_var[0]; !end_string; ++sstr)
+ {
+ end_string = !(*(sstr+1));
+ in_word = isalpha(*sstr);
+ if (in_word && !word_start) word_start = sstr;
+ in_word = in_word && !end_string;
+ if (in_word || !word_start) continue;
+
+ slength = ((size_t) (sstr-word_start))+(end_string ? 1 : 0);
+ matched = ( (slength == xdg_dir_slength) && (strncmp(word_start, xdg_dir, slength) == 0) )
+ || ( (slength == matchall_length) && (strncmp(word_start, "ALL", slength) == 0) );
+ if (matched) break;
+
+ word_start = NULL;
+ }
+ TRACE("%s symlinking for %s\n", matched ? "Enabled" : "Disabled", debugstr_a(xdg_dir));
+
+ return matched;
+}
+
+/******************************************************************************
+ * create_homedir_symbolic_links [Internal]
+ *
+ * Parse WINESYMLINK env variable, for each XDG directory argument. To test if symlinking is
+ * enabled for that XDG directory / Wine Profile Folder.
+ * Then calls the function create_homedir_symbolic_link to potentially symlink from a Shell Folder,
+ * in the current Wineprefix, to a subdirectory of the current user's HOME directory.
+ *
+ * PARAMS
+ * xdg_dirnames [I] Pointer to an array of Unix XDG directory names
+ * (without "XDG_" prefix and "_DIR" suffix).
+ * xdg_dir_count [I] Item count of array (above).
+ *
+ */
+static void create_homedir_symbolic_links(const char * const xdg_dirnames[], const UINT xdg_dir_count)
+{
+ char ** xdg_dirs_array;
+ char * xdg_dir;
+ HRESULT hr;
+ UINT i;
+ BOOL env_enabled;
+
+ if (!xdg_dirnames) return;
+
+ hr = XDG_UserDirLookup(xdg_dirnames, xdg_dir_count, &xdg_dirs_array);
+ if (FAILED(hr)) xdg_dirs_array = NULL;
+
+ for (i = 0; i < xdg_dir_count; ++i)
+ {
+ env_enabled = parse_symlinks_env_variable(xdg_dirnames[i]);
+ xdg_dir = xdg_dirs_array ? xdg_dirs_array[i] : NULL;
+ if (!strcmp(xdg_dirnames[i],"DOCUMENTS"))
+ create_homedir_symbolic_link(env_enabled, IDS_PERSONAL, CSIDL_PERSONAL, xdg_dir, DocumentsW);
+ else if (!strcmp(xdg_dirnames[i],"PICTURES"))
+ create_homedir_symbolic_link(env_enabled, IDS_MYPICTURES, CSIDL_MYPICTURES, xdg_dir, PicturesW);
+ else if (!strcmp(xdg_dirnames[i],"VIDEOS"))
+ create_homedir_symbolic_link(env_enabled, IDS_MYVIDEOS, CSIDL_MYVIDEO, xdg_dir, MoviesW);
+ else if (!strcmp(xdg_dirnames[i],"MUSIC"))
+ create_homedir_symbolic_link(env_enabled, IDS_MYMUSIC, CSIDL_MYMUSIC, xdg_dir, MusicW);
+ else if (!strcmp(xdg_dirnames[i],"DESKTOP"))
+ create_homedir_symbolic_link(env_enabled, IDS_DESKTOPDIRECTORY, CSIDL_DESKTOPDIRECTORY, xdg_dir, DesktopW);
+ else
+ ERR("XDG directory name specifier invalid: %s\n", debugstr_a(xdg_dirnames[i]));
+ if (xdg_dir) heap_free(xdg_dirs_array[i]);
+ }
+ if (xdg_dirs_array) heap_free(xdg_dirs_array);
+}
+
HRESULT SHELL_RegisterShellFolders(void)
{
+ static const char * const xdg_dirnames[] = { "DOCUMENTS", "PICTURES", "VIDEOS", "MUSIC", "DESKTOP" };
+ const UINT xdg_dir_count = 5;
HRESULT hr;
- /* Set up '$HOME' targeted symlinks for 'My Documents', 'My Pictures',
- * 'My Videos', 'My Music' and 'Desktop' in advance, so that the
- * _SHRegister*ShellFolders() functions will find everything nice and clean
- * and thus will not attempt to create them in the profile directory. */
- _SHCreateSymbolicLinks();
+ /* Early setup of symlinks from specific User Shell Folders, in
+ * current Wineprefix, to subdirecties of the user's HOME directory. */
+ create_homedir_symbolic_links(xdg_dirnames, xdg_dir_count);
hr = _SHRegisterUserShellFolders(TRUE);
if (SUCCEEDED(hr))
@@ -6147,5 +6278,6 @@ HRESULT SHELL_RegisterShellFolders(void)
hr = set_folder_attributes();
if (SUCCEEDED(hr))
register_system_knownfolders();
+
return hr;
}
--
2.17.1
June 6, 2018
Re: [PATCH 4/4] msi: Implement deferral for standard and custom actions.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39008
Your paranoid android.
=== wvistau64_he (32 bit action) ===
action.c:2676: Test failed: Expected 20180605, got 20180606
action.c:2717: Test failed: Expected 20180605, got 20180606
action.c:2781: Test failed: Expected 20180605, got 20180606
action.c:2822: Test failed: Expected 20180605, got 20180606
June 6, 2018
[PATCH 2/2] schedsvc: Add support for running tasks at specified time.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 263 +++++++++++++++++++++++++++++++++++++++
dlls/schedsvc/schedsvc_private.h | 2 +
dlls/schedsvc/svc_main.c | 35 +++++-
3 files changed, 296 insertions(+), 4 deletions(-)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index 8f6cf03936..91ef3edca0 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -20,6 +20,7 @@
#include <stdarg.h>
+#define NONAMELESSUNION
#include "windef.h"
#include "atsvc.h"
#include "mstask.h"
@@ -90,6 +91,235 @@ static CRITICAL_SECTION_DEBUG cs_debug =
};
static CRITICAL_SECTION at_job_list_section = { &cs_debug, -1, 0, 0, 0, 0 };
+static void filetime_add_ms(FILETIME *ft, LONGLONG ms)
+{
+ union u_ftll
+ {
+ FILETIME ft;
+ LONGLONG ll;
+ } *ftll = (union u_ftll *)ft;
+
+ ftll->ll += ms * (ULONGLONG)10000;
+}
+
+static void filetime_add_minutes(FILETIME *ft, LONG minutes)
+{
+ filetime_add_ms(ft, (LONGLONG)minutes * 60 * 1000);
+}
+
+static void filetime_add_hours(FILETIME *ft, LONG hours)
+{
+ filetime_add_minutes(ft, (LONGLONG)hours * 60);
+}
+
+static void filetime_add_days(FILETIME *ft, LONG days)
+{
+ filetime_add_hours(ft, (LONGLONG)days * 24);
+}
+
+static void filetime_add_weeks(FILETIME *ft, ULONG weeks)
+{
+ filetime_add_days(ft, (LONGLONG)weeks * 7);
+}
+
+static void get_begin_time(const TASK_TRIGGER *trigger, FILETIME *ft)
+{
+ SYSTEMTIME st;
+
+ st.wYear = trigger->wBeginYear;
+ st.wMonth = trigger->wBeginMonth;
+ st.wDay = trigger->wBeginDay;
+ st.wDayOfWeek = 0;
+ st.wHour = 0;
+ st.wMinute = 0;
+ st.wSecond = 0;
+ st.wMilliseconds = 0;
+ SystemTimeToFileTime(&st, ft);
+}
+
+static void get_end_time(const TASK_TRIGGER *trigger, FILETIME *ft)
+{
+ SYSTEMTIME st;
+
+ if (!(trigger->rgFlags & TASK_TRIGGER_FLAG_HAS_END_DATE))
+ {
+ ft->dwHighDateTime = ~0u;
+ ft->dwLowDateTime = ~0u;
+ return;
+ }
+
+ st.wYear = trigger->wEndYear;
+ st.wMonth = trigger->wEndMonth;
+ st.wDay = trigger->wEndDay;
+ st.wDayOfWeek = 0;
+ st.wHour = 0;
+ st.wMinute = 0;
+ st.wSecond = 0;
+ st.wMilliseconds = 0;
+ SystemTimeToFileTime(&st, ft);
+}
+
+static BOOL trigger_get_next_runtime(const TASK_TRIGGER *trigger, const FILETIME *current_ft, FILETIME *rt)
+{
+ SYSTEMTIME st, current_st;
+ FILETIME begin_ft, end_ft, trigger_ft;
+
+ if (trigger->rgFlags & TASK_TRIGGER_FLAG_DISABLED)
+ return FALSE;
+
+ FileTimeToSystemTime(current_ft, ¤t_st);
+
+ get_begin_time(trigger, &begin_ft);
+ get_end_time(trigger, &end_ft);
+
+ switch (trigger->TriggerType)
+ {
+ case TASK_EVENT_TRIGGER_ON_IDLE:
+ case TASK_EVENT_TRIGGER_AT_SYSTEMSTART:
+ case TASK_EVENT_TRIGGER_AT_LOGON:
+ return FALSE;
+
+ case TASK_TIME_TRIGGER_ONCE:
+ st = current_st;
+ st.wHour = trigger->wStartHour;
+ st.wMinute = trigger->wStartMinute;
+ st.wSecond = 0;
+ st.wMilliseconds = 0;
+ SystemTimeToFileTime(&st, &trigger_ft);
+ if (CompareFileTime(&begin_ft, &trigger_ft) <= 0 && CompareFileTime(&trigger_ft, &end_ft) < 0)
+ {
+ *rt = trigger_ft;
+ return TRUE;
+ }
+ break;
+
+ case TASK_TIME_TRIGGER_DAILY:
+ st = current_st;
+ st.wHour = trigger->wStartHour;
+ st.wMinute = trigger->wStartMinute;
+ st.wSecond = 0;
+ st.wMilliseconds = 0;
+ SystemTimeToFileTime(&st, &trigger_ft);
+ while (CompareFileTime(&trigger_ft, &end_ft) < 0)
+ {
+ if (CompareFileTime(&trigger_ft, &begin_ft) >= 0)
+ {
+ *rt = trigger_ft;
+ return TRUE;
+ }
+
+ filetime_add_days(&trigger_ft, trigger->Type.Daily.DaysInterval);
+ }
+ break;
+
+ case TASK_TIME_TRIGGER_WEEKLY:
+ if (!trigger->Type.Weekly.rgfDaysOfTheWeek)
+ break; /* avoid infinite loop */
+
+ st = current_st;
+ st.wHour = trigger->wStartHour;
+ st.wMinute = trigger->wStartMinute;
+ st.wSecond = 0;
+ st.wMilliseconds = 0;
+ SystemTimeToFileTime(&st, &trigger_ft);
+ while (CompareFileTime(&trigger_ft, &end_ft) < 0)
+ {
+ FileTimeToSystemTime(&trigger_ft, &st);
+
+ if (CompareFileTime(&trigger_ft, &begin_ft) >= 0)
+ {
+ if (trigger->Type.Weekly.rgfDaysOfTheWeek & (1 << st.wDayOfWeek))
+ {
+ *rt = trigger_ft;
+ return TRUE;
+ }
+ }
+
+ if (st.wDayOfWeek == 0 && trigger->Type.Weekly.WeeksInterval > 1) /* Sunday, goto next week */
+ filetime_add_weeks(&trigger_ft, trigger->Type.Weekly.WeeksInterval - 1);
+ else /* check next weekday */
+ filetime_add_days(&trigger_ft, 1);
+ }
+ break;
+
+ default:
+ FIXME("trigger type %u is not handled\n", trigger->TriggerType);
+ break;
+ }
+
+ return FALSE;
+}
+
+static BOOL job_get_next_runtime(struct job_t *job, FILETIME *current_ft, FILETIME *next_rt)
+{
+ FILETIME trigger_rt;
+ BOOL have_next_rt = FALSE;
+ USHORT i;
+
+ for (i = 0; i < job->trigger_count; i++)
+ {
+ if (trigger_get_next_runtime(&job->trigger[i], current_ft, &trigger_rt))
+ {
+ if (!have_next_rt || CompareFileTime(&trigger_rt, next_rt) < 0)
+ {
+ *next_rt = trigger_rt;
+ have_next_rt = TRUE;
+ }
+ }
+ }
+
+ return have_next_rt;
+}
+
+/* Returns next runtime in UTC */
+BOOL get_next_runtime(LARGE_INTEGER *rt)
+{
+ FILETIME current_ft, job_rt, next_job_rt;
+ BOOL have_next_rt = FALSE;
+ struct job_t *job;
+
+ GetSystemTimeAsFileTime(¤t_ft);
+ FileTimeToLocalFileTime(¤t_ft, ¤t_ft);
+
+ EnterCriticalSection(&at_job_list_section);
+
+ LIST_FOR_EACH_ENTRY(job, &at_job_list, struct job_t, entry)
+ {
+ if (job_get_next_runtime(job, ¤t_ft, &job_rt))
+ {
+ if (!have_next_rt || CompareFileTime(&job_rt, &next_job_rt) < 0)
+ {
+ next_job_rt = job_rt;
+ have_next_rt = TRUE;
+ }
+ }
+ }
+
+ LeaveCriticalSection(&at_job_list_section);
+
+ if (have_next_rt)
+ {
+ LocalFileTimeToFileTime(&next_job_rt, &next_job_rt);
+ rt->u.LowPart = next_job_rt.dwLowDateTime;
+ rt->u.HighPart = next_job_rt.dwHighDateTime;
+ }
+
+ return have_next_rt;
+}
+
+static BOOL job_runs_at(struct job_t *job, FILETIME *begin_ft, FILETIME *end_ft)
+{
+ FILETIME job_ft;
+
+ if (job_get_next_runtime(job, begin_ft, &job_ft))
+ {
+ if (CompareFileTime(&job_ft, end_ft) < 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static DWORD load_unicode_strings(const char *data, DWORD limit, struct job_t *job)
{
DWORD i, data_size = 0;
@@ -729,6 +959,39 @@ void check_task_state(void)
LeaveCriticalSection(&at_job_list_section);
}
+static void run_job(struct job_t *job)
+{
+ job->data.flags |= 0x04000000;
+ update_job_status(job);
+}
+
+void check_task_time(void)
+{
+ FILETIME current_ft, begin_ft, end_ft;
+ struct job_t *job;
+
+ GetSystemTimeAsFileTime(¤t_ft);
+ FileTimeToLocalFileTime(¤t_ft, ¤t_ft);
+
+ /* Give -1/+1 minute margin */
+ begin_ft = current_ft;
+ filetime_add_minutes(&begin_ft, -1);
+ end_ft = current_ft;
+ filetime_add_minutes(&end_ft, 1);
+
+ EnterCriticalSection(&at_job_list_section);
+
+ LIST_FOR_EACH_ENTRY(job, &at_job_list, struct job_t, entry)
+ {
+ if (job_runs_at(job, &begin_ft, &end_ft))
+ {
+ run_job(job);
+ }
+ }
+
+ LeaveCriticalSection(&at_job_list_section);
+}
+
void remove_job(const WCHAR *name)
{
struct job_t *job;
diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h
index f5cec2a7cb..d601030e78 100644
--- a/dlls/schedsvc/schedsvc_private.h
+++ b/dlls/schedsvc/schedsvc_private.h
@@ -28,6 +28,8 @@ void remove_job(const WCHAR *name) DECLSPEC_HIDDEN;
void check_task_state(void) DECLSPEC_HIDDEN;
void add_process_to_queue(HANDLE hproc) DECLSPEC_HIDDEN;
void update_process_status(DWORD pid) DECLSPEC_HIDDEN;
+BOOL get_next_runtime(LARGE_INTEGER *rt) DECLSPEC_HIDDEN;
+void check_task_time(void) DECLSPEC_HIDDEN;
static inline WCHAR *heap_strdupW(const WCHAR *src)
{
diff --git a/dlls/schedsvc/svc_main.c b/dlls/schedsvc/svc_main.c
index 2298926193..0dfac818fd 100644
--- a/dlls/schedsvc/svc_main.c
+++ b/dlls/schedsvc/svc_main.c
@@ -46,12 +46,20 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
{
static const WCHAR tasksW[] = { '\\','T','a','s','k','s','\\',0 };
WCHAR path[MAX_PATH];
- HANDLE htasks, hport;
+ HANDLE htasks, hport, htimer;
JOBOBJECT_ASSOCIATE_COMPLETION_PORT info;
OVERLAPPED ov;
+ LARGE_INTEGER period;
TRACE("Starting...\n");
+ htimer = CreateWaitableTimerW(NULL, FALSE, NULL);
+ if (htimer == NULL)
+ {
+ ERR("CreateWaitableTimer failed\n");
+ return -1;
+ }
+
GetWindowsDirectoryW(path, MAX_PATH);
lstrcatW(path, tasksW);
@@ -98,7 +106,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
FILE_NOTIFY_INFORMATION data;
WCHAR name_buffer[MAX_PATH];
} info;
- HANDLE events[3];
+ HANDLE events[4];
DWORD ret;
/* the buffer must be DWORD aligned */
@@ -115,12 +123,22 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
FIXME("got multiple entries\n");
events[0] = done_event;
- events[1] = ov.hEvent;
+ events[1] = htimer;
events[2] = hport;
+ events[3] = ov.hEvent;
- ret = WaitForMultipleObjects(3, events, FALSE, INFINITE);
+ ret = WaitForMultipleObjects(4, events, FALSE, INFINITE);
+ /* Done event */
if (ret == WAIT_OBJECT_0) break;
+ /* Next runtime timer */
+ if (ret == WAIT_OBJECT_0 + 1)
+ {
+ check_task_time();
+ continue;
+ }
+
+ /* Job queue */
if (ret == WAIT_OBJECT_0 + 2)
{
DWORD msg;
@@ -139,6 +157,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
continue;
}
+ /* Directory change notification */
info.data.FileName[info.data.FileNameLength/sizeof(WCHAR)] = 0;
switch (info.data.Action)
@@ -176,8 +195,16 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
}
check_task_state();
+
+ if (get_next_runtime(&period))
+ {
+ if (!SetWaitableTimer(htimer, &period, 0, NULL, NULL, FALSE))
+ ERR("SetWaitableTimer failed\n");
+ }
}
+ CancelWaitableTimer(htimer);
+ CloseHandle(htimer);
CloseHandle(ov.hEvent);
CloseHandle(hport);
CloseHandle(hjob_queue);
--
2.16.3
June 6, 2018
[PATCH 1/2] schedsvc: Read triggers when loading a job file.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 61 ++++++++++++++++++++++++++++++---------------------
1 file changed, 36 insertions(+), 25 deletions(-)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index 9497c900a7..8f6cf03936 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -64,6 +64,8 @@ struct job_t
AT_ENUM info;
FIXDLEN_DATA data;
USHORT instance_count;
+ USHORT trigger_count;
+ TASK_TRIGGER *trigger;
};
struct running_job_t
@@ -143,7 +145,7 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
const FIXDLEN_DATA *fixed;
const SYSTEMTIME *st;
DWORD unicode_strings_size, data_size, triggers_size;
- USHORT triggers_count, i;
+ USHORT i;
const USHORT *signature;
const TASK_TRIGGER *trigger;
@@ -202,11 +204,10 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE("no space for triggers count\n");
return FALSE;
}
- triggers_count = *(const USHORT *)(data + fixed->trigger_offset);
- TRACE("triggers_count %u\n", triggers_count);
+ info->trigger_count = *(const USHORT *)(data + fixed->trigger_offset);
+ TRACE("trigger_count %u\n", info->trigger_count);
triggers_size = size - fixed->trigger_offset - sizeof(USHORT);
TRACE("triggers_size %u\n", triggers_size);
- trigger = (const TASK_TRIGGER *)(data + fixed->trigger_offset + sizeof(USHORT));
data += fixed->name_size_offset + unicode_strings_size;
size -= fixed->name_size_offset + unicode_strings_size;
@@ -249,42 +250,51 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
/* Trigger Data */
TRACE("trigger_offset %04x, triggers end at %04x\n", fixed->trigger_offset,
- (DWORD)(fixed->trigger_offset + sizeof(USHORT) + triggers_count * sizeof(TASK_TRIGGER)));
+ (DWORD)(fixed->trigger_offset + sizeof(USHORT) + info->trigger_count * sizeof(TASK_TRIGGER)));
- triggers_count = *(const USHORT *)data;
- TRACE("triggers_count %u\n", triggers_count);
+ info->trigger_count = *(const USHORT *)data;
+ TRACE("trigger_count %u\n", info->trigger_count);
trigger = (const TASK_TRIGGER *)(data + sizeof(USHORT));
- if (triggers_count * sizeof(TASK_TRIGGER) > triggers_size)
+ if (info->trigger_count * sizeof(TASK_TRIGGER) > triggers_size)
{
TRACE("no space for triggers data\n");
return FALSE;
}
- for (i = 0; i < triggers_count; i++)
+ info->trigger = heap_alloc(info->trigger_count * sizeof(info->trigger[0]));
+ if (!info->trigger)
+ {
+ TRACE("not enough memory for trigger data\n");
+ return FALSE;
+ }
+
+ for (i = 0; i < info->trigger_count; i++)
{
TRACE("%u: cbTriggerSize = %#x\n", i, trigger[i].cbTriggerSize);
if (trigger[i].cbTriggerSize != sizeof(TASK_TRIGGER))
TRACE("invalid cbTriggerSize\n");
TRACE("Reserved1 = %#x\n", trigger[i].Reserved1);
- TRACE("wBeginYear = %u\n", trigger->wBeginYear);
- TRACE("wBeginMonth = %u\n", trigger->wBeginMonth);
- TRACE("wBeginDay = %u\n", trigger->wBeginDay);
- TRACE("wEndYear = %u\n", trigger->wEndYear);
- TRACE("wEndMonth = %u\n", trigger->wEndMonth);
- TRACE("wEndDay = %u\n", trigger->wEndDay);
- TRACE("wStartHour = %u\n", trigger->wStartHour);
- TRACE("wStartMinute = %u\n", trigger->wStartMinute);
- TRACE("MinutesDuration = %u\n", trigger->MinutesDuration);
- TRACE("MinutesInterval = %u\n", trigger->MinutesInterval);
- TRACE("rgFlags = %u\n", trigger->rgFlags);
- TRACE("TriggerType = %u\n", trigger->TriggerType);
- TRACE("Reserved2 = %u\n", trigger->Reserved2);
- TRACE("wRandomMinutesInterval = %u\n", trigger->wRandomMinutesInterval);
+ TRACE("wBeginYear = %u\n", trigger[i].wBeginYear);
+ TRACE("wBeginMonth = %u\n", trigger[i].wBeginMonth);
+ TRACE("wBeginDay = %u\n", trigger[i].wBeginDay);
+ TRACE("wEndYear = %u\n", trigger[i].wEndYear);
+ TRACE("wEndMonth = %u\n", trigger[i].wEndMonth);
+ TRACE("wEndDay = %u\n", trigger[i].wEndDay);
+ TRACE("wStartHour = %u\n", trigger[i].wStartHour);
+ TRACE("wStartMinute = %u\n", trigger[i].wStartMinute);
+ TRACE("MinutesDuration = %u\n", trigger[i].MinutesDuration);
+ TRACE("MinutesInterval = %u\n", trigger[i].MinutesInterval);
+ TRACE("rgFlags = %u\n", trigger[i].rgFlags);
+ TRACE("TriggerType = %u\n", trigger[i].TriggerType);
+ TRACE("Reserved2 = %u\n", trigger[i].Reserved2);
+ TRACE("wRandomMinutesInterval = %u\n", trigger[i].wRandomMinutesInterval);
+
+ info->trigger[i] = trigger[i];
}
- size -= sizeof(USHORT) + triggers_count * sizeof(TASK_TRIGGER);
- data += sizeof(USHORT) + triggers_count * sizeof(TASK_TRIGGER);
+ size -= sizeof(USHORT) + info->trigger_count * sizeof(TASK_TRIGGER);
+ data += sizeof(USHORT) + info->trigger_count * sizeof(TASK_TRIGGER);
if (size < 2 * sizeof(USHORT) + 64)
{
@@ -353,6 +363,7 @@ static void free_job(struct job_t *job)
heap_free(job->name);
heap_free(job->params);
heap_free(job->curdir);
+ heap_free(job->trigger);
heap_free(job);
}
--
2.16.3
June 6, 2018
[PATCH 4/4] msi: Implement deferral for standard and custom actions.
by Zebediah Figura
Fixes https://bugs.winehq.org/show_bug.cgi?id=34989.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
Tested for regressions against winetricks-test and Microsoft Office 2010.
dlls/msi/action.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++--
dlls/msi/assembly.c | 6 ++++
dlls/msi/classes.c | 24 +++++++++++++
dlls/msi/custom.c | 1 +
dlls/msi/files.c | 18 ++++++++++
dlls/msi/font.c | 6 ++++
dlls/msi/msipriv.h | 1 +
dlls/msi/tests/custom.c | 70 +------------------------------------
dlls/msi/tests/install.c | 1 -
9 files changed, 143 insertions(+), 73 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 7c71800..b22be7a 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -105,8 +105,6 @@ static const WCHAR szIsolateComponents[] =
{'I','s','o','l','a','t','e','C','o','m','p','o','n','e','n','t','s',0};
static const WCHAR szMigrateFeatureStates[] =
{'M','i','g','r','a','t','e','F','e','a','t','u','r','e','S','t','a','t','e','s',0};
-static const WCHAR szMsiUnpublishAssemblies[] =
- {'M','s','i','U','n','p','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
static const WCHAR szInstallODBC[] =
{'I','n','s','t','a','l','l','O','D','B','C',0};
static const WCHAR szInstallServices[] =
@@ -824,6 +822,9 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szCreateFolders);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -903,6 +904,9 @@ static UINT ACTION_RemoveFolders( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveFolders);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -2977,6 +2981,9 @@ static UINT ACTION_WriteRegistryValues(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szWriteRegistryValues);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -3211,6 +3218,9 @@ static UINT ACTION_RemoveRegistryValues( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveRegistryValues);
+
rc = MSI_DatabaseOpenViewW( package->db, registry_query, &view );
if (rc == ERROR_SUCCESS)
{
@@ -3529,9 +3539,13 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
TRACE("\n");
- squash_guid( package->ProductCode, squashed_pc );
msi_set_sourcedir_props(package, FALSE);
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szProcessComponents);
+
+ squash_guid( package->ProductCode, squashed_pc );
+
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{
MSIRECORD *uirow;
@@ -3805,6 +3819,9 @@ static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterTypeLibraries);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -3866,6 +3883,9 @@ static UINT ACTION_UnregisterTypeLibraries( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterTypeLibraries);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4050,6 +4070,9 @@ static UINT ACTION_CreateShortcuts(MSIPACKAGE *package)
HRESULT res;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szCreateShortcuts);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4103,6 +4126,9 @@ static UINT ACTION_RemoveShortcuts( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveShortcuts);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4474,6 +4500,9 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
HKEY hukey = NULL, hudkey = NULL;
MSIRECORD *uirow;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPublishProduct);
+
if (!list_empty(&package->patches))
{
rc = msi_publish_patches(package);
@@ -4636,6 +4665,9 @@ static UINT ACTION_WriteIniValues(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szWriteIniValues);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4779,6 +4811,9 @@ static UINT ACTION_RemoveIniValues( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveIniValues);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc == ERROR_SUCCESS)
{
@@ -4864,6 +4899,9 @@ static UINT ACTION_SelfRegModules(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szSelfRegModules);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4914,6 +4952,9 @@ static UINT ACTION_SelfUnregModules( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szSelfUnregModules);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -4929,6 +4970,9 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
UINT rc;
HKEY hkey = NULL, userdata = NULL;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPublishFeatures);
+
if (!msi_check_publish(package))
return ERROR_SUCCESS;
@@ -5069,6 +5113,9 @@ static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package)
{
MSIFEATURE *feature;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnpublishFeatures);
+
if (!msi_check_unpublish(package))
return ERROR_SUCCESS;
@@ -5221,6 +5268,9 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
HKEY hkey, props, upgrade_key;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterProduct);
+
/* FIXME: also need to publish if the product is in advertise mode */
if (!msi_check_publish(package))
return ERROR_SUCCESS;
@@ -5538,6 +5588,9 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
{0},
};
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterUser);
+
if (msi_check_unpublish(package))
{
MSIREG_DeleteUserDataProductKey(package->ProductCode, package->Context);
@@ -5860,6 +5913,9 @@ static UINT ACTION_PublishComponents(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPublishComponents);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -5932,6 +5988,9 @@ static UINT ACTION_UnpublishComponents( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnpublishComponents);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6080,6 +6139,9 @@ static UINT ACTION_InstallServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szInstallServices);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6251,6 +6313,9 @@ static UINT ACTION_StartServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szStartServices);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6414,6 +6479,9 @@ static UINT ACTION_StopServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szStopServices);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6497,6 +6565,9 @@ static UINT ACTION_DeleteServices( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szDeleteServices);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -6767,6 +6838,9 @@ static UINT ACTION_InstallODBC( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szInstallODBC);
+
rc = MSI_DatabaseOpenViewW(package->db, driver_query, &view);
if (rc == ERROR_SUCCESS)
{
@@ -6945,6 +7019,9 @@ static UINT ACTION_RemoveODBC( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveODBC);
+
rc = MSI_DatabaseOpenViewW( package->db, driver_query, &view );
if (rc == ERROR_SUCCESS)
{
@@ -7291,6 +7368,9 @@ static UINT ACTION_WriteEnvironmentStrings( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szWriteEnvironmentStrings);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -7433,6 +7513,9 @@ static UINT ACTION_RemoveEnvironmentStrings( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveEnvironmentStrings);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c
index bccd114..59fd332 100644
--- a/dlls/msi/assembly.c
+++ b/dlls/msi/assembly.c
@@ -652,6 +652,9 @@ UINT ACTION_MsiPublishAssemblies( MSIPACKAGE *package )
{
MSICOMPONENT *comp;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szMsiPublishAssemblies);
+
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
{
LONG res;
@@ -717,6 +720,9 @@ UINT ACTION_MsiUnpublishAssemblies( MSIPACKAGE *package )
{
MSICOMPONENT *comp;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szMsiUnpublishAssemblies);
+
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
{
LONG res;
diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c
index 60cc3c1..293aa10 100644
--- a/dlls/msi/classes.c
+++ b/dlls/msi/classes.c
@@ -753,6 +753,9 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
MSICLASS *cls;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterClassInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -918,6 +921,9 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
HKEY hkey, hkey2;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterClassInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1083,6 +1089,9 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
MSIRECORD *uirow;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterProgIdInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1143,6 +1152,9 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
LONG res;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterProgIdInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1255,6 +1267,9 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
LONG res;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterExtensionInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1363,6 +1378,9 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
LONG res;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterExtensionInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1446,6 +1464,9 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
MSIMIME *mt;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterMIMEInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
@@ -1500,6 +1521,9 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
MSIMIME *mime;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterMIMEInfo);
+
r = load_classes_and_such( package );
if (r != ERROR_SUCCESS)
return r;
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 8deebe5..2d66409 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -1159,6 +1159,7 @@ static BOOL action_type_matches_script( UINT type, UINT script )
switch (script)
{
case SCRIPT_NONE:
+ return FALSE;
case SCRIPT_INSTALL:
return !(type & msidbCustomActionTypeCommit) && !(type & msidbCustomActionTypeRollback);
case SCRIPT_COMMIT:
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index f6cf3e7..5a88c14 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -359,6 +359,9 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
msi_set_sourcedir_props(package, FALSE);
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szInstallFiles);
+
schedule_install_files(package);
mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
@@ -584,6 +587,9 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package )
TRACE("%p\n", package);
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szPatchFiles);
+
mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
TRACE("extracting files\n");
@@ -1002,6 +1008,9 @@ UINT ACTION_MoveFiles( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szMoveFiles);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -1134,6 +1143,9 @@ UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szDuplicateFiles);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -1210,6 +1222,9 @@ UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package )
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveDuplicateFiles);
+
rc = MSI_DatabaseOpenViewW( package->db, query, &view );
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -1350,6 +1365,9 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
MSIFILE *file;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRemoveFiles);
+
r = MSI_DatabaseOpenViewW(package->db, query, &view);
if (r == ERROR_SUCCESS)
{
diff --git a/dlls/msi/font.c b/dlls/msi/font.c
index 5c1e59d..fc05006 100644
--- a/dlls/msi/font.c
+++ b/dlls/msi/font.c
@@ -294,6 +294,9 @@ UINT ACTION_RegisterFonts(MSIPACKAGE *package)
MSIQUERY *view;
UINT rc;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szRegisterFonts);
+
rc = MSI_DatabaseOpenViewW(package->db, query, &view);
if (rc != ERROR_SUCCESS)
return ERROR_SUCCESS;
@@ -374,6 +377,9 @@ UINT ACTION_UnregisterFonts( MSIPACKAGE *package )
MSIQUERY *view;
UINT r;
+ if (package->script == SCRIPT_NONE)
+ return msi_schedule_action(package, SCRIPT_INSTALL, szUnregisterFonts);
+
r = MSI_DatabaseOpenViewW( package->db, query, &view );
if (r != ERROR_SUCCESS)
return ERROR_SUCCESS;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 8acace3..93c4cea 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -1180,6 +1180,7 @@ static const WCHAR szWow6432NodeCLSID[] = {'W','o','w','6','4','3','2','N','o','
static const WCHAR szStreams[] = {'_','S','t','r','e','a','m','s',0};
static const WCHAR szStorages[] = {'_','S','t','o','r','a','g','e','s',0};
static const WCHAR szMsiPublishAssemblies[] = {'M','s','i','P','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
+static const WCHAR szMsiUnpublishAssemblies[] = {'M','s','i','U','n','p','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0};
static const WCHAR szCostingComplete[] = {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0};
static const WCHAR szTempFolder[] = {'T','e','m','p','F','o','l','d','e','r',0};
static const WCHAR szDatabase[] = {'D','A','T','A','B','A','S','E',0};
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 4d45c9e..cf1289e 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1163,52 +1163,42 @@ static BOOL pf_exists(const char *file)
UINT WINAPI cf_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\first"), "folder absent\n");
ok(hinst, pf_exists("msitest\\second"), "folder absent\n");
ok(hinst, pf_exists("msitest\\third"), "folder absent\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI cf_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\first"), "folder present\n");
ok(hinst, !pf_exists("msitest\\second"), "folder present\n");
ok(hinst, !pf_exists("msitest\\third"), "folder present\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI file_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\first\\one.txt"), "file absent\n");
ok(hinst, pf_exists("msitest\\second\\two.txt"), "file absent\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI file_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\first\\one.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\second\\two.txt"), "file present\n");
-}
return ERROR_SUCCESS;
}
UINT WINAPI crs_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut absent\n");
return ERROR_SUCCESS;
}
UINT WINAPI crs_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n");
return ERROR_SUCCESS;
}
@@ -1218,7 +1208,6 @@ UINT WINAPI sds_present(MSIHANDLE hinst)
SC_HANDLE manager, service;
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
service = OpenServiceA(manager, "TestService3", GENERIC_ALL);
-todo_wine
ok(hinst, !!service, "service absent: %u\n", GetLastError());
CloseServiceHandle(service);
CloseServiceHandle(manager);
@@ -1252,7 +1241,6 @@ UINT WINAPI sis_absent(MSIHANDLE hinst)
SC_HANDLE manager, service;
manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS);
service = OpenServiceA(manager, "TestService", GENERIC_ALL);
-todo_wine
ok(hinst, !service, "service present\n");
if (service) CloseServiceHandle(service);
CloseServiceHandle(manager);
@@ -1269,7 +1257,6 @@ UINT WINAPI sss_started(MSIHANDLE hinst)
service = OpenServiceA(manager, "Spooler", SC_MANAGER_ALL_ACCESS);
ret = QueryServiceStatus(service, &status);
ok(hinst, ret, "QueryServiceStatus failed: %u\n", GetLastError());
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, status.dwCurrentState == SERVICE_RUNNING, "got %u\n", status.dwCurrentState);
CloseServiceHandle(service);
@@ -1296,10 +1283,8 @@ UINT WINAPI sss_stopped(MSIHANDLE hinst)
UINT WINAPI rd_present(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\original2.txt"), "file absent\n");
ok(hinst, pf_exists("msitest\\duplicate.txt"), "file absent\n");
-}
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
return ERROR_SUCCESS;
@@ -1307,10 +1292,8 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
UINT WINAPI rd_absent(MSIHANDLE hinst)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\original2.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\duplicate.txt"), "file present\n");
-}
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
return ERROR_SUCCESS;
@@ -1333,10 +1316,8 @@ UINT WINAPI odbc_present(MSIHANDLE hinst)
if (!strcmp(p, "ODBC test driver2"))
gotdriver2 = 1;
}
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, gotdriver, "driver absent\n");
ok(hinst, gotdriver2, "driver 2 absent\n");
-}
return ERROR_SUCCESS;
}
@@ -1357,10 +1338,8 @@ UINT WINAPI odbc_absent(MSIHANDLE hinst)
if (!strcmp(p, "ODBC test driver2"))
gotdriver2 = 1;
}
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !gotdriver, "driver present\n");
ok(hinst, !gotdriver2, "driver 2 present\n");
-}
return ERROR_SUCCESS;
}
@@ -1373,10 +1352,8 @@ UINT WINAPI mov_present(MSIHANDLE hinst)
UINT WINAPI mov_absent(MSIHANDLE hinst)
{
-todo_wine {
ok(hinst, !pf_exists("msitest\\canada"), "file present\n");
ok(hinst, !pf_exists("msitest\\dominica"), "file present\n");
-}
return ERROR_SUCCESS;
}
@@ -1410,9 +1387,7 @@ UINT WINAPI pa_present(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &key);
ok(hinst, !res, "got %d\n", res);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, name_dotnet, "rcHQPHq?CA(a)Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]");
-}
RegCloseKey(key);
return ERROR_SUCCESS;
@@ -1427,9 +1402,7 @@ UINT WINAPI pa_absent(MSIHANDLE hinst)
ok(hinst, !res || res == ERROR_FILE_NOT_FOUND, "got %d\n", res);
if (!res)
{
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, name_dotnet, NULL);
-}
RegCloseKey(key);
}
return ERROR_SUCCESS;
@@ -1462,7 +1435,6 @@ UINT WINAPI ppc_absent(MSIHANDLE hinst)
UINT r;
r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
-todo_wine
ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r);
return ERROR_SUCCESS;
}
@@ -1474,12 +1446,10 @@ UINT WINAPI pub_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CURRENT_USER, pub_key, &key);
ok(hinst, !res, "got %u\n", res);
res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, NULL);
ok(hinst, !res, "got %u\n", res);
-}
RegCloseKey(key);
return ERROR_SUCCESS;
}
@@ -1490,7 +1460,6 @@ UINT WINAPI pub_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CURRENT_USER, pub_key, &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
}
@@ -1504,7 +1473,6 @@ UINT WINAPI pf_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pf_classkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
check_reg_str(hinst, key, "feature", "");
@@ -1516,7 +1484,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, "feature", "VGtfp^p+,?82(a)JU1j_KE");
check_reg_str(hinst, key, "montecristo", "VGtfp^p+,?82(a)JU1j_KE");
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1527,11 +1494,9 @@ UINT WINAPI pf_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pf_classkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, pf_userkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1560,7 +1525,6 @@ UINT WINAPI pp_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1571,7 +1535,6 @@ UINT WINAPI rci_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, !res, "got %u\n", res);
@@ -1584,7 +1547,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1594,7 +1556,6 @@ UINT WINAPI rci_absent(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
@@ -1604,7 +1565,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
-}
return ERROR_SUCCESS;
}
@@ -1614,7 +1574,6 @@ UINT WINAPI rei_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
@@ -1622,7 +1581,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1632,13 +1590,11 @@ UINT WINAPI rei_absent(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
-}
return ERROR_SUCCESS;
}
@@ -1653,7 +1609,6 @@ UINT WINAPI font_present(MSIHANDLE hinst)
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
res = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
@@ -1667,9 +1622,7 @@ UINT WINAPI font_absent(MSIHANDLE hinst)
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
ok(hinst, !res, "got %u\n", res);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, "msi test font", NULL);
-}
RegCloseKey(key);
return ERROR_SUCCESS;
@@ -1681,7 +1634,6 @@ UINT WINAPI rmi_present(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1693,7 +1645,6 @@ UINT WINAPI rmi_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1721,7 +1672,6 @@ UINT WINAPI rp_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY, &key);
-todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1732,7 +1682,6 @@ UINT WINAPI rpi_present(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, !res, "got %u\n", res);
@@ -1749,7 +1698,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key);
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
-}
return ERROR_SUCCESS;
}
@@ -1759,7 +1707,6 @@ UINT WINAPI rpi_absent(MSIHANDLE hinst)
HKEY key;
LONG res;
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
0, KEY_READ | KEY_WOW64_32KEY, &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
@@ -1772,7 +1719,6 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key);
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
-}
return ERROR_SUCCESS;
}
@@ -1799,7 +1745,6 @@ UINT WINAPI ru_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key);
-todo_wine
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1814,10 +1759,8 @@ UINT WINAPI tl_present(MSIHANDLE hinst)
HRESULT hr;
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, hr == S_OK, "got %#x\n", hr);
- if (tlb)
- ITypeLib_Release(tlb);
+ ITypeLib_Release(tlb);
return ERROR_SUCCESS;
}
@@ -1828,7 +1771,6 @@ UINT WINAPI tl_absent(MSIHANDLE hinst)
HRESULT hr;
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, hr == TYPE_E_LIBNOTREGISTERED, "got %#x\n", hr);
return ERROR_SUCCESS;
@@ -1840,7 +1782,6 @@ UINT WINAPI sr_present(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
RegCloseKey(key);
@@ -1853,7 +1794,6 @@ UINT WINAPI sr_absent(MSIHANDLE hinst)
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
@@ -1866,10 +1806,8 @@ UINT WINAPI env_present(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key);
ok(hinst, !res, "got %u\n", res);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, "MSITESTVAR3", "1");
check_reg_str(hinst, key, "MSITESTVAR4", "1");
-}
RegCloseKey(key);
return ERROR_SUCCESS;
@@ -1882,10 +1820,8 @@ UINT WINAPI env_absent(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key);
ok(hinst, !res, "got %u\n", res);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
check_reg_str(hinst, key, "MSITESTVAR3", NULL);
check_reg_str(hinst, key, "MSITESTVAR4", NULL);
-}
RegCloseKey(key);
return ERROR_SUCCESS;
@@ -1901,7 +1837,6 @@ UINT WINAPI ini_present(MSIHANDLE hinst)
strcat(path, "\\msitest\\test.ini");
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), path);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, len == 6, "got %u\n", len);
return ERROR_SUCCESS;
@@ -1917,7 +1852,6 @@ UINT WINAPI ini_absent(MSIHANDLE hinst)
strcat(path, "\\msitest\\test.ini");
len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), path);
-todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !len, "got %u\n", len);
return ERROR_SUCCESS;
@@ -1930,7 +1864,6 @@ UINT WINAPI wrv_present(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, "msitest", &key);
ok(hinst, !res, "got %u\n", res);
- todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
check_reg_str(hinst, key, "sz", "string");
RegCloseKey(key);
@@ -1944,7 +1877,6 @@ UINT WINAPI wrv_absent(MSIHANDLE hinst)
res = RegOpenKeyA(HKEY_CURRENT_USER, "msitest", &key);
ok(hinst, !res, "got %u\n", res);
- todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
check_reg_str(hinst, key, "sz", NULL);
RegCloseKey(key);
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 3eb6c80..d56a5ae 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -6077,7 +6077,6 @@ static void test_deferred_action(void)
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-todo_wine
check_file_matches(file, "onetwo");
ok(DeleteFileA(file), "Directory not created\n");
--
2.7.4
June 6, 2018
[PATCH 3/4] msi: Store the current script in the package.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
This partially restores e1e668d41fce1dbd0270cd9de0d880a236ddb869, and
partially reverts f25501db4b9f79b69a6c569ab418e6f5a4d8fc94. It should not
however cause any change in behaviour.
dlls/msi/action.c | 25 +++++++++++++++----------
dlls/msi/custom.c | 4 ++--
dlls/msi/dialog.c | 2 +-
dlls/msi/install.c | 2 +-
dlls/msi/msi.c | 6 +++---
dlls/msi/msipriv.h | 5 +++--
dlls/msi/package.c | 1 +
7 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index ddd676d..7c71800 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -510,7 +510,7 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
return ERROR_SUCCESS;
}
- rc = ACTION_PerformAction(package, action, SCRIPT_NONE);
+ rc = ACTION_PerformAction(package, action);
msi_dialog_check_messages( NULL );
@@ -604,7 +604,7 @@ static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
/********************************************************
* ACTION helper functions and functions that perform the actions
*******************************************************/
-static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script)
+static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action)
{
UINT arc;
INT uirc;
@@ -613,7 +613,7 @@ static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action, UINT
if (uirc == IDCANCEL)
return ERROR_INSTALL_USEREXIT;
ui_actioninfo(package, action, TRUE, 0);
- arc = ACTION_CustomAction( package, action, script );
+ arc = ACTION_CustomAction(package, action);
uirc = !arc;
if (arc == ERROR_FUNCTION_NOT_CALLED && needs_ui_sequence(package))
@@ -1546,11 +1546,13 @@ static UINT execute_script( MSIPACKAGE *package, UINT script )
TRACE("executing script %u\n", script);
+ package->script = script;
+
if (script == SCRIPT_ROLLBACK)
{
for (i = package->script_actions_count[script]; i > 0; i--)
{
- rc = ACTION_PerformAction(package, package->script_actions[script][i-1], script);
+ rc = ACTION_PerformAction(package, package->script_actions[script][i-1]);
if (rc != ERROR_SUCCESS)
{
ERR("Execution of script %i halted; action %s returned %u\n",
@@ -1563,7 +1565,7 @@ static UINT execute_script( MSIPACKAGE *package, UINT script )
{
for (i = 0; i < package->script_actions_count[script]; i++)
{
- rc = ACTION_PerformAction(package, package->script_actions[script][i], script);
+ rc = ACTION_PerformAction(package, package->script_actions[script][i]);
if (rc != ERROR_SUCCESS)
{
ERR("Execution of script %i halted; action %s returned %u\n",
@@ -1572,6 +1574,9 @@ static UINT execute_script( MSIPACKAGE *package, UINT script )
}
}
}
+
+ package->script = SCRIPT_NONE;
+
msi_free_action_script(package, script);
return rc;
}
@@ -5672,7 +5677,7 @@ static UINT ACTION_ExecuteAction(MSIPACKAGE *package)
msiobj_release(&uirow->hdr);
}
else
- rc = ACTION_PerformAction(package, action, SCRIPT_NONE);
+ rc = ACTION_PerformAction(package, action);
/* Send all set properties. */
if (!MSI_OpenQuery(package->db, &view, prop_query))
@@ -7919,7 +7924,7 @@ static UINT ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action)
return rc;
}
-UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
+UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action)
{
UINT rc;
@@ -7929,7 +7934,7 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
rc = ACTION_HandleStandardAction(package, action);
if (rc == ERROR_FUNCTION_NOT_CALLED)
- rc = ACTION_HandleCustomAction(package, action, script);
+ rc = ACTION_HandleCustomAction(package, action);
if (rc == ERROR_FUNCTION_NOT_CALLED)
WARN("unhandled msi action %s\n", debugstr_w(action));
@@ -7982,7 +7987,7 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq)
return ERROR_FUNCTION_FAILED;
}
- rc = ACTION_PerformAction(package, action, SCRIPT_NONE);
+ rc = ACTION_PerformAction(package, action);
msiobj_release(&row->hdr);
}
@@ -8071,7 +8076,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
msi_set_property( package->db, szRollbackDisabled, szOne, -1 );
}
- rc = ACTION_PerformAction(package, action, SCRIPT_NONE);
+ rc = ACTION_PerformAction(package, action);
/* process the ending type action */
if (rc == ERROR_SUCCESS)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 07916ac..8deebe5 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -1208,7 +1208,7 @@ static UINT defer_custom_action( MSIPACKAGE *package, const WCHAR *action, UINT
return ERROR_SUCCESS;
}
-UINT ACTION_CustomAction( MSIPACKAGE *package, LPCWSTR action, UINT script )
+UINT ACTION_CustomAction(MSIPACKAGE *package, const WCHAR *action)
{
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
@@ -1248,7 +1248,7 @@ UINT ACTION_CustomAction( MSIPACKAGE *package, LPCWSTR action, UINT script )
if (type & msidbCustomActionTypeNoImpersonate)
WARN("msidbCustomActionTypeNoImpersonate not handled\n");
- if (!action_type_matches_script( type, script ))
+ if (!action_type_matches_script(type, package->script))
{
rc = defer_custom_action( package, action, type );
goto end;
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 61c6ab0..1e78aa9 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -4363,7 +4363,7 @@ static UINT event_spawn_wait_dialog( msi_dialog *dialog, const WCHAR *argument )
static UINT event_do_action( msi_dialog *dialog, const WCHAR *argument )
{
- ACTION_PerformAction( dialog->package, argument, SCRIPT_NONE );
+ ACTION_PerformAction(dialog->package, argument);
return ERROR_SUCCESS;
}
diff --git a/dlls/msi/install.c b/dlls/msi/install.c
index e043c04..0e224c9 100644
--- a/dlls/msi/install.c
+++ b/dlls/msi/install.c
@@ -83,7 +83,7 @@ UINT WINAPI MsiDoActionW( MSIHANDLE hInstall, LPCWSTR szAction )
return remote_DoAction(remote, szAction);
}
- ret = ACTION_PerformAction( package, szAction, SCRIPT_NONE );
+ ret = ACTION_PerformAction(package, szAction);
msiobj_release( &package->hdr );
return ret;
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 2ec94a1..2ae4db2 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -3742,7 +3742,7 @@ UINT WINAPI MsiCollectUserInfoW(LPCWSTR szProduct)
if (!package)
return ERROR_CALL_NOT_IMPLEMENTED;
- rc = ACTION_PerformAction(package, szFirstRun, SCRIPT_NONE);
+ rc = ACTION_PerformAction(package, szFirstRun);
msiobj_release( &package->hdr );
MsiCloseHandle(handle);
@@ -3768,7 +3768,7 @@ UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
if (!package)
return ERROR_CALL_NOT_IMPLEMENTED;
- rc = ACTION_PerformAction(package, szFirstRun, SCRIPT_NONE);
+ rc = ACTION_PerformAction(package, szFirstRun);
msiobj_release( &package->hdr );
MsiCloseHandle(handle);
@@ -3849,7 +3849,7 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLST
MsiSetInternalUI( INSTALLUILEVEL_BASIC, NULL );
- r = ACTION_PerformAction( package, szCostInitialize, SCRIPT_NONE );
+ r = ACTION_PerformAction(package, szCostInitialize);
if (r != ERROR_SUCCESS)
goto end;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 707144f..8acace3 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -414,6 +414,7 @@ typedef struct tagMSIPACKAGE
struct list mimes;
struct list appids;
+ enum script script;
LPWSTR *script_actions[SCRIPT_MAX];
int script_actions_count[SCRIPT_MAX];
LPWSTR *unique_actions;
@@ -975,9 +976,9 @@ extern WCHAR *gszLogFile DECLSPEC_HIDDEN;
extern HINSTANCE msi_hInstance DECLSPEC_HIDDEN;
/* action related functions */
-extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script) DECLSPEC_HIDDEN;
+extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action) DECLSPEC_HIDDEN;
extern void ACTION_FinishCustomActions( const MSIPACKAGE* package) DECLSPEC_HIDDEN;
-extern UINT ACTION_CustomAction(MSIPACKAGE *, const WCHAR *, UINT) DECLSPEC_HIDDEN;
+extern UINT ACTION_CustomAction(MSIPACKAGE *package, const WCHAR *action) DECLSPEC_HIDDEN;
/* actions in other modules */
extern UINT ACTION_AppSearch(MSIPACKAGE *package) DECLSPEC_HIDDEN;
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 2801efa..840e4a7 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1119,6 +1119,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
msi_load_admin_properties( package );
package->log_file = INVALID_HANDLE_VALUE;
+ package->script = SCRIPT_NONE;
}
return package;
}
--
2.7.4
June 6, 2018
[PATCH 2/4] msi: Resolve source when executing InstallFiles.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
This test already succeeds on Wine, but won't once InstallFiles is deferred.
This fixes the failure originally reported in automation.c here:
https://www.winehq.org/pipermail/wine-devel/2017-October/119159.html
In truth that test is broken and should call ResolveSource, but this way
we at least help prevent the possibility of regressions.
dlls/msi/files.c | 2 ++
dlls/msi/tests/install.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index adffcaf..f6cf3e7 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -357,6 +357,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
UINT rc = ERROR_SUCCESS;
MSIFILE *file;
+ msi_set_sourcedir_props(package, FALSE);
+
schedule_install_files(package);
mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index af37d93..3eb6c80 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -1328,6 +1328,7 @@ static const CHAR sr_install_exec_seq_dat[] =
"sourcedir_unset\tSourceDir\t700\n"
"ResolveSource\tRESOLVE_SOURCE\t800\n"
"ProcessComponents\tPROCESS_COMPONENTS\t800\n"
+ "InstallFiles\tINSTALL_FILES\t800\n"
"sourcedir_set\tNOT SourceDir\t900\n"
"InstallFinalize\t\t1000\n";
@@ -6166,6 +6167,10 @@ static void test_source_resolution(void)
r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1");
ok(r == ERROR_SUCCESS, "got %u\n", r);
+ r = MsiInstallProductA(msifile, "INSTALL_FILES=1");
+ ok(r == ERROR_SUCCESS, "got %u\n", r);
+
+ delete_pf_files();
delete_test_files();
DeleteFileA(msifile);
}
--
2.7.4
June 6, 2018
[PATCH 1/4] msi/tests: Test that some actions cause resolution of SourceDir.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/msi/tests/install.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index a4726d6..af37d93 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -1316,6 +1316,28 @@ static const CHAR x64_directory_dat[] =
"ProgramFiles64Folder\tTARGETDIR\t.\n"
"TARGETDIR\t\tSourceDir";
+static const CHAR sr_install_exec_seq_dat[] =
+ "Action\tCondition\tSequence\n"
+ "s72\tS255\tI2\n"
+ "InstallExecuteSequence\tAction\n"
+ "CostInitialize\t\t200\n"
+ "FileCost\t\t300\n"
+ "CostFinalize\t\t400\n"
+ "InstallValidate\t\t500\n"
+ "InstallInitialize\t\t600\n"
+ "sourcedir_unset\tSourceDir\t700\n"
+ "ResolveSource\tRESOLVE_SOURCE\t800\n"
+ "ProcessComponents\tPROCESS_COMPONENTS\t800\n"
+ "sourcedir_set\tNOT SourceDir\t900\n"
+ "InstallFinalize\t\t1000\n";
+
+static const CHAR sr_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "sourcedir_unset\t19\t\tSourceDir should not be set\n"
+ "sourcedir_set\t19\t\tSourceDir should be set\n";
+
static const msi_table tables[] =
{
ADD_TABLE(component),
@@ -1984,6 +2006,19 @@ static const msi_table x64_tables[] =
ADD_TABLE(install_exec_seq),
};
+static const msi_table sr_tables[] =
+{
+ ADD_TABLE(media),
+ ADD_TABLE(directory),
+ ADD_TABLE(file),
+ ADD_TABLE(component),
+ ADD_TABLE(feature),
+ ADD_TABLE(feature_comp),
+ ADD_TABLE(property),
+ ADD_TABLE(sr_install_exec_seq),
+ ADD_TABLE(sr_custom_action),
+};
+
/* cabinet definitions */
/* make the max size large so there is only one cab file */
@@ -6109,6 +6144,32 @@ error:
DeleteFileA(msifile);
}
+/* Test what actions cause resolution of SourceDir when executed. */
+static void test_source_resolution(void)
+{
+ UINT r;
+
+ if (is_process_limited())
+ {
+ skip( "process is limited\n" );
+ return;
+ }
+
+ create_test_files();
+ create_database(msifile, sr_tables, sizeof(sr_tables) / sizeof(msi_table));
+
+ MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
+
+ r = MsiInstallProductA(msifile, "RESOLVE_SOURCE=1");
+ ok(r == ERROR_SUCCESS, "got %u\n", r);
+
+ r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1");
+ ok(r == ERROR_SUCCESS, "got %u\n", r);
+
+ delete_test_files();
+ DeleteFileA(msifile);
+}
+
START_TEST(install)
{
DWORD len;
@@ -6200,6 +6261,7 @@ START_TEST(install)
test_feature_tree();
test_deferred_action();
test_wow64();
+ test_source_resolution();
DeleteFileA(customdll);
--
2.7.4
June 6, 2018
Re: [PATCH] ntoskrnl: Have MmIsAddressValid use IsBadReadPtr.
by Zhiyi Zhang
Hi Derek,
I don't think MSDN incorrectly documents this function.
The function is meant to be used in nt kernel space, however wineserver is
in user space as far as I know. So we would need different implementation.
May be we could do something like return !IsBadWritePtr(VirtualAddress, 1) || !IsBadReadPtr(VirtualAddress, 1).
And write a test to verify such behavior.
Regards,
Zhiyi
On Tue 6 5 23:35, Derek Lesho wrote:
> Side note, while this change does not follow the MSDN, it appears that the
> MSDN incorrectly documents the function.
>
> This blog post from 2006 explains more:
> https://blogs.msdn.microsoft.com/doronh/2006/03/09/beware-the-shiny-light-t…
>
> On Tue, Jun 5, 2018 at 11:14 AM, Derek Lesho <dereklesho52(a)gmail.com> wrote:
>
>> Fixes an error inside EasyAntiCheat.sys, which uses MmIsAddressValid on
>> ntoskrnl.exe, to find its base address. Wine will always return FALSE,
>> because it checks for write access to ntoskrnl, when all the driver
>> needs is read access
>>
>> Tested on Arch Linux
>>
>> Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com>
>> ---
>> dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
>> index 55027c5..e4c1c35 100644
>> --- a/dlls/ntoskrnl.exe/ntoskrnl.c
>> +++ b/dlls/ntoskrnl.exe/ntoskrnl.c
>> @@ -2164,7 +2164,7 @@ void WINAPI MmFreeNonCachedMemory( void *addr,
>> SIZE_T size )
>> BOOLEAN WINAPI MmIsAddressValid(PVOID VirtualAddress)
>> {
>> TRACE("(%p)\n", VirtualAddress);
>> - return !IsBadWritePtr(VirtualAddress, 1);
>> + return !IsBadReadPtr(VirtualAddress, 1);
>> }
>>
>> /***********************************************************************
>> --
>> 2.7.4
>>
>>
>
>
>
>
June 6, 2018
Re: [PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Alistair Leslie-Hughes
Hi Matteo,
On 06/06/18 08:32, Matteo Bruni wrote:
> Signed-of
> {
> - GL_EXTCALL(glBindFragDataLocation(program_id, 0, "ps_out"));
> - checkGLcall("glBindFragDataLocation");
> + for (i = 0; i < MAX_RENDER_TARGET_VIEWS; ++i)
Is there a reason why MAX_RENDER_TARGET_VIEWS is used instead of
"gl_info->limits.buffers"?
Regards
Alistair.
June 6, 2018
Re: [PATCH 5/5] d3d11/tests: Add test for negative viewport coordinates.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39001
Your paranoid android.
=== build (build) ===
Could not determine the test executable's base name
June 5, 2018
[PATCH 3/3] kernel32: Implement Wow64SetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/thread.c | 116 ++++++++++++++++++++++++++++++++++++++++++++
include/winbase.h | 1 +
3 files changed, 118 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 1cb0b54..de6f007 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1603,7 +1603,7 @@
@ stdcall Wow64GetThreadContext(long ptr)
# @ stub Wow64GetThreadSelectorEntry
@ stdcall Wow64RevertWow64FsRedirection(ptr)
-# @ stub Wow64SetThreadContext
+@ stdcall Wow64SetThreadContext(long ptr)
# @ stub Wow64SuspendThread
@ stdcall WriteConsoleA(long ptr long ptr ptr)
@ stdcall WriteConsoleInputA(long ptr long ptr)
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index caeec63..838cf0f 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -235,6 +235,122 @@ BOOL WINAPI SetThreadContext( HANDLE handle, /* [in] Handle to thread
}
+static NTSTATUS wow64_context_to_server( context_t *to, const WOW64_CONTEXT *from )
+{
+ DWORD flags = from->ContextFlags & ~WOW64_CONTEXT_i386; /* get rid of CPU id */
+
+ memset( to, 0, sizeof(*to) );
+ to->cpu = CPU_x86;
+
+ if (flags & WOW64_CONTEXT_CONTROL)
+ {
+ to->flags |= SERVER_CTX_CONTROL;
+ to->ctl.i386_regs.ebp = from->Ebp;
+ to->ctl.i386_regs.esp = from->Esp;
+ to->ctl.i386_regs.eip = from->Eip;
+ to->ctl.i386_regs.cs = from->SegCs;
+ to->ctl.i386_regs.ss = from->SegSs;
+ to->ctl.i386_regs.eflags = from->EFlags;
+ }
+ if (flags & WOW64_CONTEXT_INTEGER)
+ {
+ to->flags |= SERVER_CTX_INTEGER;
+ to->integer.i386_regs.eax = from->Eax;
+ to->integer.i386_regs.ebx = from->Ebx;
+ to->integer.i386_regs.ecx = from->Ecx;
+ to->integer.i386_regs.edx = from->Edx;
+ to->integer.i386_regs.esi = from->Esi;
+ to->integer.i386_regs.edi = from->Edi;
+ }
+ if (flags & WOW64_CONTEXT_SEGMENTS)
+ {
+ to->flags |= SERVER_CTX_SEGMENTS;
+ to->seg.i386_regs.ds = from->SegDs;
+ to->seg.i386_regs.es = from->SegEs;
+ to->seg.i386_regs.fs = from->SegFs;
+ to->seg.i386_regs.gs = from->SegGs;
+ }
+ if (flags & WOW64_CONTEXT_FLOATING_POINT)
+ {
+ to->flags |= SERVER_CTX_FLOATING_POINT;
+ to->fp.i386_regs.ctrl = from->FloatSave.ControlWord;
+ to->fp.i386_regs.status = from->FloatSave.StatusWord;
+ to->fp.i386_regs.tag = from->FloatSave.TagWord;
+ to->fp.i386_regs.err_off = from->FloatSave.ErrorOffset;
+ to->fp.i386_regs.err_sel = from->FloatSave.ErrorSelector;
+ to->fp.i386_regs.data_off = from->FloatSave.DataOffset;
+ to->fp.i386_regs.data_sel = from->FloatSave.DataSelector;
+ to->fp.i386_regs.cr0npx = from->FloatSave.Cr0NpxState;
+ memcpy( to->fp.i386_regs.regs, from->FloatSave.RegisterArea, sizeof(to->fp.i386_regs.regs) );
+ }
+ if (flags & WOW64_CONTEXT_DEBUG_REGISTERS)
+ {
+ to->flags |= SERVER_CTX_DEBUG_REGISTERS;
+ to->debug.i386_regs.dr0 = from->Dr0;
+ to->debug.i386_regs.dr1 = from->Dr1;
+ to->debug.i386_regs.dr2 = from->Dr2;
+ to->debug.i386_regs.dr3 = from->Dr3;
+ to->debug.i386_regs.dr6 = from->Dr6;
+ to->debug.i386_regs.dr7 = from->Dr7;
+ }
+ if (flags & WOW64_CONTEXT_EXTENDED_REGISTERS)
+ {
+ to->flags |= SERVER_CTX_EXTENDED_REGISTERS;
+ memcpy( to->ext.i386_regs, from->ExtendedRegisters, sizeof(to->ext.i386_regs) );
+ }
+ return STATUS_SUCCESS;
+}
+
+
+/***********************************************************************
+ * Wow64GetThreadContext [KERNEL32.@]
+ */
+BOOL WINAPI Wow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context)
+{
+ NTSTATUS ret;
+ DWORD dummy, i;
+ context_t server_context;
+
+ wow64_context_to_server( &server_context, context );
+
+ SERVER_START_REQ( set_thread_context )
+ {
+ req->handle = wine_server_obj_handle( handle );
+ req->suspend = 1;
+ wine_server_add_data( req, &server_context, sizeof(server_context) );
+ ret = wine_server_call( req );
+ }
+ SERVER_END_REQ;
+
+ if (ret == STATUS_PENDING)
+ {
+ for (i = 0; i < 100; i++)
+ {
+ SERVER_START_REQ( set_thread_context )
+ {
+ req->handle = wine_server_obj_handle( handle );
+ req->suspend = 0;
+ wine_server_add_data( req, &server_context, sizeof(server_context) );
+ ret = wine_server_call( req );
+ }
+ SERVER_END_REQ;
+ if (ret == STATUS_PENDING)
+ {
+ LARGE_INTEGER timeout;
+ timeout.QuadPart = -10000;
+ NtDelayExecution( FALSE, &timeout );
+ }
+ else break;
+ }
+ NtResumeThread( handle, &dummy );
+ if (ret == STATUS_PENDING) ret = STATUS_ACCESS_DENIED;
+ }
+
+ if (ret) SetLastError( RtlNtStatusToDosError( ret ) );
+ return !ret;
+}
+
+
/***********************************************************************
* GetThreadContext [KERNEL32.@] Retrieves context of thread.
*
diff --git a/include/winbase.h b/include/winbase.h
index f7239b8..667df96 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2708,6 +2708,7 @@ WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
WINBASEAPI BOOL WINAPI Wow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
+WINBASEAPI BOOL WINAPI Wow64SetThreadContext(HANDLE, const WOW64_CONTEXT *);
WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
--
2.7.4
June 5, 2018
[PATCH 2/3] kernel32: Implement Wow64GetThreadContext().
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
With code essentially copied from ntdll. As far as I can tell there is no
ntdll entry point for this function.
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/thread.c | 131 ++++++++++++++++++++++++++++++++++++++++++++
include/winbase.h | 1 +
3 files changed, 133 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 9ed5dfb..1cb0b54 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1600,7 +1600,7 @@
@ stdcall WinExec(str long)
@ stdcall Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(ptr)
-# @ stub Wow64GetThreadContext
+@ stdcall Wow64GetThreadContext(long ptr)
# @ stub Wow64GetThreadSelectorEntry
@ stdcall Wow64RevertWow64FsRedirection(ptr)
# @ stub Wow64SetThreadContext
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index b6ca9f260..caeec63 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -251,6 +251,137 @@ BOOL WINAPI GetThreadContext( HANDLE handle, /* [in] Handle to thread with
}
+/* convert CPU-specific flags to generic server flags */
+static inline unsigned int wow64_get_server_context_flags( DWORD flags )
+{
+ unsigned int ret = 0;
+
+ flags &= 0x3f; /* mask CPU id flags */
+ if (flags & WOW64_CONTEXT_CONTROL) ret |= SERVER_CTX_CONTROL;
+ if (flags & WOW64_CONTEXT_INTEGER) ret |= SERVER_CTX_INTEGER;
+ if (flags & WOW64_CONTEXT_SEGMENTS) ret |= SERVER_CTX_SEGMENTS;
+ if (flags & WOW64_CONTEXT_FLOATING_POINT) ret |= SERVER_CTX_FLOATING_POINT;
+ if (flags & WOW64_CONTEXT_DEBUG_REGISTERS) ret |= SERVER_CTX_DEBUG_REGISTERS;
+ if (flags & WOW64_CONTEXT_EXTENDED_REGISTERS) ret |= SERVER_CTX_EXTENDED_REGISTERS;
+ return ret;
+}
+
+static NTSTATUS wow64_context_from_server( WOW64_CONTEXT *to, const context_t *from )
+{
+ if (from->cpu != CPU_x86) return STATUS_INVALID_PARAMETER;
+
+ to->ContextFlags = WOW64_CONTEXT_i386;
+ if (from->flags & SERVER_CTX_CONTROL)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_CONTROL;
+ to->Ebp = from->ctl.i386_regs.ebp;
+ to->Esp = from->ctl.i386_regs.esp;
+ to->Eip = from->ctl.i386_regs.eip;
+ to->SegCs = from->ctl.i386_regs.cs;
+ to->SegSs = from->ctl.i386_regs.ss;
+ to->EFlags = from->ctl.i386_regs.eflags;
+ }
+ if (from->flags & SERVER_CTX_INTEGER)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_INTEGER;
+ to->Eax = from->integer.i386_regs.eax;
+ to->Ebx = from->integer.i386_regs.ebx;
+ to->Ecx = from->integer.i386_regs.ecx;
+ to->Edx = from->integer.i386_regs.edx;
+ to->Esi = from->integer.i386_regs.esi;
+ to->Edi = from->integer.i386_regs.edi;
+ }
+ if (from->flags & SERVER_CTX_SEGMENTS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_SEGMENTS;
+ to->SegDs = from->seg.i386_regs.ds;
+ to->SegEs = from->seg.i386_regs.es;
+ to->SegFs = from->seg.i386_regs.fs;
+ to->SegGs = from->seg.i386_regs.gs;
+ }
+ if (from->flags & SERVER_CTX_FLOATING_POINT)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_FLOATING_POINT;
+ to->FloatSave.ControlWord = from->fp.i386_regs.ctrl;
+ to->FloatSave.StatusWord = from->fp.i386_regs.status;
+ to->FloatSave.TagWord = from->fp.i386_regs.tag;
+ to->FloatSave.ErrorOffset = from->fp.i386_regs.err_off;
+ to->FloatSave.ErrorSelector = from->fp.i386_regs.err_sel;
+ to->FloatSave.DataOffset = from->fp.i386_regs.data_off;
+ to->FloatSave.DataSelector = from->fp.i386_regs.data_sel;
+ to->FloatSave.Cr0NpxState = from->fp.i386_regs.cr0npx;
+ memcpy( to->FloatSave.RegisterArea, from->fp.i386_regs.regs, sizeof(to->FloatSave.RegisterArea) );
+ }
+ if (from->flags & SERVER_CTX_DEBUG_REGISTERS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_DEBUG_REGISTERS;
+ to->Dr0 = from->debug.i386_regs.dr0;
+ to->Dr1 = from->debug.i386_regs.dr1;
+ to->Dr2 = from->debug.i386_regs.dr2;
+ to->Dr3 = from->debug.i386_regs.dr3;
+ to->Dr6 = from->debug.i386_regs.dr6;
+ to->Dr7 = from->debug.i386_regs.dr7;
+ }
+ if (from->flags & SERVER_CTX_EXTENDED_REGISTERS)
+ {
+ to->ContextFlags |= WOW64_CONTEXT_EXTENDED_REGISTERS;
+ memcpy( to->ExtendedRegisters, from->ext.i386_regs, sizeof(to->ExtendedRegisters) );
+ }
+ return STATUS_SUCCESS;
+}
+
+/***********************************************************************
+ * Wow64GetThreadContext [KERNEL32.@]
+ */
+BOOL WINAPI Wow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context)
+{
+ unsigned int server_flags = wow64_get_server_context_flags( context->ContextFlags );
+ context_t server_context;
+ DWORD dummy, i;
+ NTSTATUS ret;
+
+ SERVER_START_REQ( get_thread_context )
+ {
+ req->handle = wine_server_obj_handle( handle );
+ req->flags = server_flags;
+ req->suspend = 1;
+ wine_server_set_reply( req, &server_context, sizeof(server_context) );
+ ret = wine_server_call( req );
+ }
+ SERVER_END_REQ;
+
+ if (ret == STATUS_PENDING)
+ {
+ for (i = 0; i < 100; i++)
+ {
+ SERVER_START_REQ( get_thread_context )
+ {
+ req->handle = wine_server_obj_handle( handle );
+ req->flags = server_flags;
+ req->suspend = 0;
+ wine_server_set_reply( req, &server_context, sizeof(server_context) );
+ ret = wine_server_call( req );
+ }
+ SERVER_END_REQ;
+ if (ret == STATUS_PENDING)
+ {
+ LARGE_INTEGER timeout;
+ timeout.QuadPart = -10000;
+ NtDelayExecution( FALSE, &timeout );
+ }
+ else break;
+ }
+ NtResumeThread( handle, &dummy );
+ if (ret == STATUS_PENDING) ret = STATUS_ACCESS_DENIED;
+ }
+
+ if (!ret) ret = wow64_context_from_server( context, &server_context );
+
+ if (ret) SetLastError( RtlNtStatusToDosError( ret ) );
+ return !ret;
+}
+
+
/**********************************************************************
* SuspendThread [KERNEL32.@] Suspends a thread.
*
diff --git a/include/winbase.h b/include/winbase.h
index 4ddc1d3..f7239b8 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2706,6 +2706,7 @@ WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE);
WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT);
WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
+WINBASEAPI BOOL WINAPI Wow64GetThreadContext(HANDLE, WOW64_CONTEXT *);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
--
2.7.4
June 5, 2018
[PATCH 1/3] winnt.h: Add some WOW64 definitions.
by Zebediah Figura
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
include/winnt.h | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h
index 54bf11d..c41eff4 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -2112,6 +2112,96 @@ typedef CONTEXT *PCONTEXT;
NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*);
+#define WOW64_CONTEXT_i386 0x00010000
+#define WOW64_CONTEXT_i486 0x00010000
+#define WOW64_CONTEXT_CONTROL (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000001))
+#define WOW64_CONTEXT_INTEGER (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000002))
+#define WOW64_CONTEXT_SEGMENTS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000004))
+#define WOW64_CONTEXT_FLOATING_POINT (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000008))
+#define WOW64_CONTEXT_DEBUG_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000010))
+#define WOW64_CONTEXT_EXTENDED_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000020))
+#define WOW64_CONTEXT_FULL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS)
+#define WOW64_CONTEXT_ALL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | \
+ WOW64_CONTEXT_SEGMENTS | WOW64_CONTEXT_FLOATING_POINT | \
+ WOW64_CONTEXT_DEBUG_REGISTERS | WOW64_CONTEXT_EXTENDED_REGISTERS)
+
+#define WOW64_CONTEXT_XSTATE (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000040))
+
+#define WOW64_CONTEXT_EXCEPTION_ACTIVE 0x08000000
+#define WOW64_CONTEXT_SERVICE_ACTIVE 0x10000000
+#define WOW64_CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define WOW64_CONTEXT_EXCEPTION_REPORTING 0x80000000
+
+#define WOW64_SIZE_OF_80387_REGISTERS 80
+#define WOW64_MAXIMUM_SUPPORTED_EXTENSION 512
+
+typedef struct _WOW64_FLOATING_SAVE_AREA {
+ DWORD ControlWord;
+ DWORD StatusWord;
+ DWORD TagWord;
+ DWORD ErrorOffset;
+ DWORD ErrorSelector;
+ DWORD DataOffset;
+ DWORD DataSelector;
+ BYTE RegisterArea[WOW64_SIZE_OF_80387_REGISTERS];
+ DWORD Cr0NpxState;
+} WOW64_FLOATING_SAVE_AREA, *PWOW64_FLOATING_SAVE_AREA;
+
+#include "pshpack4.h"
+typedef struct _WOW64_CONTEXT {
+ DWORD ContextFlags;
+ DWORD Dr0;
+ DWORD Dr1;
+ DWORD Dr2;
+ DWORD Dr3;
+ DWORD Dr6;
+ DWORD Dr7;
+ WOW64_FLOATING_SAVE_AREA FloatSave;
+ DWORD SegGs;
+ DWORD SegFs;
+ DWORD SegEs;
+ DWORD SegDs;
+ DWORD Edi;
+ DWORD Esi;
+ DWORD Ebx;
+ DWORD Edx;
+ DWORD Ecx;
+ DWORD Eax;
+ DWORD Ebp;
+ DWORD Eip;
+ DWORD SegCs;
+ DWORD EFlags;
+ DWORD Esp;
+ DWORD SegSs;
+ BYTE ExtendedRegisters[WOW64_MAXIMUM_SUPPORTED_EXTENSION];
+} WOW64_CONTEXT, *PWOW64_CONTEXT;
+#include "poppack.h"
+
+typedef struct _WOW64_LDT_ENTRY {
+ WORD LimitLow;
+ WORD BaseLow;
+ union {
+ struct {
+ BYTE BaseMid;
+ BYTE Flags1;
+ BYTE Flags2;
+ BYTE BaseHi;
+ } Bytes;
+ struct {
+ DWORD BaseMid : 8;
+ DWORD Type : 5;
+ DWORD Dpl : 2;
+ DWORD Pres : 1;
+ DWORD LimitHi : 4;
+ DWORD Sys : 1;
+ DWORD Reserved_0 : 1;
+ DWORD Default_Big : 1;
+ DWORD Granularity : 1;
+ DWORD BaseHi : 8;
+ } Bits;
+ } HighWord;
+} WOW64_LDT_ENTRY, *PWOW64_LDT_ENTRY;
+
/*
* Product types
*/
--
2.7.4
June 5, 2018
[PATCH] netapi32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/netapi32/tests/access.c | 8 ++++----
dlls/netapi32/tests/wksta.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c
index f095d77320..a284b65401 100644
--- a/dlls/netapi32/tests/access.c
+++ b/dlls/netapi32/tests/access.c
@@ -74,7 +74,7 @@ static BOOL init_access_tests(void)
BOOL rc;
user_name[0] = 0;
- dwSize = sizeof(user_name)/sizeof(WCHAR);
+ dwSize = ARRAY_SIZE(user_name);
rc=GetUserNameW(user_name, &dwSize);
if (rc==FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
@@ -84,7 +84,7 @@ static BOOL init_access_tests(void)
ok(rc, "User Name Retrieved\n");
computer_name[0] = 0;
- dwSize = sizeof(computer_name)/sizeof(WCHAR);
+ dwSize = ARRAY_SIZE(computer_name);
ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved\n");
return TRUE;
}
@@ -521,7 +521,7 @@ static void test_DavGetHTTPFromUNCPath(void)
ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
ok( size == 12, "got %u\n", size );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
buf[0] = 0;
size = tests[i].size;
@@ -685,7 +685,7 @@ static void test_DavGetUNCFromHTTPPath(void)
ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
ok( size == 25, "got %u\n", size );
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
buf[0] = 0;
size = tests[i].size;
diff --git a/dlls/netapi32/tests/wksta.c b/dlls/netapi32/tests/wksta.c
index 418a1ad626..ba4a7f9aa0 100644
--- a/dlls/netapi32/tests/wksta.c
+++ b/dlls/netapi32/tests/wksta.c
@@ -50,7 +50,7 @@ static BOOL init_wksta_tests(void)
BOOL rc;
user_name[0] = 0;
- dwSize = sizeof(user_name)/sizeof(user_name[0]);
+ dwSize = ARRAY_SIZE(user_name);
rc=GetUserNameW(user_name, &dwSize);
if (rc==FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) {
win_skip("GetUserNameW is not implemented\n");
@@ -59,7 +59,7 @@ static BOOL init_wksta_tests(void)
ok(rc, "User Name Retrieved\n");
computer_name[0] = 0;
- dwSize = sizeof(computer_name)/sizeof(computer_name[0]);
+ dwSize = ARRAY_SIZE(computer_name);
ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved\n");
return TRUE;
}
--
2.14.4
June 5, 2018
[PATCH] msvfw32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvfw32/tests/drawdib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msvfw32/tests/drawdib.c b/dlls/msvfw32/tests/drawdib.c
index 0a59d82621..92e60df264 100644
--- a/dlls/msvfw32/tests/drawdib.c
+++ b/dlls/msvfw32/tests/drawdib.c
@@ -138,7 +138,7 @@ static void test_DrawDib_sizeimage(void)
hdd = DrawDibOpen();
ok(hdd != NULL, "DrawDibOpen failed\n");
- for (i = 0; i < sizeof(test_data)/sizeof(test_data[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(test_data); i++) {
char *hash;
memset(dst_bits, 0xff, dst_dib_size);
init_bmi(&src_info, test_data[i].width, test_data[i].height, test_data[i].size);
--
2.14.4
June 5, 2018
[PATCH] msvcr120/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcr120/tests/msvcr120.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c
index 152bfdf42e..85e83a6c65 100644
--- a/dlls/msvcr120/tests/msvcr120.c
+++ b/dlls/msvcr120/tests/msvcr120.c
@@ -408,7 +408,7 @@ static void test_lconv(void)
"Japanese", "Korean", "Spanish"
};
- for(i = 0; i < sizeof(locstrs) / sizeof(char *); i ++)
+ for(i = 0; i < ARRAY_SIZE(locstrs); i ++)
test_lconv_helper(locstrs[i]);
}
@@ -445,7 +445,7 @@ static void test__dpcomp(void)
};
int i, ret;
- for(i=0; i<sizeof(tests)/sizeof(*tests); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
ret = p__dpcomp(tests[i].x, tests[i].y);
ok(ret == tests[i].ret, "%d) dpcomp(%f, %f) = %x\n", i, tests[i].x, tests[i].y, ret);
}
@@ -473,7 +473,7 @@ static void test____lc_locale_name_func(void)
int i, j;
wchar_t **lc_names;
- for(i=0; i<sizeof(tests)/sizeof(*tests); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
if(!p_setlocale(LC_ALL, tests[i].locale))
continue;
@@ -536,12 +536,11 @@ static void test__W_Gettnames(void)
else
ok(size==0x164, "structure size: %x\n", size);
- for(i=0; i<sizeof(str)/sizeof(*str); i++) {
+ for(i=0; i<ARRAY_SIZE(str); i++) {
ok(!strcmp(ret->str[i], str[i]), "ret->str[%d] = %s, expected %s\n",
i, ret->str[i], str[i]);
- MultiByteToWideChar(CP_ACP, 0, str[i], strlen(str[i])+1,
- buf, sizeof(buf)/sizeof(*buf));
+ MultiByteToWideChar(CP_ACP, 0, str[i], strlen(str[i])+1, buf, ARRAY_SIZE(buf));
ok(!lstrcmpW(ret->wstr[i], buf), "ret->wstr[%d] = %s, expected %s\n",
i, wine_dbgstr_w(ret->wstr[i]), wine_dbgstr_w(buf));
}
@@ -640,7 +639,7 @@ static void test_remainder(void)
if(sizeof(void*) != 8) /* errno handling slightly different on 32-bit */
return;
- for(i=0; i<sizeof(tests)/sizeof(*tests); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = -1;
r = p_remainder(tests[i].x, tests[i].y);
e = errno;
@@ -907,7 +906,7 @@ static void test_wctype(void)
};
int i, ret;
- for(i=0; i<sizeof(properties)/sizeof(properties[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(properties); i++) {
ret = p_wctype(properties[i].name);
ok(properties[i].mask == ret, "%d - Expected %x, got %x\n", i, properties[i].mask, ret);
}
--
2.14.4
June 5, 2018
[PATCH] msvcr110/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcr110/tests/msvcr110.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msvcr110/tests/msvcr110.c b/dlls/msvcr110/tests/msvcr110.c
index 3aa394d981..c0a182f546 100644
--- a/dlls/msvcr110/tests/msvcr110.c
+++ b/dlls/msvcr110/tests/msvcr110.c
@@ -61,7 +61,7 @@ static void test_setlocale(void)
"uz-Latn-uz",
};
- for(i=0; i<sizeof(names)/sizeof(*names); i++) {
+ for(i=0; i<ARRAY_SIZE(names); i++) {
ret = p_setlocale(LC_ALL, names[i]);
ok(ret != NULL, "expected success, but got NULL\n");
ok(!strcmp(ret, names[i]), "expected %s, got %s\n", names[i], ret);
--
2.14.4
June 5, 2018
[PATCH] msvcr90/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcr90/tests/msvcr90.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c
index dd62f3ae6e..7ee2890e45 100644
--- a/dlls/msvcr90/tests/msvcr90.c
+++ b/dlls/msvcr90/tests/msvcr90.c
@@ -900,7 +900,7 @@ static void test_bsearch_s(void)
CHECK_CALLED(invalid_parameter_handler, EINVAL);
/* just try all array sizes */
- for (j=1;j<sizeof(arr)/sizeof(arr[0]);j++) {
+ for (j=1; j<ARRAY_SIZE(arr); j++) {
for (i=0;i<j;i++) {
l = arr[i];
g_bsearch_s_context_counter = 0;
@@ -1494,7 +1494,7 @@ static void test__AdjustPointer(void)
void *ret;
int i;
- for(i=0; i<sizeof(data)/sizeof(data[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(data); i++) {
ret = p__AdjustPointer(data[i].ptr, &data[i].this_ptr_offsets);
ok(ret == data[i].ret, "%d) __AdjustPointer returned %p, expected %p\n", i, ret, data[i].ret);
}
@@ -1734,7 +1734,7 @@ static void test__fpieee_flt(void)
ok(ret == EXCEPTION_CONTINUE_SEARCH, "_fpieee_flt returned %d\n", ret);
ok(handler_called == 0, "handler_called = %d\n", handler_called);
- for(i=0; i<sizeof(test_data)/sizeof(test_data[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(test_data); i++) {
ep.ExceptionRecord = &rec;
ep.ContextRecord = &ctx;
memset(&rec, 0, sizeof(rec));
--
2.14.4
June 5, 2018
[PATCH] msvcp140/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcp140/tests/msvcp140.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
index 593e0ce42b..06ea11d55b 100644
--- a/dlls/msvcp140/tests/msvcp140.c
+++ b/dlls/msvcp140/tests/msvcp140.c
@@ -555,11 +555,10 @@ static void test_to_byte(void)
ok(!memcmp(dst, compare, sizeof(compare)), "Destination was modified: %s\n", dst);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
ret = p_To_byte(tests[i], dst);
- expected = WideCharToMultiByte(CP_ACP, 0, tests[i], -1, compare, sizeof(compare) / sizeof(*compare),
- NULL, NULL);
+ expected = WideCharToMultiByte(CP_ACP, 0, tests[i], -1, compare, ARRAY_SIZE(compare), NULL, NULL);
ok(ret == expected, "Got unexpected result %d, expected %d, test case %u\n", ret, expected, i);
ok(!memcmp(dst, compare, sizeof(compare)), "Got unexpected output %s, test case %u\n", dst, i);
}
@@ -601,10 +600,10 @@ static void test_to_wide(void)
ok(!ret, "Got unexpected result %d\n", ret);
ok(!memcmp(dst, compare, sizeof(compare)), "Destination was modified: %s\n", wine_dbgstr_w(dst));
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
ret = p_To_wide(tests[i], dst);
- expected = MultiByteToWideChar(CP_ACP, 0, tests[i], -1, compare, sizeof(compare) / sizeof(*compare));
+ expected = MultiByteToWideChar(CP_ACP, 0, tests[i], -1, compare, ARRAY_SIZE(compare));
ok(ret == expected, "Got unexpected result %d, expected %d, test case %u\n", ret, expected, i);
ok(!memcmp(dst, compare, sizeof(compare)), "Got unexpected output %s, test case %u\n",
wine_dbgstr_w(dst), i);
@@ -829,7 +828,7 @@ static void test_Stat(void)
todo_wine ok(0777 == perms, "_Lstat(): perms expect: 0777, got 0%o\n", perms);
ok(CloseHandle(file), "CloseHandle\n");
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
perms = 0xdeadbeef;
val = p_Stat(tests[i].path, &perms);
todo_wine_if(tests[i].is_todo) {
@@ -1043,7 +1042,7 @@ static void test_Unlink(void)
ret = p_Link(f1W, f1_linkW);
ok(ret == ERROR_SUCCESS, "_Link(): expect: ERROR_SUCCESS, got %d\n", ret);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_Unlink(tests[i].path);
todo_wine_if(tests[i].is_todo)
--
2.14.4
June 5, 2018
[PATCH] msvcp120/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcp120/tests/msvcp120.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
index 7f72075d84..969902db8b 100644
--- a/dlls/msvcp120/tests/msvcp120.c
+++ b/dlls/msvcp120/tests/msvcp120.c
@@ -785,7 +785,7 @@ static void test__Xtime_diff_to_millis2(void)
MSVCRT_long ret;
xtime t1, t2;
- for(i = 0; i < sizeof(tests) / sizeof(tests[0]); ++ i)
+ for(i = 0; i < ARRAY_SIZE(tests); ++ i)
{
t1.sec = tests[i].sec_before;
t1.nsec = tests[i].nsec_before;
@@ -805,7 +805,7 @@ static void test_xtime_get(void)
xtime before, after;
int i;
- for(i = 0; i < sizeof(tests) / sizeof(tests[0]); i ++)
+ for(i = 0; i < ARRAY_SIZE(tests); i ++)
{
p_xtime_get(&before, 1);
Sleep(tests[i]);
@@ -1166,7 +1166,7 @@ static void test_tr2_sys__Equivalent(void)
ok(file != INVALID_HANDLE_VALUE, "create file failed: INVALID_HANDLE_VALUE\n");
CloseHandle(file);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
val = p_tr2_sys__Equivalent(tests[i].path1, tests[i].path2);
ok(tests[i].equivalent == val, "tr2_sys__Equivalent(): test %d expect: %d, got %d\n", i+1, tests[i].equivalent, val);
@@ -1272,7 +1272,7 @@ static void test_tr2_sys__Make_dir(void)
{ "??invalid_name>>", -1 }
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_tr2_sys__Make_dir(tests[i].path);
ok(ret == tests[i].val, "tr2_sys__Make_dir(): test %d expect: %d, got %d\n", i+1, tests[i].val, ret);
@@ -1301,7 +1301,7 @@ static void test_tr2_sys__Remove_dir(void)
ok(p_tr2_sys__Make_dir("tr2_test_dir"), "tr2_sys__Make_dir() failed\n");
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_tr2_sys__Remove_dir(tests[i].path);
ok(ret == tests[i].val, "test_tr2_sys__Remove_dir(): test %d expect: %d, got %d\n", i+1, tests[i].val, ret);
@@ -1345,7 +1345,7 @@ static void test_tr2_sys__Copy_file(void)
ok(SetEndOfFile(file), "SetEndOfFile failed\n");
CloseHandle(file);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_tr2_sys__Copy_file(tests[i].source, tests[i].dest, tests[i].fail_if_exists);
todo_wine_if(tests[i].is_todo)
@@ -1403,7 +1403,7 @@ static void test_tr2_sys__Rename(void)
ret = p_tr2_sys__Rename("tr2_test_dir\\f1", "tr2_test_dir\\f1");
todo_wine ok(ERROR_SUCCESS == ret, "test_tr2_sys__Rename(): expect: ERROR_SUCCESS, got %d\n", ret);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
if(tests[i].val == ERROR_SUCCESS) {
h1 = CreateFileA(tests[i].old_path, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -1542,7 +1542,7 @@ static void test_tr2_sys__Stat(void)
todo_wine ok(ERROR_SUCCESS == err_code, "tr2_sys__Lstat(): err_code expect: ERROR_SUCCESS, got %d\n", err_code);
ok(CloseHandle(file), "CloseHandle\n");
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
err_code = 0xdeadbeef;
val = p_tr2_sys__Stat(tests[i].path, &err_code);
todo_wine_if(tests[i].is_todo)
@@ -1744,7 +1744,7 @@ static void test_tr2_sys__Link(void)
ok(SetEndOfFile(file), "SetEndOfFile failed\n");
CloseHandle(file);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_tr2_sys__Link(tests[i].existing_path, tests[i].new_path);
ok(ret == tests[i].last_error, "tr2_sys__Link(): test %d expect: %d, got %d\n",
@@ -1820,7 +1820,7 @@ static void test_tr2_sys__Symlink(void)
ok(SetEndOfFile(file), "SetEndOfFile failed\n");
CloseHandle(file);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = p_tr2_sys__Symlink(tests[i].existing_path, tests[i].new_path);
@@ -1892,7 +1892,7 @@ static void test_tr2_sys__Unlink(void)
ret = p_tr2_sys__Link("tr2_test_dir/f1", "tr2_test_dir/f1_link");
ok(ret == ERROR_SUCCESS, "tr2_sys__Link(): expect: ERROR_SUCCESS, got %d\n", ret);
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_tr2_sys__Unlink(tests[i].path);
todo_wine_if(tests[i].is_todo)
@@ -1949,14 +1949,14 @@ static void test_thrd(void)
};
/* test for equal */
- for(i=0; i<sizeof(testeq)/sizeof(testeq[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(testeq); i++) {
ret = p__Thrd_equal(testeq[i].a, testeq[i].b);
ok(ret == testeq[i].r, "(%p %u) = (%p %u) expected %d, got %d\n",
testeq[i].a.hnd, testeq[i].a.id, testeq[i].b.hnd, testeq[i].b.id, testeq[i].r, ret);
}
/* test for less than */
- for(i=0; i<sizeof(testlt)/sizeof(testlt[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(testlt); i++) {
ret = p__Thrd_lt(testlt[i].a, testlt[i].b);
ok(ret == testlt[i].r, "(%p %u) < (%p %u) expected %d, got %d\n",
testlt[i].a.hnd, testlt[i].a.id, testlt[i].b.hnd, testlt[i].b.id, testlt[i].r, ret);
@@ -2323,7 +2323,7 @@ static void test_vector_base_v4__Segment_index_of(void)
{~0, 8*sizeof(void*)-1}
};
- for(i=0; i<sizeof(tests) / sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
ret = p_vector_base_v4__Segment_index_of(tests[i].x);
ok(ret == tests[i].expect, "expected %ld, got %ld for %ld\n",
(long)tests[i].expect, (long)ret, (long)tests[i].x);
--
2.14.4
June 5, 2018
[PATCH] msvcp90/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcp90/tests/ios.c | 24 ++++++++++++------------
dlls/msvcp90/tests/misc.c | 2 +-
dlls/msvcp90/tests/string.c | 6 +++---
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/msvcp90/tests/ios.c b/dlls/msvcp90/tests/ios.c
index c075f01f8c..8a911173f8 100644
--- a/dlls/msvcp90/tests/ios.c
+++ b/dlls/msvcp90/tests/ios.c
@@ -1137,7 +1137,7 @@ static void test_num_get_get_uint64(void)
{ "0xx10", NULL, FMTFLAG_hex, IOSTATE_failbit, 42, EOF },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1287,7 +1287,7 @@ static void test_num_get_get_double(void)
{ "1.0e1,0", NULL, IOSTATE_goodbit, 10.0, ',' }, /* group in exponent */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1406,7 +1406,7 @@ static void test_num_put_put_double(void)
{ -1.23456789e-9, NULL, 9, FMTFLAG_fixed, "-0.000000001" }
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func1(p_basic_stringstream_char_ctor, &ss);
@@ -1499,7 +1499,7 @@ static void test_istream_ipfx(void)
{ "\n\t ws", TRUE, FALSE, TRUE, IOSTATE_goodbit, '\n' },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1579,7 +1579,7 @@ static void test_istream_ignore(void)
{ "ABC ", 42, ' ', IOSTATE_goodbit, EOF }, /* delim at end */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1643,7 +1643,7 @@ static void test_istream_seekg(void)
{ "", 0, SEEKDIR_beg, IOSTATE_failbit, EOF },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1702,7 +1702,7 @@ static void test_istream_seekg_fpos(void)
{ "", 0, IOSTATE_failbit, EOF },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1763,7 +1763,7 @@ static void test_istream_peek(void)
{ "ABCDEF", 'A', 'A', IOSTATE_goodbit },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1834,7 +1834,7 @@ static void test_istream_tellg(void)
{ "ABCDEFGHIJ", -6, -1, -1, 0 }
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* stringstream<char> version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1980,7 +1980,7 @@ static void test_istream_getline(void)
{ "this is some text\n", "this is some text\n", '\0', IOSTATE_eofbit, "this is some text\n", '\n', IOSTATE_faileof },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -2208,7 +2208,7 @@ static void test_ostream_print_complex_float(void)
{ {-1.23456789e-9,2.3456789e9}, NULL, 9, FMTFLAG_fixed, "(-0.000000001,2345678848.000000000)" }
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func1(p_basic_stringstream_char_ctor, &ss);
if(tests[i].lcl) {
@@ -2331,7 +2331,7 @@ static void test_istream_read_complex_double(void)
{ "(1.0eE10, 3)" , NULL, deadbeef, IOSTATE_failbit, ""},
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func2(p_basic_string_char_ctor_cstr, &str, deadbeef_str);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
p_basic_istream_char_read_complex_double(&ss.base.base1, &val);
diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c
index ffc7b9684f..e9fd1e06be 100644
--- a/dlls/msvcp90/tests/misc.c
+++ b/dlls/msvcp90/tests/misc.c
@@ -582,7 +582,7 @@ static void test_wctype(void)
};
int i, ret;
- for(i=0; i<sizeof(properties)/sizeof(properties[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(properties); i++) {
ret = p_wctype(properties[i].name);
ok(properties[i].mask == ret, "%d - Expected %x, got %x\n", i, properties[i].mask, ret);
}
diff --git a/dlls/msvcp90/tests/string.c b/dlls/msvcp90/tests/string.c
index 9d46df0f69..a0f16a9908 100644
--- a/dlls/msvcp90/tests/string.c
+++ b/dlls/msvcp90/tests/string.c
@@ -554,7 +554,7 @@ static void test_basic_string_char_rfind(void) {
{ "aaa", "z", 0, 1, *p_basic_string_char_npos } /* can't find */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
ret = (size_t)call_func4(p_basic_string_char_rfind_cstr_substr, &str,
@@ -602,7 +602,7 @@ static void test_basic_string_char_replace(void) {
{ "ABCDEF", 6, *p_basic_string_char_npos, "-", "ABCDEF-" }, /* replace after end with npos */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
ret = call_func4(p_basic_string_char_replace_cstr, &str, tests[i].off, tests[i].len, tests[i].replace);
@@ -756,7 +756,7 @@ static void test_basic_string_char_find_last_not_of(void) {
{ "ABCDE", "", 5, 0, 4 },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func2(p_basic_string_char_ctor_cstr, &str, tests[i].str);
ret = (size_t)call_func4(p_basic_string_char_find_last_not_of_cstr_substr,
--
2.14.4
June 5, 2018
[PATCH] msvcp60/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcp60/tests/ios.c | 18 +++++++++---------
dlls/msvcp60/tests/string.c | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/msvcp60/tests/ios.c b/dlls/msvcp60/tests/ios.c
index 087aa2cb3f..1938a51df1 100644
--- a/dlls/msvcp60/tests/ios.c
+++ b/dlls/msvcp60/tests/ios.c
@@ -858,7 +858,7 @@ static void test_num_get_get_double(void)
{ "1.0e1,0", NULL, IOSTATE_goodbit, 10.0, ',' }, /* group in exponent */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -982,7 +982,7 @@ static void test_num_put_put_double(void)
{ -1.23456789e-9, NULL, 9, FMTFLAG_fixed, "-0.000000001" }
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_stringstream_char_ctor_mode, &ss, OPENMODE_in|OPENMODE_out, TRUE);
@@ -1072,7 +1072,7 @@ static void test_istream_ipfx(void)
{ "\n\t ws", TRUE, FALSE, TRUE, IOSTATE_goodbit, '\n' },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1152,7 +1152,7 @@ static void test_istream_ignore(void)
{ "ABC ", 42, ' ', IOSTATE_goodbit, EOF }, /* delim at end */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1216,7 +1216,7 @@ static void test_istream_seekg(void)
{ "", 0, SEEKDIR_beg, IOSTATE_goodbit, EOF },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1275,7 +1275,7 @@ static void test_istream_seekg_fpos(void)
{ "", 0, IOSTATE_goodbit, EOF },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1336,7 +1336,7 @@ static void test_istream_peek(void)
{ "ABCDEF", 'A', 'A', IOSTATE_goodbit },
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1407,7 +1407,7 @@ static void test_istream_tellg(void)
{ "ABCDEFGHIJ", -6, 0, 0, 0 }
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* stringstream<char> version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
@@ -1554,7 +1554,7 @@ static void test_istream_getline(void)
return;
}
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
/* char version */
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
call_func4(p_basic_stringstream_char_ctor_str, &ss, &str, OPENMODE_out|OPENMODE_in, TRUE);
diff --git a/dlls/msvcp60/tests/string.c b/dlls/msvcp60/tests/string.c
index bf396f7b28..6a0efc178c 100644
--- a/dlls/msvcp60/tests/string.c
+++ b/dlls/msvcp60/tests/string.c
@@ -599,7 +599,7 @@ static void test_basic_string_char_rfind(void) {
{ "aaa", "z", 0, 1, *p_basic_string_char_npos } /* can't find */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
ret = (size_t)call_func4(p_basic_string_char_rfind_cstr_substr, &str,
@@ -647,7 +647,7 @@ static void test_basic_string_char_replace(void) {
{ "ABCDEF", 6, *p_basic_string_char_npos, "-", "ABCDEF-" }, /* replace after end with npos */
};
- for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
+ for(i=0; i<ARRAY_SIZE(tests); i++) {
call_func3(p_basic_string_char_ctor_cstr_alloc, &str, tests[i].str, &fake_allocator);
ret = call_func4(p_basic_string_char_replace_cstr, &str, tests[i].off, tests[i].len, tests[i].replace);
--
2.14.4
June 5, 2018
[PATCH] msvcirt/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msvcirt/tests/msvcirt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c
index 61f166b273..c856b50a41 100644
--- a/dlls/msvcirt/tests/msvcirt.c
+++ b/dlls/msvcirt/tests/msvcirt.c
@@ -3818,7 +3818,7 @@ static void test_ostream_print(void)
ret = (int) call_func3(p_streambuf_xsputn, &ssb_test3.base, "we're gonna play it 3.14159", 27);
ok(ret == 27, "expected 27 got %d\n", ret);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
os.base_ios.state = tests[i].state;
os.base_ios.flags = tests[i].flags;
os.base_ios.precision = tests[i].precision;
@@ -5635,7 +5635,7 @@ static void test_istream_getint(void)
pis = call_func3(p_istream_sb_ctor, &is, &ssb.base, TRUE);
ok(pis == &is, "wrong return, expected %p got %p\n", &is, pis);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
len = strlen(tests[i].stream_content);
is.base_ios.state = tests[i].initial_state;
is.base_ios.flags = tests[i].flags;
@@ -5747,7 +5747,7 @@ static void test_istream_getdouble(void)
pis = call_func3(p_istream_sb_ctor, &is, &ssb.base, TRUE);
ok(pis == &is, "wrong return, expected %p got %p\n", &is, pis);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
len = strlen(tests[i].stream_content);
is.base_ios.state = tests[i].initial_state;
is.base_ios.flags = tests[i].flags;
@@ -5949,7 +5949,7 @@ static void test_istream_read(void)
pis = call_func3(p_istream_sb_ctor, &is, &ssb.base, TRUE);
ok(pis == &is, "wrong return, expected %p got %p\n", &is, pis);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(tests); i++) {
len = strlen(tests[i].stream_content);
is.base_ios.state = IOSTATE_goodbit;
is.base_ios.flags = tests[i].flags;
--
2.14.4
June 5, 2018
[PATCH] d3d8/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/d3d8/tests/stateblock.c | 14 +++----
dlls/d3d8/tests/visual.c | 88 ++++++++++++++++++++------------------------
2 files changed, 47 insertions(+), 55 deletions(-)
diff --git a/dlls/d3d8/tests/stateblock.c b/dlls/d3d8/tests/stateblock.c
index 3ad9c1c140..83f153a289 100644
--- a/dlls/d3d8/tests/stateblock.c
+++ b/dlls/d3d8/tests/stateblock.c
@@ -1108,7 +1108,7 @@ const D3DRENDERSTATETYPE render_state_indices[] =
struct render_state_data
{
- DWORD states[sizeof(render_state_indices) / sizeof(*render_state_indices)];
+ DWORD states[ARRAY_SIZE(render_state_indices)];
};
struct render_state_arg
@@ -1132,7 +1132,7 @@ static void render_state_apply_data(IDirect3DDevice8 *device, const struct state
unsigned int i;
HRESULT hr;
- for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i)
+ for (i = 0; i < ARRAY_SIZE(render_state_indices); ++i)
{
hr = IDirect3DDevice8_SetRenderState(device, render_state_indices[i], rsdata->states[i]);
ok(SUCCEEDED(hr), "SetRenderState returned %#x.\n", hr);
@@ -1147,7 +1147,7 @@ static void render_state_check_data(IDirect3DDevice8 *device, const struct state
unsigned int i;
HRESULT hr;
- for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i)
+ for (i = 0; i < ARRAY_SIZE(render_state_indices); ++i)
{
DWORD value = ctx->poison_data_buffer.states[i];
hr = IDirect3DDevice8_GetRenderState(device, render_state_indices[i], &value);
@@ -1244,7 +1244,7 @@ static void render_state_poison_data_init(struct render_state_data *data)
{
unsigned int i;
- for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i)
+ for (i = 0; i < ARRAY_SIZE(render_state_indices); ++i)
{
data->states[i] = 0x1337c0de;
}
@@ -1423,10 +1423,10 @@ static HRESULT render_state_test_init(IDirect3DDevice8 *device, struct state_tes
render_state_test_data_init(&ctx->test_data_all_buffer);
render_state_poison_data_init(&ctx->poison_data_buffer);
- for (i = 0; i < sizeof(render_state_indices) / sizeof(*render_state_indices); ++i)
+ for (i = 0; i < ARRAY_SIZE(render_state_indices); ++i)
{
ctx->test_data_vertex_buffer.states[i] = ctx->default_data_buffer.states[i];
- for (j = 0; j < sizeof(states_vertex) / sizeof(*states_vertex); ++j)
+ for (j = 0; j < ARRAY_SIZE(states_vertex); ++j)
{
if (render_state_indices[i] == states_vertex[j])
{
@@ -1436,7 +1436,7 @@ static HRESULT render_state_test_init(IDirect3DDevice8 *device, struct state_tes
}
ctx->test_data_pixel_buffer.states[i] = ctx->default_data_buffer.states[i];
- for (j = 0; j < sizeof(states_pixel) / sizeof(*states_pixel); ++j)
+ for (j = 0; j < ARRAY_SIZE(states_pixel); ++j)
{
if (render_state_indices[i] == states_pixel[j])
{
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index c2a4abfc04..bed70d8a17 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -494,7 +494,7 @@ static void lighting_test(void)
hr = IDirect3DDevice8_LightEnable(device, 0, TRUE);
ok(SUCCEEDED(hr), "Failed to enable light 0, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IDirect3DDevice8_SetTransform(device, D3DTS_WORLD, tests[i].world_matrix);
ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr);
@@ -706,22 +706,14 @@ static void test_specular_lighting(void)
}
tests[] =
{
- {&directional, FALSE, 30.0f, expected_directional,
- sizeof(expected_directional) / sizeof(expected_directional[0])},
- {&directional, TRUE, 30.0f, expected_directional_local,
- sizeof(expected_directional_local) / sizeof(expected_directional_local[0])},
- {&point, FALSE, 30.0f, expected_point,
- sizeof(expected_point) / sizeof(expected_point[0])},
- {&point, TRUE, 30.0f, expected_point_local,
- sizeof(expected_point_local) / sizeof(expected_point_local[0])},
- {&spot, FALSE, 30.0f, expected_spot,
- sizeof(expected_spot) / sizeof(expected_spot[0])},
- {&spot, TRUE, 30.0f, expected_spot_local,
- sizeof(expected_spot_local) / sizeof(expected_spot_local[0])},
- {&point_range, FALSE, 30.0f, expected_point_range,
- sizeof(expected_point_range) / sizeof(expected_point_range[0])},
- {&point_side, TRUE, 0.0f, expected_point_side,
- sizeof(expected_point_side) / sizeof(expected_point_side[0])},
+ {&directional, FALSE, 30.0f, expected_directional, ARRAY_SIZE(expected_directional)},
+ {&directional, TRUE, 30.0f, expected_directional_local, ARRAY_SIZE(expected_directional_local)},
+ {&point, FALSE, 30.0f, expected_point, ARRAY_SIZE(expected_point)},
+ {&point, TRUE, 30.0f, expected_point_local, ARRAY_SIZE(expected_point_local)},
+ {&spot, FALSE, 30.0f, expected_spot, ARRAY_SIZE(expected_spot)},
+ {&spot, TRUE, 30.0f, expected_spot_local, ARRAY_SIZE(expected_spot_local)},
+ {&point_range, FALSE, 30.0f, expected_point_range, ARRAY_SIZE(expected_point_range)},
+ {&point_side, TRUE, 0.0f, expected_point_side, ARRAY_SIZE(expected_point_side)},
};
IDirect3DDevice8 *device;
D3DMATERIAL8 material;
@@ -795,7 +787,7 @@ static void test_specular_lighting(void)
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, TRUE);
ok(SUCCEEDED(hr), "Failed to enable specular lighting, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IDirect3DDevice8_SetLight(device, 0, tests[i].light);
ok(SUCCEEDED(hr), "Failed to set light parameters, hr %#x.\n", hr);
@@ -1480,7 +1472,7 @@ static void fog_with_shader_test(void)
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGEND, end.i);
ok(hr == D3D_OK, "Setting fog end failed (%08x)\n", hr);
- for (i = 0; i < sizeof(test_data)/sizeof(test_data[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_data); ++i)
{
hr = IDirect3DDevice8_SetVertexShader(device, vertex_shader[test_data[i].vshader]);
ok(SUCCEEDED(hr), "SetVertexShader failed (%08x)\n", hr);
@@ -2458,7 +2450,7 @@ static void test_scalar_instructions(void)
goto done;
}
- for (i = 0; i < sizeof(test_data) / sizeof(*test_data); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_data); ++i)
{
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff336699, 0.0f, 0);
ok(SUCCEEDED(hr), "%s: Failed to clear, hr %#x.\n", test_data[i].name, hr);
@@ -3100,7 +3092,7 @@ static void texop_test(void)
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 1.0f, 0);
ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear failed with 0x%08x\n", hr);
- for (i = 0; i < sizeof(test_data) / sizeof(*test_data); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_data); ++i)
{
if (!(caps.TextureOpCaps & test_data[i].caps_flag))
{
@@ -3789,7 +3781,7 @@ static void intz_test(void)
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
get_rt_readback(original_rt, &rb);
- for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i)
+ for (i = 0; i < ARRAY_SIZE(expected_colors); ++i)
{
D3DCOLOR color = get_readback_color(&rb, expected_colors[i].x, expected_colors[i].y);
ok(color_match(color, expected_colors[i].color, 1),
@@ -3847,7 +3839,7 @@ static void intz_test(void)
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
get_rt_readback(original_rt, &rb);
- for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i)
+ for (i = 0; i < ARRAY_SIZE(expected_colors); ++i)
{
D3DCOLOR color = get_readback_color(&rb, expected_colors[i].x, expected_colors[i].y);
ok(color_match(color, expected_colors[i].color, 1),
@@ -3915,7 +3907,7 @@ static void intz_test(void)
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
get_rt_readback(original_rt, &rb);
- for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i)
+ for (i = 0; i < ARRAY_SIZE(expected_colors); ++i)
{
D3DCOLOR color = get_readback_color(&rb, expected_colors[i].x, expected_colors[i].y);
ok(color_match(color, expected_colors[i].color, 1),
@@ -4070,7 +4062,7 @@ static void shadow_test(void)
D3DTTFF_COUNT4 | D3DTTFF_PROJECTED);
ok(SUCCEEDED(hr), "SetTextureStageState failed, hr %#x.\n", hr);
- for (i = 0; i < sizeof(formats) / sizeof(*formats); ++i)
+ for (i = 0; i < ARRAY_SIZE(formats); ++i)
{
D3DFORMAT format = formats[i].format;
IDirect3DTexture8 *texture;
@@ -4132,7 +4124,7 @@ static void shadow_test(void)
IDirect3DTexture8_Release(texture);
get_rt_readback(original_rt, &rb);
- for (j = 0; j < sizeof(expected_colors) / sizeof(*expected_colors); ++j)
+ for (j = 0; j < ARRAY_SIZE(expected_colors); ++j)
{
D3DCOLOR color = get_readback_color(&rb, expected_colors[j].x, expected_colors[j].y);
/* Geforce 7 on Windows returns 1.0 in alpha when the depth format is D24S8 or D24X8,
@@ -4459,7 +4451,7 @@ static void resz_test(void)
hr = IDirect3DDevice8_EndScene(device);
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
- for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i)
+ for (i = 0; i < ARRAY_SIZE(expected_colors); ++i)
{
D3DCOLOR color = getPixelColor(device, expected_colors[i].x, expected_colors[i].y);
ok(color_match(color, expected_colors[i].color, 1),
@@ -4544,7 +4536,7 @@ static void resz_test(void)
hr = IDirect3DDevice8_EndScene(device);
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
- for (i = 0; i < sizeof(expected_colors) / sizeof(*expected_colors); ++i)
+ for (i = 0; i < ARRAY_SIZE(expected_colors); ++i)
{
D3DCOLOR color = getPixelColor(device, expected_colors[i].x, expected_colors[i].y);
ok(color_match(color, expected_colors[i].color, 1),
@@ -4891,7 +4883,7 @@ static void fog_special_test(void)
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGEND, conv.d);
ok(SUCCEEDED(hr), "Failed to set fog end, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr);
@@ -5926,7 +5918,7 @@ static void test_fog_interpolation(void)
hr = IDirect3DDevice8_SetTransform(device, D3DTS_PROJECTION, &ident_mat);
ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
if(!(caps.RasterCaps & D3DPRASTERCAPS_FOGTABLE) && tests[i].tfog)
continue;
@@ -6081,7 +6073,7 @@ static void test_negative_fixedfunction_fog(void)
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE);
ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
if (!(caps.RasterCaps & D3DPRASTERCAPS_FOGTABLE) && tests[i].tfog)
continue;
@@ -6206,7 +6198,7 @@ static void test_table_fog_zw(void)
hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
ok(SUCCEEDED(hr), "Failed to set fvf, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x000000ff, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
@@ -6414,7 +6406,7 @@ static void test_signed_formats(void)
hr = IDirect3DDevice8_CreatePixelShader(device, shader_code_alpha, &shader_alpha);
ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr);
- for (i = 0; i < sizeof(formats) / sizeof(*formats); i++)
+ for (i = 0; i < ARRAY_SIZE(formats); i++)
{
hr = IDirect3D8_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, formats[i].format);
@@ -6424,7 +6416,7 @@ static void test_signed_formats(void)
continue;
}
- for (j = 0; j < sizeof(tests) / sizeof(*tests); j++)
+ for (j = 0; j < ARRAY_SIZE(tests); j++)
{
texture_sysmem = NULL;
hr = IDirect3DDevice8_CreateTexture(device, tests[j].width, 4, 1, 0,
@@ -6661,7 +6653,7 @@ static void test_updatetexture(void)
hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
ok(hr == D3D_OK, "Failed to set texture stage state, hr %#x.\n", hr);
- for (t = 0; t < sizeof(texture_types) / sizeof(*texture_types); ++t)
+ for (t = 0; t < ARRAY_SIZE(texture_types); ++t)
{
if (!(caps.TextureCaps & texture_types[t].cap))
{
@@ -6683,7 +6675,7 @@ static void test_updatetexture(void)
hr = IDirect3DDevice8_SetVertexShader(device, texture_types[t].fvf);
ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
if (tests[i].src_format == MAKEFOURCC('A','T','I','2') && !ati2n_supported)
continue;
@@ -7253,7 +7245,7 @@ static void test_pointsize(void)
hr = IDirect3DDevice8_SetRenderTarget(device, rt, depthstencil);
ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr);
- for (i = 0; i < sizeof(test_setups) / sizeof(test_setups[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_setups); ++i)
{
if (caps.VertexShaderVersion < test_setups[i].vs->version
|| caps.PixelShaderVersion < test_setups[i].ps->version)
@@ -7285,7 +7277,7 @@ static void test_pointsize(void)
hr = IDirect3DDevice8_SetPixelShader(device, ps);
ok(SUCCEEDED(hr), "Failed to set pixel shader, hr %#x.\n", hr);
- for (j = 0; j < sizeof(tests) / sizeof(tests[0]); ++j)
+ for (j = 0; j < ARRAY_SIZE(tests); ++j)
{
unsigned int size = tests[j].override_min ? 63 : tests[j].zero_size ? 0 : tests[j].scale
? test_setups[i].scaled_size : test_setups[i].nonscaled_size;
@@ -8116,7 +8108,7 @@ static void test_flip(void)
return;
}
- for (i = 0; i < sizeof(back_buffers) / sizeof(*back_buffers); ++i)
+ for (i = 0; i < ARRAY_SIZE(back_buffers); ++i)
{
hr = IDirect3DDevice8_GetBackBuffer(device, i, D3DBACKBUFFER_TYPE_MONO, &back_buffers[i]);
ok(SUCCEEDED(hr), "Failed to get back buffer, hr %#x.\n", hr);
@@ -8152,7 +8144,7 @@ static void test_flip(void)
IDirect3DSurface8_Release(test_surface);
/* Backbuffer surface pointers are unmodified */
- for (i = 0; i < sizeof(back_buffers) / sizeof(*back_buffers); ++i)
+ for (i = 0; i < ARRAY_SIZE(back_buffers); ++i)
{
hr = IDirect3DDevice8_GetBackBuffer(device, i, D3DBACKBUFFER_TYPE_MONO, &test_surface);
ok(SUCCEEDED(hr), "Failed to get back buffer, hr %#x.\n", hr);
@@ -8184,7 +8176,7 @@ static void test_flip(void)
color = get_surface_color(back_buffers[0], 1, 1);
ok(color == 0xff808080, "Got unexpected color 0x%08x.\n", color);
- for (i = 0; i < sizeof(back_buffers) / sizeof(*back_buffers); ++i)
+ for (i = 0; i < ARRAY_SIZE(back_buffers); ++i)
IDirect3DSurface8_Release(back_buffers[i]);
refcount = IDirect3DDevice8_Release(device);
@@ -8377,7 +8369,7 @@ static void test_uninitialized_varyings(void)
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE);
ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
if (caps.VertexShaderVersion < tests[i].vs_version
|| caps.PixelShaderVersion < tests[i].ps_version)
@@ -8574,7 +8566,7 @@ static void test_shademode(void)
/* Try it first with a TRIANGLESTRIP. Do it with different geometry because
* the color fixups we have to do for FLAT shading will be dependent on that. */
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
if (tests[i].vs->version)
{
@@ -9222,7 +9214,7 @@ static void test_texture_blending(void)
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(hr == D3D_OK, "Failed to disable lighting, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
const struct test *current_test = &tests[i];
@@ -9413,7 +9405,7 @@ static void test_color_clamping(void)
hr = IDirect3DDevice8_SetTextureStageState(device, 1, D3DTSS_COLORARG2, D3DTA_CURRENT);
ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr);
- for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
if (caps.VertexShaderVersion < tests[i].vs_version
|| caps.PixelShaderVersion < tests[i].ps_version)
@@ -10118,7 +10110,7 @@ static void test_map_synchronisation(void)
}
size = (tri_count + 2) * sizeof(*quad1.strip);
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IDirect3DDevice8_CreateVertexBuffer(device, size,
D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, 0, D3DPOOL_DEFAULT, &buffer);
@@ -10228,7 +10220,7 @@ static void test_viewport(void)
/* This crashes on Windows. */
/* hr = IDirect3DDevice8_SetViewport(device, NULL); */
- for (i = 0; i < sizeof(rt_sizes) / sizeof(rt_sizes[0]); ++i)
+ for (i = 0; i < ARRAY_SIZE(rt_sizes); ++i)
{
if (i)
{
@@ -10244,7 +10236,7 @@ static void test_viewport(void)
ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#x.\n", hr);
}
- for (j = 0; j < sizeof(tests) / sizeof(tests[0]); ++j)
+ for (j = 0; j < ARRAY_SIZE(tests); ++j)
{
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x (i %u, j %u).\n", hr, i, j);
--
2.14.4
June 5, 2018
[PATCH] credui/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/credui/tests/credui.c | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/dlls/credui/tests/credui.c b/dlls/credui/tests/credui.c
index 01d657d580..13fbd41c07 100644
--- a/dlls/credui/tests/credui.c
+++ b/dlls/credui/tests/credui.c
@@ -58,20 +58,20 @@ static void test_CredUIPromptForCredentials(void)
username[0] = '\0';
password[0] = '\0';
ret = CredUIPromptForCredentialsW(NULL, NULL, NULL, 0, username,
- sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI);
ok(ret == ERROR_INVALID_FLAGS, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %d\n", ret);
ret = CredUIPromptForCredentialsW(NULL, NULL, NULL, 0, username,
- sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI | CREDUI_FLAGS_GENERIC_CREDENTIALS);
ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username,
- sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX);
ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
@@ -86,8 +86,8 @@ static void test_CredUIPromptForCredentials(void)
'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0};
ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username,
- sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
if (ret == ERROR_SUCCESS)
@@ -97,10 +97,9 @@ static void test_CredUIPromptForCredentials(void)
}
credui_info.pszCaptionText = wszCaption1;
- ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL,
- ERROR_ACCESS_DENIED,
- username, sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, ERROR_ACCESS_DENIED,
+ username, ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
if (ret == ERROR_SUCCESS)
@@ -111,8 +110,8 @@ static void test_CredUIPromptForCredentials(void)
credui_info.pszCaptionText = wszCaption2;
ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0,
- username, sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ username, ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
NULL, CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
if (ret == ERROR_SUCCESS)
@@ -125,8 +124,8 @@ static void test_CredUIPromptForCredentials(void)
save = TRUE;
credui_info.pszCaptionText = wszCaption3;
ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0,
- username, sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ username, ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_DO_NOT_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(save, "save flag should have been untouched\n");
@@ -134,8 +133,8 @@ static void test_CredUIPromptForCredentials(void)
save = FALSE;
credui_info.pszCaptionText = wszCaption4;
ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0,
- username, sizeof(username)/sizeof(username[0]),
- password, sizeof(password)/sizeof(password[0]),
+ username, ARRAY_SIZE(username),
+ password, ARRAY_SIZE(password),
&save, CREDUI_FLAGS_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION);
ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret);
ok(!save, "save flag should have been untouched\n");
--
2.14.4
June 5, 2018
[PATCH 5/5] d3d11/tests: Add test for negative viewport coordinates.
by Matteo Bruni
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
I haven't tested it but I suspect
https://lists.freedesktop.org/archives/mesa-dev/2018-June/196667.html
fixes this test on Intel.
dlls/d3d11/tests/d3d11.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 1043722eb58..c641372bc8e 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -24602,6 +24602,57 @@ static void test_fractional_viewports(void)
release_test_context(&test_context);
}
+static void test_negative_viewports(const D3D_FEATURE_LEVEL feature_level)
+{
+ struct d3d11_test_context test_context;
+ ID3D11DeviceContext *context;
+ BOOL quirk;
+ RECT rect;
+
+ static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ static const struct vec4 green = {0.0f, 1.0f, 0.0f, 1.0f};
+
+ if (!init_test_context(&test_context, &feature_level))
+ return;
+ context = test_context.immediate_context;
+
+ set_viewport(context, 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f);
+ ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white);
+ draw_color_quad(&test_context, &green);
+ check_texture_color(test_context.backbuffer, 0xff00ff00, 0);
+
+ set_viewport(context, -0.0f, -0.0f, 640.0f, 480.0f, 0.0f, 1.0f);
+ ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white);
+ draw_color_quad(&test_context, &green);
+ check_texture_color(test_context.backbuffer, 0xff00ff00, 0);
+
+ /* For feature levels greater than or equal to 11_0, a negative top left
+ * corner shifts the bottom right corner by a whole integer. It seems that
+ * floor() is used to round viewport corners to integers.
+ */
+ quirk = feature_level >= D3D_FEATURE_LEVEL_11_0;
+
+ set_viewport(context, -0.4f, -0.4f, 640.0f, 480.0f, 0.0f, 1.0f);
+ ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white);
+ draw_color_quad(&test_context, &green);
+ SetRect(&rect, 0, 0, 639, 479);
+ check_texture_sub_resource_color(test_context.backbuffer, 0, &rect, 0xff00ff00, 1);
+ SetRect(&rect, 639, 479, 640, 480);
+ todo_wine_if(quirk)
+ check_texture_sub_resource_color(test_context.backbuffer, 0, &rect, quirk ? 0xffffffff : 0xff00ff00, 1);
+
+ set_viewport(context, -1.0f / 128.0f, -1.0 / 128.0f, 640.0f, 480.0f, 0.0f, 1.0f);
+ ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white);
+ draw_color_quad(&test_context, &green);
+ SetRect(&rect, 0, 0, 639, 479);
+ check_texture_sub_resource_color(test_context.backbuffer, 0, &rect, 0xff00ff00, 1);
+ SetRect(&rect, 639, 479, 640, 480);
+ todo_wine_if(quirk)
+ check_texture_sub_resource_color(test_context.backbuffer, 0, &rect, quirk ? 0xffffffff : 0xff00ff00, 1);
+
+ release_test_context(&test_context);
+}
+
static void test_early_depth_stencil(void)
{
ID3D11DepthStencilState *depth_stencil_state;
@@ -27669,6 +27720,7 @@ START_TEST(d3d11)
test_gather_c();
test_depth_bias();
test_fractional_viewports();
+ run_for_each_feature_level_in_range(D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_11_0, test_negative_viewports);
test_early_depth_stencil();
test_conservative_depth_output();
test_format_compatibility();
--
2.16.1
June 5, 2018
[PATCH 4/5] d3d9: Get rid of an unnecessary wined3d_device_set_base_vertex_index() call.
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
It will be set again before calling the next draw_primitive() and
AFAICS can't be accessed in the meantime.
dlls/d3d9/device.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 4016b0ccaa2..e32bc14af5b 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2946,7 +2946,6 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
wined3d_device_set_stream_source(device->wined3d_device, 0, NULL, 0, 0);
wined3d_device_set_index_buffer(device->wined3d_device, NULL, WINED3DFMT_UNKNOWN, 0);
- wined3d_device_set_base_vertex_index(device->wined3d_device, 0);
if (SUCCEEDED(hr))
d3d9_rts_flag_auto_gen_mipmap(device);
--
2.16.1
June 5, 2018
[PATCH 3/5] wined3d: Set stream stride and offset even when buffer is NULL.
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
dlls/d3d8/device.c | 8 ++++++++
dlls/d3d9/device.c | 8 ++++++++
dlls/d3d9/tests/device.c | 2 +-
dlls/d3d9/tests/visual.c | 2 +-
dlls/wined3d/device.c | 6 ++----
5 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 616886bcafa..e4869c2618e 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -3102,6 +3102,14 @@ static HRESULT WINAPI d3d8_device_SetStreamSource(IDirect3DDevice8 *iface,
iface, stream_idx, buffer, stride);
wined3d_mutex_lock();
+ if (!stride)
+ {
+ struct wined3d_buffer *wined3d_buffer;
+ unsigned int cur_offset;
+
+ hr = wined3d_device_get_stream_source(device->wined3d_device, stream_idx, &wined3d_buffer,
+ &cur_offset, &stride);
+ }
hr = wined3d_device_set_stream_source(device->wined3d_device, stream_idx,
buffer_impl ? buffer_impl->wined3d_buffer : NULL, 0, stride);
wined3d_mutex_unlock();
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 2f3ad2880d6..4016b0ccaa2 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -3349,6 +3349,14 @@ static HRESULT WINAPI d3d9_device_SetStreamSource(IDirect3DDevice9Ex *iface,
iface, stream_idx, buffer, offset, stride);
wined3d_mutex_lock();
+ if (!stride)
+ {
+ struct wined3d_buffer *wined3d_buffer;
+ unsigned int cur_offset;
+
+ hr = wined3d_device_get_stream_source(device->wined3d_device, stream_idx, &wined3d_buffer,
+ &cur_offset, &stride);
+ }
hr = wined3d_device_set_stream_source(device->wined3d_device, stream_idx,
buffer_impl ? buffer_impl->wined3d_buffer : NULL, offset, stride);
wined3d_mutex_unlock();
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index b71058de486..66bf5b00c50 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -2973,7 +2973,7 @@ static void test_draw_primitive(void)
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
ok(!current_vb, "Unexpected vb %p.\n", current_vb);
ok(!offset, "Unexpected offset %u.\n", offset);
- todo_wine ok(!stride, "Unexpected stride %u.\n", stride);
+ ok(!stride, "Unexpected stride %u.\n", stride);
/* NULL index buffer, valid vertex declaration, NULL stream source. */
hr = IDirect3DDevice9_SetIndices(device, NULL);
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 1e213abeb18..95982e05155 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -23132,7 +23132,7 @@ static void test_drawindexedprimitiveup(void)
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
ok(!vb, "Unexpected vb %p.\n", vb);
ok(!offset, "Unexpected offset %u.\n", offset);
- todo_wine ok(!stride, "Unexpected stride %u.\n", stride);
+ ok(!stride, "Unexpected stride %u.\n", stride);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8ef74b6ef0f..6776c5c5e0c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1389,12 +1389,10 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI
}
stream->buffer = buffer;
+ stream->stride = stride;
+ stream->offset = offset;
if (buffer)
- {
- stream->stride = stride;
- stream->offset = offset;
wined3d_buffer_incref(buffer);
- }
if (!device->recording)
wined3d_cs_emit_set_stream_source(device->cs, stream_idx, buffer, offset, stride);
--
2.16.1
June 5, 2018
[PATCH 2/5] d3d9/tests: Test how state is reset after DrawPrimitive[Indexed]UP().
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
dlls/d3d9/tests/device.c | 38 +++++++++++++++++++++++++++++++++-----
dlls/d3d9/tests/visual.c | 8 ++++++++
2 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index bd1890f45c5..b71058de486 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -2861,10 +2861,11 @@ static void test_draw_primitive(void)
D3DDECL_END()
};
+ IDirect3DVertexBuffer9 *vertex_buffer, *current_vb;
+ IDirect3DIndexBuffer9 *index_buffer, *current_ib;
IDirect3DVertexDeclaration9 *vertex_declaration;
- IDirect3DVertexBuffer9 *vertex_buffer;
- IDirect3DIndexBuffer9 *index_buffer;
IDirect3DDevice9 *device;
+ UINT offset, stride;
IDirect3D9 *d3d9;
ULONG refcount;
HWND window;
@@ -2918,16 +2919,31 @@ static void test_draw_primitive(void)
hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLELIST, 0, 2);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice9_GetStreamSource(device, 0, ¤t_vb, &offset, &stride);
+ ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
+ ok(current_vb == vertex_buffer, "Unexpected vb %p.\n", current_vb);
+ ok(!offset, "Unexpected offset %u.\n", offset);
+ ok(stride == sizeof(*quad), "Unexpected stride %u.\n", stride);
+ IDirect3DVertexBuffer9_Release(current_vb);
+
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, sizeof(*quad));
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice9_GetStreamSource(device, 0, ¤t_vb, &offset, &stride);
+ ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
+ todo_wine ok(!current_vb, "Unexpected vb %p.\n", current_vb);
+ ok(!offset, "Unexpected offset %u.\n", offset);
+ ok(stride == sizeof(*quad), "Unexpected stride %u.\n", stride);
+ if (current_vb)
+ IDirect3DVertexBuffer9_Release(current_vb);
+
hr = IDirect3DDevice9_SetIndices(device, NULL);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0 /* BaseVertexIndex */,
0 /* MinIndex */, 4 /* NumVerts */, 0 /* StartIndex */, 2 /*PrimCount */);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
- /* Valid index buffer, NULL vertex declaration. Should fail */
+ /* Valid index buffer, NULL vertex declaration. */
hr = IDirect3DDevice9_SetIndices(device, index_buffer);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0 /* BaseVertexIndex */,
@@ -2938,6 +2954,12 @@ static void test_draw_primitive(void)
indices, D3DFMT_INDEX16, quad, sizeof(*quad));
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+ hr = IDirect3DDevice9_GetIndices(device, ¤t_ib);
+ ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
+ todo_wine ok(!current_ib, "Unexpected index buffer %p.\n", current_vb);
+ if (current_ib)
+ IDirect3DIndexBuffer9_Release(current_ib);
+
hr = IDirect3DDevice9_SetVertexDeclaration(device, vertex_declaration);
ok(SUCCEEDED(hr), "SetVertexDeclaration failed, hr %#x.\n", hr);
@@ -2947,14 +2969,20 @@ static void test_draw_primitive(void)
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr);
- /* NULL index buffer, valid vertex vertex declaration. Should succeed */
+ hr = IDirect3DDevice9_GetStreamSource(device, 0, ¤t_vb, &offset, &stride);
+ ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
+ ok(!current_vb, "Unexpected vb %p.\n", current_vb);
+ ok(!offset, "Unexpected offset %u.\n", offset);
+ todo_wine ok(!stride, "Unexpected stride %u.\n", stride);
+
+ /* NULL index buffer, valid vertex declaration, NULL stream source. */
hr = IDirect3DDevice9_SetIndices(device, NULL);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0 /* BaseVertexIndex */,
0 /* MinIndex */, 4 /* NumVerts */, 0 /* StartIndex */, 2 /*PrimCount */);
todo_wine ok(SUCCEEDED(hr), "DrawIndexedPrimitive failed, hr %#x.\n", hr);
- /* Valid index buffer and vertex declaration. Should succeed */
+ /* Valid index buffer and vertex declaration, NULL stream source. */
hr = IDirect3DDevice9_SetIndices(device, index_buffer);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0 /* BaseVertexIndex */,
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 835c8377e47..1e213abeb18 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -23078,7 +23078,9 @@ static void test_drawindexedprimitiveup(void)
{{ 1.0f, 1.0f, 0.1f}, 0xff00ff00},
};
static const unsigned short indices[] = {0, 1, 2, 3, 4, 5, 6, 7};
+ IDirect3DVertexBuffer9 *vb;
IDirect3DDevice9 *device;
+ UINT offset, stride;
IDirect3D9 *d3d;
ULONG refcount;
D3DCOLOR color;
@@ -23126,6 +23128,12 @@ static void test_drawindexedprimitiveup(void)
color = getPixelColor(device, 480, 360);
ok(color_match(color, 0x00bf4000, 1), "Got unexpected color 0x%08x.\n", color);
+ hr = IDirect3DDevice9_GetStreamSource(device, 0, &vb, &offset, &stride);
+ ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
+ ok(!vb, "Unexpected vb %p.\n", vb);
+ ok(!offset, "Unexpected offset %u.\n", offset);
+ todo_wine ok(!stride, "Unexpected stride %u.\n", stride);
+
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
--
2.16.1
June 5, 2018
[PATCH 1/5] wined3d: Declare the correct number and type of fragment shader color outputs.
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
---
dlls/wined3d/glsl_shader.c | 116 ++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 109 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index a99762b151f..bc714f8de78 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -7613,6 +7613,53 @@ static void shader_glsl_enable_extensions(struct wined3d_string_buffer *buffer,
shader_addline(buffer, "#extension GL_EXT_texture_array : enable\n");
}
+static void shader_glsl_generate_color_output(struct wined3d_string_buffer *buffer,
+ const struct wined3d_gl_info *gl_info, const struct wined3d_shader *shader)
+{
+ const struct wined3d_shader_signature *output_signature = &shader->output_signature;
+ unsigned int i;
+
+ if (output_signature->element_count)
+ {
+ for (i = 0; i < output_signature->element_count; ++i)
+ {
+ const struct wined3d_shader_signature_element *output = &output_signature->elements[i];
+
+ if (strncasecmp(output->semantic_name, "SV_Target", sizeof("SV_Target")))
+ continue;
+ switch (output->component_type)
+ {
+ case WINED3D_TYPE_UINT:
+ shader_addline(buffer, "color_out%u = floatBitsToUint(ps_out[%u]);\n",
+ output->semantic_idx, output->semantic_idx);
+ break;
+ case WINED3D_TYPE_INT:
+ shader_addline(buffer, "color_out%u = floatBitsToInt(ps_out[%u]);\n",
+ output->semantic_idx, output->semantic_idx);
+ break;
+
+ default:
+ FIXME("Unhandled type %#x.\n", output->component_type);
+ /* Fall through. */
+ case WINED3D_TYPE_UNKNOWN:
+ case WINED3D_TYPE_FLOAT:
+ shader_addline(buffer, "color_out%u = ps_out[%u];\n",
+ output->semantic_idx, output->semantic_idx);
+ }
+ }
+ }
+ else
+ {
+ DWORD mask = shader->reg_maps.rt_mask;
+
+ while (mask)
+ {
+ i = wined3d_bit_scan(&mask);
+ shader_addline(buffer, "color_out%u = ps_out[%u];\n", i, i);
+ }
+ }
+}
+
static void shader_glsl_generate_ps_epilogue(const struct wined3d_gl_info *gl_info,
struct wined3d_string_buffer *buffer, const struct wined3d_shader *shader,
const struct ps_compile_args *args)
@@ -7634,6 +7681,26 @@ static void shader_glsl_generate_ps_epilogue(const struct wined3d_gl_info *gl_in
if (reg_maps->sample_mask)
shader_addline(buffer, "gl_SampleMask[0] = floatBitsToInt(sample_mask);\n");
+
+ if (!needs_legacy_glsl_syntax(gl_info))
+ shader_glsl_generate_color_output(buffer, gl_info, shader);
+}
+
+static const char *shader_glsl_get_ps_output_format(enum wined3d_component_type component_type)
+{
+ static const char formats[][6] =
+ {
+ "", /* WINED3D_TYPE_UNKNOWN */
+ "uvec4", /* WINED3D_TYPE_UINT */
+ "ivec4", /* WINED3D_TYPE_INT */
+ "vec4", /* WINED3D_TYPE_FLOAT */
+ };
+ if (component_type < WINED3D_TYPE_UNKNOWN || component_type > WINED3D_TYPE_FLOAT)
+ {
+ WARN("Unexpected component_type %#x.\n", component_type);
+ return formats[WINED3D_TYPE_FLOAT];
+ }
+ return formats[component_type];
}
/* Context activation is done by the caller. */
@@ -7816,9 +7883,35 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
if (!needs_legacy_glsl_syntax(gl_info))
{
- if (shader_glsl_use_explicit_attrib_location(gl_info))
- shader_addline(buffer, "layout(location = 0) ");
- shader_addline(buffer, "out vec4 ps_out[%u];\n", gl_info->limits.buffers);
+ const struct wined3d_shader_signature *output_signature = &shader->output_signature;
+
+ shader_addline(buffer, "vec4 ps_out[%u];\n", gl_info->limits.buffers);
+ if (output_signature->element_count)
+ {
+ for (i = 0; i < output_signature->element_count; ++i)
+ {
+ const struct wined3d_shader_signature_element *output = &output_signature->elements[i];
+
+ if (strncasecmp(output->semantic_name, "SV_Target", sizeof("SV_Target")))
+ continue;
+ if (shader_glsl_use_explicit_attrib_location(gl_info))
+ shader_addline(buffer, "layout(location = %u) ", output->semantic_idx);
+ shader_addline(buffer, "out %s color_out%u;\n",
+ shader_glsl_get_ps_output_format(output->component_type), output->semantic_idx);
+ }
+ }
+ else
+ {
+ DWORD mask = reg_maps->rt_mask;
+
+ while (mask)
+ {
+ i = wined3d_bit_scan(&mask);
+ if (shader_glsl_use_explicit_attrib_location(gl_info))
+ shader_addline(buffer, "layout(location = %u) ", i);
+ shader_addline(buffer, "out vec4 color_out%u;\n", i);
+ }
+ }
}
if (shader->limits->constant_float + extra_constants_needed >= gl_info->limits.glsl_ps_float_constants)
@@ -9536,9 +9629,10 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv *
if (!needs_legacy_glsl_syntax(gl_info))
{
+ shader_addline(buffer, "vec4 ps_out[1];\n");
if (shader_glsl_use_explicit_attrib_location(gl_info))
shader_addline(buffer, "layout(location = 0) ");
- shader_addline(buffer, "out vec4 ps_out[1];\n");
+ shader_addline(buffer, "out vec4 color_out0;\n");
}
shader_addline(buffer, "vec4 tmp0, tmp1;\n");
@@ -9878,6 +9972,8 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv *
shader_glsl_generate_fog_code(buffer, gl_info, settings->fog);
shader_glsl_generate_alpha_test(buffer, gl_info, alpha_test_func);
+ if (!needs_legacy_glsl_syntax(gl_info))
+ shader_addline(buffer, "color_out0 = ps_out[0];\n");
shader_addline(buffer, "}\n");
@@ -10419,13 +10515,17 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
}
}
checkGLcall("glBindAttribLocation");
- string_buffer_release(&priv->string_buffers, tmp_name);
if (!needs_legacy_glsl_syntax(gl_info))
{
- GL_EXTCALL(glBindFragDataLocation(program_id, 0, "ps_out"));
- checkGLcall("glBindFragDataLocation");
+ for (i = 0; i < MAX_RENDER_TARGET_VIEWS; ++i)
+ {
+ string_buffer_sprintf(tmp_name, "color_out%u", i);
+ GL_EXTCALL(glBindFragDataLocation(program_id, i, tmp_name->buffer));
+ checkGLcall("glBindFragDataLocation");
+ }
}
+ string_buffer_release(&priv->string_buffers, tmp_name);
}
if (hshader)
@@ -12793,6 +12893,8 @@ static GLuint glsl_blitter_generate_program(struct wined3d_glsl_blitter *blitter
shader_glsl_add_version_declaration(buffer, gl_info);
shader_addline(buffer, "uniform sampler%s sampler;\n", tex_type);
declare_in_varying(gl_info, buffer, FALSE, "vec3 out_texcoord;\n");
+ /* TODO: Declare the out variable with the correct type (and put it in the
+ * blitter args). */
if (!needs_legacy_glsl_syntax(gl_info))
shader_addline(buffer, "out vec4 ps_out[1];\n");
--
2.16.1
June 5, 2018
[PATCH 3/3] msvcrt: Implement quick_exit and _crt_at_quick_exit
by Fabian Maurer
Code taken from onexit logic and adapted-
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dlls/msvcrt/exit.c | 48 ++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c
index 313a06ecd0..070a6753e8 100644
--- a/dlls/msvcrt/exit.c
+++ b/dlls/msvcrt/exit.c
@@ -30,8 +30,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
#define UNLOCK_EXIT _munlock(_EXIT_LOCK1)
static MSVCRT__onexit_t *MSVCRT_atexit_table = NULL;
+static MSVCRT__onexit_t *MSVCRT_atquickexit_table = NULL;
static int MSVCRT_atexit_table_size = 0;
+static int MSVCRT_atquickexit_table_size = 0;
static int MSVCRT_atexit_registered = 0; /* Points to free slot */
+static int MSVCRT_atquickexit_registered = 0; /* Points to free slot */
static MSVCRT_purecall_handler purecall_handler = NULL;
typedef struct MSVCRT__onexit_table_t
@@ -78,6 +81,22 @@ static void __MSVCRT__call_atexit(void)
}
}
+/* INTERNAL: call atexit functions */
+static void __MSVCRT__call_atquickexit(void)
+{
+ TRACE("%d atquickexit functions to call\n", MSVCRT_atquickexit_registered);
+
+ /* Last registered gets executed first */
+ while (MSVCRT_atquickexit_registered > 0)
+ {
+ MSVCRT_atquickexit_registered--;
+ TRACE("next is %p\n",MSVCRT_atquickexit_table[MSVCRT_atquickexit_registered]);
+ if (MSVCRT_atquickexit_table[MSVCRT_atquickexit_registered])
+ (*MSVCRT_atquickexit_table[MSVCRT_atquickexit_registered])();
+ TRACE("returned\n");
+ }
+}
+
/*********************************************************************
* __dllonexit (MSVCRT.@)
*/
@@ -125,7 +144,8 @@ void CDECL MSVCRT__exit(int exitcode)
*/
void CDECL MSVCRT_quick_exit(int exitcode)
{
- FIXME("partial stub: (%d)\n", exitcode);
+ TRACE("(%d)\n", exitcode);
+ __MSVCRT__call_atquickexit();
MSVCRT__exit(exitcode);
}
@@ -363,7 +383,31 @@ int CDECL MSVCRT_atexit(void (*func)(void))
*/
int CDECL MSVCRT__crt_at_quick_exit(void (*func)(void))
{
- FIXME("stub: (%p)\n", func);
+ TRACE("(%p)\n",func);
+
+ if (!func)
+ return -1;
+
+ LOCK_EXIT;
+ if (MSVCRT_atquickexit_registered > MSVCRT_atquickexit_table_size - 1)
+ {
+ MSVCRT__onexit_t *newtable;
+ TRACE("expanding table\n");
+ newtable = MSVCRT_calloc(MSVCRT_atquickexit_table_size + 32, sizeof(void *));
+ if (!newtable)
+ {
+ TRACE("failed!\n");
+ UNLOCK_EXIT;
+ return -1;
+ }
+ memcpy (newtable, MSVCRT_atquickexit_table, MSVCRT_atquickexit_table_size*sizeof(void *));
+ MSVCRT_atquickexit_table_size += 32;
+ MSVCRT_free (MSVCRT_atquickexit_table);
+ MSVCRT_atquickexit_table = newtable;
+ }
+ MSVCRT_atquickexit_table[MSVCRT_atquickexit_registered] = (MSVCRT__onexit_t)func;
+ MSVCRT_atquickexit_registered++;
+ UNLOCK_EXIT;
return 0;
}
--
2.17.1
June 5, 2018
[PATCH 2/3] msvcrt: Add quick_exit
by Fabian Maurer
Follow-up issue to bug 45295.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
.../api-ms-win-crt-runtime-l1-1-0.spec | 2 +-
dlls/msvcrt/exit.c | 10 ++++++++++
dlls/ucrtbase/ucrtbase.spec | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
index 4bc8df768d..74d682b33b 100644
--- a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
@@ -97,7 +97,7 @@
@ cdecl fesetround(long) ucrtbase.fesetround
@ stub fetestexcept
@ cdecl perror(str) ucrtbase.perror
-@ stub quick_exit
+@ cdecl quick_exit(long) ucrtbase.quick_exit
@ cdecl raise(long) ucrtbase.raise
@ cdecl set_terminate(ptr) ucrtbase.set_terminate
@ cdecl signal(long long) ucrtbase.signal
diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c
index bba2a653ed..313a06ecd0 100644
--- a/dlls/msvcrt/exit.c
+++ b/dlls/msvcrt/exit.c
@@ -120,6 +120,16 @@ void CDECL MSVCRT__exit(int exitcode)
ExitProcess(exitcode);
}
+/*********************************************************************
+ * quick_exit (MSVCRT.@)
+ */
+void CDECL MSVCRT_quick_exit(int exitcode)
+{
+ FIXME("partial stub: (%d)\n", exitcode);
+ MSVCRT__exit(exitcode);
+}
+
+
/* Print out an error message with an option to debug */
static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *message)
{
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 3cb355506a..9d993e90b7 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2454,7 +2454,7 @@
@ cdecl putwchar(long) MSVCRT__fputwchar
@ cdecl qsort(ptr long long ptr) MSVCRT_qsort
@ cdecl qsort_s(ptr long long ptr ptr) MSVCRT_qsort_s
-@ stub quick_exit
+@ cdecl quick_exit(long) MSVCRT_quick_exit
@ cdecl raise(long) MSVCRT_raise
@ cdecl rand() MSVCRT_rand
@ cdecl rand_s(ptr) MSVCRT_rand_s
--
2.17.1
June 5, 2018
[PATCH 1/3] msvcrt: Add _crt_at_quick_exit stub
by Fabian Maurer
Fixes bug 45295.
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
.../api-ms-win-crt-runtime-l1-1-0.spec | 2 +-
dlls/msvcrt/exit.c | 10 +++++++++-
dlls/ucrtbase/ucrtbase.spec | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
index 24014a65ba..4bc8df768d 100644
--- a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
@@ -28,7 +28,7 @@
@ cdecl _control87(long long) ucrtbase._control87
@ cdecl _controlfp(long long) ucrtbase._controlfp
@ cdecl _controlfp_s(ptr long long) ucrtbase._controlfp_s
-@ stub _crt_at_quick_exit
+@ cdecl _crt_at_quick_exit(ptr) ucrtbase._crt_at_quick_exit
@ cdecl _crt_atexit(ptr) ucrtbase._crt_atexit
@ cdecl _crt_debugger_hook(long) ucrtbase._crt_debugger_hook
@ cdecl _endthread() ucrtbase._endthread
diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c
index 7e1805569c..bba2a653ed 100644
--- a/dlls/msvcrt/exit.c
+++ b/dlls/msvcrt/exit.c
@@ -348,6 +348,15 @@ int CDECL MSVCRT_atexit(void (*func)(void))
return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1;
}
+/*********************************************************************
+ * _crt_at_quick_exit (UCRTBASE.@)
+ */
+int CDECL MSVCRT__crt_at_quick_exit(void (*func)(void))
+{
+ FIXME("stub: (%p)\n", func);
+ return 0;
+}
+
#if _MSVCR_VER>=140
/*********************************************************************
@@ -359,7 +368,6 @@ int CDECL MSVCRT__crt_atexit(void (*func)(void))
return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1;
}
-
/*********************************************************************
* _initialize_onexit_table (UCRTBASE.@)
*/
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 236b0d526d..3cb355506a 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -240,7 +240,7 @@
@ cdecl _cputws(wstr)
@ cdecl _creat(str long) MSVCRT__creat
@ cdecl _create_locale(long str) MSVCRT__create_locale
-@ stub _crt_at_quick_exit
+@ cdecl _crt_at_quick_exit(ptr) MSVCRT__crt_at_quick_exit
@ cdecl _crt_atexit(ptr) MSVCRT__crt_atexit
@ cdecl _crt_debugger_hook(long) MSVCRT__crt_debugger_hook
@ cdecl _ctime32(ptr) MSVCRT__ctime32
--
2.17.1
June 5, 2018
Re: [PATCH 2/2] d3dx9/tests: Use ARRAY_SIZE() in the initialization of registerset_data[]
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
June 5, 2018
Re: [PATCH 1/2] d3dx9/tests: Use the available ARRAY_SIZE() macro
by Matteo Bruni
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
June 5, 2018
Re: [PATCH vkd3d 4/4] demos: Get rid of code for compiling shaders using d3dcompiler.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 5, 2018
Re: [PATCH vkd3d 3/4] libs/vkd3d-shader: Factor out shader_dump_instruction().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 5, 2018
Re: [PATCH vkd3d 2/4] libs/vkd3d-shader: Factor out shader_dump_instruction_flags().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 5, 2018
Re: [PATCH vkd3d 1/4] libs/vkd3d-shader: Factor out shader_dump_version().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
June 5, 2018
How to install Windows Installer 4.5 on WINE
by mrt303xx@aol.com
I am running Fedora 28 and I need to install an MSI, but Windows Install fails to create a directory. It's like the installer needs sudo access but wine like running as root. HELP! I'm trying to prove a development concept with WINE
Tarie
June 5, 2018
[PATCH] ntdsapi/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdsapi/tests/ntdsapi.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdsapi/tests/ntdsapi.c b/dlls/ntdsapi/tests/ntdsapi.c
index 3d95d1bd0e..b6dc1856a4 100644
--- a/dlls/ntdsapi/tests/ntdsapi.c
+++ b/dlls/ntdsapi/tests/ntdsapi.c
@@ -45,39 +45,39 @@ static void test_DsMakeSpn(void)
spn[0] = '\0';
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(NULL, NULL, NULL, 0, NULL, &spn_length, spn);
ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret);
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(NULL, wszServiceHost, NULL, 0, NULL, &spn_length, spn);
ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret);
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 0, NULL, &spn_length, spn);
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
ok(!lstrcmpW(spn, wszSpn1), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn1) + 1, spn_length);
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0, NULL, &spn_length, spn);
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
ok(!lstrcmpW(spn, wszSpn2), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn2) + 1, spn_length);
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, NULL, &spn_length, spn);
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
ok(!lstrcmpW(spn, wszSpn3), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn3) + 1, spn_length);
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn);
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
ok(!lstrcmpW(spn, wszSpn4), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn4) + 1, spn_length);
- spn_length = sizeof(spn)/sizeof(spn[0]);
+ spn_length = ARRAY_SIZE(spn);
ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 555, wszReferrer, &spn_length, spn);
ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret);
ok(!lstrcmpW(spn, wszSpn5), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn));
@@ -106,7 +106,7 @@ static void test_DsClientMakeSpnForTargetServer(void)
ok( ret == ERROR_BUFFER_OVERFLOW, "got %u\n", ret );
ok( len == lstrlenW(resultW) + 1, "got %u\n", len );
- len = sizeof(buf)/sizeof(buf[0]);
+ len = ARRAY_SIZE(buf);
buf[0] = 0;
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, buf );
ok( ret == ERROR_SUCCESS, "got %u\n", ret );
--
2.14.4
June 5, 2018
[PATCH] msrle32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/msrle32/tests/msrle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msrle32/tests/msrle.c b/dlls/msrle32/tests/msrle.c
index 14ddddb342..4a442a0b90 100644
--- a/dlls/msrle32/tests/msrle.c
+++ b/dlls/msrle32/tests/msrle.c
@@ -129,7 +129,7 @@ static void test_raw_decompress(void)
outbits = HeapAlloc(GetProcessHeap(), 0, bih->biSizeImage);
ok(outbits != NULL, "Expected non-NULL value\n");
- for (i = 0; i < sizeof(codecs) / sizeof(codecs[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(codecs); i++)
{
memset(bits, i + 0xAF, bih->biSizeImage);
--
2.14.4
June 5, 2018
[PATCH] kernelbase/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/kernelbase/tests/path.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c
index 7c8851357f..cdba51bf3f 100644
--- a/dlls/kernelbase/tests/path.c
+++ b/dlls/kernelbase/tests/path.c
@@ -102,7 +102,7 @@ static void test_PathCchCombineEx(void)
"Combination of %s + %s returned %s, expected %s\n",
wine_dbgstr_w(p1), wine_dbgstr_w(p2), wine_dbgstr_w(output), wine_dbgstr_w(expected));
- for (i = 0; i < sizeof(combine_test)/sizeof(combine_test[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(combine_test); i++)
{
MultiByteToWideChar(CP_ACP, 0, combine_test[i].path1, -1, p1, MAX_PATH);
MultiByteToWideChar(CP_ACP, 0, combine_test[i].path2, -1, p2, MAX_PATH);
@@ -168,16 +168,16 @@ static void test_PathCchAddBackslash(void)
ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
ok(pathW[0] == 0, "Unexpected path.\n");
- for (i = 0; i < sizeof(addbackslash_tests)/sizeof(addbackslash_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(addbackslash_tests); i++)
{
const struct addbackslash_test *test = &addbackslash_tests[i];
char path[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, test->path, -1, pathW, sizeof(pathW)/sizeof(pathW[0]));
+ MultiByteToWideChar(CP_ACP, 0, test->path, -1, pathW, ARRAY_SIZE(pathW));
hr = pPathCchAddBackslash(pathW, test->size);
ok(hr == test->hr, "%u: unexpected return value %#x.\n", i, hr);
- WideCharToMultiByte(CP_ACP, 0, pathW, -1, path, sizeof(path)/sizeof(path[0]), NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, pathW, -1, path, ARRAY_SIZE(path), NULL, NULL);
ok(!strcmp(path, test->result), "%u: unexpected resulting path %s.\n", i, path);
}
}
@@ -215,21 +215,21 @@ static void test_PathCchAddBackslashEx(void)
ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
ok(pathW[0] == 0, "Unexpected path.\n");
- for (i = 0; i < sizeof(addbackslash_tests)/sizeof(addbackslash_tests[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(addbackslash_tests); i++)
{
const struct addbackslash_test *test = &addbackslash_tests[i];
char path[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, test->path, -1, pathW, sizeof(pathW)/sizeof(pathW[0]));
+ MultiByteToWideChar(CP_ACP, 0, test->path, -1, pathW, ARRAY_SIZE(pathW));
hr = pPathCchAddBackslashEx(pathW, test->size, NULL, NULL);
ok(hr == test->hr, "%u: unexpected return value %#x.\n", i, hr);
- WideCharToMultiByte(CP_ACP, 0, pathW, -1, path, sizeof(path)/sizeof(path[0]), NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, pathW, -1, path, ARRAY_SIZE(path), NULL, NULL);
ok(!strcmp(path, test->result), "%u: unexpected resulting path %s.\n", i, path);
ptrW = (void *)0xdeadbeef;
remaining = 123;
- MultiByteToWideChar(CP_ACP, 0, test->path, -1, pathW, sizeof(pathW)/sizeof(pathW[0]));
+ MultiByteToWideChar(CP_ACP, 0, test->path, -1, pathW, ARRAY_SIZE(pathW));
hr = pPathCchAddBackslashEx(pathW, test->size, &ptrW, &remaining);
ok(hr == test->hr, "%u: unexpected return value %#x.\n", i, hr);
if (SUCCEEDED(hr))
--
2.14.4
June 5, 2018
[PATCH] jscript/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/jscript/tests/run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c
index 887b264d8f..77cd74ebb3 100644
--- a/dlls/jscript/tests/run.c
+++ b/dlls/jscript/tests/run.c
@@ -1316,7 +1316,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
case DISPID_GLOBAL_TESTARGTYPES: {
VARIANT args[8], v;
- DISPPARAMS dp = {args, NULL, sizeof(args)/sizeof(*args), 0};
+ DISPPARAMS dp = {args, NULL, ARRAY_SIZE(args), 0};
HRESULT hres;
CHECK_EXPECT(global_testargtypes_i);
--
2.14.4
June 5, 2018
[PATCH] itss/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/itss/tests/protocol.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c
index 3028da4337..a41916b192 100644
--- a/dlls/itss/tests/protocol.c
+++ b/dlls/itss/tests/protocol.c
@@ -501,18 +501,18 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) {
if(i != PARSE_CANONICALIZE && i != PARSE_SECURITY_URL) {
hres = IInternetProtocolInfo_ParseUrl(info, blank_url1, i, 0, buf,
- sizeof(buf)/sizeof(buf[0]), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == INET_E_DEFAULT_ACTION,
"[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres);
}
}
- for(i=0; i < sizeof(combine_tests)/sizeof(combine_tests[0]); i++) {
+ for(i=0; i < ARRAY_SIZE(combine_tests); i++) {
size = 0xdeadbeef;
memset(buf, 0xfe, sizeof(buf));
hres = IInternetProtocolInfo_CombineUrl(info, a2w(combine_tests[i].base_url),
a2w(combine_tests[i].rel_url), combine_tests[i].flags, buf,
- sizeof(buf)/sizeof(WCHAR), &size, 0);
+ ARRAY_SIZE(buf), &size, 0);
ok(hres == combine_tests[i].hres, "[%d] CombineUrl returned %08x, expected %08x\n",
i, hres, combine_tests[i].hres);
ok(size == (combine_tests[i].combined_url ? strlen(combine_tests[i].combined_url)+1
--
2.14.4
June 5, 2018
[PATCH] iphlpapi/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/iphlpapi/tests/iphlpapi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index ba7d7f103b..d5613d7b4b 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -1459,7 +1459,7 @@ static void test_GetAdaptersAddresses(void)
S(U(*ua)).Length < sizeof(IP_ADAPTER_UNICAST_ADDRESS_LH) ? 0 : ua->OnLinkPrefixLength);
ua = ua->Next;
}
- for (i = 0, temp[0] = '\0'; i < sizeof(aa->ZoneIndices) / sizeof(aa->ZoneIndices[0]); i++)
+ for (i = 0, temp[0] = '\0'; i < ARRAY_SIZE(aa->ZoneIndices); i++)
sprintf(temp + strlen(temp), "%d ", aa->ZoneIndices[i]);
trace("status %u index %u zone %s\n", aa->OperStatus, aa->Ipv6IfIndex, temp );
prefix = aa->FirstPrefix;
@@ -1836,7 +1836,7 @@ static void test_interface_identifier_conversion(void)
ok( ret == ERROR_NOT_ENOUGH_MEMORY, "got %u\n", ret );
nameW[0] = 0;
- len = sizeof(nameW)/sizeof(nameW[0]);
+ len = ARRAY_SIZE(nameW);
ret = pConvertInterfaceLuidToNameW( &luid, nameW, len );
ok( !ret, "got %u\n", ret );
ok( nameW[0], "name not set\n" );
@@ -1855,7 +1855,7 @@ static void test_interface_identifier_conversion(void)
ok( ret == ERROR_NOT_ENOUGH_MEMORY, "got %u\n", ret );
nameA[0] = 0;
- len = sizeof(nameA)/sizeof(nameA[0]);
+ len = ARRAY_SIZE(nameA);
ret = pConvertInterfaceLuidToNameA( &luid, nameA, len );
ok( !ret, "got %u\n", ret );
ok( nameA[0], "name not set\n" );
--
2.14.4
June 5, 2018
[PATCH] inetmib1/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/inetmib1/tests/main.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/dlls/inetmib1/tests/main.c b/dlls/inetmib1/tests/main.c
index 057cc6e744..32785fcc3f 100644
--- a/dlls/inetmib1/tests/main.c
+++ b/dlls/inetmib1/tests/main.c
@@ -123,7 +123,7 @@ if (0) /* crashes on native */
/* Oddly enough, this "succeeds," even though the OID is clearly
* unsupported.
*/
- vars[0].name.idLength = sizeof(bogus) / sizeof(bogus[0]);
+ vars[0].name.idLength = ARRAY_SIZE(bogus);
vars[0].name.ids = bogus;
vars[0].value.asnType = 0;
list.len = 1;
@@ -146,7 +146,7 @@ if (0) /* crashes on native */
"expected 1.2.3.4, got %s\n", SnmpUtilOidToA(&vars[0].name));
/* The table is not an accessible variable, so it fails */
- vars[0].name.idLength = sizeof(mib2IfTable) / sizeof(mib2IfTable[0]);
+ vars[0].name.idLength = ARRAY_SIZE(mib2IfTable);
vars[0].name.ids = mib2IfTable;
SetLastError(0xdeadbeef);
error = 0xdeadbeef;
@@ -161,13 +161,11 @@ if (0) /* crashes on native */
/* A Get fails on something that specifies a table (but not a particular
* entry in it)...
*/
- vars[0].name.idLength = sizeof(mib2IfDescr) / sizeof(mib2IfDescr[0]);
+ vars[0].name.idLength = ARRAY_SIZE(mib2IfDescr);
vars[0].name.ids = mib2IfDescr;
- vars[1].name.idLength =
- sizeof(mib2IfAdminStatus) / sizeof(mib2IfAdminStatus[0]);
+ vars[1].name.idLength = ARRAY_SIZE(mib2IfAdminStatus);
vars[1].name.ids = mib2IfAdminStatus;
- vars[2].name.idLength =
- sizeof(mib2IfOperStatus) / sizeof(mib2IfOperStatus[0]);
+ vars[2].name.idLength = ARRAY_SIZE(mib2IfOperStatus);
vars[2].name.ids = mib2IfOperStatus;
list.len = 3;
SetLastError(0xdeadbeef);
@@ -270,7 +268,7 @@ if (0) /* crashes on native */
* variables, on recent systems (at least Win2k) the first variable it
* returns a value for is the first interface.
*/
- vars[0].name.idLength = sizeof(mib2System) / sizeof(mib2System[0]);
+ vars[0].name.idLength = ARRAY_SIZE(mib2System);
vars[0].name.ids = mib2System;
SnmpUtilOidCpy(&vars2[0].name, &vars[0].name);
vars2[0].value.asnType = 0;
@@ -282,7 +280,7 @@ if (0) /* crashes on native */
ok(error == SNMP_ERRORSTATUS_NOERROR,
"expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error);
ok(index == 0, "expected index 0, got %d\n", index);
- vars3[0].name.idLength = sizeof(mib2If) / sizeof(mib2If[0]);
+ vars3[0].name.idLength = ARRAY_SIZE(mib2If);
vars3[0].name.ids = mib2If;
ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength) ||
!SnmpUtilOidNCmp(&vars2[0].name, &vars3[0].name, vars3[0].name.idLength),
@@ -291,7 +289,7 @@ if (0) /* crashes on native */
SnmpUtilVarBindFree(&vars2[0]);
/* Check the type and OIDs of the IP address table */
- vars[0].name.idLength = sizeof(mib2IpAddr) / sizeof(mib2IpAddr[0]);
+ vars[0].name.idLength = ARRAY_SIZE(mib2IpAddr);
vars[0].name.ids = mib2IpAddr;
SnmpUtilOidCpy(&vars2[0].name, &vars[0].name);
vars2[0].value.asnType = 0;
--
2.14.4
June 5, 2018
[PATCH] inetcomm/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/inetcomm/tests/mimeole.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c
index 4c40c1189f..02b93e9911 100644
--- a/dlls/inetcomm/tests/mimeole.c
+++ b/dlls/inetcomm/tests/mimeole.c
@@ -129,7 +129,7 @@ static WCHAR *a2w(const char *str)
static int strcmp_wa(const WCHAR *strw, const char *stra)
{
WCHAR buf[512];
- MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf)/sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, ARRAY_SIZE(buf));
return lstrcmpW(strw, buf);
}
@@ -1430,7 +1430,7 @@ static void test_mhtml_protocol_binding(const mhtml_binding_test_t *test)
CloseHandle(file);
sprintf(urla, test->url, file_name);
- MultiByteToWideChar(CP_ACP, 0, urla, -1, test_url, sizeof(test_url)/sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, urla, -1, test_url, ARRAY_SIZE(test_url));
hres = CoCreateInstance(&CLSID_IMimeHtmlProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&protocol);
ok(hres == S_OK, "Could not create protocol handler: %08x\n", hres);
@@ -1514,13 +1514,13 @@ static void test_mhtml_protocol_info(void)
&IID_IInternetProtocolInfo, (void**)&protocol_info);
ok(hres == S_OK, "Could not create protocol info: %08x\n", hres);
- for(i = 0; i < sizeof(combine_tests)/sizeof(*combine_tests); i++) {
+ for(i = 0; i < ARRAY_SIZE(combine_tests); i++) {
base_url = a2w(combine_tests[i].base_url);
relative_url = a2w(combine_tests[i].relative_url);
combined_len = 0xdeadbeef;
hres = IInternetProtocolInfo_CombineUrl(protocol_info, base_url, relative_url, ICU_BROWSER_MODE,
- combined_url, sizeof(combined_url)/sizeof(WCHAR), &combined_len, 0);
+ combined_url, ARRAY_SIZE(combined_url), &combined_len, 0);
todo_wine_if(combine_tests[i].todo)
ok(hres == S_OK, "[%u] CombineUrl failed: %08x\n", i, hres);
if(SUCCEEDED(hres)) {
@@ -1541,7 +1541,7 @@ static void test_mhtml_protocol_info(void)
}
hres = IInternetProtocolInfo_CombineUrl(protocol_info, http_url, http_url, ICU_BROWSER_MODE,
- combined_url, sizeof(combined_url)/sizeof(WCHAR), &combined_len, 0);
+ combined_url, ARRAY_SIZE(combined_url), &combined_len, 0);
ok(hres == E_FAIL, "CombineUrl failed: %08x\n", hres);
IInternetProtocolInfo_Release(protocol_info);
@@ -1605,7 +1605,7 @@ static void test_mhtml_protocol(void)
if(!broken_mhtml_resolver)
test_mhtml_protocol_info();
- for(i = 0; i < sizeof(binding_tests)/sizeof(*binding_tests); i++)
+ for(i = 0; i < ARRAY_SIZE(binding_tests); i++)
test_mhtml_protocol_binding(binding_tests + i);
}
@@ -1628,7 +1628,7 @@ static void test_MimeOleObjectFromMoniker(void)
{"../test.mht", "mhtml:../test.mht"}
};
- for(i = 0; i < sizeof(tests)/sizeof(*tests); i++) {
+ for(i = 0; i < ARRAY_SIZE(tests); i++) {
url = a2w(tests[i].url);
hres = CreateURLMoniker(NULL, url, &mon);
ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
--
2.14.4
June 5, 2018
[PATCH] imm32/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/imm32/tests/imm32.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index be3ddfce03..ee1aeb3965 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -26,8 +26,6 @@
#include "imm.h"
#include "ddk/imm.h"
-#define NUMELEMS(array) (sizeof((array))/sizeof((array)[0]))
-
static BOOL (WINAPI *pImmAssociateContextEx)(HWND,HIMC,DWORD);
static BOOL (WINAPI *pImmIsUIMessageA)(HWND,UINT,WPARAM,LPARAM);
static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
@@ -73,7 +71,7 @@ static LRESULT CALLBACK get_msg_filter(int nCode, WPARAM wParam, LPARAM lParam)
MSG *msg = (MSG*)lParam;
if ((msg->hwnd == msg_spy.hwnd || msg_spy.hwnd == NULL) &&
- (msg_spy.i_msg < NUMELEMS(msg_spy.msgs)))
+ (msg_spy.i_msg < ARRAY_SIZE(msg_spy.msgs)))
{
msg_spy.msgs[msg_spy.i_msg].msg.hwnd = msg->hwnd;
msg_spy.msgs[msg_spy.i_msg].msg.message = msg->message;
@@ -94,7 +92,7 @@ static LRESULT CALLBACK call_wnd_proc_filter(int nCode, WPARAM wParam,
CWPSTRUCT *cwp = (CWPSTRUCT*)lParam;
if (((cwp->hwnd == msg_spy.hwnd || msg_spy.hwnd == NULL)) &&
- (msg_spy.i_msg < NUMELEMS(msg_spy.msgs)))
+ (msg_spy.i_msg < ARRAY_SIZE(msg_spy.msgs)))
{
memcpy(&msg_spy.msgs[msg_spy.i_msg].msg, cwp, sizeof(msg_spy.msgs[0].msg));
msg_spy.msgs[msg_spy.i_msg].post = FALSE;
@@ -126,7 +124,7 @@ static imm_msgs* msg_spy_find_next_msg(UINT message, UINT *start) {
msg_spy_pump_msg_queue();
- if (msg_spy.i_msg >= NUMELEMS(msg_spy.msgs))
+ if (msg_spy.i_msg >= ARRAY_SIZE(msg_spy.msgs))
fprintf(stdout, "%s:%d: msg_spy: message buffer overflow!\n",
__FILE__, __LINE__);
@@ -1067,8 +1065,8 @@ static BOOL CALLBACK is_ime_window_proc(HWND hWnd, LPARAM param)
static const WCHAR imeW[] = {'I','M','E',0};
WCHAR class_nameW[16];
HWND *ime_window = (HWND *)param;
- if (GetClassNameW(hWnd, class_nameW, sizeof(class_nameW)/sizeof(class_nameW[0])) &&
- !lstrcmpW(class_nameW, imeW)) {
+ if (GetClassNameW(hWnd, class_nameW, ARRAY_SIZE(class_nameW)) && !lstrcmpW(class_nameW, imeW))
+ {
*ime_window = hWnd;
return FALSE;
}
@@ -1229,7 +1227,7 @@ static void test_default_ime_window_creation(void)
{ FALSE, FALSE }
};
- for (i = 0; i < sizeof(testcases)/sizeof(testcases[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(testcases); i++)
{
thread = CreateThread(NULL, 0, test_default_ime_window_cb, &testcases[i], 0, NULL);
ok(thread != NULL, "CreateThread failed with error %u\n", GetLastError());
--
2.14.4
June 5, 2018
[PATCH] imagehlp/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/imagehlp/tests/image.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/imagehlp/tests/image.c b/dlls/imagehlp/tests/image.c
index 65f59700e3..c0a26c39dc 100644
--- a/dlls/imagehlp/tests/image.c
+++ b/dlls/imagehlp/tests/image.c
@@ -225,7 +225,7 @@ static const struct expected_blob b1[] = {
{FILE_TOTAL-FILE_IDATA-FIELD_OFFSET(struct Imports, ibn),
&bin.idata_section.ibn}
};
-static const struct expected_update_accum a1 = { sizeof(b1) / sizeof(b1[0]), b1, TRUE };
+static const struct expected_update_accum a1 = { ARRAY_SIZE(b1), b1, TRUE };
static const struct expected_blob b2[] = {
{FILE_PE_START, &bin},
@@ -235,7 +235,7 @@ static const struct expected_blob b2[] = {
{FILE_IDATA-FILE_TEXT, &bin.text_section},
{FILE_TOTAL-FILE_IDATA, &bin.idata_section}
};
-static const struct expected_update_accum a2 = { sizeof(b2) / sizeof(b2[0]), b2, FALSE };
+static const struct expected_update_accum a2 = { ARRAY_SIZE(b2), b2, FALSE };
/* Creates a test file and returns a handle to it. The file's path is returned
* in temp_file, which must be at least MAX_PATH characters in length.
--
2.14.4
June 5, 2018
Re: [PATCH] ntoskrnl: Have MmIsAddressValid use IsBadReadPtr.
by Derek Lesho
Side note, while this change does not follow the MSDN, it appears that the
MSDN incorrectly documents the function.
This blog post from 2006 explains more:
https://blogs.msdn.microsoft.com/doronh/2006/03/09/beware-the-shiny-light-t…
On Tue, Jun 5, 2018 at 11:14 AM, Derek Lesho <dereklesho52(a)gmail.com> wrote:
> Fixes an error inside EasyAntiCheat.sys, which uses MmIsAddressValid on
> ntoskrnl.exe, to find its base address. Wine will always return FALSE,
> because it checks for write access to ntoskrnl, when all the driver
> needs is read access
>
> Tested on Arch Linux
>
> Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com>
> ---
> dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
> index 55027c5..e4c1c35 100644
> --- a/dlls/ntoskrnl.exe/ntoskrnl.c
> +++ b/dlls/ntoskrnl.exe/ntoskrnl.c
> @@ -2164,7 +2164,7 @@ void WINAPI MmFreeNonCachedMemory( void *addr,
> SIZE_T size )
> BOOLEAN WINAPI MmIsAddressValid(PVOID VirtualAddress)
> {
> TRACE("(%p)\n", VirtualAddress);
> - return !IsBadWritePtr(VirtualAddress, 1);
> + return !IsBadReadPtr(VirtualAddress, 1);
> }
>
> /***********************************************************************
> --
> 2.7.4
>
>
June 5, 2018
[PATCH] ntoskrnl: Have MmIsAddressValid use IsBadReadPtr.
by Derek Lesho
Fixes an error inside EasyAntiCheat.sys, which uses MmIsAddressValid on
ntoskrnl.exe, to find its base address. Wine will always return FALSE,
because it checks for write access to ntoskrnl, when all the driver
needs is read access
Tested on Arch Linux
Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com>
---
dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 55027c5..e4c1c35 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2164,7 +2164,7 @@ void WINAPI MmFreeNonCachedMemory( void *addr, SIZE_T size )
BOOLEAN WINAPI MmIsAddressValid(PVOID VirtualAddress)
{
TRACE("(%p)\n", VirtualAddress);
- return !IsBadWritePtr(VirtualAddress, 1);
+ return !IsBadReadPtr(VirtualAddress, 1);
}
/***********************************************************************
--
2.7.4
June 5, 2018
[PATCH 2/2 v2] msvcp120: Add tests for concurrent_vector_Internal_push_back and capacity.
by Piotr Caban
From: Hua Meng <161220092(a)smail.nju.edu.cn>
Signed-off-by: Hua meng <161220092(a)smail.nju.edu.cn>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
v2:
- fix whitespace errors
- remove todo_wine from tests after skip
- fix memory leaks
dlls/msvcp120/tests/msvcp120.c | 155
++++++++++++++++++++++++++++++++++++++++-
1 file changed, 153 insertions(+), 2 deletions(-)
June 5, 2018
[PATCH 1/2] msvcp120: Fix _Getcvt tests when zh_CN system locale is used
by Piotr Caban
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/msvcp120/tests/msvcp120.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
June 5, 2018
Re: [PATCH 4/4] winevulkan: Update Vulkan support to 1.0.76.
by Alexandre Julliard
Roderick Colenbrander <thunderbird2k(a)gmail.com> writes:
> Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com>
> ---
> dlls/vulkan-1/vulkan-1.spec | 28 +
> dlls/winevulkan/make_vulkan | 206 +-
> dlls/winevulkan/vk.xml | 6448 ++++++++++++++++++++++++++-------------
I'd suggest downloading vk.xml like we do for the OpenGL spec
files. It's not clear that the license exception also applies to the
source file, so I think it would be better if we didn't distribute it.
--
Alexandre Julliard
julliard(a)winehq.org
June 5, 2018