diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 36d84339..3eb7ec85 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -3490,9 +3490,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device9 TRACE("Request shader model %#x.\n", data->HighestShaderModel); #ifdef VKD3D_SHADER_UNSUPPORTED_DXIL - data->HighestShaderModel = D3D_SHADER_MODEL_6_0; + data->HighestShaderModel = min(data->HighestShaderModel, D3D_SHADER_MODEL_6_0); #else - data->HighestShaderModel = D3D_SHADER_MODEL_5_1; + data->HighestShaderModel = min(data->HighestShaderModel, D3D_SHADER_MODEL_5_1); #endif TRACE("Shader model %#x.\n", data->HighestShaderModel); diff --git a/tests/d3d12.c b/tests/d3d12.c index 0258604d..8db0af99 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -994,7 +994,6 @@ static void test_check_feature_support(void) shader_model.HighestShaderModel = D3D_SHADER_MODEL_5_1; 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); - todo ok(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)