mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00: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
|
// TODO: bind quad index buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferCacheRuntime::BindVertexBuffer(size_t stage, u32 index, MTL::Buffer* buffer, u32 offset,
|
void BufferCacheRuntime::BindVertexBuffer(u32 index, MTL::Buffer* buffer, u32 offset, u32 size,
|
||||||
u32 size, u32 stride) {
|
u32 stride) {
|
||||||
// TODO: use stride
|
// TODO: use stride?
|
||||||
BindBuffer(stage, MAX_METAL_BUFFERS - index - 1, buffer, offset, size);
|
BindBuffer(0, MAX_METAL_BUFFERS - index - 1, buffer, offset, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bindings) {
|
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,
|
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 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);
|
u32 stride);
|
||||||
|
|
||||||
void BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bindings);
|
void BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bindings);
|
||||||
|
|
Loading…
Reference in a new issue