KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
748 stars 400 forks source link

BestPractices-PushConstants is reported for wrong command #8262

Open StefanPoelloth opened 2 months ago

StefanPoelloth commented 2 months ago

Environment:

My renderer uses multiple dispatches and draws, one vkCmdDispatchIndirect uses push constants but doesnt write the whole pushconstants range. The vkCmdDrawIndexedIndirectCount after the vkCmdDispatchIndirect reports the problem.

After multiple vkCmdDispatchIndirect/vkCmdDispatch/vkCmdDrawIndexedIndirectCount calls the following commands happen:

Expected behavior The validation warning should be reported for the vkCmdDispatchIndirect call.

Valid Usage ID validation layer: Validation Warning: [ BestPractices-PushConstants ] Object 0: handle = 0x23d61103790, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x1248c6a4 | vkCmdDrawIndexedIndirectCount(): Pipeline uses push constants with 104 bytes, but byte 88 was never set with vkCmdPushConstants.

spencer-lunarg commented 2 months ago

we have tests that use both graphics/compute for normal core validation, but seem to be missing any for Best Practice :disappointed: