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
Michael Müller : ntdll: NtUnmapViewOfSection should succeed for all offsets within the mapped range.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 1311c8157be3e007b6de5a44df9171e940badb3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1311c8157be3e007b6de5a44d…
Author: Michael Müller <michael(a)fds-team.de> Date: Tue Jul 19 12:59:55 2016 +0200 ntdll: NtUnmapViewOfSection should succeed for all offsets within the mapped range. Signed-off-by: Michael Müller <michael(a)fds-team.de> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 6 ++---- dlls/ntdll/tests/info.c | 6 +++--- dlls/ntdll/virtual.c | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 75d772b..170ab7b 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -1007,15 +1007,13 @@ static void test_MapViewOfFile(void) ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); ret = UnmapViewOfFile( (char *)ptr + 4096 ); - todo_wine ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); - if (!ret) UnmapViewOfFile( ptr ); + ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); ret = UnmapViewOfFile( (char *)ptr + 4096 + 100 ); - todo_wine ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); - if (!ret) UnmapViewOfFile( ptr ); + ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); CloseHandle(mapping); CloseHandle(file); diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index be355fb..19c7d66 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1643,7 +1643,7 @@ static void test_mapprotection(void) status = pNtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &flags, sizeof(flags) ); ok( (status == STATUS_SUCCESS) || (status == STATUS_INVALID_INFO_CLASS), "Expected STATUS_SUCCESS, got %08x\n", status); - size.u.LowPart = 0x1000; + size.u.LowPart = 0x2000; size.u.HighPart = 0; status = pNtCreateSection ( &h, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE, @@ -1657,7 +1657,7 @@ static void test_mapprotection(void) offset.u.LowPart = 0; offset.u.HighPart = 0; - count = 0x1000; + count = 0x2000; addr = NULL; status = pNtMapViewOfSection ( h, GetCurrentProcess(), &addr, 0, 0, &offset, &count, ViewShare, 0, PAGE_READWRITE); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); @@ -1680,7 +1680,7 @@ static void test_mapprotection(void) ok( retlen == sizeof(info), "Expected STATUS_SUCCESS, got %08x\n", status); ok((info.Protect & ~PAGE_NOCACHE) == PAGE_READWRITE, "addr.Protect is not PAGE_READWRITE, but 0x%x\n", info.Protect); - status = pNtUnmapViewOfSection (GetCurrentProcess(), addr); + status = pNtUnmapViewOfSection( GetCurrentProcess(), (char *)addr + 0x1050 ); ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); pNtClose (h); diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 2e63b78..1e692c7 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -2737,7 +2737,6 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr ) struct file_view *view; NTSTATUS status = STATUS_NOT_MAPPED_VIEW; sigset_t sigset; - void *base = ROUND_ADDR( addr, page_mask ); if (process != NtCurrentProcess()) { @@ -2754,7 +2753,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr ) } server_enter_uninterrupted_section( &csVirtual, &sigset ); - if ((view = VIRTUAL_FindView( base, 0 )) && (base == view->base) && !(view->protect & VPROT_VALLOC)) + if ((view = VIRTUAL_FindView( addr, 0 )) && !(view->protect & VPROT_VALLOC)) { delete_view( view ); status = STATUS_SUCCESS;
1
0
0
0
Michael Müller : kernel32/tests: Add tests for UnmapViewOfFile with unaligned pointer.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 38d49350072419fa38a5f376fe00ba5dcb9a6f5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38d49350072419fa38a5f376f…
Author: Michael Müller <michael(a)fds-team.de> Date: Tue Jul 19 12:59:24 2016 +0200 kernel32/tests: Add tests for UnmapViewOfFile with unaligned pointer. Signed-off-by: Michael Müller <michael(a)fds-team.de> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 37206b5..75d772b 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -435,7 +435,7 @@ static void test_MapViewOfFile(void) SetLastError(0xdeadbeef); file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - SetFilePointer( file, 4096, NULL, FILE_BEGIN ); + SetFilePointer( file, 12288, NULL, FILE_BEGIN ); SetEndOfFile( file ); /* read/write mapping */ @@ -994,6 +994,30 @@ static void test_MapViewOfFile(void) ok(info.State == MEM_FREE, "%#x != MEM_FREE\n", info.State); ok(info.Type == 0, "%#x != 0\n", info.Type); + mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 12288, NULL ); + ok( mapping != NULL, "CreateFileMappingA failed with error %u\n", GetLastError() ); + + ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); + ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); + + ret = UnmapViewOfFile( (char *)ptr + 100 ); + ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); + + ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); + ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); + + ret = UnmapViewOfFile( (char *)ptr + 4096 ); + todo_wine ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); + if (!ret) UnmapViewOfFile( ptr ); + + ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 ); + ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() ); + + ret = UnmapViewOfFile( (char *)ptr + 4096 + 100 ); + todo_wine ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() ); + if (!ret) UnmapViewOfFile( ptr ); + + CloseHandle(mapping); CloseHandle(file); DeleteFileA(testfile); }
1
0
0
0
Michael Stefaniuc : dmsynth: Lock/unlock the module only on creation/ desctruction.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 8ba03f8a986b439d3b5b46ce58be1333222c8155 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ba03f8a986b439d3b5b46ce5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 19 09:53:07 2016 +0200 dmsynth: Lock/unlock the module only on creation/desctruction. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/synth.c | 7 +++---- dlls/dmsynth/synthsink.c | 5 +---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index fceeebd..88ba53e 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -72,8 +72,6 @@ static ULONG WINAPI IDirectMusicSynth8Impl_AddRef(LPDIRECTMUSICSYNTH8 iface) TRACE("(%p)->(): new ref = %u\n", This, ref); - DMSYNTH_LockModule(); - return ref; } @@ -88,10 +86,9 @@ static ULONG WINAPI IDirectMusicSynth8Impl_Release(LPDIRECTMUSICSYNTH8 iface) if (This->pLatencyClock) IReferenceClock_Release(This->pLatencyClock); HeapFree(GetProcessHeap(), 0, This); + DMSYNTH_UnlockModule(); } - DMSYNTH_UnlockModule(); - return ref; } @@ -605,7 +602,9 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj) obj->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB; strcpyW(obj->pCaps.wszDescription, descrW); + DMSYNTH_LockModule(); hr = IDirectMusicSynth8_QueryInterface(&obj->IDirectMusicSynth8_iface, riid, ppobj); IDirectMusicSynth8_Release(&obj->IDirectMusicSynth8_iface); + return hr; } diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 4720e59..7d148b0 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -67,8 +67,6 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef(LPDIRECTMUSICSYNTHSINK ifac TRACE("(%p)->(): new ref = %u\n", This, ref); - DMSYNTH_LockModule(); - return ref; } @@ -83,10 +81,9 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(LPDIRECTMUSICSYNTHSINK ifa if (This->latency_clock) IReferenceClock_Release(This->latency_clock); HeapFree(GetProcessHeap(), 0, This); + DMSYNTH_UnlockModule(); } - DMSYNTH_UnlockModule(); - return ref; }
1
0
0
0
Michael Stefaniuc : dmsynth/tests: Add COM tests for DMSynth and DMSynthSink.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 6f440bbad555ce2020c088cd4c6344d26e35c8db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f440bbad555ce2020c088cd4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 19 09:52:25 2016 +0200 dmsynth/tests: Add COM tests for DMSynth and DMSynthSink. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/tests/dmsynth.c | 95 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index 2d8e513..2035783 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -136,6 +136,99 @@ static void test_dmsynth(void) IDirectMusicSynth_Release(dmsynth); } +static void test_COM(void) +{ + IDirectMusicSynth8 *dms8 = (IDirectMusicSynth8*)0xdeadbeef; + IKsControl *iksc; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicSynth, (IUnknown*)&dms8, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dms8); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicSynth create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dms8, "dms8 = %p\n", dms8); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicObject, (void**)&dms8); + ok(hr == E_NOINTERFACE, "DirectMusicSynth create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all DirectMusicSynth interfaces */ + hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicSynth8, (void**)&dms8); + ok(hr == S_OK, "DirectMusicSynth create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicSynth8_AddRef(dms8); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IKsControl, (void**)&iksc); + ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr); + refcount = IKsControl_AddRef(iksc); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + IKsControl_Release(iksc); + + hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + IUnknown_Release(unk); + + /* Unsupported interfaces */ + hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IDirectMusicSynthSink, (void**)&unk); + ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicSynthSink failed: %08x\n", hr); + hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IReferenceClock, (void**)&unk); + ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr); + + while (IDirectMusicSynth8_Release(dms8)); +} + +static void test_COM_synthsink(void) +{ + IDirectMusicSynthSink *dmss = (IDirectMusicSynthSink*)0xdeadbeef; + IKsControl *iksc; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, (IUnknown*)&dmss, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dmss); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicSynthSink create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dmss, "dmss = %p\n", dmss); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicObject, (void**)&dmss); + ok(hr == E_NOINTERFACE, "DirectMusicSynthSink create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all DirectMusicSynthSink interfaces */ + hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicSynthSink, (void**)&dmss); + ok(hr == S_OK, "DirectMusicSynthSink create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicSynthSink_AddRef(dmss); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IKsControl, (void**)&iksc); + ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr); + refcount = IKsControl_AddRef(iksc); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + IKsControl_Release(iksc); + + hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + IUnknown_Release(unk); + + /* Unsupported interfaces */ + hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IReferenceClock, (void**)&unk); + ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr); + + while (IDirectMusicSynthSink_Release(dmss)); +} START_TEST(dmsynth) { CoInitializeEx(NULL, COINIT_MULTITHREADED); @@ -147,6 +240,8 @@ START_TEST(dmsynth) return; } test_dmsynth(); + test_COM(); + test_COM_synthsink(); CoUninitialize(); }
1
0
0
0
Michael Stefaniuc : dmsynth/tests: Move the dll availability check to a separate function.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 45c1f7d3ed33c7037358f94e7342324657f696d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45c1f7d3ed33c7037358f94e7…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 19 09:51:36 2016 +0200 dmsynth/tests: Move the dll availability check to a separate function. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/tests/dmsynth.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index ba094a1..2d8e513 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -30,6 +30,20 @@ #include "dmusici.h" #include "dmksctrl.h" +static BOOL missing_dmsynth(void) +{ + IDirectMusicSynth *dms; + HRESULT hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicSynth, (void**)&dms); + + if (hr == S_OK && dms) + { + IDirectMusicSynth_Release(dms); + return FALSE; + } + return TRUE; +} + static void test_dmsynth(void) { IDirectMusicSynth *dmsynth = NULL; @@ -44,11 +58,7 @@ static void test_dmsynth(void) ULONG bytes; hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (LPVOID*)&dmsynth); - if (hr != S_OK) - { - skip("Cannot create DirectMusicSync object (%x)\n", hr); - return; - } + ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, (LPVOID*)&dmsynth_sink); ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); @@ -130,6 +140,12 @@ START_TEST(dmsynth) { CoInitializeEx(NULL, COINIT_MULTITHREADED); + if (missing_dmsynth()) + { + skip("dmsynth not available\n"); + CoUninitialize(); + return; + } test_dmsynth(); CoUninitialize();
1
0
0
0
Michael Stefaniuc : dmsynth: The DMSynth{, Sink} COM objects don' t support aggregation.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 91ba1a2561a0e7ef275538407e9ab862667a8517 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91ba1a2561a0e7ef275538407…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 19 09:50:58 2016 +0200 dmsynth: The DMSynth{,Sink} COM objects don't support aggregation. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/dmsynth_main.c | 7 +++++-- dlls/dmsynth/dmsynth_private.h | 4 ++-- dlls/dmsynth/synth.c | 4 ++-- dlls/dmsynth/synthsink.c | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/dmsynth/dmsynth_main.c b/dlls/dmsynth/dmsynth_main.c index a95a613..1fb5157 100644 --- a/dlls/dmsynth/dmsynth_main.c +++ b/dlls/dmsynth/dmsynth_main.c @@ -32,7 +32,7 @@ LONG DMSYNTH_refCount = 0; typedef struct { IClassFactory IClassFactory_iface; - HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv, IUnknown *pUnkOuter); + HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv); } IClassFactoryImpl; /****************************************************************** @@ -84,7 +84,10 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv); - return This->fnCreateInstance(riid, ppv, pUnkOuter); + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + return This->fnCreateInstance(riid, ppv); } static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h index f056581..ed86ce0 100644 --- a/dlls/dmsynth/dmsynth_private.h +++ b/dlls/dmsynth/dmsynth_private.h @@ -50,8 +50,8 @@ typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl; /***************************************************************************** * ClassFactory */ -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; +extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj) DECLSPEC_HIDDEN; +extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl(REFIID riid, void **ppobj) DECLSPEC_HIDDEN; /***************************************************************************** * IDirectMusicSynth8Impl implementation structure diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index c5720ec..fceeebd 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -575,14 +575,14 @@ static const IKsControlVtbl DMSynthImpl_IKsControl_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj, IUnknown *outer) +HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj) { static const WCHAR descrW[] = {'M','i','c','r','o','s','o','f','t',' ', 'S','y','n','t','h','e','s','i','z','e','r',0}; IDirectMusicSynth8Impl *obj; HRESULT hr; - TRACE("(%s, %p, %p)\n", debugstr_guid(riid), ppobj, outer); + TRACE("(%s, %p)\n", debugstr_guid(riid), ppobj); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj)); if (NULL == obj) { diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 18ef50f..4720e59 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -267,12 +267,12 @@ static const IKsControlVtbl DMSynthSinkImpl_IKsControl_Vtbl = { }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl(LPCGUID riid, LPVOID* ret_iface, LPUNKNOWN unkouter) +HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl(REFIID riid, void **ret_iface) { IDirectMusicSynthSinkImpl *obj; HRESULT hr; - TRACE("(%p,%p,%p)\n", riid, ret_iface, unkouter); + TRACE("(%s, %p)\n", debugstr_guid(riid), ret_iface); *ret_iface = NULL;
1
0
0
0
Józef Kucia : wined3d: Enable rendering to integer textures.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: a7e52707b0519d666304d80da67eb63131527136 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7e52707b0519d666304d80da…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Jul 18 13:27:39 2016 +0200 wined3d: Enable rendering to integer textures. 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 | 9 ++++++++- dlls/d3d11/tests/d3d11.c | 7 +++++++ dlls/wined3d/utils.c | 14 +++++++++----- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index c84ea8d..7e161f5 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -1098,6 +1098,8 @@ static void test_create_texture2d(void) {DXGI_FORMAT_R32G32B32A32_TYPELESS, 2, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R32G32B32A32_TYPELESS, 9, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_DEPTH_STENCIL, 0, FALSE, FALSE}, + {DXGI_FORMAT_R32G32B32A32_UINT, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R32G32B32A32_SINT, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R32G32B32_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R16G16B16A16_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R16G16B16A16_TYPELESS, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, @@ -1113,7 +1115,7 @@ static void test_create_texture2d(void) {DXGI_FORMAT_R32_TYPELESS, 9, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R32_TYPELESS, 9, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE, FALSE, TRUE}, - {DXGI_FORMAT_R32_TYPELESS, 1, D3D11_BIND_DEPTH_STENCIL, 0, TRUE, FALSE}, + {DXGI_FORMAT_R32_TYPELESS, 1, D3D10_BIND_DEPTH_STENCIL, 0, TRUE, FALSE}, {DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_VERTEX_BUFFER, 0, FALSE, TRUE}, {DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_INDEX_BUFFER, 0, FALSE, TRUE}, {DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_CONSTANT_BUFFER, 0, FALSE, TRUE}, @@ -1125,10 +1127,15 @@ static void test_create_texture2d(void) {DXGI_FORMAT_R8G8_SNORM, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R16_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R16_TYPELESS, 1, D3D10_BIND_DEPTH_STENCIL, 0, TRUE, FALSE}, + {DXGI_FORMAT_R16_TYPELESS, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R16_UINT, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R16_SINT, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R8_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R8G8B8A8_UNORM, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R8G8B8A8_UNORM, 1, D3D10_BIND_DEPTH_STENCIL, 0, FALSE, FALSE}, + {DXGI_FORMAT_R8G8B8A8_UINT, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R8G8B8A8_SNORM, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R8G8B8A8_SINT, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_D24_UNORM_S8_UINT, 1, D3D10_BIND_RENDER_TARGET, 0, FALSE, FALSE}, {DXGI_FORMAT_D32_FLOAT, 1, D3D10_BIND_RENDER_TARGET, 0, FALSE, FALSE}, }; diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 0bcf477..e20b99b 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -1519,6 +1519,8 @@ static void test_create_texture2d(void) {DXGI_FORMAT_R32G32B32A32_TYPELESS, 2, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R32G32B32A32_TYPELESS, 9, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D11_BIND_DEPTH_STENCIL, 0, FALSE, FALSE}, + {DXGI_FORMAT_R32G32B32A32_UINT, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R32G32B32A32_SINT, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R32G32B32_TYPELESS, 1, D3D11_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R16G16B16A16_TYPELESS, 1, D3D11_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R16G16B16A16_TYPELESS, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, @@ -1546,10 +1548,15 @@ static void test_create_texture2d(void) {DXGI_FORMAT_R8G8_SNORM, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R16_TYPELESS, 1, D3D11_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R16_TYPELESS, 1, D3D11_BIND_DEPTH_STENCIL, 0, TRUE, FALSE}, + {DXGI_FORMAT_R16_TYPELESS, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R16_UINT, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R16_SINT, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R8_TYPELESS, 1, D3D11_BIND_SHADER_RESOURCE, 0, TRUE, FALSE}, {DXGI_FORMAT_R8G8B8A8_UNORM, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R8G8B8A8_UNORM, 1, D3D11_BIND_DEPTH_STENCIL, 0, FALSE, FALSE}, + {DXGI_FORMAT_R8G8B8A8_UINT, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_R8G8B8A8_SNORM, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, + {DXGI_FORMAT_R8G8B8A8_SINT, 1, D3D11_BIND_RENDER_TARGET, 0, TRUE, FALSE}, {DXGI_FORMAT_D24_UNORM_S8_UINT, 1, D3D11_BIND_RENDER_TARGET, 0, FALSE, FALSE}, {DXGI_FORMAT_D32_FLOAT, 1, D3D11_BIND_RENDER_TARGET, 0, FALSE, FALSE}, }; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 24e20ec..3406fdd 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1246,11 +1246,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_R8G8B8A8_UINT, GL_RGBA8UI, GL_RGBA8UI, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT_8_8_8_8_REV, 0, - WINED3DFMT_FLAG_TEXTURE, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, ARB_TEXTURE_RGB10_A2UI, NULL}, {WINED3DFMT_R8G8B8A8_SINT, GL_RGBA8I, GL_RGBA8I, 0, GL_RGBA_INTEGER, GL_BYTE, 0, - WINED3DFMT_FLAG_TEXTURE, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, EXT_TEXTURE_INTEGER, NULL}, {WINED3DFMT_R8G8B8X8_UNORM, GL_RGB8, GL_RGB8, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0, @@ -1287,7 +1287,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = ARB_TEXTURE_RG, NULL}, {WINED3DFMT_R16_UINT, GL_R16UI, GL_R16UI, 0, GL_RED_INTEGER, GL_UNSIGNED_SHORT, 0, - WINED3DFMT_FLAG_TEXTURE, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, + ARB_TEXTURE_RG, NULL}, + {WINED3DFMT_R16_SINT, GL_R16I, GL_R16I, 0, + GL_RED_INTEGER, GL_SHORT, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, ARB_TEXTURE_RG, NULL}, /* Luminance */ {WINED3DFMT_L8_UNORM, GL_LUMINANCE8, GL_SLUMINANCE8_EXT, 0, @@ -1480,11 +1484,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = ARB_DEPTH_BUFFER_FLOAT, convert_s8_uint_d24_float}, {WINED3DFMT_R32G32B32A32_UINT, GL_RGBA32UI, GL_RGBA32UI, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, 0, - WINED3DFMT_FLAG_TEXTURE, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, EXT_TEXTURE_INTEGER, NULL}, {WINED3DFMT_R32G32B32A32_SINT, GL_RGBA32I, GL_RGBA32I, 0, GL_RGBA_INTEGER, GL_INT, 0, - WINED3DFMT_FLAG_TEXTURE, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, EXT_TEXTURE_INTEGER, NULL}, /* Vendor-specific formats */ {WINED3DFMT_ATI1N, GL_COMPRESSED_RED_RGTC1, GL_COMPRESSED_RED_RGTC1, 0,
1
0
0
0
Józef Kucia : d3d10core/tests: Add test for DXGI_FORMAT_R10G10B10A2_UNORM vertex format.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 36c82e6d49fedfe3c6aa3592058f3349c57db7d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36c82e6d49fedfe3c6aa35920…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Jul 18 13:27:38 2016 +0200 d3d10core/tests: Add test for DXGI_FORMAT_R10G10B10A2_UNORM vertex format. 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 | 126 ++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 66 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index edfe27b..c84ea8d 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -8106,6 +8106,7 @@ static void test_input_assembler(void) LAYOUT_SINT8, LAYOUT_UNORM8, LAYOUT_SNORM8, + LAYOUT_UNORM10_2, LAYOUT_COUNT, }; @@ -8119,14 +8120,12 @@ static void test_input_assembler(void) ID3D10InputLayout *input_layout[LAYOUT_COUNT]; struct d3d10core_test_context test_context; ID3D10Buffer *vb_position, *vb_attribute; - unsigned int i, x, y, max_data_size; D3D10_TEXTURE2D_DESC texture_desc; + unsigned int i, j, stride, offset; ID3D10Texture2D *render_target; ID3D10RenderTargetView *rtv; - struct texture_readback rb; ID3D10PixelShader *ps; ID3D10Device *device; - UINT stride, offset; HRESULT hr; static const DXGI_FORMAT layout_formats[LAYOUT_COUNT] = @@ -8140,6 +8139,7 @@ static void test_input_assembler(void) DXGI_FORMAT_R8G8B8A8_SINT, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_R10G10B10A2_UNORM, }; static const struct { @@ -8250,63 +8250,70 @@ static void test_input_assembler(void) 0x00000000, 0x00101e46, 0x00000000, 0x0500002b, 0x001020f2, 0x00000001, 0x00101e46, 0x00000001, 0x0100003e, }; - static const float float32_data[] = - { - 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, - }; - static const unsigned short uint16_data[] = - { - 6, 8, 55, 777, 6, 8, 55, 777, 6, 8, 55, 777, 6, 8, 55, 777, - }; - static const short sint16_data[] = - { - -1, 33, 8, -77, -1, 33, 8, -77, -1, 33, 8, -77, -1, 33, 8, -77, - }; - static const unsigned short unorm16_data[] = - { - 0, 16383, 32767, 65535, 0, 16383, 32767, 65535, 0, 16383, 32767, 65535, 0, 16383, 32767, 65535, - }; - static const short snorm16_data[] = - { - -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, - }; - static const unsigned char uint8_data[] = - { - 0, 64, 128, 255, 0, 64, 128, 255, 0, 64, 128, 255, 0, 64, 128, 255, - }; - static const signed char sint8_data[] = - { - -128, 0, 127, 64, -128, 0, 127, 64, -128, 0, 127, 64, -128, 0, 127, 64, - }; + static const float float32_data[] = {1.0f, 2.0f, 3.0f, 4.0f}; + static const unsigned short uint16_data[] = {6, 8, 55, 777}; + static const short sint16_data[] = {-1, 33, 8, -77}; + static const unsigned short unorm16_data[] = {0, 16383, 32767, 65535}; + static const short snorm16_data[] = {-32768, 0, 32767, 0}; + static const unsigned char uint8_data[] = {0, 64, 128, 255}; + static const signed char sint8_data[] = {-128, 0, 127, 64}; + static const unsigned int uint32_zero = 0; + static const unsigned int uint32_max = 0xffffffff; + static const unsigned int unorm10_2_data= 0xa00003ff; + static const unsigned int g10_data = 0x000ffc00; + static const unsigned int a2_data = 0xc0000000; static const struct { enum layout_id layout_id; unsigned int stride; - unsigned int data_size; const void *data; struct vec4 expected_color; BOOL todo; } tests[] = { - {LAYOUT_FLOAT32, 4 * sizeof(*float32_data), sizeof(float32_data), float32_data, + {LAYOUT_FLOAT32, sizeof(float32_data), float32_data, {1.0f, 2.0f, 3.0f, 4.0f}}, - {LAYOUT_UINT16, 4 * sizeof(*uint16_data), sizeof(uint16_data), uint16_data, + {LAYOUT_UINT16, sizeof(uint16_data), uint16_data, {6.0f, 8.0f, 55.0f, 777.0f}, TRUE}, - {LAYOUT_SINT16, 4 * sizeof(*sint16_data), sizeof(sint16_data), sint16_data, + {LAYOUT_SINT16, sizeof(sint16_data), sint16_data, {-1.0f, 33.0f, 8.0f, -77.0f}, TRUE}, - {LAYOUT_UNORM16, 4 * sizeof(*unorm16_data), sizeof(unorm16_data), unorm16_data, + {LAYOUT_UNORM16, sizeof(unorm16_data), unorm16_data, {0.0f, 16383.0f / 65535.0f, 32767.0f / 65535.0f, 1.0f}}, - {LAYOUT_SNORM16, 4 * sizeof(*snorm16_data), sizeof(snorm16_data), snorm16_data, + {LAYOUT_SNORM16, sizeof(snorm16_data), snorm16_data, {-1.0f, 0.0f, 1.0f, 0.0f}}, - {LAYOUT_UINT8, 4 * sizeof(*uint8_data), sizeof(uint8_data), uint8_data, + {LAYOUT_UINT8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_UINT8, sizeof(uint32_max), &uint32_max, + {255.0f, 255.0f, 255.0f, 255.0f}}, + {LAYOUT_UINT8, sizeof(uint8_data), uint8_data, {0.0f, 64.0f, 128.0f, 255.0f}}, - {LAYOUT_SINT8, 4 * sizeof(*sint8_data), sizeof(sint8_data), sint8_data, + {LAYOUT_SINT8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_SINT8, sizeof(uint32_max), &uint32_max, + {-1.0f, -1.0f, -1.0f, -1.0f}}, + {LAYOUT_SINT8, sizeof(sint8_data), sint8_data, {-128.0f, 0.0f, 127.0f, 64.0f}}, - {LAYOUT_UNORM8, 4 * sizeof(*uint8_data), sizeof(uint8_data), uint8_data, + {LAYOUT_UNORM8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_UNORM8, sizeof(uint32_max), &uint32_max, + {1.0f, 1.0f, 1.0f, 1.0f}}, + {LAYOUT_UNORM8, sizeof(uint8_data), uint8_data, {0.0f, 64.0f / 255.0f, 128.0f / 255.0f, 1.0f}}, - {LAYOUT_SNORM8, 4 * sizeof(*sint8_data), sizeof(sint8_data), sint8_data, + {LAYOUT_SNORM8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_SNORM8, sizeof(sint8_data), sint8_data, {-1.0f, 0.0f, 1.0f, 64.0f / 127.0f}}, + {LAYOUT_UNORM10_2, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_UNORM10_2, sizeof(uint32_max), &uint32_max, + {1.0f, 1.0f, 1.0f, 1.0f}}, + {LAYOUT_UNORM10_2, sizeof(g10_data), &g10_data, + {0.0f, 1.0f, 0.0f, 0.0f}}, + {LAYOUT_UNORM10_2, sizeof(a2_data), &a2_data, + {0.0f, 0.0f, 0.0f, 1.0f}}, + {LAYOUT_UNORM10_2, sizeof(unorm10_2_data), &unorm10_2_data, + {1.0f, 0.0f, 512.0f / 1023.0f, 2.0f / 3.0f}}, }; if (!init_test_context(&test_context)) @@ -8333,15 +8340,8 @@ static void test_input_assembler(void) ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", layout_formats[i], hr); } - max_data_size = 0; - for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i) - { - if (tests[i].data_size > max_data_size) - max_data_size = tests[i].data_size; - } - vb_position = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad); - vb_attribute = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, max_data_size, NULL); + vb_attribute = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, 1024, NULL); texture_desc.Width = 640; texture_desc.Height = 480; @@ -8371,14 +8371,19 @@ static void test_input_assembler(void) for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i) { D3D10_BOX box = {0, 0, 0, 1, 1, 1}; - const struct vec4 *color; assert(tests[i].layout_id < LAYOUT_COUNT); ID3D10Device_IASetInputLayout(device, input_layout[tests[i].layout_id]); - box.right = tests[i].data_size; - ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)vb_attribute, 0, - &box, tests[i].data, 0, 0); + assert(4 * tests[i].stride <= 1024); + box.right = tests[i].stride; + for (j = 0; j < 4; ++j) + { + ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)vb_attribute, 0, + &box, tests[i].data, 0, 0); + box.left += tests[i].stride; + box.right += tests[i].stride; + } stride = tests[i].stride; ID3D10Device_IASetVertexBuffers(device, 1, 1, &vb_attribute, &stride, &offset); @@ -8400,6 +8405,7 @@ static void test_input_assembler(void) case DXGI_FORMAT_R32G32B32A32_FLOAT: case DXGI_FORMAT_R16G16B16A16_UNORM: case DXGI_FORMAT_R16G16B16A16_SNORM: + case DXGI_FORMAT_R10G10B10A2_UNORM: case DXGI_FORMAT_R8G8B8A8_UNORM: case DXGI_FORMAT_R8G8B8A8_SNORM: ID3D10Device_VSSetShader(device, vs_float); @@ -8407,19 +8413,7 @@ static void test_input_assembler(void) } ID3D10Device_Draw(device, 4, 0); - - get_texture_readback(render_target, 0, &rb); - for (y = 0; y < rb.height; ++y) - { - for (x = 0; x < rb.width; ++x) - { - color = get_readback_vec4(&rb, x, y); - ok(compare_vec4(color, &tests[i].expected_color, 2), - "Test %u: Got unexpected color {%.8e, %.8e, %.8e, %.8e} at (%u, %u).\n", - i, color->x, color->y, color->z, color->w, x, y); - } - } - release_texture_readback(&rb); + check_texture_vec4(render_target, &tests[i].expected_color, 2); } ID3D10Texture2D_Release(render_target);
1
0
0
0
Józef Kucia : d3d11/tests: Add test for DXGI_FORMAT_R10G10B10A2_UNORM vertex format.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: aae0628ba7c59a1fc05e2b5081f2a1405e7314b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aae0628ba7c59a1fc05e2b508…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Jul 18 13:27:37 2016 +0200 d3d11/tests: Add test for DXGI_FORMAT_R10G10B10A2_UNORM vertex format. 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 | 126 ++++++++++++++++++++++------------------------- 1 file changed, 60 insertions(+), 66 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index a83f622..0bcf477 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -8429,6 +8429,7 @@ static void test_input_assembler(void) LAYOUT_SINT8, LAYOUT_UNORM8, LAYOUT_SNORM8, + LAYOUT_UNORM10_2, LAYOUT_COUNT, }; @@ -8442,15 +8443,13 @@ static void test_input_assembler(void) ID3D11InputLayout *input_layout[LAYOUT_COUNT]; ID3D11Buffer *vb_position, *vb_attribute; struct d3d11_test_context test_context; - unsigned int i, x, y, max_data_size; D3D11_TEXTURE2D_DESC texture_desc; + unsigned int i, j, stride, offset; ID3D11Texture2D *render_target; ID3D11DeviceContext *context; ID3D11RenderTargetView *rtv; - struct texture_readback rb; ID3D11PixelShader *ps; ID3D11Device *device; - UINT stride, offset; HRESULT hr; static const DXGI_FORMAT layout_formats[LAYOUT_COUNT] = @@ -8464,6 +8463,7 @@ static void test_input_assembler(void) DXGI_FORMAT_R8G8B8A8_SINT, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_R10G10B10A2_UNORM, }; static const struct { @@ -8574,63 +8574,70 @@ static void test_input_assembler(void) 0x00000000, 0x00101e46, 0x00000000, 0x0500002b, 0x001020f2, 0x00000001, 0x00101e46, 0x00000001, 0x0100003e, }; - static const float float32_data[] = - { - 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, - }; - static const unsigned short uint16_data[] = - { - 6, 8, 55, 777, 6, 8, 55, 777, 6, 8, 55, 777, 6, 8, 55, 777, - }; - static const short sint16_data[] = - { - -1, 33, 8, -77, -1, 33, 8, -77, -1, 33, 8, -77, -1, 33, 8, -77, - }; - static const unsigned short unorm16_data[] = - { - 0, 16383, 32767, 65535, 0, 16383, 32767, 65535, 0, 16383, 32767, 65535, 0, 16383, 32767, 65535, - }; - static const short snorm16_data[] = - { - -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, -32768, 0, 32767, 0, - }; - static const unsigned char uint8_data[] = - { - 0, 64, 128, 255, 0, 64, 128, 255, 0, 64, 128, 255, 0, 64, 128, 255, - }; - static const signed char sint8_data[] = - { - -128, 0, 127, 64, -128, 0, 127, 64, -128, 0, 127, 64, -128, 0, 127, 64, - }; + static const float float32_data[] = {1.0f, 2.0f, 3.0f, 4.0f}; + static const unsigned short uint16_data[] = {6, 8, 55, 777}; + static const short sint16_data[] = {-1, 33, 8, -77}; + static const unsigned short unorm16_data[] = {0, 16383, 32767, 65535}; + static const short snorm16_data[] = {-32768, 0, 32767, 0}; + static const unsigned char uint8_data[] = {0, 64, 128, 255}; + static const signed char sint8_data[] = {-128, 0, 127, 64}; + static const unsigned int uint32_zero = 0; + static const unsigned int uint32_max = 0xffffffff; + static const unsigned int unorm10_2_data= 0xa00003ff; + static const unsigned int g10_data = 0x000ffc00; + static const unsigned int a2_data = 0xc0000000; static const struct { enum layout_id layout_id; unsigned int stride; - unsigned int data_size; const void *data; struct vec4 expected_color; BOOL todo; } tests[] = { - {LAYOUT_FLOAT32, 4 * sizeof(*float32_data), sizeof(float32_data), float32_data, + {LAYOUT_FLOAT32, sizeof(float32_data), float32_data, {1.0f, 2.0f, 3.0f, 4.0f}}, - {LAYOUT_UINT16, 4 * sizeof(*uint16_data), sizeof(uint16_data), uint16_data, + {LAYOUT_UINT16, sizeof(uint16_data), uint16_data, {6.0f, 8.0f, 55.0f, 777.0f}, TRUE}, - {LAYOUT_SINT16, 4 * sizeof(*sint16_data), sizeof(sint16_data), sint16_data, + {LAYOUT_SINT16, sizeof(sint16_data), sint16_data, {-1.0f, 33.0f, 8.0f, -77.0f}, TRUE}, - {LAYOUT_UNORM16, 4 * sizeof(*unorm16_data), sizeof(unorm16_data), unorm16_data, + {LAYOUT_UNORM16, sizeof(unorm16_data), unorm16_data, {0.0f, 16383.0f / 65535.0f, 32767.0f / 65535.0f, 1.0f}}, - {LAYOUT_SNORM16, 4 * sizeof(*snorm16_data), sizeof(snorm16_data), snorm16_data, + {LAYOUT_SNORM16, sizeof(snorm16_data), snorm16_data, {-1.0f, 0.0f, 1.0f, 0.0f}}, - {LAYOUT_UINT8, 4 * sizeof(*uint8_data), sizeof(uint8_data), uint8_data, + {LAYOUT_UINT8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_UINT8, sizeof(uint32_max), &uint32_max, + {255.0f, 255.0f, 255.0f, 255.0f}}, + {LAYOUT_UINT8, sizeof(uint8_data), uint8_data, {0.0f, 64.0f, 128.0f, 255.0f}}, - {LAYOUT_SINT8, 4 * sizeof(*sint8_data), sizeof(sint8_data), sint8_data, + {LAYOUT_SINT8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_SINT8, sizeof(uint32_max), &uint32_max, + {-1.0f, -1.0f, -1.0f, -1.0f}}, + {LAYOUT_SINT8, sizeof(sint8_data), sint8_data, {-128.0f, 0.0f, 127.0f, 64.0f}}, - {LAYOUT_UNORM8, 4 * sizeof(*uint8_data), sizeof(uint8_data), uint8_data, + {LAYOUT_UNORM8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_UNORM8, sizeof(uint32_max), &uint32_max, + {1.0f, 1.0f, 1.0f, 1.0f}}, + {LAYOUT_UNORM8, sizeof(uint8_data), uint8_data, {0.0f, 64.0f / 255.0f, 128.0f / 255.0f, 1.0f}}, - {LAYOUT_SNORM8, 4 * sizeof(*sint8_data), sizeof(sint8_data), sint8_data, + {LAYOUT_SNORM8, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_SNORM8, sizeof(sint8_data), sint8_data, {-1.0f, 0.0f, 1.0f, 64.0f / 127.0f}}, + {LAYOUT_UNORM10_2, sizeof(uint32_zero), &uint32_zero, + {0.0f, 0.0f, 0.0f, 0.0f}}, + {LAYOUT_UNORM10_2, sizeof(uint32_max), &uint32_max, + {1.0f, 1.0f, 1.0f, 1.0f}}, + {LAYOUT_UNORM10_2, sizeof(g10_data), &g10_data, + {0.0f, 1.0f, 0.0f, 0.0f}}, + {LAYOUT_UNORM10_2, sizeof(a2_data), &a2_data, + {0.0f, 0.0f, 0.0f, 1.0f}}, + {LAYOUT_UNORM10_2, sizeof(unorm10_2_data), &unorm10_2_data, + {1.0f, 0.0f, 512.0f / 1023.0f, 2.0f / 3.0f}}, }; if (!init_test_context(&test_context, NULL)) @@ -8658,15 +8665,8 @@ static void test_input_assembler(void) ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", layout_formats[i], hr); } - max_data_size = 0; - for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i) - { - if (tests[i].data_size > max_data_size) - max_data_size = tests[i].data_size; - } - vb_position = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, sizeof(quad), quad); - vb_attribute = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, max_data_size, NULL); + vb_attribute = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, 1024, NULL); texture_desc.Width = 640; texture_desc.Height = 480; @@ -8696,14 +8696,19 @@ static void test_input_assembler(void) for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i) { D3D11_BOX box = {0, 0, 0, 1, 1, 1}; - const struct vec4 *color; assert(tests[i].layout_id < LAYOUT_COUNT); ID3D11DeviceContext_IASetInputLayout(context, input_layout[tests[i].layout_id]); - box.right = tests[i].data_size; - ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)vb_attribute, 0, - &box, tests[i].data, 0, 0); + assert(4 * tests[i].stride <= 1024); + box.right = tests[i].stride; + for (j = 0; j < 4; ++j) + { + ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)vb_attribute, 0, + &box, tests[i].data, 0, 0); + box.left += tests[i].stride; + box.right += tests[i].stride; + } stride = tests[i].stride; ID3D11DeviceContext_IASetVertexBuffers(context, 1, 1, &vb_attribute, &stride, &offset); @@ -8725,6 +8730,7 @@ static void test_input_assembler(void) case DXGI_FORMAT_R32G32B32A32_FLOAT: case DXGI_FORMAT_R16G16B16A16_UNORM: case DXGI_FORMAT_R16G16B16A16_SNORM: + case DXGI_FORMAT_R10G10B10A2_UNORM: case DXGI_FORMAT_R8G8B8A8_UNORM: case DXGI_FORMAT_R8G8B8A8_SNORM: ID3D11DeviceContext_VSSetShader(context, vs_float, NULL, 0); @@ -8732,19 +8738,7 @@ static void test_input_assembler(void) } ID3D11DeviceContext_Draw(context, 4, 0); - - get_texture_readback(render_target, 0, &rb); - for (y = 0; y < rb.height; ++y) - { - for (x = 0; x < rb.width; ++x) - { - color = get_readback_vec4(&rb, x, y); - ok(compare_vec4(color, &tests[i].expected_color, 2), - "Test %u: Got unexpected color {%.8e, %.8e, %.8e, %.8e} at (%u, %u).\n", - i, color->x, color->y, color->z, color->w, x, y); - } - } - release_texture_readback(&rb); + check_texture_vec4(render_target, &tests[i].expected_color, 2); } ID3D11Texture2D_Release(render_target);
1
0
0
0
Józef Kucia : wined3d: Add support for WINEDFMT_R10G10B10A2_UNORM vertex format.
by Alexandre Julliard
19 Jul '16
19 Jul '16
Module: wine Branch: master Commit: 77c4bd0aa90e05c0edf06fe256eff9298f6d61cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77c4bd0aa90e05c0edf06fe25…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Jul 18 13:27:36 2016 +0200 wined3d: Add support for WINEDFMT_R10G10B10A2_UNORM vertex format. 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/utils.c | 70 +++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 522a891..24e20ec 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -329,41 +329,44 @@ struct wined3d_format_vertex_info unsigned int component_count; GLenum gl_vtx_type; GLboolean gl_normalized; + enum wined3d_gl_extension extension; }; static const struct wined3d_format_vertex_info format_vertex_info[] = { - {WINED3DFMT_R32_FLOAT, WINED3D_FFP_EMIT_FLOAT1, 1, GL_FLOAT, GL_FALSE}, - {WINED3DFMT_R32G32_FLOAT, WINED3D_FFP_EMIT_FLOAT2, 2, GL_FLOAT, GL_FALSE}, - {WINED3DFMT_R32G32B32_FLOAT, WINED3D_FFP_EMIT_FLOAT3, 3, GL_FLOAT, GL_FALSE}, - {WINED3DFMT_R32G32B32A32_FLOAT, WINED3D_FFP_EMIT_FLOAT4, 4, GL_FLOAT, GL_FALSE}, - {WINED3DFMT_B8G8R8A8_UNORM, WINED3D_FFP_EMIT_D3DCOLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE }, - {WINED3DFMT_R8G8B8A8_UINT, WINED3D_FFP_EMIT_UBYTE4, 4, GL_UNSIGNED_BYTE, GL_FALSE}, - {WINED3DFMT_R16G16_UINT, WINED3D_FFP_EMIT_INVALID, 2, GL_UNSIGNED_SHORT, GL_FALSE}, - {WINED3DFMT_R16G16_SINT, WINED3D_FFP_EMIT_SHORT2, 2, GL_SHORT, GL_FALSE}, - {WINED3DFMT_R16G16B16A16_SINT, WINED3D_FFP_EMIT_SHORT4, 4, GL_SHORT, GL_FALSE}, - {WINED3DFMT_R8G8B8A8_UNORM, WINED3D_FFP_EMIT_UBYTE4N, 4, GL_UNSIGNED_BYTE, GL_TRUE }, - {WINED3DFMT_R16G16_SNORM, WINED3D_FFP_EMIT_SHORT2N, 2, GL_SHORT, GL_TRUE }, - {WINED3DFMT_R16G16B16A16_SNORM, WINED3D_FFP_EMIT_SHORT4N, 4, GL_SHORT, GL_TRUE }, - {WINED3DFMT_R16G16_UNORM, WINED3D_FFP_EMIT_USHORT2N, 2, GL_UNSIGNED_SHORT, GL_TRUE }, - {WINED3DFMT_R16G16B16A16_UNORM, WINED3D_FFP_EMIT_USHORT4N, 4, GL_UNSIGNED_SHORT, GL_TRUE }, - {WINED3DFMT_R10G10B10A2_UINT, WINED3D_FFP_EMIT_UDEC3, 3, GL_UNSIGNED_SHORT, GL_FALSE}, - {WINED3DFMT_R10G10B10A2_SNORM, WINED3D_FFP_EMIT_DEC3N, 3, GL_SHORT, GL_TRUE }, - {WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_HALF_FLOAT, GL_FALSE}, - {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_HALF_FLOAT, GL_FALSE}, - {WINED3DFMT_R8G8B8A8_SNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, GL_TRUE }, - {WINED3DFMT_R8G8B8A8_SINT, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, GL_FALSE}, - {WINED3DFMT_R16G16B16A16_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_SHORT, GL_FALSE}, - {WINED3DFMT_R8_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_BYTE, GL_FALSE}, - {WINED3DFMT_R8_SINT, WINED3D_FFP_EMIT_INVALID, 1, GL_BYTE, GL_FALSE}, - {WINED3DFMT_R16_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_SHORT, GL_FALSE}, - {WINED3DFMT_R16_SINT, WINED3D_FFP_EMIT_INVALID, 1, GL_SHORT, GL_FALSE}, - {WINED3DFMT_R32_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_INT, GL_FALSE}, - {WINED3DFMT_R32_SINT, WINED3D_FFP_EMIT_INVALID, 1, GL_INT, GL_FALSE}, - {WINED3DFMT_R32G32_UINT, WINED3D_FFP_EMIT_INVALID, 2, GL_UNSIGNED_INT, GL_FALSE}, - {WINED3DFMT_R32G32_SINT, WINED3D_FFP_EMIT_INVALID, 2, GL_INT, GL_FALSE}, - {WINED3DFMT_R32G32B32_UINT, WINED3D_FFP_EMIT_INVALID, 3, GL_UNSIGNED_INT, GL_FALSE}, - {WINED3DFMT_R32G32B32A32_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_INT, GL_FALSE}, + {WINED3DFMT_R32_FLOAT, WINED3D_FFP_EMIT_FLOAT1, 1, GL_FLOAT, GL_FALSE}, + {WINED3DFMT_R32G32_FLOAT, WINED3D_FFP_EMIT_FLOAT2, 2, GL_FLOAT, GL_FALSE}, + {WINED3DFMT_R32G32B32_FLOAT, WINED3D_FFP_EMIT_FLOAT3, 3, GL_FLOAT, GL_FALSE}, + {WINED3DFMT_R32G32B32A32_FLOAT, WINED3D_FFP_EMIT_FLOAT4, 4, GL_FLOAT, GL_FALSE}, + {WINED3DFMT_B8G8R8A8_UNORM, WINED3D_FFP_EMIT_D3DCOLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE }, + {WINED3DFMT_R8G8B8A8_UINT, WINED3D_FFP_EMIT_UBYTE4, 4, GL_UNSIGNED_BYTE, GL_FALSE}, + {WINED3DFMT_R16G16_UINT, WINED3D_FFP_EMIT_INVALID, 2, GL_UNSIGNED_SHORT, GL_FALSE}, + {WINED3DFMT_R16G16_SINT, WINED3D_FFP_EMIT_SHORT2, 2, GL_SHORT, GL_FALSE}, + {WINED3DFMT_R16G16B16A16_SINT, WINED3D_FFP_EMIT_SHORT4, 4, GL_SHORT, GL_FALSE}, + {WINED3DFMT_R8G8B8A8_UNORM, WINED3D_FFP_EMIT_UBYTE4N, 4, GL_UNSIGNED_BYTE, GL_TRUE }, + {WINED3DFMT_R16G16_SNORM, WINED3D_FFP_EMIT_SHORT2N, 2, GL_SHORT, GL_TRUE }, + {WINED3DFMT_R16G16B16A16_SNORM, WINED3D_FFP_EMIT_SHORT4N, 4, GL_SHORT, GL_TRUE }, + {WINED3DFMT_R16G16_UNORM, WINED3D_FFP_EMIT_USHORT2N, 2, GL_UNSIGNED_SHORT, GL_TRUE }, + {WINED3DFMT_R16G16B16A16_UNORM, WINED3D_FFP_EMIT_USHORT4N, 4, GL_UNSIGNED_SHORT, GL_TRUE }, + {WINED3DFMT_R10G10B10A2_UINT, WINED3D_FFP_EMIT_UDEC3, 3, GL_UNSIGNED_SHORT, GL_FALSE}, + {WINED3DFMT_R10G10B10A2_SNORM, WINED3D_FFP_EMIT_DEC3N, 3, GL_SHORT, GL_TRUE }, + {WINED3DFMT_R10G10B10A2_UNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_INT_2_10_10_10_REV, GL_TRUE, + ARB_VERTEX_TYPE_2_10_10_10_REV}, + {WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_HALF_FLOAT, GL_FALSE}, + {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_HALF_FLOAT, GL_FALSE}, + {WINED3DFMT_R8G8B8A8_SNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, GL_TRUE }, + {WINED3DFMT_R8G8B8A8_SINT, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, GL_FALSE}, + {WINED3DFMT_R16G16B16A16_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_SHORT, GL_FALSE}, + {WINED3DFMT_R8_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_BYTE, GL_FALSE}, + {WINED3DFMT_R8_SINT, WINED3D_FFP_EMIT_INVALID, 1, GL_BYTE, GL_FALSE}, + {WINED3DFMT_R16_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_SHORT, GL_FALSE}, + {WINED3DFMT_R16_SINT, WINED3D_FFP_EMIT_INVALID, 1, GL_SHORT, GL_FALSE}, + {WINED3DFMT_R32_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_INT, GL_FALSE}, + {WINED3DFMT_R32_SINT, WINED3D_FFP_EMIT_INVALID, 1, GL_INT, GL_FALSE}, + {WINED3DFMT_R32G32_UINT, WINED3D_FFP_EMIT_INVALID, 2, GL_UNSIGNED_INT, GL_FALSE}, + {WINED3DFMT_R32G32_SINT, WINED3D_FFP_EMIT_INVALID, 2, GL_INT, GL_FALSE}, + {WINED3DFMT_R32G32B32_UINT, WINED3D_FFP_EMIT_INVALID, 3, GL_UNSIGNED_INT, GL_FALSE}, + {WINED3DFMT_R32G32B32A32_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_INT, GL_FALSE}, }; struct wined3d_format_texture_info @@ -3273,6 +3276,8 @@ static unsigned int calculate_vertex_attribute_size(GLenum type, unsigned int co return component_count * sizeof(GLint); case GL_UNSIGNED_INT: return component_count * sizeof(GLuint); + case GL_UNSIGNED_INT_2_10_10_10_REV: + return sizeof(GLuint); default: FIXME("Unhandled GL type %#x.\n", type); return 0; @@ -3295,6 +3300,9 @@ static BOOL init_format_vertex_info(struct wined3d_gl_info *gl_info) return FALSE; } + if (!gl_info->supported[format_vertex_info[i].extension]) + continue; + format = &gl_info->formats[fmt_idx]; format->emit_idx = format_vertex_info[i].emit_idx; format->component_count = format_vertex_info[i].component_count;
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
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