writer/msl: Add TINT_UNIMPLEMENTED() for module-scope vars
Module scope variables of the private and workgroup storage class are not currently implemeted. Change-Id: Ibb73faec5b5bcb11199e07ba4d7aa4df9c875450 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48221 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
4649377d05
commit
b696607338
|
@ -96,11 +96,22 @@ bool GeneratorImpl::Generate() {
|
|||
}
|
||||
|
||||
for (auto* var : program_->AST().GlobalVariables()) {
|
||||
if (!var->is_const()) {
|
||||
continue;
|
||||
}
|
||||
if (!EmitProgramConstVariable(var)) {
|
||||
return false;
|
||||
if (var->is_const()) {
|
||||
if (!EmitProgramConstVariable(var)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
auto* sem = program_->Sem().Get(var);
|
||||
switch (sem->StorageClass()) {
|
||||
case ast::StorageClass::kPrivate:
|
||||
case ast::StorageClass::kWorkgroup:
|
||||
TINT_UNIMPLEMENTED(diagnostics_)
|
||||
<< "crbug.com/tint/726: module-scope private and workgroup "
|
||||
"variables not yet implemented";
|
||||
break;
|
||||
default:
|
||||
break; // Handled by another code path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue