Lines Matching refs:use_flags

284 						uint64_t use_flags)  in virgl_supports_combination_natively()  argument
291 if ((use_flags & BO_USE_RENDERING) && in virgl_supports_combination_natively()
295 if ((use_flags & BO_USE_TEXTURE) && in virgl_supports_combination_natively()
299 if ((use_flags & BO_USE_SCANOUT) && priv->caps_is_v2 && in virgl_supports_combination_natively()
310 uint64_t use_flags) in virgl_supports_combination_through_emulation() argument
318 if (use_flags & (BO_USE_RENDERING | BO_USE_SCANOUT)) in virgl_supports_combination_through_emulation()
321 if (!virgl_supports_combination_natively(drv, DRM_FORMAT_R8, use_flags)) in virgl_supports_combination_through_emulation()
331 struct format_metadata *metadata, uint64_t use_flags) in virgl_add_combination() argument
336 if ((use_flags & BO_USE_SCANOUT) && priv->caps_is_v2 && in virgl_add_combination()
337 !virgl_supports_combination_natively(drv, drm_format, use_flags)) { in virgl_add_combination()
339 use_flags &= ~BO_USE_SCANOUT; in virgl_add_combination()
342 if (!virgl_supports_combination_natively(drv, drm_format, use_flags) && in virgl_add_combination()
343 !virgl_supports_combination_through_emulation(drv, drm_format, use_flags)) { in virgl_add_combination()
349 drv_add_combination(drv, drm_format, metadata, use_flags); in virgl_add_combination()
356 uint64_t use_flags) in virgl_add_combinations() argument
361 virgl_add_combination(drv, drm_formats[i], metadata, use_flags); in virgl_add_combinations()
365 uint64_t use_flags) in virtio_dumb_bo_create() argument
372 return drv_dumb_bo_create_ex(bo, width, height, format, use_flags, BO_QUIRK_DUMB32BPP); in virtio_dumb_bo_create()
384 static uint32_t compute_virgl_bind_flags(uint64_t use_flags, uint32_t format) in compute_virgl_bind_flags() argument
389 handle_flag(&use_flags, BO_USE_TEXTURE, &bind, VIRGL_BIND_SAMPLER_VIEW); in compute_virgl_bind_flags()
390 handle_flag(&use_flags, BO_USE_RENDERING, &bind, VIRGL_BIND_RENDER_TARGET); in compute_virgl_bind_flags()
391 handle_flag(&use_flags, BO_USE_SCANOUT, &bind, VIRGL_BIND_SCANOUT); in compute_virgl_bind_flags()
392 handle_flag(&use_flags, BO_USE_CURSOR, &bind, VIRGL_BIND_CURSOR); in compute_virgl_bind_flags()
393 handle_flag(&use_flags, BO_USE_LINEAR, &bind, VIRGL_BIND_LINEAR); in compute_virgl_bind_flags()
395 if (use_flags & BO_USE_PROTECTED) { in compute_virgl_bind_flags()
396 handle_flag(&use_flags, BO_USE_PROTECTED, &bind, VIRGL_BIND_MINIGBM_PROTECTED); in compute_virgl_bind_flags()
400 if (use_flags & BO_USE_SW_READ_OFTEN) { in compute_virgl_bind_flags()
401 handle_flag(&use_flags, BO_USE_SW_READ_OFTEN, &bind, in compute_virgl_bind_flags()
404 handle_flag(&use_flags, BO_USE_SW_READ_RARELY, &bind, in compute_virgl_bind_flags()
407 if (use_flags & BO_USE_SW_WRITE_OFTEN) { in compute_virgl_bind_flags()
408 handle_flag(&use_flags, BO_USE_SW_WRITE_OFTEN, &bind, in compute_virgl_bind_flags()
411 handle_flag(&use_flags, BO_USE_SW_WRITE_RARELY, &bind, in compute_virgl_bind_flags()
416 handle_flag(&use_flags, BO_USE_CAMERA_WRITE, &bind, VIRGL_BIND_MINIGBM_CAMERA_WRITE); in compute_virgl_bind_flags()
417 handle_flag(&use_flags, BO_USE_CAMERA_READ, &bind, VIRGL_BIND_MINIGBM_CAMERA_READ); in compute_virgl_bind_flags()
418 handle_flag(&use_flags, BO_USE_HW_VIDEO_DECODER, &bind, in compute_virgl_bind_flags()
420 handle_flag(&use_flags, BO_USE_HW_VIDEO_ENCODER, &bind, in compute_virgl_bind_flags()
431 if (use_flags) in compute_virgl_bind_flags()
432 drv_log("Unhandled bo use flag: %llx\n", (unsigned long long)use_flags); in compute_virgl_bind_flags()
438 uint64_t use_flags) in virgl_3d_bo_create() argument
446 if (virgl_supports_combination_natively(bo->drv, format, use_flags)) { in virgl_3d_bo_create()
450 assert(virgl_supports_combination_through_emulation(bo->drv, format, use_flags)); in virgl_3d_bo_create()
475 res_create.bind = compute_virgl_bind_flags(use_flags, format); in virgl_3d_bo_create()
664 if (bo->meta.use_flags & BO_USE_SW_MASK) in virgl_bo_create_blob()
666 if (bo->meta.use_flags & BO_USE_NON_GPU_HW) in virgl_bo_create_blob()
681 compute_virgl_bind_flags(bo->meta.use_flags, bo->meta.format); in virgl_bo_create_blob()
704 static bool should_use_blob(struct driver *drv, uint32_t format, uint64_t use_flags) in should_use_blob() argument
718 if (!(use_flags & in should_use_blob()
730 return (use_flags & BO_USE_SW_MASK) == 0; in should_use_blob()
737 uint64_t use_flags) in virgl_bo_create() argument
740 should_use_blob(bo->drv, format, use_flags)) in virgl_bo_create()
744 return virgl_3d_bo_create(bo, width, height, format, use_flags); in virgl_bo_create()
746 return virtio_dumb_bo_create(bo, width, height, format, use_flags); in virgl_bo_create()
787 if ((bo->meta.use_flags & host_write_flags) == 0) in virgl_bo_invalidate()
807 if ((bo->meta.use_flags & BO_USE_RENDERING) == 0) { in virgl_bo_invalidate()
819 if (virgl_supports_combination_natively(bo->drv, bo->meta.format, bo->meta.use_flags)) { in virgl_bo_invalidate()
824 bo->meta.use_flags)); in virgl_bo_invalidate()
895 if (virgl_supports_combination_natively(bo->drv, bo->meta.format, bo->meta.use_flags)) { in virgl_bo_flush()
900 bo->meta.use_flags)); in virgl_bo_flush()
924 if (bo->meta.use_flags & BO_USE_NON_GPU_HW) { in virgl_bo_flush()
937 static uint32_t virgl_resolve_format(struct driver *drv, uint32_t format, uint64_t use_flags) in virgl_resolve_format() argument
942 if (use_flags & (BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE)) in virgl_resolve_format()