Π·Π΅ΡΠΊΠ°Π»ΠΎ ΠΈΠ· https://github.com/microsoft/DirectXShaderCompiler.git
[ππ½πΏ] changes to main this commit is based on
Created using spr 1.3.5 [skip ci]
This commit is contained in:
Π ΠΎΠ΄ΠΈΡΠ΅Π»Ρ
e3c3114096
ΠΠΎΠΌΠΌΠΈΡ
71e644dc09
|
@ -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() {}
|
||||
|
|
ΠΠ°Π³ΡΡΠ·ΠΊΠ°β¦
Π‘ΡΡΠ»ΠΊΠ° Π² Π½ΠΎΠ²ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅