From d762324659ad2ffdb2256c9ef4c90139c8149bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Thu, 30 Jun 2022 10:39:13 +0200 Subject: [PATCH] vulkan: texture upload fix #478 --- WickedEngine/wiGraphicsDevice_Vulkan.cpp | 4 ++-- WickedEngine/wiVersion.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.cpp b/WickedEngine/wiGraphicsDevice_Vulkan.cpp index 22f9219cd..943ff6415 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.cpp +++ b/WickedEngine/wiGraphicsDevice_Vulkan.cpp @@ -3868,8 +3868,8 @@ using namespace vulkan_internal; { const SubresourceData& subresourceData = initial_data[initDataIdx++]; const uint32_t block_size = GetFormatBlockSize(desc->format); - const uint32_t num_blocks_x = width / block_size; - const uint32_t num_blocks_y = height / block_size; + const uint32_t num_blocks_x = std::max(1u, width / block_size); + const uint32_t num_blocks_y = std::max(1u, height / block_size); const uint32_t dst_rowpitch = num_blocks_x * GetFormatStride(desc->format); const uint32_t dst_slicepitch = dst_rowpitch * num_blocks_y; const uint32_t src_rowpitch = subresourceData.row_pitch; diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 1e490e532..2729053ba 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 70; // minor bug fixes, alterations, refactors, updates - const int revision = 1; + const int revision = 2; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);