From c6fd4a5b35911f0f056f6e924a2dbc86e328cc46 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 19 Jan 2021 09:10:15 -0800 Subject: Make `ShaderCursor` no longer depend on core. (#1661) --- tools/gfx/vulkan/render-vk.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/gfx/vulkan/render-vk.cpp') diff --git a/tools/gfx/vulkan/render-vk.cpp b/tools/gfx/vulkan/render-vk.cpp index 382f12f85..4e43bf249 100644 --- a/tools/gfx/vulkan/render-vk.cpp +++ b/tools/gfx/vulkan/render-vk.cpp @@ -1723,8 +1723,8 @@ Result VKRenderer::createTextureResource(IResource::Usage initialUsage, const IT { const TextureResource::Size mipSize = desc.size.calcMipSize(j); - const int rowSizeInBytes = calcRowSize(desc.format, mipSize.width); - const int numRows = calcNumRows(desc.format, mipSize.height); + auto rowSizeInBytes = calcRowSize(desc.format, mipSize.width); + auto numRows = calcNumRows(desc.format, mipSize.height); mipSizes.add(mipSize); @@ -1754,8 +1754,8 @@ Result VKRenderer::createTextureResource(IResource::Usage initialUsage, const IT const auto& mipSize = mipSizes[j]; const ptrdiff_t srcRowStride = initData->mipRowStrides[j]; - const int dstRowSizeInBytes = calcRowSize(desc.format, mipSize.width); - const int numRows = calcNumRows(desc.format, mipSize.height); + auto dstRowSizeInBytes = calcRowSize(desc.format, mipSize.width); + auto numRows = calcNumRows(desc.format, mipSize.height); for (int k = 0; k < mipSize.depth; k++) { @@ -1787,8 +1787,8 @@ Result VKRenderer::createTextureResource(IResource::Usage initialUsage, const IT { const auto& mipSize = mipSizes[j]; - const int rowSizeInBytes = calcRowSize(desc.format, mipSize.width); - const int numRows = calcNumRows(desc.format, mipSize.height); + auto rowSizeInBytes = calcRowSize(desc.format, mipSize.width); + auto numRows = calcNumRows(desc.format, mipSize.height); // https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkBufferImageCopy.html // bufferRowLength and bufferImageHeight specify the data in buffer memory as a subregion of a larger two- or three-dimensional image, -- cgit v1.2.3