diff options
29 files changed, 111 insertions, 76 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index c0c1ba75a..f4d535466 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -950,9 +950,10 @@ Result linkAndOptimizeIR( if (requiredLoweringPassSet.autodiff) { dumpIRIfEnabled(codeGenContext, irModule, "BEFORE-AUTODIFF"); - enableIRValidationAtInsert(); - changed |= processAutodiffCalls(targetProgram, irModule, sink); - disableIRValidationAtInsert(); + { + auto validationScope = enableIRValidationScope(); + changed |= processAutodiffCalls(targetProgram, irModule, sink); + } dumpIRIfEnabled(codeGenContext, irModule, "AFTER-AUTODIFF"); } diff --git a/source/slang/slang-ir-autodiff-cfg-norm.cpp b/source/slang/slang-ir-autodiff-cfg-norm.cpp index 30e832719..720fdece2 100644 --- a/source/slang/slang-ir-autodiff-cfg-norm.cpp +++ b/source/slang/slang-ir-autodiff-cfg-norm.cpp @@ -755,9 +755,10 @@ void normalizeCFG( sortBlocksInFunc(func); legalizeDefUse(func); - disableIRValidationAtInsert(); - constructSSA(module, func); - enableIRValidationAtInsert(); + { + auto validationScope = disableIRValidationScope(); + constructSSA(module, func); + } module->invalidateAnalysisForInst(func); #if _DEBUG diff --git a/source/slang/slang-ir-autodiff-fwd.cpp b/source/slang/slang-ir-autodiff-fwd.cpp index 003790793..a2ee2bdf9 100644 --- a/source/slang/slang-ir-autodiff-fwd.cpp +++ b/source/slang/slang-ir-autodiff-fwd.cpp @@ -1900,12 +1900,11 @@ SlangResult ForwardDiffTranscriber::prepareFuncForForwardDiff(IRFunc* func) if (SLANG_SUCCEEDED(result)) { - disableIRValidationAtInsert(); + auto validationScope = disableIRValidationScope(); auto simplifyOptions = IRSimplificationOptions::getDefault(nullptr); simplifyOptions.removeRedundancy = true; simplifyOptions.hoistLoopInvariantInsts = true; simplifyFunc(autoDiffSharedContext->targetProgram, func, simplifyOptions); - enableIRValidationAtInsert(); } return result; } diff --git a/source/slang/slang-ir-autodiff-unzip.h b/source/slang/slang-ir-autodiff-unzip.h index ec435ee87..80b2038aa 100644 --- a/source/slang/slang-ir-autodiff-unzip.h +++ b/source/slang/slang-ir-autodiff-unzip.h @@ -436,9 +436,8 @@ struct DiffUnzipPass if (intermediateVar) { - disableIRValidationAtInsert(); + auto validationScope = disableIRValidationScope(); diffBuilder->addBackwardDerivativePrimalContextDecoration(callInst, intermediateVar); - enableIRValidationAtInsert(); } IRInst* diffVal = nullptr; diff --git a/source/slang/slang-ir-validate.cpp b/source/slang/slang-ir-validate.cpp index 565ae97d8..b3d6504ab 100644 --- a/source/slang/slang-ir-validate.cpp +++ b/source/slang/slang-ir-validate.cpp @@ -273,14 +273,19 @@ void validateIRInstOperands(IRValidateContext* context, IRInst* inst) } static thread_local bool _enableIRValidationAtInsert = false; -void disableIRValidationAtInsert() + +// RAII class implementation for exception-safe IR validation state management +IRValidationScope::IRValidationScope(bool enableValidation) + : m_previousState(_enableIRValidationAtInsert) { - _enableIRValidationAtInsert = false; + _enableIRValidationAtInsert = enableValidation; } -void enableIRValidationAtInsert() + +IRValidationScope::~IRValidationScope() { - _enableIRValidationAtInsert = true; + _enableIRValidationAtInsert = m_previousState; } + void validateIRInstOperands(IRInst* inst) { if (!_enableIRValidationAtInsert) diff --git a/source/slang/slang-ir-validate.h b/source/slang/slang-ir-validate.h index 722359452..7fc882f37 100644 --- a/source/slang/slang-ir-validate.h +++ b/source/slang/slang-ir-validate.h @@ -36,8 +36,38 @@ void validateIRModuleIfEnabled(CompileRequestBase* compileRequest, IRModule* mod void validateIRModuleIfEnabled(CodeGenContext* codeGenContext, IRModule* module); -void disableIRValidationAtInsert(); -void enableIRValidationAtInsert(); +// RAII class to manage IR validation state in an exception-safe manner +class [[nodiscard]] IRValidationScope +{ +public: + // Constructor saves current state and sets new state + explicit IRValidationScope(bool enableValidation); + + // Destructor automatically restores previous state + ~IRValidationScope(); + + // Non-copyable to prevent accidental copies + IRValidationScope(const IRValidationScope&) = delete; + IRValidationScope& operator=(const IRValidationScope&) = delete; + + // Non-movable to keep it simple + IRValidationScope(IRValidationScope&&) = delete; + IRValidationScope& operator=(IRValidationScope&&) = delete; + +private: + bool m_previousState; +}; + +// Convenience functions to create scoped guards +[[nodiscard]] inline IRValidationScope enableIRValidationScope() +{ + return IRValidationScope(true); +} + +[[nodiscard]] inline IRValidationScope disableIRValidationScope() +{ + return IRValidationScope(false); +} // Validate that the destination of an atomic operation is appropriate, meaning it's // either 'groupshared' or in a device buffer. diff --git a/tests/bugs/import-with-error.slang b/tests/bugs/import-with-error.slang index 1013de37c..e54f9e727 100644 --- a/tests/bugs/import-with-error.slang +++ b/tests/bugs/import-with-error.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:SIMPLE: +//TEST:SIMPLE: // Confirm that we correctly issue a diagnostic when // we `import` a module that has some errors in it. diff --git a/tests/diagnostics/missing-return-target.slang b/tests/diagnostics/missing-return-target.slang index fba1b9089..8fc65efd1 100644 --- a/tests/diagnostics/missing-return-target.slang +++ b/tests/diagnostics/missing-return-target.slang @@ -1,12 +1,12 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target spirv -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target glsl -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target wgsl +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target spirv +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target glsl +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_NOT_SUPP): -entry computeMain -stage compute -target wgsl -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target hlsl -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target metal -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cpp -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cuda +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target hlsl +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target metal +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cpp +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SUPP): -entry computeMain -stage compute -target cuda // Some compilation targets allow missing returns while some do not. // This test ensures that either errors and warnings are emitted appropriately. diff --git a/tests/diagnostics/recursive-import.slang b/tests/diagnostics/recursive-import.slang index 017e2a2fc..312c579cf 100644 --- a/tests/diagnostics/recursive-import.slang +++ b/tests/diagnostics/recursive-import.slang @@ -1,4 +1,4 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): // A file that recursively imports itself // (including transitive cases) should be diagnosed. diff --git a/tests/diagnostics/unbound-loop.slang b/tests/diagnostics/unbound-loop.slang index c0e67d9d4..5e85c3c66 100644 --- a/tests/diagnostics/unbound-loop.slang +++ b/tests/diagnostics/unbound-loop.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target hlsl -profile cs_6_5 +//TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target hlsl -profile cs_6_5 RWStructuredBuffer<float> outputBuffer; @@ -40,4 +40,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) __bwd_diff(test_loop_with_continue)(dpa, 1.0f); outputBuffer[1] = dpa.d; // Expect: 0.0131072 } -} +}
\ No newline at end of file diff --git a/tests/diagnostics/uninitialized-resource-type.slang b/tests/diagnostics/uninitialized-resource-type.slang index 5763a1abd..4d5b8f5b3 100644 --- a/tests/diagnostics/uninitialized-resource-type.slang +++ b/tests/diagnostics/uninitialized-resource-type.slang @@ -1,5 +1,5 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_1 -//DISABLE_DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_2 +//DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_1 +//DIAGNOSTIC_TEST:SIMPLE: -target hlsl -DTEST_2 SamplerState sampler; diff --git a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang index 3ed66b9bf..b7e98cffc 100644 --- a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang +++ b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Exclusive.slang @@ -1,14 +1,14 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV -//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA +//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL +//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV +//TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL +//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half // Not testing because CI runners may not support Metal's intrinsics. //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl -xslang -DMETAL diff --git a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang index ee228e566..40f77ee61 100644 --- a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang +++ b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_Inclusive.slang @@ -1,14 +1,14 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV -//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA +//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL +//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV +//TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL +//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU // Not testing because CI runners may not support Metal's intrinsics. //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl -xslang -DMETAL diff --git a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang index 16c4b2454..d676e7b22 100644 --- a/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang +++ b/tests/glsl-intrinsic/shader-subgroup/shader-subgroup-arithmetic_None.slang @@ -1,14 +1,14 @@ -//DISABLE_TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV -//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL -//DISABLE_TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA +//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL +//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly -DTARGET_SPIRV +//TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DTARGET_HLSL +//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DTARGET_CUDA // not testing cpp due to missing impl //DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DTARGET_CPP -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl +//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-wgpu -compute -entry computeMain -allow-glsl -xslang -DWGPU -render-feature half // Not testing because CI runners may not support Metal's intrinsics. //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal -compute -entry computeMain -allow-glsl -xslang -DMETAL diff --git a/tests/ir/dump-module.slang b/tests/ir/dump-module.slang index 41576f5aa..e22c3fca5 100644 --- a/tests/ir/dump-module.slang +++ b/tests/ir/dump-module.slang @@ -4,10 +4,10 @@ // is to see the file you requested. If there's a bug in slang-module output, it's // important that -dump-module looks at the specific file you requested. -//DISABLE_TEST:COMPILE: tests/ir/dump-module.slang -o tests/ir/dump-module.slang-module -target spirv -embed-downstream-ir +//TEST:COMPILE: tests/ir/dump-module.slang -o tests/ir/dump-module.slang-module -target spirv -embed-downstream-ir -//DISABLE_TEST:SIMPLE(filecheck=CHECK1): -dump-module tests/ir/dump-module.slang-module -//DISABLE_TEST:SIMPLE(filecheck=CHECK2): -dump-module tests/ir/dump-module.slang +//TEST:SIMPLE(filecheck=CHECK1): -dump-module tests/ir/dump-module.slang-module +//TEST:SIMPLE(filecheck=CHECK2): -dump-module tests/ir/dump-module.slang module "export-library-generics"; diff --git a/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang b/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang index 76aae57ba..b709b52b1 100644 --- a/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang +++ b/tests/language-feature/modules/error-in-nested-import/error-in-nested-import.slang @@ -1,8 +1,8 @@ // error-in-nested-import.slang -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): // CHECK: ([[#@LINE+1]]): error import a; int main() -{} +{}
\ No newline at end of file diff --git a/tests/language-server/robustness-2.slang b/tests/language-server/robustness-2.slang index be488feba..bd73d25ed 100644 --- a/tests/language-server/robustness-2.slang +++ b/tests/language-server/robustness-2.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // // tests broken generic parameter. diff --git a/tests/language-server/robustness-3.slang b/tests/language-server/robustness-3.slang index 4f9c379da..29835eb70 100644 --- a/tests/language-server/robustness-3.slang +++ b/tests/language-server/robustness-3.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // // tests broken subscript decl. //HOVER:7,24 diff --git a/tests/language-server/robustness-4.slang b/tests/language-server/robustness-4.slang index 39177dbef..d1f110f5c 100644 --- a/tests/language-server/robustness-4.slang +++ b/tests/language-server/robustness-4.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // //Broken syntax //HOVER:1,1 diff --git a/tests/language-server/robustness-5.slang b/tests/language-server/robustness-5.slang index 9d53d3f38..a2d54b398 100644 --- a/tests/language-server/robustness-5.slang +++ b/tests/language-server/robustness-5.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: // //Broken syntax //HOVER:9,11 @@ -10,4 +10,4 @@ struct MyStruct { int a = 5; -} +}
\ No newline at end of file diff --git a/tests/language-server/robustness-6.slang b/tests/language-server/robustness-6.slang index 89e9768f5..ef5924cf3 100644 --- a/tests/language-server/robustness-6.slang +++ b/tests/language-server/robustness-6.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: //HOVER:4,8 float dsqr<T:II diff --git a/tests/language-server/robustness-7.slang b/tests/language-server/robustness-7.slang index 178391a53..ebc34e078 100644 --- a/tests/language-server/robustness-7.slang +++ b/tests/language-server/robustness-7.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER: +//TEST:LANG_SERVER: //HOVER:6,15 // Test that we can specialize a generic method called through a dynamic interface. @@ -60,4 +60,4 @@ void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID) float arr[3] = { 2, 3, 4 }; gOutputBuffer[0] = obj.run(arr); -} +}
\ No newline at end of file diff --git a/tests/language-server/robustness-8.slang b/tests/language-server/robustness-8.slang index 17939f841..84d6c8945 100644 --- a/tests/language-server/robustness-8.slang +++ b/tests/language-server/robustness-8.slang @@ -1,8 +1,8 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): // __generic < T : struct> extension T { // CHECK: null //HOVER:7,32 __init(StructuredBuffer<T>) {} -} +}
\ No newline at end of file diff --git a/tests/language-server/scalar-member.slang b/tests/language-server/scalar-member.slang index 369bdc706..6b12ab897 100644 --- a/tests/language-server/scalar-member.slang +++ b/tests/language-server/scalar-member.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): void f() { float v; @@ -6,4 +6,4 @@ void f() v. } -// CHECK: x +// CHECK: x
\ No newline at end of file diff --git a/tests/language-server/smoke.slang b/tests/language-server/smoke.slang index 6222847eb..194902586 100644 --- a/tests/language-server/smoke.slang +++ b/tests/language-server/smoke.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST(smoke):LANG_SERVER: +//TEST(smoke):LANG_SERVER: //COMPLETE:31,21 //HOVER:25,30 //SIGNATURE:25,40 diff --git a/tests/language-server/this-type-hover.slang b/tests/language-server/this-type-hover.slang index 230d8a59f..535e04e93 100644 --- a/tests/language-server/this-type-hover.slang +++ b/tests/language-server/this-type-hover.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): struct G {} diff --git a/tests/language-server/typename-enum-intval.slang b/tests/language-server/typename-enum-intval.slang index 31e35d9a7..9eca71ae2 100644 --- a/tests/language-server/typename-enum-intval.slang +++ b/tests/language-server/typename-enum-intval.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): namespace ns { enum Test : uint32_t @@ -21,4 +21,4 @@ void f() } // CHECK: ns.Foo<ns.Test.A> -// CHECK: ns.Foo<ns.Test(3)> +// CHECK: ns.Foo<ns.Test(3)>
\ No newline at end of file diff --git a/tests/language-server/vector-member.slang b/tests/language-server/vector-member.slang index 78a8a884d..341544ac0 100644 --- a/tests/language-server/vector-member.slang +++ b/tests/language-server/vector-member.slang @@ -1,4 +1,4 @@ -//DISABLE_TEST:LANG_SERVER(filecheck=CHECK): +//TEST:LANG_SERVER(filecheck=CHECK): void f() { float4 v; @@ -9,4 +9,4 @@ void f() // CHECK: x // CHECK: y // CHECK: z -// CHECK: w +// CHECK: w
\ No newline at end of file diff --git a/tests/spirv/empty-module.slang b/tests/spirv/empty-module.slang index 0d5913d77..76c98bdb9 100644 --- a/tests/spirv/empty-module.slang +++ b/tests/spirv/empty-module.slang @@ -1,7 +1,7 @@ -//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv // missing entrypoint attribute void vertMain() {} -// CHECK: error 57004 +// CHECK: error 57004
\ No newline at end of file |
