Commit deec6e11 authored by François Beaufort's avatar François Beaufort Committed by Commit Bot

[WebGPU] add "readonly-storage-buffer" bind group layout binding type

This CL adds the "readonly-storage-buffer" bind group layout binding
type. When used though, it currently raises a validation error as Dawn
doesn't support it yet.

It also removes the unused `dynamic-uniform-buffer` bind group layout
binding type.

Bug: 877147
Change-Id: I3266b8931fee3e3f66dd170771195374132feaf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730911Reviewed-by: default avatarCorentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: François Beaufort <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/master@{#683146}
parent ad6064c4
...@@ -17,18 +17,21 @@ namespace blink { ...@@ -17,18 +17,21 @@ namespace blink {
template <> template <>
DawnBindingType AsDawnEnum<DawnBindingType>(const WTF::String& webgpu_enum) { DawnBindingType AsDawnEnum<DawnBindingType>(const WTF::String& webgpu_enum) {
if (webgpu_enum == "uniform-buffer") {
return DAWN_BINDING_TYPE_UNIFORM_BUFFER;
}
if (webgpu_enum == "storage-buffer") {
return DAWN_BINDING_TYPE_STORAGE_BUFFER;
}
if (webgpu_enum == "readonly-storage-buffer") {
return DAWN_BINDING_TYPE_READONLY_STORAGE_BUFFER;
}
if (webgpu_enum == "sampler") { if (webgpu_enum == "sampler") {
return DAWN_BINDING_TYPE_SAMPLER; return DAWN_BINDING_TYPE_SAMPLER;
} }
if (webgpu_enum == "sampled-texture") { if (webgpu_enum == "sampled-texture") {
return DAWN_BINDING_TYPE_SAMPLED_TEXTURE; return DAWN_BINDING_TYPE_SAMPLED_TEXTURE;
} }
if (webgpu_enum == "storage-buffer") {
return DAWN_BINDING_TYPE_STORAGE_BUFFER;
}
if (webgpu_enum == "uniform-buffer") {
return DAWN_BINDING_TYPE_UNIFORM_BUFFER;
}
NOTREACHED(); NOTREACHED();
return DAWN_BINDING_TYPE_FORCE32; return DAWN_BINDING_TYPE_FORCE32;
} }
......
...@@ -14,8 +14,8 @@ dictionary GPUBindGroupLayoutBinding { ...@@ -14,8 +14,8 @@ dictionary GPUBindGroupLayoutBinding {
enum GPUBindingType { enum GPUBindingType {
"uniform-buffer", "uniform-buffer",
"dynamic-uniform-buffer", "storage-buffer",
"readonly-storage-buffer",
"sampler", "sampler",
"sampled-texture", "sampled-texture",
"storage-buffer",
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment