Lines Matching refs:scratch_bos
2022 for (unsigned i = 0; i < ARRAY_SIZE(device->scratch_bos); i++) in tu_CreateDevice()
2023 mtx_init(&device->scratch_bos[i].construct_mtx, mtx_plain); in tu_CreateDevice()
2098 for (unsigned i = 0; i < ARRAY_SIZE(device->scratch_bos); i++) { in tu_DestroyDevice()
2099 if (device->scratch_bos[i].initialized) in tu_DestroyDevice()
2100 tu_bo_finish(device, device->scratch_bos[i].bo); in tu_DestroyDevice()
2136 assert(index < ARRAY_SIZE(dev->scratch_bos)); in tu_get_scratch_bo()
2138 for (unsigned i = index; i < ARRAY_SIZE(dev->scratch_bos); i++) { in tu_get_scratch_bo()
2139 if (p_atomic_read(&dev->scratch_bos[i].initialized)) { in tu_get_scratch_bo()
2141 *bo = dev->scratch_bos[i].bo; in tu_get_scratch_bo()
2150 mtx_lock(&dev->scratch_bos[index].construct_mtx); in tu_get_scratch_bo()
2155 if (dev->scratch_bos[index].initialized) { in tu_get_scratch_bo()
2156 mtx_unlock(&dev->scratch_bos[index].construct_mtx); in tu_get_scratch_bo()
2157 *bo = dev->scratch_bos[index].bo; in tu_get_scratch_bo()
2162 VkResult result = tu_bo_init_new(dev, &dev->scratch_bos[index].bo, bo_size, in tu_get_scratch_bo()
2165 mtx_unlock(&dev->scratch_bos[index].construct_mtx); in tu_get_scratch_bo()
2169 p_atomic_set(&dev->scratch_bos[index].initialized, true); in tu_get_scratch_bo()
2171 mtx_unlock(&dev->scratch_bos[index].construct_mtx); in tu_get_scratch_bo()
2173 *bo = dev->scratch_bos[index].bo; in tu_get_scratch_bo()