diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2021-03-27 22:30:24 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:25 +0200 |
commit | 34aba9627a8fad20b3b173180e2f3d679dd32293 (patch) | |
tree | a4f2faec67a793e8b44493532a683908dcefb4d8 /src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.h | |
parent | shader: Fix alignment checks on RZ (diff) | |
download | yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.tar yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.tar.gz yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.tar.bz2 yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.tar.lz yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.tar.xz yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.tar.zst yuzu-34aba9627a8fad20b3b173180e2f3d679dd32293.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.h')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.h b/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.h new file mode 100644 index 000000000..3074ea0e3 --- /dev/null +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.h @@ -0,0 +1,39 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "common/bit_field.h" +#include "common/common_types.h" +#include "shader_recompiler/frontend/ir/reg.h" + +namespace Shader::Maxwell::LDC { + +enum class Mode : u64 { + Default, + IL, + IS, + ISL, +}; + +enum class Size : u64 { + U8, + S8, + U16, + S16, + B32, + B64, +}; + +union Encoding { + u64 raw; + BitField<0, 8, IR::Reg> dest_reg; + BitField<8, 8, IR::Reg> src_reg; + BitField<20, 16, s64> offset; + BitField<36, 5, u64> index; + BitField<44, 2, Mode> mode; + BitField<48, 3, Size> size; +}; + +} // namespace Shader::Maxwell::LDC |