mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix indexed through-mode drawing
This commit is contained in:
parent
ec6bc4a5f6
commit
4e6a9b8108
2 changed files with 6 additions and 2 deletions
|
@ -475,6 +475,7 @@ void DrawEngineVulkan::DoFlush(VkCommandBuffer cmd) {
|
|||
VulkanVertexShader *vshader;
|
||||
VulkanFragmentShader *fshader;
|
||||
|
||||
// TODO: Keep these between calls if not dirty.
|
||||
uint32_t baseUBOOffset = 0;
|
||||
uint32_t lightUBOOffset = 0;
|
||||
uint32_t boneUBOOffset = 0;
|
||||
|
@ -616,7 +617,7 @@ void DrawEngineVulkan::DoFlush(VkCommandBuffer cmd) {
|
|||
VkBuffer buf[1] = { frame->pushData->GetVkBuffer() };
|
||||
VkDeviceSize offsets[1] = { vbOffset };
|
||||
if (drawIndexed) {
|
||||
ibOffset = (uint32_t)frame->pushData->Push(decIndex, 2 * indexGen.VertexCount());
|
||||
ibOffset = (uint32_t)frame->pushData->Push(inds, 2 * numTrans);
|
||||
// TODO: Have a buffer per frame, use a walking buffer pointer
|
||||
// TODO: Avoid rebinding if the vertex size stays the same by using the offset arguments
|
||||
vkCmdBindVertexBuffers(cmd_, 0, 1, buf, offsets);
|
||||
|
|
|
@ -438,10 +438,13 @@ public:
|
|||
writePtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
size_t Allocate(size_t numBytes) {
|
||||
size_t out = offset_;
|
||||
offset_ += (numBytes + 3) & ~3; // Round up to 4 bytes.
|
||||
if (offset_ >= size_) {
|
||||
// For now
|
||||
DebugBreak();
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue