Explicit cast from size_t to uint64_t

This commit is contained in:
David Chavez 2024-05-12 18:32:24 +02:00 committed by dcvz
parent a84e5f7b4b
commit 52ff2c65d6

View File

@ -91,8 +91,8 @@ namespace RT64 {
bufferPair.defaultViews.clear();
// Recreate the buffer pair.
const size_t BlockAlignment = 256;
bufferPair.allocatedSize = std::max((requiredSize * 3) / 2, BlockAlignment);
const uint64_t BlockAlignment = 256;
bufferPair.allocatedSize = std::max(((uint64_t)requiredSize * 3) / 2, BlockAlignment);
bufferPair.allocatedSize = roundUp(bufferPair.allocatedSize, BlockAlignment);
bufferPair.uploadBuffer = worker->device->createBuffer(RenderBufferDesc::UploadBuffer(bufferPair.allocatedSize));
bufferPair.defaultBuffer = worker->device->createBuffer(RenderBufferDesc::DefaultBuffer(bufferPair.allocatedSize, u.bufferFlags));