mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
Require that Function and Private variables be CONSTRUCTIBLE.
Change the validator to enforce WGSL's requirement that all variables in the `function` and `private` address spaces must have constructible types. Mark the `RayQuery` type as `CONSTRUCTIBLE`, since it is intended to be used for local variables. Add a regression test.
This commit is contained in:
1 parent
fa0fed100e
commit
fe484b3a1b
4 files changed
+24
-8
No files matched your search
@@ -948,10 +948,7 @@ impl super::Validator {
|
||||
.types
|
||||
.get(var.ty.index())
|
||||
.ok_or(LocalVariableError::InvalidType(var.ty))?;
|
||||
if !type_info
|
||||
.flags
|
||||
.contains(super::TypeFlags::DATA | super::TypeFlags::SIZED)
|
||||
{
|
||||
if !type_info.flags.contains(super::TypeFlags::CONSTRUCTIBLE) {
|
||||
return Err(LocalVariableError::InvalidType(var.ty));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user