diff --git a/src/dawn/native/ShaderModule.cpp b/src/dawn/native/ShaderModule.cpp index 8b1fadf4a9..8385fd82a1 100644 --- a/src/dawn/native/ShaderModule.cpp +++ b/src/dawn/native/ShaderModule.cpp @@ -567,7 +567,7 @@ ResultOrError> ReflectEntryPointUsingTint( const uint32_t maxInterStageShaderComponents = limits.v1.maxInterStageShaderComponents; if (metadata->stage == SingleShaderStage::Vertex) { for (const auto& inputVar : entryPoint.input_variables) { - uint32_t unsanitizedLocation = inputVar.location_decoration; + uint32_t unsanitizedLocation = inputVar.location_attribute; if (DelayedInvalidIf(unsanitizedLocation >= maxVertexAttributes, "Vertex input variable \"%s\" has a location (%u) that " "exceeds the maximum (%u)", @@ -595,7 +595,7 @@ ResultOrError> ReflectEntryPointUsingTint( outputVar.interpolation_sampling)); totalInterStageShaderComponents += variable.componentCount; - uint32_t location = outputVar.location_decoration; + uint32_t location = outputVar.location_attribute; if (DelayedInvalidIf(location >= maxInterStageShaderVariables, "Vertex output variable \"%s\" has a location (%u) that " "is greater than or equal to (%u).", @@ -628,7 +628,7 @@ ResultOrError> ReflectEntryPointUsingTint( inputVar.interpolation_sampling)); totalInterStageShaderComponents += variable.componentCount; - uint32_t location = inputVar.location_decoration; + uint32_t location = inputVar.location_attribute; if (DelayedInvalidIf(location >= maxInterStageShaderVariables, "Fragment input variable \"%s\" has a location (%u) that " "is greater than or equal to (%u).", @@ -666,7 +666,7 @@ ResultOrError> ReflectEntryPointUsingTint( outputVar.composition_type)); ASSERT(variable.componentCount <= 4); - uint32_t unsanitizedAttachment = outputVar.location_decoration; + uint32_t unsanitizedAttachment = outputVar.location_attribute; if (DelayedInvalidIf(unsanitizedAttachment >= maxColorAttachments, "Fragment output variable \"%s\" has a location (%u) that " "exceeds the maximum (%u).", diff --git a/src/tint/inspector/entry_point.cc b/src/tint/inspector/entry_point.cc index a6c3b8c4f0..cf39df28cb 100644 --- a/src/tint/inspector/entry_point.cc +++ b/src/tint/inspector/entry_point.cc @@ -21,8 +21,6 @@ StageVariable::StageVariable(const StageVariable& other) : name(other.name), has_location_attribute(other.has_location_attribute), location_attribute(other.location_attribute), - has_location_decoration(has_location_attribute), - location_decoration(location_attribute), component_type(other.component_type), composition_type(other.composition_type), interpolation_type(other.interpolation_type), diff --git a/src/tint/inspector/entry_point.h b/src/tint/inspector/entry_point.h index eabe601f56..fd17ba064c 100644 --- a/src/tint/inspector/entry_point.h +++ b/src/tint/inspector/entry_point.h @@ -68,13 +68,6 @@ struct StageVariable { /// Value of the location attribute, only valid if #has_location_attribute is /// true. uint32_t location_attribute; - /// Is Location attribute present - /// [DEPRECATED]: Use #has_location_attribute - bool& has_location_decoration = has_location_attribute; - /// Value of Location Decoration, only valid if #has_location_decoration is - /// true. - /// [DEPRECATED]: Use #location_attribute - uint32_t& location_decoration = location_attribute; /// Scalar type that the variable is composed of. ComponentType component_type = ComponentType::kUnknown; /// How the scalars are composed for the variable. diff --git a/src/tint/inspector/inspector.cc b/src/tint/inspector/inspector.cc index b12d8bf274..6e965233be 100644 --- a/src/tint/inspector/inspector.cc +++ b/src/tint/inspector/inspector.cc @@ -492,7 +492,7 @@ std::vector Inspector::GetExternalTextureResourceBindings( ResourceBinding::ResourceType::kExternalTexture); } -utils::VectorRef Inspector::GetSamplerTextureUses( +utils::VectorRef Inspector::GetSamplerTextureUses( const std::string& entry_point) { auto* func = FindEntryPointByName(entry_point); if (!func) { @@ -508,7 +508,7 @@ utils::VectorRef Inspector::GetSamplerTextureUses( return it->second; } -std::vector Inspector::GetSamplerTextureUses( +std::vector Inspector::GetSamplerTextureUses( const std::string& entry_point, const sem::BindingPoint& placeholder) { auto* func = FindEntryPointByName(entry_point); @@ -517,7 +517,7 @@ std::vector Inspector::GetSamplerTextureUses( } auto* func_sem = program_->Sem().Get(func); - std::vector new_pairs; + std::vector new_pairs; for (auto pair : func_sem->TextureSamplerPairs()) { auto* texture = pair.first->As(); auto* sampler = pair.second ? pair.second->As() : nullptr; @@ -775,7 +775,7 @@ void Inspector::GenerateSamplerTargets() { } sampler_targets_ = std::make_unique< - std::unordered_map>>(); + std::unordered_map>>(); auto& sem = program_->Sem(); diff --git a/src/tint/inspector/inspector.h b/src/tint/inspector/inspector.h index c76df68d37..443bbab6a8 100644 --- a/src/tint/inspector/inspector.h +++ b/src/tint/inspector/inspector.h @@ -127,16 +127,15 @@ class Inspector { /// @param entry_point name of the entry point to get information about. /// @returns vector of all of the sampler/texture sampling pairs that are used /// by that entry point. - utils::VectorRef GetSamplerTextureUses(const std::string& entry_point); + utils::VectorRef GetSamplerTextureUses(const std::string& entry_point); /// @param entry_point name of the entry point to get information about. /// @param placeholder the sampler binding point to use for texture-only /// access (e.g., textureLoad) /// @returns vector of all of the sampler/texture sampling pairs that are used /// by that entry point. - std::vector GetSamplerTextureUses( - const std::string& entry_point, - const sem::BindingPoint& placeholder); + std::vector GetSamplerTextureUses(const std::string& entry_point, + const sem::BindingPoint& placeholder); /// @param entry_point name of the entry point to get information about. /// @returns the total size in bytes of all Workgroup storage-class storage @@ -158,8 +157,7 @@ class Inspector { private: const Program* program_; diag::List diagnostics_; - std::unique_ptr< - std::unordered_map>> + std::unique_ptr>> sampler_targets_; /// @param name name of the entry point to find