vblanco20-1 / vkguide-comments

Storage for the comments of vulkan-guide
0 stars 0 forks source link

Chapter 5 Comments #9

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

5. Textures - Vulkan Guide

Practical guide to vulkan graphics programming

https://www.vkguide.dev/docs/chapter_5

warriormaster12 commented 3 years ago

[ERROR: Validation] Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter ] Object 0: handle = 0x5559fa79b9b0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xc7e70075 | Invalid VkDescriptorSet Object 0x5559f973c7da. The Vulkan spec states: pDescriptorSets must be a valid pointer to an array of descriptorSetCount valid VkDescriptorSet handles (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-parameter) [ERROR: Validation] Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidSet ] Object 0: handle = 0x5559f973c7da, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; | MessageID = 0xcc33a521 | vkCmdBindDescriptorSets(): Attempt to bind VkDescriptorSet 0x5559f973c7da[] that doesn't exist! [ERROR: Validation] Validation Error: [ VUID-vkCmdBindDescriptorSets-firstSet-00360 ] Object 0: handle = 0x5559facfe4f0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x1893ae29 | vkCmdBindDescriptorSets(): Sum of firstSet (2) and descriptorSetCount (1) is greater than VkPipelineLayoutCreateInfo::setLayoutCount (2) when pipeline layout was created The Vulkan spec states: The sum of firstSet and descriptorSetCount must be less than or equal to VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-firstSet-00360) [ERROR: Validation] Validation Error: [ UNASSIGNED-Threading-Info ] Object 0: handle = 0x5559f973c7da, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; | MessageID = 0x5d6b67e2 | Couldn't find VkDescriptorSet Object 0x5559f973c7da. This should not happen and may indicate a bug in the application. Segmentation fault (core dumped)

How to fix this issue when trying to draw a texture on top of a model?

CarloWood commented 2 years ago

This page is a bit outdated. The use of VMA_MEMORY_USAGE_CPU_ONLY and VMA_MEMORY_USAGE_GPU_ONLY is deprecated. You should use VMA_MEMORY_USAGE_AUTO and set flags to a combination of one or more VmaAllocationCreateFlagBits.

OliverWei2019 commented 2 years ago

Notice the following declaration code: bool load_image_from_file(VulkanEngine& engine, const char file, AllocatedImage& outImage); If references(VulkanEngine& engine) are used here instead of pointer,then this code doesn't seem to work. engine._mainDeletionQueue.push_function( [=] () { vmaDestroyImage(engine._allocator, newImage._image, newImage._allocation);}); When I click the close window button, vma gives an error:"Assertion failed: 0 && "Unfreed dedicated allocations found."I use pointer(VulkanEngine engine) instead of references,and then modify the function definition,code worked fine.

jonathan-hopkins commented 2 years ago

The Loading Images section doesn't cleanup the image view. It needs to add the following to the deletion queue. vkDestroyImageView(_device, lostEmpire.imageView.image_view, nullptr);

chnoma commented 1 year ago

Is there a mention of texturedPipeLayout prior to the setup? I'm not really sure how to get past that, since it seems dependent on later steps.

tuket commented 11 months ago

I think this article is confusing image layouts with image tilings