summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VKShader.cpp4
-rw-r--r--Source/Core/VideoBackends/Vulkan/VKTexture.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKShader.cpp b/Source/Core/VideoBackends/Vulkan/VKShader.cpp
index 9132085748..914fc0c8e4 100644
--- a/Source/Core/VideoBackends/Vulkan/VKShader.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VKShader.cpp
@@ -138,8 +138,8 @@ std::unique_ptr<VKShader> VKShader::CreateFromSource(ShaderStage stage, std::str
std::unique_ptr<VKShader> VKShader::CreateFromBinary(ShaderStage stage, const void* data,
size_t length, std::string_view name)
{
- const size_t size_in_words = Common::AlignUp(length, sizeof(ShaderCompiler::SPIRVCodeType)) /
- sizeof(ShaderCompiler::SPIRVCodeType);
+ const size_t size_in_words =
+ Common::DivideRoundingUp(length, sizeof(ShaderCompiler::SPIRVCodeType));
ShaderCompiler::SPIRVCodeVector spv(size_in_words);
if (length > 0)
std::memcpy(spv.data(), data, length);
diff --git a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp
index ee6a1b77b3..ea7472597b 100644
--- a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp
@@ -378,7 +378,7 @@ void VKTexture::Load(u32 level, u32 width, u32 height, u32 row_length, const u8*
// that lie outside of the texture's dimensions.
const u32 upload_alignment = static_cast<u32>(g_vulkan_context->GetBufferImageGranularity());
const u32 block_size = GetBlockSizeForFormat(GetFormat());
- const u32 num_rows = Common::AlignUp(height, block_size) / block_size;
+ const u32 num_rows = Common::DivideRoundingUp(height, block_size);
const u32 source_pitch = CalculateStrideForFormat(m_config.format, row_length);
const u32 upload_size = source_pitch * num_rows;
std::unique_ptr<StagingBuffer> temp_buffer;