diff options
| author | bunnei <bunneidev@gmail.com> | 2018-02-12 13:51:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-12 13:51:52 -0500 |
| commit | be5ba4d95215217930e57976386adff6de79322f (patch) | |
| tree | 299b1096450b0284a489900280a28819aa4fb349 /src/video_core/command_processor.h | |
| parent | 890e98a33e4afa3d7374c7951ee2bde7cc8849c5 (diff) | |
| parent | 6cddf9d88e7fc49919fda92bcd4235797c56f07f (diff) | |
Merge pull request #178 from Subv/command_buffers
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 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/video_core/command_processor.h b/src/video_core/command_processor.h new file mode 100644 index 000000000..b511bfcf7 --- /dev/null +++ b/src/video_core/command_processor.h @@ -0,0 +1,39 @@ +// 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 { + +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 Tegra |
