summaryrefslogtreecommitdiff
path: root/tools/gfx
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-01-19 09:10:15 -0800
committerGitHub <noreply@github.com>2021-01-19 09:10:15 -0800
commitc6fd4a5b35911f0f056f6e924a2dbc86e328cc46 (patch)
treef89f84633ab9c66a8a96c87ae77e6c47e4ab6a29 /tools/gfx
parent1296c7bb55b14db24308f31cacdda7f7a71fc937 (diff)
Make `ShaderCursor` no longer depend on core. (#1661)
Diffstat (limited to 'tools/gfx')
-rw-r--r--tools/gfx/vulkan/render-vk.cpp12
1 files changed, 6 insertions, 6 deletions
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,