@ -204,6 +204,7 @@ vkr_queue_create(struct vkr_context *ctx,
struct vkr_device * dev ,
struct vkr_device * dev ,
vkr_object_id id ,
vkr_object_id id ,
VkQueue handle ,
VkQueue handle ,
VkDeviceQueueCreateFlags flags ,
uint32_t family ,
uint32_t family ,
uint32_t index )
uint32_t index )
{
{
@ -211,7 +212,7 @@ vkr_queue_create(struct vkr_context *ctx,
int ret ;
int ret ;
LIST_FOR_EACH_ENTRY ( queue , & dev - > queues , head ) {
LIST_FOR_EACH_ENTRY ( queue , & dev - > queues , head ) {
if ( queue - > family = = family & & queue - > index = = index )
if ( queue - > flags = = flags & & queue - > f amily = = family & & queue - > index = = index )
return queue ;
return queue ;
}
}
@ -225,6 +226,7 @@ vkr_queue_create(struct vkr_context *ctx,
queue - > context = ctx ;
queue - > context = ctx ;
queue - > device = dev ;
queue - > device = dev ;
queue - > flags = flags ;
queue - > family = family ;
queue - > family = family ;
queue - > index = index ;
queue - > index = index ;
@ -282,8 +284,8 @@ vkr_dispatch_vkGetDeviceQueue(struct vn_dispatch_context *dispatch,
vn_replace_vkGetDeviceQueue_args_handle ( args ) ;
vn_replace_vkGetDeviceQueue_args_handle ( args ) ;
vkGetDeviceQueue ( args - > device , args - > queueFamilyIndex , args - > queueIndex , & handle ) ;
vkGetDeviceQueue ( args - > device , args - > queueFamilyIndex , args - > queueIndex , & handle ) ;
struct vkr_queue * queue =
struct vkr_queue * queue = vkr_queue_create ( ctx , dev , id , handle , 0 /* flags */ ,
vkr_queue_create ( ctx , dev , id , handle , args - > queueFamilyIndex , args - > queueIndex ) ;
args - > queueFamilyIndex , args - > queueIndex ) ;
/* TODO create queues with device and deal with failures there */
/* TODO create queues with device and deal with failures there */
if ( ! queue )
if ( ! queue )
vrend_printf ( " failed to create queue \n " ) ;
vrend_printf ( " failed to create queue \n " ) ;
@ -309,8 +311,8 @@ vkr_dispatch_vkGetDeviceQueue2(struct vn_dispatch_context *dispatch,
vkGetDeviceQueue2 ( args - > device , args - > pQueueInfo , & handle ) ;
vkGetDeviceQueue2 ( args - > device , args - > pQueueInfo , & handle ) ;
/* TODO deal with errors */
/* TODO deal with errors */
vkr_queue_create ( ctx , dev , id , handle , args - > pQueueInfo - > queueFamilyIndex ,
vkr_queue_create ( ctx , dev , id , handle , args - > pQueueInfo - > flags ,
args - > pQueueInfo - > queueIndex ) ;
args - > pQueueInfo - > queueFamilyIndex , args - > pQueueInfo - > queue Index ) ;
}
}
static void
static void