Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2018
- 68 participants
- 1149 messages
Re: [PATCH vkd3d 4/4] libs/vkd3d: Trace build version.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39407
Your paranoid android.
=== debian9 (win32) ===
error: patch failed: configure.ac:93
Task: Patch failed to apply
June 27, 2018
Re: [PATCH vkd3d 3/4] libs/vkd3d: Set names for internal threads.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=39406
Your paranoid android.
=== debian9 (win32) ===
error: patch failed: configure.ac:93
Task: Patch failed to apply
June 27, 2018
[PATCH vkd3d 4/4] libs/vkd3d: Trace build version.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
Makefile.am | 11 ++++++++++-
libs/.gitignore | 1 +
libs/vkd3d/device.c | 2 ++
libs/vkd3d/vkd3d_private.h | 2 ++
4 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 libs/.gitignore
diff --git a/Makefile.am b/Makefile.am
index faefc679258e..14f2d5168134 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,7 +94,8 @@ libvkd3d_la_SOURCES = \
libs/vkd3d/vkd3d.map \
libs/vkd3d/vkd3d_main.c \
libs/vkd3d/vkd3d_private.h \
- libs/vkd3d/vulkan_procs.h
+ libs/vkd3d/vulkan_procs.h \
+ libs/vkd3d_version.c
libvkd3d_la_LDFLAGS = -version-info 1:0:0
libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@
if HAVE_LD_VERSION_SCRIPT
@@ -173,6 +174,14 @@ libvkd3d.pc: $(srcdir)/libs/vkd3d/libvkd3d.pc.in
-e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \
$< > $@
+libs/vkd3d_version.c: dummy-vkd3d-version
+ version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "vkd3d-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char vkd3d_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
+.SILENT: libs/vkd3d_version.c
+CLEANFILES += libs/vkd3d_version.c
+
+.PHONY: dummy-vkd3d-version
+dummy-vkd3d-version:
+
## Cross-compile tests
cross_implibs = crosslibs/d3d12
CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include
diff --git a/libs/.gitignore b/libs/.gitignore
new file mode 100644
index 000000000000..b4fc05a293e0
--- /dev/null
+++ b/libs/.gitignore
@@ -0,0 +1 @@
+vkd3d_version.c
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index e4c4d5211d61..fb57d76b5666 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -284,6 +284,8 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance,
VkResult vr;
HRESULT hr;
+ TRACE("Build: %s.\n", vkd3d_build);
+
if (!create_info->pfn_signal_event)
{
ERR("Invalid signal event function pointer.\n");
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 29611b8ccdc5..685825955a7f 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -794,4 +794,6 @@ HRESULT vkd3d_load_vk_instance_procs(struct vkd3d_vk_instance_procs *procs,
HRESULT vkd3d_load_vk_device_procs(struct vkd3d_vk_device_procs *procs,
const struct vkd3d_vk_instance_procs *parent_procs, VkDevice device) DECLSPEC_HIDDEN;
+extern const char vkd3d_build[];
+
#endif /* __VKD3D_PRIVATE_H */
--
2.16.4
June 27, 2018
[PATCH vkd3d 3/4] libs/vkd3d: Set names for internal threads.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
configure.ac | 2 ++
libs/vkd3d/command.c | 4 ++++
libs/vkd3d/vkd3d_private.h | 8 +++++---
m4/check-functions.m4 | 7 +++++++
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index daae6464fae9..2773a155cd78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,8 @@ VKD3D_CHECK_FUNC([HAVE_BUILTIN_POPCOUNT], [__builtin_popcount], [__builtin_popco
VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)])
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
+VKD3D_CHECK_LIB_FUNCS([pthread_setname_np], [$PTHREAD_LIBS])
+
AM_CONDITIONAL([HAVE_WIDL], [test "x$WIDL" != "xno"])
AM_CONDITIONAL([HAVE_CROSSTARGET32], [test "x$CROSSTARGET32" != "xno"])
AM_CONDITIONAL([HAVE_CROSSTARGET64], [test "x$CROSSTARGET64" != "xno"])
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index ee1d3f6e1018..d29d18edb633 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -199,6 +199,10 @@ static void *vkd3d_fence_worker_main(void *arg)
struct vkd3d_fence_worker *worker = arg;
int rc;
+#ifdef HAVE_PTHREAD_SETNAME_NP
+ pthread_setname_np(pthread_self(), "vkd3d_worker");
+#endif
+
for (;;)
{
if ((rc = pthread_mutex_lock(&worker->mutex)))
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 38f0bf38e215..29611b8ccdc5 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -19,12 +19,14 @@
#ifndef __VKD3D_PRIVATE_H
#define __VKD3D_PRIVATE_H
-#define VK_NO_PROTOTYPES
-
#define COBJMACROS
#define NONAMELESSUNION
-#include "vkd3d.h"
+#define VK_NO_PROTOTYPES
+
+#include "vkd3d_common.h"
#include "vkd3d_memory.h"
+
+#include "vkd3d.h"
#include "vkd3d_shader.h"
#include <assert.h>
diff --git a/m4/check-functions.m4 b/m4/check-functions.m4
index 8bb8213153af..17082a179719 100644
--- a/m4/check-functions.m4
+++ b/m4/check-functions.m4
@@ -7,3 +7,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return [$3]; }])],
[1],
[Define to 1 if you have $2.])],
[AC_MSG_RESULT([no])])])
+
+dnl VKD3D_CHECK_LIB_FUNCS
+AC_DEFUN([VKD3D_CHECK_LIB_FUNCS],
+[vkd3d_libs_saved="$LIBS"
+LIBS="$LIBS $2"
+AC_CHECK_FUNCS([$1], [$3], [$4])
+LIBS="$vkd3d_libs_saved"])
--
2.16.4
June 27, 2018
[PATCH vkd3d 2/4] tests: Add test for cube maps.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
tests/d3d12.c | 305 +++++++++++++++++++++++++++++++++++++++++++++++
tests/vkd3d_d3d12_test.h | 15 +--
2 files changed, 313 insertions(+), 7 deletions(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index c6220aa0113d..217b4368a6b2 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -909,6 +909,7 @@ static ID3D12RootSignature *create_texture_root_signature_(unsigned int line,
sampler_desc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
sampler_desc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
sampler_desc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
+ sampler_desc.MaxLOD = D3D12_FLOAT32_MAX;
sampler_desc.ShaderRegister = 0;
sampler_desc.RegisterSpace = 0;
sampler_desc.ShaderVisibility = shader_visibility;
@@ -8973,6 +8974,309 @@ static void test_gather(void)
destroy_test_context(&context);
}
+static void test_cube_maps(void)
+{
+ unsigned int i, j, sub_resource_idx, sub_resource_count;
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc;
+ D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc;
+ ID3D12GraphicsCommandList *command_list;
+ D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle;
+ D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle;
+ D3D12_SUBRESOURCE_DATA *texture_data;
+ const D3D12_SHADER_BYTECODE *ps;
+ struct test_context_desc desc;
+ struct test_context context;
+ ID3D12DescriptorHeap *heap;
+ ID3D12CommandQueue *queue;
+ ID3D12PipelineState *pso;
+ ID3D12Resource *texture;
+ float *data;
+ HRESULT hr;
+
+ struct
+ {
+ unsigned int face;
+ unsigned int level;
+ unsigned int cube;
+ } constants;
+
+ const unsigned int texture_size = 64;
+ static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ static const DWORD ps_cube_code[] =
+ {
+#if 0
+ TextureCube t;
+ SamplerState s;
+
+ uint face;
+ uint level;
+
+ float4 main(float4 position : SV_POSITION) : SV_Target
+ {
+ float2 p;
+ p.x = position.x / 640.0f;
+ p.y = position.y / 480.0f;
+
+ float3 coord;
+ switch (face)
+ {
+ case 0:
+ coord = float3(1.0f, p.x, p.y);
+ break;
+ case 1:
+ coord = float3(-1.0f, p.x, p.y);
+ break;
+ case 2:
+ coord = float3(p.x, 1.0f, p.y);
+ break;
+ case 3:
+ coord = float3(p.x, -1.0f, p.y);
+ break;
+ case 4:
+ coord = float3(p.x, p.y, 1.0f);
+ break;
+ case 5:
+ default:
+ coord = float3(p.x, p.y, -1.0f);
+ break;
+ }
+ return t.SampleLevel(s, coord, level);
+ }
+#endif
+ 0x43425844, 0x039aee18, 0xfd630453, 0xb884cf0f, 0x10100744, 0x00000001, 0x00000310, 0x00000003,
+ 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49,
+ 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000274, 0x00000040,
+ 0x0000009d, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300005a, 0x00106000, 0x00000000,
+ 0x04003058, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000, 0x00000001,
+ 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0400004c, 0x0020800a, 0x00000000,
+ 0x00000000, 0x03000006, 0x00004001, 0x00000000, 0x05000036, 0x00100012, 0x00000000, 0x00004001,
+ 0x3f800000, 0x0a000038, 0x00100062, 0x00000000, 0x00101106, 0x00000000, 0x00004002, 0x00000000,
+ 0x3acccccd, 0x3b088889, 0x00000000, 0x01000002, 0x03000006, 0x00004001, 0x00000001, 0x05000036,
+ 0x00100012, 0x00000000, 0x00004001, 0xbf800000, 0x0a000038, 0x00100062, 0x00000000, 0x00101106,
+ 0x00000000, 0x00004002, 0x00000000, 0x3acccccd, 0x3b088889, 0x00000000, 0x01000002, 0x03000006,
+ 0x00004001, 0x00000002, 0x0a000038, 0x00100052, 0x00000000, 0x00101106, 0x00000000, 0x00004002,
+ 0x3acccccd, 0x00000000, 0x3b088889, 0x00000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001,
+ 0x3f800000, 0x01000002, 0x03000006, 0x00004001, 0x00000003, 0x0a000038, 0x00100052, 0x00000000,
+ 0x00101106, 0x00000000, 0x00004002, 0x3acccccd, 0x00000000, 0x3b088889, 0x00000000, 0x05000036,
+ 0x00100022, 0x00000000, 0x00004001, 0xbf800000, 0x01000002, 0x03000006, 0x00004001, 0x00000004,
+ 0x0a000038, 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, 0x3b088889,
+ 0x00000000, 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0x3f800000, 0x01000002,
+ 0x0100000a, 0x0a000038, 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd,
+ 0x3b088889, 0x00000000, 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0xbf800000,
+ 0x01000002, 0x01000017, 0x06000056, 0x00100082, 0x00000000, 0x0020801a, 0x00000000, 0x00000000,
+ 0x0b000048, 0x001020f2, 0x00000000, 0x00100246, 0x00000000, 0x00107e46, 0x00000000, 0x00106000,
+ 0x00000000, 0x0010003a, 0x00000000, 0x0100003e,
+ };
+ static const D3D12_SHADER_BYTECODE ps_cube = {ps_cube_code, sizeof(ps_cube_code)};
+ static const DWORD ps_cube_array_code[] =
+ {
+#if 0
+ TextureCubeArray t;
+ SamplerState s;
+
+ uint face;
+ uint level;
+ uint cube;
+
+ float4 main(float4 position : SV_POSITION) : SV_Target
+ {
+ float2 p;
+ p.x = position.x / 640.0f;
+ p.y = position.y / 480.0f;
+
+ float3 coord;
+ switch (face)
+ {
+ case 0:
+ coord = float3(1.0f, p.x, p.y);
+ break;
+ case 1:
+ coord = float3(-1.0f, p.x, p.y);
+ break;
+ case 2:
+ coord = float3(p.x, 1.0f, p.y);
+ break;
+ case 3:
+ coord = float3(p.x, -1.0f, p.y);
+ break;
+ case 4:
+ coord = float3(p.x, p.y, 1.0f);
+ break;
+ case 5:
+ default:
+ coord = float3(p.x, p.y, -1.0f);
+ break;
+ }
+ return t.SampleLevel(s, float4(coord, cube), level);
+ }
+#endif
+ 0x43425844, 0xb8d5b94a, 0xdb4be034, 0x183aed19, 0xad4af415, 0x00000001, 0x00000328, 0x00000003,
+ 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49,
+ 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000028c, 0x00000041,
+ 0x000000a3, 0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300005a, 0x00106000,
+ 0x00000000, 0x04005058, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000,
+ 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0400004c, 0x0020800a,
+ 0x00000000, 0x00000000, 0x03000006, 0x00004001, 0x00000000, 0x05000036, 0x00100012, 0x00000000,
+ 0x00004001, 0x3f800000, 0x0a000038, 0x00100062, 0x00000000, 0x00101106, 0x00000000, 0x00004002,
+ 0x00000000, 0x3acccccd, 0x3b088889, 0x00000000, 0x01000002, 0x03000006, 0x00004001, 0x00000001,
+ 0x05000036, 0x00100012, 0x00000000, 0x00004001, 0xbf800000, 0x0a000038, 0x00100062, 0x00000000,
+ 0x00101106, 0x00000000, 0x00004002, 0x00000000, 0x3acccccd, 0x3b088889, 0x00000000, 0x01000002,
+ 0x03000006, 0x00004001, 0x00000002, 0x0a000038, 0x00100052, 0x00000000, 0x00101106, 0x00000000,
+ 0x00004002, 0x3acccccd, 0x00000000, 0x3b088889, 0x00000000, 0x05000036, 0x00100022, 0x00000000,
+ 0x00004001, 0x3f800000, 0x01000002, 0x03000006, 0x00004001, 0x00000003, 0x0a000038, 0x00100052,
+ 0x00000000, 0x00101106, 0x00000000, 0x00004002, 0x3acccccd, 0x00000000, 0x3b088889, 0x00000000,
+ 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0xbf800000, 0x01000002, 0x03000006, 0x00004001,
+ 0x00000004, 0x0a000038, 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd,
+ 0x3b088889, 0x00000000, 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0x3f800000,
+ 0x01000002, 0x0100000a, 0x0a000038, 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x00004002,
+ 0x3acccccd, 0x3b088889, 0x00000000, 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001,
+ 0xbf800000, 0x01000002, 0x01000017, 0x06000056, 0x00100032, 0x00000001, 0x00208a66, 0x00000000,
+ 0x00000000, 0x05000036, 0x00100082, 0x00000000, 0x0010000a, 0x00000001, 0x0b000048, 0x001020f2,
+ 0x00000000, 0x00100e46, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0010001a,
+ 0x00000001, 0x0100003e,
+ };
+ static const D3D12_SHADER_BYTECODE ps_cube_array = {ps_cube_array_code, sizeof(ps_cube_array_code)};
+ static const struct ps_test
+ {
+ const D3D12_SHADER_BYTECODE *ps;
+ unsigned int miplevel_count;
+ unsigned int array_size;
+ }
+ ps_tests[] =
+ {
+ {&ps_cube, 1, 6},
+ {&ps_cube, 2, 6},
+ {&ps_cube, 3, 6},
+
+ {&ps_cube_array, 1, 12},
+ {&ps_cube_array, 2, 12},
+ {&ps_cube_array, 3, 12},
+ };
+
+ memset(&desc, 0, sizeof(desc));
+ desc.rt_width = 640;
+ desc.rt_height = 480;
+ desc.rt_format = DXGI_FORMAT_R32_FLOAT;
+ desc.no_root_signature = true;
+ if (!init_test_context(&context, &desc))
+ return;
+ command_list = context.list;
+ queue = context.queue;
+
+ context.root_signature = create_texture_root_signature(context.device,
+ D3D12_SHADER_VISIBILITY_PIXEL, 3, 0);
+
+ init_pipeline_state_desc(&pso_desc, context.root_signature,
+ context.render_target_desc.Format, NULL, NULL, NULL);
+
+ heap = create_gpu_descriptor_heap(context.device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 1);
+ cpu_handle = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
+ gpu_handle = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap);
+
+ ps = NULL;
+ pso = NULL;
+ for (i = 0; i < ARRAY_SIZE(ps_tests); ++i)
+ {
+ const struct ps_test *test = &ps_tests[i];
+
+ if (ps != test->ps)
+ {
+ if (pso)
+ ID3D12PipelineState_Release(pso);
+
+ ps = test->ps;
+ pso_desc.PS = *test->ps;
+ hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc,
+ &IID_ID3D12PipelineState, (void **)&pso);
+ ok(hr == S_OK, "Failed to create graphics pipeline state, hr %#x.\n", hr);
+ }
+
+ texture = create_default_texture2d(context.device, texture_size, texture_size,
+ test->array_size, test->miplevel_count, DXGI_FORMAT_R32_FLOAT,
+ D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST);
+ srv_desc.Format = DXGI_FORMAT_R32_FLOAT;
+ srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+ if (ps == &ps_cube)
+ {
+ srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBE;
+ srv_desc.TextureCube.MostDetailedMip = 0;
+ srv_desc.TextureCube.MipLevels = test->miplevel_count;
+ srv_desc.TextureCube.ResourceMinLODClamp = 0.0f;
+ }
+ else
+ {
+ srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBEARRAY;
+ srv_desc.TextureCubeArray.MostDetailedMip = 0;
+ srv_desc.TextureCubeArray.MipLevels = test->miplevel_count;
+ srv_desc.TextureCubeArray.First2DArrayFace = 0;
+ srv_desc.TextureCubeArray.NumCubes = test->array_size / 6;
+ srv_desc.TextureCubeArray.ResourceMinLODClamp = 0.0f;
+ }
+ ID3D12Device_CreateShaderResourceView(context.device, texture, &srv_desc, cpu_handle);
+
+ sub_resource_count = test->array_size * test->miplevel_count;
+ texture_data = calloc(sub_resource_count, sizeof(*texture_data));
+ ok(texture_data, "Failed to allocate memory.\n");
+ for (sub_resource_idx = 0; sub_resource_idx < sub_resource_count; ++sub_resource_idx)
+ {
+ data = calloc(texture_size * texture_size, sizeof(*data));
+ ok(data, "Failed to allocate memory.\n");
+ for (j = 0; j < texture_size * texture_size; ++j)
+ data[j] = sub_resource_idx;
+
+ texture_data[sub_resource_idx].pData = data;
+ texture_data[sub_resource_idx].RowPitch = texture_size * sizeof(*data);
+ texture_data[sub_resource_idx].SlicePitch = 0;
+ }
+ upload_texture_data(texture, texture_data, sub_resource_count, queue, command_list);
+ for (sub_resource_idx = 0; sub_resource_idx < sub_resource_count; ++sub_resource_idx)
+ free((void *)texture_data[sub_resource_idx].pData);
+ free(texture_data);
+
+ reset_command_list(command_list, context.allocator);
+ transition_resource_state(command_list, texture,
+ D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
+
+ for (sub_resource_idx = 0; sub_resource_idx < sub_resource_count; ++sub_resource_idx)
+ {
+ constants.face = (sub_resource_idx / test->miplevel_count) % 6;
+ constants.level = sub_resource_idx % test->miplevel_count;
+ constants.cube = (sub_resource_idx / test->miplevel_count) / 6;
+
+ ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL);
+ ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL);
+ ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature);
+ ID3D12GraphicsCommandList_SetPipelineState(command_list, pso);
+ ID3D12GraphicsCommandList_SetDescriptorHeaps(command_list, 1, &heap);
+ ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(command_list, 0, gpu_handle);
+ ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(command_list, 1, 3, &constants.face, 0);
+ ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport);
+ ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect);
+ ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0);
+
+ transition_resource_state(command_list, context.render_target,
+ D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE);
+
+ check_sub_resource_float(context.render_target, 0, queue, command_list, sub_resource_idx, 0);
+
+ reset_command_list(command_list, context.allocator);
+ transition_resource_state(command_list, context.render_target,
+ D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET);
+ }
+
+ ID3D12Resource_Release(texture);
+ }
+ ID3D12PipelineState_Release(pso);
+
+ ID3D12DescriptorHeap_Release(heap);
+ destroy_test_context(&context);
+}
+
static void test_descriptor_tables(void)
{
ID3D12DescriptorHeap *heap, *sampler_heap, *heaps[2];
@@ -17380,6 +17684,7 @@ START_TEST(d3d12)
run_test(test_root_constants);
run_test(test_texture);
run_test(test_gather);
+ run_test(test_cube_maps);
run_test(test_descriptor_tables);
run_test(test_descriptor_tables_overlapping_bindings);
run_test(test_update_root_descriptors);
diff --git a/tests/vkd3d_d3d12_test.h b/tests/vkd3d_d3d12_test.h
index b4a9a442a5d2..2ebb58f997b3 100644
--- a/tests/vkd3d_d3d12_test.h
+++ b/tests/vkd3d_d3d12_test.h
@@ -318,11 +318,12 @@ static void check_sub_resource_uint_(unsigned int line, ID3D12Resource *texture,
release_resource_readback(&rb);
}
-#define create_texture(a, b, c, d, e) create_default_texture_(__LINE__, a, b, c, d, 0, e)
-#define create_default_texture(a, b, c, d, e, f) create_default_texture_(__LINE__, a, b, c, d, e, f)
-static ID3D12Resource *create_default_texture_(unsigned int line, ID3D12Device *device,
- unsigned int width, unsigned int height, DXGI_FORMAT format,
- D3D12_RESOURCE_FLAGS flags, D3D12_RESOURCE_STATES initial_state)
+#define create_default_texture(a, b, c, d, e, f) create_default_texture2d_(__LINE__, a, b, c, 1, 1, d, e, f)
+#define create_texture(a, b, c, d, e) create_default_texture(a, b, c, d, 0, e)
+#define create_default_texture2d(a, b, c, d, e, f, g, h) create_default_texture2d_(__LINE__, a, b, c, d, e, f, g, h)
+static ID3D12Resource *create_default_texture2d_(unsigned int line, ID3D12Device *device,
+ unsigned int width, unsigned int height, unsigned int array_size, unsigned int miplevel_count,
+ DXGI_FORMAT format, D3D12_RESOURCE_FLAGS flags, D3D12_RESOURCE_STATES initial_state)
{
D3D12_HEAP_PROPERTIES heap_properties;
D3D12_RESOURCE_DESC resource_desc;
@@ -336,8 +337,8 @@ static ID3D12Resource *create_default_texture_(unsigned int line, ID3D12Device *
resource_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
resource_desc.Width = width;
resource_desc.Height = height;
- resource_desc.DepthOrArraySize = 1;
- resource_desc.MipLevels = 1;
+ resource_desc.DepthOrArraySize = array_size;
+ resource_desc.MipLevels = miplevel_count;
resource_desc.Format = format;
resource_desc.SampleDesc.Count = 1;
resource_desc.Flags = flags;
--
2.16.4
June 27, 2018
[PATCH vkd3d 1/4] libs/vkd3d: Implement cube shader resource views.
by Józef Kucia
From: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
include/vkd3d_d3d12.idl | 2 +-
libs/vkd3d/resource.c | 43 +++++++++++++++++++++++++++++++++++++------
2 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index 5bfc76718873..ec7df5653faa 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -945,7 +945,7 @@ typedef struct D3D12_TEXCUBE_ARRAY_SRV
{
UINT MostDetailedMip;
UINT MipLevels;
- UINT First2DArraySlice;
+ UINT First2DArrayFace;
UINT NumCubes;
FLOAT ResourceMinLODClamp;
} D3D12_TEXCUBE_ARRAY_SRV;
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index e45c90083229..e1a5adf3364d 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -1150,6 +1150,7 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
struct d3d12_device *device, struct d3d12_resource *resource,
const D3D12_SHADER_RESOURCE_VIEW_DESC *desc)
{
+ uint32_t miplevel_idx, miplevel_count, layer_idx, layer_count;
const struct vkd3d_format *format;
VkImageViewType vk_view_type;
struct vkd3d_view *view;
@@ -1174,22 +1175,52 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
return;
}
- if (desc)
- FIXME("Unhandled SRV desc %p.\n", desc);
-
if (!(format = vkd3d_format_from_d3d12_resource_desc(&resource->desc, desc ? desc->Format : 0)))
{
FIXME("Failed to find format for %#x.\n", resource->desc.Format);
return;
}
+ vk_view_type = resource->desc.DepthOrArraySize > 1
+ ? VK_IMAGE_VIEW_TYPE_2D_ARRAY : VK_IMAGE_VIEW_TYPE_2D;
+ miplevel_idx = 0;
+ miplevel_count = VK_REMAINING_MIP_LEVELS;
+ layer_idx = 0;
+ layer_count = VK_REMAINING_ARRAY_LAYERS;
+ if (desc)
+ {
+ if (desc->Shader4ComponentMapping != D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING)
+ FIXME("Ignoring component mapping %#x.\n", desc->Shader4ComponentMapping);
+
+ switch (desc->ViewDimension)
+ {
+ case D3D12_SRV_DIMENSION_TEXTURECUBE:
+ vk_view_type = VK_IMAGE_VIEW_TYPE_CUBE;
+ miplevel_idx = desc->u.TextureCube.MostDetailedMip;
+ miplevel_count = desc->u.TextureCube.MipLevels;
+ layer_count = 6;
+ if (desc->u.TextureCube.ResourceMinLODClamp)
+ FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.TextureCube.ResourceMinLODClamp);
+ break;
+ case D3D12_SRV_DIMENSION_TEXTURECUBEARRAY:
+ vk_view_type = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
+ miplevel_idx = desc->u.TextureCubeArray.MostDetailedMip;
+ miplevel_count = desc->u.TextureCubeArray.MipLevels;
+ layer_idx = desc->u.TextureCubeArray.First2DArrayFace;
+ layer_count = 6 * desc->u.TextureCubeArray.NumCubes;
+ if (desc->u.TextureCubeArray.ResourceMinLODClamp)
+ FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.TextureCubeArray.ResourceMinLODClamp);
+ break;
+ default:
+ FIXME("Unhandled view dimension %#x.\n", desc->ViewDimension);
+ }
+ }
+
if (!(view = vkd3d_view_create()))
return;
- vk_view_type = resource->desc.DepthOrArraySize > 1
- ? VK_IMAGE_VIEW_TYPE_2D_ARRAY : VK_IMAGE_VIEW_TYPE_2D;
if (vkd3d_create_texture_view(device, resource, format, vk_view_type,
- 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS, true, &view->u.vk_image_view) < 0)
+ miplevel_idx, miplevel_count, layer_idx, layer_count, true, &view->u.vk_image_view) < 0)
{
vkd3d_free(view);
return;
--
2.16.4
June 27, 2018
[PATCH] include/d3d12: Fix typos.
by Józef Kucia
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
include/d3d12.idl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/d3d12.idl b/include/d3d12.idl
index 69220e674cd7..43e9c2dca3bb 100644
--- a/include/d3d12.idl
+++ b/include/d3d12.idl
@@ -944,7 +944,7 @@ typedef struct D3D12_TEXCUBE_ARRAY_SRV
{
UINT MostDetailedMip;
UINT MipLevels;
- UINT First2DArraySlice;
+ UINT First2DArrayFace;
UINT NumCubes;
FLOAT ResourceMinLODClamp;
} D3D12_TEXCUBE_ARRAY_SRV;
@@ -2172,7 +2172,7 @@ interface ID3D12RootSignatureDeserializer : IUnknown
ID3DBlob **blob, ID3DBlob **error_blob);
typedef HRESULT (__stdcall *PFN_D3D12_CREATE_DEVICE)(IUnknown *adapter,
- D3D_FEATURE_LEVEL minmum_feature_level, REFIID iid, void **device);
+ D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
[local] HRESULT __stdcall D3D12CreateDevice(IUnknown *adapter,
D3D_FEATURE_LEVEL minimum_feature_level, REFIID iid, void **device);
--
2.16.4
June 27, 2018
[PATCH v2] msvcp120: Add test for Concurrent_vector_Internal_resize and reverse.
by Piotr Caban
From: Hua Meng <161220092(a)smail.nju.edu.cn>
Signed-off-by: Hua meng <161220092(a)smail.nju.edu.cn>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
v2:
- added test for vector capacity after _Internal_reserve call
dlls/msvcp120/tests/msvcp120.c | 90
++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
June 27, 2018
[PATCH 5/5] schedsvc: Use current time as trigger begin time when necessary.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index b463be6960..a0e0727b31 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -170,6 +170,9 @@ static BOOL trigger_get_next_runtime(const TASK_TRIGGER *trigger, const FILETIME
FileTimeToSystemTime(current_ft, ¤t_st);
get_begin_time(trigger, &begin_ft);
+ if (CompareFileTime(&begin_ft, current_ft) < 0)
+ begin_ft = *current_ft;
+
get_end_time(trigger, &end_ft);
switch (trigger->TriggerType)
--
2.16.3
June 27, 2018
[PATCH 4/5] schedsvc: Avoid an infinite loop.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/schedsvc/atsvc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/schedsvc/atsvc.c b/dlls/schedsvc/atsvc.c
index df4185eac2..b463be6960 100644
--- a/dlls/schedsvc/atsvc.c
+++ b/dlls/schedsvc/atsvc.c
@@ -194,6 +194,9 @@ static BOOL trigger_get_next_runtime(const TASK_TRIGGER *trigger, const FILETIME
break;
case TASK_TIME_TRIGGER_DAILY:
+ if (!trigger->Type.Daily.DaysInterval)
+ break; /* avoid infinite loop */
+
st = current_st;
st.wHour = trigger->wStartHour;
st.wMinute = trigger->wStartMinute;
--
2.16.3
June 27, 2018