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 2016
----- 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
680 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Removed no longer used nav_test.html file.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 141998f63ce387dac78b79e558f33630e92aac5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=141998f63ce387dac78b79e55…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 8 15:24:43 2016 +0200 mshtml: Removed no longer used nav_test.html file. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/nav_test.html | 92 ----------------------------------------- 1 file changed, 92 deletions(-) diff --git a/dlls/mshtml/tests/nav_test.html b/dlls/mshtml/tests/nav_test.html deleted file mode 100644 index 1021444..0000000 --- a/dlls/mshtml/tests/nav_test.html +++ /dev/null @@ -1,92 +0,0 @@ -<html> -<head> -<script> -function ok(b,m) { - return external.ok(b, m); -} - -function nav_parent_test() { - external.trace("Running _parent navigation tests..."); - - var iframe = document.getElementById("testframe"); - var subframe = iframe.contentWindow.document.createElement("iframe"); - - subframe.onload = function() { - var doc = subframe.contentWindow.document; - doc.body.innerHTML = '<a href="blank2.html" id="aid" target="_parent">test</a>'; - doc.getElementById("aid").click(); - } - - iframe.onload = function() { - iframe.onload = null; - var href = iframe.contentWindow.location.href; - ok(/.*blank2.html/.test(href), "Unexpected href " + href); - next_test(); - } - - iframe.contentWindow.document.body.appendChild(subframe); - subframe.src = "blank.html"; -} - -function window_navigate_test() { - external.trace("Running window.navigate() tests..."); - - var iframe = document.getElementById("testframe"); - - iframe.onload = function() { - iframe.onload = null; - var href = iframe.contentWindow.location.href; - ok(href === "about:blank", "Unexpected href " + href); - next_test(); - } - - iframe.contentWindow.navigate("about:blank"); -} - -function window_open_self_test() { - external.trace("Running window.open(_self) tests..."); - - var iframe = document.getElementById("testframe"); - var iframe_window = iframe.contentWindow; - - iframe.onload = function() { - iframe.onload = null; - var href = iframe.contentWindow.location.href; - ok(/.*blank.html\?window_open_self/.test(href), "Unexpected href " + href); - ok(iframe.contentWindow === iframe_window, "iframe.contentWindow !== iframe_window"); - next_test(); - } - - iframe_window.open("blank.html?window_open_self", "_self"); -} - -function detached_src_test() { - var iframe = document.createElement("iframe"); - var onload_called = false; - - iframe.onload = function() { - onload_called = true; - next_test(); - } - - iframe.src = "blank.html"; - document.body.appendChild(iframe); - ok(onload_called === false, "called onload too early?"); -} - -var tests = [ - nav_parent_test, - window_navigate_test, - window_open_self_test, - detached_src_test, - function() { external.reportSuccess(); } -]; - -function next_test() { - window.setTimeout(tests.shift(), 0); -} -</script> -<body onload="next_test()"> -<iframe src="about:blank" id="testframe"></iframe> -</body> -</html>
1
0
0
0
Nikolay Sivov : xmllite/writer: Support trivial case of WriteAttributeString().
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 895ad74fb0eaf4125c7f42d2c87b8efac632cad7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=895ad74fb0eaf4125c7f42d2c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 8 15:03:03 2016 +0300 xmllite/writer: Support trivial case of WriteAttributeString(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/tests/writer.c | 104 +++++++++++++++++++++++++++++++++++++++++--- dlls/xmllite/writer.c | 26 ++++++++--- 2 files changed, 116 insertions(+), 14 deletions(-) diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 9318bda..5e6769c 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -31,7 +31,7 @@ #include "initguid.h" DEFINE_GUID(IID_IXmlWriterOutput, 0xc1131708, 0x0f59, 0x477f, 0x93, 0x59, 0x7d, 0x33, 0x24, 0x51, 0xbc, 0x1a); -static void check_output(IStream *stream, const char *expected, int line) +static void check_output(IStream *stream, const char *expected, BOOL todo, int line) { HGLOBAL hglobal; int len = strlen(expected), size; @@ -43,16 +43,20 @@ static void check_output(IStream *stream, const char *expected, int line) size = GlobalSize(hglobal); ptr = GlobalLock(hglobal); - if (size != len) + todo_wine_if(todo) { - ok_(__FILE__, line)(0, "data size mismatch, expected %u, got %u\n", len, size); - ok_(__FILE__, line)(0, "got %s, expected %s\n", ptr, expected); + if (size != len) + { + ok_(__FILE__, line)(0, "data size mismatch, expected %u, got %u\n", len, size); + ok_(__FILE__, line)(0, "got %s, expected %s\n", ptr, expected); + } + else + ok_(__FILE__, line)(!strncmp(ptr, expected, len), "got %s, expected %s\n", ptr, expected); } - else - ok_(__FILE__, line)(!strncmp(ptr, expected, len), "got %s, expected %s\n", ptr, expected); GlobalUnlock(hglobal); } -#define CHECK_OUTPUT(stream, expected) check_output(stream, expected, __LINE__) +#define CHECK_OUTPUT(stream, expected) check_output(stream, expected, FALSE, __LINE__) +#define CHECK_OUTPUT_TODO(stream, expected) check_output(stream, expected, TRUE, __LINE__) /* used to test all Write* methods for consistent error state */ static void check_writer_state(IXmlWriter *writer, HRESULT exp_hr) @@ -1054,6 +1058,91 @@ static void test_indentation(void) IStream_Release(stream); } +static void test_WriteAttributeString(void) +{ + static const WCHAR prefixW[] = {'p','r','e','f','i','x',0}; + static const WCHAR localW[] = {'l','o','c','a','l',0}; + static const WCHAR uriW[] = {'u','r','i',0}; + static const WCHAR uri2W[] = {'u','r','i','2',0}; + static const WCHAR xmlnsW[] = {'x','m','l','n','s',0}; + static const WCHAR aW[] = {'a',0}; + static const WCHAR bW[] = {'b',0}; + IXmlWriter *writer; + IStream *stream; + HRESULT hr; + + hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + stream = writer_set_output(writer); + + hr = IXmlWriter_SetProperty(writer, XmlWriterProperty_OmitXmlDeclaration, TRUE); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, bW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteEndDocument(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + CHECK_OUTPUT(stream, + "<a a=\"b\" />"); + IStream_Release(stream); + + /* with namespaces */ + stream = writer_set_output(writer); + + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, aW, NULL, NULL, bW); +todo_wine + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, prefixW, localW, uriW, bW); +todo_wine + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, bW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, NULL, xmlnsW, uri2W, NULL); +todo_wine + ok(hr == WR_E_XMLNSPREFIXDECLARATION, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, NULL, xmlnsW, NULL, uri2W); +todo_wine + ok(hr == WR_E_NSPREFIXDECLARED, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteAttributeString(writer, prefixW, localW, NULL, bW); +todo_wine + ok(hr == WR_E_DUPLICATEATTRIBUTE, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteEndDocument(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + CHECK_OUTPUT_TODO(stream, + "<a prefix:local=\"b\" a=\"b\" xmlns:prefix=\"uri\" />"); + + IXmlWriter_Release(writer); + IStream_Release(stream); +} + START_TEST(writer) { test_writer_create(); @@ -1070,4 +1159,5 @@ START_TEST(writer) test_WriteCData(); test_WriteRaw(); test_indentation(); + test_WriteAttributeString(); } diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 49e65cc..be5f0e1 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -44,6 +44,7 @@ static const WCHAR closepiW[] = {'?','>'}; static const WCHAR ltW[] = {'<'}; static const WCHAR gtW[] = {'>'}; static const WCHAR spaceW[] = {' '}; +static const WCHAR quoteW[] = {'"'}; struct output_buffer { @@ -284,7 +285,6 @@ static HRESULT write_output_buffer(xmlwriteroutput *output, const WCHAR *data, i static HRESULT write_output_buffer_quoted(xmlwriteroutput *output, const WCHAR *data, int len) { - static const WCHAR quoteW[] = {'"'}; write_output_buffer(output, quoteW, ARRAY_SIZE(quoteW)); write_output_buffer(output, data, len); write_output_buffer(output, quoteW, ARRAY_SIZE(quoteW)); @@ -609,14 +609,14 @@ static HRESULT WINAPI xmlwriter_WriteAttributes(IXmlWriter *iface, IXmlReader *p return E_NOTIMPL; } -static HRESULT WINAPI xmlwriter_WriteAttributeString(IXmlWriter *iface, LPCWSTR pwszPrefix, - LPCWSTR pwszLocalName, LPCWSTR pwszNamespaceUri, - LPCWSTR pwszValue) +static HRESULT WINAPI xmlwriter_WriteAttributeString(IXmlWriter *iface, LPCWSTR ns_prefix, + LPCWSTR local_name, LPCWSTR ns_uri, LPCWSTR value) { + static const WCHAR eqW[] = {'=','"'}; xmlwriter *This = impl_from_IXmlWriter(iface); - FIXME("%p %s %s %s %s\n", This, wine_dbgstr_w(pwszPrefix), wine_dbgstr_w(pwszLocalName), - wine_dbgstr_w(pwszNamespaceUri), wine_dbgstr_w(pwszValue)); + TRACE("%p %s %s %s %s\n", This, debugstr_w(ns_prefix), debugstr_w(local_name), + debugstr_w(ns_uri), debugstr_w(value)); switch (This->state) { @@ -630,7 +630,19 @@ static HRESULT WINAPI xmlwriter_WriteAttributeString(IXmlWriter *iface, LPCWSTR ; } - return E_NOTIMPL; + if (ns_prefix || ns_uri) + { + FIXME("namespaces are not supported.\n"); + return E_NOTIMPL; + } + + write_output_buffer(This->output, spaceW, ARRAY_SIZE(spaceW)); + write_output_buffer(This->output, local_name, -1); + write_output_buffer(This->output, eqW, ARRAY_SIZE(eqW)); + write_output_buffer(This->output, value, -1); + write_output_buffer(This->output, quoteW, ARRAY_SIZE(quoteW)); + + return S_OK; } static void write_cdata_section(xmlwriteroutput *output, const WCHAR *data, int len)
1
0
0
0
Piotr Caban : msvcrt: Return error when previously parsed type is accessed while demangling simple data type.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 42c2799589ae7f805e5f67a2b04f24e4aa3e0b34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42c2799589ae7f805e5f67a2b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jul 8 15:34:44 2016 +0200 msvcrt: Return error when previously parsed type is accessed while demangling simple data type. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/undname.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 7d06188..df3e4e8 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -945,6 +945,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct, case '5': case '6': case '7': case '8': case '9': /* Referring back to previously parsed type */ /* left and right are pushed as two separate strings */ + if (!pmt_ref) goto done; ct->left = str_array_get_ref(pmt_ref, (dt - '0') * 2); ct->right = str_array_get_ref(pmt_ref, (dt - '0') * 2 + 1); if (!ct->left) goto done;
1
0
0
0
Piotr Caban : msvcrt: Use debugstr_a to trace strings in __unDName function.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 13ebdcb856779f5b1e7e6666f86f9834ff5658e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=13ebdcb856779f5b1e7e6666f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jul 8 14:03:04 2016 +0200 msvcrt: Use debugstr_a to trace strings in __unDName function. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/undname.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index e6cb61f..7d06188 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -202,7 +202,7 @@ static BOOL str_array_push(struct parsed_symbol* sym, const char* ptr, int len, c = '>'; if (i < a->start) c = '-'; else if (i >= a->num) c = '}'; - TRACE("%p\t%d%c %s\n", a, i, c, a->elts[i]); + TRACE("%p\t%d%c %s\n", a, i, c, debugstr_a(a->elts[i])); } } @@ -224,7 +224,7 @@ static char* str_array_get_ref(struct array* cref, unsigned idx) return NULL; } TRACE("Returning %p[%d] => %s\n", - cref, idx, cref->elts[cref->start + idx]); + cref, idx, debugstr_a(cref->elts[cref->start + idx])); return cref->elts[cref->start + idx]; } @@ -520,7 +520,7 @@ static char* get_literal_string(struct parsed_symbol* sym) (*sym->current >= 'a' && *sym->current <= 'z') || (*sym->current >= '0' && *sym->current <= '9') || *sym->current == '_' || *sym->current == '$')) { - TRACE("Failed at '%c' in %s\n", *sym->current, ptr); + TRACE("Failed at '%c' in %s\n", *sym->current, debugstr_a(ptr)); return NULL; } } while (*++sym->current != '@'); @@ -1573,7 +1573,7 @@ static BOOL symbol_demangle(struct parsed_symbol* sym) else ret = FALSE; done: if (ret) assert(sym->result); - else WARN("Failed at %s\n", sym->current); + else WARN("Failed at %s\n", debugstr_a(sym->current)); return ret; } @@ -1604,7 +1604,7 @@ char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen, const char* result; TRACE("(%p,%s,%d,%p,%p,%p,%x)\n", - buffer, mangled, buflen, memget, memfree, unknown, flags); + buffer, debugstr_a(mangled), buflen, memget, memfree, unknown, flags); /* The flags details is not documented by MS. However, it looks exactly * like the UNDNAME_ manifest constants from imagehlp.h and dbghelp.h
1
0
0
0
Huw Davies : gdi32: Add get_any_obj_ptr() to retrieve the ptr and type of a GDI handle.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: fc2d3109494d294af7cd9e2a018b69551a8bea0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc2d3109494d294af7cd9e2a0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Jul 8 12:57:14 2016 +0100 gdi32: Add get_any_obj_ptr() to retrieve the ptr and type of a GDI handle. This enables get_dc_obj() to check the type without calling GetObjectType() and thus it saves additional calls to Enter/LeaveCriticalSection(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dc.c | 5 +++-- dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/gdiobj.c | 29 ++++++++++++++++++++++++----- dlls/gdi32/pen.c | 10 ++++++---- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 5146f5b..2e54671 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -52,10 +52,11 @@ static const struct gdi_obj_funcs dc_funcs = static inline DC *get_dc_obj( HDC hdc ) { - DC *dc = GDI_GetObjPtr( hdc, 0 ); + WORD type; + DC *dc = get_any_obj_ptr( hdc, &type ); if (!dc) return NULL; - switch (GetObjectType( hdc )) + switch (type) { case OBJ_DC: case OBJ_MEMDC: diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 9c58747..79a7a74 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -299,6 +299,7 @@ extern HGDIOBJ alloc_gdi_handle( void *obj, WORD type, const struct gdi_obj_func extern void *free_gdi_handle( HGDIOBJ handle ) DECLSPEC_HIDDEN; extern HGDIOBJ get_full_gdi_handle( HGDIOBJ handle ) DECLSPEC_HIDDEN; extern void *GDI_GetObjPtr( HGDIOBJ, WORD ) DECLSPEC_HIDDEN; +extern void *get_any_obj_ptr( HGDIOBJ, WORD * ) DECLSPEC_HIDDEN; extern void GDI_ReleaseObj( HGDIOBJ ) DECLSPEC_HIDDEN; extern void GDI_CheckNotLock(void) DECLSPEC_HIDDEN; extern UINT GDI_get_ref_count( HGDIOBJ handle ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index 237544d..46b2241 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -829,13 +829,13 @@ HGDIOBJ get_full_gdi_handle( HGDIOBJ handle ) } /*********************************************************************** - * GDI_GetObjPtr + * get_any_obj_ptr * - * Return a pointer to the GDI object associated to the handle. - * Return NULL if the object has the wrong magic number. + * Return a pointer to, and the type of, the GDI object + * associated with the handle. * The object must be released with GDI_ReleaseObj. */ -void *GDI_GetObjPtr( HGDIOBJ handle, WORD type ) +void *get_any_obj_ptr( HGDIOBJ handle, WORD *type ) { void *ptr = NULL; struct gdi_handle_entry *entry; @@ -844,13 +844,32 @@ void *GDI_GetObjPtr( HGDIOBJ handle, WORD type ) if ((entry = handle_entry( handle ))) { - if (!type || entry->type == type) ptr = entry->obj; + ptr = entry->obj; + *type = entry->type; } if (!ptr) LeaveCriticalSection( &gdi_section ); return ptr; } +/*********************************************************************** + * GDI_GetObjPtr + * + * Return a pointer to the GDI object associated with the handle. + * Return NULL if the object has the wrong type. + * The object must be released with GDI_ReleaseObj. + */ +void *GDI_GetObjPtr( HGDIOBJ handle, WORD type ) +{ + WORD ret_type; + void *ptr = get_any_obj_ptr( handle, &ret_type ); + if (ptr && ret_type != type) + { + GDI_ReleaseObj( handle ); + ptr = NULL; + } + return ptr; +} /*********************************************************************** * GDI_ReleaseObj diff --git a/dlls/gdi32/pen.c b/dlls/gdi32/pen.c index cf4b080..d6c1dc4 100644 --- a/dlls/gdi32/pen.c +++ b/dlls/gdi32/pen.c @@ -223,6 +223,7 @@ static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc ) PENOBJ *pen; HGDIOBJ ret = 0; DC *dc = get_dc_ptr( hdc ); + WORD type; if (!dc) { @@ -230,12 +231,12 @@ static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc ) return 0; } - if ((pen = GDI_GetObjPtr( handle, 0 ))) + if ((pen = get_any_obj_ptr( handle, &type ))) { struct brush_pattern *pattern; PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSelectPen ); - switch (GetObjectType( handle )) + switch (type) { case OBJ_PEN: pattern = NULL; @@ -287,12 +288,13 @@ static BOOL PEN_DeleteObject( HGDIOBJ handle ) */ static INT PEN_GetObject( HGDIOBJ handle, INT count, LPVOID buffer ) { - PENOBJ *pen = GDI_GetObjPtr( handle, 0 ); + WORD type; + PENOBJ *pen = get_any_obj_ptr( handle, &type ); INT ret = 0; if (!pen) return 0; - switch (GetObjectType( handle )) + switch (type) { case OBJ_PEN: {
1
0
0
0
Jacek Caban : wscript: Added WScript.Quit tests.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: b0664560d412dc8db6e7b54fbc77b0c7586caf07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0664560d412dc8db6e7b54fb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 8 12:43:58 2016 +0200 wscript: Added WScript.Quit tests. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wscript/tests/run.c | 73 +++++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c index e0a6932..eb840cc 100644 --- a/programs/wscript/tests/run.c +++ b/programs/wscript/tests/run.c @@ -339,11 +339,12 @@ static const IClassFactoryVtbl ClassFactoryVtbl = { static IClassFactory testobj_cf = { &ClassFactoryVtbl }; -static void run_test(const char *file_name) +static void run_script_file(const char *file_name, DWORD expected_exit_code) { char command[MAX_PATH]; STARTUPINFOA si = {sizeof(si)}; PROCESS_INFORMATION pi; + DWORD exit_code; BOOL bres; script_name = file_name; @@ -360,37 +361,29 @@ static void run_test(const char *file_name) wscript_process = pi.hProcess; WaitForSingleObject(pi.hProcess, INFINITE); + + bres = GetExitCodeProcess(pi.hProcess, &exit_code); + ok(bres, "GetExitCodeProcess failed: %u\n", GetLastError()); + ok(exit_code == expected_exit_code, "exit_code = %u, expected %u\n", exit_code, expected_exit_code); + CloseHandle(pi.hThread); CloseHandle(pi.hProcess); CHECK_CALLED(reportSuccess); } -static BOOL WINAPI test_enum_proc(HMODULE module, LPCSTR type, LPSTR name, LONG_PTR param) +static void run_script(const char *name, const char *script_data, size_t script_size, DWORD expected_exit_code) { - const char *script_data, *ext; - DWORD script_size, size; char file_name[MAX_PATH]; + const char *ext; HANDLE file; - HRSRC src; + DWORD size; BOOL res; - trace("running %s test...\n", name); - - src = FindResourceA(NULL, name, type); - ok(src != NULL, "Could not find resource %s: %u\n", name, GetLastError()); - if(!src) - return TRUE; - - script_data = LoadResource(NULL, src); - script_size = SizeofResource(NULL, src); - while(script_size && !script_data[script_size-1]) - script_size--; - ext = strrchr(name, '.'); ok(ext != NULL, "no script extension\n"); if(!ext) - return TRUE; + return; sprintf(file_name, "test%s", ext); @@ -398,17 +391,43 @@ static BOOL WINAPI test_enum_proc(HMODULE module, LPCSTR type, LPSTR name, LONG_ FILE_ATTRIBUTE_NORMAL, NULL); ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); if(file == INVALID_HANDLE_VALUE) - return TRUE; + return; res = WriteFile(file, script_data, script_size, &size, NULL); CloseHandle(file); ok(res, "Could not write to file: %u\n", GetLastError()); if(!res) - return TRUE; + return; - run_test(file_name); + run_script_file(file_name, expected_exit_code); DeleteFileA(file_name); +} + +static void run_simple_script(const char *script, DWORD expected_exit_code) +{ + run_script("simple.js", script, strlen(script), expected_exit_code); +} + +static BOOL WINAPI test_enum_proc(HMODULE module, LPCSTR type, LPSTR name, LONG_PTR param) +{ + const char *script_data; + DWORD script_size; + HRSRC src; + + trace("running %s test...\n", name); + + src = FindResourceA(NULL, name, type); + ok(src != NULL, "Could not find resource %s: %u\n", name, GetLastError()); + if(!src) + return TRUE; + + script_data = LoadResource(NULL, src); + script_size = SizeofResource(NULL, src); + while(script_size && !script_data[script_size-1]) + script_size--; + + run_script(name, script_data, script_size, 0); return TRUE; } @@ -468,11 +487,17 @@ START_TEST(run) } argc = winetest_get_mainargs(&argv); - if(argc > 2) - run_test(argv[2]); - else + if(argc > 2) { + run_script_file(argv[2], 0); + }else { EnumResourceNamesA(NULL, "TESTSCRIPT", test_enum_proc, 0); + run_simple_script("var winetest = new ActiveXObject('Wine.Test');\n" + "winetest.reportSuccess();\n" + "WScript.Quit(3);\n" + "winetest.ok(false, 'not quit?');\n", 3); +} + init_registry(FALSE); CoUninitialize(); }
1
0
0
0
Thiago Barbato : wscript: Added WScript.Quit semi-stub implementation.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 341bb46fc693273b357842bdbe3260c017aa0318 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=341bb46fc693273b357842bdb…
Author: Thiago Barbato <thiagocbbt(a)gmail.com> Date: Fri Jul 8 12:43:39 2016 +0200 wscript: Added WScript.Quit semi-stub implementation. Signed-off-by: Thiago Barbato <thiagocbbt(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wscript/host.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 893d006..3c30c3c 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -224,8 +224,10 @@ static HRESULT WINAPI Host_put_Interactive(IHost *iface, VARIANT_BOOL v) static HRESULT WINAPI Host_Quit(IHost *iface, int ExitCode) { - WINE_FIXME("(%d)\n", ExitCode); - return E_NOTIMPL; + FIXME("(%d) semi-stub: no script engine clean up\n", ExitCode); + + ExitProcess(ExitCode); + return S_OK; } static HRESULT WINAPI Host_get_ScriptName(IHost *iface, BSTR *out_ScriptName)
1
0
0
0
Józef Kucia : d3d11/tests: Add test for immediate constant buffer.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 7dc5d5ebfe7c61d042fe211d183a7d06f8d71bde URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7dc5d5ebfe7c61d042fe211d1…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Jul 8 12:12:33 2016 +0200 d3d11/tests: Add test for immediate constant buffer. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 149 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 38dd9fb..69cf5cd 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -763,6 +763,49 @@ static void check_texture_float_(unsigned int line, ID3D11Texture2D *texture, check_texture_sub_resource_float_(line, texture, sub_resource_idx, expected_value, max_diff); } +#define check_texture_sub_resource_vec4(a, b, c, d) check_texture_sub_resource_vec4_(__LINE__, a, b, c, d) +static void check_texture_sub_resource_vec4_(unsigned int line, ID3D11Texture2D *texture, + unsigned int sub_resource_idx, const struct vec4 *expected_value, BYTE max_diff) +{ + struct texture_readback rb; + unsigned int x = 0, y = 0; + struct vec4 value = {0}; + BOOL all_match = TRUE; + + get_texture_readback(texture, sub_resource_idx, &rb); + for (y = 0; y < rb.height; ++y) + { + for (x = 0; x < rb.width; ++x) + { + value = *get_readback_vec4(&rb, x, y); + if (!compare_vec4(&value, expected_value, max_diff)) + { + all_match = FALSE; + break; + } + } + if (!all_match) + break; + } + release_texture_readback(&rb); + ok_(__FILE__, line)(all_match, + "Got unexpected value {%.8e, %.8e, %.8e, %.8e} at (%u, %u), sub-resource %u.\n", + value.x, value.y, value.z, value.w, x, y, sub_resource_idx); +} + +#define check_texture_vec4(a, b, c) check_texture_vec4_(__LINE__, a, b, c) +static void check_texture_vec4_(unsigned int line, ID3D11Texture2D *texture, + const struct vec4 *expected_value, BYTE max_diff) +{ + unsigned int sub_resource_idx, sub_resource_count; + D3D11_TEXTURE2D_DESC texture_desc; + + ID3D11Texture2D_GetDesc(texture, &texture_desc); + sub_resource_count = texture_desc.ArraySize * texture_desc.MipLevels; + for (sub_resource_idx = 0; sub_resource_idx < sub_resource_count; ++sub_resource_idx) + check_texture_sub_resource_vec4_(line, texture, sub_resource_idx, expected_value, max_diff); +} + static ID3D11Device *create_device(const struct device_desc *desc) { static const D3D_FEATURE_LEVEL default_feature_level[] = @@ -5734,7 +5777,7 @@ static void test_multiple_render_targets(void) static const D3D11_INPUT_ELEMENT_DESC layout_desc[] = { - {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, + {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, }; static const DWORD vs_code[] = { @@ -7748,7 +7791,7 @@ static void test_cb_relative_addressing(void) static const D3D11_INPUT_ELEMENT_DESC layout_desc[] = { - {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, + {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, }; static const DWORD vs_code[] = { @@ -9118,6 +9161,107 @@ static void test_create_unordered_access_view(void) ok(!refcount, "Device has %u references left.\n", refcount); } +static void test_immediate_constant_buffer(void) +{ + struct d3d11_test_context test_context; + D3D11_TEXTURE2D_DESC texture_desc; + ID3D11DeviceContext *context; + ID3D11RenderTargetView *rtv; + unsigned int index[4] = {0}; + ID3D11Texture2D *texture; + ID3D11PixelShader *ps; + ID3D11Device *device; + ID3D11Buffer *cb; + unsigned int i; + HRESULT hr; + + static const DWORD ps_code[] = + { +#if 0 + uint index; + + static const int int_array[6] = + { + 310, 111, 212, -513, -318, 0, + }; + + static const uint uint_array[6] = + { + 2, 7, 0x7f800000, 0xff800000, 0x7fc00000, 0 + }; + + static const float float_array[6] = + { + 76, 83.5f, 0.5f, 0.75f, -0.5f, 0.0f, + }; + + float4 main() : SV_Target + { + return float4(int_array[index], uint_array[index], float_array[index], 1.0f); + } +#endif + 0x43425844, 0xbad068da, 0xd631ea3c, 0x41648374, 0x3ccd0120, 0x00000001, 0x00000184, 0x00000003, + 0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000010c, 0x00000040, 0x00000043, + 0x00001835, 0x0000001a, 0x00000136, 0x00000002, 0x42980000, 0x00000000, 0x0000006f, 0x00000007, + 0x42a70000, 0x00000000, 0x000000d4, 0x7f800000, 0x3f000000, 0x00000000, 0xfffffdff, 0xff800000, + 0x3f400000, 0x00000000, 0xfffffec2, 0x7fc00000, 0xbf000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000001, 0x05000036, 0x00102082, 0x00000000, 0x00004001, 0x3f800000, + 0x06000036, 0x00100012, 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x06000056, 0x00102022, + 0x00000000, 0x0090901a, 0x0010000a, 0x00000000, 0x0600002b, 0x00102012, 0x00000000, 0x0090900a, + 0x0010000a, 0x00000000, 0x06000036, 0x00102042, 0x00000000, 0x0090902a, 0x0010000a, 0x00000000, + 0x0100003e, + }; + static struct vec4 expected_result[] = + { + { 310.0f, 2.0f, 76.00f, 1.0f}, + { 111.0f, 7.0f, 83.50f, 1.0f}, + { 212.0f, 2139095040.0f, 0.50f, 1.0f}, + {-513.0f, 4286578688.0f, 0.75f, 1.0f}, + {-318.0f, 2143289344.0f, -0.50f, 1.0f}, + { 0.0f, 0.0f, 0.0f, 1.0f}, + }; + + if (!init_test_context(&test_context, NULL)) + return; + + device = test_context.device; + context = test_context.immediate_context; + + hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); + + cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, sizeof(index), NULL); + ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb); + + ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc); + texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; + hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + + hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv); + ok(SUCCEEDED(hr), "Failed to create render target view, hr %#x.\n", hr); + ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rtv, NULL); + + for (i = 0; i < sizeof(expected_result) / sizeof(*expected_result); ++i) + { + *index = i; + ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, index, 0, 0); + + draw_quad(&test_context); + check_texture_vec4(texture, &expected_result[i], 0); + } + + ID3D11Buffer_Release(cb); + ID3D11PixelShader_Release(ps); + ID3D11Texture2D_Release(texture); + ID3D11RenderTargetView_Release(rtv); + release_test_context(&test_context); +} + START_TEST(d3d11) { test_create_device(); @@ -9167,4 +9311,5 @@ START_TEST(d3d11) test_null_sampler(); test_check_feature_support(); test_create_unordered_access_view(); + test_immediate_constant_buffer(); }
1
0
0
0
Józef Kucia : wined3d: Implement immediate constant buffer in GLSL backend.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: 9fb41539ea6bd48bfb4d49cb584772b31c945f77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9fb41539ea6bd48bfb4d49cb5…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Jul 8 12:12:32 2016 +0200 wined3d: Implement immediate constant buffer in GLSL backend. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 30 +++++++++++++++++++++++++++++- dlls/wined3d/shader.c | 2 +- dlls/wined3d/shader_sm4.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 7ad5acd..2c04260 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -559,6 +559,26 @@ static void shader_glsl_load_samplers(const struct wined3d_gl_info *gl_info, string_buffer_release(&priv->string_buffers, sampler_name); } +static void shader_glsl_load_icb(const struct wined3d_gl_info *gl_info, struct shader_glsl_priv *priv, + GLuint program_id, const struct wined3d_shader_reg_maps *reg_maps) +{ + const struct wined3d_shader_immediate_constant_buffer *icb = reg_maps->icb; + + if (icb) + { + struct wined3d_string_buffer *icb_name = string_buffer_get(&priv->string_buffers); + const char *prefix = shader_glsl_get_prefix(reg_maps->shader_version.type); + GLint icb_location; + + string_buffer_sprintf(icb_name, "%s_icb", prefix); + icb_location = GL_EXTCALL(glGetUniformLocation(program_id, icb_name->buffer)); + GL_EXTCALL(glUniform4fv(icb_location, icb->vec4_count, (const GLfloat *)icb->data)); + checkGLcall("Load immediate constant buffer"); + + string_buffer_release(&priv->string_buffers, icb_name); + } +} + /* Context activation is done by the caller. */ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, const struct wined3d_vec4 *constants, const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version) @@ -1892,6 +1912,11 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont if (shader->limits->constant_bool > 0 && reg_maps->boolean_constants) shader_addline(buffer, "uniform bool %s_b[%u];\n", prefix, shader->limits->constant_bool); + /* Declare immediate constant buffer */ + if (reg_maps->icb) + shader_addline(buffer, "uniform vec4 %s_icb[%u];\n", prefix, reg_maps->icb->vec4_count); + + /* Declare constant buffers */ for (i = 0; i < WINED3D_MAX_CBS; ++i) { if (reg_maps->cb_sizes[i]) @@ -7863,6 +7888,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const entry->constant_update_mask |= WINED3D_SHADER_CONST_POS_FIXUP; shader_glsl_init_uniform_block_bindings(gl_info, priv, program_id, &vshader->reg_maps); + shader_glsl_load_icb(gl_info, priv, program_id, &vshader->reg_maps); } else { @@ -7903,6 +7929,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const { entry->constant_update_mask |= WINED3D_SHADER_CONST_POS_FIXUP; shader_glsl_init_uniform_block_bindings(gl_info, priv, program_id, &gshader->reg_maps); + shader_glsl_load_icb(gl_info, priv, program_id, &gshader->reg_maps); } if (ps_id) @@ -7918,6 +7945,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_Y_CORR; shader_glsl_init_uniform_block_bindings(gl_info, priv, program_id, &pshader->reg_maps); + shader_glsl_load_icb(gl_info, priv, program_id, &pshader->reg_maps); } else { @@ -8611,7 +8639,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL_GLOBAL_FLAGS */ shader_glsl_nop, /* WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT */ NULL, /* WINED3DSIH_DCL_HS_MAX_TESSFACTOR */ NULL, - /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ NULL, + /* WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER */ shader_glsl_nop, /* WINED3DSIH_DCL_INDEXABLE_TEMP */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ NULL, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 9a9eafb..08cee35 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2235,7 +2235,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe else if (ins.handler_idx == WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER) { shader_addline(&buffer, "%s {\n", shader_opcode_names[ins.handler_idx]); - for (i = 0; i < ins.declaration.icb->element_count / 4; ++i) + for (i = 0; i < ins.declaration.icb->vec4_count; ++i) { shader_addline(&buffer, " {0x%08x, 0x%08x, 0x%08x, 0x%08x},\n", ins.declaration.icb->data[4 * i + 0], diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 72cd5fc..c8fdb32 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -447,7 +447,7 @@ static void shader_sm4_read_shader_data(struct wined3d_shader_instruction *ins, return; } - priv->icb.element_count = icb_size; + priv->icb.vec4_count = icb_size / 4; memcpy(priv->icb.data, tokens, sizeof(*tokens) * icb_size); ins->declaration.icb = &priv->icb; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 3de14e8..41c127b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -790,7 +790,7 @@ struct wined3d_shader_sampler_map struct wined3d_shader_immediate_constant_buffer { - UINT element_count; + unsigned int vec4_count; DWORD data[MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE]; };
1
0
0
0
Józef Kucia : d3d10core/tests: Add test for vertex formats.
by Alexandre Julliard
08 Jul '16
08 Jul '16
Module: wine Branch: master Commit: c06c1023df2787fb2ebb8f8081bed045152f9f9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c06c1023df2787fb2ebb8f808…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Jul 8 12:12:31 2016 +0200 d3d10core/tests: Add test for vertex formats. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10core/tests/device.c | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 4ef1b49..1071552 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -7969,6 +7969,72 @@ static void test_sm4_breakc_instruction(void) release_test_context(&test_context); } +static void test_create_input_layout(void) +{ + D3D10_INPUT_ELEMENT_DESC layout_desc[] = + { + {"POSITION", 0, DXGI_FORMAT_UNKNOWN, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, + }; + ID3D10InputLayout *input_layout; + ID3D10Device *device; + ULONG refcount; + unsigned int i; + HRESULT hr; + + static const DWORD vs_code[] = + { +#if 0 + float4 main(float4 position : POSITION) : SV_POSITION + { + return position; + } +#endif + 0x43425844, 0xa7a2f22d, 0x83ff2560, 0xe61638bd, 0x87e3ce90, 0x00000001, 0x000000d8, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x49534f50, 0x4e4f4954, 0xababab00, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, 0x52444853, 0x0000003c, 0x00010040, + 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, + 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, + }; + static const DXGI_FORMAT vertex_formats[] = + { + DXGI_FORMAT_R32G32_FLOAT, + DXGI_FORMAT_R32G32_UINT, + DXGI_FORMAT_R32G32_SINT, + DXGI_FORMAT_R16G16_FLOAT, + DXGI_FORMAT_R16G16_UINT, + DXGI_FORMAT_R16G16_SINT, + DXGI_FORMAT_R32_FLOAT, + DXGI_FORMAT_R32_UINT, + DXGI_FORMAT_R32_SINT, + DXGI_FORMAT_R16_UINT, + DXGI_FORMAT_R16_SINT, + DXGI_FORMAT_R8_UINT, + DXGI_FORMAT_R8_SINT, + }; + + if (!(device = create_device())) + { + skip("Failed to create device.\n"); + return; + } + + for (i = 0; i < sizeof(vertex_formats) / sizeof(*vertex_formats); ++i) + { + layout_desc->Format = vertex_formats[i]; + hr = ID3D10Device_CreateInputLayout(device, layout_desc, + sizeof(layout_desc) / sizeof(*layout_desc), vs_code, sizeof(vs_code), + &input_layout); + ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", + vertex_formats[i], hr); + ID3D10InputLayout_Release(input_layout); + } + + refcount = ID3D10Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +} + static void test_input_assembler(void) { enum layout_id @@ -8433,6 +8499,7 @@ START_TEST(device) test_shader_stage_input_output_matching(); test_sm4_if_instruction(); test_sm4_breakc_instruction(); + test_create_input_layout(); test_input_assembler(); test_null_sampler(); }
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
68
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
Results per page:
10
25
50
100
200