mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-04 12:16:10 +00:00
Clean up unresolved comments from review
Some comments from https://dawn-review.googlesource.com/c/tint/+/42060 were not addressed before it landed, this is a follow-up to address them. BUG=tint:489 Change-Id: Ieafe143e867ce0f5edf6cf2258db3ed12ffc13fb Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42080 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
89036852cc
commit
41e58d89ea
@ -79,9 +79,10 @@ TypeTextureDimensionToResourceBindingTextureDimension(
|
|||||||
return ResourceBinding::TextureDimension::kCube;
|
return ResourceBinding::TextureDimension::kCube;
|
||||||
case type::TextureDimension::kCubeArray:
|
case type::TextureDimension::kCubeArray:
|
||||||
return ResourceBinding::TextureDimension::kCubeArray;
|
return ResourceBinding::TextureDimension::kCubeArray;
|
||||||
default:
|
case type::TextureDimension::kNone:
|
||||||
return ResourceBinding::TextureDimension::kNone;
|
return ResourceBinding::TextureDimension::kNone;
|
||||||
}
|
}
|
||||||
|
return ResourceBinding::TextureDimension::kNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceBinding::SampledKind BaseTypeToSampledKind(type::Type* base_type) {
|
ResourceBinding::SampledKind BaseTypeToSampledKind(type::Type* base_type) {
|
||||||
@ -181,9 +182,10 @@ ResourceBinding::ImageFormat TypeImageFormatToResourceBindingImageFormat(
|
|||||||
return ResourceBinding::ImageFormat::kRgba32Sint;
|
return ResourceBinding::ImageFormat::kRgba32Sint;
|
||||||
case type::ImageFormat::kRgba32Float:
|
case type::ImageFormat::kRgba32Float:
|
||||||
return ResourceBinding::ImageFormat::kRgba32Float;
|
return ResourceBinding::ImageFormat::kRgba32Float;
|
||||||
default:
|
case type::ImageFormat::kNone:
|
||||||
return ResourceBinding::ImageFormat::kNone;
|
return ResourceBinding::ImageFormat::kNone;
|
||||||
}
|
}
|
||||||
|
return ResourceBinding::ImageFormat::kNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@ -605,15 +607,15 @@ std::vector<ResourceBinding> Inspector::GetStorageTextureResourceBindingsImpl(
|
|||||||
entry.bind_group = binding_info.group->value();
|
entry.bind_group = binding_info.group->value();
|
||||||
entry.binding = binding_info.binding->value();
|
entry.binding = binding_info.binding->value();
|
||||||
|
|
||||||
auto* texture_type = decl->type()->UnwrapIfNeeded()->As<type::Texture>();
|
auto* texture_type =
|
||||||
|
decl->type()->UnwrapIfNeeded()->As<type::StorageTexture>();
|
||||||
entry.dim = TypeTextureDimensionToResourceBindingTextureDimension(
|
entry.dim = TypeTextureDimensionToResourceBindingTextureDimension(
|
||||||
texture_type->dim());
|
texture_type->dim());
|
||||||
|
|
||||||
type::Type* base_type =
|
type::Type* base_type = texture_type->type()->UnwrapIfNeeded();
|
||||||
texture_type->As<type::StorageTexture>()->type()->UnwrapIfNeeded();
|
|
||||||
entry.sampled_kind = BaseTypeToSampledKind(base_type);
|
entry.sampled_kind = BaseTypeToSampledKind(base_type);
|
||||||
entry.image_format = TypeImageFormatToResourceBindingImageFormat(
|
entry.image_format = TypeImageFormatToResourceBindingImageFormat(
|
||||||
texture_type->As<type::StorageTexture>()->image_format());
|
texture_type->image_format());
|
||||||
|
|
||||||
result.push_back(entry);
|
result.push_back(entry);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user