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
March 2018
----- 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
785 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Explicitly calculate the sub-resource level in raw_blitter_blit().
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 97c7b6ae9a4c0b814fa3187fab470b4da93f9717 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=97c7b6ae9a4c0b814fa3187f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 2 12:28:46 2018 +0330 wined3d: Explicitly calculate the sub-resource level in raw_blitter_blit(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 4a7ed19..fdf670c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2629,8 +2629,8 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit { const struct wined3d_gl_info *gl_info = context->gl_info; unsigned int src_sub_resource_idx, dst_sub_resource_idx; + unsigned int src_level, src_layer, dst_level, dst_layer; struct wined3d_texture *src_texture, *dst_texture; - unsigned int src_layer, dst_layer; struct wined3d_blitter *next; GLuint src_name, dst_name; DWORD location; @@ -2660,7 +2660,12 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit TRACE("Blit using ARB_copy_image.\n"); src_sub_resource_idx = surface_get_sub_resource_idx(src_surface); + src_level = src_sub_resource_idx % src_texture->level_count; + src_layer = src_sub_resource_idx / src_texture->level_count; + dst_sub_resource_idx = surface_get_sub_resource_idx(dst_surface); + dst_level = dst_sub_resource_idx % dst_texture->level_count; + dst_layer = dst_sub_resource_idx / dst_texture->level_count; location = src_location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB); if (!location) @@ -2669,7 +2674,6 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit if (!wined3d_texture_load_location(src_texture, src_sub_resource_idx, context, location)) ERR("Failed to load the source sub-resource into %s.\n", wined3d_debug_location(location)); src_name = wined3d_texture_get_texture_name(src_texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); - src_layer = src_sub_resource_idx / src_texture->level_count; location = dst_location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB); if (!location) @@ -2686,10 +2690,9 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit ERR("Failed to load the destination sub-resource into %s.\n", wined3d_debug_location(location)); } dst_name = wined3d_texture_get_texture_name(dst_texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); - dst_layer = dst_sub_resource_idx / dst_texture->level_count; - GL_EXTCALL(glCopyImageSubData(src_name, src_texture->target, src_surface->texture_level, - src_rect->left, src_rect->top, src_layer, dst_name, dst_texture->target, dst_surface->texture_level, + GL_EXTCALL(glCopyImageSubData(src_name, src_texture->target, src_level, + src_rect->left, src_rect->top, src_layer, dst_name, dst_texture->target, dst_level, dst_rect->left, dst_rect->top, dst_layer, src_rect->right - src_rect->left, src_rect->bottom - src_rect->top, 1)); checkGLcall("copy image data");
1
0
0
0
Henri Verbeet : wined3d: Explicitly calculate the sub-resource level in surface_load_renderbuffer( ).
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 462b6d1bc8833d2ec4934ed3cbcccd988527c724 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=462b6d1bc8833d2ec4934ed3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Mar 2 12:28:45 2018 +0330 wined3d: Explicitly calculate the sub-resource level in surface_load_renderbuffer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c82da87..4a7ed19 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2441,9 +2441,10 @@ static BOOL surface_load_renderbuffer(struct wined3d_surface *surface, struct wi DWORD dst_location) { struct wined3d_texture *texture = surface->container; + unsigned int level = surface_get_sub_resource_idx(surface) % texture->level_count; const RECT rect = {0, 0, - wined3d_texture_get_level_width(texture, surface->texture_level), - wined3d_texture_get_level_height(texture, surface->texture_level)}; + wined3d_texture_get_level_width(texture, level), + wined3d_texture_get_level_height(texture, level)}; DWORD locations = surface_get_sub_resource(surface)->locations; DWORD src_location;
1
0
0
0
Zebediah Figura : quartz/tests: Remove some unnecessary error-checking.
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 7d4bcd5deb9d6ac882264b4e06c46dbed008dda8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d4bcd5deb9d6ac882264b4e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 1 13:19:23 2018 -0600 quartz/tests: Remove some unnecessary error-checking. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 60 +++-------------------------------------- 1 file changed, 3 insertions(+), 57 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7d4bcd5deb9d6ac88226…
1
0
0
0
Zebediah Figura : quartz/tests: Add more tests for IMediaSeeking.
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: a42bf668b4075d07abc7cadeb42f9cc2c019ea30 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a42bf668b4075d07abc7cade…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 1 13:19:22 2018 -0600 quartz/tests: Add more tests for IMediaSeeking. Also remove uninteresting IMediaControl test. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 8b3f7d5..e7a972b 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -284,12 +284,11 @@ static void test_basic_video(IFilterGraph2 *graph) IBasicVideo_Release(pbv); } -static void test_mediacontrol(IFilterGraph2 *graph) +static void test_media_seeking(IFilterGraph2 *graph) { IMediaSeeking *seeking; IMediaFilter *filter; - IMediaControl *control; - LONGLONG pos; + LONGLONG pos, stop, duration; GUID format; HRESULT hr; @@ -300,9 +299,6 @@ static void test_mediacontrol(IFilterGraph2 *graph) hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %08x\n", hr); - hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %08x\n", hr); - format = GUID_NULL; hr = IMediaSeeking_GetTimeFormat(seeking, &format); ok(hr == S_OK, "GetTimeFormat failed: %#x\n", hr); @@ -327,21 +323,31 @@ static void test_mediacontrol(IFilterGraph2 *graph) ok(hr == S_OK, "GetCurrentPosition failed: %#x\n", hr); ok(pos == 0, "got %s\n", wine_dbgstr_longlong(pos)); + hr = IMediaSeeking_GetDuration(seeking, &duration); + ok(hr == S_OK, "GetDuration failed: %#x\n", hr); + ok(duration > 0, "got %s\n", wine_dbgstr_longlong(duration)); + + hr = IMediaSeeking_GetStopPosition(seeking, &stop); + ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(stop == duration || stop == duration + 1, "expected %s, got %s\n", + wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop)); + hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning); ok(hr == S_OK, "SetPositions failed: %#x\n", hr); hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime); ok(hr == S_OK, "SetPositions failed: %#x\n", hr); + pos = 0; + hr = IMediaSeeking_SetPositions(seeking, &pos, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); + ok(hr == S_OK, "SetPositions failed: %08x\n", hr); + IMediaFilter_SetSyncSource(filter, NULL); pos = 0xdeadbeef; hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %#x\n", hr); - ok(pos == 0, "got %s\n", wine_dbgstr_longlong(pos)); - - hr = IMediaControl_GetState(control, 1000, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(pos == 0, "Position != 0 (%s)\n", wine_dbgstr_longlong(pos)); + IFilterGraph2_SetDefaultSyncSource(graph); - IMediaControl_Release(control); IMediaSeeking_Release(seeking); IMediaFilter_Release(filter); } @@ -487,7 +493,7 @@ todo_wine static void rungraph(IFilterGraph2 *graph) { test_basic_video(graph); - test_mediacontrol(graph); + test_media_seeking(graph); test_state_change(graph); test_media_event(graph); }
1
0
0
0
Zebediah Figura : quartz/tests: Simply test_render_with_multithread().
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 55d1323546910fc198bb2476d02e4658fb4d33ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=55d1323546910fc198bb2476…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 1 13:19:21 2018 -0600 quartz/tests: Simply test_render_with_multithread(). Use CoCreateInstance directly, and try to run the graph on a real file. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 67 ++++++++--------------------------------- 1 file changed, 12 insertions(+), 55 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 4a7735b..8b3f7d5 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -588,78 +588,35 @@ todo_wine static DWORD WINAPI call_RenderFile_multithread(LPVOID lParam) { - IFilterGraph2 *filter_graph = lParam; + WCHAR *filename = load_resource(avifile); + IFilterGraph2 *graph = lParam; HRESULT hr; - WCHAR mp3file[] = {'t','e','s','t','.','m','p','3',0}; - HANDLE handle; - handle = CreateFileW(mp3file, 0, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (handle == INVALID_HANDLE_VALUE) - { - skip("Could not read test file %s, skipping test\n", wine_dbgstr_w(mp3file)); - return 1; - } - CloseHandle(handle); + hr = IFilterGraph2_RenderFile(graph, filename, NULL); +todo_wine + ok(SUCCEEDED(hr), "RenderFile failed: %x\n", hr); - hr = IFilterGraph2_RenderFile(filter_graph, mp3file, NULL); - todo_wine ok(hr == VFW_E_CANNOT_RENDER || /* xp or older + DirectX 9 */ - hr == VFW_E_NO_TRANSPORT || /* win7 or newer */ - broken(hr == CLASS_E_CLASSNOTAVAILABLE), /* xp or older + DirectX 8 or older */ - "Expected 0x%08x or 0x%08x, returned 0x%08x\n", VFW_E_CANNOT_RENDER, VFW_E_NO_TRANSPORT, hr); + if (SUCCEEDED(hr)) + rungraph(graph); - DeleteFileW(mp3file); return 0; } static void test_render_with_multithread(void) { - HRESULT hr; - HMODULE hmod; - static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, void **out); - IClassFactory *classfactory = NULL; - static IGraphBuilder *graph_builder; - static IFilterGraph2 *filter_graph; + IFilterGraph2 *graph; HANDLE thread; CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - hmod = LoadLibraryA("quartz.dll"); - if (!hmod) - { - skip("Fail to load quartz.dll.\n"); - return; - } - - pDllGetClassObject = (void*)GetProcAddress(hmod, "DllGetClassObject"); - if (!pDllGetClassObject) - { - skip("Fail to get DllGetClassObject.\n"); - return; - } - - hr = pDllGetClassObject(&CLSID_FilterGraph, &IID_IClassFactory, (void **)&classfactory); - ok(hr == S_OK, "DllGetClassObject failed 0x%08x\n", hr); - if (FAILED(hr)) - { - skip("Can't create IClassFactory 0x%08x.\n", hr); - return; - } - - hr = IClassFactory_CreateInstance(classfactory, NULL, &IID_IUnknown, (LPVOID*)&graph_builder); - ok(hr == S_OK, "IClassFactory_CreateInstance failed 0x%08x\n", hr); - - hr = IGraphBuilder_QueryInterface(graph_builder, &IID_IFilterGraph2, (void**)&filter_graph); - ok(hr == S_OK, "IGraphBuilder_QueryInterface failed 0x%08x\n", hr); + graph = create_graph(); - thread = CreateThread(NULL, 0, call_RenderFile_multithread, filter_graph, 0, NULL); + thread = CreateThread(NULL, 0, call_RenderFile_multithread, graph, 0, NULL); - WaitForSingleObject(thread, 1000); - IFilterGraph2_Release(filter_graph); - IGraphBuilder_Release(graph_builder); - IClassFactory_Release(classfactory); + ok(WaitForSingleObject(thread, 1000) == WAIT_OBJECT_0, "wait failed\n"); + IFilterGraph2_Release(graph); CloseHandle(thread); CoUninitialize(); - return; } static void test_graph_builder(void)
1
0
0
0
Zebediah Figura : quartz/tests: Expand and separate media event tests.
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 4df4aaab920eb25077776ff6f7a8be45c343edd2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4df4aaab920eb25077776ff6…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 1 13:19:20 2018 -0600 quartz/tests: Expand and separate media event tests. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 107 +++++++++++++++++++++++++++++----------- 1 file changed, 78 insertions(+), 29 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 8dd70a2..4a7735b 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -398,49 +398,98 @@ static void test_state_change(IFilterGraph2 *graph) IMediaControl_Release(control); } -static void rungraph(IFilterGraph2 *graph) +static void test_media_event(IFilterGraph2 *graph) { + IMediaEvent *media_event; + IMediaSeeking *seeking; + IMediaControl *control; + IMediaFilter *filter; + LONG_PTR lparam1, lparam2; + LONGLONG current, stop; + OAFilterState state; + int got_eos = 0; + HANDLE event; HRESULT hr; - IMediaControl* pmc; - IMediaEvent* pme; - IMediaFilter* pmf; - HANDLE hEvent; + LONG code; - test_basic_video(graph); - test_mediacontrol(graph); - test_state_change(graph); + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); + ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %#x\n", hr); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %#x\n", hr); - hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&pmc); - ok(hr==S_OK, "Cannot get IMediaControl interface returned: %x\n", hr); + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&media_event); + ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#x\n", hr); - hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&pmf); - ok(hr==S_OK, "Cannot get IMediaFilter interface returned: %x\n", hr); + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking); + ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#x\n", hr); - IMediaControl_Stop(pmc); + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Stop() failed: %#x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() timed out\n"); - IMediaFilter_SetSyncSource(pmf, NULL); + hr = IMediaSeeking_GetDuration(seeking, &stop); + ok(hr == S_OK, "GetDuration() failed: %#x\n", hr); + current = 0; + hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); + ok(hr == S_OK, "SetPositions() failed: %#x\n", hr); - IMediaFilter_Release(pmf); + hr = IMediaFilter_SetSyncSource(filter, NULL); + ok(hr == S_OK, "SetSyncSource() failed: %#x\n", hr); - hr = IMediaControl_Run(pmc); - ok(hr==S_FALSE, "Cannot run the graph returned: %x\n", hr); + hr = IMediaEvent_GetEventHandle(media_event, (OAEVENT *)&event); + ok(hr == S_OK, "GetEventHandle() failed: %#x\n", hr); - hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (LPVOID*)&pme); - ok(hr==S_OK, "Cannot get IMediaEvent interface returned: %x\n", hr); + /* flush existing events */ + while ((hr = IMediaEvent_GetEvent(media_event, &code, &lparam1, &lparam2, 0)) == S_OK); - hr = IMediaEvent_GetEventHandle(pme, (OAEVENT*)&hEvent); - ok(hr==S_OK, "Cannot get event handle returned: %x\n", hr); + ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "event should not be signaled\n"); - ok(WaitForSingleObject(hEvent, 2000) == WAIT_OBJECT_0, "Wait failed\n"); + hr = IMediaControl_Run(control); + ok(SUCCEEDED(hr), "Run() failed: %#x\n", hr); - hr = IMediaEvent_Release(pme); - ok(hr==2, "Releasing mediaevent returned: %x\n", hr); + while (!got_eos) + { + if (WaitForSingleObject(event, 1000) == WAIT_TIMEOUT) + break; - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK, "Cannot stop the graph returned: %x\n", hr); - - hr = IMediaControl_Release(pmc); - ok(hr==1, "Releasing mediacontrol returned: %x\n", hr); + while ((hr = IMediaEvent_GetEvent(media_event, &code, &lparam1, &lparam2, 0)) == S_OK) + { + if (code == EC_COMPLETE) + { + got_eos = 1; + break; + } + } + } + ok(got_eos, "didn't get EOS\n"); + + hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); + ok(hr == S_OK, "GetCurrentPosition() failed: %#x\n", hr); +todo_wine + ok(current == stop, "expected %s, got %s\n", wine_dbgstr_longlong(stop), wine_dbgstr_longlong(current)); + + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Run() failed: %#x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() timed out\n"); + + hr = IFilterGraph2_SetDefaultSyncSource(graph); + ok(hr == S_OK, "SetDefaultSinkSource() failed: %#x\n", hr); + + IMediaSeeking_Release(seeking); + IMediaEvent_Release(media_event); + IMediaControl_Release(control); + IMediaFilter_Release(filter); +} + +static void rungraph(IFilterGraph2 *graph) +{ + test_basic_video(graph); + test_mediacontrol(graph); + test_state_change(graph); + test_media_event(graph); } static HRESULT test_graph_builder_connect(WCHAR *filename)
1
0
0
0
Zebediah Figura : quartz/tests: Expand and separate state change tests.
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: e4aa395a818e27685289331adf4f2b3e3d9dc414 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4aa395a818e27685289331a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 1 13:19:19 2018 -0600 quartz/tests: Expand and separate state change tests. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 100 ++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 44 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index d5dae0f..8dd70a2 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -346,6 +346,58 @@ static void test_mediacontrol(IFilterGraph2 *graph) IMediaFilter_Release(filter); } +static void test_state_change(IFilterGraph2 *graph) +{ + IMediaControl *control; + OAFilterState state; + HRESULT hr; + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %x\n", hr); + + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Stopped, "wrong state %d\n", state); + + hr = IMediaControl_Run(control); + ok(SUCCEEDED(hr), "Run() failed: %x\n", hr); + hr = IMediaControl_GetState(control, INFINITE, &state); + ok(SUCCEEDED(hr), "GetState() failed: %x\n", hr); + ok(state == State_Running, "wrong state %d\n", state); + + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Stop() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Stopped, "wrong state %d\n", state); + + hr = IMediaControl_Pause(control); + ok(SUCCEEDED(hr), "Pause() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Paused, "wrong state %d\n", state); + + hr = IMediaControl_Run(control); + ok(SUCCEEDED(hr), "Run() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Running, "wrong state %d\n", state); + + hr = IMediaControl_Pause(control); + ok(SUCCEEDED(hr), "Pause() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Paused, "wrong state %d\n", state); + + hr = IMediaControl_Stop(control); + ok(SUCCEEDED(hr), "Stop() failed: %x\n", hr); + hr = IMediaControl_GetState(control, 1000, &state); + ok(hr == S_OK, "GetState() failed: %x\n", hr); + ok(state == State_Stopped, "wrong state %d\n", state); + + IMediaControl_Release(control); +} + static void rungraph(IFilterGraph2 *graph) { HRESULT hr; @@ -354,6 +406,10 @@ static void rungraph(IFilterGraph2 *graph) IMediaFilter* pmf; HANDLE hEvent; + test_basic_video(graph); + test_mediacontrol(graph); + test_state_change(graph); + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&pmc); ok(hr==S_OK, "Cannot get IMediaControl interface returned: %x\n", hr); @@ -366,53 +422,9 @@ static void rungraph(IFilterGraph2 *graph) IMediaFilter_Release(pmf); - test_basic_video(graph); - test_mediacontrol(graph); - hr = IMediaControl_Run(pmc); ok(hr==S_FALSE, "Cannot run the graph returned: %x\n", hr); - Sleep(10); - /* Crash fun */ - trace("run -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); - - IFilterGraph2_SetDefaultSyncSource(graph); - - Sleep(10); - trace("stop -> pause\n"); - hr = IMediaControl_Pause(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot pause the graph returned: %x\n", hr); - - Sleep(10); - trace("pause -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); - - Sleep(10); - trace("run -> pause\n"); - hr = IMediaControl_Pause(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot pause the graph returned: %x\n", hr); - - Sleep(10); - trace("pause -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); - - Sleep(10); - trace("pause -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); - - trace("run -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); - - trace("stop -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); - hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (LPVOID*)&pme); ok(hr==S_OK, "Cannot get IMediaEvent interface returned: %x\n", hr);
1
0
0
0
Zebediah Figura : quartz/tests: Explicitly test correct return value for IGraphBuilder_Connect().
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: ef91785cb3321a2c6b7be38bcd988fed1aabeb27 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef91785cb3321a2c6b7be38b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 1 13:19:18 2018 -0600 quartz/tests: Explicitly test correct return value for IGraphBuilder_Connect(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 8e9d17e..d5dae0f 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -431,7 +431,7 @@ static void rungraph(IFilterGraph2 *graph) ok(hr==1, "Releasing mediacontrol returned: %x\n", hr); } -static void test_graph_builder_connect(WCHAR *filename) +static HRESULT test_graph_builder_connect(WCHAR *filename) { static const WCHAR outputW[] = {'O','u','t','p','u','t',0}; static const WCHAR inW[] = {'I','n',0}; @@ -460,11 +460,8 @@ static void test_graph_builder_connect(WCHAR *filename) ok(hr == S_OK, "FindPin failed: %#x\n", hr); hr = IFilterGraph2_Connect(graph, pin_out, pin_in); - if (hr != VFW_E_NO_ACCEPTABLE_TYPES) - { - ok(SUCCEEDED(hr), "Connect failed: %#x\n", hr); + if (SUCCEEDED(hr)) rungraph(graph); - } IPin_Release(pin_in); IPin_Release(pin_out); @@ -472,6 +469,8 @@ static void test_graph_builder_connect(WCHAR *filename) IBaseFilter_Release(video_filter); IVideoWindow_Release(window); IFilterGraph2_Release(graph); + + return hr; } static void test_render_run(const WCHAR *file) @@ -495,18 +494,28 @@ static void test_render_run(const WCHAR *file) graph = create_graph(); hr = IFilterGraph2_RenderFile(graph, filename, NULL); - if (hr == VFW_E_CANNOT_RENDER) + if (FAILED(hr)) + { skip("%s: codec not supported; skipping test\n", wine_dbgstr_w(file)); + + refs = IFilterGraph2_Release(graph); + ok(!refs, "Graph has %u references\n", refs); + + hr = test_graph_builder_connect(filename); +todo_wine + ok(hr == VFW_E_CANNOT_CONNECT, "got %#x\n", hr); + } else { ok(hr == S_OK || hr == VFW_S_AUDIO_NOT_RENDERED, "RenderFile failed: %x\n", hr); rungraph(graph); - } - refs = IFilterGraph2_Release(graph); - ok(!refs, "Graph has %u references\n", refs); + refs = IFilterGraph2_Release(graph); + ok(!refs, "Graph has %u references\n", refs); - test_graph_builder_connect(filename); + hr = test_graph_builder_connect(filename); + ok(hr == S_OK || hr == VFW_S_PARTIAL_RENDER, "got %#x\n", hr); + } /* check reference leaks */ h = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
1
0
0
0
Józef Kucia : d3d11/tests: Use no attachments draw calls.
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 27f18f82a762d240110dd26e87f1671171ec5e56 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27f18f82a762d240110dd26e…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Mar 1 19:36:56 2018 +0100 d3d11/tests: Use no attachments draw calls. 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 | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 1826114..6d7fccd 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -12614,14 +12614,13 @@ static void test_draw_uav_only(void) ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); - /* FIXME: Set the render targets to NULL when no attachment draw calls are supported in wined3d. */ - ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 1, &test_context.backbuffer_rtv, NULL, + ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 0, NULL, NULL, 0, 1, &uav, NULL); ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav, values); memset(&vp, 0, sizeof(vp)); - vp.Width = 1.0f; - vp.Height = 100.0f; + vp.Width = 10.0f; + vp.Height = 10.0f; ID3D11DeviceContext_RSSetViewports(context, 1, &vp); ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav, values); draw_quad(&test_context); @@ -17685,9 +17684,8 @@ static void test_ps_cs_uav_binding(void) ID3D11DeviceContext_CSSetConstantBuffers(context, 0, 1, &cs_cb); ID3D11DeviceContext_CSSetUnorderedAccessViews(context, 0, 1, &cs_uav, NULL); ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &ps_cb); - /* FIXME: Set the render targets to NULL when no attachment draw calls are supported in wined3d. */ ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, - 1, &test_context.backbuffer_rtv, NULL, 1, 1, &ps_uav, NULL); + 0, NULL, NULL, 1, 1, &ps_uav, NULL); ID3D11DeviceContext_ClearUnorderedAccessViewFloat(context, cs_uav, zero); check_texture_float(cs_texture, 0.0f, 2); @@ -17749,11 +17747,8 @@ static void test_atomic_instructions(void) D3D11_UNORDERED_ACCESS_VIEW_DESC uav_desc; struct d3d11_test_context test_context; struct resource_readback rb, out_rb; - D3D11_TEXTURE2D_DESC texture_desc; D3D11_BUFFER_DESC buffer_desc; ID3D11DeviceContext *context; - ID3D11RenderTargetView *rtv; - ID3D11Texture2D *texture; ID3D11ComputeShader *cs; ID3D11PixelShader *ps; ID3D11Device *device; @@ -17883,22 +17878,6 @@ static void test_atomic_instructions(void) device = test_context.device; context = test_context.immediate_context; - texture_desc.Width = 1; - texture_desc.Height = 1; - texture_desc.MipLevels = 1; - texture_desc.ArraySize = 1; - texture_desc.Format = DXGI_FORMAT_R32_FLOAT; - texture_desc.SampleDesc.Count = 1; - texture_desc.SampleDesc.Quality = 0; - texture_desc.Usage = D3D11_USAGE_DEFAULT; - texture_desc.BindFlags = D3D11_BIND_RENDER_TARGET; - texture_desc.CPUAccessFlags = 0; - texture_desc.MiscFlags = 0; - hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); - hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); - cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, 2 * sizeof(struct uvec4), NULL); ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb); ID3D11DeviceContext_CSSetConstantBuffers(context, 0, 1, &cb); @@ -17925,8 +17904,8 @@ static void test_atomic_instructions(void) vp.TopLeftX = 0.0f; vp.TopLeftY = 0.0f; - vp.Width = texture_desc.Width; - vp.Height = texture_desc.Height; + vp.Width = 1.0f; + vp.Height = 1.0f; vp.MinDepth = 0.0f; vp.MaxDepth = 1.0f; ID3D11DeviceContext_RSSetViewports(context, 1, &vp); @@ -17949,8 +17928,7 @@ static void test_atomic_instructions(void) ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)in_buffer, 0, NULL, test->input, 0, 0); - /* FIXME: Set the render targets to NULL when no attachment draw calls are supported in wined3d. */ - ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 1, &rtv, NULL, + ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 0, NULL, NULL, 0, 1, &in_uav, NULL); draw_quad(&test_context); @@ -18007,8 +17985,6 @@ static void test_atomic_instructions(void) ID3D11Buffer_Release(out_buffer); ID3D11ComputeShader_Release(cs); ID3D11PixelShader_Release(ps); - ID3D11RenderTargetView_Release(rtv); - ID3D11Texture2D_Release(texture); ID3D11UnorderedAccessView_Release(in_uav); ID3D11UnorderedAccessView_Release(out_uav); release_test_context(&test_context);
1
0
0
0
Józef Kucia : d3d11/tests: Add test for draws with NULL render target views.
by Alexandre Julliard
02 Mar '18
02 Mar '18
Module: wine Branch: master Commit: 5aa039b170a9d200d1c5f8cdc1e37d3e3c08f626 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5aa039b170a9d200d1c5f8cd…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Mar 1 19:36:55 2018 +0100 d3d11/tests: Add test for draws with NULL render target views. 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 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 713a030..1826114 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -7887,10 +7887,10 @@ static void test_sample_c_lz(void) static void test_multiple_render_targets(void) { + ID3D11RenderTargetView *rtv[4], *tmp_rtv[4]; D3D11_TEXTURE2D_DESC texture_desc; ID3D11InputLayout *input_layout; unsigned int stride, offset, i; - ID3D11RenderTargetView *rtv[4]; ID3D11DeviceContext *context; ID3D11Texture2D *rt[4]; ID3D11VertexShader *vs; @@ -8025,9 +8025,21 @@ static void test_multiple_render_targets(void) for (i = 0; i < ARRAY_SIZE(rtv); ++i) ID3D11DeviceContext_ClearRenderTargetView(context, rtv[i], red); - ID3D11DeviceContext_Draw(context, 4, 0); + check_texture_color(rt[0], 0xffffffff, 2); + check_texture_color(rt[1], 0x7f7f7f7f, 2); + check_texture_color(rt[2], 0x33333333, 2); + check_texture_color(rt[3], 0xff7f3300, 2); + for (i = 0; i < ARRAY_SIZE(rtv); ++i) + ID3D11DeviceContext_ClearRenderTargetView(context, rtv[i], red); + for (i = 0; i < ARRAY_SIZE(tmp_rtv); ++i) + { + memset(tmp_rtv, 0, sizeof(tmp_rtv)); + tmp_rtv[i] = rtv[i]; + ID3D11DeviceContext_OMSetRenderTargets(context, 4, tmp_rtv, NULL); + ID3D11DeviceContext_Draw(context, 4, 0); + } check_texture_color(rt[0], 0xffffffff, 2); check_texture_color(rt[1], 0x7f7f7f7f, 2); check_texture_color(rt[2], 0x33333333, 2);
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
79
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Results per page:
10
25
50
100
200