Consider this code snippet:
glBindTexture(GL_TEXTURE_2D, MAX_UINT);
glGenTextures(1, &tex);
In debug mode, there is an assert failure in HandleAllocator::allocate. In
Release mode, tex = 0 after glGenTextures, which is wrong.
The problem is inside HandleAllocator::reserve. If calling it with MAX_UINT,
mUnallocatedList is wrongly split into 2 elements: [0, MAX_UINT - 1] and [1,
MAX_UINT]. When glGen* is called, HandleAllocator::allocate returns the begin
of the first element, which is 0.
Original issue reported on code.google.com by mg...@microsoft.com on 29 Jun 2015 at 11:27
Original issue reported on code.google.com by
mg...@microsoft.com
on 29 Jun 2015 at 11:27