d3d11: Support D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS in ID3D11Device CheckFeatureSupport.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
08f04c5a6e
commit
eedd9671c1
|
@ -2784,6 +2784,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device *
|
||||||
threading_data->DriverCommandLists = FALSE;
|
threading_data->DriverCommandLists = FALSE;
|
||||||
return S_OK;
|
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:
|
default:
|
||||||
FIXME("Unhandled feature %#x.\n", feature);
|
FIXME("Unhandled feature %#x.\n", feature);
|
||||||
|
|
|
@ -9190,6 +9190,7 @@ static void test_null_sampler(void)
|
||||||
static void test_check_feature_support(void)
|
static void test_check_feature_support(void)
|
||||||
{
|
{
|
||||||
D3D11_FEATURE_DATA_THREADING threading[2];
|
D3D11_FEATURE_DATA_THREADING threading[2];
|
||||||
|
D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS hwopts;
|
||||||
ID3D11Device *device;
|
ID3D11Device *device;
|
||||||
ULONG refcount;
|
ULONG refcount;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -9231,6 +9232,23 @@ static void test_check_feature_support(void)
|
||||||
ok(threading->DriverCommandLists == TRUE || threading->DriverCommandLists == FALSE,
|
ok(threading->DriverCommandLists == TRUE || threading->DriverCommandLists == FALSE,
|
||||||
"Got unexpected command lists %#x.\n", threading->DriverCommandLists);
|
"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);
|
refcount = ID3D11Device_Release(device);
|
||||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,6 +445,11 @@ typedef struct D3D11_FEATURE_DATA_THREADING
|
||||||
BOOL DriverCommandLists;
|
BOOL DriverCommandLists;
|
||||||
} D3D11_FEATURE_DATA_THREADING;
|
} 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
|
typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS
|
||||||
{
|
{
|
||||||
BOOL OutputMergerLogicOp;
|
BOOL OutputMergerLogicOp;
|
||||||
|
|
Loading…
Reference in New Issue