diff --git a/lib/DxcSupport/dxcapi.extval.cpp b/lib/DxcSupport/dxcapi.extval.cpp index 8dd07101e5..66b94a2a20 100644 --- a/lib/DxcSupport/dxcapi.extval.cpp +++ b/lib/DxcSupport/dxcapi.extval.cpp @@ -319,7 +319,7 @@ class ExternalValidationCompiler : public IDxcCompiler2, public IDxcCompiler3 { template CComPtr cast() const { CComPtr Result; if (Compiler) - Compiler->QueryInterface(__uuidof(T), reinterpret_cast(&Result)); + Compiler.QueryInterface(&Result); assert(Result); return Result; } diff --git a/tools/clang/test/CodeGenDXIL/hlsl/intrinsics/asuint-constant-eval.hlsl b/tools/clang/test/CodeGenDXIL/hlsl/intrinsics/asuint-constant-eval.hlsl index a6db38986d..889ce12371 100644 --- a/tools/clang/test/CodeGenDXIL/hlsl/intrinsics/asuint-constant-eval.hlsl +++ b/tools/clang/test/CodeGenDXIL/hlsl/intrinsics/asuint-constant-eval.hlsl @@ -1,3 +1,4 @@ +// REQUIRES: dxil-1-9 // RUN: %dxc /T ps_6_9 -fcgl %s | FileCheck %s // Compiling this HLSL would fail this assertion in IntExprEvaluator::Success: diff --git a/tools/clang/unittests/HLSL/ValidationTest.cpp b/tools/clang/unittests/HLSL/ValidationTest.cpp index 6632f32ccb..5c4f013835 100644 --- a/tools/clang/unittests/HLSL/ValidationTest.cpp +++ b/tools/clang/unittests/HLSL/ValidationTest.cpp @@ -4274,8 +4274,8 @@ TEST_F(ValidationTest, UnitTestExtValidationSupport) { VERIFY_ARE_EQUAL_STR(BogusPath.c_str(), "bogus"); VERIFY_IS_TRUE(ExtSupportBogus.dxilDllFailedToLoad()); - // 3. Test with a valid path to this file in the environment variable - std::filesystem::path p = std::filesystem::absolute(__FILE__); + // 3. Test with a valid path to a file in the environment variable + std::filesystem::path p = hlsl_test::GetPathToHlslDataFile(L"lit.local.cfg"); SetEnvVarW(L"DXC_DXIL_DLL_PATH", p.wstring()); if (!ExtSupportValidNonDLLPath.IsEnabled()) { @@ -4287,7 +4287,10 @@ TEST_F(ValidationTest, UnitTestExtValidationSupport) { // validate that ExtSupportValidNonDLLPath was able to capture the environment // variable's value, and that loading the valid non-dll path was unsuccessful std::string ValidNonDLLPath = ExtSupportValidNonDLLPath.getDxilDllPath(); - VERIFY_ARE_EQUAL_STR(ValidNonDLLPath.c_str(), __FILE__); + std::string FilePath; + Unicode::WideToUTF8String( + hlsl_test::GetPathToHlslDataFile(L"lit.local.cfg").c_str(), &FilePath); + VERIFY_ARE_EQUAL_STR(ValidNonDLLPath.c_str(), FilePath.c_str()); VERIFY_IS_TRUE(ExtSupportValidNonDLLPath.dxilDllFailedToLoad()); // 4. Test production of class IDs CLSID_DxcCompiler, CLSID_DxcLinker,