| 458 | } |
| 459 | |
| 460 | spv::MemorySemanticsMask GetMemorySemanticsForStorageClass( |
| 461 | spv::StorageClass storage_class) { |
| 462 | switch (storage_class) { |
| 463 | case spv::StorageClass::Workgroup: |
| 464 | return spv::MemorySemanticsMask::WorkgroupMemory; |
| 465 | |
| 466 | case spv::StorageClass::StorageBuffer: |
| 467 | case spv::StorageClass::PhysicalStorageBuffer: |
| 468 | return spv::MemorySemanticsMask::UniformMemory; |
| 469 | |
| 470 | case spv::StorageClass::CrossWorkgroup: |
| 471 | return spv::MemorySemanticsMask::CrossWorkgroupMemory; |
| 472 | |
| 473 | case spv::StorageClass::AtomicCounter: |
| 474 | return spv::MemorySemanticsMask::AtomicCounterMemory; |
| 475 | |
| 476 | case spv::StorageClass::Image: |
| 477 | return spv::MemorySemanticsMask::ImageMemory; |
| 478 | |
| 479 | default: |
| 480 | return spv::MemorySemanticsMask::MaskNone; |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | bool IsValid(const opt::IRContext* context, |
| 485 | spv_validator_options validator_options, |
no outgoing calls
no test coverage detected