mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Return E_INVALIDARG if the requested shader model is unknown.
This commit is contained in:
parent
d17956ced8
commit
fb20639eb4
Notes:
Alexandre Julliard
2024-05-13 22:57:09 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/860
@ -3487,6 +3487,14 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device9
|
|||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data->HighestShaderModel != D3D_SHADER_MODEL_5_1
|
||||||
|
&& (data->HighestShaderModel < D3D_SHADER_MODEL_6_0
|
||||||
|
|| data->HighestShaderModel > D3D_HIGHEST_SHADER_MODEL))
|
||||||
|
{
|
||||||
|
WARN("Unknown shader model %#x.\n", data->HighestShaderModel);
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Request shader model %#x.\n", data->HighestShaderModel);
|
TRACE("Request shader model %#x.\n", data->HighestShaderModel);
|
||||||
|
|
||||||
#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
|
#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
|
||||||
|
@ -1010,15 +1010,12 @@ static void test_check_feature_support(void)
|
|||||||
"Got shader model %#x, expected <= %#x.\n", shader_model.HighestShaderModel, sm);
|
"Got shader model %#x, expected <= %#x.\n", shader_model.HighestShaderModel, sm);
|
||||||
shader_model.HighestShaderModel = 0x89;
|
shader_model.HighestShaderModel = 0x89;
|
||||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
||||||
todo
|
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
shader_model.HighestShaderModel = 0x52;
|
shader_model.HighestShaderModel = 0x52;
|
||||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
||||||
todo
|
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
shader_model.HighestShaderModel = 0;
|
shader_model.HighestShaderModel = 0;
|
||||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
||||||
todo
|
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
/* Root signature */
|
/* Root signature */
|
||||||
|
Loading…
Reference in New Issue
Block a user