Add some convinience helpers to compute engine regs

This commit is contained in:
Billy Laws 2022-11-18 21:43:06 +00:00
parent 4267a6af36
commit 4bc81f007f
2 changed files with 11 additions and 1 deletions

View File

@ -55,6 +55,10 @@ namespace skyline::soc::gm20b::engine {
u32 qmdAddressShifted8;
u32 from : 24;
u8 delta;
u64 QmdAddress() const {
return static_cast<u64>(qmdAddressShifted8) << 8;
}
};
static_assert(sizeof(SendPcas) == 0x8);

View File

@ -14,6 +14,8 @@ namespace skyline::soc::gm20b::engine::kepler_compute {
* @url https://github.com/devkitPro/deko3d/blob/master/source/maxwell/compute_qmd.h
*/
struct QMD {
static constexpr size_t ConstantBufferCount{8};
enum class DependentQmdType : u32 {
Queue = 0,
Grid = 1
@ -229,7 +231,11 @@ namespace skyline::soc::gm20b::engine::kepler_compute {
u32 reservedAddr : 6;
u32 invalidate : 1;
u32 size : 17;
} constantBuffer[8];
u64 Address() const {
return (static_cast<u64>(addrUpper) << 32) | addrLower;
}
} constantBuffer[ConstantBufferCount];
u32 shaderLocalMemoryLowSize : 24;