Handmade Hero » Forums » Code » I think there is a mistake in a code path that probably never comes up in the code from Day 507
Ryan1729
2 posts
#21666 I think there is a mistake in a code path that probably never comes up in the code from Day 507
2 weeks, 3 days ago Edited by Ryan1729 on Sept. 28, 2019, 1:02 a.m. Reason: code -> m

I'm talking about the code added here, specifically the Queue->TransferMemoryLastUsed == Queue->TransferMemoryFirstUsed check. I suspect that there should be an else after that if, because otherwise, if the inner if is taken, SizeAvailable is immediately overwritten in the following else case. I think this is working in practice since the textures never actually fit perfectly into the transfer memory buffer, and in the initial case where the renderer_texture_queue is zeroed, we happen to get the right answer for SizeAvailable in the else case since MemoryAt is 0. If the texture sizes line up perfectly, then I think there would be issues.
mrmixer
Simon Anciaux
673 posts
#21683 I think there is a mistake in a code path that probably never comes up in the code from Day 507
2 weeks, 1 day ago

It will be fixed in day 536.