xref: /aosp_15_r20/external/virglrenderer/src/vrend_winsys_gbm_stubs.c (revision bbecb9d118dfdb95f99bd754f8fa9be01f189df3)
1 /**************************************************************************
2  *
3  * Copyright (C) 2024 AOSP..
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21  * OTHER DEALINGS IN THE SOFTWARE.
22  *
23  **************************************************************************/
24 
25 #include "vrend_winsys_gbm.h"
26 #include <stddef.h>
27 
virgl_gbm_init(int fd)28 struct virgl_gbm *virgl_gbm_init(int fd) { return NULL; }
29 
virgl_gbm_fini(struct virgl_gbm * gbm)30 void virgl_gbm_fini(struct virgl_gbm *gbm) {
31 	return;
32 }
33 
virgl_gbm_convert_format(uint32_t * virgl_format,uint32_t * gbm_format)34 int virgl_gbm_convert_format(uint32_t *virgl_format, uint32_t *gbm_format) {
35   return 0;
36 }
37 
virgl_gbm_transfer(struct gbm_bo * bo,uint32_t direction,const struct iovec * iovecs,uint32_t num_iovecs,const struct vrend_transfer_info * info)38 int virgl_gbm_transfer(struct gbm_bo *bo, uint32_t direction,
39                        const struct iovec *iovecs, uint32_t num_iovecs,
40                        const struct vrend_transfer_info *info) {
41   return 0;
42 }
43 
virgl_gbm_convert_flags(uint32_t virgl_bind_flags)44 uint32_t virgl_gbm_convert_flags(uint32_t virgl_bind_flags) { return 0; }
45 
virgl_gbm_export_fd(struct gbm_device * gbm,uint32_t handle,int32_t * out_fd)46 int virgl_gbm_export_fd(struct gbm_device *gbm, uint32_t handle,
47                         int32_t *out_fd) {
48   return 0;
49 }
50 
virgl_gbm_export_query(struct gbm_bo * bo,struct virgl_renderer_export_query * query)51 int virgl_gbm_export_query(struct gbm_bo *bo,
52                            struct virgl_renderer_export_query *query) {
53   return 0;
54 }
55 
virgl_gbm_get_plane_width(struct gbm_bo * bo,int plane)56 int virgl_gbm_get_plane_width(struct gbm_bo *bo, int plane) { return 0; }
57 
virgl_gbm_get_plane_height(struct gbm_bo * bo,int plane)58 int virgl_gbm_get_plane_height(struct gbm_bo *bo, int plane) { return 0; }
59 
virgl_gbm_get_plane_bytes_per_pixel(struct gbm_bo * bo,int plane)60 int virgl_gbm_get_plane_bytes_per_pixel(struct gbm_bo *bo, int plane) {
61   return 0;
62 }
63 
virgl_gbm_external_allocation_preferred(uint32_t flags)64 bool virgl_gbm_external_allocation_preferred(uint32_t flags) { return false; }
65 
virgl_gbm_gpu_import_required(uint32_t flags)66 bool virgl_gbm_gpu_import_required(uint32_t flags) { return false; }
67