mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 11:22:24 +02:00
Clean up names and comments
This commit is contained in:
parent
84305c2049
commit
c583ffbac4
2 changed files with 10 additions and 10 deletions
|
@ -427,15 +427,14 @@ void GL41VariableAllocationTexture::populateTransferQueue() {
|
||||||
|
|
||||||
// break down the transfers into chunks so that no single transfer is
|
// break down the transfers into chunks so that no single transfer is
|
||||||
// consuming more than X bandwidth
|
// consuming more than X bandwidth
|
||||||
|
// For compressed format, regions must be a multiple of the 4x4 tiles, so enforce 4 lines as the minimum block
|
||||||
auto mipSize = _gpuObject.getStoredMipFaceSize(sourceMip, face);
|
auto mipSize = _gpuObject.getStoredMipFaceSize(sourceMip, face);
|
||||||
const auto lines = mipDimensions.y;
|
const auto lines = mipDimensions.y;
|
||||||
const uint32_t CHUNK_NUM_LINES { 4 };
|
const uint32_t BLOCK_NUM_LINES { 4 };
|
||||||
const auto numChunks = (lines + (CHUNK_NUM_LINES - 1)) / CHUNK_NUM_LINES;
|
const auto numBlocks = (lines + (BLOCK_NUM_LINES - 1)) / BLOCK_NUM_LINES;
|
||||||
auto bytesPerChunk = mipSize / numChunks;
|
auto bytesPerBlock = mipSize / numBlocks;
|
||||||
//auto bytesPerLine = mipSize / lines;
|
|
||||||
Q_ASSERT(0 == (mipSize % lines));
|
Q_ASSERT(0 == (mipSize % lines));
|
||||||
// uint32_t linesPerTransfer = (uint32_t)(MAX_TRANSFER_SIZE / bytesPerLine);
|
uint32_t linesPerTransfer = BLOCK_NUM_LINES * (uint32_t)(MAX_TRANSFER_SIZE / bytesPerBlock);
|
||||||
uint32_t linesPerTransfer = CHUNK_NUM_LINES * (uint32_t)(MAX_TRANSFER_SIZE / bytesPerChunk);
|
|
||||||
uint32_t lineOffset = 0;
|
uint32_t lineOffset = 0;
|
||||||
while (lineOffset < lines) {
|
while (lineOffset < lines) {
|
||||||
uint32_t linesToCopy = std::min<uint32_t>(lines - lineOffset, linesPerTransfer);
|
uint32_t linesToCopy = std::min<uint32_t>(lines - lineOffset, linesPerTransfer);
|
||||||
|
|
|
@ -195,13 +195,14 @@ void GL45ResourceTexture::populateTransferQueue() {
|
||||||
|
|
||||||
// break down the transfers into chunks so that no single transfer is
|
// break down the transfers into chunks so that no single transfer is
|
||||||
// consuming more than X bandwidth
|
// consuming more than X bandwidth
|
||||||
|
// For compressed format, regions must be a multiple of the 4x4 tiles, so enforce 4 lines as the minimum block
|
||||||
auto mipSize = _gpuObject.getStoredMipFaceSize(sourceMip, face);
|
auto mipSize = _gpuObject.getStoredMipFaceSize(sourceMip, face);
|
||||||
const auto lines = mipDimensions.y;
|
const auto lines = mipDimensions.y;
|
||||||
const uint32_t CHUNK_NUM_LINES { 4 };
|
const uint32_t BLOCK_NUM_LINES { 4 };
|
||||||
const auto numChunks = (lines + (CHUNK_NUM_LINES - 1)) / CHUNK_NUM_LINES;
|
const auto numBlocks = (lines + (BLOCK_NUM_LINES - 1)) / BLOCK_NUM_LINES;
|
||||||
auto bytesPerChunk = mipSize / numChunks;
|
auto bytesPerBlock = mipSize / numBlocks;
|
||||||
Q_ASSERT(0 == (mipSize % lines));
|
Q_ASSERT(0 == (mipSize % lines));
|
||||||
uint32_t linesPerTransfer = CHUNK_NUM_LINES * (uint32_t)(MAX_TRANSFER_SIZE / bytesPerChunk);
|
uint32_t linesPerTransfer = BLOCK_NUM_LINES * (uint32_t)(MAX_TRANSFER_SIZE / bytesPerBlock);
|
||||||
uint32_t lineOffset = 0;
|
uint32_t lineOffset = 0;
|
||||||
while (lineOffset < lines) {
|
while (lineOffset < lines) {
|
||||||
uint32_t linesToCopy = std::min<uint32_t>(lines - lineOffset, linesPerTransfer);
|
uint32_t linesToCopy = std::min<uint32_t>(lines - lineOffset, linesPerTransfer);
|
||||||
|
|
Loading…
Reference in a new issue