Remove deprecated inspector fields.
This CL removes two deprecated fields from the inspector. The deprecated alias to sem::SamplerTexturePair remains as it will require creating a structure on the inspector side to replicate. Change-Id: I6001fbd475260079dd49d50f8e8619241bb0b468 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120880 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
fdef033210
commit
2f689a7efe
|
@ -567,7 +567,7 @@ ResultOrError<std::unique_ptr<EntryPointMetadata>> 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<std::unique_ptr<EntryPointMetadata>> 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<std::unique_ptr<EntryPointMetadata>> 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<std::unique_ptr<EntryPointMetadata>> 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).",
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -492,7 +492,7 @@ std::vector<ResourceBinding> Inspector::GetExternalTextureResourceBindings(
|
|||
ResourceBinding::ResourceType::kExternalTexture);
|
||||
}
|
||||
|
||||
utils::VectorRef<sem::SamplerTexturePair> Inspector::GetSamplerTextureUses(
|
||||
utils::VectorRef<SamplerTexturePair> Inspector::GetSamplerTextureUses(
|
||||
const std::string& entry_point) {
|
||||
auto* func = FindEntryPointByName(entry_point);
|
||||
if (!func) {
|
||||
|
@ -508,7 +508,7 @@ utils::VectorRef<sem::SamplerTexturePair> Inspector::GetSamplerTextureUses(
|
|||
return it->second;
|
||||
}
|
||||
|
||||
std::vector<sem::SamplerTexturePair> Inspector::GetSamplerTextureUses(
|
||||
std::vector<SamplerTexturePair> Inspector::GetSamplerTextureUses(
|
||||
const std::string& entry_point,
|
||||
const sem::BindingPoint& placeholder) {
|
||||
auto* func = FindEntryPointByName(entry_point);
|
||||
|
@ -517,7 +517,7 @@ std::vector<sem::SamplerTexturePair> Inspector::GetSamplerTextureUses(
|
|||
}
|
||||
auto* func_sem = program_->Sem().Get(func);
|
||||
|
||||
std::vector<sem::SamplerTexturePair> new_pairs;
|
||||
std::vector<SamplerTexturePair> new_pairs;
|
||||
for (auto pair : func_sem->TextureSamplerPairs()) {
|
||||
auto* texture = pair.first->As<sem::GlobalVariable>();
|
||||
auto* sampler = pair.second ? pair.second->As<sem::GlobalVariable>() : nullptr;
|
||||
|
@ -775,7 +775,7 @@ void Inspector::GenerateSamplerTargets() {
|
|||
}
|
||||
|
||||
sampler_targets_ = std::make_unique<
|
||||
std::unordered_map<std::string, utils::UniqueVector<sem::SamplerTexturePair, 4>>>();
|
||||
std::unordered_map<std::string, utils::UniqueVector<SamplerTexturePair, 4>>>();
|
||||
|
||||
auto& sem = program_->Sem();
|
||||
|
||||
|
|
|
@ -127,15 +127,14 @@ 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<sem::SamplerTexturePair> GetSamplerTextureUses(const std::string& entry_point);
|
||||
utils::VectorRef<SamplerTexturePair> 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<sem::SamplerTexturePair> GetSamplerTextureUses(
|
||||
const std::string& entry_point,
|
||||
std::vector<SamplerTexturePair> GetSamplerTextureUses(const std::string& entry_point,
|
||||
const sem::BindingPoint& placeholder);
|
||||
|
||||
/// @param entry_point name of the entry point to get information about.
|
||||
|
@ -158,8 +157,7 @@ class Inspector {
|
|||
private:
|
||||
const Program* program_;
|
||||
diag::List diagnostics_;
|
||||
std::unique_ptr<
|
||||
std::unordered_map<std::string, utils::UniqueVector<sem::SamplerTexturePair, 4>>>
|
||||
std::unique_ptr<std::unordered_map<std::string, utils::UniqueVector<SamplerTexturePair, 4>>>
|
||||
sampler_targets_;
|
||||
|
||||
/// @param name name of the entry point to find
|
||||
|
|
Loading…
Reference in New Issue