Jump to content
  • Advertisement
Sign in to follow this  
SimonCMax

Vulkan Vulkan - VkWriteDescriptorSet swap image texture? Not changing?

This topic is 626 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All,
  this is probably a simple problem, but not sure why it isn't working.
 
I'm modifying the pImageInfo on VkWriteDescriptorSet - to a new image - but it isn't changing
 
// Two descriptorImageInfos, with different images/views/samplers attached to them.
// 1. UpdateDescriptorSet (i.e., set a different descriptorImageInfo)
// 2. ReBuildCommandBuffers
 
However, the image doesn't swap?  Not sure why, I get a `flicker' - but the original first image stays on.  Not sure why my new image doesn't show up?
 
// e.g., 
VkWriteDescriptorSet wd[1];
memset(wd, 0, sizeof(wd));
wd[0].sType            = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
wd[0].dstSet           = descriptorSet;
wd[0].dstBinding       = 1;
wd[0].dstArrayElement  = 0; 
wd[0].descriptorCount  = 1;
wd[0].descriptorType   = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
wd[0].pImageInfo       = descriptorImageInfo; // swap this to a new descriptorImageInfo that is associated with the new image/sampler/imageview
wd[0].pBufferInfo      = NULL;
wd[0].pTexelBufferView = NULL;
 
vkUpdateDescriptorSets( device, 1, wd, 0, NULL );
 
BuildCommandBuffers();
 
 
...
 
Clear & Render()
 
 
 
Thanks for any help or ideas,
 
Simon
Edited by SimonCMax

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!