vkd3d: Return a shader model no higher than the requested one for D3D12_FEATURE_SHADER_MODEL.

This commit is contained in:
Conor McCarthy 2024-04-30 23:59:27 +10:00 committed by Alexandre Julliard
parent 677c23f1fe
commit d17956ced8
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
2 changed files with 2 additions and 3 deletions

View File

@ -3490,9 +3490,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device9
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
data->HighestShaderModel = D3D_SHADER_MODEL_6_0; data->HighestShaderModel = min(data->HighestShaderModel, D3D_SHADER_MODEL_6_0);
#else #else
data->HighestShaderModel = D3D_SHADER_MODEL_5_1; data->HighestShaderModel = min(data->HighestShaderModel, D3D_SHADER_MODEL_5_1);
#endif #endif
TRACE("Shader model %#x.\n", data->HighestShaderModel); TRACE("Shader model %#x.\n", data->HighestShaderModel);

View File

@ -994,7 +994,6 @@ static void test_check_feature_support(void)
shader_model.HighestShaderModel = D3D_SHADER_MODEL_5_1; shader_model.HighestShaderModel = D3D_SHADER_MODEL_5_1;
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));
ok(hr == S_OK, "Failed to check shader model, hr %#x.\n", hr); ok(hr == S_OK, "Failed to check shader model, hr %#x.\n", hr);
todo
ok(shader_model.HighestShaderModel <= D3D_SHADER_MODEL_5_1, ok(shader_model.HighestShaderModel <= D3D_SHADER_MODEL_5_1,
"Got shader model %#x, expected <= %#x.\n", shader_model.HighestShaderModel, D3D_SHADER_MODEL_5_1); "Got shader model %#x, expected <= %#x.\n", shader_model.HighestShaderModel, D3D_SHADER_MODEL_5_1);
for (sm = D3D_HIGHEST_SHADER_MODEL; sm >= D3D_SHADER_MODEL_6_0; --sm) for (sm = D3D_HIGHEST_SHADER_MODEL; sm >= D3D_SHADER_MODEL_6_0; --sm)