mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
LibVirtGPU: Move VirGLDemo protocol code into VirtGPU namespace
This commit is contained in:
parent
a95eea5ae2
commit
51ac0d73a3
Notes:
sideshowbarker
2024-07-17 02:35:07 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/51ac0d73a3 Pull-request: https://github.com/SerenityOS/serenity/pull/16590 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/ccapitalK Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/supercomputer7 ✅
3 changed files with 18 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sahan Fernando <sahan.h.fernando@gmail.com>
|
||||
* Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -9,12 +10,15 @@
|
|||
#include <Kernel/API/VirGL.h>
|
||||
#include <sys/ioctl_numbers.h>
|
||||
|
||||
#include "CommandBufferBuilder.h"
|
||||
#include "VirGLProtocol.h"
|
||||
#include <LibVirtGPU/CommandBufferBuilder.h>
|
||||
#include <LibVirtGPU/VirGLProtocol.h>
|
||||
|
||||
namespace VirtGPU {
|
||||
|
||||
constexpr int DRAWTARGET_WIDTH = 500;
|
||||
constexpr int DRAWTARGET_HEIGHT = 500;
|
||||
|
||||
|
||||
static u32 encode_command(u32 length, u32 mid, Protocol::VirGLCommand command)
|
||||
{
|
||||
u32 command_value = to_underlying(command);
|
||||
|
@ -301,3 +305,5 @@ void CommandBufferBuilder::append_bind_dsa(ObjectHandle handle)
|
|||
CommandBuilder builder(m_buffer, Protocol::VirGLCommand::BIND_OBJECT, to_underlying(Protocol::ObjectType::DSA));
|
||||
builder.appendu32(handle.value()); // VIRGL_OBJ_BIND_HANDLE
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sahan Fernando <sahan.h.fernando@gmail.com>
|
||||
* Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -9,9 +10,10 @@
|
|||
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibVirtGPU/VirGLProtocol.h>
|
||||
#include <sys/ioctl_numbers.h>
|
||||
|
||||
#include "VirGLProtocol.h"
|
||||
namespace VirtGPU {
|
||||
|
||||
class CommandBufferBuilder {
|
||||
public:
|
||||
|
@ -41,3 +43,5 @@ public:
|
|||
private:
|
||||
Vector<u32> m_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sahan Fernando <sahan.h.fernando@gmail.com>
|
||||
* Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,6 +9,8 @@
|
|||
|
||||
#include <AK/DistinctNumeric.h>
|
||||
|
||||
namespace VirtGPU {
|
||||
|
||||
AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ObjectHandle);
|
||||
AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ResourceID);
|
||||
|
||||
|
@ -208,3 +211,5 @@ enum class ShaderType : u32 {
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue