I've been structuring my low-level renderer for my little d3d11 framework. Here is how I plan on setting constantbuffers. Can you see if I am doing something wrong here? This is part of a stateless renderer.void Graphics::SetConstantBuffers(uint32_t inStartSlot, const std::vector<ConstantBufferBinding>& inBindings) {assert(m_Context);assert( inBindings.size() <= D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - inStartSlot);// reset statem_Context->VSSetConstantBuffers(0, 0, nullptr);m_Context->PSSetConstantBuffers(0, 0, nullptr);m_Context->GSSetConstantBuffers(0, 0, nullptr);m_Context->DSSetConstantBuffers(0, 0, nullptr);m_Context->HSSetConstantBuffers(0, 0, nullptr);m_Context->CSSetConstantBuffers(0, 0, nullptr);uint32_t num_buffers = (uint32_t)inBindings.size();uint32_t slot_offset = 0;for (uint32_t i = 0; i < num_buffers; ++i) {    EShaderType stage = inBindings[i].ShaderStage;    ConstantBuffer* buffer = inBindings[i].Buffer;    if (buffer && buffer->m_Buffer) {                   if (flags(stage & EShaderType::SHADER_TYPE_VERTEX)) {            m_Context->VSSetConstantBuffers(inStartSlot + slot_offset, 1, &buffer->m_Buffer);        }        if (flags(stage & EShaderType::SHADER_TYPE_PIXEL)) {            m_Context->PSSetConstantBuffers(inStartSlot + slot_offset, 1, &buffer->m_Buffer);        }        if (flags(stage & EShaderType::SHADER_TYPE_GEOMETRY)) {            m_Context->GSSetConstantBuffers(inStartSlot + slot_offset, 1, &buffer->m_Buffer);        }        if (flags(stage & EShaderType::SHADER_TYPE_DOMAIN)) {            m_Context->DSSetConstantBuffers(inStartSlot + slot_offset, 1, &buffer->m_Buffer);        }        if (flags(stage & EShaderType::SHADER_TYPE_HULL)) {            m_Context->HSSetConstantBuffers(inStartSlot + slot_offset, 1, &buffer->m_Buffer);        }        if (flags(stage & EShaderType::SHADER_TYPE_COMPUTE)) {            m_Context->CSSetConstantBuffers(inStartSlot + slot_offset, 1, &buffer->m_Buffer);        }        ++slot_offset;    }}}Each ConstantBufferBinding has an ID3D11Buffer instance and a shader stage field. I am not sure if I am handling the start slots correctly though.
SetConstantBuffers wrapper
c++;graphics