anv/event: Use a 64-bit value
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 12 Feb 2016 02:57:37 +0000 (18:57 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 12 Feb 2016 03:00:56 +0000 (19:00 -0800)
The immediate write from PIPE_CONTROL is 64-bits at least on BDW.  This
used to work on 64-bit archs because the compiler would align the following
anv_state struct up for us.  However, in 32-bit builds, they overlap and it
causes problems.

src/vulkan/anv_device.c
src/vulkan/anv_private.h

index 6f874b2d1abc1d9e6197bd6abec7c8604fc86319..21184c4a2018f6308c701e5ad46697ebd565378e 100644 (file)
@@ -1534,7 +1534,7 @@ VkResult anv_CreateEvent(
    assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_EVENT_CREATE_INFO);
 
    state = anv_state_pool_alloc(&device->dynamic_state_pool,
-                                sizeof(*event), 4);
+                                sizeof(*event), 8);
    event = state.map;
    event->state = state;
    event->semaphore = VK_EVENT_RESET;
index 29d3c82b9b991c6e734e4dee83d41a5aedc0ec80..6da714ad8b269dd03299bacfaf87517f4bb4cb8d 100644 (file)
@@ -1306,7 +1306,7 @@ struct anv_fence {
 };
 
 struct anv_event {
-   uint32_t                                     semaphore;
+   uint64_t                                     semaphore;
    struct anv_state                             state;
 };