[π˜€π—½π—Ώ] changes to main this commit is based on

Created using spr 1.3.5

[skip ci]
This commit is contained in:
Justin Bogner 2023-11-15 14:28:38 -08:00
Π ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ e3c3114096
ΠšΠΎΠΌΠΌΠΈΡ‚ 71e644dc09
4 ΠΈΠ·ΠΌΠ΅Π½Ρ‘Π½Π½Ρ‹Ρ… Ρ„Π°ΠΉΠ»ΠΎΠ²: 9 Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠΉ ΠΈ 3 ΡƒΠ΄Π°Π»Π΅Π½ΠΈΠΉ

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -15425,6 +15425,9 @@ void DiagnoseGeometryEntry(Sema &S, FunctionDecl *FD,
void DiagnoseComputeEntry(Sema &S, FunctionDecl *FD, llvm::StringRef StageName,
bool isActiveEntry) {
if (isActiveEntry) {
if (!(FD->getAttr<HLSLNumThreadsAttr>()))
S.Diags.Report(FD->getLocation(), diag::err_hlsl_missing_attr)
<< StageName << "numthreads";
if (auto WaveSizeAttr = FD->getAttr<HLSLWaveSizeAttr>()) {
std::string profile = S.getLangOpts().HLSLProfile;
const ShaderModel *SM = hlsl::ShaderModel::GetByName(profile.c_str());

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -6,9 +6,8 @@ void entryHistogram(uint3 id: SV_DispatchThreadID, uint idx: SV_GroupIndex)
{
}
// CHECK: 11:6: error: thread group size [numthreads(x,y,z)] is missing from the entry-point function
// CHECK: 11:6: error: compute entry point must have the numthreads attribute
[shader("compute")]
void entryAverage(uint3 id: SV_DispatchThreadID, uint idx: SV_GroupIndex)
{
}

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -1,4 +1,4 @@
// RUN: not %dxc -T cs_6_0 -E main -fcgl %s -spirv 2>&1 | FileCheck %s
// CHECK: 4:6: error: thread group size [numthreads(x,y,z)] is missing from the entry-point function
// CHECK: 4:6: error: compute entry point must have the numthreads attribute
void main() {}

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -55,3 +55,7 @@ void MSmain(out vertices myvert verts[32],
myvert v = {0.0, 0.0, 0.0, 0.0};
verts[ix] = v;
}
// expected-error@+2{{compute entry point must have the numthreads attribute}}
[shader("compute")]
void CSmain() {}