|
KiCad PCB EDA Suite
|
Go to the source code of this file.
Enumerations | |
| enum class | VRAM_RESIZE_STRATEGY |
| Strategy for growing a GPU vertex buffer, trading copy speed against peak video memory. More... | |
Functions | |
| BOOST_AUTO_TEST_CASE (UnknownVramKeepsGpuCopy) | |
| BOOST_AUTO_TEST_CASE (AmpleVramUsesGpuCopy) | |
| BOOST_AUTO_TEST_CASE (TightVramStagesThroughRam) | |
| BOOST_AUTO_TEST_CASE (InsufficientVramRefuses) | |
| BOOST_AUTO_TEST_CASE (MarginBoundaries) | |
| BOOST_AUTO_TEST_CASE (NegativeMarginClampedToZero) | |
| VRAM_RESIZE_STRATEGY | chooseResizeStrategy (size_t aFreeVRAM, size_t aOldBytes, size_t aNewBytes, double aMarginFrac) |
| Decide how to grow a GPU vertex buffer given the free video memory budget. | |
Variables | |
| static const size_t | MB = static_cast<size_t>( 1024 ) * 1024 |
| Tests for the predictive GPU buffer resize strategy guard that keeps a large-board defragmentResize() from tripping a fatal driver out-of-memory abort. | |
|
strong |
| BOOST_AUTO_TEST_CASE | ( | AmpleVramUsesGpuCopy | ) |
Definition at line 47 of file test_gal_resize_strategy.cpp.
References chooseResizeStrategy(), and MB.
| BOOST_AUTO_TEST_CASE | ( | InsufficientVramRefuses | ) |
Definition at line 63 of file test_gal_resize_strategy.cpp.
References chooseResizeStrategy(), and MB.
| BOOST_AUTO_TEST_CASE | ( | MarginBoundaries | ) |
Definition at line 70 of file test_gal_resize_strategy.cpp.
References chooseResizeStrategy(), and MB.
| BOOST_AUTO_TEST_CASE | ( | NegativeMarginClampedToZero | ) |
Definition at line 93 of file test_gal_resize_strategy.cpp.
References chooseResizeStrategy(), and MB.
| BOOST_AUTO_TEST_CASE | ( | TightVramStagesThroughRam | ) |
Definition at line 55 of file test_gal_resize_strategy.cpp.
References chooseResizeStrategy(), and MB.
| BOOST_AUTO_TEST_CASE | ( | UnknownVramKeepsGpuCopy | ) |
Definition at line 36 of file test_gal_resize_strategy.cpp.
References BOOST_AUTO_TEST_CASE(), chooseResizeStrategy(), and MB.
| GAL_API VRAM_RESIZE_STRATEGY KIGFX::chooseResizeStrategy | ( | size_t | aFreeVRAM, |
| size_t | aOldBytes, | ||
| size_t | aNewBytes, | ||
| double | aMarginFrac ) |
Decide how to grow a GPU vertex buffer given the free video memory budget.
A doubling resize would otherwise hold the old and new buffers in VRAM at the same time, which can exceed the budget on a large board and trip a fatal driver out-of-memory abort.
| aFreeVRAM | is the free video memory in bytes, or 0 when unknown. |
| aOldBytes | is the size of the existing buffer in bytes. |
| aNewBytes | is the size of the requested buffer in bytes. |
| aMarginFrac | is the headroom kept free, as a fraction of the allocation size. |
Definition at line 234 of file utils.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
static |
Tests for the predictive GPU buffer resize strategy guard that keeps a large-board defragmentResize() from tripping a fatal driver out-of-memory abort.
Definition at line 33 of file test_gal_resize_strategy.cpp.
Referenced by PROJECT_ARCHIVER::Archive(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().