mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 01:23:57 +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
@@ -541,9 +541,8 @@ impl super::Validator {
|
||||
|
||||
(TypeFlags::empty(), true)
|
||||
}
|
||||
crate::AddressSpace::Private | crate::AddressSpace::WorkGroup => {
|
||||
(TypeFlags::DATA | TypeFlags::SIZED, false)
|
||||
}
|
||||
crate::AddressSpace::Private => (TypeFlags::CONSTRUCTIBLE, false),
|
||||
crate::AddressSpace::WorkGroup => (TypeFlags::DATA | TypeFlags::SIZED, false),
|
||||
crate::AddressSpace::PushConstant => {
|
||||
if !self.capabilities.contains(Capabilities::PUSH_CONSTANT) {
|
||||
return Err(GlobalVariableError::UnsupportedCapability(
|
||||
|
||||
Reference in new issue
Block a user