Quick answer: Vulkan ray tracing SBT stride mismatch causing wrong shaders to fire? SBT stride must align to physicalDevice's shaderGroupHandleAlignment - compute carefully.

Trace dispatch hits wrong miss shaders; validation reports stride mismatch.

Align stride

uint32_t stride = align(handleSize, alignment);

Stride matches device's requirement; SBT works.

Or use a helper library

Vulkan-Hpp has SBT helpers. Less error-prone.

Profile per device

Each shipping GPU's alignment requirements. Validate.

“SBT alignment is device-specific. Generic stride assumption breaks.”

If you ship ray tracing, the per-device SBT alignment is mandatory. Document.

Related reading