Hi,
here is what I am trying to do, which is just to create a structured buffer.
D3D11_BUFFER_DESC sb_desc;
sb_desc.ByteWidth = stride * numElements;
sb_desc.Usage = D3D11_USAGE_DEFAULT;
sb_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS;
sb_desc.CPUAccessFlags = 0;
sb_desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
sb_desc.MiscFlags |= drawIndirect ? D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS : 0;
sb_desc.StructureByteStride = stride;
DXCall( device->CreateBuffer( &sb_desc, NULL, &sb ) );
It fails every time, and if I remove the D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS flag, the error goes away.
I've tried different parameters but no luck at this point.
Any help is appreciated.