Initial layout barrier was not submitted
This commit is contained in:
parent
779739fa45
commit
a72df2bec9
2 changed files with 12 additions and 4 deletions
|
|
@ -57,7 +57,7 @@ public:
|
|||
// Compute pipelines are separated from
|
||||
// graphics pipelines in Vulkan
|
||||
std::vector<VkPipeline> compute;
|
||||
uint32_t computeIndex = 1;
|
||||
uint32_t computeIndex = 0;
|
||||
} pipelines;
|
||||
|
||||
int vertexBufferSize;
|
||||
|
|
@ -147,8 +147,16 @@ public:
|
|||
err = vkBindImageMemory(device, tex->image, tex->deviceMemory, 0);
|
||||
assert(!err);
|
||||
|
||||
tex->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
||||
vkTools::setImageLayout(setupCmdBuffer, tex->image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_UNDEFINED, tex->imageLayout);
|
||||
VkCommandBuffer layoutCmd = VulkanExampleBase::createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||
|
||||
tex->imageLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
vkTools::setImageLayout(
|
||||
layoutCmd, tex->image,
|
||||
VK_IMAGE_ASPECT_COLOR_BIT,
|
||||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
tex->imageLayout);
|
||||
|
||||
VulkanExampleBase::flushCommandBuffer(layoutCmd, queue, true);
|
||||
|
||||
// Create sampler
|
||||
VkSamplerCreateInfo sampler = vkTools::initializers::samplerCreateInfo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue