Set image usage flags from function parameter (fixex #175)
This commit is contained in:
parent
a8d3e74734
commit
830e9b75ea
1 changed files with 2 additions and 2 deletions
|
|
@ -181,7 +181,7 @@ namespace vkTools
|
|||
imageCreateInfo.arrayLayers = 1;
|
||||
imageCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
imageCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
imageCreateInfo.usage = imageUsageFlags;
|
||||
imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
|
||||
imageCreateInfo.extent = { texture->width, texture->height, 1 };
|
||||
|
|
@ -275,7 +275,7 @@ namespace vkTools
|
|||
imageCreateInfo.arrayLayers = 1;
|
||||
imageCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
imageCreateInfo.tiling = VK_IMAGE_TILING_LINEAR;
|
||||
imageCreateInfo.usage = (useStaging) ? VK_IMAGE_USAGE_TRANSFER_SRC_BIT : VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
imageCreateInfo.usage = imageUsageFlags;
|
||||
imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue