Descriptioncommand_buffer: Implement IdAllocator by recording ranges
Implement IdAllocator by storing complete id ranges of (min,max) in the
map instead of just ids. This should make allocating big amount of ids
scale a bit better.
Store a range by creating a mapping first id -> last id. Upon query of
id existence, find the lowest_bound with the id interested. The hit will
be found at the returned iterator position (range starts at the id) or
the position before (range starts before the id and expands to cover
it).
Changes the allocation results so that even though client has requested
AllocateIdAtOrAbove(high_id_number), the next AllocateId() will allocate
lowest available id (instead of lowest available after
high_id_number). This is why GLES2ImplementationTest::kBuffersStartId
changes.
BUG=344330
Committed: https://crrev.com/04747ceb17fa2d7ed457e59faee01218257d9abb
Cr-Commit-Position: refs/heads/master@{#318663}
Patch Set 1 #Patch Set 2 : rebase #
Total comments: 7
Patch Set 3 : address review comments #Patch Set 4 : rebase #
Messages
Total messages: 19 (4 generated)
|