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
November 2015
----- 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
623 discussions
Start a n
N
ew thread
Jacek Caban : ntdll: Return STATUS_PENDING in NtNotifyChangeKey if async notify is performed.
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 7d66a01fc2f4153f74a1b19cb6d796cb0e573539 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d66a01fc2f4153f74a1b19cb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 9 12:42:16 2015 +0100 ntdll: Return STATUS_PENDING in NtNotifyChangeKey if async notify is performed. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/reg.c | 6 +++--- dlls/ntdll/tests/reg.c | 26 ++++++++++++++++++++++++-- server/registry.c | 2 ++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 4dff186..1bcd8fd 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -678,12 +678,12 @@ NTSTATUS WINAPI NtNotifyChangeKey( if (!Asynchronous) { - if (ret == STATUS_SUCCESS) - NtWaitForSingleObject( Event, FALSE, NULL ); + if (ret == STATUS_PENDING) + ret = NtWaitForSingleObject( Event, FALSE, NULL ); NtClose( Event ); } - return STATUS_SUCCESS; + return ret; } /****************************************************************************** diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 1fe9ef3..7b4ae25 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -147,6 +147,7 @@ static LPVOID (WINAPI * pRtlAllocateHeap)(PVOID,ULONG,ULONG); static NTSTATUS (WINAPI * pRtlZeroMemory)(PVOID, ULONG); static NTSTATUS (WINAPI * pRtlpNtQueryValueKey)(HANDLE,ULONG*,PBYTE,DWORD*,void *); static NTSTATUS (WINAPI * pNtNotifyChangeKey)(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,BOOLEAN,PVOID,ULONG,BOOLEAN); +static NTSTATUS (WINAPI * pNtWaitForSingleObject)(HANDLE,BOOLEAN,const LARGE_INTEGER*); static HMODULE hntdll = 0; static int CurrentTest = 0; @@ -195,6 +196,7 @@ static BOOL InitFunctionPtrs(void) NTDLL_GET_PROC(RtlZeroMemory) NTDLL_GET_PROC(RtlpNtQueryValueKey) NTDLL_GET_PROC(RtlOpenCurrentUser) + NTDLL_GET_PROC(NtWaitForSingleObject) /* optional functions */ pNtQueryLicenseValue = (void *)GetProcAddress(hntdll, "NtQueryLicenseValue"); @@ -1507,9 +1509,11 @@ static void test_NtQueryKey(void) static void test_notify(void) { OBJECT_ATTRIBUTES attr; + LARGE_INTEGER timeout; IO_STATUS_BLOCK iosb; + UNICODE_STRING str; + HANDLE key, event, subkey; NTSTATUS status; - HANDLE key, event; InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); @@ -1520,7 +1524,25 @@ static void test_notify(void) ok(event != NULL, "CreateEvent failed: %u\n", GetLastError()); status = pNtNotifyChangeKey(key, event, NULL, NULL, &iosb, REG_NOTIFY_CHANGE_NAME, FALSE, NULL, 0, TRUE); - todo_wine ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status); + ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status); + + timeout.QuadPart = 0; + status = pNtWaitForSingleObject(event, FALSE, &timeout); + ok(status == STATUS_TIMEOUT, "NtWaitForSingleObject returned %x\n", status); + + attr.RootDirectory = key; + attr.ObjectName = &str; + + pRtlCreateUnicodeStringFromAsciiz(&str, "test_subkey"); + status = pNtCreateKey(&subkey, GENERIC_ALL, &attr, 0, 0, 0, 0); + ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status); + + status = pNtWaitForSingleObject(event, FALSE, &timeout); + todo_wine ok(status == STATUS_SUCCESS, "NtWaitForSingleObject returned %x\n", status); + + status = pNtDeleteKey(subkey); + ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %x\n", status); + pNtClose(subkey); pNtClose(key); pNtClose(event); diff --git a/server/registry.c b/server/registry.c index 7f7a7b1..5b4250b 100644 --- a/server/registry.c +++ b/server/registry.c @@ -2289,6 +2289,8 @@ DECL_HANDLER(set_registry_notification) list_add_head( &key->notify_list, ¬ify->entry ); } } + if (notify) + set_error( STATUS_PENDING ); release_object( event ); } release_object( key );
1
0
0
0
Martin Storsjo : ucrtbase: Hook up _seh_filter_exe and _seh_filter_dll.
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: cd785109739a568abcdbd1057c08c8a462112ffd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd785109739a568abcdbd1057…
Author: Martin Storsjo <martin(a)martin.st> Date: Mon Nov 9 14:10:05 2015 +0200 ucrtbase: Hook up _seh_filter_exe and _seh_filter_dll. This gives more sensible crash behaviour e.g. if an unimplemented function is called. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec | 4 ++-- dlls/ucrtbase/ucrtbase.spec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec index d52b81b..6afa042 100644 --- a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec +++ b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec @@ -63,8 +63,8 @@ @ stub _register_onexit_function @ stub _register_thread_local_exe_atexit_callback @ cdecl _resetstkoflw() ucrtbase._resetstkoflw -@ stub _seh_filter_dll -@ stub _seh_filter_exe +@ cdecl -arch=i386,x86_64,arm _seh_filter_dll(long ptr) ucrtbase._seh_filter_dll +@ cdecl _seh_filter_exe(long ptr) ucrtbase._seh_filter_exe @ cdecl _set_abort_behavior(long long) ucrtbase._set_abort_behavior @ cdecl _set_app_type(long) ucrtbase._set_app_type @ cdecl _set_controlfp(long long) ucrtbase._set_controlfp diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 7d8d4d1..c3f76d1 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -1874,8 +1874,8 @@ @ cdecl -arch=arm,x86_64 _scalbf(float long) MSVCRT__scalbf @ cdecl _searchenv(str str ptr) MSVCRT__searchenv @ cdecl _searchenv_s(str str ptr long) MSVCRT__searchenv_s -@ stub _seh_filter_dll -@ stub _seh_filter_exe +@ cdecl -arch=i386,x86_64,arm _seh_filter_dll(long ptr) __CppXcptFilter +@ cdecl _seh_filter_exe(long ptr) _XcptFilter @ stub _set_FMA3_enable @ stdcall -arch=i386 _seh_longjmp_unwind4(ptr) @ stdcall -arch=i386 _seh_longjmp_unwind(ptr)
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_immediate_context_GSSetShaderResources().
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 6dc3a0117df1368e816f43444ef5e75caed596de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6dc3a0117df1368e816f43444…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:18 2015 +0100 d3d11: Implement d3d11_immediate_context_GSSetShaderResources(). 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/device.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 89dcf19..9f98104 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -450,7 +450,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SetPredication(ID3D11Devic static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D11DeviceContext *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views); + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + unsigned int i; + + TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views); + + wined3d_mutex_lock(); + for (i = 0; i < view_count; ++i) + { + struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); + + wined3d_device_set_gs_resource_view(device->wined3d_device, start_slot + i, + view ? view->wined3d_view : NULL); + } + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11DeviceContext *iface,
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_immediate_context_GSSetConstantBuffers().
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 38ef285262d7430f7ef6cb9569bbf5e0dd8a9d29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38ef285262d7430f7ef6cb956…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:17 2015 +0100 d3d11: Implement d3d11_immediate_context_GSSetConstantBuffers(). 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/device.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 3e209f2..89dcf19 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -361,8 +361,21 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstanced(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers(ID3D11DeviceContext *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n", + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + unsigned int i; + + TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers); + + wined3d_mutex_lock(); + for (i = 0; i < buffer_count; ++i) + { + struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); + + wined3d_device_set_gs_cb(device->wined3d_device, start_slot + i, + buffer ? buffer->wined3d_buffer : NULL); + } + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceContext *iface,
1
0
0
0
Józef Kucia : d3d11/tests: Port test_update_subresource() from d3d10core.
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 294b172a9e383a500e598e3cd8726ce05e2814cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=294b172a9e383a500e598e3cd…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:16 2015 +0100 d3d11/tests: Port test_update_subresource() from d3d10core. 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 | 274 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 274 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=294b172a9e383a500e598…
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_immediate_context_UpdateSubresource().
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 203860503024cd59c7f5f526625454c6d66f9864 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=203860503024cd59c7f5f5266…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:15 2015 +0100 d3d11: Implement d3d11_immediate_context_UpdateSubresource(). 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/device.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d8a219e..3e209f2 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -709,8 +709,28 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box, const void *data, UINT row_pitch, UINT depth_pitch) { - FIXME("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u stub!\n", + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + struct wined3d_resource *wined3d_resource; + struct wined3d_box wined3d_box; + + TRACE("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n", iface, resource, subresource_idx, box, data, row_pitch, depth_pitch); + + if (box) + { + wined3d_box.left = box->left; + wined3d_box.top = box->top; + wined3d_box.front = box->front; + wined3d_box.right = box->right; + wined3d_box.bottom = box->bottom; + wined3d_box.back = box->back; + } + + wined3d_resource = wined3d_resource_from_d3d11_resource(resource); + wined3d_mutex_lock(); + wined3d_device_update_sub_resource(device->wined3d_device, wined3d_resource, + subresource_idx, box ? &wined3d_box : NULL, data, row_pitch, depth_pitch); + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11DeviceContext *iface, @@ -2684,27 +2704,15 @@ static void STDMETHODCALLTYPE d3d10_device_UpdateSubresource(ID3D10Device1 *ifac const void *data, UINT row_pitch, UINT depth_pitch) { struct d3d_device *device = impl_from_ID3D10Device(iface); - struct wined3d_resource *wined3d_resource; - struct wined3d_box wined3d_box; + ID3D11Resource *d3d11_resource; TRACE("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n", iface, resource, subresource_idx, box, data, row_pitch, depth_pitch); - if (box) - { - wined3d_box.left = box->left; - wined3d_box.top = box->top; - wined3d_box.front = box->front; - wined3d_box.right = box->right; - wined3d_box.bottom = box->bottom; - wined3d_box.back = box->back; - } - - wined3d_resource = wined3d_resource_from_d3d10_resource(resource); - wined3d_mutex_lock(); - wined3d_device_update_sub_resource(device->wined3d_device, wined3d_resource, - subresource_idx, box ? &wined3d_box : NULL, data, row_pitch, depth_pitch); - wined3d_mutex_unlock(); + ID3D10Resource_QueryInterface(resource, &IID_ID3D11Resource, (void **)&d3d11_resource); + d3d11_immediate_context_UpdateSubresource(&device->immediate_context.ID3D11DeviceContext_iface, + d3d11_resource, subresource_idx, (const D3D11_BOX *)box, data, row_pitch, depth_pitch); + ID3D11Resource_Release(d3d11_resource); } static void STDMETHODCALLTYPE d3d10_device_ClearRenderTargetView(ID3D10Device1 *iface,
1
0
0
0
Józef Kucia : d3d11/tests: Port test_fragment_coords( ) from d3d10core.
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: a74d3ed212b14ecae39458bfac46132aaf0cccd3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a74d3ed212b14ecae39458bfa…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:14 2015 +0100 d3d11/tests: Port test_fragment_coords() from d3d10core. 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 | 222 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a74d3ed212b14ecae3945…
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_immediate_context_PSSetConstantBuffers().
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 9b7737ac06a3182708a0be9f1c05411eb35c8dd6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b7737ac06a3182708a0be9f1…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:13 2015 +0100 d3d11: Implement d3d11_immediate_context_PSSetConstantBuffers(). 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/device.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index fcbb8a8..d8a219e 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -275,8 +275,21 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D11DeviceContext *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n", + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + unsigned int i; + + TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers); + + wined3d_mutex_lock(); + for (i = 0; i < buffer_count; ++i) + { + struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); + + wined3d_device_set_ps_cb(device->wined3d_device, start_slot + i, + buffer ? buffer->wined3d_buffer : NULL); + } + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext *iface,
1
0
0
0
Józef Kucia : d3d11/tests: Port test_texture() from d3d10core.
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: 28110c1217764d8cc4e06dcaa489fd0c45dd04df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28110c1217764d8cc4e06dcaa…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:12 2015 +0100 d3d11/tests: Port test_texture() from d3d10core. 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 | 220 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index ddb524d..3806217 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -2801,6 +2801,225 @@ done: DestroyWindow(window); } +static void test_texture(void) +{ + ID3D11RenderTargetView *backbuffer_rtv; + D3D11_SUBRESOURCE_DATA resource_data; + D3D11_TEXTURE2D_DESC texture_desc; + ID3D11SamplerState *sampler_state; + ID3D11ShaderResourceView *ps_srv; + D3D11_SAMPLER_DESC sampler_desc; + ID3D11InputLayout *input_layout; + D3D11_BUFFER_DESC buffer_desc; + ID3D11DeviceContext *context; + ID3D11Texture2D *backbuffer; + unsigned int stride, offset; + IDXGISwapChain *swapchain; + ID3D11Texture2D *texture; + ID3D11VertexShader *vs; + ID3D11PixelShader *ps; + ID3D11Device *device; + D3D11_VIEWPORT vp; + unsigned int i, j; + ID3D11Buffer *vb; + ULONG refcount; + DWORD color; + HWND window; + HRESULT hr; + + static const D3D11_INPUT_ELEMENT_DESC layout_desc[] = + { + {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, + }; + 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 DWORD ps_code[] = + { +#if 0 + Texture2D t; + SamplerState s; + + float4 main(float4 position : SV_POSITION) : SV_Target + { + float2 p; + + p.x = position.x / 640.0f; + p.y = position.y / 480.0f; + return t.Sample(s, p); + } +#endif + 0x43425844, 0x1ce9b612, 0xc8176faa, 0xd37844af, 0xdb515605, 0x00000001, 0x00000134, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000098, 0x00000040, + 0x00000026, 0x0300005a, 0x00106000, 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, + 0x04002064, 0x00101032, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, + 0x00000001, 0x0a000038, 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3acccccd, + 0x3b088889, 0x00000000, 0x00000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0100003e, + }; + static const struct + { + float x, y; + } + quad[] = + { + {-1.0f, -1.0f}, + {-1.0f, 1.0f}, + { 1.0f, -1.0f}, + { 1.0f, 1.0f}, + }; + static const float red[] = {1.0f, 0.0f, 0.0f, 0.5f}; + static const DWORD bitmap_data[] = + { + 0xff0000ff, 0xff00ffff, 0xff00ff00, 0xffffff00, + 0xffff0000, 0xffff00ff, 0xff000000, 0xff7f7f7f, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + }; + + if (!(device = create_device(NULL))) + { + skip("Failed to create device.\n"); + return; + } + window = CreateWindowA("static", "d3d11_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + swapchain = create_swapchain(device, window, TRUE); + hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_ID3D11Texture2D, (void **)&backbuffer); + ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr); + + hr = ID3D11Device_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, hr %#x.\n", hr); + + buffer_desc.ByteWidth = sizeof(quad); + buffer_desc.Usage = D3D11_USAGE_DEFAULT; + buffer_desc.BindFlags = D3D11_BIND_VERTEX_BUFFER; + buffer_desc.CPUAccessFlags = 0; + buffer_desc.MiscFlags = 0; + buffer_desc.StructureByteStride = 0; + + resource_data.pSysMem = quad; + resource_data.SysMemPitch = 0; + resource_data.SysMemSlicePitch = 0; + + hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &resource_data, &vb); + ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr); + + texture_desc.Width = 4; + texture_desc.Height = 4; + texture_desc.MipLevels = 1; + texture_desc.ArraySize = 1; + texture_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + texture_desc.SampleDesc.Count = 1; + texture_desc.SampleDesc.Quality = 0; + texture_desc.Usage = D3D11_USAGE_DEFAULT; + texture_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; + texture_desc.CPUAccessFlags = 0; + texture_desc.MiscFlags = 0; + + resource_data.pSysMem = bitmap_data; + resource_data.SysMemPitch = 4 * sizeof(*bitmap_data); + + hr = ID3D11Device_CreateTexture2D(device, &texture_desc, &resource_data, &texture); + ok(SUCCEEDED(hr), "Failed to create 2d texture, hr %#x.\n", hr); + + hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)texture, NULL, &ps_srv); + ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#x.\n", hr); + + sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; + sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; + sampler_desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP; + sampler_desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP; + sampler_desc.MipLODBias = 0.0f; + sampler_desc.MaxAnisotropy = 0; + sampler_desc.ComparisonFunc = D3D11_COMPARISON_NEVER; + sampler_desc.BorderColor[0] = 0.0f; + sampler_desc.BorderColor[1] = 0.0f; + sampler_desc.BorderColor[2] = 0.0f; + sampler_desc.BorderColor[3] = 0.0f; + sampler_desc.MinLOD = 0.0f; + sampler_desc.MaxLOD = 0.0f; + + hr = ID3D11Device_CreateSamplerState(device, &sampler_desc, &sampler_state); + ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#x.\n", hr); + + hr = ID3D11Device_CreateVertexShader(device, vs_code, sizeof(vs_code), NULL, &vs); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); + hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + + hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)backbuffer, NULL, &backbuffer_rtv); + ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); + + ID3D11Device_GetImmediateContext(device, &context); + + ID3D11DeviceContext_OMSetRenderTargets(context, 1, &backbuffer_rtv, NULL); + ID3D11DeviceContext_IASetInputLayout(context, input_layout); + ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); + stride = sizeof(*quad); + offset = 0; + ID3D11DeviceContext_IASetVertexBuffers(context, 0, 1, &vb, &stride, &offset); + ID3D11DeviceContext_VSSetShader(context, vs, NULL, 0); + ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &ps_srv); + ID3D11DeviceContext_PSSetSamplers(context, 0, 1, &sampler_state); + ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); + + vp.TopLeftX = 0.0f; + vp.TopLeftY = 0.0f; + vp.Width = 640.0f; + vp.Height = 480.0f; + vp.MinDepth = 0.0f; + vp.MaxDepth = 1.0f; + ID3D11DeviceContext_RSSetViewports(context, 1, &vp); + + ID3D11DeviceContext_ClearRenderTargetView(context, backbuffer_rtv, red); + + ID3D11DeviceContext_Draw(context, 4, 0); + + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + color = get_texture_color(backbuffer, 80 + j * 160, 60 + i * 120); + ok(compare_color(color, bitmap_data[j + i * 4], 1), + "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + color, j, i, bitmap_data[j + i * 4]); + } + } + + ID3D11PixelShader_Release(ps); + ID3D11VertexShader_Release(vs); + ID3D11SamplerState_Release(sampler_state); + ID3D11ShaderResourceView_Release(ps_srv); + ID3D11Texture2D_Release(texture); + ID3D11Buffer_Release(vb); + ID3D11InputLayout_Release(input_layout); + ID3D11RenderTargetView_Release(backbuffer_rtv); + ID3D11Texture2D_Release(backbuffer); + IDXGISwapChain_Release(swapchain); + ID3D11DeviceContext_Release(context); + refcount = ID3D11Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + DestroyWindow(window); +} + static void test_scissor(void) { ID3D11DeviceContext *immediate_context; @@ -3412,6 +3631,7 @@ START_TEST(d3d11) test_device_removed_reason(); test_private_data(); test_blend(); + test_texture(); test_scissor(); test_il_append_aligned(); test_resource_map();
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_immediate_context_PSSetShaderResources().
by Alexandre Julliard
09 Nov '15
09 Nov '15
Module: wine Branch: master Commit: b62720feb69063ffa36ef8c3de1aa8a23c28c375 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b62720feb69063ffa36ef8c3d…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 6 18:38:11 2015 +0100 d3d11: Implement d3d11_immediate_context_PSSetShaderResources(). 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/d3d11_private.h | 2 ++ dlls/d3d11/device.c | 15 ++++++++++++++- dlls/d3d11/view.c | 8 ++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index c680249..474943b 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -207,6 +207,8 @@ struct d3d_shader_resource_view HRESULT d3d_shader_resource_view_create(struct d3d_device *device, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc, struct d3d_shader_resource_view **view) DECLSPEC_HIDDEN; +struct d3d_shader_resource_view *unsafe_impl_from_ID3D11ShaderResourceView( + ID3D11ShaderResourceView *iface) DECLSPEC_HIDDEN; struct d3d_shader_resource_view *unsafe_impl_from_ID3D10ShaderResourceView( ID3D10ShaderResourceView *iface) DECLSPEC_HIDDEN; diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index c44ec4a..fcbb8a8 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -140,8 +140,21 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D11DeviceContext *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + unsigned int i; + + TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views); + + wined3d_mutex_lock(); + for (i = 0; i < view_count; ++i) + { + struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); + + wined3d_device_set_ps_resource_view(device->wined3d_device, start_slot + i, + view ? view->wined3d_view : NULL); + } + wined3d_mutex_unlock(); } static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShader(ID3D11DeviceContext *iface, diff --git a/dlls/d3d11/view.c b/dlls/d3d11/view.c index 33c7a07..1d9b766 100644 --- a/dlls/d3d11/view.c +++ b/dlls/d3d11/view.c @@ -1546,6 +1546,14 @@ HRESULT d3d_shader_resource_view_create(struct d3d_device *device, ID3D11Resourc return S_OK; } +struct d3d_shader_resource_view *unsafe_impl_from_ID3D11ShaderResourceView(ID3D11ShaderResourceView *iface) +{ + if (!iface) + return NULL; + assert(iface->lpVtbl == &d3d11_shader_resource_view_vtbl); + return impl_from_ID3D11ShaderResourceView(iface); +} + struct d3d_shader_resource_view *unsafe_impl_from_ID3D10ShaderResourceView(ID3D10ShaderResourceView *iface) { if (!iface)
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
63
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
Results per page:
10
25
50
100
200