[PATCH 1/2] d3d11: Handle D3D11_FEATURE_ARCHITECTURE_INFO in d3d11_device_CheckFeatureSupport.
Some applications will not start if they find this query not available. Tested on Ubuntu 17.10. Signed-off-by: Pablo Martin <pmart-wine(a)riseup.net> --- dlls/d3d11/device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d3155d56bf..02dff99452 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3445,6 +3445,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device * return S_OK; } + case D3D11_FEATURE_ARCHITECTURE_INFO: + { + D3D11_FEATURE_DATA_ARCHITECTURE_INFO *options = feature_support_data; + if (feature_support_data_size != sizeof(*options)) + { + WARN("Invalid data size.\n"); + return E_INVALIDARG; + } + options->TileBasedDeferredRenderer = FALSE; + return S_OK; + } + default: FIXME("Unhandled feature %#x.\n", feature); return E_NOTIMPL; -- 2.14.1
This query is not available in all windows versions so I added broken() checks in the tests. Tested on Ubuntu 17.10. Signed-off-by: Pablo Martin <pmart-wine(a)riseup.net> --- dlls/d3d11/tests/d3d11.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 8ca6634626..9c499259f6 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -15486,6 +15486,7 @@ static void test_check_feature_support(void) { D3D11_FEATURE_DATA_THREADING threading[2]; D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS hwopts; + D3D11_FEATURE_DATA_ARCHITECTURE_INFO archinfo; ID3D11Device *device; ULONG refcount; HRESULT hr; @@ -15544,6 +15545,13 @@ static void test_check_feature_support(void) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); trace("Compute shader support via SM4 %#x.\n", hwopts.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_ARCHITECTURE_INFO, &archinfo, sizeof(archinfo)); + ok(hr == S_OK || broken(hr == E_NOTIMPL) /* Not available on all Windows versions. */, + "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_ARCHITECTURE_INFO, &archinfo, sizeof(archinfo)*2); + ok(hr == E_INVALIDARG || broken(hr == E_NOTIMPL) /* Not available on all Windows versions. */, + "Got unexpected hr %#x.\n", hr); + refcount = ID3D11Device_Release(device); ok(!refcount, "Device has %u references left.\n", refcount); } -- 2.14.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=38104 Your paranoid android. === wvistau64 (32 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057. === wvistau64_zh_CN (32 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057. === wvistau64_fr (32 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057. === wvistau64_he (32 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057. === w2008s64 (32 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057. === wvistau64 (64 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057. === w2008s64 (64 bit d3d11) === d3d11.c:15549: Test failed: Got unexpected hr 0x80070057.
Ok, this is my fault, since I assumed windows would return E_NOTIMPL when the query is not available, but I see it actually returns E_INVALIDARG. Will resend the patches with a fix. Question is: we are returning E_NOTIMPL when a query is not available in CheckFormatSupport, shouldn't we be returning E_INVALIDARG as well? This might allow applications querying this to properly handle the result when the query is not available. Also, I have another question, doesn't wine have some facility for submitting patches just for doing the tests on all platforms? That way I could avoid noise on the devel ml.
On 30/04/18 10:03, Pablo Martin wrote:
Also, I have another question, doesn't wine have some facility for submitting patches just for doing the tests on all platforms? That way I could avoid noise on the devel ml.
Yes, you can register for a testbot account here: https://testbot.winehq.org/ Thanks for your interest in Wine!
participants (3)
-
Marvin -
Pablo Martin -
Zebediah Figura