[Mesa-dev] [RFC 1/3] anv: Initialize bo offsets to -1
Jason Ekstrand
jason at jlekstrand.net
Tue Nov 1 04:48:13 UTC 2016
---
src/intel/vulkan/anv_allocator.c | 1 +
src/intel/vulkan/anv_device.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index ae18f8e..97532ed 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -467,6 +467,7 @@ anv_block_pool_grow(struct anv_block_pool *pool, struct anv_block_state *state)
pool->bo.size = size;
pool->bo.map = map;
pool->bo.index = 0;
+ pool->bo.offset = -1;
done:
pthread_mutex_unlock(&pool->device->mutex);
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 37615ef..9adbbed 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1142,7 +1142,7 @@ anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, uint64_t size)
bo->map = NULL;
bo->index = 0;
- bo->offset = 0;
+ bo->offset = -1;
bo->size = size;
bo->is_winsys_bo = false;
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list