diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute.h b/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute.h index 00d62b4e..649626cf 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute.h +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute.h @@ -55,6 +55,10 @@ namespace skyline::soc::gm20b::engine { u32 qmdAddressShifted8; u32 from : 24; u8 delta; + + u64 QmdAddress() const { + return static_cast(qmdAddressShifted8) << 8; + } }; static_assert(sizeof(SendPcas) == 0x8); diff --git a/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute/qmd.h b/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute/qmd.h index efb79135..6f95013f 100644 --- a/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute/qmd.h +++ b/app/src/main/cpp/skyline/soc/gm20b/engines/kepler_compute/qmd.h @@ -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(addrUpper) << 32) | addrLower; + } + } constantBuffer[ConstantBufferCount]; u32 shaderLocalMemoryLowSize : 24;