mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
Rename all type UnwrapXXX() methods
Give them sensible names. Make them act consistently. Remove those that were not used. Change-Id: Ib043a4093cfae9f81630643e1a0e4eae7bca2440 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50305 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
fcda15ef67
commit
f14e0e1c8c
@@ -387,7 +387,7 @@ std::vector<ResourceBinding> Inspector::GetUniformBufferResourceBindings(
|
||||
auto* var = ruv.first;
|
||||
auto binding_info = ruv.second;
|
||||
|
||||
auto* unwrapped_type = var->Type()->UnwrapIfNeeded();
|
||||
auto* unwrapped_type = var->Type()->UnwrapAccess();
|
||||
auto* str = unwrapped_type->As<sem::Struct>();
|
||||
if (str == nullptr) {
|
||||
continue;
|
||||
@@ -509,7 +509,7 @@ std::vector<ResourceBinding> Inspector::GetDepthTextureResourceBindings(
|
||||
entry.bind_group = binding_info.group->value();
|
||||
entry.binding = binding_info.binding->value();
|
||||
|
||||
auto* texture_type = var->Type()->UnwrapIfNeeded()->As<sem::Texture>();
|
||||
auto* texture_type = var->Type()->UnwrapAccess()->As<sem::Texture>();
|
||||
entry.dim = TypeTextureDimensionToResourceBindingTextureDimension(
|
||||
texture_type->dim());
|
||||
|
||||
@@ -602,7 +602,7 @@ std::vector<ResourceBinding> Inspector::GetStorageBufferResourceBindingsImpl(
|
||||
continue;
|
||||
}
|
||||
|
||||
auto* str = var->Type()->UnwrapIfNeeded()->As<sem::Struct>();
|
||||
auto* str = var->Type()->UnwrapAccess()->As<sem::Struct>();
|
||||
if (!str) {
|
||||
continue;
|
||||
}
|
||||
@@ -646,18 +646,15 @@ std::vector<ResourceBinding> Inspector::GetSampledTextureResourceBindingsImpl(
|
||||
entry.bind_group = binding_info.group->value();
|
||||
entry.binding = binding_info.binding->value();
|
||||
|
||||
auto* texture_type = var->Type()->UnwrapIfNeeded()->As<sem::Texture>();
|
||||
auto* texture_type = var->Type()->UnwrapAccess()->As<sem::Texture>();
|
||||
entry.dim = TypeTextureDimensionToResourceBindingTextureDimension(
|
||||
texture_type->dim());
|
||||
|
||||
const sem::Type* base_type = nullptr;
|
||||
if (multisampled_only) {
|
||||
base_type = texture_type->As<sem::MultisampledTexture>()
|
||||
->type()
|
||||
->UnwrapIfNeeded();
|
||||
base_type = texture_type->As<sem::MultisampledTexture>()->type();
|
||||
} else {
|
||||
base_type =
|
||||
texture_type->As<sem::SampledTexture>()->type()->UnwrapIfNeeded();
|
||||
base_type = texture_type->As<sem::SampledTexture>()->type();
|
||||
}
|
||||
entry.sampled_kind = BaseTypeToSampledKind(base_type);
|
||||
|
||||
@@ -697,12 +694,11 @@ std::vector<ResourceBinding> Inspector::GetStorageTextureResourceBindingsImpl(
|
||||
entry.bind_group = binding_info.group->value();
|
||||
entry.binding = binding_info.binding->value();
|
||||
|
||||
auto* texture_type =
|
||||
var->Type()->UnwrapIfNeeded()->As<sem::StorageTexture>();
|
||||
auto* texture_type = var->Type()->UnwrapAccess()->As<sem::StorageTexture>();
|
||||
entry.dim = TypeTextureDimensionToResourceBindingTextureDimension(
|
||||
texture_type->dim());
|
||||
|
||||
auto* base_type = texture_type->type()->UnwrapIfNeeded();
|
||||
auto* base_type = texture_type->type();
|
||||
entry.sampled_kind = BaseTypeToSampledKind(base_type);
|
||||
entry.image_format = TypeImageFormatToResourceBindingImageFormat(
|
||||
texture_type->image_format());
|
||||
|
||||
Reference in New Issue
Block a user