mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07: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;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
#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);
|
||||
shader_model.HighestShaderModel = 0x89;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
||||
todo
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
shader_model.HighestShaderModel = 0x52;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
||||
todo
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
shader_model.HighestShaderModel = 0;
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_SHADER_MODEL, &shader_model, sizeof(shader_model));
|
||||
todo
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Root signature */
|
||||
|
Loading…
Reference in New Issue
Block a user