From b58efd079cab22fe46db6a55e749b0179d9c5a07 Mon Sep 17 00:00:00 2001 From: Qin Jiajia Date: Thu, 20 May 2021 01:50:57 +0000 Subject: [PATCH] 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 Reviewed-by: Rafael Cintron Commit-Queue: Jiajia Qin --- src/dawn_native/d3d12/ShaderModuleD3D12.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp index 00cbc36fde..2b7f3e947a 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp +++ b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp @@ -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; }