Skip to content

parameter pDescriptorWrites[0].descriptorCount must be greater than 0. The Vulkan spec states: descriptorCount must be greater than 0 #3

@AntonioNoack

Description

@AntonioNoack

Full error:

ERROR OCCURRED: Validation Error: [ VUID-VkWriteDescriptorSet-descriptorCount-arraylength ] Object 0: handle = 0x1a27e678e80, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x110c6099 | vkUpdateDescriptorSets: parameter pDescriptorWrites[0].descriptorCount must be greater than 0. The Vulkan spec states: descriptorCount must be greater than 0 (https://vulkan.lunarg.com/doc/view/1.3.216.0/windows/1.3-extensions/vkspec.html#VUID-VkWriteDescriptorSet-descriptorCount-arraylength)

The solution is to set .descriptorCount(1) in DescriptorSet.kt (or DescriptorSet.java, both have this bug) in updateDescriptorBuffer() and updateDescriptorImageBuffer().

Then the sample world renders fine :)

  • except when you leave the region of the ocean
  • except when you go under water
  • except from the FPS, only the first digit is correctly shown
  • I get tons of validation errors, of the type
ERROR OCCURRED: Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0x27fdb645f30, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] command buffer VkCommandBuffer 0x27fdb645f30[] expects VkImage 0xc3699400000001c3[] (subresource: aspectMask 0x1 array layer 0, mip level 5) to be in layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_GENERAL.

and with VK_IMAGE_LAYOUT_UNDEFINED at the end.

Screenshot for FPS issue:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions