Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Writing to swap chain VKImage from compute shader

$
0
0

Hi,

I'm new to Vulkan, so go easy on me. I'm trying to write to a swapchain image from a compute shader, with partial luck. 

The swap chain was created with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT

The strange thing is that it's actually working fine, but I get the following validation layer error:

 [ VUID-VkDescriptorImageInfo-imageLayout-00344 ] Object: 0x265576ec8c0 (Type = 6) | vkCmdDispatch(): Cannot use VkImage 0xaff08a000000006f[] (layer=0 mip=0) with specific layout VK_IMAGE_LAYOUT_GENERAL that doesn't match the previous known layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL. The Vulkan spec states: imageLayout must match the actual VkImageLayout of each subresource accessible from imageView at …


Viewing all articles
Browse latest Browse all 17560

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>