From 2554425bae9e23d87f534201331a1ffb416ec783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sat, 17 Aug 2019 09:51:50 -0700 Subject: [PATCH] Cleanup. --- src/renderer_vk.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 6e436ae53..021b7ba27 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -3579,16 +3579,15 @@ VK_IMPORT_DEVICE VkDescriptorBufferInfo bufferInfo[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; VkWriteDescriptorSet wds[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; bx::memSet(wds, 0, sizeof(VkWriteDescriptorSet) * BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - uint32_t wdsCount = 0; + uint32_t wdsCount = 0; uint32_t bufferCount = 0; - uint32_t imageCount = 0; + uint32_t imageCount = 0; for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) { const Binding& bind = renderBind.m_bind[stage]; if (kInvalidHandle != bind.m_idx) { - const Binding& bind = renderBind.m_bind[stage]; const ShaderVK::BindInfo* bindInfo = NULL; if (isValid(program.m_vsh->m_bindInfo[stage].uniformHandle)) { @@ -3600,7 +3599,9 @@ VK_IMPORT_DEVICE } if (NULL == bindInfo) + { continue; + } if (ShaderVK::BindType::Storage == bindInfo->type) { @@ -3640,6 +3641,7 @@ VK_IMPORT_DEVICE { texture.setImageMemoryBarrier(m_commandBuffer, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); } + imageInfo[imageCount].imageLayout = texture.m_currentImageLayout; imageInfo[imageCount].imageView = VK_NULL_HANDLE != texture.m_textureImageStorageView ? texture.m_textureImageStorageView @@ -3667,6 +3669,7 @@ VK_IMPORT_DEVICE { texture.setImageMemoryBarrier(m_commandBuffer, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); } + imageInfo[imageCount].imageLayout = texture.m_currentImageLayout; imageInfo[imageCount].imageView = VK_NULL_HANDLE != texture.m_textureImageDepthView ? texture.m_textureImageDepthView