Fixed wrong extent.depth for 2D texture copies

This commit is contained in:
saschawillems 2016-03-25 23:27:29 +01:00
parent 8ab69b84e0
commit 6ff6cd4b59

View file

@ -68,7 +68,7 @@ namespace vkTools
// Load a 2D texture // Load a 2D texture
void loadTexture(std::string filename, VkFormat format, VulkanTexture *texture, bool forceLinear) void loadTexture(std::string filename, VkFormat format, VulkanTexture *texture, bool forceLinear)
{ {
loadTexture(filename, format, texture, false, VK_IMAGE_USAGE_SAMPLED_BIT); loadTexture(filename, format, texture, forceLinear, VK_IMAGE_USAGE_SAMPLED_BIT);
} }
// Load a 2D texture // Load a 2D texture
@ -230,7 +230,7 @@ namespace vkTools
copyRegion.extent.width = tex2D[level].dimensions().x; copyRegion.extent.width = tex2D[level].dimensions().x;
copyRegion.extent.height = tex2D[level].dimensions().y; copyRegion.extent.height = tex2D[level].dimensions().y;
copyRegion.extent.depth = 0; copyRegion.extent.depth = 1;
// Put image copy into command buffer // Put image copy into command buffer
vkCmdCopyImage( vkCmdCopyImage(