Commit c6044a53 authored by Corentin Wallez's avatar Corentin Wallez Committed by Commit Bot

WebGPU: Add GPUBindingType "multisampled-texture".

And deprecate GPUBindGroupLayoutEntry.multisampled.

Bug: dawn:517
Change-Id: I0959d46f603c2c7741dc2288098ca119d38b344e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440655Reviewed-by: default avatarAustin Eng <enga@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812603}
parent cbe8dae1
......@@ -39,6 +39,9 @@ WGPUBindingType AsDawnEnum<WGPUBindingType>(const WTF::String& webgpu_enum) {
if (webgpu_enum == "sampled-texture") {
return WGPUBindingType_SampledTexture;
}
if (webgpu_enum == "multisampled-texture") {
return WGPUBindingType_MultisampledTexture;
}
if (webgpu_enum == "readonly-storage-texture") {
return WGPUBindingType_ReadonlyStorageTexture;
}
......
......@@ -36,6 +36,12 @@ WGPUBindGroupLayoutEntry AsDawnType(
webgpu_binding->textureComponentType());
dawn_binding.multisampled = webgpu_binding->multisampled();
if (dawn_binding.multisampled) {
device->AddConsoleWarning(
"Creating a GPUBindGroupLayoutEntry with entry.multisampled = true is "
"deprecated: set entry.type = \"multisampled-texture\" instead.");
}
dawn_binding.storageTextureFormat =
AsDawnEnum<WGPUTextureFormat>(webgpu_binding->storageTextureFormat());
......
......@@ -28,6 +28,7 @@ enum GPUBindingType {
"sampler",
"comparison-sampler",
"sampled-texture",
"multisampled-texture",
"readonly-storage-texture",
"writeonly-storage-texture",
};
......
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