mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Kernel: Sandbox each GPU3DDevice file description into own host context
This commit is contained in:
parent
fe7d801dd9
commit
683de841e5
4 changed files with 70 additions and 7 deletions
|
@ -133,6 +133,8 @@ static void init()
|
|||
// Open the device
|
||||
gpu_fd = open("/dev/gpu0", O_RDWR);
|
||||
VERIFY(gpu_fd >= 0);
|
||||
// Create a virgl context for this file descriptor
|
||||
VERIFY(ioctl(gpu_fd, VIRGL_IOCTL_CREATE_CONTEXT) >= 0);
|
||||
// Create a VertexElements resource
|
||||
VirGL3DResourceSpec vbo_spec {
|
||||
.target = to_underlying(Gallium::PipeTextureTarget::BUFFER), // pipe_texture_target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue