From 12ea3309f0af79e5291dd1c83773c653915fb5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 7 Oct 2016 13:26:39 +0200 Subject: [PATCH] libs/vkd3d-utils: Add library. --- Makefile.am | 9 ++++++-- libs/vkd3d-utils/vkd3d_utils_main.c | 30 ++++++++++++++++++++++++ libs/vkd3d-utils/vkd3d_utils_private.h | 32 ++++++++++++++++++++++++++ libs/vkd3d/vkd3d_main.c | 7 ------ 4 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 libs/vkd3d-utils/vkd3d_utils_main.c create mode 100644 libs/vkd3d-utils/vkd3d_utils_private.h diff --git a/Makefile.am b/Makefile.am index 3a90e6fa..f5449d49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,8 @@ noinst_LTLIBRARIES = libvkd3d-common.la libvkd3d_common_la_SOURCES = \ libs/vkd3d-common/debug.c -lib_LTLIBRARIES = libvkd3d.la +lib_LTLIBRARIES = libvkd3d.la libvkd3d-utils.la + libvkd3d_la_SOURCES = \ libs/vkd3d/command.c \ libs/vkd3d/device.c \ @@ -32,11 +33,15 @@ libvkd3d_la_SOURCES = \ libs/vkd3d/vkd3d_main.c libvkd3d_la_LIBADD = libvkd3d-common.la @PTHREAD_LIBS@ +libvkd3d_utils_la_SOURCES = \ + libs/vkd3d-utils/vkd3d_utils_main.c +libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d.la + pkgconfigdir = $(libdir)/pkgconfig pkginclude_HEADERS = $(vkd3d_public_headers) nodist_pkgconfig_DATA = libvkd3d.pc -LDADD = libvkd3d.la +LDADD = libvkd3d-utils.la check_PROGRAMS = $(vkd3d_tests) AM_DEFAULT_SOURCE_EXT = .c TESTS = $(vkd3d_tests) diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c new file mode 100644 index 00000000..efe636e9 --- /dev/null +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -0,0 +1,30 @@ +/* + * Copyright 2016 Józef Kucia for CodeWeavers + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is 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 Software. + * + * THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "vkd3d_utils_private.h" + +HRESULT WINAPI D3D12GetDebugInterface(REFIID riid, void **debug) +{ + FIXME("riid %s, debug %p stub!\n", debugstr_guid(riid), debug); + + return E_NOTIMPL; +} diff --git a/libs/vkd3d-utils/vkd3d_utils_private.h b/libs/vkd3d-utils/vkd3d_utils_private.h new file mode 100644 index 00000000..b942d43a --- /dev/null +++ b/libs/vkd3d-utils/vkd3d_utils_private.h @@ -0,0 +1,32 @@ +/* + * Copyright 2016 Józef Kucia for CodeWeavers + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is 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 Software. + * + * THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef __VKD3D_UTILS_PRIVATE_H +#define __VKD3D_UTILS_PRIVATE_H + +#define COBJMACROS +#define NONAMELESSUNION +#include "vkd3d_debug.h" + +#include "d3d12.h" + +#endif /* __VKD3D_UTILS_PRIVATE_H */ diff --git a/libs/vkd3d/vkd3d_main.c b/libs/vkd3d/vkd3d_main.c index 373ed9a5..dc15ad3d 100644 --- a/libs/vkd3d/vkd3d_main.c +++ b/libs/vkd3d/vkd3d_main.c @@ -55,13 +55,6 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, D3D_FEATURE_LEVEL minimum_fe riid, device); } -HRESULT WINAPI D3D12GetDebugInterface(REFIID riid, void **debug) -{ - FIXME("riid %s, debug %p stub!\n", debugstr_guid(riid), debug); - - return E_NOTIMPL; -} - /* Events */ HANDLE WINAPI VKD3DCreateEvent(void) {