1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibC: Add ioctls for VirGL

This commit is contained in:
Sahan Fernando 2022-02-18 16:32:02 +11:00 committed by Ali Mohammad Pur
parent 04849c9561
commit 0e57f80460
2 changed files with 44 additions and 0 deletions

38
Kernel/API/VirGL.h Normal file
View file

@ -0,0 +1,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 {
const u32* 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;
};