Workaround for harmless warning about descriptor sets (#9519)
* Workaround for harmless warning about descriptor sets The proper fix is difficult and will be handled later. Here we simply suppress the warning at FL0. BUGS=[468072646] * Apply suggestions from code review
This commit is contained in:
@@ -106,13 +106,22 @@ void DescriptorSet::commitSlow(DescriptorSetLayout const& layout,
|
||||
}
|
||||
});
|
||||
|
||||
auto const unsetValidDescriptors = layout.getValidDescriptors() & ~mValid;
|
||||
if (UTILS_VERY_UNLIKELY(!unsetValidDescriptors.empty() && !mSetUndefinedParameterWarning)) {
|
||||
unsetValidDescriptors.forEachSetBit([&](auto i) {
|
||||
LOG(WARNING) << (layout.isSampler(i) ? "Sampler" : "Buffer") << " descriptor " << i
|
||||
<< " of " << mName.c_str() << " is not set. Please report this issue.";
|
||||
});
|
||||
mSetUndefinedParameterWarning = true;
|
||||
// FIXME: see [b/468072646]
|
||||
// We only validate empty descriptors at FEATURE_LEVEL_1 and above.
|
||||
// This is because at FL0 it's expected that some descriptor won't be set. In theory, the
|
||||
// corresponding layouts should not even contain those descriptors. However, making that change
|
||||
// is difficult and risky, and will be done at a later time.
|
||||
// Note: that the correct fix is actually needed to properly support FL3 once we want
|
||||
// to take advantage of having more samplers.
|
||||
if (UTILS_LIKELY(driver.getFeatureLevel() > backend::FeatureLevel::FEATURE_LEVEL_0)) {
|
||||
auto const unsetValidDescriptors = layout.getValidDescriptors() & ~mValid;
|
||||
if (UTILS_VERY_UNLIKELY(!unsetValidDescriptors.empty() && !mSetUndefinedParameterWarning)) {
|
||||
unsetValidDescriptors.forEachSetBit([&](auto i) {
|
||||
LOG(WARNING) << (layout.isSampler(i) ? "Sampler" : "Buffer") << " descriptor " << i
|
||||
<< " of " << mName.c_str() << " is not set. Please report this issue.";
|
||||
});
|
||||
mSetUndefinedParameterWarning = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user