winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
July 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
712 discussions
Start a n
N
ew thread
Detlef Riekenberg : wer: Add a stub for WerReportAddFile.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 36e7fd09ee05cfd20da2d7e042a555655f4c96f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36e7fd09ee05cfd20da2d7e04…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed Jul 25 00:19:53 2012 +0200 wer: Add a stub for WerReportAddFile. --- dlls/wer/main.c | 23 +++++++++++++++++++++++ dlls/wer/wer.spec | 2 +- include/werapi.h | 11 +++++++++++ 3 files changed, 35 insertions(+), 1 deletions(-) diff --git a/dlls/wer/main.c b/dlls/wer/main.c index 0f5ad54..a01479c 100644 --- a/dlls/wer/main.c +++ b/dlls/wer/main.c @@ -199,6 +199,29 @@ HRESULT WINAPI WerReportAddDump(HREPORT hReportHandle, HANDLE hProcess, HANDLE h } /*********************************************************************** + * WerReportAddFile (wer.@) + * + * Add File to a error report handle. + * + * PARAMS + * hreport [i] error reporting handle to add the file + * path [i] path to the file to add + * type [i] type of the file to add + * flags [i] flags for the file + * + * RETURNS + * Success: S_OK + * Failure: A HRESULT error code + * + */ +HRESULT WINAPI WerReportAddFile(HREPORT hreport, PCWSTR path, WER_FILE_TYPE type, DWORD flags) +{ + FIXME("(%p, %s, %d, 0x%x) :stub\n", hreport, debugstr_w(path), type, flags); + + return S_OK; +} + +/*********************************************************************** * WerReportCloseHandle (wer.@) * * Close an error reporting handle and free associated resources diff --git a/dlls/wer/wer.spec b/dlls/wer/wer.spec index fe9fad7..e4cef3b 100644 --- a/dlls/wer/wer.spec +++ b/dlls/wer/wer.spec @@ -64,7 +64,7 @@ @ stdcall WerAddExcludedApplication(wstr long) @ stdcall WerRemoveExcludedApplication(wstr long) @ stdcall WerReportAddDump(ptr ptr ptr long ptr ptr long) -@ stub WerReportAddFile +@ stdcall WerReportAddFile(ptr wstr long long) @ stdcall WerReportCloseHandle(ptr) @ stdcall WerReportCreate(wstr long ptr ptr) @ stdcall WerReportSetParameter(ptr long wstr wstr) diff --git a/include/werapi.h b/include/werapi.h index c709dad..6c3bb24 100644 --- a/include/werapi.h +++ b/include/werapi.h @@ -70,6 +70,16 @@ typedef enum _WER_CONSENT WerConsentMax } WER_CONSENT; +typedef enum _WER_FILE_TYPE +{ + WerFileTypeMicrodump = 1, + WerFileTypeMinidump, + WerFileTypeHeapdump, + WerFileTypeUserDocument, + WerFileTypeOther, + WerFileTypeMax +} WER_FILE_TYPE; + typedef enum _WER_REGISTER_FILE_TYPE { WerRegFileTypeUserDocument = 1, @@ -166,6 +176,7 @@ typedef struct _WER_EXCEPTION_INFORMATION HRESULT WINAPI WerAddExcludedApplication(PCWSTR, BOOL); HRESULT WINAPI WerRegisterFile(PCWSTR file, WER_REGISTER_FILE_TYPE regfiletype, DWORD flags); HRESULT WINAPI WerRemoveExcludedApplication(PCWSTR, BOOL); +HRESULT WINAPI WerReportAddFile(HREPORT, PCWSTR, WER_FILE_TYPE, DWORD); HRESULT WINAPI WerReportCloseHandle(HREPORT); HRESULT WINAPI WerReportCreate(PCWSTR, WER_REPORT_TYPE, PWER_REPORT_INFORMATION, HREPORT*); HRESULT WINAPI WerReportSetParameter(HREPORT, DWORD, PCWSTR, PCWSTR);
1
0
0
0
Detlef Riekenberg : wer: Return S_OK from WerReportSetParameter.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 169533def258c0db22a598db3d2a322acac43125 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=169533def258c0db22a598db3…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed Jul 25 00:19:52 2012 +0200 wer: Return S_OK from WerReportSetParameter. --- dlls/wer/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wer/main.c b/dlls/wer/main.c index 78943eb..0f5ad54 100644 --- a/dlls/wer/main.c +++ b/dlls/wer/main.c @@ -315,7 +315,7 @@ HRESULT WINAPI WerReportSetParameter(HREPORT hreport, DWORD id, PCWSTR name, PCW { FIXME("(%p, %d, %s, %s) :stub\n", hreport, id, debugstr_w(name), debugstr_w(value)); - return E_NOTIMPL; + return S_OK; } /***********************************************************************
1
0
0
0
Detlef Riekenberg : apphelp/tests: Add tests for ApphelpCheckShellObject.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 084e33d2541e80d20d2a636f9a54d73a26ee8a7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=084e33d2541e80d20d2a636f9…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed Jul 25 00:10:40 2012 +0200 apphelp/tests: Add tests for ApphelpCheckShellObject. --- configure | 1 + configure.ac | 1 + dlls/apphelp/tests/Makefile.in | 7 +++ dlls/apphelp/tests/apphelp.c | 116 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 0cc7ae6..c4e70d5 100755 --- a/configure +++ b/configure @@ -15057,6 +15057,7 @@ wine_fn_config_test dlls/advpack/tests advpack_test wine_fn_config_dll amstream enable_amstream wine_fn_config_test dlls/amstream/tests amstream_test wine_fn_config_dll apphelp enable_apphelp +wine_fn_config_test dlls/apphelp/tests apphelp_test wine_fn_config_dll appwiz.cpl enable_appwiz_cpl po wine_fn_config_dll atl enable_atl implib wine_fn_config_test dlls/atl/tests atl_test diff --git a/configure.ac b/configure.ac index aa2b026..a46a1af 100644 --- a/configure.ac +++ b/configure.ac @@ -2462,6 +2462,7 @@ WINE_CONFIG_TEST(dlls/advpack/tests) WINE_CONFIG_DLL(amstream) WINE_CONFIG_TEST(dlls/amstream/tests) WINE_CONFIG_DLL(apphelp) +WINE_CONFIG_TEST(dlls/apphelp/tests) WINE_CONFIG_DLL(appwiz.cpl,,[po]) WINE_CONFIG_DLL(atl,,[implib]) WINE_CONFIG_TEST(dlls/atl/tests) diff --git a/dlls/apphelp/tests/Makefile.in b/dlls/apphelp/tests/Makefile.in new file mode 100644 index 0000000..0fb6ef6 --- /dev/null +++ b/dlls/apphelp/tests/Makefile.in @@ -0,0 +1,7 @@ +TESTDLL = apphelp.dll +IMPORTS = ole32 + +C_SRCS = \ + apphelp.c + +@MAKE_TEST_RULES@ diff --git a/dlls/apphelp/tests/apphelp.c b/dlls/apphelp/tests/apphelp.c new file mode 100644 index 0000000..5b5670c --- /dev/null +++ b/dlls/apphelp/tests/apphelp.c @@ -0,0 +1,116 @@ +/* + * Copyright 2012 Detlef Riekenberg + * + * 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 + */ + +#define COBJMACROS + +#include <stdarg.h> +#include <stdio.h> +#include <initguid.h> +#include <exdisp.h> +#include <shlobj.h> +#include <urlmon.h> + +#include "wine/test.h" + +static HMODULE hdll; +static BOOL (WINAPI *pApphelpCheckShellObject)(REFCLSID, BOOL, ULONGLONG *); + +DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); + +DEFINE_GUID(test_Microsoft_Browser_Architecture, 0xa5e46e3a, 0x8849, 0x11d1, 0x9d, 0x8c, 0x00, 0xc0, 0x4f, 0xc9, 0x9d, 0x61); +DEFINE_GUID(CLSID_MenuBand, 0x5b4dae26, 0xb807, 0x11d0, 0x98, 0x15, 0x00, 0xc0, 0x4f, 0xd9, 0x19, 0x72); +DEFINE_GUID(test_UserAssist, 0xdd313e04, 0xfeff, 0x11d1, 0x8e, 0xcd, 0x00, 0x00, 0xf8, 0x7a, 0x47, 0x0c); + +static const CLSID * objects[] = { + &GUID_NULL, + /* used by IE */ + &test_Microsoft_Browser_Architecture, + &CLSID_MenuBand, + &CLSID_ShellLink, + &CLSID_ShellWindows, + &CLSID_InternetSecurityManager, + &test_UserAssist, + NULL,}; + +static const char *debugstr_guid(REFIID riid) +{ + static char buf[50]; + + sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], + riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], + riid->Data4[5], riid->Data4[6], riid->Data4[7]); + + return buf; +} + +static void test_ApphelpCheckShellObject(void) +{ + ULONGLONG flags; + BOOL res; + int i; + + if (!pApphelpCheckShellObject) + { + win_skip("ApphelpCheckShellObject not available\n"); + return; + } + + for (i = 0; objects[i]; i++) + { + flags = 0xdeadbeef; + SetLastError(0xdeadbeef); + res = pApphelpCheckShellObject(objects[i], FALSE, &flags); + ok(res && (flags == 0), "%s 0: got %d and 0x%x%08x with 0x%x (expected TRUE and 0)\n", + debugstr_guid(objects[i]), res, (ULONG)(flags >> 32), (ULONG)flags, GetLastError()); + + flags = 0xdeadbeef; + SetLastError(0xdeadbeef); + res = pApphelpCheckShellObject(objects[i], TRUE, &flags); + ok(res && (flags == 0), "%s 1: got %d and 0x%x%08x with 0x%x (expected TRUE and 0)\n", + debugstr_guid(objects[i]), res, (ULONG)(flags >> 32), (ULONG)flags, GetLastError()); + + } + + /* NULL as pointer to flags is checked */ + SetLastError(0xdeadbeef); + res = pApphelpCheckShellObject(&GUID_NULL, FALSE, NULL); + ok(res, "%s 0: got %d with 0x%x (expected != FALSE)\n", debugstr_guid(&GUID_NULL), res, GetLastError()); + + /* NULL as CLSID* crash on Windows */ + if (0) + { + flags = 0xdeadbeef; + SetLastError(0xdeadbeef); + res = pApphelpCheckShellObject(NULL, FALSE, &flags); + trace("NULL as CLSID*: got %d and 0x%x%08x with 0x%x\n", res, (ULONG)(flags >> 32), (ULONG)flags, GetLastError()); + } +} + +START_TEST(apphelp) +{ + + hdll = LoadLibrary("apphelp.dll"); + if (!hdll) { + win_skip("apphelp.dll not available\n"); + return; + } + pApphelpCheckShellObject = (void *) GetProcAddress(hdll, "ApphelpCheckShellObject"); + + test_ApphelpCheckShellObject(); +}
1
0
0
0
Francois Gouget : msvcp90: Make num_put__Iput() static.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: e6b44441072bb448bd8a775c131f2f409423bc2e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6b44441072bb448bd8a775c1…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jul 25 11:09:57 2012 +0200 msvcp90: Make num_put__Iput() static. --- dlls/msvcp90/locale.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 8e1c425..9cbf72c 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -7320,7 +7320,7 @@ char* __cdecl num_put_wchar__Ifmt(const num_put *this, char *fmt, const char *sp return fmt; } -ostreambuf_iterator_wchar* __cdecl num_put__Iput(const num_put *this, ostreambuf_iterator_wchar *ret, +static ostreambuf_iterator_wchar* __cdecl num_put__Iput(const num_put *this, ostreambuf_iterator_wchar *ret, ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, MSVCP_size_t count, numpunct_wchar *numpunct) {
1
0
0
0
Francois Gouget : kernel32/tests: Use NULL instead of casting 0.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: b193b0b7a803b71a97ea9ab1e5a9374d010be9e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b193b0b7a803b71a97ea9ab1e…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jul 25 11:09:53 2012 +0200 kernel32/tests: Use NULL instead of casting 0. --- dlls/kernel32/tests/sync.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c index 6e55381..ed30e26 100644 --- a/dlls/kernel32/tests/sync.c +++ b/dlls/kernel32/tests/sync.c @@ -1183,7 +1183,7 @@ static void test_initonce(void) ret = pInitOnceExecuteOnce(&initonce, initonce_callback, (void*)0xdeadbeef, &g_initctxt); ok(ret, "got wrong ret value %d\n", ret); ok(initonce.Ptr == (void*)0x2, "got %p\n", initonce.Ptr); - ok(g_initctxt == (void*)0, "got %p\n", g_initctxt); + ok(g_initctxt == NULL, "got %p\n", g_initctxt); ok(!g_initcallback_called, "got %d\n", g_initcallback_called); pInitOnceInitialize(&initonce);
1
0
0
0
Dmitry Timoshkov : windowscodecs: Do not assume that vtable is the first element of the object, avoid not necessary casts.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 2a08532cfb1ab68b92d14addd791eedfbbaf6b86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a08532cfb1ab68b92d14addd…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Jul 25 11:25:35 2012 +0900 windowscodecs: Do not assume that vtable is the first element of the object, avoid not necessary casts. --- dlls/windowscodecs/icoformat.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index 48a5c95..047c25a 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -95,7 +95,7 @@ static HRESULT WINAPI IcoFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface IsEqualIID(&IID_IWICBitmapSource, iid) || IsEqualIID(&IID_IWICBitmapFrameDecode, iid)) { - *ppv = This; + *ppv = &This->IWICBitmapFrameDecode_iface; } else { @@ -446,9 +446,10 @@ static HRESULT WINAPI IcoDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID if (!ppv) return E_INVALIDARG; - if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IWICBitmapDecoder, iid)) + if (IsEqualIID(&IID_IUnknown, iid) || + IsEqualIID(&IID_IWICBitmapDecoder, iid)) { - *ppv = This; + *ppv = &This->IWICBitmapDecoder_iface; } else { @@ -692,7 +693,7 @@ static HRESULT WINAPI IcoDecoder_GetFrame(IWICBitmapDecoder *iface, } if (FAILED(hr)) goto fail; - *ppIBitmapFrame = (IWICBitmapFrameDecode*)result; + *ppIBitmapFrame = &result->IWICBitmapFrameDecode_iface; LeaveCriticalSection(&This->lock); @@ -747,8 +748,8 @@ HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) InitializeCriticalSection(&This->lock); This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IcoDecoder.lock"); - ret = IUnknown_QueryInterface((IUnknown*)This, iid, ppv); - IUnknown_Release((IUnknown*)This); + ret = IWICBitmapDecoder_QueryInterface(&This->IWICBitmapDecoder_iface, iid, ppv); + IWICBitmapDecoder_Release(&This->IWICBitmapDecoder_iface); return ret; }
1
0
0
0
Henri Verbeet : d3d10: Implement d3d10_effect_sampler_variable_GetBackingStore().
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 9f212a6c953a9400b18c8521b88075353d45feda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f212a6c953a9400b18c8521b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jul 24 23:21:33 2012 +0200 d3d10: Implement d3d10_effect_sampler_variable_GetBackingStore(). --- dlls/d3d10/effect.c | 14 ++++++++++++-- dlls/d3d10/tests/effect.c | 39 +++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 702b95e..7d07cc3 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -6569,9 +6569,19 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetSampler(ID3D10 static HRESULT STDMETHODCALLTYPE d3d10_effect_sampler_variable_GetBackingStore(ID3D10EffectSamplerVariable *iface, UINT index, D3D10_SAMPLER_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3d10_effect_variable *v = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface); - return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p.\n", iface, index, desc); + + if (index >= max(v->type->element_count, 1)) + { + WARN("Invalid index %u.\n", index); + return E_FAIL; + } + + *desc = ((D3D10_SAMPLER_DESC *)v->data)[index]; + + return S_OK; } diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 3d83d94..ce5e18e 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -3826,22 +3826,21 @@ static void test_effect_state_groups(ID3D10Device *device) v = effect->lpVtbl->GetVariableByName(effect, "sampler0"); s = v->lpVtbl->AsSampler(v); - memset(&sampler_desc, 0, sizeof(sampler_desc)); s->lpVtbl->GetBackingStore(s, 0, &sampler_desc); - todo_wine ok(sampler_desc.Filter == D3D10_FILTER_MIN_MAG_MIP_LINEAR, "Got unexpected Filter %#x.\n", sampler_desc.Filter); - todo_wine ok(sampler_desc.AddressU == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressU %#x.\n", sampler_desc.AddressU); - todo_wine ok(sampler_desc.AddressV == D3D10_TEXTURE_ADDRESS_MIRROR, "Got unexpected AddressV %#x.\n", sampler_desc.AddressV); - todo_wine ok(sampler_desc.AddressW == D3D10_TEXTURE_ADDRESS_CLAMP, "Got unexpected AddressW %#x.\n", sampler_desc.AddressW); - todo_wine ok(sampler_desc.MipLODBias == -1.0f, "Got unexpected MipLODBias %.8e.\n", sampler_desc.MipLODBias); - todo_wine ok(sampler_desc.MaxAnisotropy == 4, "Got unexpected MaxAnisotropy %#x.\n", sampler_desc.MaxAnisotropy); - todo_wine ok(sampler_desc.ComparisonFunc == D3D10_COMPARISON_ALWAYS, "Got unexpected ComparisonFunc %#x.\n", + ok(sampler_desc.Filter == D3D10_FILTER_MIN_MAG_MIP_LINEAR, "Got unexpected Filter %#x.\n", sampler_desc.Filter); + ok(sampler_desc.AddressU == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressU %#x.\n", sampler_desc.AddressU); + ok(sampler_desc.AddressV == D3D10_TEXTURE_ADDRESS_MIRROR, "Got unexpected AddressV %#x.\n", sampler_desc.AddressV); + ok(sampler_desc.AddressW == D3D10_TEXTURE_ADDRESS_CLAMP, "Got unexpected AddressW %#x.\n", sampler_desc.AddressW); + ok(sampler_desc.MipLODBias == -1.0f, "Got unexpected MipLODBias %.8e.\n", sampler_desc.MipLODBias); + ok(sampler_desc.MaxAnisotropy == 4, "Got unexpected MaxAnisotropy %#x.\n", sampler_desc.MaxAnisotropy); + ok(sampler_desc.ComparisonFunc == D3D10_COMPARISON_ALWAYS, "Got unexpected ComparisonFunc %#x.\n", sampler_desc.ComparisonFunc); - todo_wine ok(sampler_desc.BorderColor[0] == 1.0f, "Got unexpected BorderColor[0] %.8e.\n", sampler_desc.BorderColor[0]); - todo_wine ok(sampler_desc.BorderColor[1] == 2.0f, "Got unexpected BorderColor[1] %.8e.\n", sampler_desc.BorderColor[1]); - todo_wine ok(sampler_desc.BorderColor[2] == 3.0f, "Got unexpected BorderColor[2] %.8e.\n", sampler_desc.BorderColor[2]); - todo_wine ok(sampler_desc.BorderColor[3] == 4.0f, "Got unexpected BorderColor[3] %.8e.\n", sampler_desc.BorderColor[3]); - todo_wine ok(sampler_desc.MinLOD == 6.0f, "Got unexpected MinLOD %.8e.\n", sampler_desc.MinLOD); - todo_wine ok(sampler_desc.MaxLOD == 5.0f, "Got unexpected MaxLOD %.8e.\n", sampler_desc.MaxLOD); + ok(sampler_desc.BorderColor[0] == 1.0f, "Got unexpected BorderColor[0] %.8e.\n", sampler_desc.BorderColor[0]); + ok(sampler_desc.BorderColor[1] == 2.0f, "Got unexpected BorderColor[1] %.8e.\n", sampler_desc.BorderColor[1]); + ok(sampler_desc.BorderColor[2] == 3.0f, "Got unexpected BorderColor[2] %.8e.\n", sampler_desc.BorderColor[2]); + ok(sampler_desc.BorderColor[3] == 4.0f, "Got unexpected BorderColor[3] %.8e.\n", sampler_desc.BorderColor[3]); + ok(sampler_desc.MinLOD == 6.0f, "Got unexpected MinLOD %.8e.\n", sampler_desc.MinLOD); + ok(sampler_desc.MaxLOD == 5.0f, "Got unexpected MaxLOD %.8e.\n", sampler_desc.MaxLOD); v = effect->lpVtbl->GetVariableByName(effect, "blend_state"); b = v->lpVtbl->AsBlend(v); @@ -4077,19 +4076,19 @@ static void test_effect_state_group_defaults(ID3D10Device *device) memset(&sampler_desc, 0, sizeof(sampler_desc)); s->lpVtbl->GetBackingStore(s, 0, &sampler_desc); ok(sampler_desc.Filter == D3D10_FILTER_MIN_MAG_MIP_POINT, "Got unexpected Filter %#x.\n", sampler_desc.Filter); - todo_wine ok(sampler_desc.AddressU == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressU %#x.\n", sampler_desc.AddressU); - todo_wine ok(sampler_desc.AddressV == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressV %#x.\n", sampler_desc.AddressV); - todo_wine ok(sampler_desc.AddressW == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressW %#x.\n", sampler_desc.AddressW); + ok(sampler_desc.AddressU == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressU %#x.\n", sampler_desc.AddressU); + ok(sampler_desc.AddressV == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressV %#x.\n", sampler_desc.AddressV); + ok(sampler_desc.AddressW == D3D10_TEXTURE_ADDRESS_WRAP, "Got unexpected AddressW %#x.\n", sampler_desc.AddressW); ok(sampler_desc.MipLODBias == 0.0f, "Got unexpected MipLODBias %.8e.\n", sampler_desc.MipLODBias); - todo_wine ok(sampler_desc.MaxAnisotropy == 16, "Got unexpected MaxAnisotropy %#x.\n", sampler_desc.MaxAnisotropy); - todo_wine ok(sampler_desc.ComparisonFunc == D3D10_COMPARISON_NEVER, "Got unexpected ComparisonFunc %#x.\n", + ok(sampler_desc.MaxAnisotropy == 16, "Got unexpected MaxAnisotropy %#x.\n", sampler_desc.MaxAnisotropy); + ok(sampler_desc.ComparisonFunc == D3D10_COMPARISON_NEVER, "Got unexpected ComparisonFunc %#x.\n", sampler_desc.ComparisonFunc); ok(sampler_desc.BorderColor[0] == 0.0f, "Got unexpected BorderColor[0] %.8e.\n", sampler_desc.BorderColor[0]); ok(sampler_desc.BorderColor[1] == 0.0f, "Got unexpected BorderColor[1] %.8e.\n", sampler_desc.BorderColor[1]); ok(sampler_desc.BorderColor[2] == 0.0f, "Got unexpected BorderColor[2] %.8e.\n", sampler_desc.BorderColor[2]); ok(sampler_desc.BorderColor[3] == 0.0f, "Got unexpected BorderColor[3] %.8e.\n", sampler_desc.BorderColor[3]); ok(sampler_desc.MinLOD == 0.0f, "Got unexpected MinLOD %.8e.\n", sampler_desc.MinLOD); - todo_wine ok(sampler_desc.MaxLOD == FLT_MAX, "Got unexpected MaxLOD %.8e.\n", sampler_desc.MaxLOD); + ok(sampler_desc.MaxLOD == FLT_MAX, "Got unexpected MaxLOD %.8e.\n", sampler_desc.MaxLOD); v = effect->lpVtbl->GetVariableByName(effect, "blend_state"); b = v->lpVtbl->AsBlend(v);
1
0
0
0
Henri Verbeet : d3d10: Add support for parsing sampler states.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 98751a49946038c13f60a68a5f4e326fee43c575 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98751a49946038c13f60a68a5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jul 24 23:21:32 2012 +0200 d3d10: Add support for parsing sampler states. --- dlls/d3d10/effect.c | 49 ++++++++++++++++++++++++++++++++----------------- 1 files changed, 32 insertions(+), 17 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 62880af..702b95e 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -23,6 +23,8 @@ #include "d3d10_private.h" +#include <float.h> + WINE_DEFAULT_DEBUG_CHANNEL(d3d10); #define D3D10_FX10_TYPE_COLUMN_SHIFT 11 @@ -161,6 +163,16 @@ static const struct d3d10_effect_state_property_info property_info[] = {0x2a, "BlendState.DestBlendAlpha", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, DestBlendAlpha) }, {0x2b, "BlendState.BlendOpAlpha", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, BlendOpAlpha) }, {0x2c, "BlendState.RenderTargetWriteMask", D3D10_SVT_UINT8, 1, 8, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, RenderTargetWriteMask) }, + {0x2d, "SamplerState.Filter", D3D10_SVT_INT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, Filter) }, + {0x2e, "SamplerState.AddressU", D3D10_SVT_INT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, AddressU) }, + {0x2f, "SamplerState.AddressV", D3D10_SVT_INT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, AddressV) }, + {0x30, "SamplerState.AddressW", D3D10_SVT_INT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, AddressW) }, + {0x31, "SamplerState.MipMapLODBias", D3D10_SVT_FLOAT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MipLODBias) }, + {0x32, "SamplerState.MaxAnisotropy", D3D10_SVT_UINT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MaxAnisotropy) }, + {0x33, "SamplerState.ComparisonFunc", D3D10_SVT_INT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, ComparisonFunc) }, + {0x34, "SamplerState.BorderColor", D3D10_SVT_FLOAT, 4, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, BorderColor) }, + {0x35, "SamplerState.MinLOD", D3D10_SVT_FLOAT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MinLOD) }, + {0x36, "SamplerState.MaxLOD", D3D10_SVT_FLOAT, 1, 1, D3D10_SVT_SAMPLER, FIELD_OFFSET(D3D10_SAMPLER_DESC, MaxLOD) }, }; static const D3D10_RASTERIZER_DESC default_rasterizer_desc = @@ -202,6 +214,20 @@ static const D3D10_BLEND_DESC default_blend_desc = {0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf}, }; +static const D3D10_SAMPLER_DESC default_sampler_desc = +{ + D3D10_FILTER_MIN_MAG_MIP_POINT, + D3D10_TEXTURE_ADDRESS_WRAP, + D3D10_TEXTURE_ADDRESS_WRAP, + D3D10_TEXTURE_ADDRESS_WRAP, + 0.0f, + 16, + D3D10_COMPARISON_NEVER, + {0.0f, 0.0f, 0.0f, 0.0f}, + 0.0f, + FLT_MAX, +}; + struct d3d10_effect_state_storage_info { D3D_SHADER_VARIABLE_TYPE id; @@ -214,6 +240,7 @@ static const struct d3d10_effect_state_storage_info d3d10_effect_state_storage_i {D3D10_SVT_RASTERIZER, sizeof(default_rasterizer_desc), &default_rasterizer_desc }, {D3D10_SVT_DEPTHSTENCIL, sizeof(default_depth_stencil_desc), &default_depth_stencil_desc}, {D3D10_SVT_BLEND, sizeof(default_blend_desc), &default_blend_desc }, + {D3D10_SVT_SAMPLER, sizeof(default_sampler_desc), &default_sampler_desc }, }; static BOOL copy_name(const char *ptr, char **name) @@ -1038,6 +1065,10 @@ static BOOL read_float_value(DWORD value, D3D_SHADER_VARIABLE_TYPE in_type, floa out_data[idx] = *(float *)&value; return TRUE; + case D3D10_SVT_INT: + out_data[idx] = (INT)value; + return TRUE; + default: FIXME("Unhandled in_type %#x.\n", in_type); return FALSE; @@ -1571,26 +1602,10 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const } break; - case D3D10_SVT_SAMPLER: - TRACE("SVT is a state.\n"); - for (i = 0; i < max(v->type->element_count, 1); ++i) - { - unsigned int j; - DWORD object_count; - - read_dword(ptr, &object_count); - TRACE("Object count: %#x.\n", object_count); - - for (j = 0; j < object_count; ++j) - { - skip_dword_unknown("state object attribute", ptr, 4); - } - } - break; - case D3D10_SVT_DEPTHSTENCIL: case D3D10_SVT_BLEND: case D3D10_SVT_RASTERIZER: + case D3D10_SVT_SAMPLER: { const struct d3d10_effect_state_storage_info *storage_info; unsigned int count = max(v->type->element_count, 1);
1
0
0
0
Henri Verbeet : d3d10: Implement d3d10_effect_blend_variable_GetBackingStore().
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: 32d4464e9076271fcc4cfee82f77d76fb5d19b87 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32d4464e9076271fcc4cfee82…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jul 24 23:21:31 2012 +0200 d3d10: Implement d3d10_effect_blend_variable_GetBackingStore(). --- dlls/d3d10/effect.c | 14 ++++++++++++-- dlls/d3d10/tests/effect.c | 35 +++++++++++++++++------------------ 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 69ccabd..62880af 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -5909,9 +5909,19 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBlendState(ID3D1 static HRESULT STDMETHODCALLTYPE d3d10_effect_blend_variable_GetBackingStore(ID3D10EffectBlendVariable *iface, UINT index, D3D10_BLEND_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3d10_effect_variable *v = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface); - return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p.\n", iface, index, desc); + + if (index >= max(v->type->element_count, 1)) + { + WARN("Invalid index %u.\n", index); + return E_FAIL; + } + + *desc = ((D3D10_BLEND_DESC *)v->data)[index]; + + return S_OK; } diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index b1b3816..3d83d94 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -3845,23 +3845,22 @@ static void test_effect_state_groups(ID3D10Device *device) v = effect->lpVtbl->GetVariableByName(effect, "blend_state"); b = v->lpVtbl->AsBlend(v); - memset(&blend_desc, 0, sizeof(blend_desc)); b->lpVtbl->GetBackingStore(b, 0, &blend_desc); ok(!blend_desc.AlphaToCoverageEnable, "Got unexpected AlphaToCoverageEnable %#x.\n", blend_desc.AlphaToCoverageEnable); - todo_wine ok(blend_desc.BlendEnable[0], "Got unexpected BlendEnable[0] %#x.\n", blend_desc.BlendEnable[0]); + ok(blend_desc.BlendEnable[0], "Got unexpected BlendEnable[0] %#x.\n", blend_desc.BlendEnable[0]); ok(!blend_desc.BlendEnable[7], "Got unexpected BlendEnable[7] %#x.\n", blend_desc.BlendEnable[7]); - todo_wine ok(blend_desc.SrcBlend == D3D10_BLEND_ONE, "Got unexpected SrcBlend %#x.\n", blend_desc.SrcBlend); - todo_wine ok(blend_desc.DestBlend == D3D10_BLEND_SRC_COLOR, "Got unexpected DestBlend %#x.\n", blend_desc.DestBlend); - todo_wine ok(blend_desc.BlendOp == D3D10_BLEND_OP_MIN, "Got unexpected BlendOp %#x.\n", blend_desc.BlendOp); - todo_wine ok(blend_desc.SrcBlendAlpha == D3D10_BLEND_SRC_ALPHA, "Got unexpected SrcBlendAlpha %#x.\n", + ok(blend_desc.SrcBlend == D3D10_BLEND_ONE, "Got unexpected SrcBlend %#x.\n", blend_desc.SrcBlend); + ok(blend_desc.DestBlend == D3D10_BLEND_SRC_COLOR, "Got unexpected DestBlend %#x.\n", blend_desc.DestBlend); + ok(blend_desc.BlendOp == D3D10_BLEND_OP_MIN, "Got unexpected BlendOp %#x.\n", blend_desc.BlendOp); + ok(blend_desc.SrcBlendAlpha == D3D10_BLEND_SRC_ALPHA, "Got unexpected SrcBlendAlpha %#x.\n", blend_desc.SrcBlendAlpha); - todo_wine ok(blend_desc.DestBlendAlpha == D3D10_BLEND_INV_SRC_ALPHA, "Got unexpected DestBlendAlpha %#x.\n", + ok(blend_desc.DestBlendAlpha == D3D10_BLEND_INV_SRC_ALPHA, "Got unexpected DestBlendAlpha %#x.\n", blend_desc.DestBlendAlpha); - todo_wine ok(blend_desc.BlendOpAlpha == D3D10_BLEND_OP_MAX, "Got unexpected BlendOpAlpha %#x.\n", blend_desc.BlendOpAlpha); - todo_wine ok(blend_desc.RenderTargetWriteMask[0] == 0x8, "Got unexpected RenderTargetWriteMask[0] %#x.\n", + ok(blend_desc.BlendOpAlpha == D3D10_BLEND_OP_MAX, "Got unexpected BlendOpAlpha %#x.\n", blend_desc.BlendOpAlpha); + ok(blend_desc.RenderTargetWriteMask[0] == 0x8, "Got unexpected RenderTargetWriteMask[0] %#x.\n", blend_desc.RenderTargetWriteMask[0]); - todo_wine ok(blend_desc.RenderTargetWriteMask[7] == 0x7, "Got unexpected RenderTargetWriteMask[7] %#x.\n", + ok(blend_desc.RenderTargetWriteMask[7] == 0x7, "Got unexpected RenderTargetWriteMask[7] %#x.\n", blend_desc.RenderTargetWriteMask[7]); v = effect->lpVtbl->GetVariableByName(effect, "ds_state"); @@ -4100,17 +4099,17 @@ static void test_effect_state_group_defaults(ID3D10Device *device) blend_desc.AlphaToCoverageEnable); ok(!blend_desc.BlendEnable[0], "Got unexpected BlendEnable[0] %#x.\n", blend_desc.BlendEnable[0]); ok(!blend_desc.BlendEnable[7], "Got unexpected BlendEnable[7] %#x.\n", blend_desc.BlendEnable[7]); - todo_wine ok(blend_desc.SrcBlend == D3D10_BLEND_SRC_ALPHA, "Got unexpected SrcBlend %#x.\n", blend_desc.SrcBlend); - todo_wine ok(blend_desc.DestBlend == D3D10_BLEND_INV_SRC_ALPHA, "Got unexpected DestBlend %#x.\n", blend_desc.DestBlend); - todo_wine ok(blend_desc.BlendOp == D3D10_BLEND_OP_ADD, "Got unexpected BlendOp %#x.\n", blend_desc.BlendOp); - todo_wine ok(blend_desc.SrcBlendAlpha == D3D10_BLEND_SRC_ALPHA, "Got unexpected SrcBlendAlpha %#x.\n", + ok(blend_desc.SrcBlend == D3D10_BLEND_SRC_ALPHA, "Got unexpected SrcBlend %#x.\n", blend_desc.SrcBlend); + ok(blend_desc.DestBlend == D3D10_BLEND_INV_SRC_ALPHA, "Got unexpected DestBlend %#x.\n", blend_desc.DestBlend); + ok(blend_desc.BlendOp == D3D10_BLEND_OP_ADD, "Got unexpected BlendOp %#x.\n", blend_desc.BlendOp); + ok(blend_desc.SrcBlendAlpha == D3D10_BLEND_SRC_ALPHA, "Got unexpected SrcBlendAlpha %#x.\n", blend_desc.SrcBlendAlpha); - todo_wine ok(blend_desc.DestBlendAlpha == D3D10_BLEND_INV_SRC_ALPHA, "Got unexpected DestBlendAlpha %#x.\n", + ok(blend_desc.DestBlendAlpha == D3D10_BLEND_INV_SRC_ALPHA, "Got unexpected DestBlendAlpha %#x.\n", blend_desc.DestBlendAlpha); - todo_wine ok(blend_desc.BlendOpAlpha == D3D10_BLEND_OP_ADD, "Got unexpected BlendOpAlpha %#x.\n", blend_desc.BlendOpAlpha); - todo_wine ok(blend_desc.RenderTargetWriteMask[0] == 0xf, "Got unexpected RenderTargetWriteMask[0] %#x.\n", + ok(blend_desc.BlendOpAlpha == D3D10_BLEND_OP_ADD, "Got unexpected BlendOpAlpha %#x.\n", blend_desc.BlendOpAlpha); + ok(blend_desc.RenderTargetWriteMask[0] == 0xf, "Got unexpected RenderTargetWriteMask[0] %#x.\n", blend_desc.RenderTargetWriteMask[0]); - todo_wine ok(blend_desc.RenderTargetWriteMask[7] == 0xf, "Got unexpected RenderTargetWriteMask[7] %#x.\n", + ok(blend_desc.RenderTargetWriteMask[7] == 0xf, "Got unexpected RenderTargetWriteMask[7] %#x.\n", blend_desc.RenderTargetWriteMask[7]); v = effect->lpVtbl->GetVariableByName(effect, "ds_state");
1
0
0
0
Henri Verbeet : d3d10: Add support for parsing blend states.
by Alexandre Julliard
25 Jul '12
25 Jul '12
Module: wine Branch: master Commit: aaf47457b96d15324b49ec1186935df42c808ed7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aaf47457b96d15324b49ec118…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jul 24 23:21:30 2012 +0200 d3d10: Add support for parsing blend states. --- dlls/d3d10/effect.c | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 5f0ce5a..69ccabd 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -152,6 +152,15 @@ static const struct d3d10_effect_state_property_info property_info[] = {0x21, "DepthStencilState.BackFaceStencilDepthFail", D3D10_SVT_INT, 1, 1, D3D10_SVT_DEPTHSTENCIL, FIELD_OFFSET(D3D10_DEPTH_STENCIL_DESC, BackFace.StencilDepthFailOp) }, {0x22, "DepthStencilState.BackFaceStencilPass", D3D10_SVT_INT, 1, 1, D3D10_SVT_DEPTHSTENCIL, FIELD_OFFSET(D3D10_DEPTH_STENCIL_DESC, BackFace.StencilPassOp) }, {0x23, "DepthStencilState.BackFaceStencilFunc", D3D10_SVT_INT, 1, 1, D3D10_SVT_DEPTHSTENCIL, FIELD_OFFSET(D3D10_DEPTH_STENCIL_DESC, BackFace.StencilFunc) }, + {0x24, "BlendState.AlphaToCoverageEnable", D3D10_SVT_BOOL, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, AlphaToCoverageEnable) }, + {0x25, "BlendState.BlendEnable", D3D10_SVT_BOOL, 1, 8, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, BlendEnable) }, + {0x26, "BlendState.SrcBlend", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, SrcBlend) }, + {0x27, "BlendState.DestBlend", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, DestBlend) }, + {0x28, "BlendState.BlendOp", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, BlendOp) }, + {0x29, "BlendState.SrcBlendAlpha", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, SrcBlendAlpha) }, + {0x2a, "BlendState.DestBlendAlpha", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, DestBlendAlpha) }, + {0x2b, "BlendState.BlendOpAlpha", D3D10_SVT_INT, 1, 1, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, BlendOpAlpha) }, + {0x2c, "BlendState.RenderTargetWriteMask", D3D10_SVT_UINT8, 1, 8, D3D10_SVT_BLEND, FIELD_OFFSET(D3D10_BLEND_DESC, RenderTargetWriteMask) }, }; static const D3D10_RASTERIZER_DESC default_rasterizer_desc = @@ -180,6 +189,19 @@ static const D3D10_DEPTH_STENCIL_DESC default_depth_stencil_desc = {D3D10_STENCIL_OP_KEEP, D3D10_STENCIL_OP_KEEP, D3D10_STENCIL_OP_KEEP, D3D10_COMPARISON_ALWAYS}, }; +static const D3D10_BLEND_DESC default_blend_desc = +{ + FALSE, + {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}, + D3D10_BLEND_SRC_ALPHA, + D3D10_BLEND_INV_SRC_ALPHA, + D3D10_BLEND_OP_ADD, + D3D10_BLEND_SRC_ALPHA, + D3D10_BLEND_INV_SRC_ALPHA, + D3D10_BLEND_OP_ADD, + {0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf}, +}; + struct d3d10_effect_state_storage_info { D3D_SHADER_VARIABLE_TYPE id; @@ -191,6 +213,7 @@ static const struct d3d10_effect_state_storage_info d3d10_effect_state_storage_i { {D3D10_SVT_RASTERIZER, sizeof(default_rasterizer_desc), &default_rasterizer_desc }, {D3D10_SVT_DEPTHSTENCIL, sizeof(default_depth_stencil_desc), &default_depth_stencil_desc}, + {D3D10_SVT_BLEND, sizeof(default_blend_desc), &default_blend_desc }, }; static BOOL copy_name(const char *ptr, char **name) @@ -1548,7 +1571,6 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const } break; - case D3D10_SVT_BLEND: case D3D10_SVT_SAMPLER: TRACE("SVT is a state.\n"); for (i = 0; i < max(v->type->element_count, 1); ++i) @@ -1567,6 +1589,7 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const break; case D3D10_SVT_DEPTHSTENCIL: + case D3D10_SVT_BLEND: case D3D10_SVT_RASTERIZER: { const struct d3d10_effect_state_storage_info *storage_info;
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200