Use the device maximum supported shader model
Use the device maximum supported shader model for DXC compiler. Bug: None Change-Id: I05f66d499405a3512a43daca35bb20be84f1f6c5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51080 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
53abfc95f4
commit
75de553398
|
@ -314,12 +314,15 @@ namespace dawn_native { namespace d3d12 {
|
|||
options_glsl.force_zero_initialized_variables = true;
|
||||
|
||||
spirv_cross::CompilerHLSL::Options options_hlsl;
|
||||
if (GetDevice()->IsExtensionEnabled(Extension::ShaderFloat16)) {
|
||||
if (GetDevice()->IsToggleEnabled(Toggle::UseDXC)) {
|
||||
options_hlsl.shader_model = ToBackend(GetDevice())->GetDeviceInfo().shaderModel;
|
||||
options_hlsl.enable_16bit_types = true;
|
||||
} else {
|
||||
options_hlsl.shader_model = 51;
|
||||
}
|
||||
|
||||
if (GetDevice()->IsExtensionEnabled(Extension::ShaderFloat16)) {
|
||||
options_hlsl.enable_16bit_types = true;
|
||||
}
|
||||
// PointCoord and PointSize are not supported in HLSL
|
||||
// TODO (hao.x.li@intel.com): The point_coord_compat and point_size_compat are
|
||||
// required temporarily for https://bugs.chromium.org/p/dawn/issues/detail?id=146,
|
||||
|
|
Loading…
Reference in New Issue