mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 23:11:01 +01:00
[d3d12] don't expose adapter if it doesn't support DXIL when the DXC container is present
This commit is contained in:
1 parent
201d9ea79f
commit
5b9c526c55
1 file changed
+6
-4
@@ -207,10 +207,10 @@ impl super::Adapter {
|
||||
Direct3D12::D3D_SHADER_MODEL_6_2,
|
||||
Direct3D12::D3D_SHADER_MODEL_6_1,
|
||||
Direct3D12::D3D_SHADER_MODEL_6_0,
|
||||
Direct3D12::D3D_SHADER_MODEL_5_1,
|
||||
]
|
||||
.iter();
|
||||
match loop {
|
||||
|
||||
let highest_shader_model = loop {
|
||||
if let Some(&sm) = versions.next() {
|
||||
let mut sm = Direct3D12::D3D12_FEATURE_DATA_SHADER_MODEL {
|
||||
HighestShaderModel: sm,
|
||||
@@ -229,8 +229,10 @@ impl super::Adapter {
|
||||
} else {
|
||||
break Direct3D12::D3D_SHADER_MODEL_5_1;
|
||||
}
|
||||
} {
|
||||
Direct3D12::D3D_SHADER_MODEL_5_1 => naga::back::hlsl::ShaderModel::V5_1,
|
||||
};
|
||||
|
||||
match highest_shader_model {
|
||||
Direct3D12::D3D_SHADER_MODEL_5_1 => return None, // don't expose this adapter if it doesn't support DXIL
|
||||
Direct3D12::D3D_SHADER_MODEL_6_0 => naga::back::hlsl::ShaderModel::V6_0,
|
||||
Direct3D12::D3D_SHADER_MODEL_6_1 => naga::back::hlsl::ShaderModel::V6_1,
|
||||
Direct3D12::D3D_SHADER_MODEL_6_2 => naga::back::hlsl::ShaderModel::V6_2,
|
||||
|
||||
Reference in new issue
Block a user