video_core: Use binary memory-literals for memory-sizes (#7127)
Replaces `... * 1024 * 1024` with `_MiB`/`_GiB` literals.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/alignment.h"
|
||||
#include "common/literals.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/math_util.h"
|
||||
#include "common/microprofile.h"
|
||||
@@ -28,11 +29,12 @@ MICROPROFILE_DEFINE(Vulkan_Drawing, "Vulkan", "Drawing", MP_RGB(128, 128, 192));
|
||||
using TriangleTopology = Pica::PipelineRegs::TriangleTopology;
|
||||
using VideoCore::SurfaceType;
|
||||
|
||||
using namespace Common::Literals;
|
||||
using namespace Pica::Shader::Generator;
|
||||
|
||||
constexpr u64 STREAM_BUFFER_SIZE = 64 * 1024 * 1024;
|
||||
constexpr u64 UNIFORM_BUFFER_SIZE = 4 * 1024 * 1024;
|
||||
constexpr u64 TEXTURE_BUFFER_SIZE = 2 * 1024 * 1024;
|
||||
constexpr u64 STREAM_BUFFER_SIZE = 64_MiB;
|
||||
constexpr u64 UNIFORM_BUFFER_SIZE = 4_MiB;
|
||||
constexpr u64 TEXTURE_BUFFER_SIZE = 2_MiB;
|
||||
|
||||
constexpr vk::BufferUsageFlags BUFFER_USAGE =
|
||||
vk::BufferUsageFlagBits::eVertexBuffer | vk::BufferUsageFlagBits::eIndexBuffer;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#include "common/literals.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "video_core/custom_textures/material.h"
|
||||
@@ -35,6 +36,7 @@ using VideoCore::MapType;
|
||||
using VideoCore::PixelFormat;
|
||||
using VideoCore::SurfaceType;
|
||||
using VideoCore::TextureType;
|
||||
using namespace Common::Literals;
|
||||
|
||||
struct RecordParams {
|
||||
vk::ImageAspectFlags aspect;
|
||||
@@ -244,8 +246,8 @@ vk::ImageSubresourceRange MakeSubresourceRange(vk::ImageAspectFlags aspect, u32
|
||||
};
|
||||
}
|
||||
|
||||
constexpr u64 UPLOAD_BUFFER_SIZE = 512 * 1024 * 1024;
|
||||
constexpr u64 DOWNLOAD_BUFFER_SIZE = 16 * 1024 * 1024;
|
||||
constexpr u64 UPLOAD_BUFFER_SIZE = 512_MiB;
|
||||
constexpr u64 DOWNLOAD_BUFFER_SIZE = 16_MiB;
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user