diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 187b3f0d63e..9a42c8b53b3 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2784,6 +2784,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device * threading_data->DriverCommandLists = FALSE; return S_OK; } + case D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS: + { + D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS *options = feature_support_data; + if (feature_support_data_size != sizeof(*options)) + { + WARN("Invalid data size.\n"); + return E_INVALIDARG; + } + + options->ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x = FALSE; + return S_OK; + } default: FIXME("Unhandled feature %#x.\n", feature); diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 25ecad42efa..115600b6e77 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -9190,6 +9190,7 @@ static void test_null_sampler(void) static void test_check_feature_support(void) { D3D11_FEATURE_DATA_THREADING threading[2]; + D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS hwopts; ID3D11Device *device; ULONG refcount; HRESULT hr; @@ -9231,6 +9232,23 @@ static void test_check_feature_support(void) ok(threading->DriverCommandLists == TRUE || threading->DriverCommandLists == FALSE, "Got unexpected command lists %#x.\n", threading->DriverCommandLists); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, NULL, 0); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, 0); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts) - 1); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts) / 2); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts) + 1); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts) * 2); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &hwopts, sizeof(hwopts)); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + trace("Shader support %#x.\n", hwopts.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x); + refcount = ID3D11Device_Release(device); ok(!refcount, "Device has %u references left.\n", refcount); } diff --git a/include/d3d11.idl b/include/d3d11.idl index cd177c2c495..767321be1fc 100644 --- a/include/d3d11.idl +++ b/include/d3d11.idl @@ -445,6 +445,11 @@ typedef struct D3D11_FEATURE_DATA_THREADING BOOL DriverCommandLists; } D3D11_FEATURE_DATA_THREADING; +typedef struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS +{ + BOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x; +} D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS; + typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS { BOOL OutputMergerLogicOp;