mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Fix hanging when creating more than 2 BC1Encoders
This commit is contained in:
parent
5056e07f37
commit
e58871167e
@ -56,8 +56,7 @@ template <size_t N> class OrderTable {
|
|||||||
static_assert(N == 4 || N == 3);
|
static_assert(N == 4 || N == 3);
|
||||||
|
|
||||||
table_mutex.lock();
|
table_mutex.lock();
|
||||||
if (generated) return false;
|
if (!generated) {
|
||||||
|
|
||||||
hashes = new std::array<Hash, HashCount>();
|
hashes = new std::array<Hash, HashCount>();
|
||||||
factors = new std::array<Vector4, OrderCount>();
|
factors = new std::array<Vector4, OrderCount>();
|
||||||
|
|
||||||
@ -82,6 +81,7 @@ template <size_t N> class OrderTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
generated = true;
|
generated = true;
|
||||||
|
}
|
||||||
table_mutex.unlock();
|
table_mutex.unlock();
|
||||||
|
|
||||||
assert(generated);
|
assert(generated);
|
||||||
@ -145,4 +145,4 @@ template <> const OrderTable<4>::BestOrderArray OrderTable<4>::BestOrders;
|
|||||||
extern template class OrderTable<3>;
|
extern template class OrderTable<3>;
|
||||||
extern template class OrderTable<4>;
|
extern template class OrderTable<4>;
|
||||||
|
|
||||||
} // namespace rgbcx
|
} // namespace rgbcx::BC1
|
Loading…
Reference in New Issue
Block a user