// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include "common/common_types.h" namespace Shader::Ampere { struct Instruction { std::array words; u32 Bits(u32 offset, u32 count) const { u64 bits = words[offset / 32]; if (offset / 32 + 1 < words.size()) bits |= u64{words[offset / 32 + 1]} << 32; return static_cast((bits >> (offset % 32)) & ((u64{1} << count) - 1)); } }; static_assert(sizeof(Instruction) == 16); } // namespace Shader::Ampere