Register
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
2 posts
I think there is a mistake in a code path that probably never comes up in the code from Day 507
3 weeks, 5 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.
Simon Anciaux
675 posts
I think there is a mistake in a code path that probably never comes up in the code from Day 507
3 weeks, 2 days ago
It will be fixed in day 536.