Results 1 to 2 of 2

Thread: vkUpdateDescriptorSets never returns

  1. #1
    Junior Member Newbie Haiiro no Jiren's Avatar
    Join Date
    Apr 2018
    Location
    Indonesia
    Posts
    22

    vkUpdateDescriptorSets never returns

    I've checked through debugger that vkUpdateDescriptorSets on second times never returns. There's no validation error given. The application just hang not responding.I think i've done everthings right.

    Here's the code
    Code :
    void DeferredSubpassesApplication::OnResize()
    {
    	CHECK_VK_RESULT_2(vkDeviceWaitIdle(mpDeviceContext->GetVkDevice()));
     
    	mSwapchainContext.ReSize(mSurfaceKHR, VK_PRESENT_MODE_MAILBOX_KHR);
     
    	mDepthTexture.Purge();
    	mGBuffer.diffuse.Purge();
    	mGBuffer.specular.Purge();
    	mGBuffer.position.Purge();
    	mGBuffer.normal.Purge();
     
    	mDeferredRenderPass.DestroyFramebuffers(mDeferredFramebuffers);
     
    	float aspectRatio = (float)mSwapchainContext.GetVkExtent2D().width / (float)mSwapchainContext.GetVkExtent2D().height;
     
    	mFlyingCamera.Perspective(45.0F, aspectRatio, 0.1f, 1000.0f);
     
    	CreateRenderTextures();
     
    	VkWriteDescriptorSet writeSets[4];
     
    	VkDescriptorImageInfo descriptorImageInfo[4] = {};
    	descriptorImageInfo[0].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
    	descriptorImageInfo[0].imageView = mGBuffer.position.GetVkImageView();
     
    	descriptorImageInfo[1].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
    	descriptorImageInfo[1].imageView = mGBuffer.normal.GetVkImageView();
     
    	descriptorImageInfo[2].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
    	descriptorImageInfo[2].imageView = mGBuffer.diffuse.GetVkImageView();
     
    	descriptorImageInfo[3].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
    	descriptorImageInfo[3].imageView = mGBuffer.specular.GetVkImageView();
     
    	writeSets[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
    	writeSets[0].dstSet = mGBufferSet;
    	writeSets[0].dstBinding = 0;
    	writeSets[0].descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT;
    	writeSets[0].pImageInfo = &descriptorImageInfo[0];
    	writeSets[0].descriptorCount = 1;
     
    	writeSets[1].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
    	writeSets[1].dstSet = mGBufferSet;
    	writeSets[1].dstBinding = 1;
    	writeSets[1].descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT;
    	writeSets[1].pImageInfo = &descriptorImageInfo[1];
    	writeSets[1].descriptorCount = 1;
     
    	writeSets[2].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
    	writeSets[2].dstSet = mGBufferSet;
    	writeSets[2].dstBinding = 2;
    	writeSets[2].descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT;
    	writeSets[2].pImageInfo = &descriptorImageInfo[2];
    	writeSets[2].descriptorCount = 1;
     
    	writeSets[3].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
    	writeSets[3].dstSet = mGBufferSet;
    	writeSets[3].dstBinding = 3;
    	writeSets[3].descriptorType = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT;
    	writeSets[3].pImageInfo = &descriptorImageInfo[3];
    	writeSets[3].descriptorCount = 1;
     
    	vkUpdateDescriptorSets(mpDeviceContext->GetVkDevice(), 4, writeSets, 0, nullptr) ; // It stuck here
     
    	PopulateCommandBuffers();
    }
    Last edited by Haiiro no Jiren; 10-27-2018 at 10:07 PM.

  2. #2
    Junior Member Newbie Haiiro no Jiren's Avatar
    Join Date
    Apr 2018
    Location
    Indonesia
    Posts
    22
    Sorry for late reply. It turns out I forgot to initialize VkWriteDescriptorSet writeSets[4]

Similar Threads

  1. Replies: 2
    Last Post: 03-30-2017, 12:16 PM
  2. Question about vkUpdateDescriptorSets
    By MattScarpino in forum Vulkan
    Replies: 1
    Last Post: 09-15-2016, 01:15 PM
  3. textureCube always returns 0
    By imported_Silverlan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-18-2014, 12:24 PM
  4. glMapBufferRange always returns 0
    By Fitz in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-29-2009, 01:41 AM
  5. glCreateShader returns 0.
    By Manux in forum OpenGL: GLSL
    Replies: 8
    Last Post: 01-12-2009, 07:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean