Mesa (master): anv: Initialize anv_bo::offset to -1

Jason Ekstrand jekstrand at kemper.freedesktop.org
Wed Nov 9 19:32:24 UTC 2016


Module: Mesa
Branch: master
Commit: d46bfb629725a5b8c327f3bd7f76d04f5ae262aa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d46bfb629725a5b8c327f3bd7f76d04f5ae262aa

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Mon Oct 31 20:25:08 2016 -0700

anv: Initialize anv_bo::offset to -1

Since -1 is an invalid GPU address, this lets us know whether or not we
have a valid address for a buffer.  We don't get a valid address until the
first time that buffer is used in an execbuf2 ioctl.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Cc: "13.0" <mesa-stable at lists.freedesktop.org>

---

 src/intel/vulkan/anv_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 7a661d2..f32058a 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -275,7 +275,7 @@ anv_bo_init(struct anv_bo *bo, uint32_t gem_handle, uint64_t size)
 {
    bo->gem_handle = gem_handle;
    bo->index = 0;
-   bo->offset = 0;
+   bo->offset = -1;
    bo->size = size;
    bo->map = NULL;
    bo->is_winsys_bo = false;




More information about the mesa-commit mailing list