summaryrefslogtreecommitdiff
path: root/Kernel/API/VirGL.h
blob: 2d7a848459dc42e28ab4e2f7adb4c4e37130eb85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2022, Sahan Fernando <sahan.h.fernando@gmail.com>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Types.h>

struct VirGL3DResourceSpec {
    u32 target;
    u32 format;
    u32 bind;
    u32 width;
    u32 height;
    u32 depth;
    u32 array_size;
    u32 last_level;
    u32 nr_samples;
    u32 flags;
    u32 created_resource_id;
};

struct VirGLCommandBuffer {
    u32 const* data;
    u32 num_elems;
};

#define VIRGL_DATA_DIR_GUEST_TO_HOST 1
#define VIRGL_DATA_DIR_HOST_TO_GUEST 2

struct VirGLTransferDescriptor {
    void* data;
    size_t offset_in_region;
    size_t num_bytes;
    int direction;
};