diff options
| author | Subv <subv2112@gmail.com> | 2018-02-11 21:34:20 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2018-02-11 22:42:48 -0500 |
| commit | 35176a0f73ec9c114d04274cd6a044938a2bda7d (patch) | |
| tree | f5a95dc16a129a5c1a8a4d1309dfbbc3e4ccdb3f /src/video_core/command_processor.h | |
| parent | f7ac88184d807a4036d6427eb1fe101028a8b522 (diff) | |
GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines.
Diffstat (limited to 'src/video_core/command_processor.h')
| -rw-r--r-- | src/video_core/command_processor.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/video_core/command_processor.h b/src/video_core/command_processor.h new file mode 100644 index 0000000000..90e64629e4 --- /dev/null +++ b/src/video_core/command_processor.h @@ -0,0 +1,43 @@ +// Copyright 2018 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <type_traits> +#include "common/bit_field.h" +#include "common/common_types.h" + +namespace Tegra { + +namespace CommandProcessor { + +enum class SubmissionMode : u32 { + IncreasingOld = 0, + Increasing = 1, + NonIncreasingOld = 2, + NonIncreasing = 3, + Inline = 4, + IncreaseOnce = 5 +}; + +union CommandHeader { + u32 hex; + + BitField<0, 13, u32> method; + BitField<13, 3, u32> subchannel; + + BitField<16, 13, u32> arg_count; + BitField<16, 13, u32> inline_data; + + BitField<29, 3, SubmissionMode> mode; +}; +static_assert(std::is_standard_layout<CommandHeader>::value == true, + "CommandHeader does not use standard layout"); +static_assert(sizeof(CommandHeader) == sizeof(u32), "CommandHeader has incorrect size!"); + +void ProcessCommandList(VAddr address, u32 size); + +} // namespace CommandProcessor + +} // namespace Tegra |
