mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 23:55:40 +12:00
Add proper warning to surface cache
This commit is contained in:
parent
15ede3bd6e
commit
2bbcdfade2
1 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,10 @@ public:
|
||||||
SurfaceType& add(const SurfaceType& surface) {
|
SurfaceType& add(const SurfaceType& surface) {
|
||||||
if (size >= capacity) {
|
if (size >= capacity) {
|
||||||
if constexpr (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true
|
if constexpr (evictOnOverflow) { // Do a ring buffer if evictOnOverflow is true
|
||||||
|
if constexpr (std::is_same<SurfaceType, ColourBuffer>() || std::is_same<SurfaceType, DepthBuffer>()) {
|
||||||
|
Helpers::panicDev("Colour/Depth buffer cache overflowed, currently stubbed to do a ring-buffer. This might snap in half");
|
||||||
|
}
|
||||||
|
|
||||||
auto& e = buffer[evictionIndex];
|
auto& e = buffer[evictionIndex];
|
||||||
evictionIndex = (evictionIndex + 1) % capacity;
|
evictionIndex = (evictionIndex + 1) % capacity;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue