diff --git a/src/dawn/dawn.json b/src/dawn/dawn.json index b77c24a7297..9dc83bab113 100644 --- a/src/dawn/dawn.json +++ b/src/dawn/dawn.json @@ -377,7 +377,7 @@ "buffer binding type": { "category": "enum", "values": [ - {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, + {"value": 0, "name": "binding not used"}, {"value": 1, "name": "uniform"}, {"value": 2, "name": "storage"}, {"value": 3, "name": "read only storage"} @@ -387,7 +387,7 @@ "category": "structure", "extensible": "in", "members": [ - {"name": "type", "type": "buffer binding type", "default": "undefined"}, + {"name": "type", "type": "buffer binding type", "default": "binding not used"}, {"name": "has dynamic offset", "type": "bool", "default": "false"}, {"name": "min binding size", "type": "uint64_t", "default": "0"} ] @@ -396,7 +396,7 @@ "sampler binding type": { "category": "enum", "values": [ - {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, + {"value": 0, "name": "binding not used"}, {"value": 1, "name": "filtering"}, {"value": 2, "name": "non filtering"}, {"value": 3, "name": "comparison"} @@ -406,7 +406,7 @@ "category": "structure", "extensible": "in", "members": [ - {"name": "type", "type": "sampler binding type", "default": "undefined"} + {"name": "type", "type": "sampler binding type", "default": "binding not used"} ] }, "static sampler binding layout": { @@ -422,7 +422,7 @@ "texture sample type": { "category": "enum", "values": [ - {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, + {"value": 0, "name": "binding not used"}, {"value": 1, "name": "float"}, {"value": 2, "name": "unfilterable float"}, {"value": 3, "name": "depth"}, @@ -434,7 +434,7 @@ "category": "structure", "extensible": "in", "members": [ - {"name": "sample type", "type": "texture sample type", "default": "undefined"}, + {"name": "sample type", "type": "texture sample type", "default": "binding not used"}, {"name": "view dimension", "type": "texture view dimension", "default": "2D"}, {"name": "multisampled", "type": "bool", "default": "false"} ] @@ -495,7 +495,7 @@ "storage texture access": { "category": "enum", "values": [ - {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, + {"value": 0, "name": "binding not used"}, {"value": 1, "name": "write only"}, {"value": 2, "name": "read only"}, {"value": 3, "name": "read write"} @@ -505,7 +505,7 @@ "category": "structure", "extensible": "in", "members": [ - {"name": "access", "type": "storage texture access", "default": "undefined"}, + {"name": "access", "type": "storage texture access", "default": "binding not used"}, {"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 5c08f7d6f14..17677cf4ce3 100644 --- a/src/dawn/native/BindGroup.cpp +++ b/src/dawn/native/BindGroup.cpp @@ -107,7 +107,7 @@ MaybeError ValidateBufferBinding(const DeviceBase* device, maxBindingSize = device->GetLimits().v1.maxStorageBufferBindingSize; requiredBindingAlignment = device->GetLimits().v1.minStorageBufferOffsetAlignment; break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } diff --git a/src/dawn/native/BindGroupLayoutInternal.cpp b/src/dawn/native/BindGroupLayoutInternal.cpp index 475ae963ed8..0683260e11a 100644 --- a/src/dawn/native/BindGroupLayoutInternal.cpp +++ b/src/dawn/native/BindGroupLayoutInternal.cpp @@ -97,7 +97,7 @@ MaybeError ValidateBindGroupLayoutEntry(DeviceBase* device, int bindingMemberCount = 0; - if (entry->buffer.type != wgpu::BufferBindingType::Undefined) { + if (entry->buffer.type != wgpu::BufferBindingType::BindingNotUsed) { bindingMemberCount++; const BufferBindingLayout& buffer = entry->buffer; @@ -119,12 +119,12 @@ MaybeError ValidateBindGroupLayoutEntry(DeviceBase* device, } } - if (entry->sampler.type != wgpu::SamplerBindingType::Undefined) { + if (entry->sampler.type != wgpu::SamplerBindingType::BindingNotUsed) { bindingMemberCount++; DAWN_TRY(ValidateSamplerBindingType(entry->sampler.type)); } - if (entry->texture.sampleType != wgpu::TextureSampleType::Undefined) { + if (entry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) { bindingMemberCount++; const TextureBindingLayout& texture = entry->texture; // The kInternalResolveAttachmentSampleType is used internally and not a value @@ -166,7 +166,7 @@ MaybeError ValidateBindGroupLayoutEntry(DeviceBase* device, "Sample type for multisampled texture binding was %s.", wgpu::TextureSampleType::Float); } - if (entry->storageTexture.access != wgpu::StorageTextureAccess::Undefined) { + if (entry->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) { bindingMemberCount++; const StorageTextureBindingLayout& storageTexture = entry->storageTexture; DAWN_TRY(ValidateStorageTextureAccess(storageTexture.access)); @@ -257,7 +257,7 @@ MaybeError ValidateStaticSamplersWithTextureBindings( samplerBinding, sampledTextureBinding); auto& textureEntry = descriptor->entries[bindingNumberToIndexMap.at(sampledTextureBinding)]; - DAWN_INVALID_IF(textureEntry.texture.sampleType == wgpu::TextureSampleType::Undefined, + DAWN_INVALID_IF(textureEntry.texture.sampleType == wgpu::TextureSampleType::BindingNotUsed, "For static sampler binding (%u) the sampled texture binding (%u) is not a " "texture binding.", samplerBinding, sampledTextureBinding); @@ -443,11 +443,11 @@ bool operator!=(const BindingInfo& a, const BindingInfo& b) { } bool IsBufferBinding(const UnpackedPtr& binding) { - return binding->buffer.type != wgpu::BufferBindingType::Undefined; + return binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed; } bool BindingHasDynamicOffset(const UnpackedPtr& binding) { - if (binding->buffer.type != wgpu::BufferBindingType::Undefined) { + if (binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed) { return binding->buffer.hasDynamicOffset; } return false; @@ -458,18 +458,18 @@ BindingInfo CreateBindGroupLayoutInfo(const UnpackedPtr& b bindingInfo.binding = BindingNumber(binding->binding); bindingInfo.visibility = binding->visibility; - if (binding->buffer.type != wgpu::BufferBindingType::Undefined) { + if (binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed) { bindingInfo.bindingLayout = BufferBindingInfo(binding->buffer); - } else if (binding->sampler.type != wgpu::SamplerBindingType::Undefined) { + } else if (binding->sampler.type != wgpu::SamplerBindingType::BindingNotUsed) { bindingInfo.bindingLayout = SamplerBindingInfo(binding->sampler); - } else if (binding->texture.sampleType != wgpu::TextureSampleType::Undefined) { + } else if (binding->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) { 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::Undefined) { + } else if (binding->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) { bindingInfo.bindingLayout = StorageTextureBindingInfo(binding->storageTexture.WithTrivialFrontendDefaults()); } else if (auto* staticSamplerBindingLayout = binding.Get()) { @@ -825,7 +825,7 @@ bool BindGroupLayoutInternalBase::IsStorageBufferBinding(BindingIndex bindingInd case wgpu::BufferBindingType::Storage: case wgpu::BufferBindingType::ReadOnlyStorage: return true; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: break; } DAWN_UNREACHABLE(); diff --git a/src/dawn/native/BindingInfo.cpp b/src/dawn/native/BindingInfo.cpp index 1fb2b05d34c..bf7e214958c 100644 --- a/src/dawn/native/BindingInfo.cpp +++ b/src/dawn/native/BindingInfo.cpp @@ -57,7 +57,7 @@ void IncrementBindingCounts(BindingCounts* bindingCounts, uint32_t PerStageBindingCounts::*perStageBindingCountMember = nullptr; - if (entry->buffer.type != wgpu::BufferBindingType::Undefined) { + if (entry->buffer.type != wgpu::BufferBindingType::BindingNotUsed) { ++bindingCounts->bufferCount; const BufferBindingLayout& buffer = entry->buffer; @@ -82,21 +82,21 @@ void IncrementBindingCounts(BindingCounts* bindingCounts, perStageBindingCountMember = &PerStageBindingCounts::storageBufferCount; break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: // Can't get here due to the enclosing if statement. DAWN_UNREACHABLE(); break; } - } else if (entry->sampler.type != wgpu::SamplerBindingType::Undefined) { + } else if (entry->sampler.type != wgpu::SamplerBindingType::BindingNotUsed) { perStageBindingCountMember = &PerStageBindingCounts::samplerCount; - } else if (entry->texture.sampleType != wgpu::TextureSampleType::Undefined) { + } else if (entry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) { if (entry->texture.viewDimension == kInternalInputAttachmentDim) { // Internal use only. return; } else { perStageBindingCountMember = &PerStageBindingCounts::sampledTextureCount; } - } else if (entry->storageTexture.access != wgpu::StorageTextureAccess::Undefined) { + } else if (entry->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) { perStageBindingCountMember = &PerStageBindingCounts::storageTextureCount; } else if (entry.Get()) { perStageBindingCountMember = &PerStageBindingCounts::externalTextureCount; diff --git a/src/dawn/native/CommandBufferStateTracker.cpp b/src/dawn/native/CommandBufferStateTracker.cpp index 04500a9f1fa..c403f977917 100644 --- a/src/dawn/native/CommandBufferStateTracker.cpp +++ b/src/dawn/native/CommandBufferStateTracker.cpp @@ -174,7 +174,7 @@ Return FindStorageBufferBindingAliasing(const PipelineLayoutBase* pipelineLayout break; case wgpu::StorageTextureAccess::ReadOnly: continue; - case wgpu::StorageTextureAccess::Undefined: + case wgpu::StorageTextureAccess::BindingNotUsed: default: DAWN_UNREACHABLE(); } diff --git a/src/dawn/native/Format.cpp b/src/dawn/native/Format.cpp index a0f98c05139..384d631b542 100644 --- a/src/dawn/native/Format.cpp +++ b/src/dawn/native/Format.cpp @@ -66,14 +66,14 @@ SampleTypeBit SampleTypeToSampleTypeBit(wgpu::TextureSampleType sampleType) { case wgpu::TextureSampleType::Sint: case wgpu::TextureSampleType::Uint: case wgpu::TextureSampleType::Depth: - case wgpu::TextureSampleType::Undefined: + case wgpu::TextureSampleType::BindingNotUsed: // 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(wgpu::TextureSampleType::Undefined) == 0); - if (sampleType == wgpu::TextureSampleType::Undefined) { + static_assert(static_cast(wgpu::TextureSampleType::BindingNotUsed) == 0); + if (sampleType == wgpu::TextureSampleType::BindingNotUsed) { return SampleTypeBit::None; } diff --git a/src/dawn/native/PassResourceUsageTracker.cpp b/src/dawn/native/PassResourceUsageTracker.cpp index 93de0378fe6..cc4819919b8 100644 --- a/src/dawn/native/PassResourceUsageTracker.cpp +++ b/src/dawn/native/PassResourceUsageTracker.cpp @@ -126,7 +126,7 @@ void SyncScopeUsageTracker::AddBindGroup(BindGroupBase* group) { case wgpu::BufferBindingType::ReadOnlyStorage: BufferUsedAs(buffer, kReadOnlyStorageBuffer, bindingInfo.visibility); break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } }, @@ -156,7 +156,7 @@ void SyncScopeUsageTracker::AddBindGroup(BindGroupBase* group) { case wgpu::StorageTextureAccess::ReadOnly: TextureViewUsedAs(view, kReadOnlyStorageTexture, bindingInfo.visibility); break; - case wgpu::StorageTextureAccess::Undefined: + case wgpu::StorageTextureAccess::BindingNotUsed: DAWN_UNREACHABLE(); } }, diff --git a/src/dawn/native/PipelineLayout.cpp b/src/dawn/native/PipelineLayout.cpp index 0bc7cc2b71c..91a26e18c3b 100644 --- a/src/dawn/native/PipelineLayout.cpp +++ b/src/dawn/native/PipelineLayout.cpp @@ -202,17 +202,17 @@ ResultOrError> PipelineLayoutBase::CreateDefault( 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::Undefined) == - (mergedEntry.texture.sampleType != wgpu::TextureSampleType::Undefined) && + (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) == + (mergedEntry.texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) && 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::Undefined) { + if (modifiedEntry->buffer.type != wgpu::BufferBindingType::BindingNotUsed) { compatible = compatible && modifiedEntry->buffer.hasDynamicOffset == mergedEntry.buffer.hasDynamicOffset; } - if (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::Undefined) { + if (modifiedEntry->texture.sampleType != wgpu::TextureSampleType::BindingNotUsed) { // 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 @@ ResultOrError> PipelineLayoutBase::CreateDefault( modifiedEntry->texture.multisampled == mergedEntry.texture.multisampled; } - if (modifiedEntry->storageTexture.access != wgpu::StorageTextureAccess::Undefined) { + if (modifiedEntry->storageTexture.access != wgpu::StorageTextureAccess::BindingNotUsed) { compatible = compatible && modifiedEntry->storageTexture.format == mergedEntry.storageTexture.format && diff --git a/src/dawn/native/ProgrammableEncoder.cpp b/src/dawn/native/ProgrammableEncoder.cpp index cd773590982..60a933af807 100644 --- a/src/dawn/native/ProgrammableEncoder.cpp +++ b/src/dawn/native/ProgrammableEncoder.cpp @@ -160,7 +160,7 @@ MaybeError ProgrammableEncoder::ValidateSetBindGroup(BindGroupIndex index, case kInternalStorageBufferBinding: requiredAlignment = GetDevice()->GetLimits().v1.minStorageBufferOffsetAlignment; break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } diff --git a/src/dawn/native/ShaderModule.cpp b/src/dawn/native/ShaderModule.cpp index 016a0a1e8af..9d2da456e81 100644 --- a/src/dawn/native/ShaderModule.cpp +++ b/src/dawn/native/ShaderModule.cpp @@ -181,7 +181,7 @@ wgpu::TextureSampleType TintSampledKindToSampleType( // Note that Float is compatible with both Float and UnfilterableFloat. return wgpu::TextureSampleType::Float; case tint::inspector::ResourceBinding::SampledKind::kUnknown: - return wgpu::TextureSampleType::Undefined; + return wgpu::TextureSampleType::BindingNotUsed; } DAWN_UNREACHABLE(); } diff --git a/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp b/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp index 21530e22d97..258994db6f5 100644 --- a/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp +++ b/src/dawn/native/d3d11/BindGroupTrackerD3D11.cpp @@ -232,7 +232,7 @@ MaybeError BindGroupTracker::ApplyBindGroup(BindGroupIndex index) { } break; } - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } return {}; @@ -370,7 +370,7 @@ void ComputePassBindGroupTracker::UnapplyComputeBindings(BindGroupIndex index) { deviceContext->CSSetShaderResources(bindingSlot, 1, &nullSRV); break; } - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } }, @@ -494,10 +494,11 @@ MaybeError RenderPassBindGroupTracker::Apply() { break; } case wgpu::BufferBindingType::Uniform: - case wgpu::BufferBindingType::ReadOnlyStorage: - case wgpu::BufferBindingType::Undefined: { + case wgpu::BufferBindingType::ReadOnlyStorage: { 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 1a87c9efd04..e7e52dd0938 100644 --- a/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp +++ b/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp @@ -77,7 +77,7 @@ MaybeError PipelineLayout::Initialize(Device* device) { case wgpu::BufferBindingType::ReadOnlyStorage: mIndexInfo[group][bindingIndex] = shaderResourceViewIndex++; break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } }, @@ -102,7 +102,7 @@ MaybeError PipelineLayout::Initialize(Device* device) { case wgpu::StorageTextureAccess::ReadOnly: mIndexInfo[group][bindingIndex] = shaderResourceViewIndex++; break; - case wgpu::StorageTextureAccess::Undefined: + case wgpu::StorageTextureAccess::BindingNotUsed: DAWN_UNREACHABLE(); } }, diff --git a/src/dawn/native/d3d11/ShaderModuleD3D11.cpp b/src/dawn/native/d3d11/ShaderModuleD3D11.cpp index 41c42c07cea..9bf7b8a3b83 100644 --- a/src/dawn/native/d3d11/ShaderModuleD3D11.cpp +++ b/src/dawn/native/d3d11/ShaderModuleD3D11.cpp @@ -147,7 +147,7 @@ ResultOrError ShaderModule::Compile( srcBindingPoint, tint::hlsl::writer::binding::Storage{ dstBindingPoint.group, dstBindingPoint.binding}); break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); break; } diff --git a/src/dawn/native/d3d12/BindGroupD3D12.cpp b/src/dawn/native/d3d12/BindGroupD3D12.cpp index 493b6f23111..0dd630590c4 100644 --- a/src/dawn/native/d3d12/BindGroupD3D12.cpp +++ b/src/dawn/native/d3d12/BindGroupD3D12.cpp @@ -140,7 +140,7 @@ BindGroup::BindGroup(Device* device, descriptorHeapOffsets[bindingIndex])); break; } - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } }, @@ -190,7 +190,7 @@ BindGroup::BindGroup(Device* device, descriptorHeapOffsets[bindingIndex])); break; } - case wgpu::StorageTextureAccess::Undefined: + case wgpu::StorageTextureAccess::BindingNotUsed: DAWN_UNREACHABLE(); } }, diff --git a/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp index 10c346d2a08..2ecc42c5b06 100644 --- a/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp +++ b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp @@ -51,7 +51,7 @@ D3D12_DESCRIPTOR_RANGE_TYPE WGPUBindingInfoToDescriptorRangeType(const BindingIn return D3D12_DESCRIPTOR_RANGE_TYPE_UAV; case wgpu::BufferBindingType::ReadOnlyStorage: return D3D12_DESCRIPTOR_RANGE_TYPE_SRV; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } }, @@ -71,7 +71,7 @@ D3D12_DESCRIPTOR_RANGE_TYPE WGPUBindingInfoToDescriptorRangeType(const BindingIn return D3D12_DESCRIPTOR_RANGE_TYPE_UAV; case wgpu::StorageTextureAccess::ReadOnly: return D3D12_DESCRIPTOR_RANGE_TYPE_SRV; - case wgpu::StorageTextureAccess::Undefined: + case wgpu::StorageTextureAccess::BindingNotUsed: DAWN_UNREACHABLE(); } }, diff --git a/src/dawn/native/d3d12/CommandBufferD3D12.cpp b/src/dawn/native/d3d12/CommandBufferD3D12.cpp index b5597b96b7b..8c9fd6ab58d 100644 --- a/src/dawn/native/d3d12/CommandBufferD3D12.cpp +++ b/src/dawn/native/d3d12/CommandBufferD3D12.cpp @@ -526,7 +526,7 @@ class BindGroupStateTracker : public BindGroupTrackerBase { commandList->SetComputeRootShaderResourceView(parameterIndex, bufferLocation); } break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } } diff --git a/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp b/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp index 4d47ab8f86a..33fd7767d8a 100644 --- a/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp +++ b/src/dawn/native/d3d12/PipelineLayoutD3D12.cpp @@ -65,7 +65,7 @@ D3D12_ROOT_PARAMETER_TYPE RootParameterType(wgpu::BufferBindingType type) { return D3D12_ROOT_PARAMETER_TYPE_UAV; case wgpu::BufferBindingType::ReadOnlyStorage: return D3D12_ROOT_PARAMETER_TYPE_SRV; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } } diff --git a/src/dawn/native/d3d12/ShaderModuleD3D12.cpp b/src/dawn/native/d3d12/ShaderModuleD3D12.cpp index 69bbfea24bc..7bd281f8c59 100644 --- a/src/dawn/native/d3d12/ShaderModuleD3D12.cpp +++ b/src/dawn/native/d3d12/ShaderModuleD3D12.cpp @@ -216,7 +216,7 @@ ResultOrError ShaderModule::Compile( srcBindingPoint, tint::hlsl::writer::binding::Storage{ dstBindingPoint.group, dstBindingPoint.binding}); break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); break; } diff --git a/src/dawn/native/metal/ShaderModuleMTL.mm b/src/dawn/native/metal/ShaderModuleMTL.mm index 46517ef17af..05e99e663bf 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::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); break; } diff --git a/src/dawn/native/opengl/CommandBufferGL.cpp b/src/dawn/native/opengl/CommandBufferGL.cpp index 91dc7b4ebc9..34c622a21be 100644 --- a/src/dawn/native/opengl/CommandBufferGL.cpp +++ b/src/dawn/native/opengl/CommandBufferGL.cpp @@ -339,7 +339,7 @@ class BindGroupTracker : public BindGroupTrackerBase { case wgpu::BufferBindingType::ReadOnlyStorage: target = GL_SHADER_STORAGE_BUFFER; break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } @@ -409,7 +409,7 @@ class BindGroupTracker : public BindGroupTrackerBase { case wgpu::StorageTextureAccess::ReadOnly: access = GL_READ_ONLY; break; - case wgpu::StorageTextureAccess::Undefined: + case wgpu::StorageTextureAccess::BindingNotUsed: DAWN_UNREACHABLE(); } diff --git a/src/dawn/native/opengl/PipelineLayoutGL.cpp b/src/dawn/native/opengl/PipelineLayoutGL.cpp index 46b634b83ff..d59e2a8b041 100644 --- a/src/dawn/native/opengl/PipelineLayoutGL.cpp +++ b/src/dawn/native/opengl/PipelineLayoutGL.cpp @@ -63,7 +63,7 @@ PipelineLayout::PipelineLayout(Device* device, mIndexInfo[group][bindingIndex] = ssboIndex; ssboIndex++; break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); } }, diff --git a/src/dawn/native/opengl/ShaderModuleGL.cpp b/src/dawn/native/opengl/ShaderModuleGL.cpp index 00b8403cee6..238a1954ea2 100644 --- a/src/dawn/native/opengl/ShaderModuleGL.cpp +++ b/src/dawn/native/opengl/ShaderModuleGL.cpp @@ -348,7 +348,7 @@ std::pair GenerateBindingInfo( srcBindingPoint, tint::glsl::writer::binding::Storage{dstBindingPoint.binding}); break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); break; } diff --git a/src/dawn/native/vulkan/BindGroupLayoutVk.cpp b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp index 584674deaed..13a766dbc3c 100644 --- a/src/dawn/native/vulkan/BindGroupLayoutVk.cpp +++ b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp @@ -82,7 +82,7 @@ VkDescriptorType VulkanDescriptorType(const BindingInfo& bindingInfo) { return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; } return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: 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 c4d705ed3ba..4265ca8b972 100644 --- a/src/dawn/native/vulkan/ShaderModuleVk.cpp +++ b/src/dawn/native/vulkan/ShaderModuleVk.cpp @@ -273,7 +273,7 @@ ResultOrError ShaderModule::GetHandleAndSpirv( tint::spirv::writer::binding::Storage{dstBindingPoint.group, dstBindingPoint.binding}); break; - case wgpu::BufferBindingType::Undefined: + case wgpu::BufferBindingType::BindingNotUsed: DAWN_UNREACHABLE(); break; } diff --git a/src/dawn/node/binding/Converter.cpp b/src/dawn/node/binding/Converter.cpp index 52262c24ee6..56189d22da5 100644 --- a/src/dawn/node/binding/Converter.cpp +++ b/src/dawn/node/binding/Converter.cpp @@ -1388,7 +1388,7 @@ bool Converter::Convert(wgpu::StorageTextureBindingLayout& out, } bool Converter::Convert(wgpu::BufferBindingType& out, const interop::GPUBufferBindingType& in) { - out = wgpu::BufferBindingType::Undefined; + out = wgpu::BufferBindingType::BindingNotUsed; switch (in) { case interop::GPUBufferBindingType::kUniform: out = wgpu::BufferBindingType::Uniform; @@ -1404,7 +1404,7 @@ bool Converter::Convert(wgpu::BufferBindingType& out, const interop::GPUBufferBi } bool Converter::Convert(wgpu::TextureSampleType& out, const interop::GPUTextureSampleType& in) { - out = wgpu::TextureSampleType::Undefined; + out = wgpu::TextureSampleType::BindingNotUsed; switch (in) { case interop::GPUTextureSampleType::kFloat: out = wgpu::TextureSampleType::Float; @@ -1426,7 +1426,7 @@ bool Converter::Convert(wgpu::TextureSampleType& out, const interop::GPUTextureS } bool Converter::Convert(wgpu::SamplerBindingType& out, const interop::GPUSamplerBindingType& in) { - out = wgpu::SamplerBindingType::Undefined; + out = wgpu::SamplerBindingType::BindingNotUsed; switch (in) { case interop::GPUSamplerBindingType::kFiltering: out = wgpu::SamplerBindingType::Filtering; @@ -1443,7 +1443,7 @@ bool Converter::Convert(wgpu::SamplerBindingType& out, const interop::GPUSampler bool Converter::Convert(wgpu::StorageTextureAccess& out, const interop::GPUStorageTextureAccess& in) { - out = wgpu::StorageTextureAccess::Undefined; + out = wgpu::StorageTextureAccess::BindingNotUsed; 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 07f4a182027..d186ee81ba3 100644 --- a/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp @@ -485,7 +485,7 @@ TEST_F(GetBindGroupLayoutTests, BindingType) { BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0))); } - binding.buffer.type = wgpu::BufferBindingType::Undefined; + binding.buffer.type = wgpu::BufferBindingType::BindingNotUsed; binding.buffer.minBindingSize = 0; { binding.texture.sampleType = wgpu::TextureSampleType::UnfilterableFloat; @@ -511,7 +511,7 @@ TEST_F(GetBindGroupLayoutTests, BindingType) { BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0))); } - binding.texture.sampleType = wgpu::TextureSampleType::Undefined; + binding.texture.sampleType = wgpu::TextureSampleType::BindingNotUsed; { 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 82d60a624bf..25f10264348 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 @@ class EnumsTest { fun uniqueEnumsBufferBindingType() { val values = HashSet() arrayOf( - BufferBindingType.Undefined, + BufferBindingType.BindingNotUsed, BufferBindingType.Uniform, BufferBindingType.Storage, BufferBindingType.ReadOnlyStorage