Revert "webgpu.h: Update BindingNotUsed enum values | Part 1"
This reverts commit bcfc2943c7770610834a76518c8aa7d83584884a.
Reason for revert: Fails Dawn -> Chromium Roll for MLDrift
Original change's description:
> webgpu.h: Update BindingNotUsed enum values | Part 1
>
> This CL renames current Undefined values to BindingNotUsed=0 (still the
> default) for the following four enums:
>
> - WGPUBufferBindingType
> - WGPUSamplerBindingType
> - WGPUTextureSampleType
> - WGPUStorageTextureAccess
>
> https://github.com/webgpu-native/webgpu-headers/pull/364
>
> Bug: 377820810
> Change-Id: Id75bd9f05a78e8f08a319ef70050f45423f37e3d
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/215114
> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 377820810
Change-Id: I763de67cfb1fa6328c5b5cb5ebb3161e067e5ed9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/216774
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
diff --git a/src/dawn/dawn.json b/src/dawn/dawn.json
index 3d92591..5bfce41 100644
--- a/src/dawn/dawn.json
+++ b/src/dawn/dawn.json
@@ -381,7 +381,7 @@
"buffer binding type": {
"category": "enum",
"values": [
- {"value": 0, "name": "binding not used"},
+ {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "uniform"},
{"value": 2, "name": "storage"},
{"value": 3, "name": "read only storage"}
@@ -391,7 +391,7 @@
"category": "structure",
"extensible": "in",
"members": [
- {"name": "type", "type": "buffer binding type", "default": "binding not used"},
+ {"name": "type", "type": "buffer binding type", "default": "undefined"},
{"name": "has dynamic offset", "type": "bool", "default": "false"},
{"name": "min binding size", "type": "uint64_t", "default": "0"}
]
@@ -400,7 +400,7 @@
"sampler binding type": {
"category": "enum",
"values": [
- {"value": 0, "name": "binding not used"},
+ {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "filtering"},
{"value": 2, "name": "non filtering"},
{"value": 3, "name": "comparison"}
@@ -410,7 +410,7 @@
"category": "structure",
"extensible": "in",
"members": [
- {"name": "type", "type": "sampler binding type", "default": "binding not used"}
+ {"name": "type", "type": "sampler binding type", "default": "undefined"}
]
},
"static sampler binding layout": {
@@ -426,7 +426,7 @@
"texture sample type": {
"category": "enum",
"values": [
- {"value": 0, "name": "binding not used"},
+ {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "float"},
{"value": 2, "name": "unfilterable float"},
{"value": 3, "name": "depth"},
@@ -438,7 +438,7 @@
"category": "structure",
"extensible": "in",
"members": [
- {"name": "sample type", "type": "texture sample type", "default": "binding not used"},
+ {"name": "sample type", "type": "texture sample type", "default": "undefined"},
{"name": "view dimension", "type": "texture view dimension", "default": "2D"},
{"name": "multisampled", "type": "bool", "default": "false"}
]
@@ -499,7 +499,7 @@
"storage texture access": {
"category": "enum",
"values": [
- {"value": 0, "name": "binding not used"},
+ {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "write only"},
{"value": 2, "name": "read only"},
{"value": 3, "name": "read write"}
@@ -509,7 +509,7 @@
"category": "structure",
"extensible": "in",
"members": [
- {"name": "access", "type": "storage texture access", "default": "binding not used"},
+ {"name": "access", "type": "storage texture access", "default": "undefined"},
{"name": "format", "type": "texture format", "default": "undefined"},
{"name": "view dimension", "type": "texture view dimension", "default": "2D"}
]
diff --git a/src/dawn/native/BindGroup.cpp b/src/dawn/native/BindGroup.cpp
index 532d111..af334cd 100644
--- a/src/dawn/native/BindGroup.cpp
+++ b/src/dawn/native/BindGroup.cpp
@@ -107,7 +107,7 @@
maxBindingSize = device->GetLimits().v1.maxStorageBufferBindingSize;
requiredBindingAlignment = device->GetLimits().v1.minStorageBufferOffsetAlignment;
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
diff --git a/src/dawn/native/BindGroupLayoutInternal.cpp b/src/dawn/native/BindGroupLayoutInternal.cpp
index b4124c6..e9c03fd 100644
--- a/src/dawn/native/BindGroupLayoutInternal.cpp
+++ b/src/dawn/native/BindGroupLayoutInternal.cpp
@@ -96,7 +96,7 @@
int bindingMemberCount = 0;
- if (entry->buffer.type != wgpu::BufferBindingType::BindingNotUsed) {
+ if (entry->buffer.type != wgpu::BufferBindingType::Undefined) {
bindingMemberCount++;
const BufferBindingLayout& buffer = entry->buffer;
@@ -118,12 +118,12 @@
}
}
- if (entry->sampler.type != wgpu::SamplerBindingType::BindingNotUsed) {
+ if (entry->sampler.type != wgpu::SamplerBindingType::Undefined) {
bindingMemberCount++;
DAWN_TRY(ValidateSamplerBindingType(entry->sampler.type));
}
- if (entry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) {
+ if (entry->texture.sampleType != wgpu::TextureSampleType::Undefined) {
bindingMemberCount++;
const TextureBindingLayout& texture = entry->texture;
// The kInternalResolveAttachmentSampleType is used internally and not a value
@@ -165,7 +165,7 @@
"Sample type for multisampled texture binding was %s.", wgpu::TextureSampleType::Float);
}
- if (entry->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) {
+ if (entry->storageTexture.access != wgpu::StorageTextureAccess::Undefined) {
bindingMemberCount++;
const StorageTextureBindingLayout& storageTexture = entry->storageTexture;
DAWN_TRY(ValidateStorageTextureAccess(storageTexture.access));
@@ -391,11 +391,11 @@
}
bool IsBufferBinding(const UnpackedPtr<BindGroupLayoutEntry>& binding) {
- return binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed;
+ return binding->buffer.type != wgpu::BufferBindingType::Undefined;
}
bool BindingHasDynamicOffset(const UnpackedPtr<BindGroupLayoutEntry>& binding) {
- if (binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed) {
+ if (binding->buffer.type != wgpu::BufferBindingType::Undefined) {
return binding->buffer.hasDynamicOffset;
}
return false;
@@ -406,18 +406,18 @@
bindingInfo.binding = BindingNumber(binding->binding);
bindingInfo.visibility = binding->visibility;
- if (binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed) {
+ if (binding->buffer.type != wgpu::BufferBindingType::Undefined) {
bindingInfo.bindingLayout = BufferBindingInfo(binding->buffer);
- } else if (binding->sampler.type != wgpu::SamplerBindingType::BindingNotUsed) {
+ } else if (binding->sampler.type != wgpu::SamplerBindingType::Undefined) {
bindingInfo.bindingLayout = SamplerBindingInfo(binding->sampler);
- } else if (binding->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) {
+ } else if (binding->texture.sampleType != wgpu::TextureSampleType::Undefined) {
if (binding->texture.viewDimension == kInternalInputAttachmentDim) {
bindingInfo.bindingLayout = InputAttachmentBindingInfo(binding->texture.sampleType);
} else {
bindingInfo.bindingLayout =
TextureBindingInfo(binding->texture.WithTrivialFrontendDefaults());
}
- } else if (binding->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) {
+ } else if (binding->storageTexture.access != wgpu::StorageTextureAccess::Undefined) {
bindingInfo.bindingLayout =
StorageTextureBindingInfo(binding->storageTexture.WithTrivialFrontendDefaults());
} else if (auto* staticSamplerBindingLayout = binding.Get<StaticSamplerBindingLayout>()) {
@@ -773,7 +773,7 @@
case wgpu::BufferBindingType::Storage:
case wgpu::BufferBindingType::ReadOnlyStorage:
return true;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
break;
}
DAWN_UNREACHABLE();
diff --git a/src/dawn/native/BindingInfo.cpp b/src/dawn/native/BindingInfo.cpp
index bf7e214..1fb2b05 100644
--- a/src/dawn/native/BindingInfo.cpp
+++ b/src/dawn/native/BindingInfo.cpp
@@ -57,7 +57,7 @@
uint32_t PerStageBindingCounts::*perStageBindingCountMember = nullptr;
- if (entry->buffer.type != wgpu::BufferBindingType::BindingNotUsed) {
+ if (entry->buffer.type != wgpu::BufferBindingType::Undefined) {
++bindingCounts->bufferCount;
const BufferBindingLayout& buffer = entry->buffer;
@@ -82,21 +82,21 @@
perStageBindingCountMember = &PerStageBindingCounts::storageBufferCount;
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
// Can't get here due to the enclosing if statement.
DAWN_UNREACHABLE();
break;
}
- } else if (entry->sampler.type != wgpu::SamplerBindingType::BindingNotUsed) {
+ } else if (entry->sampler.type != wgpu::SamplerBindingType::Undefined) {
perStageBindingCountMember = &PerStageBindingCounts::samplerCount;
- } else if (entry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) {
+ } else if (entry->texture.sampleType != wgpu::TextureSampleType::Undefined) {
if (entry->texture.viewDimension == kInternalInputAttachmentDim) {
// Internal use only.
return;
} else {
perStageBindingCountMember = &PerStageBindingCounts::sampledTextureCount;
}
- } else if (entry->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) {
+ } else if (entry->storageTexture.access != wgpu::StorageTextureAccess::Undefined) {
perStageBindingCountMember = &PerStageBindingCounts::storageTextureCount;
} else if (entry.Get<ExternalTextureBindingLayout>()) {
perStageBindingCountMember = &PerStageBindingCounts::externalTextureCount;
diff --git a/src/dawn/native/CommandBufferStateTracker.cpp b/src/dawn/native/CommandBufferStateTracker.cpp
index c403f97..04500a9 100644
--- a/src/dawn/native/CommandBufferStateTracker.cpp
+++ b/src/dawn/native/CommandBufferStateTracker.cpp
@@ -174,7 +174,7 @@
break;
case wgpu::StorageTextureAccess::ReadOnly:
continue;
- case wgpu::StorageTextureAccess::BindingNotUsed:
+ case wgpu::StorageTextureAccess::Undefined:
default:
DAWN_UNREACHABLE();
}
diff --git a/src/dawn/native/Format.cpp b/src/dawn/native/Format.cpp
index 384d631..a0f98c0 100644
--- a/src/dawn/native/Format.cpp
+++ b/src/dawn/native/Format.cpp
@@ -66,14 +66,14 @@
case wgpu::TextureSampleType::Sint:
case wgpu::TextureSampleType::Uint:
case wgpu::TextureSampleType::Depth:
- case wgpu::TextureSampleType::BindingNotUsed:
+ case wgpu::TextureSampleType::Undefined:
// When the compiler complains that you need to add a case statement here, please
// also add a corresponding static assert below!
break;
}
- static_assert(static_cast<uint32_t>(wgpu::TextureSampleType::BindingNotUsed) == 0);
- if (sampleType == wgpu::TextureSampleType::BindingNotUsed) {
+ static_assert(static_cast<uint32_t>(wgpu::TextureSampleType::Undefined) == 0);
+ if (sampleType == wgpu::TextureSampleType::Undefined) {
return SampleTypeBit::None;
}
diff --git a/src/dawn/native/PassResourceUsageTracker.cpp b/src/dawn/native/PassResourceUsageTracker.cpp
index cc48199..93de037 100644
--- a/src/dawn/native/PassResourceUsageTracker.cpp
+++ b/src/dawn/native/PassResourceUsageTracker.cpp
@@ -126,7 +126,7 @@
case wgpu::BufferBindingType::ReadOnlyStorage:
BufferUsedAs(buffer, kReadOnlyStorageBuffer, bindingInfo.visibility);
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
},
@@ -156,7 +156,7 @@
case wgpu::StorageTextureAccess::ReadOnly:
TextureViewUsedAs(view, kReadOnlyStorageTexture, bindingInfo.visibility);
break;
- case wgpu::StorageTextureAccess::BindingNotUsed:
+ case wgpu::StorageTextureAccess::Undefined:
DAWN_UNREACHABLE();
}
},
diff --git a/src/dawn/native/PipelineLayout.cpp b/src/dawn/native/PipelineLayout.cpp
index 91a26e1..0bc7cc2 100644
--- a/src/dawn/native/PipelineLayout.cpp
+++ b/src/dawn/native/PipelineLayout.cpp
@@ -202,17 +202,17 @@
modifiedEntry->buffer.type == mergedEntry.buffer.type &&
modifiedEntry->sampler.type == mergedEntry.sampler.type &&
// Compatibility between these sample types is checked below.
- (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) ==
- (mergedEntry.texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) &&
+ (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::Undefined) ==
+ (mergedEntry.texture.sampleType != wgpu::TextureSampleType::Undefined) &&
modifiedEntry->storageTexture.access == mergedEntry.storageTexture.access;
// Minimum buffer binding size excluded because we take the maximum seen across stages.
- if (modifiedEntry->buffer.type != wgpu::BufferBindingType::BindingNotUsed) {
+ if (modifiedEntry->buffer.type != wgpu::BufferBindingType::Undefined) {
compatible = compatible && modifiedEntry->buffer.hasDynamicOffset ==
mergedEntry.buffer.hasDynamicOffset;
}
- if (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) {
+ if (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::Undefined) {
// Sample types are compatible if they are exactly equal,
// or if the |modifiedEntry| is Float and the |mergedEntry| is UnfilterableFloat.
// Note that the |mergedEntry| never has type Float. Texture bindings all start
@@ -229,7 +229,7 @@
modifiedEntry->texture.multisampled == mergedEntry.texture.multisampled;
}
- if (modifiedEntry->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) {
+ if (modifiedEntry->storageTexture.access != wgpu::StorageTextureAccess::Undefined) {
compatible =
compatible &&
modifiedEntry->storageTexture.format == mergedEntry.storageTexture.format &&
diff --git a/src/dawn/native/ProgrammableEncoder.cpp b/src/dawn/native/ProgrammableEncoder.cpp
index 60a933a..cd77359 100644
--- a/src/dawn/native/ProgrammableEncoder.cpp
+++ b/src/dawn/native/ProgrammableEncoder.cpp
@@ -160,7 +160,7 @@
case kInternalStorageBufferBinding:
requiredAlignment = GetDevice()->GetLimits().v1.minStorageBufferOffsetAlignment;
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
diff --git a/src/dawn/native/ShaderModule.cpp b/src/dawn/native/ShaderModule.cpp
index 1d2b193..2e3a8e5 100644
--- a/src/dawn/native/ShaderModule.cpp
+++ b/src/dawn/native/ShaderModule.cpp
@@ -179,7 +179,7 @@
// Note that Float is compatible with both Float and UnfilterableFloat.
return wgpu::TextureSampleType::Float;
case tint::inspector::ResourceBinding::SampledKind::kUnknown:
- return wgpu::TextureSampleType::BindingNotUsed;
+ return wgpu::TextureSampleType::Undefined;
}
DAWN_UNREACHABLE();
}
diff --git a/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp b/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp
index 258994d..21530e2 100644
--- a/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp
+++ b/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp
@@ -232,7 +232,7 @@
}
break;
}
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
return {};
@@ -370,7 +370,7 @@
deviceContext->CSSetShaderResources(bindingSlot, 1, &nullSRV);
break;
}
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
},
@@ -494,11 +494,10 @@
break;
}
case wgpu::BufferBindingType::Uniform:
- case wgpu::BufferBindingType::ReadOnlyStorage: {
+ case wgpu::BufferBindingType::ReadOnlyStorage:
+ case wgpu::BufferBindingType::Undefined: {
break;
}
- case wgpu::BufferBindingType::BindingNotUsed:
- DAWN_UNREACHABLE();
}
return {};
},
diff --git a/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp b/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp
index e7e52dd..1a87c9e 100644
--- a/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp
+++ b/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp
@@ -77,7 +77,7 @@
case wgpu::BufferBindingType::ReadOnlyStorage:
mIndexInfo[group][bindingIndex] = shaderResourceViewIndex++;
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
},
@@ -102,7 +102,7 @@
case wgpu::StorageTextureAccess::ReadOnly:
mIndexInfo[group][bindingIndex] = shaderResourceViewIndex++;
break;
- case wgpu::StorageTextureAccess::BindingNotUsed:
+ case wgpu::StorageTextureAccess::Undefined:
DAWN_UNREACHABLE();
}
},
diff --git a/src/dawn/native/d3d11/ShaderModuleD3D11.cpp b/src/dawn/native/d3d11/ShaderModuleD3D11.cpp
index aa6e140..b0d4f72 100644
--- a/src/dawn/native/d3d11/ShaderModuleD3D11.cpp
+++ b/src/dawn/native/d3d11/ShaderModuleD3D11.cpp
@@ -147,7 +147,7 @@
srcBindingPoint, tint::hlsl::writer::binding::Storage{
dstBindingPoint.group, dstBindingPoint.binding});
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
break;
}
diff --git a/src/dawn/native/d3d12/BindGroupD3D12.cpp b/src/dawn/native/d3d12/BindGroupD3D12.cpp
index 3149aa5..6adf65e 100644
--- a/src/dawn/native/d3d12/BindGroupD3D12.cpp
+++ b/src/dawn/native/d3d12/BindGroupD3D12.cpp
@@ -140,7 +140,7 @@
descriptorHeapOffsets[bindingIndex]));
break;
}
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
},
@@ -190,7 +190,7 @@
descriptorHeapOffsets[bindingIndex]));
break;
}
- case wgpu::StorageTextureAccess::BindingNotUsed:
+ case wgpu::StorageTextureAccess::Undefined:
DAWN_UNREACHABLE();
}
},
diff --git a/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp
index 875e863..2cf9ce6 100644
--- a/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp
+++ b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp
@@ -51,7 +51,7 @@
return D3D12_DESCRIPTOR_RANGE_TYPE_UAV;
case wgpu::BufferBindingType::ReadOnlyStorage:
return D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
},
@@ -71,7 +71,7 @@
return D3D12_DESCRIPTOR_RANGE_TYPE_UAV;
case wgpu::StorageTextureAccess::ReadOnly:
return D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
- case wgpu::StorageTextureAccess::BindingNotUsed:
+ case wgpu::StorageTextureAccess::Undefined:
DAWN_UNREACHABLE();
}
},
diff --git a/src/dawn/native/d3d12/CommandBufferD3D12.cpp b/src/dawn/native/d3d12/CommandBufferD3D12.cpp
index 668f7b6..b422f40 100644
--- a/src/dawn/native/d3d12/CommandBufferD3D12.cpp
+++ b/src/dawn/native/d3d12/CommandBufferD3D12.cpp
@@ -527,7 +527,7 @@
commandList->SetComputeRootShaderResourceView(parameterIndex, bufferLocation);
}
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
}
diff --git a/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp b/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp
index 33fd776..4d47ab8 100644
--- a/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp
+++ b/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp
@@ -65,7 +65,7 @@
return D3D12_ROOT_PARAMETER_TYPE_UAV;
case wgpu::BufferBindingType::ReadOnlyStorage:
return D3D12_ROOT_PARAMETER_TYPE_SRV;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
}
diff --git a/src/dawn/native/d3d12/ShaderModuleD3D12.cpp b/src/dawn/native/d3d12/ShaderModuleD3D12.cpp
index a2d8aa6..620580c 100644
--- a/src/dawn/native/d3d12/ShaderModuleD3D12.cpp
+++ b/src/dawn/native/d3d12/ShaderModuleD3D12.cpp
@@ -221,7 +221,7 @@
srcBindingPoint, tint::hlsl::writer::binding::Storage{
dstBindingPoint.group, dstBindingPoint.binding});
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
break;
}
diff --git a/src/dawn/native/metal/ShaderModuleMTL.mm b/src/dawn/native/metal/ShaderModuleMTL.mm
index 04e93cd..d3ef5cd 100644
--- a/src/dawn/native/metal/ShaderModuleMTL.mm
+++ b/src/dawn/native/metal/ShaderModuleMTL.mm
@@ -160,7 +160,7 @@
arrayLengthFromUniform.bindpoint_to_size_index.emplace(
srcBindingPoint, dstBindingPoint.binding);
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
break;
}
diff --git a/src/dawn/native/opengl/CommandBufferGL.cpp b/src/dawn/native/opengl/CommandBufferGL.cpp
index 34c622a..91dc7b4 100644
--- a/src/dawn/native/opengl/CommandBufferGL.cpp
+++ b/src/dawn/native/opengl/CommandBufferGL.cpp
@@ -339,7 +339,7 @@
case wgpu::BufferBindingType::ReadOnlyStorage:
target = GL_SHADER_STORAGE_BUFFER;
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
@@ -409,7 +409,7 @@
case wgpu::StorageTextureAccess::ReadOnly:
access = GL_READ_ONLY;
break;
- case wgpu::StorageTextureAccess::BindingNotUsed:
+ case wgpu::StorageTextureAccess::Undefined:
DAWN_UNREACHABLE();
}
diff --git a/src/dawn/native/opengl/PipelineLayoutGL.cpp b/src/dawn/native/opengl/PipelineLayoutGL.cpp
index d59e2a8..46b634b 100644
--- a/src/dawn/native/opengl/PipelineLayoutGL.cpp
+++ b/src/dawn/native/opengl/PipelineLayoutGL.cpp
@@ -63,7 +63,7 @@
mIndexInfo[group][bindingIndex] = ssboIndex;
ssboIndex++;
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
}
},
diff --git a/src/dawn/native/opengl/ShaderModuleGL.cpp b/src/dawn/native/opengl/ShaderModuleGL.cpp
index 8b54ba2..4cfa5cd 100644
--- a/src/dawn/native/opengl/ShaderModuleGL.cpp
+++ b/src/dawn/native/opengl/ShaderModuleGL.cpp
@@ -348,7 +348,7 @@
srcBindingPoint,
tint::glsl::writer::binding::Storage{dstBindingPoint.binding});
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
break;
}
diff --git a/src/dawn/native/vulkan/BindGroupLayoutVk.cpp b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp
index 13a766d..584674d 100644
--- a/src/dawn/native/vulkan/BindGroupLayoutVk.cpp
+++ b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp
@@ -82,7 +82,7 @@
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC;
}
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
}
diff --git a/src/dawn/native/vulkan/ShaderModuleVk.cpp b/src/dawn/native/vulkan/ShaderModuleVk.cpp
index 1358335..b2dafce 100644
--- a/src/dawn/native/vulkan/ShaderModuleVk.cpp
+++ b/src/dawn/native/vulkan/ShaderModuleVk.cpp
@@ -273,7 +273,7 @@
tint::spirv::writer::binding::Storage{dstBindingPoint.group,
dstBindingPoint.binding});
break;
- case wgpu::BufferBindingType::BindingNotUsed:
+ case wgpu::BufferBindingType::Undefined:
DAWN_UNREACHABLE();
break;
}
diff --git a/src/dawn/node/binding/Converter.cpp b/src/dawn/node/binding/Converter.cpp
index 1f2e38f..eb27bbb 100644
--- a/src/dawn/node/binding/Converter.cpp
+++ b/src/dawn/node/binding/Converter.cpp
@@ -1389,7 +1389,7 @@
}
bool Converter::Convert(wgpu::BufferBindingType& out, const interop::GPUBufferBindingType& in) {
- out = wgpu::BufferBindingType::BindingNotUsed;
+ out = wgpu::BufferBindingType::Undefined;
switch (in) {
case interop::GPUBufferBindingType::kUniform:
out = wgpu::BufferBindingType::Uniform;
@@ -1405,7 +1405,7 @@
}
bool Converter::Convert(wgpu::TextureSampleType& out, const interop::GPUTextureSampleType& in) {
- out = wgpu::TextureSampleType::BindingNotUsed;
+ out = wgpu::TextureSampleType::Undefined;
switch (in) {
case interop::GPUTextureSampleType::kFloat:
out = wgpu::TextureSampleType::Float;
@@ -1427,7 +1427,7 @@
}
bool Converter::Convert(wgpu::SamplerBindingType& out, const interop::GPUSamplerBindingType& in) {
- out = wgpu::SamplerBindingType::BindingNotUsed;
+ out = wgpu::SamplerBindingType::Undefined;
switch (in) {
case interop::GPUSamplerBindingType::kFiltering:
out = wgpu::SamplerBindingType::Filtering;
@@ -1444,7 +1444,7 @@
bool Converter::Convert(wgpu::StorageTextureAccess& out,
const interop::GPUStorageTextureAccess& in) {
- out = wgpu::StorageTextureAccess::BindingNotUsed;
+ out = wgpu::StorageTextureAccess::Undefined;
switch (in) {
case interop::GPUStorageTextureAccess::kWriteOnly:
out = wgpu::StorageTextureAccess::WriteOnly;
diff --git a/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
index d186ee8..07f4a18 100644
--- a/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
@@ -485,7 +485,7 @@
BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0)));
}
- binding.buffer.type = wgpu::BufferBindingType::BindingNotUsed;
+ binding.buffer.type = wgpu::BufferBindingType::Undefined;
binding.buffer.minBindingSize = 0;
{
binding.texture.sampleType = wgpu::TextureSampleType::UnfilterableFloat;
@@ -511,7 +511,7 @@
BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0)));
}
- binding.texture.sampleType = wgpu::TextureSampleType::BindingNotUsed;
+ binding.texture.sampleType = wgpu::TextureSampleType::Undefined;
{
binding.sampler.type = wgpu::SamplerBindingType::Filtering;
wgpu::RenderPipeline pipeline = RenderPipelineFromFragmentShader(R"(
diff --git a/tools/android/webgpu/src/test/java/android/dawn/EnumsTest.kt b/tools/android/webgpu/src/test/java/android/dawn/EnumsTest.kt
index 25f1026..82d60a6 100644
--- a/tools/android/webgpu/src/test/java/android/dawn/EnumsTest.kt
+++ b/tools/android/webgpu/src/test/java/android/dawn/EnumsTest.kt
@@ -9,7 +9,7 @@
fun uniqueEnumsBufferBindingType() {
val values = HashSet<BufferBindingType>()
arrayOf(
- BufferBindingType.BindingNotUsed,
+ BufferBindingType.Undefined,
BufferBindingType.Uniform,
BufferBindingType.Storage,
BufferBindingType.ReadOnlyStorage