forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibVirtGPU: Move VirGLDemo protocol code into VirtGPU namespace
- Loading branch information
1 parent
a95eea5
commit 51ac0d7
Showing
3 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* | ||
* Copyright (c) 2022, Sahan Fernando <[email protected]> | ||
* Copyright (c) 2022, Stephan Unverwerth <[email protected]> | ||
* 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 | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* | ||
* Copyright (c) 2022, Sahan Fernando <[email protected]> | ||
* Copyright (c) 2022, Stephan Unverwerth <[email protected]> | ||
* 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 @@ class CommandBufferBuilder { | |
private: | ||
Vector<u32> m_buffer; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* | ||
* Copyright (c) 2022, Sahan Fernando <[email protected]> | ||
* Copyright (c) 2022, Stephan Unverwerth <[email protected]> | ||
* | ||
* 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 { | |
}; | ||
|
||
} | ||
|
||
} |