summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_allocator.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-04-26 02:28:24 -0700
committerJason Ekstrand <[email protected]>2017-05-04 19:07:54 -0700
commit01170df262d63c7a67150f21a646d5d34d84782d (patch)
tree8bd14b74be6c2027dff490f3a066f34c1d6da6a4 /src/intel/vulkan/anv_allocator.c
parentbcc5d0defb992232155969314618714c63d6ccad (diff)
anv/allocator: Rework a comment
This commit just fixes up the English a bit and re-flows the comment. Reviewed-by: Juan A. Suarez Romero <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r--src/intel/vulkan/anv_allocator.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index e90689d7f09..7532c406eef 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -566,10 +566,11 @@ anv_block_pool_alloc_new(struct anv_block_pool *pool,
assert(pool->map);
return state.next;
} else if (state.next == state.end) {
- /* We allocated the first block outside the pool, we have to grow it.
- * pool_state->next acts a mutex: threads who try to allocate now will
- * get block indexes above the current limit and hit futex_wait
- * below. */
+ /* We allocated the first block outside the pool so we have to grow
+ * the pool. pool_state->next acts a mutex: threads who try to
+ * allocate now will get block indexes above the current limit and
+ * hit futex_wait below.
+ */
new.next = state.next + block_size;
new.end = anv_block_pool_grow(pool, pool_state, block_size);
old.u64 = __sync_lock_test_and_set(&pool_state->u64, new.u64);