Use HLSL version 2018 for DXC

Currently, we use the device maximum supported shader model for DXC
compiler. Meanwhile, we should use HLSL version 2018 or above to support
the maximum shader model. Otherwise, it may report below errors:
Explicit template arguments on intrinsic Load requires HLSL version 2018
or above.

Bug: None
Change-Id: I7b1bfd1c08eb5ad30b2f7d59d280678bb71d1d64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
This commit is contained in:
Qin Jiajia 2021-05-20 01:50:57 +00:00 committed by Dawn LUCI CQ
parent b2527e6d9c
commit b58efd079c
1 changed files with 4 additions and 4 deletions

View File

@ -82,11 +82,11 @@ namespace dawn_native { namespace d3d12 {
if (enable16BitTypes) {
// enable-16bit-types are only allowed in -HV 2018 (default)
arguments.push_back(L"/enable-16bit-types");
} else {
// Enable FXC backward compatibility by setting the language version to 2016
arguments.push_back(L"-HV");
arguments.push_back(L"2016");
}
arguments.push_back(L"-HV");
arguments.push_back(L"2018");
return arguments;
}