[Fix] (MG_State/BufferState, VertexArrayState): Correct IBO binding slot.

This commit is contained in:
BZLZHH
2025-08-03 18:56:50 +08:00
parent 972a4efed1
commit 3d18e702b0
13 changed files with 168 additions and 61 deletions
@@ -3,6 +3,21 @@
namespace MobileGL {
namespace MG_State {
namespace GLState {
constexpr const auto GlobalBufferTargets = ToArray(
BufferTarget::Vertex,
BufferTarget::Uniform,
BufferTarget::CopyRead,
BufferTarget::CopyWrite,
BufferTarget::PixelPack,
BufferTarget::PixelUnpack,
BufferTarget::Query,
BufferTarget::Texture,
BufferTarget::TransformFeedback,
BufferTarget::AtomicCounter,
BufferTarget::DispatchIndirect,
BufferTarget::DrawIndirect,
BufferTarget::ShaderStorage);
class BufferState {
public:
BufferState();
@@ -18,7 +33,7 @@ namespace MobileGL {
private:
UnorderedMap<Uint, SharedPtr<BufferObject>> m_bufferObjects;
IndexGenerator<Uint> m_indexGenerator;
Array<BindingSlot<BufferObject>, (SizeT)BufferTarget::BufferTargetCount> m_bindingSlots;
Array<BindingSlot<BufferObject>, GlobalBufferTargets.size()> m_bindingSlots;
};
}
}