Structure stride can not be larger than the buffer size. Arg_ParamName_Name

When initializing a StructuredBuffer of size 511967232 everything works fine, but when initializing a StructuredBuffer of size 1024000000 I get an error message of type “Structure stride can not be larger than the buffer size. Arg_ParamName_Name” whenever I try to call SetData.

The arguments must be correct, because it doesnt throw this exception when initializing it with 511967232 elements. It cant be a device issue too, because I have 6 gb vram.

Is it a directx limitation?

Limit for most buffers (with exception of constant buffers where is limit way smaller) is usually 1/4 of Vram. For details consult Resource Limits (Direct3D 11) - Win32 apps | Microsoft Learn