const struct build_id_note *note =
build_id_find_nhdr_for_addr(init_uuids);
if (!note) {
- return vk_errorf(device->instance,
+ return vk_errorf((struct v3dv_instance*) device->vk.instance,
VK_ERROR_INITIALIZATION_FAILED,
"Failed to find build-id");
}
unsigned build_id_len = build_id_length(note);
if (build_id_len < 20) {
- return vk_errorf(device->instance,
+ return vk_errorf((struct v3dv_instance*) device->vk.instance,
VK_ERROR_INITIALIZATION_FAILED,
"build-id too short. It needs to be a SHA");
}
if (result != VK_SUCCESS)
goto fail;
- device->instance = instance;
assert(drm_render_device);
const char *path = drm_render_device->nodes[DRM_NODE_RENDER];
return VK_SUCCESS;
}
- return vk_error(physical_device->instance, VK_ERROR_LAYER_NOT_PRESENT);
+ return vk_error((struct v3dv_instance*) physical_device->vk.instance,
+ VK_ERROR_LAYER_NOT_PRESENT);
}
static VkResult
VkDevice *pDevice)
{
V3DV_FROM_HANDLE(v3dv_physical_device, physical_device, physicalDevice);
- struct v3dv_instance *instance = physical_device->instance;
+ struct v3dv_instance *instance = (struct v3dv_instance*) physical_device->vk.instance;
VkResult result;
struct v3dv_device *device;
return vk_error(instance, VK_ERROR_INITIALIZATION_FAILED);
}
- device = vk_zalloc2(&physical_device->instance->vk.alloc, pAllocator,
+ device = vk_zalloc2(&physical_device->vk.instance->alloc, pAllocator,
sizeof(*device), 8,
VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
if (!device)
return vk_error(instance, VK_ERROR_OUT_OF_HOST_MEMORY);
result = vk_device_init(&device->vk, NULL, NULL, pCreateInfo,
- &physical_device->instance->vk.alloc, pAllocator);
+ &physical_device->vk.instance->alloc, pAllocator);
if (result != VK_SUCCESS) {
vk_free(&device->vk.alloc, device);
return vk_error(instance, result);
if (pAllocator)
device->vk.alloc = *pAllocator;
else
- device->vk.alloc = physical_device->instance->vk.alloc;
+ device->vk.alloc = physical_device->vk.instance->alloc;
pthread_mutex_init(&device->mutex, NULL);
result = wsi_device_init(&physical_device->wsi_device,
v3dv_physical_device_to_handle(physical_device),
v3dv_wsi_proc_addr,
- &physical_device->instance->vk.alloc,
+ &physical_device->vk.instance->alloc,
physical_device->master_fd, NULL, false);
if (result != VK_SUCCESS)
v3dv_wsi_finish(struct v3dv_physical_device *physical_device)
{
wsi_device_finish(&physical_device->wsi_device,
- &physical_device->instance->vk.alloc);
+ &physical_device->vk.instance->alloc);
}
void v3dv_DestroySurfaceKHR(