texture_cache: Test format compatibility before copying

Avoid illegal copies. This intercepts the last step of a copy to avoid
generating validation errors or corrupting the driver on some instances.

We can create views and emit copies accordingly in future commits and
remove this last-step validation.
This commit is contained in:
ReinUsesLisp
2020-06-26 19:25:49 -03:00
parent 1d6be9febf
commit bb2cbdf704
2 changed files with 21 additions and 6 deletions

View File

@ -130,7 +130,7 @@ template <typename Range>
void EnableRange(FormatCompatibility::Table& compatibility, const Range& range) {
for (auto it_a = range.begin(); it_a != range.end(); ++it_a) {
for (auto it_b = it_a; it_b != range.end(); ++it_b) {
Enable(*it_a, *it_b);
Enable(compatibility, *it_a, *it_b);
}
}
}