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
August 2019
----- 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
703 discussions
Start a n
N
ew thread
Zebediah Figura : quartz: Simplify error handling in GetClassMediaFile().
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 028ad9b8dbc37d92b11365cc09dfad9de37592ef URL:
https://source.winehq.org/git/wine.git/?a=commit;h=028ad9b8dbc37d92b11365cc…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 14:58:33 2019 -0500 quartz: Simplify error handling in GetClassMediaFile(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filesource.c | 189 +++++++++++++++++++------------------------ dlls/quartz/filtergraph.c | 9 +-- dlls/quartz/quartz_private.h | 2 +- 3 files changed, 89 insertions(+), 111 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=028ad9b8dbc37d92b113…
1
0
0
0
Zebediah Figura : quartz: Always try to detect a file by extension first.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 66d40aab4b029b7f334154c8748e92ced797b685 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66d40aab4b029b7f334154c8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 14:58:32 2019 -0500 quartz: Always try to detect a file by extension first. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filesource.c | 88 ++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 59 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 25c523b..bc4b5f2 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -102,58 +102,6 @@ static const WCHAR subtype_name[] = { static const WCHAR source_filter_name[] = { 'S','o','u','r','c','e',' ','F','i','l','t','e','r',0}; -static HRESULT process_extensions(HKEY hkeyExtensions, LPCOLESTR pszFileName, GUID * majorType, GUID * minorType, GUID * sourceFilter) -{ - WCHAR *extension; - LONG l; - HKEY hsub; - WCHAR keying[39]; - DWORD size; - - if (!pszFileName) - return E_POINTER; - - /* Get the part of the name that matters */ - if (!(extension = wcsrchr(pszFileName, '.'))) - return E_FAIL; - - l = RegOpenKeyExW(hkeyExtensions, extension, 0, KEY_READ, &hsub); - if (l) - return E_FAIL; - - if (majorType) - { - size = sizeof(keying); - l = RegQueryValueExW(hsub, mediatype_name, NULL, NULL, (LPBYTE)keying, &size); - if (!l) - CLSIDFromString(keying, majorType); - } - - if (minorType) - { - size = sizeof(keying); - if (!l) - l = RegQueryValueExW(hsub, subtype_name, NULL, NULL, (LPBYTE)keying, &size); - if (!l) - CLSIDFromString(keying, minorType); - } - - if (sourceFilter) - { - size = sizeof(keying); - if (!l) - l = RegQueryValueExW(hsub, source_filter_name, NULL, NULL, (LPBYTE)keying, &size); - if (!l) - CLSIDFromString(keying, sourceFilter); - } - - RegCloseKey(hsub); - - if (!l) - return S_OK; - return E_FAIL; -} - static unsigned char byte_from_hex_char(WCHAR wHex) { switch (towlower(wHex)) @@ -278,6 +226,9 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * HRESULT hr = S_OK; BOOL bFound = FALSE; static const WCHAR wszMediaType[] = {'M','e','d','i','a',' ','T','y','p','e',0}; + WCHAR extensions_path[278] = {'M','e','d','i','a',' ','T','y','p','e','\\','E','x','t','e','n','s','i','o','n','s','\\',0}; + const WCHAR *ext; + DWORD size; if(majorType) *majorType = GUID_NULL; @@ -286,6 +237,31 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * if(sourceFilter) *sourceFilter = GUID_NULL; + if ((ext = wcsrchr(pszFileName, '.'))) + { + WCHAR guidstr[39]; + HKEY key; + + wcscat(extensions_path, ext); + if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, extensions_path, 0, KEY_READ, &key)) + { + size = sizeof(guidstr); + if (majorType && !RegQueryValueExW(key, mediatype_name, NULL, NULL, (BYTE *)guidstr, &size)) + CLSIDFromString(guidstr, majorType); + + size = sizeof(guidstr); + if (minorType && !RegQueryValueExW(key, subtype_name, NULL, NULL, (BYTE *)guidstr, &size)) + CLSIDFromString(guidstr, minorType); + + size = sizeof(guidstr); + if (sourceFilter && !RegQueryValueExW(key, source_filter_name, NULL, NULL, (BYTE *)guidstr, &size)) + CLSIDFromString(guidstr, sourceFilter); + + RegCloseKey(key); + return S_OK; + } + } + lRet = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMediaType, 0, KEY_READ, &hkeyMediaType); hr = HRESULT_FROM_WIN32(lRet); @@ -304,13 +280,7 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * break; if (RegOpenKeyExW(hkeyMediaType, wszMajorKeyName, 0, KEY_READ, &hkeyMajor) != ERROR_SUCCESS) break; - if (!wcscmp(wszExtensions, wszMajorKeyName)) - { - if (process_extensions(hkeyMajor, pszFileName, majorType, minorType, sourceFilter) == S_OK) - bFound = TRUE; - } - /* We need a reader interface to check bytes */ - else if (pReader) + if (wcscmp(wszExtensions, wszMajorKeyName) && pReader) { DWORD indexMinor;
1
0
0
0
Zebediah Figura : quartz: Remove unnecessary tracing from GetClassMediaFile().
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 7d89e791bd412e70df588c7cae594f30bcc070c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d89e791bd412e70df588c7c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 14:58:31 2019 -0500 quartz: Remove unnecessary tracing from GetClassMediaFile(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filesource.c | 31 +++++++------------------------ dlls/quartz/filtergraph.c | 1 + 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index e66c3fa..25c523b 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -191,8 +191,6 @@ static HRESULT process_pattern_string(LPCWSTR wszPatternString, IAsyncReader * p HRESULT hr = S_OK; ULONG strpos; - TRACE("\t\tPattern string: %s\n", debugstr_w(wszPatternString)); - /* format: "offset, bytestocompare, mask, value" */ ulOffset = wcstol(wszPatternString, NULL, 10); @@ -281,8 +279,6 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * BOOL bFound = FALSE; static const WCHAR wszMediaType[] = {'M','e','d','i','a',' ','T','y','p','e',0}; - TRACE("(%p, %s, %p, %p)\n", pReader, debugstr_w(pszFileName), majorType, minorType); - if(majorType) *majorType = GUID_NULL; if(minorType) @@ -308,7 +304,6 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * break; if (RegOpenKeyExW(hkeyMediaType, wszMajorKeyName, 0, KEY_READ, &hkeyMajor) != ERROR_SUCCESS) break; - TRACE("%s\n", debugstr_w(wszMajorKeyName)); if (!wcscmp(wszExtensions, wszMajorKeyName)) { if (process_extensions(hkeyMajor, pszFileName, majorType, minorType, sourceFilter) == S_OK) @@ -335,8 +330,6 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * if (RegOpenKeyExW(hkeyMajor, wszMinorKeyName, 0, KEY_READ, &hkeyMinor) != ERROR_SUCCESS) break; - TRACE("\t%s\n", debugstr_w(wszMinorKeyName)); - if (RegQueryInfoKeyW(hkeyMinor, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &maxValueLen, NULL, NULL) != ERROR_SUCCESS) break; @@ -387,22 +380,7 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * } CloseHandle(hkeyMediaType); - if (SUCCEEDED(hr) && !bFound) - { - ERR("Media class not found\n"); - hr = E_FAIL; - } - else if (bFound) - { - TRACE("Found file's class:\n"); - if(majorType) - TRACE("\tmajor = %s\n", qzdebugstr_guid(majorType)); - if(minorType) - TRACE("\tsubtype = %s\n", qzdebugstr_guid(minorType)); - if(sourceFilter) - TRACE("\tsource filter = %s\n", qzdebugstr_guid(sourceFilter)); - } - + if (hr == S_OK && !bFound) hr = E_FAIL; return hr; } @@ -581,7 +559,12 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi if (!pmt) { CopyMediaType(This->pmt, &default_mt); - if (FAILED(GetClassMediaFile(&This->IAsyncReader_iface, pszFileName, &This->pmt->majortype, &This->pmt->subtype, NULL))) + if (SUCCEEDED(GetClassMediaFile(&This->IAsyncReader_iface, pszFileName, &This->pmt->majortype, &This->pmt->subtype, NULL))) + { + TRACE("Found major type %s, subtype %s.\n", + debugstr_guid(&This->pmt->majortype), debugstr_guid(&This->pmt->subtype)); + } + else { This->pmt->majortype = MEDIATYPE_Stream; This->pmt->subtype = MEDIASUBTYPE_NULL; diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index d151cdf..c52f0ca 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -1739,6 +1739,7 @@ static HRESULT GetFileSourceFilter(LPCOLESTR pszFileName, IBaseFilter **filter) if (hr == S_OK) { + TRACE("Found source filter %s.\n", debugstr_guid(&clsid)); /* Release the AsyncReader filter and create the matching one */ IBaseFilter_Release(*filter); return CreateFilterInstanceAndLoadFile(&clsid, pszFileName, filter);
1
0
0
0
Zebediah Figura : quartz/filtergraph: Remove type tracing from IGraphBuilder::AddSourceFilter().
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: a4006aa7d7f65809f5b4bc506ee092d3235bbf70 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a4006aa7d7f65809f5b4bc50…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 14:58:30 2019 -0500 quartz/filtergraph: Remove type tracing from IGraphBuilder::AddSourceFilter(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index a441294..d151cdf 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -1754,9 +1754,6 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilter(IFilterGraph2 *iface, LPCWSTR IFilterGraphImpl *This = impl_from_IFilterGraph2(iface); HRESULT hr; IBaseFilter* preader; - IFileSourceFilter* pfile = NULL; - AM_MEDIA_TYPE mt; - WCHAR* filename; TRACE("(%p/%p)->(%s, %s, %p)\n", This, iface, debugstr_w(lpcwstrFileName), debugstr_w(lpcwstrFilterName), ppFilter); @@ -1774,39 +1771,10 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilter(IFilterGraph2 *iface, LPCWSTR return hr; } - hr = IBaseFilter_QueryInterface(preader, &IID_IFileSourceFilter, (LPVOID*)&pfile); - if (FAILED(hr)) { - WARN("Unable to get IFileSourceInterface (%x)\n", hr); - goto error; - } - - /* The file has been already loaded */ - hr = IFileSourceFilter_GetCurFile(pfile, &filename, &mt); - if (FAILED(hr)) { - WARN("GetCurFile (%x)\n", hr); - goto error; - } - - TRACE("File %s\n", debugstr_w(filename)); - TRACE("MajorType %s\n", debugstr_guid(&mt.majortype)); - TRACE("SubType %s\n", debugstr_guid(&mt.subtype)); - - CoTaskMemFree(filename); - FreeMediaType(&mt); - if (ppFilter) *ppFilter = preader; - IFileSourceFilter_Release(pfile); return S_OK; - -error: - if (pfile) - IFileSourceFilter_Release(pfile); - IFilterGraph2_RemoveFilter(iface, preader); - IBaseFilter_Release(preader); - - return hr; } static HRESULT WINAPI FilterGraph2_SetLogFile(IFilterGraph2 *iface, DWORD_PTR hFile)
1
0
0
0
Kai Krakow : wined3d: Add GPU information for NVIDIA GTX 1660 Ti.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 682805ec6aef71ea7aac04a665ded43680666438 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=682805ec6aef71ea7aac04a6…
Author: Kai Krakow <kai(a)kaishome.de> Date: Mon Aug 5 23:57:43 2019 +0200 wined3d: Add GPU information for NVIDIA GTX 1660 Ti. Signed-off-by: Kai Krakow <kai(a)kaishome.de> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/directx.c | 1 + dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 3 insertions(+) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index c500c34..86e347d 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -1357,6 +1357,7 @@ cards_nvidia_binary[] = {"RTX 2080", CARD_NVIDIA_GEFORCE_RTX2080}, /* GeForce 2000 - highend */ {"RTX 2070", CARD_NVIDIA_GEFORCE_RTX2070}, /* GeForce 2000 - highend */ {"RTX 2060", CARD_NVIDIA_GEFORCE_RTX2060}, /* GeForce 2000 - highend */ + {"GTX 1660 Ti", CARD_NVIDIA_GEFORCE_GTX1660TI}, /* GeForce 1600 - highend */ {"TITAN V", CARD_NVIDIA_TITANV}, /* GeForce 1000 - highend */ {"TITAN X (Pascal)", CARD_NVIDIA_TITANX_PASCAL}, /* GeForce 1000 - highend */ {"GTX 1080 Ti", CARD_NVIDIA_GEFORCE_GTX1080TI}, /* GeForce 1000 - highend */ diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 15063e7..967348d 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -338,6 +338,7 @@ static const struct wined3d_gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080TI, "NVIDIA GeForce GTX 1080 Ti", DRIVER_NVIDIA_GEFORCE8, 11264}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANX_PASCAL, "NVIDIA TITAN X (Pascal)", DRIVER_NVIDIA_GEFORCE8, 12288}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANV, "NVIDIA TITAN V", DRIVER_NVIDIA_GEFORCE8, 12288}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1660TI, "NVIDIA GeForce GTX 1660 Ti", DRIVER_NVIDIA_GEFORCE8, 6144}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2060, "NVIDIA GeForce RTX 2060", DRIVER_NVIDIA_GEFORCE8, 6144}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2070, "NVIDIA GeForce RTX 2070", DRIVER_NVIDIA_GEFORCE8, 8192}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_RTX2080, "NVIDIA GeForce RTX 2080", DRIVER_NVIDIA_GEFORCE8, 8192}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1048d19..c628b2f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2513,6 +2513,7 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX1080TI = 0x1b06, CARD_NVIDIA_TITANX_PASCAL = 0x1b00, CARD_NVIDIA_TITANV = 0x1d81, + CARD_NVIDIA_GEFORCE_GTX1660TI = 0x2182, CARD_NVIDIA_GEFORCE_RTX2060 = 0x1f08, CARD_NVIDIA_GEFORCE_RTX2070 = 0x1f07, CARD_NVIDIA_GEFORCE_RTX2080 = 0x1e87,
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Always set the IRP return size.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: dfc7132f50321dd9117930020c5fc670c905ddba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dfc7132f50321dd911793002…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 22:48:43 2019 -0500 ntoskrnl.exe: Always set the IRP return size. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 92f9afa..40c18d8 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -438,9 +438,9 @@ static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp, { req->handle = wine_server_obj_handle( irp_handle ); req->status = irp->IoStatus.u.Status; + req->size = irp->IoStatus.Information; if (irp->IoStatus.u.Status >= 0) { - req->size = irp->IoStatus.Information; if (out_buff) wine_server_add_data( req, out_buff, irp->IoStatus.Information ); } status = wine_server_call( req ); diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index c701cf2..e7a8cc9 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -445,7 +445,7 @@ static void test_return_status(void) ok(!ret, "ioctl succeeded\n"); ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); todo_wine ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); - todo_wine ok(ret_size == 3, "got size %u\n", ret_size); + ok(ret_size == 3, "got size %u\n", ret_size); strcpy(buffer, "abcdef"); status = 0xceadbeef; @@ -455,7 +455,7 @@ static void test_return_status(void) ok(!ret, "ioctl succeeded\n"); ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); ok(!strcmp(buffer, "abcdef"), "got buffer %s\n", buffer); - todo_wine ok(ret_size == 3, "got size %u\n", ret_size); + ok(ret_size == 3, "got size %u\n", ret_size); } static void test_driver3(void)
1
0
0
0
Zebediah Figura : ntoskrnl.exe/tests: Add some tests for IRP return values.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: d99ecb078b628e2ee9cd2c54049b3e67f1ae1208 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d99ecb078b628e2ee9cd2c54…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 22:48:42 2019 -0500 ntoskrnl.exe/tests: Add some tests for IRP return values. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 21 +++++++++++ dlls/ntoskrnl.exe/tests/driver.h | 1 + dlls/ntoskrnl.exe/tests/ntoskrnl.c | 71 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index f43e48f..525d818 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1665,6 +1665,24 @@ static NTSTATUS get_fscontext(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *inf return STATUS_SUCCESS; } +static NTSTATUS return_status(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) +{ + char *buffer = irp->AssociatedIrp.SystemBuffer; + NTSTATUS ret; + + if (!buffer) + return STATUS_ACCESS_VIOLATION; + + if (stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(DWORD) + || stack->Parameters.DeviceIoControl.OutputBufferLength < 3) + return STATUS_BUFFER_TOO_SMALL; + + ret = *(DWORD *)irp->AssociatedIrp.SystemBuffer; + memcpy(buffer, "ghi", 3); + *info = 3; + return ret; +} + static NTSTATUS test_load_driver_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) { BOOL *load = irp->AssociatedIrp.SystemBuffer; @@ -1735,6 +1753,9 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp) case IOCTL_WINETEST_GET_FSCONTEXT: status = get_fscontext(irp, stack, &irp->IoStatus.Information); break; + case IOCTL_WINETEST_RETURN_STATUS: + status = return_status(irp, stack, &irp->IoStatus.Information); + break; case IOCTL_WINETEST_DETACH: IoDetachDevice(lower_device); status = STATUS_SUCCESS; diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index a468cbd..313d554 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -32,6 +32,7 @@ #define IOCTL_WINETEST_GET_CREATE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_GET_CLOSE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_GET_FSCONTEXT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_RETURN_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x80a, METHOD_BUFFERED, FILE_ANY_ACCESS) static const char teststr[] = "Wine is not an emulator"; diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index dfd0cb3..c701cf2 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -21,6 +21,8 @@ */ #include <stdio.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windows.h" #include "winsvc.h" #include "winioctl.h" @@ -388,6 +390,74 @@ static void test_file_handles(void) ok(count == 3, "got %u\n", count); } +static void test_return_status(void) +{ + NTSTATUS status; + char buffer[7]; + DWORD ret_size; + BOOL ret; + + strcpy(buffer, "abcdef"); + status = STATUS_SUCCESS; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + ok(ret, "ioctl failed\n"); + ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = STATUS_TIMEOUT; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + todo_wine ok(ret, "ioctl failed\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0x0eadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + todo_wine ok(ret, "ioctl failed\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0x4eadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + todo_wine ok(ret, "ioctl failed\n"); + todo_wine ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0x8eadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + ok(!ret, "ioctl succeeded\n"); + ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); + todo_wine ok(!strcmp(buffer, "ghidef"), "got buffer %s\n", buffer); + todo_wine ok(ret_size == 3, "got size %u\n", ret_size); + + strcpy(buffer, "abcdef"); + status = 0xceadbeef; + SetLastError(0xdeadbeef); + ret = DeviceIoControl(device, IOCTL_WINETEST_RETURN_STATUS, &status, + sizeof(status), buffer, sizeof(buffer), &ret_size, NULL); + ok(!ret, "ioctl succeeded\n"); + ok(GetLastError() == ERROR_MR_MID_NOT_FOUND, "got error %u\n", GetLastError()); + ok(!strcmp(buffer, "abcdef"), "got buffer %s\n", buffer); + todo_wine ok(ret_size == 3, "got size %u\n", ret_size); +} + static void test_driver3(void) { char filename[MAX_PATH]; @@ -440,6 +510,7 @@ START_TEST(ntoskrnl) test_overlapped(); test_load_driver(service2); test_file_handles(); + test_return_status(); /* We need a separate ioctl to call IoDetachDevice(); calling it in the * driver unload routine causes a live-lock. */
1
0
0
0
Zebediah Figura : ntoskrnl.exe/tests: Add some tests for file objects.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 7845c0117a6a26f78fcc870b8fbae4ff74816ff4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7845c0117a6a26f78fcc870b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Aug 6 22:48:41 2019 -0500 ntoskrnl.exe/tests: Add some tests for file objects. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 42 ++++++++++++++++++++-- dlls/ntoskrnl.exe/tests/driver.h | 3 ++ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 71 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 3 deletions(-) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 41b1420..f43e48f 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -209,6 +209,7 @@ static void *get_proc_address(const char *name) } static FILE_OBJECT *last_created_file; +static unsigned int create_count, close_count; static void test_irp_struct(IRP *irp, DEVICE_OBJECT *device) { @@ -1631,7 +1632,7 @@ static NTSTATUS test_basic_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR * return STATUS_SUCCESS; } -static NTSTATUS get_cancel_count(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) +static NTSTATUS get_dword(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info, DWORD value) { ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; char *buffer = irp->AssociatedIrp.SystemBuffer; @@ -1642,7 +1643,24 @@ static NTSTATUS get_cancel_count(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR * if (length < sizeof(DWORD)) return STATUS_BUFFER_TOO_SMALL; - *(DWORD*)buffer = cancel_cnt; + *(DWORD*)buffer = value; + *info = sizeof(DWORD); + return STATUS_SUCCESS; +} + +static NTSTATUS get_fscontext(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info) +{ + ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; + char *buffer = irp->AssociatedIrp.SystemBuffer; + DWORD *context = stack->FileObject->FsContext; + + if (!buffer || !context) + return STATUS_ACCESS_VIOLATION; + + if (length < sizeof(DWORD)) + return STATUS_BUFFER_TOO_SMALL; + + *(DWORD*)buffer = *context; *info = sizeof(DWORD); return STATUS_SUCCESS; } @@ -1667,8 +1685,13 @@ static NTSTATUS test_load_driver_ioctl(IRP *irp, IO_STACK_LOCATION *stack, ULONG static NTSTATUS WINAPI driver_Create(DEVICE_OBJECT *device, IRP *irp) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); + DWORD *context = ExAllocatePool(PagedPool, sizeof(*context)); last_created_file = irpsp->FileObject; + ++create_count; + if (context) + *context = create_count; + irpsp->FileObject->FsContext = context; create_caller_thread = KeGetCurrentThread(); irp->IoStatus.Status = STATUS_SUCCESS; @@ -1701,7 +1724,16 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp) IoMarkIrpPending(irp); return STATUS_PENDING; case IOCTL_WINETEST_GET_CANCEL_COUNT: - status = get_cancel_count(irp, stack, &irp->IoStatus.Information); + status = get_dword(irp, stack, &irp->IoStatus.Information, cancel_cnt); + break; + case IOCTL_WINETEST_GET_CREATE_COUNT: + status = get_dword(irp, stack, &irp->IoStatus.Information, create_count); + break; + case IOCTL_WINETEST_GET_CLOSE_COUNT: + status = get_dword(irp, stack, &irp->IoStatus.Information, close_count); + break; + case IOCTL_WINETEST_GET_FSCONTEXT: + status = get_fscontext(irp, stack, &irp->IoStatus.Information); break; case IOCTL_WINETEST_DETACH: IoDetachDevice(lower_device); @@ -1733,6 +1765,10 @@ static NTSTATUS WINAPI driver_FlushBuffers(DEVICE_OBJECT *device, IRP *irp) static NTSTATUS WINAPI driver_Close(DEVICE_OBJECT *device, IRP *irp) { + IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); + ++close_count; + if (stack->FileObject->FsContext) + ExFreePool(stack->FileObject->FsContext); irp->IoStatus.Status = STATUS_SUCCESS; IoCompleteRequest(irp, IO_NO_INCREMENT); return STATUS_SUCCESS; diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index d5ff09a..a468cbd 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -29,6 +29,9 @@ #define IOCTL_WINETEST_TEST_CANCEL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_GET_CANCEL_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_WINETEST_DETACH CTL_CODE(FILE_DEVICE_UNKNOWN, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_GET_CREATE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_GET_CLOSE_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS) +#define IOCTL_WINETEST_GET_FSCONTEXT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS) static const char teststr[] = "Wine is not an emulator"; diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 48ddb29..dfd0cb3 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -318,6 +318,76 @@ static void test_load_driver(SC_HANDLE service) ok(status.dwCurrentState == SERVICE_STOPPED, "got state %#x\n", status.dwCurrentState); } +static void test_file_handles(void) +{ + DWORD count, ret_size; + HANDLE file, dup, file2; + BOOL ret; + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 2, "got %u\n", count); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 1, "got %u\n", count); + + file = CreateFileA("\\\\.\\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); + + file2 = CreateFileA("\\\\.\\WineTestDriver", 0, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file2 != INVALID_HANDLE_VALUE, "failed to open device: %u\n", GetLastError()); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 4, "got %u\n", count); + + ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, 0, FALSE, DUPLICATE_SAME_ACCESS); + ok(ret, "failed to duplicate handle: %u\n", GetLastError()); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CREATE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 4, "got %u\n", count); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 1, "got %u\n", count); + + ret = DeviceIoControl(file, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); + + ret = DeviceIoControl(file2, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 4, "got %u\n", count); + + ret = DeviceIoControl(dup, IOCTL_WINETEST_GET_FSCONTEXT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); + + CloseHandle(dup); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 1, "got %u\n", count); + + CloseHandle(file2); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 2, "got %u\n", count); + + CloseHandle(file); + + ret = DeviceIoControl(device, IOCTL_WINETEST_GET_CLOSE_COUNT, NULL, 0, &count, sizeof(count), &ret_size, NULL); + ok(ret, "ioctl failed: %u\n", GetLastError()); + ok(count == 3, "got %u\n", count); +} + static void test_driver3(void) { char filename[MAX_PATH]; @@ -369,6 +439,7 @@ START_TEST(ntoskrnl) main_test(); test_overlapped(); test_load_driver(service2); + test_file_handles(); /* We need a separate ioctl to call IoDetachDevice(); calling it in the * driver unload routine causes a live-lock. */
1
0
0
0
Henri Verbeet : wined3d: Get rid of the "dirtyArray" field from struct wined3d_context.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 2ddb6b66a7cda0bf6aaddc0c6899e35cc92ceee9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2ddb6b66a7cda0bf6aaddc0c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 7 16:30:01 2019 +0430 wined3d: Get rid of the "dirtyArray" field from struct wined3d_context. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 36 ++++++++++++++++++------------------ dlls/wined3d/device.c | 20 ++++++++------------ dlls/wined3d/wined3d_private.h | 20 ++++++-------------- 3 files changed, 32 insertions(+), 44 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 53d44d9..2509d90 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1647,18 +1647,14 @@ void context_invalidate_compute_state(struct wined3d_context *context, DWORD sta context->dirty_compute_states[index] |= (1u << shift); } -void context_invalidate_state(struct wined3d_context *context, DWORD state) +void context_invalidate_state(struct wined3d_context *context, unsigned int state_id) { - DWORD rep = context->state_table[state].representative; - DWORD idx; - BYTE shift; - - if (isStateDirty(context, rep)) return; + unsigned int representative = context->state_table[state_id].representative; + unsigned int index, shift; - context->dirtyArray[context->numDirtyEntries++] = rep; - idx = rep / (sizeof(*context->isStateDirty) * CHAR_BIT); - shift = rep & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1); - context->isStateDirty[idx] |= (1u << shift); + index = representative / (sizeof(*context->dirty_graphics_states) * CHAR_BIT); + shift = representative & ((sizeof(*context->dirty_graphics_states) * CHAR_BIT) - 1); + context->dirty_graphics_states[index] |= (1u << shift); } /* This function takes care of wined3d pixel format selection. */ @@ -3911,7 +3907,7 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context_gl->gl_info; const struct wined3d_fb_state *fb = state->fb; - unsigned int i; + unsigned int i, base; WORD map; if (!have_framebuffer_attachment(gl_info->limits.buffers, fb->render_targets, fb->depth_stencil)) @@ -3963,13 +3959,18 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, wined3d_buffer_load_sysmem(state->index_buffer, context); } - for (i = 0; i < context->numDirtyEntries; ++i) + for (i = 0, base = 0; i < ARRAY_SIZE(context->dirty_graphics_states); ++i) { - DWORD rep = context->dirtyArray[i]; - DWORD idx = rep / (sizeof(*context->isStateDirty) * CHAR_BIT); - BYTE shift = rep & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1); - context->isStateDirty[idx] &= ~(1u << shift); - state_table[rep].apply(context, state, rep); + uint32_t dirty_mask = context->dirty_graphics_states[i]; + + while (dirty_mask) + { + unsigned int state_id = base + wined3d_bit_scan(&dirty_mask); + + state_table[state_id].apply(context, state, state_id); + context->dirty_graphics_states[i] &= ~(1u << (state_id - base)); + } + base += sizeof(dirty_mask) * CHAR_BIT; } if (context->shader_update_mask & ~(1u << WINED3D_SHADER_TYPE_COMPUTE)) @@ -4005,7 +4006,6 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) wined3d_context_gl_check_fbo_status(context_gl, GL_FRAMEBUFFER); - context->numDirtyEntries = 0; /* This makes the whole list clean */ context->last_was_blit = FALSE; context->last_was_ffp_blit = FALSE; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a28dd6c..c37f386 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5866,30 +5866,26 @@ err: return hr; } -void device_invalidate_state(const struct wined3d_device *device, DWORD state) +void device_invalidate_state(const struct wined3d_device *device, unsigned int state_id) { - DWORD rep = device->state_table[state].representative; + unsigned int representative, i, idx, shift; struct wined3d_context *context; - unsigned int i, idx, shift; wined3d_from_cs(device->cs); - if (STATE_IS_COMPUTE(state)) + if (STATE_IS_COMPUTE(state_id)) { for (i = 0; i < device->context_count; ++i) - context_invalidate_compute_state(device->contexts[i], state); + context_invalidate_compute_state(device->contexts[i], state_id); return; } + representative = device->state_table[state_id].representative; + idx = representative / (sizeof(*context->dirty_graphics_states) * CHAR_BIT); + shift = representative & ((sizeof(*context->dirty_graphics_states) * CHAR_BIT) - 1); for (i = 0; i < device->context_count; ++i) { - context = device->contexts[i]; - if (isStateDirty(context, rep)) continue; - - context->dirtyArray[context->numDirtyEntries++] = rep; - idx = rep / (sizeof(*context->isStateDirty) * CHAR_BIT); - shift = rep & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1); - context->isStateDirty[idx] |= (1u << shift); + device->contexts[i]->dirty_graphics_states[idx] |= (1u << shift); } } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e6f9340..1048d19 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1891,16 +1891,8 @@ struct wined3d_context { const struct wined3d_d3d_info *d3d_info; const struct wined3d_state_entry *state_table; - /* State dirtification - * dirtyArray is an array that contains markers for dirty states. numDirtyEntries states are dirty, their numbers are in indices - * 0...numDirtyEntries - 1. isStateDirty is a redundant copy of the dirtyArray. Technically only one of them would be needed, - * but with the help of both it is easy to find out if a state is dirty(just check the array index), and for applying dirty states - * only numDirtyEntries array elements have to be checked, not STATE_HIGHEST states. - */ - DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ - DWORD numDirtyEntries; - DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ - unsigned int dirty_compute_states[STATE_COMPUTE_COUNT / (sizeof(unsigned int) * CHAR_BIT) + 1]; + uint32_t dirty_graphics_states[STATE_HIGHEST / (sizeof(uint32_t) * CHAR_BIT) + 1]; + uint32_t dirty_compute_states[STATE_COMPUTE_COUNT / (sizeof(uint32_t) * CHAR_BIT) + 1]; struct wined3d_device *device; struct wined3d_swapchain *swapchain; @@ -3291,11 +3283,11 @@ static inline struct wined3d_device_gl *wined3d_device_gl(struct wined3d_device return CONTAINING_RECORD(device, struct wined3d_device_gl, d); } -static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) +static inline BOOL isStateDirty(const struct wined3d_context *context, unsigned int state_id) { - DWORD idx = state / (sizeof(*context->isStateDirty) * CHAR_BIT); - BYTE shift = state & ((sizeof(*context->isStateDirty) * CHAR_BIT) - 1); - return context->isStateDirty[idx] & (1u << shift); + unsigned int idx = state_id / (sizeof(*context->dirty_graphics_states) * CHAR_BIT); + unsigned int shift = state_id & ((sizeof(*context->dirty_graphics_states) * CHAR_BIT) - 1); + return context->dirty_graphics_states[idx] & (1u << shift); } static inline float wined3d_alpha_ref(const struct wined3d_state *state)
1
0
0
0
Henri Verbeet : wined3d: Invalidate the relevant sampler when unloading a currently bound texture.
by Alexandre Julliard
07 Aug '19
07 Aug '19
Module: wine Branch: master Commit: 3bc8df5166f9ba796a9624d7363acb5ffa0ba059 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3bc8df5166f9ba796a9624d7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 7 16:30:00 2019 +0430 wined3d: Invalidate the relevant sampler when unloading a currently bound texture. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 6424553..705b725 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -639,6 +639,9 @@ static void wined3d_texture_gl_unload_texture(struct wined3d_texture_gl *texture const struct wined3d_gl_info *gl_info = NULL; struct wined3d_context *context = NULL; + if (texture_gl->t.resource.bind_count) + device_invalidate_state(device, STATE_SAMPLER(texture_gl->t.sampler)); + if (texture_gl->texture_rgb.name || texture_gl->texture_srgb.name || texture_gl->rb_multisample || texture_gl->rb_resolved) {
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
71
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
Results per page:
10
25
50
100
200