Sponza repeats the albedo's format for its heap view; ImageVulkan does not keep its view create-info #176
Labels
No labels
claude:blocked
claude:done
claude:failed
claude:in-progress
claude:ready
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Graphics#176
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
examples/Sponza/main.cpp:178builds the view create-info for the albedo's heap descriptor withVK_FORMAT_R8G8B8A8_UNORM, repeating the format passed toalbedo.Createat:145. It has to, becauseImageVulkanneither stores its format nor keeps the view create-info it builds (interfaces/Crafter.Graphics-ImageVulkan.cppm:149). Changing:145toVK_FORMAT_R8G8B8A8_SRGBfor correct albedo gamma without also changing:178makes the descriptor write invalid.ImageVulkan::Createnever setsMUTABLE_FORMAT, so a view must use the image's own format (VUID-VkImageViewCreateInfo-image-12397). Before6e94cc6, Sponza usedalbedo.imageView, derived from the single format.ImageVulkan::imageViewanddescriptor(:69-70) are no longer read anywhere. Separately,Create'sVkImageCreateFlags flagsparameter is written toimageInfo.usage(:121): it is a usage mask under the wrong name and type.Line numbers refer to
6e94cc6.Suggested fix
Keep the
VkImageViewCreateInfoonImageVulkanin place of the unreadimageViewanddescriptor, so a heap write passes.pView = &albedo.viewInfo, and rename the parameter to the usage it is.Found in a code review of the #163 change.