Skip to content

Cubemap layer count possibly incorrect for 05 Creating an image.cpp #18

@sohailshafii

Description

@sohailshafii

05 Creating an image.cpp uses the following for layer count, as provided to VkImageCreateInfo struct:

cubemap ? 6 * num_layers : num_layers

However when I run skybox example, I get the following error:

VUID-VkImageViewCreateInfo-viewType-02962(ERROR / SPEC): msgNum: -9134965 - Validation Error: [ VUID-VkImageViewCreateInfo-viewType-02962 ] Object 0: handle = 0x6e38110, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xff749c8b | vkCreateImageView(): subresourceRange.layerCount VK_REMAINING_ARRAY_LAYERS=(36) must be 6 The Vulkan spec states: If viewType is VK_IMAGE_VIEW_TYPE_CUBE and subresourceRange.layerCount is VK_REMAINING_ARRAY_LAYERS, the remaining number of layers must be 6 (https://vulkan.lunarg.com/doc/view/1.2.154.1/windows/1.2-extensions/vkspec.html#VUID-VkImageViewCreateInfo-viewType-02962)

This can be fixed by changing the number of layers provided to just numLayers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions