From 52ff2c65d6b903d2583cceef02f8a80ded063f6a Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 12 May 2024 18:32:24 +0200 Subject: [PATCH] Explicit cast from size_t to uint64_t --- src/render/rt64_buffer_uploader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/rt64_buffer_uploader.cpp b/src/render/rt64_buffer_uploader.cpp index 1850fa4..d0979ce 100644 --- a/src/render/rt64_buffer_uploader.cpp +++ b/src/render/rt64_buffer_uploader.cpp @@ -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));