Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sudonatalie committed Jan 8, 2024
1 parent 1190430 commit 66e3fd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/clang/lib/Sema/SemaHLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15143,7 +15143,9 @@ void DiagnoseHullEntry(Sema &S, FunctionDecl *FD, llvm::StringRef StageName) {
if (!Attr)
S.Diags.Report(FD->getLocation(), diag::err_hlsl_missing_attr)
<< StageName << "patchconstantfunc";

if (!(FD->getAttr<HLSLOutputTopologyAttr>()))
S.Diags.Report(FD->getLocation(), diag::err_hlsl_missing_attr)
<< StageName << "outputtopology";
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct OUTPUT
};

[outputcontrolpoints(3)]
[outputtopology("point")]
[patchconstantfunc("foo")]

INPUT main(InputPatch<INPUT, 3> Input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ float4 fooey()
[shader("hull")]
// CHECK: error: patch constant function 'NotFooey' must be defined
[patchconstantfunc("NotFooey")]
[outputtopology("point")]
float4 main(float a : A, float b:B) : SV_TARGET
{
float4 f = b;
Expand Down

0 comments on commit 66e3fd8

Please sign in to comment.