mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 02:41:49 -05:00
bind vertex buffers
This commit is contained in:
parent
89ff6909a9
commit
c24e3c23ff
2 changed files with 10 additions and 6 deletions
|
@ -93,14 +93,18 @@ void BufferCacheRuntime::BindQuadIndexBuffer(PrimitiveTopology topology, u32 fir
|
|||
// TODO: bind quad index buffer
|
||||
}
|
||||
|
||||
void BufferCacheRuntime::BindVertexBuffer(size_t stage, u32 index, MTL::Buffer* buffer, u32 offset,
|
||||
u32 size, u32 stride) {
|
||||
// TODO: use stride
|
||||
BindBuffer(stage, MAX_METAL_BUFFERS - index - 1, buffer, offset, size);
|
||||
void BufferCacheRuntime::BindVertexBuffer(u32 index, MTL::Buffer* buffer, u32 offset, u32 size,
|
||||
u32 stride) {
|
||||
// TODO: use stride?
|
||||
BindBuffer(0, MAX_METAL_BUFFERS - index - 1, buffer, offset, size);
|
||||
}
|
||||
|
||||
void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bindings) {
|
||||
// TODO: implement
|
||||
for (u32 index = 0; index < bindings.buffers.size(); ++index) {
|
||||
auto handle = bindings.buffers[index]->Handle();
|
||||
// TODO: set stride?
|
||||
BindVertexBuffer(index, handle, bindings.offsets[index], bindings.sizes[index], 0);
|
||||
}
|
||||
}
|
||||
|
||||
void BufferCacheRuntime::BindBuffer(size_t stage, u32 binding_index, MTL::Buffer* buffer,
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
|
||||
void BindQuadIndexBuffer(PrimitiveTopology topology, u32 first, u32 count);
|
||||
|
||||
void BindVertexBuffer(size_t stage, u32 index, MTL::Buffer* buffer, u32 offset, u32 size,
|
||||
void BindVertexBuffer(u32 index, MTL::Buffer* buffer, u32 offset, u32 size,
|
||||
u32 stride);
|
||||
|
||||
void BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bindings);
|
||||
|
|
Loading…
Reference in a new issue