mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align()
This is a cleaner API, and the implementation doesn't have to know a bunch of information about all the derived types. Change-Id: I96bebcb9f3ceda86fa34bd8e70961dee63fd7e13 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59301 Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
f5ed2ba906
commit
fced350b3d
@@ -546,9 +546,9 @@ uint32_t Inspector::GetWorkgroupStorageSize(const std::string& entry_point) {
|
||||
auto* func_sem = program_->Sem().Get(func);
|
||||
for (const sem::Variable* var : func_sem->ReferencedModuleVariables()) {
|
||||
if (var->StorageClass() == ast::StorageClass::kWorkgroup) {
|
||||
uint32_t align = 0;
|
||||
uint32_t size = 0;
|
||||
var->Type()->UnwrapRef()->GetDefaultAlignAndSize(align, size);
|
||||
auto* ty = var->Type()->UnwrapRef();
|
||||
uint32_t align = ty->Align();
|
||||
uint32_t size = ty->Size();
|
||||
|
||||
// This essentially matches std430 layout rules from GLSL, which are in
|
||||
// turn specified as an upper bound for Vulkan layout sizing. Since D3D
|
||||
|
||||
Reference in New Issue
Block a user