Initial layout barrier was not submitted
This commit is contained in:
parent
779739fa45
commit
a72df2bec9
2 changed files with 12 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ if %ERRORLEVEL% EQU 0 (
|
||||||
xcopy "..\..\data\shaders\computeshader\*.spv" "assets\shaders\computeshader" /Y
|
xcopy "..\..\data\shaders\computeshader\*.spv" "assets\shaders\computeshader" /Y
|
||||||
|
|
||||||
mkdir "assets\textures"
|
mkdir "assets\textures"
|
||||||
xcopy "..\..\data\textures\igor_and_pal_rgba.ktx" "assets\textures" /Y
|
xcopy "..\..\data\textures\vulkan_space_rgba8.ktx" "assets\textures" /Y
|
||||||
|
|
||||||
|
|
||||||
mkdir "res\drawable"
|
mkdir "res\drawable"
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public:
|
||||||
// Compute pipelines are separated from
|
// Compute pipelines are separated from
|
||||||
// graphics pipelines in Vulkan
|
// graphics pipelines in Vulkan
|
||||||
std::vector<VkPipeline> compute;
|
std::vector<VkPipeline> compute;
|
||||||
uint32_t computeIndex = 1;
|
uint32_t computeIndex = 0;
|
||||||
} pipelines;
|
} pipelines;
|
||||||
|
|
||||||
int vertexBufferSize;
|
int vertexBufferSize;
|
||||||
|
|
@ -147,8 +147,16 @@ public:
|
||||||
err = vkBindImageMemory(device, tex->image, tex->deviceMemory, 0);
|
err = vkBindImageMemory(device, tex->image, tex->deviceMemory, 0);
|
||||||
assert(!err);
|
assert(!err);
|
||||||
|
|
||||||
tex->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
VkCommandBuffer layoutCmd = VulkanExampleBase::createCommandBuffer(VK_COMMAND_BUFFER_LEVEL_PRIMARY, true);
|
||||||
vkTools::setImageLayout(setupCmdBuffer, tex->image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_UNDEFINED, tex->imageLayout);
|
|
||||||
|
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
|
// Create sampler
|
||||||
VkSamplerCreateInfo sampler = vkTools::initializers::samplerCreateInfo();
|
VkSamplerCreateInfo sampler = vkTools::initializers::samplerCreateInfo();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue