• Home
  • Raw
  • Download

Lines Matching full:events

86    if (!device->events.descriptor_set_layout) {  in create_event_pipelines()
88 * - 1 storage buffer for the BO with the events state. in create_event_pipelines()
110 &device->events.descriptor_set_layout); in create_event_pipelines()
116 if (!device->events.pipeline_layout) { in create_event_pipelines()
120 .pSetLayouts = &device->events.descriptor_set_layout, in create_event_pipelines()
130 &device->events.pipeline_layout); in create_event_pipelines()
141 if (!device->events.set_event_pipeline) { in create_event_pipelines()
145 device->events.pipeline_layout, in create_event_pipelines()
151 device->events.set_event_pipeline = pipeline; in create_event_pipelines()
154 if (!device->events.wait_event_pipeline) { in create_event_pipelines()
158 device->events.pipeline_layout, in create_event_pipelines()
164 device->events.wait_event_pipeline = pipeline; in create_event_pipelines()
175 v3dv_DestroyPipeline(_device, device->events.set_event_pipeline, in destroy_event_pipelines()
177 device->events.set_event_pipeline = VK_NULL_HANDLE; in destroy_event_pipelines()
179 v3dv_DestroyPipeline(_device, device->events.wait_event_pipeline, in destroy_event_pipelines()
181 device->events.wait_event_pipeline = VK_NULL_HANDLE; in destroy_event_pipelines()
183 v3dv_DestroyPipelineLayout(_device, device->events.pipeline_layout, in destroy_event_pipelines()
185 device->events.pipeline_layout = VK_NULL_HANDLE; in destroy_event_pipelines()
188 device->events.descriptor_set_layout, in destroy_event_pipelines()
190 device->events.descriptor_set_layout = VK_NULL_HANDLE; in destroy_event_pipelines()
198 list_addtail(&event->link, &device->events.free_list); in init_event()
210 * CTS has tests that require over 8192 active events (yes, really) so in v3dv_event_allocate_resources()
214 struct v3dv_bo *bo = v3dv_bo_alloc(device, bo_size, "events", true); in v3dv_event_allocate_resources()
220 device->events.bo = bo; in v3dv_event_allocate_resources()
227 /* Pre-allocate our events, each event requires 1 byte of BO storage */ in v3dv_event_allocate_resources()
228 device->events.event_count = bo_size; in v3dv_event_allocate_resources()
229 device->events.events = in v3dv_event_allocate_resources()
231 device->events.event_count * sizeof(struct v3dv_event), 8, in v3dv_event_allocate_resources()
233 if (!device->events.events) { in v3dv_event_allocate_resources()
238 list_inithead(&device->events.free_list); in v3dv_event_allocate_resources()
239 for (int i = 0; i < device->events.event_count; i++) in v3dv_event_allocate_resources()
240 init_event(device, &device->events.events[i], i); in v3dv_event_allocate_resources()
249 &device->events.buffer); in v3dv_event_allocate_resources()
264 device->events.mem = v3dv_device_memory_to_handle(mem); in v3dv_event_allocate_resources()
267 .buffer = device->events.buffer, in v3dv_event_allocate_resources()
268 .memory = device->events.mem, in v3dv_event_allocate_resources()
293 &device->events.descriptor_pool); in v3dv_event_allocate_resources()
300 .descriptorPool = device->events.descriptor_pool, in v3dv_event_allocate_resources()
302 .pSetLayouts = &device->events.descriptor_set_layout, in v3dv_event_allocate_resources()
305 &device->events.descriptor_set); in v3dv_event_allocate_resources()
310 .buffer = device->events.buffer, in v3dv_event_allocate_resources()
317 .dstSet = device->events.descriptor_set, in v3dv_event_allocate_resources()
336 if (device->events.bo) { in v3dv_event_free_resources()
337 v3dv_bo_free(device, device->events.bo); in v3dv_event_free_resources()
338 device->events.bo = NULL; in v3dv_event_free_resources()
341 if (device->events.events) { in v3dv_event_free_resources()
342 vk_free2(&device->vk.alloc, NULL, device->events.events); in v3dv_event_free_resources()
343 device->events.events = NULL; in v3dv_event_free_resources()
346 if (device->events.mem) { in v3dv_event_free_resources()
348 v3dv_device_memory_from_handle(device->events.mem)); in v3dv_event_free_resources()
349 device->events.mem = VK_NULL_HANDLE; in v3dv_event_free_resources()
353 device->events.buffer, NULL); in v3dv_event_free_resources()
354 device->events.buffer = VK_NULL_HANDLE; in v3dv_event_free_resources()
357 device->events.descriptor_pool, in v3dv_event_free_resources()
358 1, &device->events.descriptor_set); in v3dv_event_free_resources()
359 device->events.descriptor_set = VK_NULL_HANDLE; in v3dv_event_free_resources()
362 device->events.descriptor_pool, in v3dv_event_free_resources()
364 device->events.descriptor_pool = VK_NULL_HANDLE; in v3dv_event_free_resources()
372 mtx_lock(&device->events.lock); in allocate_event()
373 if (list_is_empty(&device->events.free_list)) { in allocate_event()
374 mtx_unlock(&device->events.lock); in allocate_event()
379 list_first_entry(&device->events.free_list, struct v3dv_event, link); in allocate_event()
381 mtx_unlock(&device->events.lock); in allocate_event()
389 assert(index < device->events.event_count); in free_event()
390 mtx_lock(&device->events.lock); in free_event()
391 list_addtail(&device->events.events[index].link, &device->events.free_list); in free_event()
392 mtx_unlock(&device->events.lock); in free_event()
401 uint8_t *data = (uint8_t *) device->events.bo->map; in event_set_value()
408 uint8_t *data = (uint8_t *) device->events.bo->map; in event_get_value()
491 device->events.set_event_pipeline); in cmd_buffer_emit_set_event()
495 device->events.pipeline_layout, in cmd_buffer_emit_set_event()
496 0, 1, &device->events.descriptor_set, 0, NULL); in cmd_buffer_emit_set_event()
498 assert(event->index < device->events.event_count); in cmd_buffer_emit_set_event()
501 device->events.pipeline_layout, in cmd_buffer_emit_set_event()
506 device->events.pipeline_layout, in cmd_buffer_emit_set_event()
526 device->events.wait_event_pipeline); in cmd_buffer_emit_wait_event()
530 device->events.pipeline_layout, in cmd_buffer_emit_wait_event()
531 0, 1, &device->events.descriptor_set, 0, NULL); in cmd_buffer_emit_wait_event()
533 assert(event->index < device->events.event_count); in cmd_buffer_emit_wait_event()
536 device->events.pipeline_layout, in cmd_buffer_emit_wait_event()