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 2022
- 68 participants
- 3274 messages
Re: [PATCH 2/3] d3dx10_43: Share all D3DX10CreateEffectFrom* implementations
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=117784
Your paranoid android.
=== debian11 (32 bit WoW report) ===
d3dx10_43:
Unhandled exception: assertion failed in 32-bit code (0xf7f52559).
June 28, 2022
[PATCH 3/3] d3dx10_43: Support creating effect from pre-built shader
by Andrew Eikum
From: Andrew Eikum <aeikum(a)codeweavers.com>
---
dlls/d3dx10_43/compiler.c | 34 +++++++++++++++++++++++-----------
dlls/d3dx10_43/tests/d3dx10.c | 18 +++++++++---------
2 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/dlls/d3dx10_43/compiler.c b/dlls/d3dx10_43/compiler.c
index a561cc0357f..46b7ecaac80 100644
--- a/dlls/d3dx10_43/compiler.c
+++ b/dlls/d3dx10_43/compiler.c
@@ -29,6 +29,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
+#define MAKE_TAG(ch0, ch1, ch2, ch3) \
+ ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \
+ ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
+#define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
HRESULT WINAPI D3DX10CreateEffectFromMemory(const void *data, SIZE_T datasize, const char *filename,
const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *profile,
@@ -46,19 +50,27 @@ HRESULT WINAPI D3DX10CreateEffectFromMemory(const void *data, SIZE_T datasize, c
if (pump)
FIXME("Asynchronous mode is not supported.\n");
- if (!include)
- include = D3D_COMPILE_STANDARD_FILE_INCLUDE;
-
- if (FAILED(hr = D3DCompile(data, datasize, filename, defines, include, "main", profile,
- shader_flags, effect_flags, &code, errors)))
+ if (datasize >= sizeof(DWORD) && ((const DWORD *)data)[0] == TAG_DXBC)
{
- WARN("Effect compilation failed, hr %#lx.\n", hr);
- return hr;
+ hr = D3D10CreateEffectFromMemory((char *)data, datasize,
+ effect_flags, device, effect_pool, effect);
+ }
+ else
+ {
+ if (!include)
+ include = D3D_COMPILE_STANDARD_FILE_INCLUDE;
+
+ if (FAILED(hr = D3DCompile(data, datasize, filename, defines, include, "main", profile,
+ shader_flags, effect_flags, &code, errors)))
+ {
+ WARN("Effect compilation failed, hr %#lx.\n", hr);
+ return hr;
+ }
+
+ hr = D3D10CreateEffectFromMemory(ID3D10Blob_GetBufferPointer(code), ID3D10Blob_GetBufferSize(code),
+ effect_flags, device, effect_pool, effect);
+ ID3D10Blob_Release(code);
}
-
- hr = D3D10CreateEffectFromMemory(ID3D10Blob_GetBufferPointer(code), ID3D10Blob_GetBufferSize(code),
- effect_flags, device, effect_pool, effect);
- ID3D10Blob_Release(code);
return hr;
}
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index 252e2a40ee8..ec14afce1bb 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -3586,9 +3586,9 @@ static void test_D3DX10CreateEffectFromResource(void)
hr = D3DX10CreateEffectFromResourceA(GetModuleHandleA(NULL), "fx_test_ecbt.fx", NULL,
NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
&errors, NULL);
- todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromResource failed: %#x\n", hr);
- todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
- todo_wine ok(effect != NULL, "No effect created\n");
+ ok(hr == S_OK, "D3DX10CreateEffectFromResource failed: %#x\n", hr);
+ ok(errors == NULL, "Got unexpected effect errors\n");
+ ok(effect != NULL, "No effect created\n");
if (errors)
ID3D10Blob_Release(errors);
if (effect)
@@ -3638,9 +3638,9 @@ static void test_D3DX10CreateEffectFromMemory(void)
hr = D3DX10CreateEffectFromMemory(fx_test_ecbt, fx_test_ecbt_size, NULL,
NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
&errors, NULL);
- todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromMemory failed: %#x\n", hr);
- todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
- todo_wine ok(effect != NULL, "No effect created\n");
+ ok(hr == S_OK, "D3DX10CreateEffectFromMemory failed: %#x\n", hr);
+ ok(errors == NULL, "Got unexpected effect errors\n");
+ ok(effect != NULL, "No effect created\n");
if (errors)
ID3D10Blob_Release(errors);
if (effect)
@@ -3695,9 +3695,9 @@ static void test_D3DX10CreateEffectFromFile(void)
hr = D3DX10CreateEffectFromFileW(path,
NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
&errors, NULL);
- todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromFile failed: %#x\n", hr);
- todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
- todo_wine ok(effect != NULL, "No effect created\n");
+ ok(hr == S_OK, "D3DX10CreateEffectFromFile failed: %#x\n", hr);
+ ok(errors == NULL, "Got unexpected effect errors\n");
+ ok(effect != NULL, "No effect created\n");
if (errors)
ID3D10Blob_Release(errors);
if (effect)
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/332
June 28, 2022
[PATCH 2/3] d3dx10_43: Share all D3DX10CreateEffectFrom* implementations
by Andrew Eikum
From: Andrew Eikum <aeikum(a)codeweavers.com>
---
dlls/d3dx10_43/compiler.c | 41 +++++++++++++++++++++++++++++----------
1 file changed, 31 insertions(+), 10 deletions(-)
diff --git a/dlls/d3dx10_43/compiler.c b/dlls/d3dx10_43/compiler.c
index c66eb679a8f..a561cc0357f 100644
--- a/dlls/d3dx10_43/compiler.c
+++ b/dlls/d3dx10_43/compiler.c
@@ -25,6 +25,7 @@
#include "d3dx10.h"
#include "d3dcompiler.h"
#include "dxhelpers.h"
+#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
@@ -67,7 +68,9 @@ HRESULT WINAPI D3DX10CreateEffectFromFileW(const WCHAR *filename, const D3D10_SH
ID3D10Device *device, ID3D10EffectPool *effect_pool, ID3DX10ThreadPump *pump,
ID3D10Effect **effect, ID3D10Blob **errors, HRESULT *hresult)
{
- ID3D10Blob *code;
+ char filename_a[MAX_PATH], *source = NULL;
+ DWORD source_size, read_size;
+ HANDLE file;
HRESULT hr;
TRACE("filename %s, defines %p, include %p, profile %s, shader_flags %#x, effect_flags %#x, "
@@ -78,20 +81,38 @@ HRESULT WINAPI D3DX10CreateEffectFromFileW(const WCHAR *filename, const D3D10_SH
if (pump)
FIXME("Asynchronous mode is not supported.\n");
- if (!include)
- include = D3D_COMPILE_STANDARD_FILE_INCLUDE;
+ file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (file == INVALID_HANDLE_VALUE)
+ return HRESULT_FROM_WIN32(GetLastError());
- if (FAILED(hr = D3DCompileFromFile(filename, defines, include, "main", profile, shader_flags,
- effect_flags, &code, errors)))
+ source_size = GetFileSize(file, NULL);
+ if (source_size == INVALID_FILE_SIZE)
{
- WARN("Effect compilation failed, hr %#lx.\n", hr);
- return hr;
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ goto end;
}
- hr = D3D10CreateEffectFromMemory(ID3D10Blob_GetBufferPointer(code), ID3D10Blob_GetBufferSize(code),
- effect_flags, device, effect_pool, effect);
- ID3D10Blob_Release(code);
+ if (!(source = heap_alloc(source_size)))
+ {
+ hr = E_OUTOFMEMORY;
+ goto end;
+ }
+
+ if (!ReadFile(file, source, source_size, &read_size, NULL) || read_size != source_size)
+ {
+ WARN("Failed to read file contents.\n");
+ hr = E_FAIL;
+ goto end;
+ }
+
+ WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, sizeof(filename_a), NULL, NULL);
+
+ hr = D3DX10CreateEffectFromMemory(source, source_size, filename_a, defines, include, profile,
+ shader_flags, effect_flags, device, effect_pool, pump, effect, errors, hresult);
+end:
+ heap_free(source);
+ CloseHandle(file);
return hr;
}
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/332
June 28, 2022
[PATCH 1/3] d3dx10_43: Add D3DX10CreateEffectFrom* tests
by Andrew Eikum
From: Andrew Eikum <aeikum(a)codeweavers.com>
---
dlls/d3dx10_43/tests/Makefile.in | 2 +
dlls/d3dx10_43/tests/d3dx10.c | 171 ++++++++++++++++++++++++-
dlls/d3dx10_43/tests/fx_test_ecbt.fx | Bin 0 -> 325 bytes
dlls/d3dx10_43/tests/fx_test_ecbt.hlsl | 10 ++
dlls/d3dx10_43/tests/resource.rc | 23 ++++
5 files changed, 204 insertions(+), 2 deletions(-)
create mode 100644 dlls/d3dx10_43/tests/fx_test_ecbt.fx
create mode 100644 dlls/d3dx10_43/tests/fx_test_ecbt.hlsl
create mode 100644 dlls/d3dx10_43/tests/resource.rc
diff --git a/dlls/d3dx10_43/tests/Makefile.in b/dlls/d3dx10_43/tests/Makefile.in
index 95078d0e12b..0759443ef3d 100644
--- a/dlls/d3dx10_43/tests/Makefile.in
+++ b/dlls/d3dx10_43/tests/Makefile.in
@@ -4,3 +4,5 @@ IMPORTS = d3dx10 ole32 gdi32
C_SRCS = \
d3dx10.c
+
+RC_SRCS = resource.rc
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
index 1c28a62b700..252e2a40ee8 100644
--- a/dlls/d3dx10_43/tests/d3dx10.c
+++ b/dlls/d3dx10_43/tests/d3dx10.c
@@ -942,6 +942,23 @@ static char *get_str_a(const WCHAR *wstr)
return buffer;
}
+BOOL load_resource(HMODULE module, const WCHAR *resource, void **data, DWORD *size)
+{
+ HGLOBAL hglobal;
+ HRSRC rsrc;
+
+ if (!(rsrc = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA)) ||
+ !(*size = SizeofResource(module, rsrc)) ||
+ !(hglobal = LoadResource(module, rsrc)) ||
+ !(*data = LockResource(hglobal)))
+ {
+ ok(0, "Failed to find resource.\n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
static BOOL create_file(const WCHAR *filename, const void *data, unsigned int size, WCHAR *out_path)
{
WCHAR path[MAX_PATH];
@@ -3543,10 +3560,11 @@ todo_wine {
ok(!refcount, "Unexpected refcount.\n");
}
-static void test_create_effect_from_resource(void)
+static void test_D3DX10CreateEffectFromResource(void)
{
ID3D10Device *device;
ID3D10Effect *effect;
+ ID3D10Blob *errors;
ULONG refcount;
HRESULT hr;
@@ -3556,10 +3574,157 @@ static void test_create_effect_from_resource(void)
return;
}
+ /* test resource that doesn't exist */
hr = D3DX10CreateEffectFromResourceA(GetModuleHandleA(NULL), "resource", NULL, NULL, NULL,
"fx_4_0", 0, 0, device, NULL, NULL, &effect, NULL, NULL);
ok(hr == D3DX10_ERR_INVALID_DATA, "Unexpected hr %#x.\n", hr);
+
+ /* test creating effect from pre-built DXBC shader */
+ errors = NULL;
+ effect = NULL;
+ hr = D3DX10CreateEffectFromResourceA(GetModuleHandleA(NULL), "fx_test_ecbt.fx", NULL,
+ NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
+ &errors, NULL);
+ todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromResource failed: %#x\n", hr);
+ todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
+ todo_wine ok(effect != NULL, "No effect created\n");
+ if (errors)
+ ID3D10Blob_Release(errors);
+ if (effect)
+ effect->lpVtbl->Release(effect);
+
+
+ /* test creating effect from source */
+ errors = NULL;
+ effect = NULL;
+ hr = D3DX10CreateEffectFromResourceA(GetModuleHandleA(NULL), "fx_test_ecbt.hlsl", NULL,
+ NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
+ &errors, NULL);
+ todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromResource failed: %#x\n", hr);
+ todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
+ todo_wine ok(effect != NULL, "No effect created\n");
+ if (errors)
+ ID3D10Blob_Release(errors);
+ if (effect)
+ effect->lpVtbl->Release(effect);
+
+
+ refcount = ID3D10Device_Release(device);
+ ok(!refcount, "Unexpected refcount.\n");
+}
+
+static void test_D3DX10CreateEffectFromMemory(void)
+{
+ DWORD fx_test_ecbt_size, fx_test_ecbt_src_size;
+ void *fx_test_ecbt, *fx_test_ecbt_src;
+ ID3D10Device *device;
+ ID3D10Effect *effect;
+ ID3D10Blob *errors;
+ ULONG refcount;
+ HRESULT hr;
+
+ if (!(device = create_device()))
+ {
+ skip("Failed to create device, skipping tests.\n");
+ return;
+ }
+
+ /* test creating effect from pre-built DXBC shader */
+ load_resource(GetModuleHandleA(NULL), L"fx_test_ecbt.fx", &fx_test_ecbt, &fx_test_ecbt_size);
+
+ errors = NULL;
+ effect = NULL;
+ hr = D3DX10CreateEffectFromMemory(fx_test_ecbt, fx_test_ecbt_size, NULL,
+ NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
+ &errors, NULL);
+ todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromMemory failed: %#x\n", hr);
+ todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
+ todo_wine ok(effect != NULL, "No effect created\n");
+ if (errors)
+ ID3D10Blob_Release(errors);
+ if (effect)
+ effect->lpVtbl->Release(effect);
+
+
+ /* test creating effect from source */
+ load_resource(GetModuleHandleA(NULL), L"fx_test_ecbt.hlsl", &fx_test_ecbt_src, &fx_test_ecbt_src_size);
+
+ errors = NULL;
+ effect = NULL;
+ hr = D3DX10CreateEffectFromMemory(fx_test_ecbt_src, fx_test_ecbt_src_size, NULL,
+ NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
+ &errors, NULL);
+ todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromMemory failed: %#x\n", hr);
+ todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
+ todo_wine ok(effect != NULL, "No effect created\n");
+ if (errors)
+ ID3D10Blob_Release(errors);
+ if (effect)
+ effect->lpVtbl->Release(effect);
+
+
+ refcount = ID3D10Device_Release(device);
+ ok(!refcount, "Unexpected refcount.\n");
+}
+
+static void test_D3DX10CreateEffectFromFile(void)
+{
+ DWORD fx_test_ecbt_size, fx_test_ecbt_src_size;
+ void *fx_test_ecbt, *fx_test_ecbt_src;
+ ID3D10Device *device;
+ ID3D10Effect *effect;
+ WCHAR path[MAX_PATH];
+ ID3D10Blob *errors;
+ ULONG refcount;
+ HRESULT hr;
+
+ if (!(device = create_device()))
+ {
+ skip("Failed to create device, skipping tests.\n");
+ return;
+ }
+
+ /* test creating effect from pre-built DXBC shader */
+ load_resource(GetModuleHandleA(NULL), L"fx_test_ecbt.fx", &fx_test_ecbt, &fx_test_ecbt_size);
+
+ create_file(L"fx_test_ecbt.fx", fx_test_ecbt, fx_test_ecbt_size, path);
+
+ errors = NULL;
+ effect = NULL;
+ hr = D3DX10CreateEffectFromFileW(path,
+ NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
+ &errors, NULL);
+ todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromFile failed: %#x\n", hr);
+ todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
+ todo_wine ok(effect != NULL, "No effect created\n");
+ if (errors)
+ ID3D10Blob_Release(errors);
+ if (effect)
+ effect->lpVtbl->Release(effect);
+ delete_file(L"fx_test_ecbt.fx");
+
+
+ /* test creating effect from source */
+ load_resource(GetModuleHandleA(NULL), L"fx_test_ecbt.hlsl", &fx_test_ecbt_src, &fx_test_ecbt_src_size);
+
+ create_file(L"fx_test_ecbt.hlsl", fx_test_ecbt_src, fx_test_ecbt_src_size, path);
+
+ errors = NULL;
+ effect = NULL;
+ hr = D3DX10CreateEffectFromFileW(path,
+ NULL, NULL, "fx_4_0", 0x0, 0x0, device, NULL, NULL, &effect,
+ &errors, NULL);
+ todo_wine ok(hr == S_OK, "D3DX10CreateEffectFromFile failed: %#x\n", hr);
+ todo_wine ok(errors == NULL, "Got unexpected effect errors\n");
+ todo_wine ok(effect != NULL, "No effect created\n");
+ if (errors)
+ ID3D10Blob_Release(errors);
+ if (effect)
+ effect->lpVtbl->Release(effect);
+ delete_file(L"fx_test_ecbt.hlsl");
+
+
refcount = ID3D10Device_Release(device);
ok(!refcount, "Unexpected refcount.\n");
}
@@ -3576,5 +3741,7 @@ START_TEST(d3dx10)
test_create_texture();
test_font();
test_sprite();
- test_create_effect_from_resource();
+ test_D3DX10CreateEffectFromResource();
+ test_D3DX10CreateEffectFromMemory();
+ test_D3DX10CreateEffectFromFile();
}
diff --git a/dlls/d3dx10_43/tests/fx_test_ecbt.fx b/dlls/d3dx10_43/tests/fx_test_ecbt.fx
new file mode 100644
index 0000000000000000000000000000000000000000..5996abb2d3d194f97aec71862e4e18af9e192749
GIT binary patch
literal 325
zcmZ>XaB{xa^SfrM?i)iVh5(Cn9^;ja3=9meKmtUo0I^$yp(a)AfbFYx~#6Ohjg#Mpo*
zHbFdM$w>@pIr)ht4D3KfAj?321&9TpG$$tmLz*E&a9DhRf3RnWr(a)tRVnh}GuzmI>A
z0Yh?<5ks0WTs=rH$Z;@pG=XehAl3n5bYKA#0LfVcF~~k--~{9tKm}lCfw*o!4AKJv
J3SbhU7XXq|7`p%f
literal 0
HcmV?d00001
diff --git a/dlls/d3dx10_43/tests/fx_test_ecbt.hlsl b/dlls/d3dx10_43/tests/fx_test_ecbt.hlsl
new file mode 100644
index 00000000000..24581832dc3
--- /dev/null
+++ b/dlls/d3dx10_43/tests/fx_test_ecbt.hlsl
@@ -0,0 +1,10 @@
+cbuffer cb : register(b1)
+{
+ float f1 : SV_POSITION;
+ float f2 : COLOR0;
+};
+
+cbuffer cb2 : register(b0)
+{
+ float f3 : packoffset(c2);
+};
diff --git a/dlls/d3dx10_43/tests/resource.rc b/dlls/d3dx10_43/tests/resource.rc
new file mode 100644
index 00000000000..e8c04cc15e6
--- /dev/null
+++ b/dlls/d3dx10_43/tests/resource.rc
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2022 Andrew Eikum for CodeWeavers
+ *
+ * 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
+ */
+
+/* @makedep: fx_test_ecbt.fx */
+fx_test_ecbt.fx RCDATA fx_test_ecbt.fx
+
+/* @makedep: fx_test_ecbt.hlsl */
+fx_test_ecbt.hlsl RCDATA fx_test_ecbt.hlsl
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/332
June 28, 2022
[PATCH 0/3] MR332: d3dx10: Support creating effect from pre-built shader
by Andrew Eikum (@aeikum)
Note this will probably fail on the testbot due to #53201 without Piotr's series !272 .
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/332
June 28, 2022
Re: [PATCH] comctl32: Add partial support for LVM_SETBKIMAGE.
by Dmitry Timoshkov
Zhiyi Zhang <zzhang(a)codeweavers.com> wrote:
> >>>>>>>>> Also, I found LVM_SETBKIMAGE is acting a bit weird on Windows. For example,
> >>>>>>>>> if a LVM_SETBKIMAGE message trying to set a bitmap
> >>>>>>>>> is sent the second time. The second message returns FALSE and the background
> >>>>>>>>> image gets reset to none(from LVM_GETBKIMAGE). I don't know if we should
> >>>>>>>>> implement such a behavior but I would be more comfortable with some tests.
> >>>>>>>> According to my testing LVM_SETBKIMAGE always returns 0.
> >>>>>>> If LVM_SETBKIMAGE for a bitmap succeeds, it does return TRUE.
> >>>>>> Where do you see this? In my tests LVM_SETBKIMAGE always returns 0:
> >>>>>> https://testbot.winehq.org/JobDetails.pl?Key=116659
> >>>>> You're only testing with comctl32 v5. Please see https://testbot.winehq.org/JobDetails.pl?Key=116666&f204=exe32.report#k204
> >>>> Thanks. Do you think it's really necessary to change return value for the v6 case?
> >>>>
> >>> Yes, I think it's necessary. I don't think comctl32 v5 support LVM_SETBKIMAGE at all. The FALSE is probably from DefWindowProc().
> >> I don't think that explains destroying the bitmap on the 2nd call. It looks
> >> like v5 really supports LVM_SETBKIMAGE, and the only difference in v6 is
> >> the return value.
> > Is there anything else that should be addressed in this patch?
> >
> I see. No. I sent a v4 https://source.winehq.org/patches/data/238807.
The patch seems to be ignored, could you please take care of it?
Thanks.
--
Dmitry.
June 28, 2022
Re: [PATCH v2 2/2] winealsa.drv: Set device path for all devices.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=117775
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: po/ar.po:68
error: patch failed: po/ast.po:67
error: patch failed: po/bg.po:67
error: patch failed: po/ca.po:66
error: patch failed: po/cs.po:71
error: patch failed: po/da.po:70
error: patch failed: po/de.po:65
error: patch failed: po/el.po:64
error: patch failed: po/en.po:64
error: patch failed: po/en_US.po:64
error: patch failed: po/eo.po:75
error: patch failed: po/es.po:65
error: patch failed: po/fa.po:62
error: patch failed: po/fi.po:63
error: patch failed: po/fr.po:64
error: patch failed: po/he.po:76
error: patch failed: po/hi.po:61
error: patch failed: po/hr.po:70
error: patch failed: po/hu.po:70
error: patch failed: po/it.po:75
error: patch failed: po/ja.po:65
error: patch failed: po/ko.po:63
error: patch failed: po/lt.po:66
error: patch failed: po/ml.po:65
error: patch failed: po/nb_NO.po:65
error: patch failed: po/nl.po:64
error: patch failed: po/or.po:61
error: patch failed: po/pa.po:61
error: patch failed: po/pl.po:69
error: patch failed: po/pt_BR.po:65
error: patch failed: po/pt_PT.po:81
error: patch failed: po/rm.po:62
error: patch failed: po/ro.po:70
error: patch failed: po/ru.po:71
error: patch failed: po/si.po:72
error: patch failed: po/sk.po:75
error: patch failed: po/sl.po:75
error: patch failed: po/sr_RS(a)cyrillic.po:70
error: patch failed: po/sr_RS(a)latin.po:70
error: patch failed: po/sv.po:71
error: patch failed: po/ta.po:63
error: patch failed: po/te.po:61
error: patch failed: po/th.po:65
error: patch failed: po/tr.po:72
error: patch failed: po/uk.po:63
error: patch failed: po/wa.po:63
error: patch failed: po/wine.pot:56
error: patch failed: po/zh_CN.po:62
error: patch failed: po/zh_TW.po:62
error: patch failed: programs/regedit/edit.c:86
error: patch failed: programs/regedit/framewnd.c:158
error: patch failed: programs/regedit/listview.c:245
error: patch failed: programs/regedit/regedit.rc:48
error: patch failed: programs/regedit/resource.h:146
Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: po/ar.po:68
error: patch failed: po/ast.po:67
error: patch failed: po/bg.po:67
error: patch failed: po/ca.po:66
error: patch failed: po/cs.po:71
error: patch failed: po/da.po:70
error: patch failed: po/de.po:65
error: patch failed: po/el.po:64
error: patch failed: po/en.po:64
error: patch failed: po/en_US.po:64
error: patch failed: po/eo.po:75
error: patch failed: po/es.po:65
error: patch failed: po/fa.po:62
error: patch failed: po/fi.po:63
error: patch failed: po/fr.po:64
error: patch failed: po/he.po:76
error: patch failed: po/hi.po:61
error: patch failed: po/hr.po:70
error: patch failed: po/hu.po:70
error: patch failed: po/it.po:75
error: patch failed: po/ja.po:65
error: patch failed: po/ko.po:63
error: patch failed: po/lt.po:66
error: patch failed: po/ml.po:65
error: patch failed: po/nb_NO.po:65
error: patch failed: po/nl.po:64
error: patch failed: po/or.po:61
error: patch failed: po/pa.po:61
error: patch failed: po/pl.po:69
error: patch failed: po/pt_BR.po:65
error: patch failed: po/pt_PT.po:81
error: patch failed: po/rm.po:62
error: patch failed: po/ro.po:70
error: patch failed: po/ru.po:71
error: patch failed: po/si.po:72
error: patch failed: po/sk.po:75
error: patch failed: po/sl.po:75
error: patch failed: po/sr_RS(a)cyrillic.po:70
error: patch failed: po/sr_RS(a)latin.po:70
error: patch failed: po/sv.po:71
error: patch failed: po/ta.po:63
error: patch failed: po/te.po:61
error: patch failed: po/th.po:65
error: patch failed: po/tr.po:72
error: patch failed: po/uk.po:63
error: patch failed: po/wa.po:63
error: patch failed: po/wine.pot:56
error: patch failed: po/zh_CN.po:62
error: patch failed: po/zh_TW.po:62
error: patch failed: programs/regedit/edit.c:86
error: patch failed: programs/regedit/framewnd.c:158
error: patch failed: programs/regedit/listview.c:245
error: patch failed: programs/regedit/regedit.rc:48
error: patch failed: programs/regedit/resource.h:146
Task: Patch failed to apply
June 28, 2022
Re: [PATCH v2 0/2] MR325: pulse/alsa: Set device path for all devices
by Arek Hiler (@ivyl)
On Tue Jun 28 13:53:45 2022 +0000, Arek Hiler wrote:
> changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/325/diffs?diff_id=3536&start_sha=954f0526a68115214677e66c1bf8f8fbdfa6bce8#fe57e8f6c5922cbec0bd8abda9ed5f8e82a50895_2383_2382)
accidental leftover from testing, removed
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/325#note_2865
June 28, 2022
[PATCH v2 2/2] winealsa.drv: Set device path for all devices.
by Arkadiusz Hiler
From: Arkadiusz Hiler <ahiler(a)codeweavers.com>
Signed-off-by: Arkadiusz Hiler <ahiler(a)codeweavers.com>
---
dlls/winealsa.drv/alsa.c | 74 ++++++++++++++++++----------------------
1 file changed, 33 insertions(+), 41 deletions(-)
diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c
index b91606603a2..8439262428f 100644
--- a/dlls/winealsa.drv/alsa.c
+++ b/dlls/winealsa.drv/alsa.c
@@ -2318,21 +2318,21 @@ static NTSTATUS get_prop_value(void *args)
if(IsEqualPropertyKey(*prop, devicepath_key))
{
+ enum AudioDeviceConnectionType connection = AudioDeviceConnectionType_Unknown;
+ USHORT vendor_id = 0, product_id = 0;
char uevent[MAX_PATH];
- FILE *fuevent;
+ FILE *fuevent = NULL;
int card, device;
+ UINT serial_number;
+ char buf[128];
+ int len;
- /* only implemented for identifiable devices, i.e. not "default" */
- if(!sscanf(name, "plughw:%u,%u", &card, &device)){
- params->result = E_NOTIMPL;
- return STATUS_SUCCESS;
+ if(sscanf(name, "plughw:%u,%u", &card, &device)){
+ sprintf(uevent, "/sys/class/sound/card%u/device/uevent", card);
+ fuevent = fopen(uevent, "r");
}
- sprintf(uevent, "/sys/class/sound/card%u/device/uevent", card);
- fuevent = fopen(uevent, "r");
if(fuevent){
- enum AudioDeviceConnectionType connection = AudioDeviceConnectionType_Unknown;
- USHORT vendor_id = 0, product_id = 0;
char line[256];
while (fgets(line, sizeof(line), fuevent)) {
@@ -2365,41 +2365,33 @@ static NTSTATUS get_prop_value(void *args)
}
fclose(fuevent);
+ }
- if(connection == AudioDeviceConnectionType_USB || connection == AudioDeviceConnectionType_PCI){
- UINT serial_number;
- char buf[128];
- int len;
-
- /* As hardly any audio devices have serial numbers, Windows instead
- appears to use a persistent random number. We emulate this here
- by instead using the last 8 hex digits of the GUID. */
- serial_number = (guid->Data4[4] << 24) | (guid->Data4[5] << 16) | (guid->Data4[6] << 8) | guid->Data4[7];
-
- if(connection == AudioDeviceConnectionType_USB)
- sprintf(buf, "{1}.USB\\VID_%04X&PID_%04X\\%u&%08X",
- vendor_id, product_id, device, serial_number);
- else /* AudioDeviceConnectionType_PCI */
- sprintf(buf, "{1}.HDAUDIO\\FUNC_01&VEN_%04X&DEV_%04X\\%u&%08X",
- vendor_id, product_id, device, serial_number);
-
- len = strlen(buf) + 1;
- if(*params->buffer_size < len * sizeof(WCHAR)){
- params->result = E_NOT_SUFFICIENT_BUFFER;
- *params->buffer_size = len * sizeof(WCHAR);
- return STATUS_SUCCESS;
- }
- out->vt = VT_LPWSTR;
- out->pwszVal = params->buffer;
- ntdll_umbstowcs(buf, len, out->pwszVal, len);
- params->result = S_OK;
- return STATUS_SUCCESS;
- }
- }else{
- WARN("Could not open %s for reading\n", uevent);
- params->result = E_NOTIMPL;
+ /* As hardly any audio devices have serial numbers, Windows instead
+ appears to use a persistent random number. We emulate this here
+ by instead using the last 8 hex digits of the GUID. */
+ serial_number = (guid->Data4[4] << 24) | (guid->Data4[5] << 16) | (guid->Data4[6] << 8) | guid->Data4[7];
+
+ if(connection == AudioDeviceConnectionType_USB)
+ sprintf(buf, "{1}.USB\\VID_%04X&PID_%04X\\%u&%08X",
+ vendor_id, product_id, device, serial_number);
+ else if (connection == AudioDeviceConnectionType_PCI)
+ sprintf(buf, "{1}.HDAUDIO\\FUNC_01&VEN_%04X&DEV_%04X\\%u&%08X",
+ vendor_id, product_id, device, serial_number);
+ else
+ sprintf(buf, "{1}.ROOT\\MEDIA\\%04u", serial_number & 0x1FF);
+
+ len = strlen(buf) + 1;
+ if(*params->buffer_size < len * sizeof(WCHAR)){
+ params->result = E_NOT_SUFFICIENT_BUFFER;
+ *params->buffer_size = len * sizeof(WCHAR);
return STATUS_SUCCESS;
}
+ out->vt = VT_LPWSTR;
+ out->pwszVal = params->buffer;
+ ntdll_umbstowcs(buf, len, out->pwszVal, len);
+ params->result = S_OK;
+ return STATUS_SUCCESS;
} else if (flow != eCapture && IsEqualPropertyKey(*prop, PKEY_AudioEndpoint_PhysicalSpeakers)) {
unsigned int num_speakers, card, device;
char hwname[255];
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/325
June 28, 2022
[PATCH v2 1/2] winepulse.drv: Set device path for all devices.
by Arkadiusz Hiler
From: Arkadiusz Hiler <ahiler(a)codeweavers.com>
Signed-off-by: Arkadiusz Hiler <ahiler(a)codeweavers.com>
---
dlls/winepulse.drv/pulse.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c
index 0e504b6b6dd..42d73db45f9 100644
--- a/dlls/winepulse.drv/pulse.c
+++ b/dlls/winepulse.drv/pulse.c
@@ -2207,27 +2207,26 @@ static BOOL get_device_path(PhysDevice *dev, struct get_prop_value_params *param
{
const GUID *guid = params->guid;
UINT serial_number;
- const char *fmt;
char path[128];
int len;
+ /* As hardly any audio devices have serial numbers, Windows instead
+ appears to use a persistent random number. We emulate this here
+ by instead using the last 8 hex digits of the GUID. */
+ serial_number = (guid->Data4[4] << 24) | (guid->Data4[5] << 16) | (guid->Data4[6] << 8) | guid->Data4[7];
+
switch (dev->bus_type) {
case phys_device_bus_pci:
- fmt = "{1}.HDAUDIO\\FUNC_01&VEN_%04X&DEV_%04X\\%u&%08X";
+ len = sprintf(path, "{1}.HDAUDIO\\FUNC_01&VEN_%04X&DEV_%04X\\%u&%08X", dev->vendor_id, dev->product_id, dev->index, serial_number);
break;
case phys_device_bus_usb:
- fmt = "{1}.USB\\VID_%04X&PID_%04X\\%u&%08X";
+ len = sprintf(path, "{1}.USB\\VID_%04X&PID_%04X\\%u&%08X", dev->vendor_id, dev->product_id, dev->index, serial_number);
break;
default:
- return FALSE;
+ len = sprintf(path, "{1}.ROOT\\MEDIA\\%04u", dev->index);
+ break;
}
- /* As hardly any audio devices have serial numbers, Windows instead
- appears to use a persistent random number. We emulate this here
- by instead using the last 8 hex digits of the GUID. */
- serial_number = (guid->Data4[4] << 24) | (guid->Data4[5] << 16) | (guid->Data4[6] << 8) | guid->Data4[7];
-
- len = sprintf(path, fmt, dev->vendor_id, dev->product_id, dev->index, serial_number);
ntdll_umbstowcs(path, len + 1, params->wstr, ARRAY_SIZE(params->wstr));
params->vt = VT_LPWSTR;
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/325
June 28, 2022