mojira.dev
MC-307647

Vulkan: crash on startup with validation layer enabled — NORMAL vertex attribute uses a format without guaranteed VERTEX_BUFFER_BIT support

On the Vulkan backend, compiling any pipeline whose VertexFormat contains the NORMAL element fails validation:

vkCreateGraphicsPipelines(): pCreateInfos[0].pVertexInputState->pVertexAttributeDescriptions->format (VK_FORMAT_R8G8B8_SNORM)
doesn't support VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT. (supported bufferFeatures: VkFormatFeatureFlags2(0)).
at com.mojang.blaze3d.vulkan.VulkanRenderPipeline.compile(VulkanRenderPipeline.java:180)

If the Vulkan validation layer is enabled, this crashes the game at startup, since the validation layer reports the violation as a fatal error during early pipeline precompilation.

One possible fix would be to use VK_FORMAT_R8G8B8A8_SNORM instead of VK_FORMAT_R8G8B8_SNORM

see https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-required

Note: Even if there is no proof, this could cause the game to crash on GPUs that rely on the strict Vulkan specification.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Lolo

(Unassigned)

Unconfirmed

(Unassigned)

26.2 Snapshot 3

Retrieved