Lines Matching refs:use_flags
301 uint64_t use_flags) in virtio_gpu_supports_combination_natively() argument
309 if ((use_flags & BO_USE_RENDERING) && in virtio_gpu_supports_combination_natively()
314 if ((use_flags & BO_USE_TEXTURE) && in virtio_gpu_supports_combination_natively()
319 if ((use_flags & BO_USE_SCANOUT) && priv->caps_is_v2 && in virtio_gpu_supports_combination_natively()
332 uint64_t use_flags) in virtio_gpu_supports_combination_through_emulation() argument
341 if (use_flags & (BO_USE_RENDERING | BO_USE_SCANOUT)) { in virtio_gpu_supports_combination_through_emulation()
345 if (!virtio_gpu_supports_combination_natively(drv, DRM_FORMAT_R8, use_flags)) { in virtio_gpu_supports_combination_through_emulation()
356 struct format_metadata *metadata, uint64_t use_flags) in virtio_gpu_add_combination() argument
361 if ((use_flags & BO_USE_SCANOUT) && priv->caps_is_v2 && in virtio_gpu_add_combination()
362 !virtio_gpu_supports_combination_natively(drv, drm_format, use_flags)) { in virtio_gpu_add_combination()
364 use_flags &= ~BO_USE_SCANOUT; in virtio_gpu_add_combination()
367 if (!virtio_gpu_supports_combination_natively(drv, drm_format, use_flags) && in virtio_gpu_add_combination()
369 use_flags)) { in virtio_gpu_add_combination()
375 drv_add_combination(drv, drm_format, metadata, use_flags); in virtio_gpu_add_combination()
382 uint64_t use_flags) in virtio_gpu_add_combinations() argument
387 virtio_gpu_add_combination(drv, drm_formats[i], metadata, use_flags); in virtio_gpu_add_combinations()
392 uint64_t use_flags) in virtio_dumb_bo_create() argument
399 return drv_dumb_bo_create_ex(bo, width, height, format, use_flags, BO_QUIRK_DUMB32BPP); in virtio_dumb_bo_create()
411 static uint32_t use_flags_to_bind(uint64_t use_flags) in use_flags_to_bind() argument
416 handle_flag(&use_flags, BO_USE_TEXTURE, &bind, VIRGL_BIND_SAMPLER_VIEW); in use_flags_to_bind()
417 handle_flag(&use_flags, BO_USE_RENDERING, &bind, VIRGL_BIND_RENDER_TARGET); in use_flags_to_bind()
418 handle_flag(&use_flags, BO_USE_SCANOUT, &bind, VIRGL_BIND_SCANOUT); in use_flags_to_bind()
419 handle_flag(&use_flags, BO_USE_CURSOR, &bind, VIRGL_BIND_CURSOR); in use_flags_to_bind()
420 handle_flag(&use_flags, BO_USE_LINEAR, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
422 handle_flag(&use_flags, BO_USE_SW_READ_OFTEN, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
423 handle_flag(&use_flags, BO_USE_SW_READ_RARELY, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
424 handle_flag(&use_flags, BO_USE_SW_WRITE_OFTEN, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
425 handle_flag(&use_flags, BO_USE_SW_WRITE_RARELY, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
429 handle_flag(&use_flags, BO_USE_CAMERA_READ, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
430 handle_flag(&use_flags, BO_USE_CAMERA_WRITE, &bind, VIRGL_BIND_LINEAR); in use_flags_to_bind()
432 if (use_flags) { in use_flags_to_bind()
433 drv_log("Unhandled bo use flag: %llx\n", (unsigned long long)use_flags); in use_flags_to_bind()
440 uint64_t use_flags) in virtio_virgl_bo_create() argument
448 if (virtio_gpu_supports_combination_natively(bo->drv, format, use_flags)) { in virtio_virgl_bo_create()
453 virtio_gpu_supports_combination_through_emulation(bo->drv, format, use_flags)); in virtio_virgl_bo_create()
479 res_create.bind = use_flags_to_bind(use_flags); in virtio_virgl_bo_create()
652 uint64_t use_flags) in virtio_gpu_bo_create() argument
655 return virtio_virgl_bo_create(bo, width, height, format, use_flags); in virtio_gpu_bo_create()
657 return virtio_dumb_bo_create(bo, width, height, format, use_flags); in virtio_gpu_bo_create()
689 if ((bo->meta.use_flags & (BO_USE_RENDERING | BO_USE_CAMERA_WRITE | in virtio_gpu_bo_invalidate()
696 if ((bo->meta.use_flags & BO_USE_RENDERING) == 0) { in virtio_gpu_bo_invalidate()
710 bo->meta.use_flags)) { in virtio_gpu_bo_invalidate()
715 bo->meta.use_flags)); in virtio_gpu_bo_invalidate()
775 bo->meta.use_flags)) { in virtio_gpu_bo_flush()
780 bo->meta.use_flags)); in virtio_gpu_bo_flush()
804 if (bo->meta.use_flags & BO_USE_NON_GPU_HW) { in virtio_gpu_bo_flush()
818 static uint32_t virtio_gpu_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags) in virtio_gpu_resolve_format() argument
823 if (use_flags & (BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE)) in virtio_gpu_resolve_format()