Quick answer: SPIR-V Cross translating SSBO declared as uniform buffer instead? GLSL/HLSL/SPIR-V have different binding spaces - declare the SPIR-V correctly with storage_buffer decoration.

Compute shader's SSBO appears as a UBO on output; runtime fails to bind.

Use OpTypeStruct + StorageBuffer

SPIR-V intermediate: explicitly StorageBuffer decoration. spirv-cross emits as SSBO.

HLSL: use RWStructuredBuffer

HLSL maps RWStructuredBuffer to SSBO. ReadOnly maps to StructuredBuffer. Explicit; portable.

Verify via cross-cli

spirv-cross --output buffer.hlsl shader.spv

Inspect generated code. SSBO should be ByteAddressBuffer or RWStructuredBuffer; UBO is cbuffer.

“Buffer types in shaders are explicit. Mistyping is silent corruption.”

If your shader cross-compilation looks wrong, the buffer type declaration is the first thing to check. It's the most common confusion.

Related reading