Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/DxcSupport/dxcapi.extval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class ExternalValidationCompiler : public IDxcCompiler2, public IDxcCompiler3 {
template <typename T> CComPtr<T> cast() const {
CComPtr<T> Result;
if (Compiler)
Compiler->QueryInterface(__uuidof(T), reinterpret_cast<void **>(&Result));
Compiler.QueryInterface(&Result);
assert(Result);
return Result;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
9 changes: 6 additions & 3 deletions tools/clang/unittests/HLSL/ValidationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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,
Expand Down