Wine-devel
Threads by month
- ----- 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
March 2021
- 75 participants
- 800 discussions
Signed-off-by: Myah Caron <qsniyg(a)protonmail.com>
---
Required by Forza Horizon 4: https://github.com/ValveSoftware/Proton/issues/4667#issuecomment-794364880
configure.ac | 1 +
.../api-ms-win-core-kernel32-legacy-l1-1-2/Makefile.in | 1 +
.../api-ms-win-core-kernel32-legacy-l1-1-2.spec | 10 ++++++++++
tools/make_specfiles | 1 +
4 files changed, 13 insertions(+)
create mode 100644 dlls/api-ms-win-core-kernel32-legacy-l1-1-2/Makefile.in
create mode 100644 dlls/api-ms-win-core-kernel32-legacy-l1-1-2/api-ms-win-core-kernel32-legacy-l1-1-2.spec
diff --git a/configure.ac b/configure.ac
index 8ed3b0c2669..5b7f09de924 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2850,6 +2850,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-job-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-job-l2-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-kernel32-legacy-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-kernel32-legacy-l1-1-1)
+WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-kernel32-legacy-l1-1-2)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-kernel32-private-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-largeinteger-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-libraryloader-l1-1-0)
diff --git a/dlls/api-ms-win-core-kernel32-legacy-l1-1-2/Makefile.in b/dlls/api-ms-win-core-kernel32-legacy-l1-1-2/Makefile.in
new file mode 100644
index 00000000000..e713a0c3892
--- /dev/null
+++ b/dlls/api-ms-win-core-kernel32-legacy-l1-1-2/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-core-kernel32-legacy-l1-1-2.dll
diff --git a/dlls/api-ms-win-core-kernel32-legacy-l1-1-2/api-ms-win-core-kernel32-legacy-l1-1-2.spec b/dlls/api-ms-win-core-kernel32-legacy-l1-1-2/api-ms-win-core-kernel32-legacy-l1-1-2.spec
new file mode 100644
index 00000000000..aa5baafaded
--- /dev/null
+++ b/dlls/api-ms-win-core-kernel32-legacy-l1-1-2/api-ms-win-core-kernel32-legacy-l1-1-2.spec
@@ -0,0 +1,10 @@
+@ stdcall CreateSemaphoreA(ptr long long str) kernel32.CreateSemaphoreA
+@ stdcall GetBinaryTypeW(wstr ptr) kernel32.GetBinaryTypeW
+@ stdcall Module32First(long ptr) kernel32.Module32First
+@ stdcall Module32Next(long ptr) kernel32.Module32Next
+@ stdcall OpenFileMappingA(long long str) kernel32.OpenFileMappingA
+@ stdcall OpenMutexA(long long str) kernel32.OpenMutexA
+@ stdcall Process32First(ptr ptr) kernel32.Process32First
+@ stdcall Process32Next(ptr ptr) kernel32.Process32Next
+@ stdcall SetTermsrvAppInstallMode(long) kernel32.SetTermsrvAppInstallMode
+@ stdcall VerifyVersionInfoA(ptr long int64) kernel32.VerifyVersionInfoA
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 11e806b8919..3689a856b9f 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -251,6 +251,7 @@ my @dll_groups =
"api-ms-win-core-job-l2-1-0",
"api-ms-win-core-kernel32-legacy-l1-1-0",
"api-ms-win-core-kernel32-legacy-l1-1-1",
+ "api-ms-win-core-kernel32-legacy-l1-1-2",
"api-ms-win-core-kernel32-private-l1-1-1",
"api-ms-win-core-largeinteger-l1-1-0",
"api-ms-win-core-libraryloader-l1-2-1",
--
2.30.1
1
0
[PATCH] opencl: Generate the spec file and thunks from the official XML registry file.
by Zebediah Figura 09 Mar '21
by Zebediah Figura 09 Mar '21
09 Mar '21
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/opencl/Makefile.in | 3 +-
dlls/opencl/make_opencl | 299 ++++++++++++++++
dlls/opencl/opencl.c | 670 +----------------------------------
dlls/opencl/opencl.spec | 158 ++++-----
dlls/opencl/opencl_private.h | 41 +++
dlls/opencl/opencl_thunks.c | 361 +++++++++++++++++++
6 files changed, 769 insertions(+), 763 deletions(-)
create mode 100755 dlls/opencl/make_opencl
create mode 100644 dlls/opencl/opencl_private.h
create mode 100644 dlls/opencl/opencl_thunks.c
diff --git a/dlls/opencl/Makefile.in b/dlls/opencl/Makefile.in
index 1f6e76c0b47..f9fa2dcaa96 100644
--- a/dlls/opencl/Makefile.in
+++ b/dlls/opencl/Makefile.in
@@ -2,4 +2,5 @@ MODULE = opencl.dll
EXTRALIBS = $(OPENCL_LIBS)
C_SRCS = \
- opencl.c
+ opencl.c \
+ opencl_thunks.c
diff --git a/dlls/opencl/make_opencl b/dlls/opencl/make_opencl
new file mode 100755
index 00000000000..6a8f562ee6d
--- /dev/null
+++ b/dlls/opencl/make_opencl
@@ -0,0 +1,299 @@
+#!/usr/bin/perl -w
+use strict;
+use XML::LibXML;
+
+# Copyright 2021 Zebediah Figura
+#
+# 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
+
+# Files to generate
+my $spec_file = "opencl.spec";
+my $thunks_file = "opencl_thunks.c";
+
+# If set to 1, generate TRACEs for each OpenGL function
+my $gen_traces = 1;
+
+# List of categories to put in the 'opengl_core.c' file
+my %cat_1_0 = ( "CL_VERSION_1_0" => 1 );
+
+my %core_categories = ();
+
+my %arg_types =
+ (
+ "cl_bitfield" => [ "int64", "wine_dbgstr_longlong(%s)" ],
+ "double" => [ "double", "%.16e" ],
+ "float" => [ "float", "%.8e" ],
+ "int" => [ "long", "%d" ],
+ "int8_t" => [ "long", "%d" ],
+ "int16_t" => [ "long", "%d" ],
+ "int32_t" => [ "long", "%d" ],
+ "int64_t" => [ "int64", "wine_dbgstr_longlong(%s)" ],
+ "intptr_t" => [ "long", "%ld" ],
+ "size_t" => [ "long", "%zu" ],
+ "uint8_t" => [ "long", "%u" ],
+ "uint16_t" => [ "long", "%u" ],
+ "uint32_t" => [ "long", "%u" ],
+ "uint64_t" => [ "int64", "wine_dbgstr_longlong(%s)" ],
+ "unsigned int" => [ "long", "%u" ],
+ );
+
+sub generate_thunk($$)
+{
+ my ($name, $func_ref) = @_;
+ my $call_arg = "";
+ my $trace_call_arg = "";
+ my $trace_arg = "";
+
+ my $ret = get_func_proto( "%s WINAPI wine_%s(%s)", $name, $func_ref );
+ foreach my $arg (@{$func_ref->[1]})
+ {
+ my $ptype = get_arg_type( $arg );
+ next unless $arg->findnodes("./name");
+ my $pname = get_arg_name( $arg );
+ my $param = $arg->textContent();
+ $call_arg .= " " . $pname . ",";
+ if ($param =~ /\*/ || $param =~ /\[/)
+ {
+ $trace_arg .= ", %p";
+ $trace_call_arg .= ", " . $pname;
+ }
+ elsif (defined $arg_types{$ptype})
+ {
+ my $format = ${$arg_types{$ptype}}[1];
+ $trace_arg .= ", " . ($format =~ /^%/ ? $format : "%s");
+ $trace_call_arg .= ", " . sprintf $format =~ /^%/ ? "%s" : $format, $pname;
+ }
+ else
+ {
+ die "Unknown type %s in %s\n", $param, $name;
+ }
+ }
+ $call_arg =~ s/,$/ /;
+ $trace_arg =~ s/^, //;
+ $ret .= "\n{\n";
+ $ret .= " TRACE( \"($trace_arg)\\n\"$trace_call_arg );\n" if $gen_traces;
+ $ret .= " ";
+ $ret .= "return " unless is_void_func( $func_ref );
+ $ret .= "$name($call_arg);\n";
+ $ret .= "}\n\n";
+ return $ret;
+}
+
+sub is_void_func($)
+{
+ my $func = shift;
+ return 0 if @{$func->[0]->findnodes("./type")};
+ return $func->[0]->textContent() eq "void";
+}
+
+sub get_arg_type($)
+{
+ my $p = shift;
+ my @type = $p->findnodes("./type");
+ return @type ? $type[0]->textContent() : "cl_int";
+}
+
+sub get_arg_name($)
+{
+ my $p = shift;
+ my @name = $p->findnodes("./name");
+ return $name[0]->textContent();
+}
+
+sub get_func_proto($$$)
+{
+ my ($format, $name, $func) = @_;
+ die "unknown func $name" unless defined $func->[0];
+ my $proto = $func->[0]->textContent();
+ $proto =~ s/ +$//;
+ my $args = "";
+ foreach my $arg (@{$func->[1]})
+ {
+ (my $argtext = $arg->textContent()) =~ s/ +/ /g;
+ $args .= " " . $argtext . ",";
+ }
+ $args =~ s/,$/ /;
+ $args ||= "void";
+ return sprintf $format, $proto, $name, $args;
+}
+
+# extract and check the number of arguments
+if (@ARGV > 1)
+{
+ my $name0 = $0;
+ $name0 =~ s%^.*/%%;
+ die "Usage: $name0 [version]\n";
+}
+my $version = $ARGV[0] || "1.0";
+if ($version eq "1.0")
+{
+ %core_categories = %cat_1_0;
+}
+else
+{
+ die "Incorrect OpenCL version.\n";
+}
+
+my $url = "https://raw.githubusercontent.com/KhronosGroup/OpenCL-Docs";
+my $commit = "514965312a65e5d01ae17e23119dc95427b7149e";
+-f "cl-$commit.xml" || system "wget", "-O", "cl-$commit.xml", "$url/$commit/xml/cl.xml" || die "cannot download cl.xml";
+
+sub generate_spec_entry($$)
+{
+ my ($name, $func) = @_;
+ my $args=" ";
+ foreach my $arg (@{$func->[1]})
+ {
+ my $ptype = get_arg_type( $arg );
+ my $param = $arg->textContent();
+ if ($param =~ /[[*]/)
+ {
+ $args .= "ptr ";
+ }
+ elsif (defined($arg_types{$ptype}))
+ {
+ $args .= "$@$arg_types{$ptype}[0] ";
+ }
+ elsif ($ptype ne "void")
+ {
+ die "No conversion for func $name type $param\n";
+ }
+ }
+ $args = substr($args,1,-1);
+ return "@ stdcall $_($args) wine_$_";
+}
+
+my %core_functions;
+my %cl_enums;
+my (%cl_types, @cl_types); # also use an array to preserve declaration order
+
+# some functions need a hand-written wrapper
+sub needs_wrapper($)
+{
+ my %funcs =
+ (
+ # need callback conversion
+ "clBuildProgram" => 1,
+ "clCreateContext" => 1,
+ "clCreateContextFromType" => 1,
+ "clEnqueueNativeKernel" => 1,
+
+ # need extension filtering
+ "clGetDeviceInfo" => 1,
+ "clGetPlatformInfo" => 1,
+
+ # needs function pointer conversion
+ "clGetExtensionFunctionAddress" => 1,
+ );
+ my $name = shift;
+
+ return defined $funcs{$name};
+}
+
+sub parse_file($)
+{
+ my $file = shift;
+ my $xml = XML::LibXML->load_xml( location => $file );
+ my %functions;
+ my %enums;
+
+ # save all functions
+ foreach my $command ($xml->findnodes("/registry/commands/command"))
+ {
+ my $proto = @{$command->findnodes("./proto")}[0];
+ my $name = @{$command->findnodes("./proto/name")}[0];
+ $proto->removeChild( $name );
+ my @params = $command->findnodes("./param");
+ $functions{$name->textContent()} = [ $proto, \@params ];
+ }
+
+ # save all enums
+ foreach my $enum ($xml->findnodes("/registry/enums/enum"))
+ {
+ $enums{$enum->{name}} = $enum->{value};
+ }
+
+ # save all types
+ foreach my $type ($xml->findnodes("/registry/types/type"))
+ {
+ my $name = @{$type->findnodes("./name")}[0];
+ next unless $name;
+ $name = $name->textContent;
+ push @cl_types, $name unless $cl_types{$name};
+ $cl_types{$name} = $type;
+
+ if ($type->{category} eq "define" and not defined($arg_types{$name}))
+ {
+ my $basetype = @{$type->findnodes("./type")}[0];
+ if ($type->textContent() =~ /[[*]/)
+ {
+ $arg_types{$name} = ["ptr", "%p"];
+ }
+ elsif (defined($basetype) and defined($arg_types{$basetype->textContent}))
+ {
+ $arg_types{$name} = $arg_types{$basetype->textContent};
+ }
+ elsif ($name ne "cl_icd_dispatch")
+ {
+ die "No conversion for type $name\n"
+ }
+ }
+ }
+
+ # generate core functions
+ foreach my $feature ($xml->findnodes("/registry/feature"))
+ {
+ next unless defined $core_categories{$feature->{name}};
+ foreach my $cmd ($feature->findnodes("./require/command"))
+ {
+ $core_functions{$cmd->{name}} = $functions{$cmd->{name}};
+ }
+ foreach my $enum ($feature->findnodes("./require/enum"))
+ {
+ $cl_enums{$enum->{name}} = $enums{$enum->{name}};
+ }
+ }
+}
+
+parse_file( "cl-$commit.xml" );
+
+# generate the spec file
+open(SPEC, ">$spec_file") or die "cannot create $spec_file";
+
+foreach (sort keys %core_functions)
+{
+ printf SPEC "%s\n", generate_spec_entry( $_, $core_functions{$_} );
+}
+
+close(SPEC);
+
+my $file_header =
+"/* Automatically generated from OpenCL registry files; DO NOT EDIT! */\n\n" .
+"#include \"config.h\"\n" .
+"#include \"opencl_private.h\"\n\n";
+
+$file_header .= "WINE_DEFAULT_DEBUG_CHANNEL(opencl);\n\n" if $gen_traces;
+
+# generate the thunks file
+open(THUNKS, ">$thunks_file") or die "cannot create $thunks_file";
+print THUNKS $file_header;
+
+foreach (sort keys %core_functions)
+{
+ next if needs_wrapper( $_ );
+ print THUNKS generate_thunk( $_, $core_functions{$_} );
+}
+
+close(THUNKS);
diff --git a/dlls/opencl/opencl.c b/dlls/opencl/opencl.c
index f79345a1888..f678ed8cca0 100644
--- a/dlls/opencl/opencl.c
+++ b/dlls/opencl/opencl.c
@@ -19,43 +19,10 @@
*/
#include "config.h"
-#include "wine/port.h"
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-
-#include "wine/debug.h"
+#include "opencl_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(opencl);
-#define CL_SILENCE_DEPRECATION
-#if defined(HAVE_CL_CL_H)
-#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
-#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
-#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
-#define CL_TARGET_OPENCL_VERSION 220
-#include <CL/cl.h>
-#elif defined(HAVE_OPENCL_OPENCL_H)
-#include <OpenCL/opencl.h>
-#endif
-
-/* TODO: Figure out how to provide GL context sharing before enabling OpenGL */
-#define OPENCL_WITH_GL 0
-
-
-/*---------------------------------------------------------------*/
-/* Platform API */
-
-cl_int WINAPI wine_clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms)
-{
- cl_int ret;
- TRACE("(%d, %p, %p)\n", num_entries, platforms, num_platforms);
- ret = clGetPlatformIDs(num_entries, platforms, num_platforms);
- TRACE("(%d, %p, %p)=%d\n", num_entries, platforms, num_platforms, ret);
- return ret;
-}
-
cl_int WINAPI wine_clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name,
SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
{
@@ -92,19 +59,6 @@ cl_int WINAPI wine_clGetPlatformInfo(cl_platform_id platform, cl_platform_info p
}
-/*---------------------------------------------------------------*/
-/* Device APIs */
-
-cl_int WINAPI wine_clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type,
- cl_uint num_entries, cl_device_id * devices, cl_uint * num_devices)
-{
- cl_int ret;
- TRACE("(%p, 0x%lx, %d, %p, %p)\n", platform, (long unsigned int)device_type, num_entries, devices, num_devices);
- ret = clGetDeviceIDs(platform, device_type, num_entries, devices, num_devices);
- TRACE("(%p, 0x%lx, %d, %p, %p)=%d\n", platform, (long unsigned int)device_type, num_entries, devices, num_devices, ret);
- return ret;
-}
-
cl_int WINAPI wine_clGetDeviceInfo(cl_device_id device, cl_device_info param_name,
SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
{
@@ -148,9 +102,6 @@ cl_int WINAPI wine_clGetDeviceInfo(cl_device_id device, cl_device_info param_nam
}
-/*---------------------------------------------------------------*/
-/* Context APIs */
-
typedef struct
{
void WINAPI (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data);
@@ -187,6 +138,7 @@ cl_context WINAPI wine_clCreateContext(const cl_context_properties * properties,
return ret;
}
+
cl_context WINAPI wine_clCreateContextFromType(const cl_context_properties * properties, cl_device_type device_type,
void WINAPI (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data),
void * user_data, cl_int * errcode_ret)
@@ -208,233 +160,6 @@ cl_context WINAPI wine_clCreateContextFromType(const cl_context_properties * pro
return ret;
}
-cl_int WINAPI wine_clRetainContext(cl_context context)
-{
- cl_int ret;
- TRACE("(%p)\n", context);
- ret = clRetainContext(context);
- TRACE("(%p)=%d\n", context, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseContext(cl_context context)
-{
- cl_int ret;
- TRACE("(%p)\n", context);
- ret = clReleaseContext(context);
- TRACE("(%p)=%d\n", context, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetContextInfo(cl_context context, cl_context_info param_name,
- SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("(%p, 0x%x, %ld, %p, %p)\n", context, param_name, param_value_size, param_value, param_value_size_ret);
- ret = clGetContextInfo(context, param_name, param_value_size, param_value, param_value_size_ret);
- TRACE("(%p, 0x%x, %ld, %p, %p)=%d\n", context, param_name, param_value_size, param_value, param_value_size_ret, ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Command Queue APIs */
-
-cl_command_queue WINAPI wine_clCreateCommandQueue(cl_context context, cl_device_id device,
- cl_command_queue_properties properties, cl_int * errcode_ret)
-{
- cl_command_queue ret;
- TRACE("(%p, %p, 0x%lx, %p)\n", context, device, (long unsigned int)properties, errcode_ret);
- ret = clCreateCommandQueue(context, device, properties, errcode_ret);
- TRACE("(%p, %p, 0x%lx, %p)=%p\n", context, device, (long unsigned int)properties, errcode_ret, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clRetainCommandQueue(cl_command_queue command_queue)
-{
- cl_int ret;
- TRACE("(%p)\n", command_queue);
- ret = clRetainCommandQueue(command_queue);
- TRACE("(%p)=%d\n", command_queue, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseCommandQueue(cl_command_queue command_queue)
-{
- cl_int ret;
- TRACE("(%p)\n", command_queue);
- ret = clReleaseCommandQueue(command_queue);
- TRACE("(%p)=%d\n", command_queue, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetCommandQueueInfo(cl_command_queue command_queue, cl_command_queue_info param_name,
- SIZE_T param_value_size, void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("%p, %d, %ld, %p, %p\n", command_queue, param_name, param_value_size, param_value, param_value_size_ret);
- ret = clGetCommandQueueInfo(command_queue, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clSetCommandQueueProperty(cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable,
- cl_command_queue_properties * old_properties)
-{
- FIXME("(%p, 0x%lx, %d, %p): deprecated\n", command_queue, (long unsigned int)properties, enable, old_properties);
- return CL_INVALID_QUEUE_PROPERTIES;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Memory Object APIs */
-
-cl_mem WINAPI wine_clCreateBuffer(cl_context context, cl_mem_flags flags, size_t size, void * host_ptr, cl_int * errcode_ret)
-{
- cl_mem ret;
- TRACE("\n");
- ret = clCreateBuffer(context, flags, size, host_ptr, errcode_ret);
- return ret;
-}
-
-cl_mem WINAPI wine_clCreateImage2D(cl_context context, cl_mem_flags flags, cl_image_format * image_format,
- size_t image_width, size_t image_height, size_t image_row_pitch, void * host_ptr, cl_int * errcode_ret)
-{
- cl_mem ret;
- TRACE("\n");
- ret = clCreateImage2D(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret);
- return ret;
-}
-
-cl_mem WINAPI wine_clCreateImage3D(cl_context context, cl_mem_flags flags, cl_image_format * image_format,
- size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch,
- void * host_ptr, cl_int * errcode_ret)
-{
- cl_mem ret;
- TRACE("\n");
- ret = clCreateImage3D(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clRetainMemObject(cl_mem memobj)
-{
- cl_int ret;
- TRACE("(%p)\n", memobj);
- ret = clRetainMemObject(memobj);
- TRACE("(%p)=%d\n", memobj, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseMemObject(cl_mem memobj)
-{
- cl_int ret;
- TRACE("(%p)\n", memobj);
- ret = clReleaseMemObject(memobj);
- TRACE("(%p)=%d\n", memobj, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetSupportedImageFormats(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries,
- cl_image_format * image_formats, cl_uint * num_image_formats)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, num_image_formats);
- return ret;
-}
-
-cl_int WINAPI wine_clGetMemObjectInfo(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetMemObjectInfo(memobj, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetImageInfo(cl_mem image, cl_image_info param_name, size_t param_value_size, void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetImageInfo(image, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Sampler APIs */
-
-cl_sampler WINAPI wine_clCreateSampler(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode,
- cl_filter_mode filter_mode, cl_int * errcode_ret)
-{
- cl_sampler ret;
- TRACE("\n");
- ret = clCreateSampler(context, normalized_coords, addressing_mode, filter_mode, errcode_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clRetainSampler(cl_sampler sampler)
-{
- cl_int ret;
- TRACE("\n");
- ret = clRetainSampler(sampler);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseSampler(cl_sampler sampler)
-{
- cl_int ret;
- TRACE("\n");
- ret = clReleaseSampler(sampler);
- return ret;
-}
-
-cl_int WINAPI wine_clGetSamplerInfo(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size,
- void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetSamplerInfo(sampler, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Program Object APIs */
-
-cl_program WINAPI wine_clCreateProgramWithSource(cl_context context, cl_uint count, const char ** strings,
- const size_t * lengths, cl_int * errcode_ret)
-{
- cl_program ret;
- TRACE("\n");
- ret = clCreateProgramWithSource(context, count, strings, lengths, errcode_ret);
- return ret;
-}
-
-cl_program WINAPI wine_clCreateProgramWithBinary(cl_context context, cl_uint num_devices, const cl_device_id * device_list,
- const size_t * lengths, const unsigned char ** binaries, cl_int * binary_status,
- cl_int * errcode_ret)
-{
- cl_program ret;
- TRACE("\n");
- ret = clCreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clRetainProgram(cl_program program)
-{
- cl_int ret;
- TRACE("\n");
- ret = clRetainProgram(program);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseProgram(cl_program program)
-{
- cl_int ret;
- TRACE("\n");
- ret = clReleaseProgram(program);
- return ret;
-}
-
typedef struct
{
void WINAPI (*pfn_notify)(cl_program program, void * user_data);
@@ -474,307 +199,6 @@ cl_int WINAPI wine_clBuildProgram(cl_program program, cl_uint num_devices, const
return ret;
}
-cl_int WINAPI wine_clUnloadCompiler(void)
-{
- cl_int ret;
- TRACE("()\n");
- ret = clUnloadCompiler();
- TRACE("()=%d\n", ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetProgramInfo(cl_program program, cl_program_info param_name,
- size_t param_value_size, void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetProgramInfo(program, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetProgramBuildInfo(cl_program program, cl_device_id device,
- cl_program_build_info param_name, size_t param_value_size, void * param_value,
- size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetProgramBuildInfo(program, device, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Kernel Object APIs */
-
-cl_kernel WINAPI wine_clCreateKernel(cl_program program, char * kernel_name, cl_int * errcode_ret)
-{
- cl_kernel ret;
- TRACE("\n");
- ret = clCreateKernel(program, kernel_name, errcode_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clCreateKernelsInProgram(cl_program program, cl_uint num_kernels,
- cl_kernel * kernels, cl_uint * num_kernels_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clCreateKernelsInProgram(program, num_kernels, kernels, num_kernels_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clRetainKernel(cl_kernel kernel)
-{
- cl_int ret;
- TRACE("\n");
- ret = clRetainKernel(kernel);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseKernel(cl_kernel kernel)
-{
- cl_int ret;
- TRACE("\n");
- ret = clReleaseKernel(kernel);
- return ret;
-}
-
-cl_int WINAPI wine_clSetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, void * arg_value)
-{
- cl_int ret;
- TRACE("\n");
- ret = clSetKernelArg(kernel, arg_index, arg_size, arg_value);
- return ret;
-}
-
-cl_int WINAPI wine_clGetKernelInfo(cl_kernel kernel, cl_kernel_info param_name,
- size_t param_value_size, void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetKernelInfo(kernel, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clGetKernelWorkGroupInfo(cl_kernel kernel, cl_device_id device,
- cl_kernel_work_group_info param_name, size_t param_value_size,
- void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Event Object APIs */
-
-cl_int WINAPI wine_clWaitForEvents(cl_uint num_events, cl_event * event_list)
-{
- cl_int ret;
- TRACE("\n");
- ret = clWaitForEvents(num_events, event_list);
- return ret;
-}
-
-cl_int WINAPI wine_clGetEventInfo(cl_event event, cl_event_info param_name, size_t param_value_size,
- void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetEventInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clRetainEvent(cl_event event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clRetainEvent(event);
- return ret;
-}
-
-cl_int WINAPI wine_clReleaseEvent(cl_event event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clReleaseEvent(event);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Profiling APIs */
-
-cl_int WINAPI wine_clGetEventProfilingInfo(cl_event event, cl_profiling_info param_name, size_t param_value_size,
- void * param_value, size_t * param_value_size_ret)
-{
- cl_int ret;
- TRACE("\n");
- ret = clGetEventProfilingInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Flush and Finish APIs */
-
-cl_int WINAPI wine_clFlush(cl_command_queue command_queue)
-{
- cl_int ret;
- TRACE("(%p)\n", command_queue);
- ret = clFlush(command_queue);
- TRACE("(%p)=%d\n", command_queue, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clFinish(cl_command_queue command_queue)
-{
- cl_int ret;
- TRACE("(%p)\n", command_queue);
- ret = clFinish(command_queue);
- TRACE("(%p)=%d\n", command_queue, ret);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Enqueued Commands APIs */
-
-cl_int WINAPI wine_clEnqueueReadBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
- size_t offset, size_t cb, void * ptr,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueReadBuffer(command_queue, buffer, blocking_read, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueWriteBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write,
- size_t offset, size_t cb, const void * ptr,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueWriteBuffer(command_queue, buffer, blocking_write, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueCopyBuffer(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
- size_t src_offset, size_t dst_offset, size_t cb,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset, dst_offset, cb, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueReadImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read,
- const size_t * origin, const size_t * region,
- SIZE_T row_pitch, SIZE_T slice_pitch, void * ptr,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("(%p, %p, %d, %p, %p, %ld, %ld, %p, %d, %p, %p)\n", command_queue, image, blocking_read,
- origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
- ret = clEnqueueReadImage(command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
- TRACE("(%p, %p, %d, %p, %p, %ld, %ld, %p, %d, %p, %p)=%d\n", command_queue, image, blocking_read,
- origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event, ret);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueWriteImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write,
- const size_t * origin, const size_t * region,
- size_t input_row_pitch, size_t input_slice_pitch, const void * ptr,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueWriteImage(command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueCopyImage(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image,
- size_t * src_origin, size_t * dst_origin, size_t * region,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueCopyImage(command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueCopyImageToBuffer(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer,
- size_t * src_origin, size_t * region, size_t dst_offset,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueCopyImageToBuffer(command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueCopyBufferToImage(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image,
- size_t src_offset, size_t * dst_origin, size_t * region,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueCopyBufferToImage(command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-void * WINAPI wine_clEnqueueMapBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map,
- cl_map_flags map_flags, size_t offset, size_t cb,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret)
-{
- void * ret;
- TRACE("\n");
- ret = clEnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags, offset, cb, num_events_in_wait_list, event_wait_list, event, errcode_ret);
- return ret;
-}
-
-void * WINAPI wine_clEnqueueMapImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map,
- cl_map_flags map_flags, size_t * origin, size_t * region,
- size_t * image_row_pitch, size_t * image_slice_pitch,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret)
-{
- void * ret;
- TRACE("\n");
- ret = clEnqueueMapImage(command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueUnmapMemObject(cl_command_queue command_queue, cl_mem memobj, void * mapped_ptr,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueUnmapMemObject(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueNDRangeKernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim,
- size_t * global_work_offset, size_t * global_work_size, size_t * local_work_size,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueNDRangeKernel(command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueTask(cl_command_queue command_queue, cl_kernel kernel,
- cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueTask(command_queue, kernel, num_events_in_wait_list, event_wait_list, event);
- return ret;
-}
cl_int WINAPI wine_clEnqueueNativeKernel(cl_command_queue command_queue,
void WINAPI (*user_func)(void *args),
@@ -797,33 +221,6 @@ cl_int WINAPI wine_clEnqueueNativeKernel(cl_command_queue command_queue,
return ret;
}
-cl_int WINAPI wine_clEnqueueMarker(cl_command_queue command_queue, cl_event * event)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueMarker(command_queue, event);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueWaitForEvents(cl_command_queue command_queue, cl_uint num_events, cl_event * event_list)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueWaitForEvents(command_queue, num_events, event_list);
- return ret;
-}
-
-cl_int WINAPI wine_clEnqueueBarrier(cl_command_queue command_queue)
-{
- cl_int ret;
- TRACE("\n");
- ret = clEnqueueBarrier(command_queue);
- return ret;
-}
-
-
-/*---------------------------------------------------------------*/
-/* Extension function access */
void * WINAPI wine_clGetExtensionFunctionAddress(const char * func_name)
{
@@ -837,66 +234,3 @@ void * WINAPI wine_clGetExtensionFunctionAddress(const char * func_name)
TRACE("(%s)=%p\n",func_name, ret);
return ret;
}
-
-
-#if OPENCL_WITH_GL
-/*---------------------------------------------------------------*/
-/* Khronos-approved (KHR) OpenCL extensions which have OpenGL dependencies. */
-
-cl_mem WINAPI wine_clCreateFromGLBuffer(cl_context context, cl_mem_flags flags, cl_GLuint bufobj, int * errcode_ret)
-{
-}
-
-cl_mem WINAPI wine_clCreateFromGLTexture2D(cl_context context, cl_mem_flags flags, cl_GLenum target,
- cl_GLint miplevel, cl_GLuint texture, cl_int * errcode_ret)
-{
-}
-
-cl_mem WINAPI wine_clCreateFromGLTexture3D(cl_context context, cl_mem_flags flags, cl_GLenum target,
- cl_GLint miplevel, cl_GLuint texture, cl_int * errcode_ret)
-{
-}
-
-cl_mem WINAPI wine_clCreateFromGLRenderbuffer(cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, cl_int * errcode_ret)
-{
-}
-
-cl_int WINAPI wine_clGetGLObjectInfo(cl_mem memobj, cl_gl_object_type * gl_object_type, cl_GLuint * gl_object_name)
-{
-}
-
-cl_int WINAPI wine_clGetGLTextureInfo(cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size,
- void * param_value, size_t * param_value_size_ret)
-{
-}
-
-cl_int WINAPI wine_clEnqueueAcquireGLObjects(cl_command_queue command_queue, cl_uint num_objects, const cl_mem * mem_objects,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
-}
-
-cl_int WINAPI wine_clEnqueueReleaseGLObjects(cl_command_queue command_queue, cl_uint num_objects, const cl_mem * mem_objects,
- cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event)
-{
-}
-
-
-/*---------------------------------------------------------------*/
-/* cl_khr_gl_sharing extension */
-
-cl_int WINAPI wine_clGetGLContextInfoKHR(const cl_context_properties * properties, cl_gl_context_info param_name,
- size_t param_value_size, void * param_value, size_t * param_value_size_ret)
-{
-}
-
-#endif
-
-
-#if 0
-/*---------------------------------------------------------------*/
-/* cl_khr_icd extension */
-
-cl_int WINAPI wine_clIcdGetPlatformIDsKHR(cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms)
-{
-}
-#endif
diff --git a/dlls/opencl/opencl.spec b/dlls/opencl/opencl.spec
index ba8ce6e7cd5..34123885587 100644
--- a/dlls/opencl/opencl.spec
+++ b/dlls/opencl/opencl.spec
@@ -1,96 +1,66 @@
-# OpenCL 1.0
-@ stdcall clGetPlatformIDs( long ptr ptr ) wine_clGetPlatformIDs
-@ stdcall clGetPlatformInfo( long long long ptr ptr ) wine_clGetPlatformInfo
-
-@ stdcall clGetDeviceIDs( long long long ptr ptr ) wine_clGetDeviceIDs
-@ stdcall clGetDeviceInfo( long long long ptr ptr ) wine_clGetDeviceInfo
-
+@ stdcall clBuildProgram(ptr long ptr ptr ptr ptr) wine_clBuildProgram
+@ stdcall clCreateBuffer(ptr int64 long ptr ptr) wine_clCreateBuffer
+@ stdcall clCreateCommandQueue(ptr ptr int64 ptr) wine_clCreateCommandQueue
@ stdcall clCreateContext(ptr long ptr ptr ptr ptr) wine_clCreateContext
-@ stdcall clCreateContextFromType(ptr long ptr ptr ptr) wine_clCreateContextFromType
-@ stdcall clRetainContext( long ) wine_clRetainContext
-@ stdcall clReleaseContext( long ) wine_clReleaseContext
-@ stdcall clGetContextInfo( long long long ptr ptr ) wine_clGetContextInfo
-
-@ stdcall clCreateCommandQueue( long long long ptr ) wine_clCreateCommandQueue
-@ stdcall clRetainCommandQueue( long ) wine_clRetainCommandQueue
-@ stdcall clReleaseCommandQueue( long ) wine_clReleaseCommandQueue
-@ stdcall clGetCommandQueueInfo( long long long ptr ptr ) wine_clGetCommandQueueInfo
-@ stdcall clSetCommandQueueProperty( long long long ptr ) wine_clSetCommandQueueProperty
-
-@ stdcall clCreateBuffer( long long long ptr ptr ) wine_clCreateBuffer
-@ stdcall clCreateImage2D( long long ptr long long long ptr ptr ) wine_clCreateImage2D
-@ stdcall clCreateImage3D( long long ptr long long long long long ptr ptr ) wine_clCreateImage3D
-@ stdcall clRetainMemObject( long ) wine_clRetainMemObject
-@ stdcall clReleaseMemObject( long ) wine_clReleaseMemObject
-@ stdcall clGetSupportedImageFormats( long long long long ptr ptr ) wine_clGetSupportedImageFormats
-@ stdcall clGetMemObjectInfo( long long long ptr ptr ) wine_clGetMemObjectInfo
-@ stdcall clGetImageInfo( long long long ptr ptr ) wine_clGetImageInfo
-
-@ stdcall clCreateSampler( long long long long ptr ) wine_clCreateSampler
-@ stdcall clRetainSampler( long ) wine_clRetainSampler
-@ stdcall clReleaseSampler( long ) wine_clReleaseSampler
-@ stdcall clGetSamplerInfo( long long long ptr ptr ) wine_clGetSamplerInfo
-
-@ stdcall clCreateProgramWithSource( long long ptr ptr ptr ) wine_clCreateProgramWithSource
-@ stdcall clCreateProgramWithBinary( long long ptr ptr ptr ptr ptr ) wine_clCreateProgramWithBinary
-@ stdcall clRetainProgram( long ) wine_clRetainProgram
-@ stdcall clReleaseProgram( long ) wine_clReleaseProgram
-@ stdcall clBuildProgram( long long ptr str ptr ptr ) wine_clBuildProgram
+@ stdcall clCreateContextFromType(ptr int64 ptr ptr ptr) wine_clCreateContextFromType
+@ stdcall clCreateImage2D(ptr int64 ptr long long long ptr ptr) wine_clCreateImage2D
+@ stdcall clCreateImage3D(ptr int64 ptr long long long long long ptr ptr) wine_clCreateImage3D
+@ stdcall clCreateKernel(ptr ptr ptr) wine_clCreateKernel
+@ stdcall clCreateKernelsInProgram(ptr long ptr ptr) wine_clCreateKernelsInProgram
+@ stdcall clCreateProgramWithBinary(ptr long ptr ptr ptr ptr ptr) wine_clCreateProgramWithBinary
+@ stdcall clCreateProgramWithSource(ptr long ptr ptr ptr) wine_clCreateProgramWithSource
+@ stdcall clCreateSampler(ptr long long long ptr) wine_clCreateSampler
+@ stdcall clEnqueueBarrier(ptr) wine_clEnqueueBarrier
+@ stdcall clEnqueueCopyBuffer(ptr ptr ptr long long long long ptr ptr) wine_clEnqueueCopyBuffer
+@ stdcall clEnqueueCopyBufferToImage(ptr ptr ptr long ptr ptr long ptr ptr) wine_clEnqueueCopyBufferToImage
+@ stdcall clEnqueueCopyImage(ptr ptr ptr ptr ptr ptr long ptr ptr) wine_clEnqueueCopyImage
+@ stdcall clEnqueueCopyImageToBuffer(ptr ptr ptr ptr ptr long long ptr ptr) wine_clEnqueueCopyImageToBuffer
+@ stdcall clEnqueueMapBuffer(ptr ptr long int64 long long long ptr ptr ptr) wine_clEnqueueMapBuffer
+@ stdcall clEnqueueMapImage(ptr ptr long int64 ptr ptr ptr ptr long ptr ptr ptr) wine_clEnqueueMapImage
+@ stdcall clEnqueueMarker(ptr ptr) wine_clEnqueueMarker
+@ stdcall clEnqueueNDRangeKernel(ptr ptr long ptr ptr ptr long ptr ptr) wine_clEnqueueNDRangeKernel
+@ stdcall clEnqueueNativeKernel(ptr ptr ptr long long ptr ptr long ptr ptr) wine_clEnqueueNativeKernel
+@ stdcall clEnqueueReadBuffer(ptr ptr long long long ptr long ptr ptr) wine_clEnqueueReadBuffer
+@ stdcall clEnqueueReadImage(ptr ptr long ptr ptr long long ptr long ptr ptr) wine_clEnqueueReadImage
+@ stdcall clEnqueueTask(ptr ptr long ptr ptr) wine_clEnqueueTask
+@ stdcall clEnqueueUnmapMemObject(ptr ptr ptr long ptr ptr) wine_clEnqueueUnmapMemObject
+@ stdcall clEnqueueWaitForEvents(ptr long ptr) wine_clEnqueueWaitForEvents
+@ stdcall clEnqueueWriteBuffer(ptr ptr long long long ptr long ptr ptr) wine_clEnqueueWriteBuffer
+@ stdcall clEnqueueWriteImage(ptr ptr long ptr ptr long long ptr long ptr ptr) wine_clEnqueueWriteImage
+@ stdcall clFinish(ptr) wine_clFinish
+@ stdcall clFlush(ptr) wine_clFlush
+@ stdcall clGetCommandQueueInfo(ptr long long ptr ptr) wine_clGetCommandQueueInfo
+@ stdcall clGetContextInfo(ptr long long ptr ptr) wine_clGetContextInfo
+@ stdcall clGetDeviceIDs(ptr int64 long ptr ptr) wine_clGetDeviceIDs
+@ stdcall clGetDeviceInfo(ptr long long ptr ptr) wine_clGetDeviceInfo
+@ stdcall clGetEventInfo(ptr long long ptr ptr) wine_clGetEventInfo
+@ stdcall clGetEventProfilingInfo(ptr long long ptr ptr) wine_clGetEventProfilingInfo
+@ stdcall clGetExtensionFunctionAddress(ptr) wine_clGetExtensionFunctionAddress
+@ stdcall clGetImageInfo(ptr long long ptr ptr) wine_clGetImageInfo
+@ stdcall clGetKernelInfo(ptr long long ptr ptr) wine_clGetKernelInfo
+@ stdcall clGetKernelWorkGroupInfo(ptr ptr long long ptr ptr) wine_clGetKernelWorkGroupInfo
+@ stdcall clGetMemObjectInfo(ptr long long ptr ptr) wine_clGetMemObjectInfo
+@ stdcall clGetPlatformIDs(long ptr ptr) wine_clGetPlatformIDs
+@ stdcall clGetPlatformInfo(ptr long long ptr ptr) wine_clGetPlatformInfo
+@ stdcall clGetProgramBuildInfo(ptr ptr long long ptr ptr) wine_clGetProgramBuildInfo
+@ stdcall clGetProgramInfo(ptr long long ptr ptr) wine_clGetProgramInfo
+@ stdcall clGetSamplerInfo(ptr long long ptr ptr) wine_clGetSamplerInfo
+@ stdcall clGetSupportedImageFormats(ptr int64 long long ptr ptr) wine_clGetSupportedImageFormats
+@ stdcall clReleaseCommandQueue(ptr) wine_clReleaseCommandQueue
+@ stdcall clReleaseContext(ptr) wine_clReleaseContext
+@ stdcall clReleaseEvent(ptr) wine_clReleaseEvent
+@ stdcall clReleaseKernel(ptr) wine_clReleaseKernel
+@ stdcall clReleaseMemObject(ptr) wine_clReleaseMemObject
+@ stdcall clReleaseProgram(ptr) wine_clReleaseProgram
+@ stdcall clReleaseSampler(ptr) wine_clReleaseSampler
+@ stdcall clRetainCommandQueue(ptr) wine_clRetainCommandQueue
+@ stdcall clRetainContext(ptr) wine_clRetainContext
+@ stdcall clRetainEvent(ptr) wine_clRetainEvent
+@ stdcall clRetainKernel(ptr) wine_clRetainKernel
+@ stdcall clRetainMemObject(ptr) wine_clRetainMemObject
+@ stdcall clRetainProgram(ptr) wine_clRetainProgram
+@ stdcall clRetainSampler(ptr) wine_clRetainSampler
+@ stdcall clSetCommandQueueProperty(ptr int64 long ptr) wine_clSetCommandQueueProperty
+@ stdcall clSetKernelArg(ptr long long ptr) wine_clSetKernelArg
@ stdcall clUnloadCompiler() wine_clUnloadCompiler
-@ stdcall clGetProgramInfo( long long long ptr ptr ) wine_clGetProgramInfo
-@ stdcall clGetProgramBuildInfo( long long long long ptr ptr ) wine_clGetProgramBuildInfo
-
-@ stdcall clCreateKernel( long str ptr ) wine_clCreateKernel
-@ stdcall clCreateKernelsInProgram( long long ptr ptr ) wine_clCreateKernelsInProgram
-@ stdcall clRetainKernel( long ) wine_clRetainKernel
-@ stdcall clReleaseKernel( long ) wine_clReleaseKernel
-@ stdcall clSetKernelArg( long long long ptr ) wine_clSetKernelArg
-@ stdcall clGetKernelInfo( long long long ptr ptr ) wine_clGetKernelInfo
-@ stdcall clGetKernelWorkGroupInfo( long long long long ptr ptr ) wine_clGetKernelWorkGroupInfo
-
-@ stdcall clWaitForEvents( long ptr ) wine_clWaitForEvents
-@ stdcall clGetEventInfo( long long long ptr ptr ) wine_clGetEventInfo
-@ stdcall clReleaseEvent( long ) wine_clReleaseEvent
-@ stdcall clRetainEvent( long ) wine_clRetainEvent
-
-@ stdcall clGetEventProfilingInfo( long long long ptr ptr ) wine_clGetEventProfilingInfo
-
-@ stdcall clFlush( long ) wine_clFlush
-@ stdcall clFinish( long ) wine_clFinish
-
-@ stdcall clEnqueueReadBuffer( long long long long long ptr long ptr ptr ) wine_clEnqueueReadBuffer
-@ stdcall clEnqueueWriteBuffer( long long long long long ptr long ptr ptr ) wine_clEnqueueWriteBuffer
-@ stdcall clEnqueueCopyBuffer( long long long long long long long ptr ptr ) wine_clEnqueueCopyBuffer
-@ stdcall clEnqueueReadImage( long long long ptr ptr long long ptr long ptr ptr ) wine_clEnqueueReadImage
-@ stdcall clEnqueueWriteImage( long long long ptr ptr long long ptr long ptr ptr ) wine_clEnqueueWriteImage
-@ stdcall clEnqueueCopyImage( long long long ptr ptr ptr long ptr ptr ) wine_clEnqueueCopyImage
-@ stdcall clEnqueueCopyImageToBuffer( long long long ptr ptr long long ptr ptr ) wine_clEnqueueCopyImageToBuffer
-@ stdcall clEnqueueCopyBufferToImage( long long long long ptr ptr long ptr ptr ) wine_clEnqueueCopyBufferToImage
-@ stdcall clEnqueueMapBuffer( long long long long long long long ptr ptr ptr ) wine_clEnqueueMapBuffer
-@ stdcall clEnqueueMapImage( long long long long ptr ptr ptr ptr long ptr ptr ptr ) wine_clEnqueueMapImage
-@ stdcall clEnqueueUnmapMemObject( long long ptr long ptr ptr ) wine_clEnqueueUnmapMemObject
-@ stdcall clEnqueueNDRangeKernel( long long long ptr ptr ptr long ptr ptr ) wine_clEnqueueNDRangeKernel
-@ stdcall clEnqueueTask( long long long ptr ptr ) wine_clEnqueueTask
-@ stdcall clEnqueueNativeKernel(long ptr ptr long long ptr ptr long ptr ptr) wine_clEnqueueNativeKernel
-@ stdcall clEnqueueMarker( long ptr ) wine_clEnqueueMarker
-@ stdcall clEnqueueWaitForEvents( long long ptr ) wine_clEnqueueWaitForEvents
-@ stdcall clEnqueueBarrier( long ) wine_clEnqueueBarrier
-
-@ stdcall clGetExtensionFunctionAddress( str ) wine_clGetExtensionFunctionAddress
-
-@ stub clCreateFromGLBuffer
-@ stub clCreateFromGLTexture2D
-@ stub clCreateFromGLTexture3D
-@ stub clCreateFromGLRenderbuffer
-@ stub clGetGLObjectInfo
-@ stub clGetGLTextureInfo
-@ stub clEnqueueAcquireGLObjects
-@ stub clEnqueueReleaseGLObjects
-# @ stdcall clCreateFromGLBuffer( long long long ptr ) wine_clCreateFromGLBuffer
-# @ stdcall clCreateFromGLTexture2D( long long long long long ptr ) wine_clCreateFromGLTexture2D
-# @ stdcall clCreateFromGLTexture3D( long long long long long ptr ) wine_clCreateFromGLTexture3D
-# @ stdcall clCreateFromGLRenderbuffer( long long long ptr ) wine_clCreateFromGLRenderbuffer
-# @ stdcall clGetGLObjectInfo( long ptr ptr ) wine_clGetGLObjectInfo
-# @ stdcall clGetGLTextureInfo( long long long ptr ptr ) wine_clGetGLTextureInfo
-# @ stdcall clEnqueueAcquireGLObjects( long long ptr long ptr ptr ) wine_clEnqueueAcquireGLObjects
-# @ stdcall clEnqueueReleaseGLObjects( long long ptr long ptr ptr ) wine_clEnqueueReleaseGLObjects
+@ stdcall clWaitForEvents(long ptr) wine_clWaitForEvents
diff --git a/dlls/opencl/opencl_private.h b/dlls/opencl/opencl_private.h
new file mode 100644
index 00000000000..1859f756f70
--- /dev/null
+++ b/dlls/opencl/opencl_private.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2021 Zebediah Figura
+ *
+ * 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_OPENCL_PRIVATE_H
+#define __WINE_OPENCL_PRIVATE_H
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+
+#include "wine/debug.h"
+
+#define CL_SILENCE_DEPRECATION
+#if defined(HAVE_CL_CL_H)
+#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
+#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
+#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
+#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
+#define CL_TARGET_OPENCL_VERSION 220
+#include <CL/cl.h>
+#elif defined(HAVE_OPENCL_OPENCL_H)
+#include <OpenCL/opencl.h>
+#endif
+
+#endif
diff --git a/dlls/opencl/opencl_thunks.c b/dlls/opencl/opencl_thunks.c
new file mode 100644
index 00000000000..e483e6b7f3e
--- /dev/null
+++ b/dlls/opencl/opencl_thunks.c
@@ -0,0 +1,361 @@
+/* Automatically generated from OpenCL registry files; DO NOT EDIT! */
+
+#include "config.h"
+#include "opencl_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(opencl);
+
+cl_mem WINAPI wine_clCreateBuffer( cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %s, %zu, %p, %p)\n", context, wine_dbgstr_longlong(flags), size, host_ptr, errcode_ret );
+ return clCreateBuffer( context, flags, size, host_ptr, errcode_ret );
+}
+
+cl_command_queue WINAPI wine_clCreateCommandQueue( cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %p, %s, %p)\n", context, device, wine_dbgstr_longlong(properties), errcode_ret );
+ return clCreateCommandQueue( context, device, properties, errcode_ret );
+}
+
+cl_mem WINAPI wine_clCreateImage2D( cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void* host_ptr, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %s, %p, %zu, %zu, %zu, %p, %p)\n", context, wine_dbgstr_longlong(flags), image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret );
+ return clCreateImage2D( context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret );
+}
+
+cl_mem WINAPI wine_clCreateImage3D( cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void* host_ptr, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %s, %p, %zu, %zu, %zu, %zu, %zu, %p, %p)\n", context, wine_dbgstr_longlong(flags), image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret );
+ return clCreateImage3D( context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret );
+}
+
+cl_kernel WINAPI wine_clCreateKernel( cl_program program, const char* kernel_name, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %p, %p)\n", program, kernel_name, errcode_ret );
+ return clCreateKernel( program, kernel_name, errcode_ret );
+}
+
+cl_int WINAPI wine_clCreateKernelsInProgram( cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret )
+{
+ TRACE( "(%p, %u, %p, %p)\n", program, num_kernels, kernels, num_kernels_ret );
+ return clCreateKernelsInProgram( program, num_kernels, kernels, num_kernels_ret );
+}
+
+cl_program WINAPI wine_clCreateProgramWithBinary( cl_context context, cl_uint num_devices, const cl_device_id* device_list, const size_t* lengths, const unsigned char** binaries, cl_int* binary_status, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %u, %p, %p, %p, %p, %p)\n", context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret );
+ return clCreateProgramWithBinary( context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret );
+}
+
+cl_program WINAPI wine_clCreateProgramWithSource( cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %u, %p, %p, %p)\n", context, count, strings, lengths, errcode_ret );
+ return clCreateProgramWithSource( context, count, strings, lengths, errcode_ret );
+}
+
+cl_sampler WINAPI wine_clCreateSampler( cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %u, %u, %u, %p)\n", context, normalized_coords, addressing_mode, filter_mode, errcode_ret );
+ return clCreateSampler( context, normalized_coords, addressing_mode, filter_mode, errcode_ret );
+}
+
+cl_int WINAPI wine_clEnqueueBarrier( cl_command_queue command_queue )
+{
+ TRACE( "(%p)\n", command_queue );
+ return clEnqueueBarrier( command_queue );
+}
+
+cl_int WINAPI wine_clEnqueueCopyBuffer( cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %p, %zu, %zu, %zu, %u, %p, %p)\n", command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueCopyBuffer( command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueCopyBufferToImage( cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %p, %zu, %p, %p, %u, %p, %p)\n", command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueCopyBufferToImage( command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueCopyImage( cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t* src_origin, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %p, %p, %p, %p, %u, %p, %p)\n", command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueCopyImage( command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueCopyImageToBuffer( cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t* src_origin, const size_t* region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %p, %p, %p, %zu, %u, %p, %p)\n", command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueCopyImageToBuffer( command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event );
+}
+
+void* WINAPI wine_clEnqueueMapBuffer( cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %p, %u, %s, %zu, %zu, %u, %p, %p, %p)\n", command_queue, buffer, blocking_map, wine_dbgstr_longlong(map_flags), offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret );
+ return clEnqueueMapBuffer( command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret );
+}
+
+void* WINAPI wine_clEnqueueMapImage( cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t* origin, const size_t* region, size_t* image_row_pitch, size_t* image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret )
+{
+ TRACE( "(%p, %p, %u, %s, %p, %p, %p, %p, %u, %p, %p, %p)\n", command_queue, image, blocking_map, wine_dbgstr_longlong(map_flags), origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret );
+ return clEnqueueMapImage( command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret );
+}
+
+cl_int WINAPI wine_clEnqueueMarker( cl_command_queue command_queue, cl_event* event )
+{
+ TRACE( "(%p, %p)\n", command_queue, event );
+ return clEnqueueMarker( command_queue, event );
+}
+
+cl_int WINAPI wine_clEnqueueNDRangeKernel( cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, const size_t* local_work_size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %u, %p, %p, %p, %u, %p, %p)\n", command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueNDRangeKernel( command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueReadBuffer( cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %u, %zu, %zu, %p, %u, %p, %p)\n", command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueReadBuffer( command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueReadImage( cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t* origin, const size_t* region, size_t row_pitch, size_t slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %u, %p, %p, %zu, %zu, %p, %u, %p, %p)\n", command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueReadImage( command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueTask( cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %u, %p, %p)\n", command_queue, kernel, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueTask( command_queue, kernel, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueUnmapMemObject( cl_command_queue command_queue, cl_mem memobj, void* mapped_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %p, %u, %p, %p)\n", command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueUnmapMemObject( command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueWaitForEvents( cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list )
+{
+ TRACE( "(%p, %u, %p)\n", command_queue, num_events, event_list );
+ return clEnqueueWaitForEvents( command_queue, num_events, event_list );
+}
+
+cl_int WINAPI wine_clEnqueueWriteBuffer( cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %u, %zu, %zu, %p, %u, %p, %p)\n", command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueWriteBuffer( command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clEnqueueWriteImage( cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t* origin, const size_t* region, size_t input_row_pitch, size_t input_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event )
+{
+ TRACE( "(%p, %p, %u, %p, %p, %zu, %zu, %p, %u, %p, %p)\n", command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
+ return clEnqueueWriteImage( command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event );
+}
+
+cl_int WINAPI wine_clFinish( cl_command_queue command_queue )
+{
+ TRACE( "(%p)\n", command_queue );
+ return clFinish( command_queue );
+}
+
+cl_int WINAPI wine_clFlush( cl_command_queue command_queue )
+{
+ TRACE( "(%p)\n", command_queue );
+ return clFlush( command_queue );
+}
+
+cl_int WINAPI wine_clGetCommandQueueInfo( cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", command_queue, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetCommandQueueInfo( command_queue, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetContextInfo( cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", context, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetContextInfo( context, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetDeviceIDs( cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices )
+{
+ TRACE( "(%p, %s, %u, %p, %p)\n", platform, wine_dbgstr_longlong(device_type), num_entries, devices, num_devices );
+ return clGetDeviceIDs( platform, device_type, num_entries, devices, num_devices );
+}
+
+cl_int WINAPI wine_clGetEventInfo( cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", event, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetEventInfo( event, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetEventProfilingInfo( cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", event, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetEventProfilingInfo( event, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetImageInfo( cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", image, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetImageInfo( image, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetKernelInfo( cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", kernel, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetKernelInfo( kernel, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetKernelWorkGroupInfo( cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %p, %u, %zu, %p, %p)\n", kernel, device, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetKernelWorkGroupInfo( kernel, device, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetMemObjectInfo( cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", memobj, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetMemObjectInfo( memobj, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetPlatformIDs( cl_uint num_entries, cl_platform_id* platforms, cl_uint* num_platforms )
+{
+ TRACE( "(%u, %p, %p)\n", num_entries, platforms, num_platforms );
+ return clGetPlatformIDs( num_entries, platforms, num_platforms );
+}
+
+cl_int WINAPI wine_clGetProgramBuildInfo( cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %p, %u, %zu, %p, %p)\n", program, device, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetProgramBuildInfo( program, device, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetProgramInfo( cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", program, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetProgramInfo( program, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetSamplerInfo( cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret )
+{
+ TRACE( "(%p, %u, %zu, %p, %p)\n", sampler, param_name, param_value_size, param_value, param_value_size_ret );
+ return clGetSamplerInfo( sampler, param_name, param_value_size, param_value, param_value_size_ret );
+}
+
+cl_int WINAPI wine_clGetSupportedImageFormats( cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format* image_formats, cl_uint* num_image_formats )
+{
+ TRACE( "(%p, %s, %u, %u, %p, %p)\n", context, wine_dbgstr_longlong(flags), image_type, num_entries, image_formats, num_image_formats );
+ return clGetSupportedImageFormats( context, flags, image_type, num_entries, image_formats, num_image_formats );
+}
+
+cl_int WINAPI wine_clReleaseCommandQueue( cl_command_queue command_queue )
+{
+ TRACE( "(%p)\n", command_queue );
+ return clReleaseCommandQueue( command_queue );
+}
+
+cl_int WINAPI wine_clReleaseContext( cl_context context )
+{
+ TRACE( "(%p)\n", context );
+ return clReleaseContext( context );
+}
+
+cl_int WINAPI wine_clReleaseEvent( cl_event event )
+{
+ TRACE( "(%p)\n", event );
+ return clReleaseEvent( event );
+}
+
+cl_int WINAPI wine_clReleaseKernel( cl_kernel kernel )
+{
+ TRACE( "(%p)\n", kernel );
+ return clReleaseKernel( kernel );
+}
+
+cl_int WINAPI wine_clReleaseMemObject( cl_mem memobj )
+{
+ TRACE( "(%p)\n", memobj );
+ return clReleaseMemObject( memobj );
+}
+
+cl_int WINAPI wine_clReleaseProgram( cl_program program )
+{
+ TRACE( "(%p)\n", program );
+ return clReleaseProgram( program );
+}
+
+cl_int WINAPI wine_clReleaseSampler( cl_sampler sampler )
+{
+ TRACE( "(%p)\n", sampler );
+ return clReleaseSampler( sampler );
+}
+
+cl_int WINAPI wine_clRetainCommandQueue( cl_command_queue command_queue )
+{
+ TRACE( "(%p)\n", command_queue );
+ return clRetainCommandQueue( command_queue );
+}
+
+cl_int WINAPI wine_clRetainContext( cl_context context )
+{
+ TRACE( "(%p)\n", context );
+ return clRetainContext( context );
+}
+
+cl_int WINAPI wine_clRetainEvent( cl_event event )
+{
+ TRACE( "(%p)\n", event );
+ return clRetainEvent( event );
+}
+
+cl_int WINAPI wine_clRetainKernel( cl_kernel kernel )
+{
+ TRACE( "(%p)\n", kernel );
+ return clRetainKernel( kernel );
+}
+
+cl_int WINAPI wine_clRetainMemObject( cl_mem memobj )
+{
+ TRACE( "(%p)\n", memobj );
+ return clRetainMemObject( memobj );
+}
+
+cl_int WINAPI wine_clRetainProgram( cl_program program )
+{
+ TRACE( "(%p)\n", program );
+ return clRetainProgram( program );
+}
+
+cl_int WINAPI wine_clRetainSampler( cl_sampler sampler )
+{
+ TRACE( "(%p)\n", sampler );
+ return clRetainSampler( sampler );
+}
+
+cl_int WINAPI wine_clSetCommandQueueProperty( cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable, cl_command_queue_properties* old_properties )
+{
+ TRACE( "(%p, %s, %u, %p)\n", command_queue, wine_dbgstr_longlong(properties), enable, old_properties );
+ return clSetCommandQueueProperty( command_queue, properties, enable, old_properties );
+}
+
+cl_int WINAPI wine_clSetKernelArg( cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value )
+{
+ TRACE( "(%p, %u, %zu, %p)\n", kernel, arg_index, arg_size, arg_value );
+ return clSetKernelArg( kernel, arg_index, arg_size, arg_value );
+}
+
+cl_int WINAPI wine_clUnloadCompiler( void )
+{
+ TRACE( "()\n" );
+ return clUnloadCompiler();
+}
+
+cl_int WINAPI wine_clWaitForEvents( cl_uint num_events, const cl_event* event_list )
+{
+ TRACE( "(%u, %p)\n", num_events, event_list );
+ return clWaitForEvents( num_events, event_list );
+}
+
--
2.20.1
1
0
09 Mar '21
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
programs/winedbg/gdbproxy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c
index 41aee55656b..bf96482042a 100644
--- a/programs/winedbg/gdbproxy.c
+++ b/programs/winedbg/gdbproxy.c
@@ -115,11 +115,11 @@ struct gdb_context
static void gdbctx_delete_xpoint(struct gdb_context *gdbctx, struct dbg_thread *thread,
dbg_ctx_t *ctx, struct gdb_xpoint *x)
{
- struct dbg_process *process = thread->process;
+ struct dbg_process *process = gdbctx->process;
struct backend_cpu *cpu = process->be_cpu;
if (!cpu->remove_Xpoint(process->handle, process->process_io, ctx, x->type, x->addr, x->value, x->size))
- ERR("%04x:%04x: Couldn't remove breakpoint at:%p/%x type:%d\n", process->pid, thread->tid, x->addr, x->size, x->type);
+ ERR("%04x:%04x: Couldn't remove breakpoint at:%p/%x type:%d\n", process->pid, thread ? thread->tid : ~0, x->addr, x->size, x->type);
list_remove(&x->entry);
HeapFree(GetProcessHeap(), 0, x);
--
2.30.0
2
2
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/strmbase/renderer.c | 38 +++-----------------------------------
include/wine/strmbase.h | 3 +--
2 files changed, 4 insertions(+), 37 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index ec915a95ef8..ed815097a0f 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -59,39 +59,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
static void QualityControlRender_Start(struct strmbase_qc *This, REFERENCE_TIME tStart)
{
- This->last_in_time = This->last_left = This->avg_duration = This->avg_pt = -1;
+ This->last_left = This->avg_duration = This->avg_pt = -1;
This->clockstart = tStart;
This->avg_rate = -1.0;
- This->is_dropped = FALSE;
-}
-
-static BOOL QualityControlRender_IsLate(struct strmbase_qc *This, REFERENCE_TIME jitter,
- REFERENCE_TIME start, REFERENCE_TIME stop)
-{
- REFERENCE_TIME max_lateness = 200000;
-
- TRACE("jitter %s, start %s, stop %s.\n", debugstr_time(jitter),
- debugstr_time(start), debugstr_time(stop));
-
- /* we can add a valid stop time */
- if (stop >= start)
- max_lateness += stop;
- else
- max_lateness += start;
-
- /* if the jitter bigger than duration and lateness we are too late */
- if (start + jitter > max_lateness) {
- WARN("buffer is too late %i > %i\n", (int)((start + jitter)/10000), (int)(max_lateness/10000));
- /* !!emergency!!, if we did not receive anything valid for more than a
- * second, render it anyway so the user sees something */
- if (This->last_in_time < 0 ||
- start - This->last_in_time < 10000000)
- return TRUE;
- FIXME("A lot of buffers are being dropped.\n");
- FIXME("There may be a timestamping problem, or this computer is too slow.\n");
- }
- This->last_in_time = start;
- return FALSE;
}
static void QualityControlRender_DoQOS(struct strmbase_qc *priv)
@@ -170,7 +140,7 @@ static void QualityControlRender_DoQOS(struct strmbase_qc *priv)
if (priv->last_left >= 0)
{
- if (priv->is_dropped || priv->avg_rate < 0.0)
+ if (priv->avg_rate < 0.0)
{
priv->avg_rate = rate;
}
@@ -231,9 +201,7 @@ static void QualityControlRender_BeginRender(struct strmbase_qc *This, REFERENCE
This->current_jitter = 0;
}
- /* FIXME: This isn't correct; we don't drop samples, nor should. */
- This->is_dropped = QualityControlRender_IsLate(This, This->current_jitter, start, stop);
- TRACE("dropped %d, start %s, stop %s, jitter %s.\n", This->is_dropped,
+ TRACE("start %s, stop %s, jitter %s.\n",
debugstr_time(start), debugstr_time(stop), debugstr_time(This->current_jitter));
}
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index 9df0437dd9a..c45e2a4513e 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -279,10 +279,9 @@ struct strmbase_qc
IQualityControl *tonotify;
/* Render stuff */
- REFERENCE_TIME last_in_time, last_left, avg_duration, avg_pt;
+ REFERENCE_TIME last_left, avg_duration, avg_pt;
REFERENCE_TIME current_jitter, current_rstart, current_rstop, clockstart;
double avg_rate;
- BOOL is_dropped;
};
struct strmbase_renderer
--
2.20.1
1
3
[PATCH] kernelbase: Support FileEndOfFileInformation in GetFileInformationByHandleEx.
by Jiangyi Chen 09 Mar '21
by Jiangyi Chen 09 Mar '21
09 Mar '21
2
1
09 Mar '21
It's in the .NET System namespace which translates to the Windows.Foundation
namespace in winrt interfaces.
---
include/windows.foundation.collections.idl | 6 ------
include/windows.foundation.idl | 8 ++++++++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl
index ed05016b96d..15866c2903a 100644
--- a/include/windows.foundation.collections.idl
+++ b/include/windows.foundation.collections.idl
@@ -41,12 +41,6 @@ cpp_quote("extern \"C\" {")
cpp_quote("#endif")
#ifdef __WIDL__
- [
- contract(Windows.Foundation.FoundationContract, 1.0),
- uuid(9de1c535-6ae1-11e0-84e1-18a905bcc53f)
- ]
- delegate HRESULT EventHandler<T>([in] IInspectable *sender, [in] T args);
-
namespace Collections
{
[
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 3c60278cf05..2b414039876 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -112,5 +112,13 @@ namespace Windows {
{
HRESULT ToString([out, retval] HSTRING *value);
}
+
+#ifdef __WIDL__
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(9de1c535-6ae1-11e0-84e1-18a905bcc53f)
+ ]
+ delegate HRESULT EventHandler<T>([in] IInspectable *sender, [in] T args);
+#endif
}
}
--
2.29.2
2
1
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
The first two patches are just about testing and fixing the standard
SendInput behavior regarding its parameters.
Then, the idea introduced here is to use a custom struct for hardware
input, so we can then add more data for the HID reports, and send
WM_INPUT messages using SendInput.
It looks like that INPUT struct already has a INPUT_HARDWARE type, which
we could also re-use for such non-mouse and non-keyboard input, but it
doesn't seem to do anything on Windows. It always returns 0 and sets
last error to ERROR_CALL_NOT_IMPLEMENTED.
Alternatively, this could be implemented by changing __wine_send_input
to accept the extended structure, but this way will make it possible to
drop this custom entry point completely, which may be interesting.
dlls/user32/input.c | 18 +++++++++++
dlls/user32/tests/input.c | 63 +++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index e06f8b4413e..e9a74f177b9 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -182,6 +182,24 @@ UINT WINAPI SendInput( UINT count, LPINPUT inputs, int size )
UINT i;
NTSTATUS status;
+ if (size != sizeof(INPUT))
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+
+ if (!count)
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+
+ if (!inputs)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return 0;
+ }
+
for (i = 0; i < count; i++)
{
if (inputs[i].type == INPUT_MOUSE)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 9d75daa0bd5..57bae6cdcad 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -4118,6 +4118,68 @@ static void test_UnregisterDeviceNotification(void)
ok(ret == FALSE, "Unregistering NULL Device Notification returned: %d\n", ret);
}
+static void test_SendInput(void)
+{
+ INPUT input[16];
+ UINT res, i;
+ HWND hwnd;
+
+ hwnd = CreateWindowW( L"static", L"test", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, 0, 0 );
+ ok(hwnd != 0, "CreateWindowW failed\n");
+
+ ShowWindow( hwnd, SW_SHOWNORMAL );
+ UpdateWindow( hwnd );
+ SetForegroundWindow( hwnd );
+ SetFocus( hwnd );
+ empty_message_queue();
+
+ SetLastError(0xdeadbeef);
+ res = SendInput(0, NULL, 0);
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(1, NULL, 0);
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(1, NULL, sizeof(*input));
+ ok(res == 0 && GetLastError() == ERROR_NOACCESS, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(0, input, sizeof(*input));
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(0, NULL, sizeof(*input));
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+
+ memset(input, 0, sizeof(input));
+ SetLastError(0xdeadbeef);
+ res = SendInput(1, input, sizeof(*input));
+ ok(res == 1 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(16, input, sizeof(*input));
+ ok(res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError());
+
+ SetLastError(0xdeadbeef);
+ res = SendInput(1, input, 0);
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(1, input, sizeof(*input) + 1);
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(1, input, sizeof(*input) - 1);
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+
+ for (i = 0; i < ARRAY_SIZE(input); ++i) input[i].type = INPUT_KEYBOARD;
+ SetLastError(0xdeadbeef);
+ res = SendInput(16, input, offsetof(INPUT, ki) + sizeof(KEYBDINPUT));
+ ok(res == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "SendInput returned %u, error %#x\n", res, GetLastError());
+ SetLastError(0xdeadbeef);
+ res = SendInput(16, input, sizeof(*input));
+ ok(res == 16 && GetLastError() == 0xdeadbeef, "SendInput returned %u, error %#x\n", res, GetLastError());
+ empty_message_queue();
+
+ trace("done\n");
+ DestroyWindow(hwnd);
+}
+
START_TEST(input)
{
char **argv;
@@ -4140,6 +4202,7 @@ START_TEST(input)
return;
}
+ test_SendInput();
test_Input_blackbox();
test_Input_whitebox();
test_Input_unicode();
--
2.30.0
2
7
09 Mar '21
GetState must return VFW_S_STATE_INTERMEDIATE after flushing, until a sample
is received.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/qedit/tests/nullrenderer.c | 2 +-
dlls/quartz/tests/videorenderer.c | 2 +-
dlls/quartz/tests/vmr7.c | 2 +-
dlls/quartz/tests/vmr9.c | 2 +-
dlls/strmbase/renderer.c | 1 +
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/qedit/tests/nullrenderer.c b/dlls/qedit/tests/nullrenderer.c
index 1800f4d..cf0ae2c 100644
--- a/dlls/qedit/tests/nullrenderer.c
+++ b/dlls/qedit/tests/nullrenderer.c
@@ -763,7 +763,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph)
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state);
- todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
+ ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
thread = send_frame(input);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c
index ffe370a..2320aa1 100644
--- a/dlls/quartz/tests/videorenderer.c
+++ b/dlls/quartz/tests/videorenderer.c
@@ -991,7 +991,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state);
- todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
+ ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
thread = send_frame(input);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c
index ba2a98c..8418579 100644
--- a/dlls/quartz/tests/vmr7.c
+++ b/dlls/quartz/tests/vmr7.c
@@ -1200,7 +1200,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state);
- todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
+ ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
ok(state == State_Paused, "Got state %#x.\n", state);
thread = send_frame(input);
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index 8b46e47..529b8b8 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -1219,7 +1219,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state);
- todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
+ ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr);
ok(state == State_Paused, "Got state %#x.\n", state);
thread = send_frame(input);
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index 8da3d81..d9e53a1 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -287,6 +287,7 @@ static HRESULT sink_begin_flush(struct strmbase_sink *iface)
{
struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
+ ResetEvent(filter->state_event);
SetEvent(filter->flush_event);
return S_OK;
--
2.30.0
3
3
[PATCH 1/4] advapi32/tests: Check that registry time zones have a localized display name.
by Giovanni Mascellani 09 Mar '21
by Giovanni Mascellani 09 Mar '21
09 Mar '21
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
---
dlls/advapi32/tests/registry.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index dfadd13ea8c..718cc7769a2 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -4023,14 +4023,17 @@ static void test_EnumDynamicTimeZoneInformation(void)
HKEY key, subkey;
WCHAR name[32];
WCHAR keyname[128];
+ WCHAR displayname[128];
WCHAR sysdir[MAX_PATH];
DWORD index, ret, gle, size;
DYNAMIC_TIME_ZONE_INFORMATION bogus_dtzi, dtzi;
static const WCHAR stdW[] = {'S','t','d',0};
static const WCHAR dltW[] = {'D','l','t',0};
static const WCHAR tziW[] = {'T','Z','I',0};
+ static const WCHAR displayW[] = {'D','i','s','p','l','a','y',0};
static const WCHAR mui_stdW[] = {'M','U','I','_','S','t','d',0};
static const WCHAR mui_dltW[] = {'M','U','I','_','D','l','t',0};
+ static const WCHAR mui_displayW[] = {'M','U','I','_','D','i','s','p','l','a','y',0};
struct tz_reg_data
{
LONG bias;
@@ -4109,6 +4112,14 @@ static void test_EnumDynamicTimeZoneInformation(void)
ok(status == ERROR_SUCCESS, "status %d name %s\n", status, wine_dbgstr_w(name));
ok(!memcmp(&dtzi.DaylightName, name, size),
"expected %s, got %s\n", wine_dbgstr_w(name), wine_dbgstr_w(dtzi.DaylightName));
+
+ size = sizeof(displayname);
+ memset(displayname, 0, sizeof(displayname));
+ if (pRegLoadMUIStringW)
+ status = pRegLoadMUIStringW(subkey, mui_displayW, displayname, size, &size, 0, sysdir);
+ else
+ status = pRegGetValueW(subkey, NULL, displayW, RRF_RT_REG_SZ, NULL, displayname, &size);
+ todo_wine ok(status == ERROR_SUCCESS, "status %d displayname %s\n", status, wine_dbgstr_w(displayname));
}
else
{
--
2.30.1
1
3
[PATCH] wininet: Fix error handling INTERNET_OPTION_PROXY in InternetSetOptionA.
by Jiangyi Chen 09 Mar '21
by Jiangyi Chen 09 Mar '21
09 Mar '21
1
0