From bdff4874deabece895b732c9e49b83576551c9af Mon Sep 17 00:00:00 2001 From: boykopovar Date: Sun, 13 Sep 2026 18:14:51 +0300 Subject: [PATCH] feat(agc): add draw packets and register defaults with strict validation --- core/libs/prx/libSceAgc/Acb/src/Memory.cpp | 11 +- core/libs/prx/libSceAgc/CMakeLists.txt | 10 + core/libs/prx/libSceAgc/Cb/src/Sync.cpp | 50 +- .../prx/libSceAgc/Command/include/Draw.hpp | 14 + .../Command/include/RegisterDefaults.hpp | 12 + .../Command/include/RegisterDefaultsData.hpp | 2931 +++++++++++++++++ core/libs/prx/libSceAgc/Command/src/Draw.cpp | 32 + .../Command/src/RegisterDefaults.cpp | 79 + .../prx/libSceAgc/DcbDraw/src/DrawIndexed.cpp | 38 +- .../libSceAgc/DcbDraw/src/DrawNonIndexed.cpp | 62 +- .../prx/libSceAgc/DcbFlow/include/Memory.hpp | 4 + .../prx/libSceAgc/DcbFlow/include/Sync.hpp | 1 + .../prx/libSceAgc/DcbFlow/src/Control.cpp | 27 +- .../prx/libSceAgc/DcbFlow/src/Dispatch.cpp | 5 +- .../libs/prx/libSceAgc/DcbFlow/src/Memory.cpp | 20 +- .../libSceAgc/DcbState/src/ContextState.cpp | 10 +- .../libSceAgc/Misc/src/RegisterDefaults.cpp | 14 +- .../Patch/src/QueueEndOfPipeAction.cpp | 24 +- .../prx/libSceAgc/Shader/src/CreateShader.cpp | 23 +- .../prx/libSceAgc/Shader/src/PrimState.cpp | 14 + .../prx/libSceAgc/Shader/src/ShaderUtils.cpp | 23 +- core/libs/prx/libSceAgc/tests/Commands.cpp | 126 + .../libs/prx/libSceAgcDriver/Eq/src/Query.cpp | 17 +- 23 files changed, 3404 insertions(+), 143 deletions(-) create mode 100644 core/libs/prx/libSceAgc/Command/include/Draw.hpp create mode 100644 core/libs/prx/libSceAgc/Command/include/RegisterDefaults.hpp create mode 100644 core/libs/prx/libSceAgc/Command/include/RegisterDefaultsData.hpp create mode 100644 core/libs/prx/libSceAgc/Command/src/Draw.cpp create mode 100644 core/libs/prx/libSceAgc/Command/src/RegisterDefaults.cpp create mode 100644 core/libs/prx/libSceAgc/tests/Commands.cpp diff --git a/core/libs/prx/libSceAgc/Acb/src/Memory.cpp b/core/libs/prx/libSceAgc/Acb/src/Memory.cpp index bffa62e1e..083dcbc88 100644 --- a/core/libs/prx/libSceAgc/Acb/src/Memory.cpp +++ b/core/libs/prx/libSceAgc/Acb/src/Memory.cpp @@ -1,4 +1,5 @@ #include "prx/libSceAgc/Acb/include/Memory.hpp" +#include "prx/libSceAgc/DcbFlow/include/Memory.hpp" #include "prx/libSceAgc/Command/include/Memory.hpp" #include "prx/libSceAgc/Command/include/Packet.hpp" @@ -9,14 +10,8 @@ extern "C" { -uint32_t* APS5_VABI sceAgcAcbAcquireMem(CommandBuffer* buf, uint32_t gcr_cntl, const volatile void* base, uint64_t size_bytes, uint32_t poll_cycles) { - (void)buf; - (void)gcr_cntl; - (void)base; - (void)size_bytes; - (void)poll_cycles; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcAcbAcquireMem(CommandBuffer* buf, std::uint32_t gcrControl, const volatile void* base, std::uint64_t sizeBytes, std::uint32_t pollCycles) { + return sceAgcDcbAcquireMem(buf, 1, 0, gcrControl, base, sizeBytes, pollCycles); } uint32_t APS5_VABI sceAgcAcbAcquireMemGetSize(void) { diff --git a/core/libs/prx/libSceAgc/CMakeLists.txt b/core/libs/prx/libSceAgc/CMakeLists.txt index 3320a07ab..fd46496a1 100644 --- a/core/libs/prx/libSceAgc/CMakeLists.txt +++ b/core/libs/prx/libSceAgc/CMakeLists.txt @@ -8,6 +8,8 @@ add_library(libSceAgc SHARED EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/Cb/src/Registers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Cb/src/Sync.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Command/src/Memory.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Command/src/Draw.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Command/src/RegisterDefaults.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Command/src/Packet.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DcbDraw/src/DrawIndexed.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DcbDraw/src/DrawNonIndexed.cpp @@ -53,3 +55,11 @@ option(APS5_AGC_CREATE_LOG "Logging sceAgcCreateShader Ok status" ON) target_compile_definitions(libSceAgc PRIVATE APS5_AGC_CREATE_LOG=$ ) + +foreach(runtimeLinkFlag IN ITEMS -static-libgcc -static-libstdc++ -static) + string(REPLACE "${runtimeLinkFlag}" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") +endforeach() + +add_executable(agc_command_tests EXCLUDE_FROM_ALL tests/Commands.cpp) +target_include_directories(agc_command_tests PRIVATE ${LIBS_INCLUDE_DIR}) +target_link_libraries(agc_command_tests PRIVATE libSceAgc libc) diff --git a/core/libs/prx/libSceAgc/Cb/src/Sync.cpp b/core/libs/prx/libSceAgc/Cb/src/Sync.cpp index ef54a99af..74115f047 100644 --- a/core/libs/prx/libSceAgc/Cb/src/Sync.cpp +++ b/core/libs/prx/libSceAgc/Cb/src/Sync.cpp @@ -18,26 +18,40 @@ uint32_t APS5_VABI sceAgcCbNopGetSize(uint32_t size_in_dwords) { return 0; } -uint32_t APS5_VABI sceAgcCbQueueEndOfPipeActionGetSize(void) { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcCbQueueEndOfPipeActionGetSize() { + return 32; } -uint32_t* APS5_VABI sceAgcCbReleaseMem(CommandBuffer* buf, uint8_t action, uint16_t gcr_cntl, uint8_t dst, uint8_t cache_policy, const volatile Label* address, uint8_t data_sel, uint64_t data, uint16_t gds_offset, uint16_t gds_size, uint8_t interrupt, uint32_t interrupt_ctx_id) { - (void)buf; - (void)action; - (void)gcr_cntl; - (void)dst; - (void)cache_policy; - (void)address; - (void)data_sel; - (void)data; - (void)gds_offset; - (void)gds_size; - (void)interrupt; - (void)interrupt_ctx_id; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcCbReleaseMem(CommandBuffer* buf, std::uint8_t action, std::uint16_t gcrControl, std::uint8_t dst, std::uint8_t cachePolicy, const volatile Label* address, std::uint8_t dataSelect, std::uint64_t data, std::uint16_t gdsOffset, std::uint16_t gdsSize, std::uint8_t interrupt, std::uint32_t interruptContextId) { + Agc::Command::CheckBits(action, 0x3fu, __func__); + Agc::Command::CheckBits(gcrControl, 0xfffu, __func__); + Agc::Command::CheckBits(dst, 1, __func__); + Agc::Command::CheckBits(cachePolicy, 3, __func__); + Agc::Command::Require(dataSelect <= 3 || dataSelect == 5, __func__, "invalid release data selector"); + Agc::Command::Require(interrupt <= 4, __func__, "invalid release interrupt selector"); + Agc::Command::CheckBits(interruptContextId, 0x7ffffffu, __func__); + auto guestAddress = reinterpret_cast(address); + auto value = data; + if (interrupt == 4) { + Agc::Command::Require(guestAddress == 0 && value == 0, __func__, "interrupt-only release cannot write data"); + } else if (dataSelect == 5) { + Agc::Command::Require(data == 0, __func__, "GDS release cannot use immediate data"); + value = gdsOffset | (static_cast(gdsSize) << 16u); + } else { + Agc::Command::Require(gdsOffset == 0 && gdsSize == 0, __func__, "GDS parameters supplied for a non-GDS release"); + } + if (dataSelect != 0 && interrupt != 4) { + Agc::Command::CheckAddress(guestAddress, dataSelect == 2 || dataSelect == 3 ? 8 : 4, __func__); + } + if (dataSelect == 1) { + Agc::Command::CheckBits(data, 0xffffffffu, __func__); + } + std::uint32_t control = gcrControl; + if ((control & 0x300u) == 0x100u) { + control |= 0x200u; + } + const auto eventIndex = action >= 0x2fu ? 6u : 5u; + return Agc::Command::Emit(buf, 0x49u, {action | (eventIndex << 8u) | (control << 12u) | (static_cast(cachePolicy) << 25u), (static_cast(dst) << 16u) | (static_cast(interrupt) << 24u) | (static_cast(dataSelect) << 29u), static_cast(guestAddress), static_cast(guestAddress >> 32u), static_cast(value), static_cast(value >> 32u), interruptContextId}, __func__); } } diff --git a/core/libs/prx/libSceAgc/Command/include/Draw.hpp b/core/libs/prx/libSceAgc/Command/include/Draw.hpp new file mode 100644 index 000000000..7c8596489 --- /dev/null +++ b/core/libs/prx/libSceAgc/Command/include/Draw.hpp @@ -0,0 +1,14 @@ +#ifndef CORE_LIBS_PRX_LIBSCEAGC_COMMAND_INCLUDE_DRAW_HPP +#define CORE_LIBS_PRX_LIBSCEAGC_COMMAND_INCLUDE_DRAW_HPP + +#include "prx/libSceAgc/Command/include/Packet.hpp" + +namespace Agc::Command { + +std::uint32_t DrawInitiator(std::uint64_t modifier, bool indexed, const char* function); +std::uint64_t DrawPatchOffsets(std::uint64_t modifier, const char* function); +std::uint32_t DrawIndexLocation(std::uint64_t modifier); + +} + +#endif diff --git a/core/libs/prx/libSceAgc/Command/include/RegisterDefaults.hpp b/core/libs/prx/libSceAgc/Command/include/RegisterDefaults.hpp new file mode 100644 index 000000000..a072cf5f5 --- /dev/null +++ b/core/libs/prx/libSceAgc/Command/include/RegisterDefaults.hpp @@ -0,0 +1,12 @@ +#ifndef CORE_LIBS_PRX_LIBSCEAGC_COMMAND_INCLUDE_REGISTERDEFAULTS_HPP +#define CORE_LIBS_PRX_LIBSCEAGC_COMMAND_INCLUDE_REGISTERDEFAULTS_HPP + +#include + +namespace Agc::Command { + +void* GetRegisterDefaults(std::uint32_t version, bool internal, const char* function); + +} + +#endif diff --git a/core/libs/prx/libSceAgc/Command/include/RegisterDefaultsData.hpp b/core/libs/prx/libSceAgc/Command/include/RegisterDefaultsData.hpp new file mode 100644 index 000000000..4aa8a2679 --- /dev/null +++ b/core/libs/prx/libSceAgc/Command/include/RegisterDefaultsData.hpp @@ -0,0 +1,2931 @@ +#ifndef CORE_LIBS_PRX_LIBSCEAGC_COMMAND_INCLUDE_REGISTERDEFAULTSDATA_HPP +#define CORE_LIBS_PRX_LIBSCEAGC_COMMAND_INCLUDE_REGISTERDEFAULTSDATA_HPP + + + + +static ShaderRegister agcInternalRegDefaultsV0Tbl0Regs[] = { + {0x01b5, 0x00000001}, +}; + +static const std::uint16_t agcInternalRegDefaultsV0Tbl0Ptrs[] = { + 0x0000, +}; + +static ShaderRegister agcInternalRegDefaultsV0Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV0Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, +}; + +static ShaderRegister agcInternalRegDefaultsV0Tbl3Regs[] = { + {0x026c, 0x00000000}, + {0x026e, 0x00000000}, + {0x0278, 0x00000000}, + {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV0Tbl3Ptrs[] = { + 0x0000, + 0x0001, +}; + +static std::uint32_t agcInternalRegDefaultsV0Types[] = { + 0xf58fea31, 0x00040400, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, + 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, + 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, + 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, + 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, 0x31f34b9f, + 0x00040403, 0x00000000, 0x929fd95d, 0x00040c07, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV0 = { + agcInternalRegDefaultsV0Tbl0Regs, + 1, + agcInternalRegDefaultsV0Tbl0Ptrs, + 1, + agcInternalRegDefaultsV0Tbl1Regs, + 12, + agcInternalRegDefaultsV0Tbl1Ptrs, + 12, + nullptr, + 0, + nullptr, + 0, + agcInternalRegDefaultsV0Tbl3Regs, + 4, + agcInternalRegDefaultsV0Tbl3Ptrs, + 2, + agcInternalRegDefaultsV0Types, + 15, +}; + + +static ShaderRegister agcInternalRegDefaultsV10Tbl0Regs[] = { + {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x02d3, 0x00000000}, + {0x0207, 0x00000000}, {0x0314, 0x00000202}, {0x01b5, 0x00000001}, + {0x01b1, 0x00000000}, {0x02e4, 0x00000000}, {0x0291, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV10Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, +}; + +static ShaderRegister agcInternalRegDefaultsV10Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, + {0x0081, 0x00000000}, {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV10Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, +}; + +static ShaderRegister agcInternalRegDefaultsV10Tbl2Regs[] = { + {0x0260, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV10Tbl2Ptrs[] = { + 0x0000, +}; + +static ShaderRegister agcInternalRegDefaultsV10Tbl3Regs[] = { + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV10Tbl3Ptrs[] = { + 0x0000, + 0x0001, + 0x0003, +}; + +static std::uint32_t agcInternalRegDefaultsV10Types[] = { + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0x700e23c3, 0x00040408, + 0x00000000, 0x51a1d306, 0x0004040c, 0x00000000, 0xd427322f, 0x00040410, 0x00000000, 0xf58fea31, + 0x00040414, 0x00000000, 0xa7fbef3f, 0x00040418, 0x00000000, 0xe7d3ab13, 0x0004041c, 0x00000000, + 0x1b1658df, 0x00040420, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, + 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, + 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, + 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, + 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, 0xe27f8fe6, + 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, 0x00000000, + 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, + 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV10 = { + agcInternalRegDefaultsV10Tbl0Regs, 9, agcInternalRegDefaultsV10Tbl0Ptrs, 9, + agcInternalRegDefaultsV10Tbl1Regs, 15, agcInternalRegDefaultsV10Tbl1Ptrs, 15, + agcInternalRegDefaultsV10Tbl2Regs, 1, agcInternalRegDefaultsV10Tbl2Ptrs, 1, + agcInternalRegDefaultsV10Tbl3Regs, 6, agcInternalRegDefaultsV10Tbl3Ptrs, 3, + agcInternalRegDefaultsV10Types, 28, +}; + + +static ShaderRegister agcInternalRegDefaultsV11Tbl0Regs[] = { + {0x000e, 0x00000002}, {0x02d3, 0x00000000}, {0x0207, 0x00000000}, {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, {0x01b1, 0x00000000}, {0x02e4, 0x00000000}, {0x0291, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV11Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, +}; + +static ShaderRegister agcInternalRegDefaultsV11Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, {0x0206, 0x00000000}, + {0x0100, 0x00ffffff}, {0x0081, 0x00000000}, {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV11Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, +}; + +static ShaderRegister agcInternalRegDefaultsV11Tbl2Regs[] = { + {0x0260, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV11Tbl2Ptrs[] = { + 0x0000, +}; + +static ShaderRegister agcInternalRegDefaultsV11Tbl3Regs[] = { + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV11Tbl3Ptrs[] = { + 0x0000, + 0x0001, + 0x0003, +}; + +static std::uint32_t agcInternalRegDefaultsV11Types[] = { + 0x8fb4edb5, 0x00040400, 0x00000000, 0x700e23c3, 0x00040404, 0x00000000, 0x51a1d306, 0x00040408, + 0x00000000, 0xd427322f, 0x0004040c, 0x00000000, 0xf58fea31, 0x00040410, 0x00000000, 0xa7fbef3f, + 0x00040414, 0x00000000, 0xe7d3ab13, 0x00040418, 0x00000000, 0x1b1658df, 0x0004041c, 0x00000000, + 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, + 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, 0xdb00d71a, + 0x00040415, 0x00000000, 0xdb00d249, 0x00040419, 0x00000000, 0xdb00ec60, 0x0004041d, 0x00000000, + 0x0c4a80ef, 0x00040421, 0x00000000, 0xe27f8fe6, 0x00040425, 0x00000000, 0xc67efacf, 0x00040429, + 0x00000000, 0xd9e6d9f7, 0x0004042d, 0x00000000, 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, + 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV11 = { + agcInternalRegDefaultsV11Tbl0Regs, 8, agcInternalRegDefaultsV11Tbl0Ptrs, 8, + agcInternalRegDefaultsV11Tbl1Regs, 12, agcInternalRegDefaultsV11Tbl1Ptrs, 12, + agcInternalRegDefaultsV11Tbl2Regs, 1, agcInternalRegDefaultsV11Tbl2Ptrs, 1, + agcInternalRegDefaultsV11Tbl3Regs, 6, agcInternalRegDefaultsV11Tbl3Ptrs, 3, + agcInternalRegDefaultsV11Types, 24, +}; + + + +static auto agcInternalRegDefaultsV13Tbl1Regs = [] { + constexpr auto count = sizeof(agcInternalRegDefaultsV11Tbl1Regs) / + sizeof(agcInternalRegDefaultsV11Tbl1Regs[0]); + std::array regs {}; + std::copy_n(agcInternalRegDefaultsV11Tbl1Regs, count, regs.begin()); + + for (auto& reg: regs) { + if (reg.offset == 0x0081) { + reg.value = 0x00000001; + } else if (reg.offset == 0x0101) { + reg.value = 0x00000003; + } + } + return regs; +}(); + +static CompactRegisterDefaults agcInternalRegDefaultsV13 = { + agcInternalRegDefaultsV11Tbl0Regs, + 8, + agcInternalRegDefaultsV11Tbl0Ptrs, + 8, + agcInternalRegDefaultsV13Tbl1Regs.data(), + 12, + agcInternalRegDefaultsV11Tbl1Ptrs, + 12, + agcInternalRegDefaultsV11Tbl2Regs, + 1, + agcInternalRegDefaultsV11Tbl2Ptrs, + 1, + agcInternalRegDefaultsV11Tbl3Regs, + 6, + agcInternalRegDefaultsV11Tbl3Ptrs, + 3, + agcInternalRegDefaultsV11Types, + 24, +}; + + +static ShaderRegister agcInternalRegDefaultsV4Tbl0Regs[] = { + {0x02af, 0x00040000}, + {0x01b5, 0x00000001}, +}; + +static const std::uint16_t agcInternalRegDefaultsV4Tbl0Ptrs[] = { + 0x0000, + 0x0001, +}; + +static ShaderRegister agcInternalRegDefaultsV4Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, + {0x0081, 0x00000000}, {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV4Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, +}; + +static ShaderRegister agcInternalRegDefaultsV4Tbl3Regs[] = { + {0x026c, 0x00000000}, + {0x026e, 0x00000000}, + {0x0278, 0x00000000}, + {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV4Tbl3Ptrs[] = { + 0x0000, + 0x0001, +}; + +static std::uint32_t agcInternalRegDefaultsV4Types[] = { + 0xb994ad29, 0x00040400, 0x00000000, 0xf58fea31, 0x00040404, 0x00000000, 0x6ac156ef, 0x00040401, + 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, + 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, + 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, + 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, + 0x0004042d, 0x00000000, 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, + 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0x929fd95d, 0x00040c07, + 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV4 = { + agcInternalRegDefaultsV4Tbl0Regs, + 2, + agcInternalRegDefaultsV4Tbl0Ptrs, + 2, + agcInternalRegDefaultsV4Tbl1Regs, + 15, + agcInternalRegDefaultsV4Tbl1Ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + agcInternalRegDefaultsV4Tbl3Regs, + 4, + agcInternalRegDefaultsV4Tbl3Ptrs, + 2, + agcInternalRegDefaultsV4Types, + 19, +}; + + +static ShaderRegister agcInternalRegDefaultsV5Tbl0Regs[] = { + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x01b5, 0x00000001}, +}; + +static const std::uint16_t agcInternalRegDefaultsV5Tbl0Ptrs[] = { + 0x0000, + 0x0001, + 0x0002, +}; + +static ShaderRegister agcInternalRegDefaultsV5Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, + {0x0081, 0x00000000}, {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV5Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, +}; + +static ShaderRegister agcInternalRegDefaultsV5Tbl3Regs[] = { + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV5Tbl3Ptrs[] = { + 0x0000, + 0x0001, + 0x0003, +}; + +static std::uint32_t agcInternalRegDefaultsV5Types[] = { + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xf58fea31, 0x00040408, + 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, + 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, + 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, + 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, + 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, 0xc620e68c, 0x00040431, 0x00000000, + 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, + 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV5 = { + agcInternalRegDefaultsV5Tbl0Regs, + 3, + agcInternalRegDefaultsV5Tbl0Ptrs, + 3, + agcInternalRegDefaultsV5Tbl1Regs, + 15, + agcInternalRegDefaultsV5Tbl1Ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + agcInternalRegDefaultsV5Tbl3Regs, + 6, + agcInternalRegDefaultsV5Tbl3Ptrs, + 3, + agcInternalRegDefaultsV5Types, + 21, +}; + + +static ShaderRegister agcInternalRegDefaultsV7Tbl0Regs[] = { + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, +}; + +static const std::uint16_t agcInternalRegDefaultsV7Tbl0Ptrs[] = { + 0x0000, + 0x0001, + 0x0002, + 0x0003, +}; + +static ShaderRegister agcInternalRegDefaultsV7Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, + {0x0081, 0x00000000}, {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV7Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, +}; + +static ShaderRegister agcInternalRegDefaultsV7Tbl3Regs[] = { + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV7Tbl3Ptrs[] = { + 0x0000, + 0x0001, + 0x0003, +}; + +static std::uint32_t agcInternalRegDefaultsV7Types[] = { + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xd427322f, 0x00040408, + 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, + 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, + 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, + 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, + 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, + 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, + 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, + 0x00040c0b, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV7 = { + agcInternalRegDefaultsV7Tbl0Regs, + 4, + agcInternalRegDefaultsV7Tbl0Ptrs, + 4, + agcInternalRegDefaultsV7Tbl1Regs, + 15, + agcInternalRegDefaultsV7Tbl1Ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + agcInternalRegDefaultsV7Tbl3Regs, + 6, + agcInternalRegDefaultsV7Tbl3Ptrs, + 3, + agcInternalRegDefaultsV7Types, + 22, +}; + + +static ShaderRegister agcInternalRegDefaultsV8Tbl0Regs[] = { + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, +}; + +static const std::uint16_t agcInternalRegDefaultsV8Tbl0Ptrs[] = { + 0x0000, + 0x0001, + 0x0002, + 0x0003, +}; + +static ShaderRegister agcInternalRegDefaultsV8Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, + {0x0081, 0x00000000}, {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV8Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, +}; + +static ShaderRegister agcInternalRegDefaultsV8Tbl3Regs[] = { + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV8Tbl3Ptrs[] = { + 0x0000, + 0x0001, + 0x0003, +}; + +static std::uint32_t agcInternalRegDefaultsV8Types[] = { + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xd427322f, 0x00040408, + 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, + 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, + 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, + 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, + 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, + 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, + 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, + 0x00040c0b, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV8 = { + agcInternalRegDefaultsV8Tbl0Regs, + 4, + agcInternalRegDefaultsV8Tbl0Ptrs, + 4, + agcInternalRegDefaultsV8Tbl1Regs, + 15, + agcInternalRegDefaultsV8Tbl1Ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + agcInternalRegDefaultsV8Tbl3Regs, + 6, + agcInternalRegDefaultsV8Tbl3Ptrs, + 3, + agcInternalRegDefaultsV8Types, + 22, +}; + + +static ShaderRegister agcInternalRegDefaultsV9Tbl0Regs[] = { + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, +}; + +static const std::uint16_t agcInternalRegDefaultsV9Tbl0Ptrs[] = { + 0x0000, + 0x0001, + 0x0002, + 0x0003, +}; + +static ShaderRegister agcInternalRegDefaultsV9Tbl1Regs[] = { + {0x0216, 0xffffffff}, {0x0217, 0xffffffff}, {0x0219, 0xffffffff}, {0x021a, 0xffffffff}, + {0x027d, 0x000004ff}, {0x022a, 0x00000000}, {0x0204, 0x00000000}, {0x0205, 0x00000000}, + {0x0206, 0x00000000}, {0x0080, 0x00000000}, {0x0100, 0x00000000}, {0x0006, 0x00000000}, + {0x0101, 0x00000000}, {0x0001, 0x00000003}, +}; + +static const std::uint16_t agcInternalRegDefaultsV9Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, + 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, +}; + +static ShaderRegister agcInternalRegDefaultsV9Tbl2Regs[] = { + {0x0260, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV9Tbl2Ptrs[] = { + 0x0000, +}; + +static ShaderRegister agcInternalRegDefaultsV9Tbl3Regs[] = { + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, +}; + +static const std::uint16_t agcInternalRegDefaultsV9Tbl3Ptrs[] = { + 0x0000, + 0x0001, + 0x0003, +}; + +static std::uint32_t agcInternalRegDefaultsV9Types[] = { + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xd427322f, 0x00040408, + 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, + 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, + 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, + 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, + 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, + 0xc67efacf, 0x00040431, 0x00000000, 0xd9e6d9f7, 0x00040435, 0x00000000, 0x60289246, 0x00040402, + 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, + 0x00040c0b, 0x00000000, +}; + +static CompactRegisterDefaults agcInternalRegDefaultsV9 = { + agcInternalRegDefaultsV9Tbl0Regs, 4, agcInternalRegDefaultsV9Tbl0Ptrs, 4, + agcInternalRegDefaultsV9Tbl1Regs, 14, agcInternalRegDefaultsV9Tbl1Ptrs, 14, + agcInternalRegDefaultsV9Tbl2Regs, 1, agcInternalRegDefaultsV9Tbl2Ptrs, 1, + agcInternalRegDefaultsV9Tbl3Regs, 6, agcInternalRegDefaultsV9Tbl3Ptrs, 3, + agcInternalRegDefaultsV9Types, 22, +}; + + +static ShaderRegister agcPublicRegDefaultsV0Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000008}, {0x0104, 0x00000000}, {0x008f, 0x00000000}, + {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, {0x000b, 0x00000000}, + {0x0200, 0x00000000}, {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, + {0x001f, 0x00000000}, {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, + {0x010c, 0x00000000}, {0x010d, 0x00000000}, {0x000a, 0x00000000}, {0x010b, 0x00000000}, + {0x01ff, 0x00000000}, {0x0204, 0x00000000}, {0x020d, 0x00000000}, {0x0206, 0x0000043f}, + {0x02f8, 0x00000000}, {0x0083, 0x0000ffff}, {0x0313, 0x00006000}, {0x00f0, 0x00000000}, + {0x00f1, 0x00000000}, {0x00f2, 0x00000000}, {0x00ea, 0x00000000}, {0x00e9, 0x00000000}, + {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, {0x0080, 0x00000000}, + {0x0211, 0x00000000}, {0x0210, 0x00000000}, {0x008d, 0x00000000}, {0x0282, 0x00000008}, + {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, {0x02de, 0x000001e9}, + {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, {0x01ba, 0x00000000}, + {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, {0x029b, 0x00000002}, {0x02d6, 0x00000000}, + {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, + {0x02d4, 0x88101010}, {0x02db, 0x00000000}, {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, + {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, {0x0300, 0x00000000}, {0x0301, 0x00000000}, + {0x0302, 0x00000000}, {0x0303, 0x00000000}, {0x0304, 0x00000000}, {0x0305, 0x00000000}, + {0x0306, 0x00000000}, {0x0307, 0x00000000}, {0x0308, 0x00000000}, {0x0309, 0x00000000}, + {0x030a, 0x00000000}, {0x030b, 0x00000000}, {0x030c, 0x00000000}, {0x030d, 0x00000000}, + {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, {0x0311, 0x01f92000}, {0x0312, 0x03ff0080}, + {0x0105, 0x00000000}, {0x0106, 0x00000000}, {0x0107, 0x00000000}, {0x0108, 0x00000000}, + {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, + {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, + {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0084, 0x00000000}, {0x0085, 0x20002000}, + {0x0086, 0x00000000}, {0x0087, 0x20002000}, {0x0088, 0x00000000}, {0x0089, 0x20002000}, + {0x008a, 0x00000000}, {0x008b, 0x20002000}, {0x0008, 0x00000000}, {0x0009, 0x00000000}, + {0x0010, 0x80000180}, {0x0011, 0x20000180}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, + {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x0016, 0x00000000}, {0x0017, 0x00000000}, + {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, + {0x001e, 0x00000000}, {0x0002, 0x00000000}, {0x0005, 0x00000000}, {0x02af, 0x00040000}, + {0x0007, 0x00000000}, {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, {0x0090, 0x80000000}, + {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, {0x02fb, 0x3f800000}, {0x02fc, 0x3f800000}, + {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, {0x02e3, 0x00000000}, {0x02e0, 0x00000000}, + {0x02e1, 0x00000000}, {0x0003, 0x00000000}, {0x0004, 0x00000000}, {0x0318, 0x00000000}, + {0x0319, 0x00000000}, {0x031a, 0x00000000}, {0x031b, 0x00000000}, {0x031c, 0x00000000}, + {0x031d, 0x00000000}, {0x031e, 0x00000048}, {0x031f, 0x00000000}, {0x0320, 0x00000000}, + {0x0321, 0x00000000}, {0x0322, 0x00000000}, {0x0323, 0x00000000}, {0x0324, 0x00000000}, + {0x0325, 0x00000000}, {0x0390, 0x00000000}, {0x0398, 0x00000000}, {0x03a0, 0x00000000}, + {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, {0x03b8, 0x08c6c000}, {0x0327, 0x00000000}, + {0x0328, 0x00000000}, {0x0329, 0x00000000}, {0x032a, 0x00000000}, {0x032b, 0x00000000}, + {0x032c, 0x00000000}, {0x032d, 0x00000048}, {0x032e, 0x00000000}, {0x032f, 0x00000000}, + {0x0330, 0x00000000}, {0x0331, 0x00000000}, {0x0332, 0x00000000}, {0x0333, 0x00000000}, + {0x0334, 0x00000000}, {0x0391, 0x00000000}, {0x0399, 0x00000000}, {0x03a1, 0x00000000}, + {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, {0x03b9, 0x08c6c000}, {0x0336, 0x00000000}, + {0x0337, 0x00000000}, {0x0338, 0x00000000}, {0x0339, 0x00000000}, {0x033a, 0x00000000}, + {0x033b, 0x00000000}, {0x033c, 0x00000048}, {0x033d, 0x00000000}, {0x033e, 0x00000000}, + {0x033f, 0x00000000}, {0x0340, 0x00000000}, {0x0341, 0x00000000}, {0x0342, 0x00000000}, + {0x0343, 0x00000000}, {0x0392, 0x00000000}, {0x039a, 0x00000000}, {0x03a2, 0x00000000}, + {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, {0x03ba, 0x08c6c000}, {0x0345, 0x00000000}, + {0x0346, 0x00000000}, {0x0347, 0x00000000}, {0x0348, 0x00000000}, {0x0349, 0x00000000}, + {0x034a, 0x00000000}, {0x034b, 0x00000048}, {0x034c, 0x00000000}, {0x034d, 0x00000000}, + {0x034e, 0x00000000}, {0x034f, 0x00000000}, {0x0350, 0x00000000}, {0x0351, 0x00000000}, + {0x0352, 0x00000000}, {0x0393, 0x00000000}, {0x039b, 0x00000000}, {0x03a3, 0x00000000}, + {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, {0x03bb, 0x08c6c000}, {0x0354, 0x00000000}, + {0x0355, 0x00000000}, {0x0356, 0x00000000}, {0x0357, 0x00000000}, {0x0358, 0x00000000}, + {0x0359, 0x00000000}, {0x035a, 0x00000048}, {0x035b, 0x00000000}, {0x035c, 0x00000000}, + {0x035d, 0x00000000}, {0x035e, 0x00000000}, {0x035f, 0x00000000}, {0x0360, 0x00000000}, + {0x0361, 0x00000000}, {0x0394, 0x00000000}, {0x039c, 0x00000000}, {0x03a4, 0x00000000}, + {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, {0x03bc, 0x08c6c000}, {0x0363, 0x00000000}, + {0x0364, 0x00000000}, {0x0365, 0x00000000}, {0x0366, 0x00000000}, {0x0367, 0x00000000}, + {0x0368, 0x00000000}, {0x0369, 0x00000048}, {0x036a, 0x00000000}, {0x036b, 0x00000000}, + {0x036c, 0x00000000}, {0x036d, 0x00000000}, {0x036e, 0x00000000}, {0x036f, 0x00000000}, + {0x0370, 0x00000000}, {0x0395, 0x00000000}, {0x039d, 0x00000000}, {0x03a5, 0x00000000}, + {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, {0x03bd, 0x08c6c000}, {0x0372, 0x00000000}, + {0x0373, 0x00000000}, {0x0374, 0x00000000}, {0x0375, 0x00000000}, {0x0376, 0x00000000}, + {0x0377, 0x00000000}, {0x0378, 0x00000048}, {0x0379, 0x00000000}, {0x037a, 0x00000000}, + {0x037b, 0x00000000}, {0x037c, 0x00000000}, {0x037d, 0x00000000}, {0x037e, 0x00000000}, + {0x037f, 0x00000000}, {0x0396, 0x00000000}, {0x039e, 0x00000000}, {0x03a6, 0x00000000}, + {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, {0x03be, 0x08c6c000}, {0x0381, 0x00000000}, + {0x0382, 0x00000000}, {0x0383, 0x00000000}, {0x0384, 0x00000000}, {0x0385, 0x00000000}, + {0x0386, 0x00000000}, {0x0387, 0x00000048}, {0x0388, 0x00000000}, {0x0389, 0x00000000}, + {0x038a, 0x00000000}, {0x038b, 0x00000000}, {0x038c, 0x00000000}, {0x038d, 0x00000000}, + {0x038e, 0x00000000}, {0x0397, 0x00000000}, {0x039f, 0x00000000}, {0x03a7, 0x00000000}, + {0x03af, 0x00000000}, {0x03b7, 0x00000000}, {0x03bf, 0x08c6c000}, {0x000c, 0x00000000}, + {0x000d, 0x40004000}, {0x0191, 0x00000000}, {0x0192, 0x00000000}, {0x0193, 0x00000000}, + {0x0194, 0x00000000}, {0x0195, 0x00000000}, {0x0196, 0x00000000}, {0x0197, 0x00000000}, + {0x0198, 0x00000000}, {0x0199, 0x00000000}, {0x019a, 0x00000000}, {0x019b, 0x00000000}, + {0x019c, 0x00000000}, {0x019d, 0x00000000}, {0x019e, 0x00000000}, {0x019f, 0x00000000}, + {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, {0x01a2, 0x00000000}, {0x01a3, 0x00000000}, + {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, {0x01a6, 0x00000000}, {0x01a7, 0x00000000}, + {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, {0x01aa, 0x00000000}, {0x01ab, 0x00000000}, + {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, {0x01ae, 0x00000000}, {0x01af, 0x00000000}, + {0x01b0, 0x00000000}, {0x016f, 0x00000000}, {0x0170, 0x00000000}, {0x0171, 0x00000000}, + {0x0172, 0x00000000}, {0x0173, 0x00000000}, {0x0174, 0x00000000}, {0x0175, 0x00000000}, + {0x0176, 0x00000000}, {0x0177, 0x00000000}, {0x0178, 0x00000000}, {0x0179, 0x00000000}, + {0x017a, 0x00000000}, {0x017b, 0x00000000}, {0x017c, 0x00000000}, {0x017d, 0x00000000}, + {0x017e, 0x00000000}, {0x017f, 0x00000000}, {0x0180, 0x00000000}, {0x0181, 0x00000000}, + {0x0182, 0x00000000}, {0x0183, 0x00000000}, {0x0184, 0x00000000}, {0x0185, 0x00000000}, + {0x0186, 0x00000000}, {0x0187, 0x00000000}, {0x0188, 0x00000000}, {0x0189, 0x00000000}, + {0x018a, 0x00000000}, {0x018b, 0x00000000}, {0x018c, 0x00000000}, {0x018d, 0x00000000}, + {0x018e, 0x00000000}, {0x010f, 0x3f800000}, {0x0111, 0x3f800000}, {0x0113, 0x3f800000}, + {0x0110, 0x00000000}, {0x0112, 0x00000000}, {0x0114, 0x00000000}, {0x0094, 0x80000000}, + {0x0095, 0x40004000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0115, 0x3f800000}, + {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, {0x0116, 0x00000000}, {0x0118, 0x00000000}, + {0x011a, 0x00000000}, {0x0096, 0x80000000}, {0x0097, 0x40004000}, {0x00b6, 0x00000000}, + {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, {0x011d, 0x3f800000}, {0x011f, 0x3f800000}, + {0x011c, 0x00000000}, {0x011e, 0x00000000}, {0x0120, 0x00000000}, {0x0098, 0x80000000}, + {0x0099, 0x40004000}, {0x00b8, 0x00000000}, {0x00b9, 0x00000000}, {0x0121, 0x3f800000}, + {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, {0x0122, 0x00000000}, {0x0124, 0x00000000}, + {0x0126, 0x00000000}, {0x009a, 0x80000000}, {0x009b, 0x40004000}, {0x00ba, 0x00000000}, + {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, {0x0129, 0x3f800000}, {0x012b, 0x3f800000}, + {0x0128, 0x00000000}, {0x012a, 0x00000000}, {0x012c, 0x00000000}, {0x009c, 0x80000000}, + {0x009d, 0x40004000}, {0x00bc, 0x00000000}, {0x00bd, 0x00000000}, {0x012d, 0x3f800000}, + {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, {0x012e, 0x00000000}, {0x0130, 0x00000000}, + {0x0132, 0x00000000}, {0x009e, 0x80000000}, {0x009f, 0x40004000}, {0x00be, 0x00000000}, + {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, {0x0135, 0x3f800000}, {0x0137, 0x3f800000}, + {0x0134, 0x00000000}, {0x0136, 0x00000000}, {0x0138, 0x00000000}, {0x00a0, 0x80000000}, + {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, {0x00c1, 0x00000000}, {0x0139, 0x3f800000}, + {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, {0x013a, 0x00000000}, {0x013c, 0x00000000}, + {0x013e, 0x00000000}, {0x00a2, 0x80000000}, {0x00a3, 0x40004000}, {0x00c2, 0x00000000}, + {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, {0x0141, 0x3f800000}, {0x0143, 0x3f800000}, + {0x0140, 0x00000000}, {0x0142, 0x00000000}, {0x0144, 0x00000000}, {0x00a4, 0x80000000}, + {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, {0x00c5, 0x00000000}, {0x0145, 0x3f800000}, + {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, {0x0146, 0x00000000}, {0x0148, 0x00000000}, + {0x014a, 0x00000000}, {0x00a6, 0x80000000}, {0x00a7, 0x40004000}, {0x00c6, 0x00000000}, + {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, {0x014d, 0x3f800000}, {0x014f, 0x3f800000}, + {0x014c, 0x00000000}, {0x014e, 0x00000000}, {0x0150, 0x00000000}, {0x00a8, 0x80000000}, + {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0151, 0x3f800000}, + {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, {0x0152, 0x00000000}, {0x0154, 0x00000000}, + {0x0156, 0x00000000}, {0x00aa, 0x80000000}, {0x00ab, 0x40004000}, {0x00ca, 0x00000000}, + {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, {0x0159, 0x3f800000}, {0x015b, 0x3f800000}, + {0x0158, 0x00000000}, {0x015a, 0x00000000}, {0x015c, 0x00000000}, {0x00ac, 0x80000000}, + {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, {0x00cd, 0x00000000}, {0x015d, 0x3f800000}, + {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, {0x015e, 0x00000000}, {0x0160, 0x00000000}, + {0x0162, 0x00000000}, {0x00ae, 0x80000000}, {0x00af, 0x40004000}, {0x00ce, 0x00000000}, + {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, {0x0165, 0x3f800000}, {0x0167, 0x3f800000}, + {0x0164, 0x00000000}, {0x0166, 0x00000000}, {0x0168, 0x00000000}, {0x00b0, 0x80000000}, + {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, {0x00d1, 0x00000000}, {0x0169, 0x3f800000}, + {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, {0x016a, 0x00000000}, {0x016c, 0x00000000}, + {0x016e, 0x00000000}, {0x00b2, 0x80000000}, {0x00b3, 0x40004000}, {0x00d2, 0x00000000}, + {0x00d3, 0x00000000}, {0x0081, 0x80000000}, {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV0Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003c, + 0x004c, 0x004e, 0x0050, 0x0054, 0x005c, 0x005e, 0x0066, 0x0068, 0x0079, 0x007b, 0x007d, 0x0081, + 0x0083, 0x0085, 0x0087, 0x0127, 0x0129, 0x0149, 0x0169, 0x0209, +}; + +static ShaderRegister agcPublicRegDefaultsV0Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0101, 0x00000000}, {0x0087, 0x0000ffff}, {0x0081, 0x00000000}, {0x0007, 0x0000ffff}, + {0x0001, 0x00000003}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, {0x00c8, 0x00000000}, + {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, {0x0108, 0x00000000}, + {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, {0x0008, 0x00000000}, + {0x0009, 0x00000000}, {0x00b2, 0x00000000}, {0x00b3, 0x00000000}, {0x00b4, 0x00000000}, + {0x00b5, 0x00000000}, {0x0132, 0x00000000}, {0x0133, 0x00000000}, {0x0134, 0x00000000}, + {0x0135, 0x00000000}, {0x0032, 0x00000000}, {0x0033, 0x00000000}, {0x0034, 0x00000000}, + {0x0035, 0x00000000}, {0x0082, 0x00000000}, {0x0083, 0x00000000}, {0x0102, 0x00000000}, + {0x0103, 0x00000000}, {0x0240, 0x00000000}, {0x0241, 0x00000000}, {0x0242, 0x00000000}, + {0x0243, 0x00000000}, {0x0244, 0x00000000}, {0x0245, 0x00000000}, {0x0246, 0x00000000}, + {0x0247, 0x00000000}, {0x0248, 0x00000000}, {0x0249, 0x00000000}, {0x024a, 0x00000000}, + {0x024b, 0x00000000}, {0x024c, 0x00000000}, {0x024d, 0x00000000}, {0x024e, 0x00000000}, + {0x024f, 0x00000000}, {0x008c, 0x00000000}, {0x008d, 0x00000000}, {0x008e, 0x00000000}, + {0x008f, 0x00000000}, {0x0090, 0x00000000}, {0x0091, 0x00000000}, {0x0092, 0x00000000}, + {0x0093, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x0096, 0x00000000}, + {0x0097, 0x00000000}, {0x0098, 0x00000000}, {0x0099, 0x00000000}, {0x009a, 0x00000000}, + {0x009b, 0x00000000}, {0x009c, 0x00000000}, {0x009d, 0x00000000}, {0x009e, 0x00000000}, + {0x009f, 0x00000000}, {0x00a0, 0x00000000}, {0x00a1, 0x00000000}, {0x00a2, 0x00000000}, + {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, {0x00a5, 0x00000000}, {0x00a6, 0x00000000}, + {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, {0x00a9, 0x00000000}, {0x00aa, 0x00000000}, + {0x00ab, 0x00000000}, {0x010c, 0x00000000}, {0x010d, 0x00000000}, {0x010e, 0x00000000}, + {0x010f, 0x00000000}, {0x0110, 0x00000000}, {0x0111, 0x00000000}, {0x0112, 0x00000000}, + {0x0113, 0x00000000}, {0x0114, 0x00000000}, {0x0115, 0x00000000}, {0x0116, 0x00000000}, + {0x0117, 0x00000000}, {0x0118, 0x00000000}, {0x0119, 0x00000000}, {0x011a, 0x00000000}, + {0x011b, 0x00000000}, {0x011c, 0x00000000}, {0x011d, 0x00000000}, {0x011e, 0x00000000}, + {0x011f, 0x00000000}, {0x0120, 0x00000000}, {0x0121, 0x00000000}, {0x0122, 0x00000000}, + {0x0123, 0x00000000}, {0x0124, 0x00000000}, {0x0125, 0x00000000}, {0x0126, 0x00000000}, + {0x0127, 0x00000000}, {0x0128, 0x00000000}, {0x0129, 0x00000000}, {0x012a, 0x00000000}, + {0x012b, 0x00000000}, {0x000c, 0x00000000}, {0x000d, 0x00000000}, {0x000e, 0x00000000}, + {0x000f, 0x00000000}, {0x0010, 0x00000000}, {0x0011, 0x00000000}, {0x0012, 0x00000000}, + {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x0016, 0x00000000}, + {0x0017, 0x00000000}, {0x0018, 0x00000000}, {0x0019, 0x00000000}, {0x001a, 0x00000000}, + {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, {0x001e, 0x00000000}, + {0x001f, 0x00000000}, {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0022, 0x00000000}, + {0x0023, 0x00000000}, {0x0024, 0x00000000}, {0x0025, 0x00000000}, {0x0026, 0x00000000}, + {0x0027, 0x00000000}, {0x0028, 0x00000000}, {0x0029, 0x00000000}, {0x002a, 0x00000000}, + {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV0Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, 0x0021, + 0x0025, 0x0029, 0x002d, 0x002f, 0x0031, 0x0041, 0x0061, 0x0081, +}; + +static ShaderRegister agcPublicRegDefaultsV0Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x02e4, 0x00000000}, {0x02e5, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02cc, 0x00000000}, {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, + {0x02cf, 0x00000000}, {0x02bd, 0x00000000}, {0x02bc, 0x00000000}, {0x02e6, 0x00000000}, + {0x02e7, 0x00000000}, {0x02c8, 0x00000000}, {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, + {0x02cb, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bf, 0x00000000}, + {0x02be, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV0Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, + 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, + 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, +}; + +static std::uint32_t agcPublicRegDefaultsV0Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0xac198e0b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0x7d42019a, 0x00040428, + 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, + 0x00040434, 0x00000000, 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, + 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, 0x7f7bd53e, 0x00040448, + 0x00000000, 0x0c06f17c, 0x0004044c, 0x00000000, 0x6f104b72, 0x00040450, 0x00000000, 0x25c70d9c, + 0x00040454, 0x00000000, 0x3881201e, 0x00040458, 0x00000000, 0x09afddaf, 0x0004045c, 0x00000000, + 0x367d63cf, 0x00040460, 0x00000000, 0x43707db8, 0x00040464, 0x00000000, 0xf6ae26ba, 0x00040468, + 0x00000000, 0x1b917652, 0x0004046c, 0x00000000, 0x2cac726e, 0x00040470, 0x00000000, 0x2cac7111, + 0x00040474, 0x00000000, 0x94b1e4f7, 0x00040478, 0x00000000, 0xe3661b6c, 0x0004047c, 0x00000000, + 0x1eb8d73a, 0x00040480, 0x00000000, 0x15051fa3, 0x00040484, 0x00000000, 0x9c51a7f1, 0x00040488, + 0x00000000, 0xa20efc70, 0x0004048c, 0x00000000, 0x0ec09f6e, 0x00040490, 0x00000000, 0x34a7d6d3, + 0x00040494, 0x00000000, 0xce831b94, 0x00040498, 0x00000000, 0x5cc72a74, 0x0004049c, 0x00000000, + 0x3b77713c, 0x000404a0, 0x00000000, 0x40f64410, 0x000404a4, 0x00000000, 0x69441268, 0x000404a8, + 0x00000000, 0x2e418b83, 0x000404ac, 0x00000000, 0xa00d0c8d, 0x000404b0, 0x00000000, 0xb1289fb3, + 0x000404b4, 0x00000000, 0x144832fb, 0x000404b8, 0x00000000, 0x9890d9fa, 0x000404bc, 0x00000000, + 0x9016faf1, 0x000404c0, 0x00000000, 0x4b73ce27, 0x000404c4, 0x00000000, 0x5f5a3e7b, 0x000404c8, + 0x00000000, 0xd4af3a51, 0x000404cc, 0x00000000, 0x6cf4f543, 0x000404d0, 0x00000000, 0x5fb86ccb, + 0x000404d4, 0x00000000, 0xedefa188, 0x000404d8, 0x00000000, 0xd0de9ee6, 0x000404dc, 0x00000000, + 0xc5831803, 0x000404e0, 0x00000000, 0x8e6de84b, 0x000404e4, 0x00000000, 0xd0771662, 0x000408e8, + 0x00000000, 0x569f7444, 0x004004ec, 0x00000000, 0x5c6637cd, 0x000408f0, 0x00000000, 0xcae3e690, + 0x000408f4, 0x00000000, 0x43fbd769, 0x000410f8, 0x00000000, 0xef550356, 0x002004fc, 0x00000000, + 0x8f52e279, 0x00040900, 0x00000000, 0x1f2d8149, 0x00100904, 0x00000000, 0x4413c6f9, 0x00040908, + 0x00000000, 0x67096014, 0x0004450c, 0x00000000, 0x88f5e915, 0x00040910, 0x00000000, 0x918106bb, + 0x00040914, 0x00000000, 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, + 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, 0x38e92c91, 0x00205128, + 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, + 0x00201134, 0x00000000, 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, + 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, + 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, + 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, + 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, + 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00041831, 0x00000000, 0xc918df3e, + 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, + 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, + 0x00000000, 0xb26219ca, 0x0010044d, 0x00000000, 0xb25b6cf9, 0x00100451, 0x00000000, 0xb2f86101, + 0x00100455, 0x00000000, 0x07e3b155, 0x00040859, 0x00000000, 0x07e383c6, 0x0004085d, 0x00000000, + 0xbda98653, 0x00400461, 0x00000000, 0xbdbd1d0f, 0x00800465, 0x00000000, 0xbd946fd4, 0x00800469, + 0x00000000, 0xbdf02a4c, 0x0080046d, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xf6be6f25, + 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, 0x862ee1be, 0x0004042e, 0x00000000, + 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, 0x00000000, 0xd1006f62, 0x0004043a, + 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, 0x00040442, 0x00000000, 0x141f6002, + 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, 0x14f68dfa, 0x0004044e, 0x00000000, + 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, 0x00000000, 0x5d9ed616, 0x0004045a, + 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, 0x00040462, 0x00000000, 0x5f4aaed9, + 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, 0x5ec84729, 0x0004046e, 0x00000000, + 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, 0x00000000, 0x5f0f3449, 0x0004047a, + 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, 0x00040482, 0x00000000, 0xee4f8201, + 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, 0x381fc91f, 0x0004048e, 0x00000000, + 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, 0x00000000, 0xf6d8a76e, 0x0004049a, + 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, 0x000404a2, 0x00000000, 0x98a09d0e, + 0x000408a6, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV0 = { + agcPublicRegDefaultsV0Tbl0Regs, + 523, + agcPublicRegDefaultsV0Tbl0Ptrs, + 80, + agcPublicRegDefaultsV0Tbl1Regs, + 161, + agcPublicRegDefaultsV0Tbl1Ptrs, + 28, + agcPublicRegDefaultsV0Tbl2Regs, + 43, + agcPublicRegDefaultsV0Tbl2Ptrs, + 42, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV0Types, + 150, +}; + + +static ShaderRegister agcPublicRegDefaultsV10Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000010}, {0x01e0, 0x20010001}, {0x0104, 0x00000000}, + {0x008f, 0x00000000}, {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, + {0x0200, 0x00000000}, {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, + {0x001f, 0x00000000}, {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, + {0x010c, 0x00000000}, {0x010d, 0x00000000}, {0x010b, 0x00000000}, {0x01ff, 0x00000000}, + {0x0204, 0x00000000}, {0x020d, 0x00000000}, {0x0206, 0x0000043f}, {0x02f8, 0x00000000}, + {0x0083, 0x0000ffff}, {0x0313, 0x00006000}, {0x00f0, 0x00000000}, {0x00ea, 0x00000000}, + {0x00e9, 0x00000000}, {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, + {0x0080, 0x00000000}, {0x0211, 0x00000000}, {0x0210, 0x04000000}, {0x008d, 0x00000000}, + {0x0282, 0x00000008}, {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, + {0x02de, 0x000001e9}, {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, + {0x01ba, 0x00000000}, {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, {0x029b, 0x00000002}, + {0x02d6, 0x00000000}, {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, {0x02ad, 0x00000000}, + {0x02d5, 0x00002000}, {0x02d4, 0x88101000}, {0x02db, 0x00000000}, {0x02f5, 0x00000000}, + {0x02f6, 0x00000000}, {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, {0x0300, 0x00000000}, + {0x0301, 0x00000000}, {0x0302, 0x00000000}, {0x0303, 0x00000000}, {0x0304, 0x00000000}, + {0x0305, 0x00000000}, {0x0306, 0x00000000}, {0x0307, 0x00000000}, {0x0308, 0x00000000}, + {0x0309, 0x00000000}, {0x030a, 0x00000000}, {0x030b, 0x00000000}, {0x030c, 0x00000000}, + {0x030d, 0x00000000}, {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, {0x0311, 0x01fd2002}, + {0x0312, 0x03ff0080}, {0x0105, 0x00000000}, {0x0106, 0x00000000}, {0x0107, 0x00000000}, + {0x0108, 0x00000000}, {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, {0x01e2, 0x20010001}, + {0x01e3, 0x20010001}, {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, {0x01e6, 0x20010001}, + {0x01e7, 0x20010001}, {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0084, 0x00000000}, + {0x0085, 0x20002000}, {0x0086, 0x00000000}, {0x0087, 0x20002000}, {0x0088, 0x00000000}, + {0x0089, 0x20002000}, {0x008a, 0x00000000}, {0x008b, 0x20002000}, {0x00db, 0x00000000}, + {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0010, 0x80000180}, {0x0011, 0x20000180}, + {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, + {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, + {0x001e, 0x00000000}, {0x0002, 0x00000000}, {0x0005, 0x00000000}, {0x0007, 0x00000000}, + {0x000b, 0x00000000}, {0x000a, 0x00000000}, {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, + {0x00f1, 0x00000000}, {0x00f2, 0x00000000}, {0x0090, 0x80000000}, {0x0091, 0x40004000}, + {0x02fa, 0x3f800000}, {0x02fb, 0x3f800000}, {0x02fc, 0x3f800000}, {0x02fd, 0x3f800000}, + {0x02e2, 0x00000000}, {0x02e3, 0x00000000}, {0x02e0, 0x00000000}, {0x02e1, 0x00000000}, + {0x0003, 0x00000000}, {0x0004, 0x00000000}, {0x0318, 0x00000000}, {0x031b, 0x00000000}, + {0x031c, 0x00000000}, {0x031d, 0x00000000}, {0x031e, 0x00000048}, {0x031f, 0x00000000}, + {0x0321, 0x00000000}, {0x0323, 0x00000000}, {0x0324, 0x00000000}, {0x0325, 0x00000000}, + {0x0390, 0x00000000}, {0x0398, 0x00000000}, {0x03a0, 0x00000000}, {0x03a8, 0x00000000}, + {0x03b0, 0x00000000}, {0x03b8, 0x08c6c000}, {0x0327, 0x00000000}, {0x032a, 0x00000000}, + {0x032b, 0x00000000}, {0x032c, 0x00000000}, {0x032d, 0x00000048}, {0x032e, 0x00000000}, + {0x0330, 0x00000000}, {0x0332, 0x00000000}, {0x0333, 0x00000000}, {0x0334, 0x00000000}, + {0x0391, 0x00000000}, {0x0399, 0x00000000}, {0x03a1, 0x00000000}, {0x03a9, 0x00000000}, + {0x03b1, 0x00000000}, {0x03b9, 0x08c6c000}, {0x0336, 0x00000000}, {0x0339, 0x00000000}, + {0x033a, 0x00000000}, {0x033b, 0x00000000}, {0x033c, 0x00000048}, {0x033d, 0x00000000}, + {0x033f, 0x00000000}, {0x0341, 0x00000000}, {0x0342, 0x00000000}, {0x0343, 0x00000000}, + {0x0392, 0x00000000}, {0x039a, 0x00000000}, {0x03a2, 0x00000000}, {0x03aa, 0x00000000}, + {0x03b2, 0x00000000}, {0x03ba, 0x08c6c000}, {0x0345, 0x00000000}, {0x0348, 0x00000000}, + {0x0349, 0x00000000}, {0x034a, 0x00000000}, {0x034b, 0x00000048}, {0x034c, 0x00000000}, + {0x034e, 0x00000000}, {0x0350, 0x00000000}, {0x0351, 0x00000000}, {0x0352, 0x00000000}, + {0x0393, 0x00000000}, {0x039b, 0x00000000}, {0x03a3, 0x00000000}, {0x03ab, 0x00000000}, + {0x03b3, 0x00000000}, {0x03bb, 0x08c6c000}, {0x0354, 0x00000000}, {0x0357, 0x00000000}, + {0x0358, 0x00000000}, {0x0359, 0x00000000}, {0x035a, 0x00000048}, {0x035b, 0x00000000}, + {0x035d, 0x00000000}, {0x035f, 0x00000000}, {0x0360, 0x00000000}, {0x0361, 0x00000000}, + {0x0394, 0x00000000}, {0x039c, 0x00000000}, {0x03a4, 0x00000000}, {0x03ac, 0x00000000}, + {0x03b4, 0x00000000}, {0x03bc, 0x08c6c000}, {0x0363, 0x00000000}, {0x0366, 0x00000000}, + {0x0367, 0x00000000}, {0x0368, 0x00000000}, {0x0369, 0x00000048}, {0x036a, 0x00000000}, + {0x036c, 0x00000000}, {0x036e, 0x00000000}, {0x036f, 0x00000000}, {0x0370, 0x00000000}, + {0x0395, 0x00000000}, {0x039d, 0x00000000}, {0x03a5, 0x00000000}, {0x03ad, 0x00000000}, + {0x03b5, 0x00000000}, {0x03bd, 0x08c6c000}, {0x0372, 0x00000000}, {0x0375, 0x00000000}, + {0x0376, 0x00000000}, {0x0377, 0x00000000}, {0x0378, 0x00000048}, {0x0379, 0x00000000}, + {0x037b, 0x00000000}, {0x037d, 0x00000000}, {0x037e, 0x00000000}, {0x037f, 0x00000000}, + {0x0396, 0x00000000}, {0x039e, 0x00000000}, {0x03a6, 0x00000000}, {0x03ae, 0x00000000}, + {0x03b6, 0x00000000}, {0x03be, 0x08c6c000}, {0x0381, 0x00000000}, {0x0384, 0x00000000}, + {0x0385, 0x00000000}, {0x0386, 0x00000000}, {0x0387, 0x00000048}, {0x0388, 0x00000000}, + {0x038a, 0x00000000}, {0x038c, 0x00000000}, {0x038d, 0x00000000}, {0x038e, 0x00000000}, + {0x0397, 0x00000000}, {0x039f, 0x00000000}, {0x03a7, 0x00000000}, {0x03af, 0x00000000}, + {0x03b7, 0x00000000}, {0x03bf, 0x08c6c000}, {0x000c, 0x00000000}, {0x000d, 0x40004000}, + {0x0191, 0x00000000}, {0x0192, 0x00000000}, {0x0193, 0x00000000}, {0x0194, 0x00000000}, + {0x0195, 0x00000000}, {0x0196, 0x00000000}, {0x0197, 0x00000000}, {0x0198, 0x00000000}, + {0x0199, 0x00000000}, {0x019a, 0x00000000}, {0x019b, 0x00000000}, {0x019c, 0x00000000}, + {0x019d, 0x00000000}, {0x019e, 0x00000000}, {0x019f, 0x00000000}, {0x01a0, 0x00000000}, + {0x01a1, 0x00000000}, {0x01a2, 0x00000000}, {0x01a3, 0x00000000}, {0x01a4, 0x00000000}, + {0x01a5, 0x00000000}, {0x01a6, 0x00000000}, {0x01a7, 0x00000000}, {0x01a8, 0x00000000}, + {0x01a9, 0x00000000}, {0x01aa, 0x00000000}, {0x01ab, 0x00000000}, {0x01ac, 0x00000000}, + {0x01ad, 0x00000000}, {0x01ae, 0x00000000}, {0x01af, 0x00000000}, {0x01b0, 0x00000000}, + {0x016f, 0x00000000}, {0x0170, 0x00000000}, {0x0171, 0x00000000}, {0x0172, 0x00000000}, + {0x0173, 0x00000000}, {0x0174, 0x00000000}, {0x0175, 0x00000000}, {0x0176, 0x00000000}, + {0x0177, 0x00000000}, {0x0178, 0x00000000}, {0x0179, 0x00000000}, {0x017a, 0x00000000}, + {0x017b, 0x00000000}, {0x017c, 0x00000000}, {0x017d, 0x00000000}, {0x017e, 0x00000000}, + {0x017f, 0x00000000}, {0x0180, 0x00000000}, {0x0181, 0x00000000}, {0x0182, 0x00000000}, + {0x0183, 0x00000000}, {0x0184, 0x00000000}, {0x0185, 0x00000000}, {0x0186, 0x00000000}, + {0x010f, 0x3f800000}, {0x0111, 0x3f800000}, {0x0113, 0x3f800000}, {0x0110, 0x00000000}, + {0x0112, 0x00000000}, {0x0114, 0x00000000}, {0x0094, 0x80000000}, {0x0095, 0x40004000}, + {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0115, 0x3f800000}, {0x0117, 0x3f800000}, + {0x0119, 0x3f800000}, {0x0116, 0x00000000}, {0x0118, 0x00000000}, {0x011a, 0x00000000}, + {0x0096, 0x80000000}, {0x0097, 0x40004000}, {0x00b6, 0x00000000}, {0x00b7, 0x00000000}, + {0x011b, 0x3f800000}, {0x011d, 0x3f800000}, {0x011f, 0x3f800000}, {0x011c, 0x00000000}, + {0x011e, 0x00000000}, {0x0120, 0x00000000}, {0x0098, 0x80000000}, {0x0099, 0x40004000}, + {0x00b8, 0x00000000}, {0x00b9, 0x00000000}, {0x0121, 0x3f800000}, {0x0123, 0x3f800000}, + {0x0125, 0x3f800000}, {0x0122, 0x00000000}, {0x0124, 0x00000000}, {0x0126, 0x00000000}, + {0x009a, 0x80000000}, {0x009b, 0x40004000}, {0x00ba, 0x00000000}, {0x00bb, 0x00000000}, + {0x0127, 0x3f800000}, {0x0129, 0x3f800000}, {0x012b, 0x3f800000}, {0x0128, 0x00000000}, + {0x012a, 0x00000000}, {0x012c, 0x00000000}, {0x009c, 0x80000000}, {0x009d, 0x40004000}, + {0x00bc, 0x00000000}, {0x00bd, 0x00000000}, {0x012d, 0x3f800000}, {0x012f, 0x3f800000}, + {0x0131, 0x3f800000}, {0x012e, 0x00000000}, {0x0130, 0x00000000}, {0x0132, 0x00000000}, + {0x009e, 0x80000000}, {0x009f, 0x40004000}, {0x00be, 0x00000000}, {0x00bf, 0x00000000}, + {0x0133, 0x3f800000}, {0x0135, 0x3f800000}, {0x0137, 0x3f800000}, {0x0134, 0x00000000}, + {0x0136, 0x00000000}, {0x0138, 0x00000000}, {0x00a0, 0x80000000}, {0x00a1, 0x40004000}, + {0x00c0, 0x00000000}, {0x00c1, 0x00000000}, {0x0139, 0x3f800000}, {0x013b, 0x3f800000}, + {0x013d, 0x3f800000}, {0x013a, 0x00000000}, {0x013c, 0x00000000}, {0x013e, 0x00000000}, + {0x00a2, 0x80000000}, {0x00a3, 0x40004000}, {0x00c2, 0x00000000}, {0x00c3, 0x00000000}, + {0x013f, 0x3f800000}, {0x0141, 0x3f800000}, {0x0143, 0x3f800000}, {0x0140, 0x00000000}, + {0x0142, 0x00000000}, {0x0144, 0x00000000}, {0x00a4, 0x80000000}, {0x00a5, 0x40004000}, + {0x00c4, 0x00000000}, {0x00c5, 0x00000000}, {0x0145, 0x3f800000}, {0x0147, 0x3f800000}, + {0x0149, 0x3f800000}, {0x0146, 0x00000000}, {0x0148, 0x00000000}, {0x014a, 0x00000000}, + {0x00a6, 0x80000000}, {0x00a7, 0x40004000}, {0x00c6, 0x00000000}, {0x00c7, 0x00000000}, + {0x014b, 0x3f800000}, {0x014d, 0x3f800000}, {0x014f, 0x3f800000}, {0x014c, 0x00000000}, + {0x014e, 0x00000000}, {0x0150, 0x00000000}, {0x00a8, 0x80000000}, {0x00a9, 0x40004000}, + {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0151, 0x3f800000}, {0x0153, 0x3f800000}, + {0x0155, 0x3f800000}, {0x0152, 0x00000000}, {0x0154, 0x00000000}, {0x0156, 0x00000000}, + {0x00aa, 0x80000000}, {0x00ab, 0x40004000}, {0x00ca, 0x00000000}, {0x00cb, 0x00000000}, + {0x0157, 0x3f800000}, {0x0159, 0x3f800000}, {0x015b, 0x3f800000}, {0x0158, 0x00000000}, + {0x015a, 0x00000000}, {0x015c, 0x00000000}, {0x00ac, 0x80000000}, {0x00ad, 0x40004000}, + {0x00cc, 0x00000000}, {0x00cd, 0x00000000}, {0x015d, 0x3f800000}, {0x015f, 0x3f800000}, + {0x0161, 0x3f800000}, {0x015e, 0x00000000}, {0x0160, 0x00000000}, {0x0162, 0x00000000}, + {0x00ae, 0x80000000}, {0x00af, 0x40004000}, {0x00ce, 0x00000000}, {0x00cf, 0x00000000}, + {0x0163, 0x3f800000}, {0x0165, 0x3f800000}, {0x0167, 0x3f800000}, {0x0164, 0x00000000}, + {0x0166, 0x00000000}, {0x0168, 0x00000000}, {0x00b0, 0x80000000}, {0x00b1, 0x40004000}, + {0x00d0, 0x00000000}, {0x00d1, 0x00000000}, {0x0169, 0x3f800000}, {0x016b, 0x3f800000}, + {0x016d, 0x3f800000}, {0x016a, 0x00000000}, {0x016c, 0x00000000}, {0x016e, 0x00000000}, + {0x00b2, 0x80000000}, {0x00b3, 0x40004000}, {0x00d2, 0x00000000}, {0x00d3, 0x00000000}, + {0x0081, 0x80000000}, {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV10Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0039, 0x0049, 0x004b, 0x004d, + 0x0051, 0x0059, 0x005b, 0x0063, 0x0064, 0x0066, 0x0076, 0x0078, 0x007a, 0x007c, 0x0080, 0x0082, + 0x0084, 0x0086, 0x0106, 0x0108, 0x0128, 0x0140, 0x01e0, +}; + +static ShaderRegister agcPublicRegDefaultsV10Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0087, 0x0000ffff}, {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, + {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, + {0x0108, 0x00000000}, {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, + {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0280, 0x00000000}, {0x00b2, 0x00000000}, + {0x00b3, 0x00000000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0132, 0x00000000}, + {0x0133, 0x00000000}, {0x0134, 0x00000000}, {0x0135, 0x00000000}, {0x0032, 0x00000000}, + {0x0033, 0x00000000}, {0x0034, 0x00000000}, {0x0035, 0x00000000}, {0x0082, 0x00000000}, + {0x0083, 0x00000000}, {0x0102, 0x00000000}, {0x0103, 0x00000000}, {0x0240, 0x00000000}, + {0x0241, 0x00000000}, {0x0242, 0x00000000}, {0x0243, 0x00000000}, {0x0244, 0x00000000}, + {0x0245, 0x00000000}, {0x0246, 0x00000000}, {0x0247, 0x00000000}, {0x0248, 0x00000000}, + {0x0249, 0x00000000}, {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x024c, 0x00000000}, + {0x024d, 0x00000000}, {0x024e, 0x00000000}, {0x024f, 0x00000000}, {0x008c, 0x00000000}, + {0x008d, 0x00000000}, {0x008e, 0x00000000}, {0x008f, 0x00000000}, {0x0090, 0x00000000}, + {0x0091, 0x00000000}, {0x0092, 0x00000000}, {0x0093, 0x00000000}, {0x0094, 0x00000000}, + {0x0095, 0x00000000}, {0x0096, 0x00000000}, {0x0097, 0x00000000}, {0x0098, 0x00000000}, + {0x0099, 0x00000000}, {0x009a, 0x00000000}, {0x009b, 0x00000000}, {0x009c, 0x00000000}, + {0x009d, 0x00000000}, {0x009e, 0x00000000}, {0x009f, 0x00000000}, {0x00a0, 0x00000000}, + {0x00a1, 0x00000000}, {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, + {0x00a5, 0x00000000}, {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, + {0x00a9, 0x00000000}, {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010e, 0x00000000}, {0x010f, 0x00000000}, {0x0110, 0x00000000}, + {0x0111, 0x00000000}, {0x0112, 0x00000000}, {0x0113, 0x00000000}, {0x0114, 0x00000000}, + {0x0115, 0x00000000}, {0x0116, 0x00000000}, {0x0117, 0x00000000}, {0x0118, 0x00000000}, + {0x0119, 0x00000000}, {0x011a, 0x00000000}, {0x011b, 0x00000000}, {0x011c, 0x00000000}, + {0x011d, 0x00000000}, {0x011e, 0x00000000}, {0x011f, 0x00000000}, {0x0120, 0x00000000}, + {0x0121, 0x00000000}, {0x0122, 0x00000000}, {0x0123, 0x00000000}, {0x0124, 0x00000000}, + {0x0125, 0x00000000}, {0x0126, 0x00000000}, {0x0127, 0x00000000}, {0x0128, 0x00000000}, + {0x0129, 0x00000000}, {0x012a, 0x00000000}, {0x012b, 0x00000000}, {0x000c, 0x00000000}, + {0x000d, 0x00000000}, {0x000e, 0x00000000}, {0x000f, 0x00000000}, {0x0010, 0x00000000}, + {0x0011, 0x00000000}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, + {0x0015, 0x00000000}, {0x0016, 0x00000000}, {0x0017, 0x00000000}, {0x0018, 0x00000000}, + {0x0019, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, + {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x001f, 0x00000000}, {0x0020, 0x00000000}, + {0x0021, 0x00000000}, {0x0022, 0x00000000}, {0x0023, 0x00000000}, {0x0024, 0x00000000}, + {0x0025, 0x00000000}, {0x0026, 0x00000000}, {0x0027, 0x00000000}, {0x0028, 0x00000000}, + {0x0029, 0x00000000}, {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV10Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, +}; + +static ShaderRegister agcPublicRegDefaultsV10Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, {0x02e4, 0x00000000}, + {0x02e5, 0x00000000}, {0x02e6, 0x00000000}, {0x02e7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02c8, 0x00000000}, + {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, {0x02cb, 0x00000000}, {0x02cc, 0x00000000}, + {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, {0x02cf, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bc, 0x00000000}, + {0x02bd, 0x00000000}, {0x02be, 0x00000000}, {0x02bf, 0x00000000}, {0x0035, 0x00000000}, + {0x0036, 0x00000000}, {0x0037, 0x00000000}, {0x0038, 0x00000000}, {0x0039, 0x00000000}, + {0x003a, 0x00000000}, {0x003b, 0x00000000}, {0x003c, 0x00000000}, {0x00a2, 0x00000000}, + {0x025c, 0x00000000}, {0x025d, 0x00000000}, {0x025e, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV10Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, +}; + +static std::uint32_t agcPublicRegDefaultsV10Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0xa6d12629, 0x00040408, + 0x00000000, 0x6f6e55a5, 0x0004040c, 0x00000000, 0x0bc65da4, 0x00040410, 0x00000000, 0x9e5ad592, + 0x00040414, 0x00000000, 0xbb513b98, 0x00040418, 0x00000000, 0xab64b23b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0x7d42019a, 0x00040428, + 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, + 0x00040434, 0x00000000, 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, + 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, 0x0c06f17c, 0x00040448, + 0x00000000, 0x6f104b72, 0x0004044c, 0x00000000, 0x25c70d9c, 0x00040450, 0x00000000, 0x3881201e, + 0x00040454, 0x00000000, 0x09afddaf, 0x00040458, 0x00000000, 0x367d63cf, 0x0004045c, 0x00000000, + 0x43707db8, 0x00040460, 0x00000000, 0xf6ae26ba, 0x00040464, 0x00000000, 0x1b917652, 0x00040468, + 0x00000000, 0x94b1e4f7, 0x0004046c, 0x00000000, 0xe3661b6c, 0x00040470, 0x00000000, 0x1eb8d73a, + 0x00040474, 0x00000000, 0x15051fa3, 0x00040478, 0x00000000, 0x9c51a7f1, 0x0004047c, 0x00000000, + 0xa20efc70, 0x00040480, 0x00000000, 0x0ec09f6e, 0x00040484, 0x00000000, 0x34a7d6d3, 0x00040488, + 0x00000000, 0xce831b94, 0x0004048c, 0x00000000, 0x5cc72a74, 0x00040490, 0x00000000, 0x3b77713c, + 0x00040494, 0x00000000, 0x40f64410, 0x00040498, 0x00000000, 0x69441268, 0x0004049c, 0x00000000, + 0x2e418b83, 0x000404a0, 0x00000000, 0xa00d0c8d, 0x000404a4, 0x00000000, 0xb1289fb3, 0x000404a8, + 0x00000000, 0x144832fb, 0x000404ac, 0x00000000, 0x9890d9fa, 0x000404b0, 0x00000000, 0x9016faf1, + 0x000404b4, 0x00000000, 0x4b73ce27, 0x000404b8, 0x00000000, 0x5f5a3e7b, 0x000404bc, 0x00000000, + 0xd4af3a51, 0x000404c0, 0x00000000, 0x6cf4f543, 0x000404c4, 0x00000000, 0x5fb86ccb, 0x000404c8, + 0x00000000, 0xedefa188, 0x000404cc, 0x00000000, 0xd0de9ee6, 0x000404d0, 0x00000000, 0xc5831803, + 0x000404d4, 0x00000000, 0x8e6de84b, 0x000404d8, 0x00000000, 0xd0771662, 0x000408dc, 0x00000000, + 0x569f7444, 0x004004e0, 0x00000000, 0x5c6637cd, 0x000408e4, 0x00000000, 0xcae3e690, 0x000408e8, + 0x00000000, 0x43fbd769, 0x000410ec, 0x00000000, 0xef550356, 0x002004f0, 0x00000000, 0x8f52e279, + 0x000408f4, 0x00000000, 0x1f2d8149, 0x001008f8, 0x00000000, 0x853d0614, 0x000404fc, 0x00000000, + 0x4413c6f9, 0x00040900, 0x00000000, 0x67096014, 0x00044104, 0x00000000, 0x88f5e915, 0x00040908, + 0x00000000, 0x033f1eff, 0x0004090c, 0x00000000, 0x918106bb, 0x00040910, 0x00000000, 0x95f0e7ac, + 0x00041114, 0x00000000, 0xb48cbab2, 0x00040918, 0x00000000, 0x05bb3bc6, 0x0004091c, 0x00000000, + 0x94faba07, 0x00040920, 0x00000000, 0x38e92c91, 0x00204124, 0x00000000, 0x0b177b43, 0x00040928, + 0x00000000, 0x48531062, 0x0080052c, 0x00000000, 0xaaa964b9, 0x00181130, 0x00000000, 0x7690af6f, + 0x00402934, 0x00000000, 0x078d7060, 0x00040938, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, + 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, + 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, + 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, + 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, + 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, + 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, + 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, + 0x00000000, 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, + 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, + 0xbda98653, 0x00400465, 0x00000000, 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, + 0x00000000, 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, + 0x00040426, 0x00000000, 0xf6d8a76e, 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, + 0x9ebfab10, 0x00040432, 0x00000000, 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, + 0x00000000, 0xf9ec4f85, 0x0010103e, 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, + 0x00200446, 0x00000000, 0xde5b3431, 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV10 = { + agcPublicRegDefaultsV10Tbl0Regs, + 482, + agcPublicRegDefaultsV10Tbl0Ptrs, + 79, + agcPublicRegDefaultsV10Tbl1Regs, + 159, + agcPublicRegDefaultsV10Tbl1Ptrs, + 29, + agcPublicRegDefaultsV10Tbl2Regs, + 55, + agcPublicRegDefaultsV10Tbl2Ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV10Types, + 128, +}; + + +static ShaderRegister agcPublicRegDefaultsV11Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000010}, {0x01e0, 0x20010001}, {0x0104, 0x00000000}, + {0x008f, 0x00000000}, {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, + {0x0200, 0x00000000}, {0x0201, 0x00000000}, {0x02af, 0x00040000}, {0x0000, 0x00000000}, + {0x0006, 0x00000000}, {0x001f, 0x00000000}, {0x0203, 0x00000000}, {0x00db, 0x00000000}, + {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, {0x010c, 0x00000000}, {0x010d, 0x00000000}, + {0x010b, 0x00000000}, {0x00db, 0x00000000}, {0x01ff, 0x00000000}, {0x0204, 0x00000000}, + {0x020d, 0x00000000}, {0x00db, 0x00002000}, {0x0206, 0x0000043f}, {0x02f8, 0x00000000}, + {0x0083, 0x0000ffff}, {0x0313, 0x00006000}, {0x00f0, 0x00000000}, {0x00ea, 0x00000000}, + {0x00e9, 0x00000000}, {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, + {0x0080, 0x00000000}, {0x0211, 0x00000000}, {0x0210, 0x04000000}, {0x008d, 0x00000000}, + {0x0282, 0x00000008}, {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, + {0x02de, 0x000001e9}, {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, + {0x00db, 0x00000000}, {0x01ba, 0x00000000}, {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, + {0x029b, 0x00000002}, {0x02d6, 0x00000000}, {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, + {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, {0x02d4, 0x88101000}, {0x02db, 0x00000000}, + {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, + {0x0300, 0x00000000}, {0x0301, 0x00000000}, {0x0302, 0x00000000}, {0x0303, 0x00000000}, + {0x0304, 0x00000000}, {0x0305, 0x00000000}, {0x0306, 0x00000000}, {0x0307, 0x00000000}, + {0x0308, 0x00000000}, {0x0309, 0x00000000}, {0x030a, 0x00000000}, {0x030b, 0x00000000}, + {0x030c, 0x00000000}, {0x030d, 0x00000000}, {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, + {0x0311, 0x01fd2002}, {0x0312, 0x03ff0080}, {0x0105, 0x00000000}, {0x0106, 0x00000000}, + {0x0107, 0x00000000}, {0x0108, 0x00000000}, {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, + {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, + {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, {0x0020, 0x00000000}, {0x0021, 0x00000000}, + {0x0084, 0x00000000}, {0x0085, 0x20002000}, {0x0086, 0x00000000}, {0x0087, 0x20002000}, + {0x0088, 0x00000000}, {0x0089, 0x20002000}, {0x008a, 0x00000000}, {0x008b, 0x20002000}, + {0x00db, 0x00000000}, {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0010, 0x80000180}, + {0x0011, 0x20000180}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, + {0x0015, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, + {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x0002, 0x00000000}, {0x0005, 0x00000000}, + {0x02af, 0x00040000}, {0x0007, 0x00000000}, {0x000b, 0x00000000}, {0x000a, 0x00000000}, + {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, {0x00f1, 0x00000000}, {0x00f2, 0x00000000}, + {0x0090, 0x80000000}, {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, {0x02fb, 0x3f800000}, + {0x02fc, 0x3f800000}, {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, {0x02e3, 0x00000000}, + {0x02e0, 0x00000000}, {0x02e1, 0x00000000}, {0x0003, 0x00000000}, {0x0004, 0x00000000}, + {0x0318, 0x00000000}, {0x031b, 0x00000000}, {0x031c, 0x00000000}, {0x031d, 0x00000000}, + {0x031e, 0x00000048}, {0x031f, 0x00000000}, {0x0321, 0x00000000}, {0x0323, 0x00000000}, + {0x0324, 0x00000000}, {0x0325, 0x00000000}, {0x0390, 0x00000000}, {0x0398, 0x00000000}, + {0x03a0, 0x00000000}, {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, {0x03b8, 0x08c6c000}, + {0x0327, 0x00000000}, {0x032a, 0x00000000}, {0x032b, 0x00000000}, {0x032c, 0x00000000}, + {0x032d, 0x00000048}, {0x032e, 0x00000000}, {0x0330, 0x00000000}, {0x0332, 0x00000000}, + {0x0333, 0x00000000}, {0x0334, 0x00000000}, {0x0391, 0x00000000}, {0x0399, 0x00000000}, + {0x03a1, 0x00000000}, {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, {0x03b9, 0x08c6c000}, + {0x0336, 0x00000000}, {0x0339, 0x00000000}, {0x033a, 0x00000000}, {0x033b, 0x00000000}, + {0x033c, 0x00000048}, {0x033d, 0x00000000}, {0x033f, 0x00000000}, {0x0341, 0x00000000}, + {0x0342, 0x00000000}, {0x0343, 0x00000000}, {0x0392, 0x00000000}, {0x039a, 0x00000000}, + {0x03a2, 0x00000000}, {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, {0x03ba, 0x08c6c000}, + {0x0345, 0x00000000}, {0x0348, 0x00000000}, {0x0349, 0x00000000}, {0x034a, 0x00000000}, + {0x034b, 0x00000048}, {0x034c, 0x00000000}, {0x034e, 0x00000000}, {0x0350, 0x00000000}, + {0x0351, 0x00000000}, {0x0352, 0x00000000}, {0x0393, 0x00000000}, {0x039b, 0x00000000}, + {0x03a3, 0x00000000}, {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, {0x03bb, 0x08c6c000}, + {0x0354, 0x00000000}, {0x0357, 0x00000000}, {0x0358, 0x00000000}, {0x0359, 0x00000000}, + {0x035a, 0x00000048}, {0x035b, 0x00000000}, {0x035d, 0x00000000}, {0x035f, 0x00000000}, + {0x0360, 0x00000000}, {0x0361, 0x00000000}, {0x0394, 0x00000000}, {0x039c, 0x00000000}, + {0x03a4, 0x00000000}, {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, {0x03bc, 0x08c6c000}, + {0x0363, 0x00000000}, {0x0366, 0x00000000}, {0x0367, 0x00000000}, {0x0368, 0x00000000}, + {0x0369, 0x00000048}, {0x036a, 0x00000000}, {0x036c, 0x00000000}, {0x036e, 0x00000000}, + {0x036f, 0x00000000}, {0x0370, 0x00000000}, {0x0395, 0x00000000}, {0x039d, 0x00000000}, + {0x03a5, 0x00000000}, {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, {0x03bd, 0x08c6c000}, + {0x0372, 0x00000000}, {0x0375, 0x00000000}, {0x0376, 0x00000000}, {0x0377, 0x00000000}, + {0x0378, 0x00000048}, {0x0379, 0x00000000}, {0x037b, 0x00000000}, {0x037d, 0x00000000}, + {0x037e, 0x00000000}, {0x037f, 0x00000000}, {0x0396, 0x00000000}, {0x039e, 0x00000000}, + {0x03a6, 0x00000000}, {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, {0x03be, 0x08c6c000}, + {0x0381, 0x00000000}, {0x0384, 0x00000000}, {0x0385, 0x00000000}, {0x0386, 0x00000000}, + {0x0387, 0x00000048}, {0x0388, 0x00000000}, {0x038a, 0x00000000}, {0x038c, 0x00000000}, + {0x038d, 0x00000000}, {0x038e, 0x00000000}, {0x0397, 0x00000000}, {0x039f, 0x00000000}, + {0x03a7, 0x00000000}, {0x03af, 0x00000000}, {0x03b7, 0x00000000}, {0x03bf, 0x08c6c000}, + {0x000c, 0x00000000}, {0x000d, 0x40004000}, {0x0191, 0x00000000}, {0x0192, 0x00000000}, + {0x0193, 0x00000000}, {0x0194, 0x00000000}, {0x0195, 0x00000000}, {0x0196, 0x00000000}, + {0x0197, 0x00000000}, {0x0198, 0x00000000}, {0x0199, 0x00000000}, {0x019a, 0x00000000}, + {0x019b, 0x00000000}, {0x019c, 0x00000000}, {0x019d, 0x00000000}, {0x019e, 0x00000000}, + {0x019f, 0x00000000}, {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, {0x01a2, 0x00000000}, + {0x01a3, 0x00000000}, {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, {0x01a6, 0x00000000}, + {0x01a7, 0x00000000}, {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, {0x01aa, 0x00000000}, + {0x01ab, 0x00000000}, {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, {0x01ae, 0x00000000}, + {0x01af, 0x00000000}, {0x01b0, 0x00000000}, {0x016f, 0x00000000}, {0x0170, 0x00000000}, + {0x0171, 0x00000000}, {0x0172, 0x00000000}, {0x0173, 0x00000000}, {0x0174, 0x00000000}, + {0x0175, 0x00000000}, {0x0176, 0x00000000}, {0x0177, 0x00000000}, {0x0178, 0x00000000}, + {0x0179, 0x00000000}, {0x017a, 0x00000000}, {0x017b, 0x00000000}, {0x017c, 0x00000000}, + {0x017d, 0x00000000}, {0x017e, 0x00000000}, {0x017f, 0x00000000}, {0x0180, 0x00000000}, + {0x0181, 0x00000000}, {0x0182, 0x00000000}, {0x0183, 0x00000000}, {0x0184, 0x00000000}, + {0x0185, 0x00000000}, {0x0186, 0x00000000}, {0x010f, 0x3f800000}, {0x0111, 0x3f800000}, + {0x0113, 0x3f800000}, {0x0110, 0x00000000}, {0x0112, 0x00000000}, {0x0114, 0x00000000}, + {0x0094, 0x80000000}, {0x0095, 0x40004000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, + {0x0115, 0x3f800000}, {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, {0x0116, 0x00000000}, + {0x0118, 0x00000000}, {0x011a, 0x00000000}, {0x0096, 0x80000000}, {0x0097, 0x40004000}, + {0x00b6, 0x00000000}, {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, {0x011d, 0x3f800000}, + {0x011f, 0x3f800000}, {0x011c, 0x00000000}, {0x011e, 0x00000000}, {0x0120, 0x00000000}, + {0x0098, 0x80000000}, {0x0099, 0x40004000}, {0x00b8, 0x00000000}, {0x00b9, 0x00000000}, + {0x0121, 0x3f800000}, {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, {0x0122, 0x00000000}, + {0x0124, 0x00000000}, {0x0126, 0x00000000}, {0x009a, 0x80000000}, {0x009b, 0x40004000}, + {0x00ba, 0x00000000}, {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, {0x0129, 0x3f800000}, + {0x012b, 0x3f800000}, {0x0128, 0x00000000}, {0x012a, 0x00000000}, {0x012c, 0x00000000}, + {0x009c, 0x80000000}, {0x009d, 0x40004000}, {0x00bc, 0x00000000}, {0x00bd, 0x00000000}, + {0x012d, 0x3f800000}, {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, {0x012e, 0x00000000}, + {0x0130, 0x00000000}, {0x0132, 0x00000000}, {0x009e, 0x80000000}, {0x009f, 0x40004000}, + {0x00be, 0x00000000}, {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, {0x0135, 0x3f800000}, + {0x0137, 0x3f800000}, {0x0134, 0x00000000}, {0x0136, 0x00000000}, {0x0138, 0x00000000}, + {0x00a0, 0x80000000}, {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, {0x00c1, 0x00000000}, + {0x0139, 0x3f800000}, {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, {0x013a, 0x00000000}, + {0x013c, 0x00000000}, {0x013e, 0x00000000}, {0x00a2, 0x80000000}, {0x00a3, 0x40004000}, + {0x00c2, 0x00000000}, {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, {0x0141, 0x3f800000}, + {0x0143, 0x3f800000}, {0x0140, 0x00000000}, {0x0142, 0x00000000}, {0x0144, 0x00000000}, + {0x00a4, 0x80000000}, {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, {0x00c5, 0x00000000}, + {0x0145, 0x3f800000}, {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, {0x0146, 0x00000000}, + {0x0148, 0x00000000}, {0x014a, 0x00000000}, {0x00a6, 0x80000000}, {0x00a7, 0x40004000}, + {0x00c6, 0x00000000}, {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, {0x014d, 0x3f800000}, + {0x014f, 0x3f800000}, {0x014c, 0x00000000}, {0x014e, 0x00000000}, {0x0150, 0x00000000}, + {0x00a8, 0x80000000}, {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, + {0x0151, 0x3f800000}, {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, {0x0152, 0x00000000}, + {0x0154, 0x00000000}, {0x0156, 0x00000000}, {0x00aa, 0x80000000}, {0x00ab, 0x40004000}, + {0x00ca, 0x00000000}, {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, {0x0159, 0x3f800000}, + {0x015b, 0x3f800000}, {0x0158, 0x00000000}, {0x015a, 0x00000000}, {0x015c, 0x00000000}, + {0x00ac, 0x80000000}, {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, {0x00cd, 0x00000000}, + {0x015d, 0x3f800000}, {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, {0x015e, 0x00000000}, + {0x0160, 0x00000000}, {0x0162, 0x00000000}, {0x00ae, 0x80000000}, {0x00af, 0x40004000}, + {0x00ce, 0x00000000}, {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, {0x0165, 0x3f800000}, + {0x0167, 0x3f800000}, {0x0164, 0x00000000}, {0x0166, 0x00000000}, {0x0168, 0x00000000}, + {0x00b0, 0x80000000}, {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, {0x00d1, 0x00000000}, + {0x0169, 0x3f800000}, {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, {0x016a, 0x00000000}, + {0x016c, 0x00000000}, {0x016e, 0x00000000}, {0x00b2, 0x80000000}, {0x00b3, 0x40004000}, + {0x00d2, 0x00000000}, {0x00d3, 0x00000000}, {0x0081, 0x80000000}, {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV11Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, + 0x003c, 0x003e, 0x004e, 0x0050, 0x0052, 0x0056, 0x005e, 0x0060, 0x0068, 0x0069, 0x006b, 0x007c, + 0x007e, 0x0080, 0x0082, 0x0086, 0x0088, 0x008a, 0x008c, 0x010c, 0x010e, 0x012e, 0x0146, 0x01e6, +}; + +static ShaderRegister agcPublicRegDefaultsV11Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x022a, 0x00ffffff}, {0x0218, 0x00000000}, {0x0080, 0x00ffffff}, {0x0006, 0x00ffffff}, + {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, {0x008b, 0x00000000}, + {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, {0x0225, 0x00000000}, + {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, {0x0087, 0x0000ffff}, + {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, {0x00c8, 0x00000000}, + {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, {0x0108, 0x00000000}, + {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, {0x0008, 0x00000000}, + {0x0009, 0x00000000}, {0x0280, 0x00000000}, {0x00b2, 0x00000000}, {0x00b3, 0x00000000}, + {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0132, 0x00000000}, {0x0133, 0x00000000}, + {0x0134, 0x00000000}, {0x0135, 0x00000000}, {0x0032, 0x00000000}, {0x0033, 0x00000000}, + {0x0034, 0x00000000}, {0x0035, 0x00000000}, {0x0082, 0x00000000}, {0x0083, 0x00000000}, + {0x0102, 0x00000000}, {0x0103, 0x00000000}, {0x0240, 0x00000000}, {0x0241, 0x00000000}, + {0x0242, 0x00000000}, {0x0243, 0x00000000}, {0x0244, 0x00000000}, {0x0245, 0x00000000}, + {0x0246, 0x00000000}, {0x0247, 0x00000000}, {0x0248, 0x00000000}, {0x0249, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x024c, 0x00000000}, {0x024d, 0x00000000}, + {0x024e, 0x00000000}, {0x024f, 0x00000000}, {0x008c, 0x00000000}, {0x008d, 0x00000000}, + {0x008e, 0x00000000}, {0x008f, 0x00000000}, {0x0090, 0x00000000}, {0x0091, 0x00000000}, + {0x0092, 0x00000000}, {0x0093, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x0096, 0x00000000}, {0x0097, 0x00000000}, {0x0098, 0x00000000}, {0x0099, 0x00000000}, + {0x009a, 0x00000000}, {0x009b, 0x00000000}, {0x009c, 0x00000000}, {0x009d, 0x00000000}, + {0x009e, 0x00000000}, {0x009f, 0x00000000}, {0x00a0, 0x00000000}, {0x00a1, 0x00000000}, + {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, {0x00a5, 0x00000000}, + {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, {0x00a9, 0x00000000}, + {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, {0x010c, 0x00000000}, {0x010d, 0x00000000}, + {0x010e, 0x00000000}, {0x010f, 0x00000000}, {0x0110, 0x00000000}, {0x0111, 0x00000000}, + {0x0112, 0x00000000}, {0x0113, 0x00000000}, {0x0114, 0x00000000}, {0x0115, 0x00000000}, + {0x0116, 0x00000000}, {0x0117, 0x00000000}, {0x0118, 0x00000000}, {0x0119, 0x00000000}, + {0x011a, 0x00000000}, {0x011b, 0x00000000}, {0x011c, 0x00000000}, {0x011d, 0x00000000}, + {0x011e, 0x00000000}, {0x011f, 0x00000000}, {0x0120, 0x00000000}, {0x0121, 0x00000000}, + {0x0122, 0x00000000}, {0x0123, 0x00000000}, {0x0124, 0x00000000}, {0x0125, 0x00000000}, + {0x0126, 0x00000000}, {0x0127, 0x00000000}, {0x0128, 0x00000000}, {0x0129, 0x00000000}, + {0x012a, 0x00000000}, {0x012b, 0x00000000}, {0x000c, 0x00000000}, {0x000d, 0x00000000}, + {0x000e, 0x00000000}, {0x000f, 0x00000000}, {0x0010, 0x00000000}, {0x0011, 0x00000000}, + {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, + {0x0016, 0x00000000}, {0x0017, 0x00000000}, {0x0018, 0x00000000}, {0x0019, 0x00000000}, + {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, + {0x001e, 0x00000000}, {0x001f, 0x00000000}, {0x0020, 0x00000000}, {0x0021, 0x00000000}, + {0x0022, 0x00000000}, {0x0023, 0x00000000}, {0x0024, 0x00000000}, {0x0025, 0x00000000}, + {0x0026, 0x00000000}, {0x0027, 0x00000000}, {0x0028, 0x00000000}, {0x0029, 0x00000000}, + {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV11Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x0012, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, + 0x0021, 0x0022, 0x0026, 0x002a, 0x002e, 0x0030, 0x0032, 0x0042, 0x0062, 0x0082, +}; + +static ShaderRegister agcPublicRegDefaultsV11Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x00a2, 0x00000000}, {0x02bb, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, + {0x0248, 0x00000000}, {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, + {0x02e4, 0x00000000}, {0x02e5, 0x00000000}, {0x02e6, 0x00000000}, {0x02e7, 0x00000000}, + {0x02e8, 0x00000000}, {0x02e9, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, + {0x02c4, 0x00000000}, {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, + {0x02c8, 0x00000000}, {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, {0x02cb, 0x00000000}, + {0x02cc, 0x00000000}, {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, {0x02cf, 0x00000000}, + {0x02d0, 0x00000000}, {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, + {0x02bc, 0x00000000}, {0x02bd, 0x00000000}, {0x02be, 0x00000000}, {0x02bf, 0x00000000}, + {0x0035, 0x00000000}, {0x0036, 0x00000000}, {0x0037, 0x00000000}, {0x0038, 0x00000000}, + {0x0039, 0x00000000}, {0x003a, 0x00000000}, {0x003b, 0x00000000}, {0x003c, 0x00000000}, + {0x00a2, 0x00000000}, {0x025c, 0x00000000}, {0x025d, 0x00000000}, {0x025e, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV11Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x0010, 0x0018, 0x0028, 0x002c, 0x0034, 0x0035, +}; + +static std::uint32_t agcPublicRegDefaultsV11Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0xa6d12629, 0x00040408, + 0x00000000, 0x6f6e55a5, 0x0004040c, 0x00000000, 0x0bc65da4, 0x00040410, 0x00000000, 0x9e5ad592, + 0x00040414, 0x00000000, 0xbb513b98, 0x00040418, 0x00000000, 0xab64b23b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0xb994ad29, 0x00040428, + 0x00000000, 0x7d42019a, 0x0004042c, 0x00000000, 0x3548f523, 0x00040430, 0x00000000, 0xf43ad28a, + 0x00040434, 0x00000000, 0x6de4c312, 0x00040438, 0x00000000, 0x26ae2080, 0x0004043c, 0x00000000, + 0x00a77ae0, 0x00040440, 0x00000000, 0x00a779b7, 0x00040444, 0x00000000, 0x5100100c, 0x00040448, + 0x00000000, 0x59958bba, 0x0004044c, 0x00000000, 0x0c06f17c, 0x00040450, 0x00000000, 0x9e0feb34, + 0x00040454, 0x00000000, 0x6f104b72, 0x00040458, 0x00000000, 0x25c70d9c, 0x0004045c, 0x00000000, + 0x3881201e, 0x00040460, 0x00000000, 0x381c673c, 0x00040464, 0x00000000, 0x09afddaf, 0x00040468, + 0x00000000, 0x367d63cf, 0x0004046c, 0x00000000, 0x43707db8, 0x00040470, 0x00000000, 0xf6ae26ba, + 0x00040474, 0x00000000, 0x1b917652, 0x00040478, 0x00000000, 0x94b1e4f7, 0x0004047c, 0x00000000, + 0xe3661b6c, 0x00040480, 0x00000000, 0x1eb8d73a, 0x00040484, 0x00000000, 0x15051fa3, 0x00040488, + 0x00000000, 0x9c51a7f1, 0x0004048c, 0x00000000, 0xa20efc70, 0x00040490, 0x00000000, 0x0ec09f6e, + 0x00040494, 0x00000000, 0x34a7d6d3, 0x00040498, 0x00000000, 0xce831b94, 0x0004049c, 0x00000000, + 0x5cc72a74, 0x000404a0, 0x00000000, 0x3b77713c, 0x000404a4, 0x00000000, 0x40f64410, 0x000404a8, + 0x00000000, 0x69441268, 0x000404ac, 0x00000000, 0x2e418b83, 0x000404b0, 0x00000000, 0xa00d0c8d, + 0x000404b4, 0x00000000, 0xb1289fb3, 0x000404b8, 0x00000000, 0x144832fb, 0x000404bc, 0x00000000, + 0xa14657c5, 0x000404c0, 0x00000000, 0x9890d9fa, 0x000404c4, 0x00000000, 0x9016faf1, 0x000404c8, + 0x00000000, 0x4b73ce27, 0x000404cc, 0x00000000, 0x5f5a3e7b, 0x000404d0, 0x00000000, 0xd4af3a51, + 0x000404d4, 0x00000000, 0x6cf4f543, 0x000404d8, 0x00000000, 0x5fb86ccb, 0x000404dc, 0x00000000, + 0xedefa188, 0x000404e0, 0x00000000, 0xd0de9ee6, 0x000404e4, 0x00000000, 0xc5831803, 0x000404e8, + 0x00000000, 0x8e6de84b, 0x000404ec, 0x00000000, 0xd0771662, 0x000408f0, 0x00000000, 0x569f7444, + 0x004004f4, 0x00000000, 0x5c6637cd, 0x000408f8, 0x00000000, 0xcae3e690, 0x000408fc, 0x00000000, + 0x43fbd769, 0x00041100, 0x00000000, 0xef550356, 0x00200504, 0x00000000, 0x8f52e279, 0x00040908, + 0x00000000, 0x1f2d8149, 0x0010090c, 0x00000000, 0x853d0614, 0x00040510, 0x00000000, 0x4413c6f9, + 0x00040914, 0x00000000, 0x67096014, 0x00044518, 0x00000000, 0x88f5e915, 0x0004091c, 0x00000000, + 0x033f1eff, 0x00040920, 0x00000000, 0x918106bb, 0x00040924, 0x00000000, 0x95f0e7ac, 0x00041128, + 0x00000000, 0xb48cbab2, 0x0004092c, 0x00000000, 0x05bb3bc6, 0x00040930, 0x00000000, 0x94faba07, + 0x00040934, 0x00000000, 0x38e92c91, 0x00204138, 0x00000000, 0x0b177b43, 0x0004093c, 0x00000000, + 0x48531062, 0x00800540, 0x00000000, 0xaaa964b9, 0x00181144, 0x00000000, 0x7690af6f, 0x00402948, + 0x00000000, 0x078d7060, 0x0004094c, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, + 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, + 0xf899653a, 0x00040411, 0x00000000, 0xdc484f18, 0x00040415, 0x00000000, 0xf9754e16, 0x00040419, + 0x00000000, 0xf8e274f5, 0x0004041d, 0x00000000, 0x5da8bca3, 0x00040421, 0x00000000, 0x5ca726d8, + 0x00040425, 0x00000000, 0x5dd28360, 0x00040429, 0x00000000, 0x57efa0be, 0x0004042d, 0x00000000, + 0x502363d5, 0x00040431, 0x00000000, 0x506d14bd, 0x00040435, 0x00000000, 0xb2609506, 0x00100439, + 0x00000000, 0x9e5cfb8a, 0x00040c3d, 0x00000000, 0xc918df3e, 0x00040841, 0x00000000, 0xc9751c9c, + 0x00040845, 0x00000000, 0xc97ef77a, 0x00040849, 0x00000000, 0xc927c6b9, 0x0004084d, 0x00000000, + 0xc92a1ec5, 0x00040851, 0x00000000, 0xc9e01b31, 0x00040855, 0x00000000, 0x50685f29, 0x00040459, + 0x00000000, 0xb26219ca, 0x0010045d, 0x00000000, 0xb25b6cf9, 0x00100461, 0x00000000, 0xb2f86101, + 0x00100465, 0x00000000, 0x07e3b155, 0x00040869, 0x00000000, 0x07e383c6, 0x0004086d, 0x00000000, + 0xbda98653, 0x00400471, 0x00000000, 0xbdbd1d0f, 0x00800475, 0x00000000, 0xbd946fd4, 0x00800479, + 0x00000000, 0xbdf02a4c, 0x0080047d, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0xe3a37123, 0x00040422, 0x00000000, 0x8c0923da, + 0x00040426, 0x00000000, 0xbb8df494, 0x0004042a, 0x00000000, 0xf6d8a76e, 0x0004042e, 0x00000000, + 0x7620f1e9, 0x00040432, 0x00000000, 0x9ebfab10, 0x00040436, 0x00000000, 0x98a09d0e, 0x0004083a, + 0x00000000, 0x195d37d2, 0x0010083e, 0x00000000, 0xf9ec4f85, 0x00101042, 0x00000000, 0x4626b750, + 0x00080846, 0x00000000, 0x4cc673a0, 0x0020044a, 0x00000000, 0xde5b3431, 0x0004044e, 0x00000000, + 0x036ac8a6, 0x000c0452, 0x00000000, +}; + +template +static std::array +make_v11_plus_public_tbl0(const ShaderRegister (&source)[Size]) { + std::array regs {}; + std::copy_n(source, Size, regs.begin()); + + for (auto& reg: regs) { + if (reg.offset == 0x0201) { + reg.value |= 0x00010000; + } + } + return regs; +} + + +static auto agcPublicRegDefaultsV11Tbl0Effective = + make_v11_plus_public_tbl0(agcPublicRegDefaultsV11Tbl0Regs); +static auto agcPublicRegDefaultsV12Tbl0Effective = + make_v11_plus_public_tbl0(agcPublicRegDefaultsV10Tbl0Regs); + +static CompactRegisterDefaults agcPublicRegDefaultsV11 = { + agcPublicRegDefaultsV11Tbl0Effective.data(), + 488, + agcPublicRegDefaultsV11Tbl0Ptrs, + 84, + agcPublicRegDefaultsV11Tbl1Regs, + 162, + agcPublicRegDefaultsV11Tbl1Ptrs, + 32, + agcPublicRegDefaultsV11Tbl2Regs, + 56, + agcPublicRegDefaultsV11Tbl2Ptrs, + 21, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV11Types, + 137, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV12 = { + agcPublicRegDefaultsV12Tbl0Effective.data(), + 482, + agcPublicRegDefaultsV10Tbl0Ptrs, + 79, + agcPublicRegDefaultsV10Tbl1Regs, + 159, + agcPublicRegDefaultsV10Tbl1Ptrs, + 29, + agcPublicRegDefaultsV10Tbl2Regs, + 55, + agcPublicRegDefaultsV10Tbl2Ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV10Types, + 128, +}; + + +static ShaderRegister agcPublicRegDefaultsV4Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000008}, {0x0104, 0x00000000}, {0x008f, 0x00000000}, + {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, {0x000b, 0x00000000}, + {0x0200, 0x00000000}, {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, + {0x001f, 0x00000000}, {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, + {0x010c, 0x00000000}, {0x010d, 0x00000000}, {0x000a, 0x00000000}, {0x010b, 0x00000000}, + {0x01ff, 0x00000000}, {0x0204, 0x00000000}, {0x020d, 0x00000000}, {0x0206, 0x0000043f}, + {0x02f8, 0x00000000}, {0x0083, 0x0000ffff}, {0x0313, 0x00006000}, {0x00f0, 0x00000000}, + {0x00f1, 0x00000000}, {0x00f2, 0x00000000}, {0x00ea, 0x00000000}, {0x00e9, 0x00000000}, + {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, {0x0080, 0x00000000}, + {0x0211, 0x00000000}, {0x0210, 0x00000000}, {0x008d, 0x00000000}, {0x0282, 0x00000008}, + {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, {0x02de, 0x000001e9}, + {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, {0x01ba, 0x00000000}, + {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, {0x029b, 0x00000002}, {0x02d6, 0x00000000}, + {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, + {0x02d4, 0x88101010}, {0x02db, 0x00000000}, {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, + {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, {0x0300, 0x00000000}, {0x0301, 0x00000000}, + {0x0302, 0x00000000}, {0x0303, 0x00000000}, {0x0304, 0x00000000}, {0x0305, 0x00000000}, + {0x0306, 0x00000000}, {0x0307, 0x00000000}, {0x0308, 0x00000000}, {0x0309, 0x00000000}, + {0x030a, 0x00000000}, {0x030b, 0x00000000}, {0x030c, 0x00000000}, {0x030d, 0x00000000}, + {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, {0x0311, 0x01f92000}, {0x0312, 0x03ff0080}, + {0x0105, 0x00000000}, {0x0106, 0x00000000}, {0x0107, 0x00000000}, {0x0108, 0x00000000}, + {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, + {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, + {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0084, 0x00000000}, {0x0085, 0x20002000}, + {0x0086, 0x00000000}, {0x0087, 0x20002000}, {0x0088, 0x00000000}, {0x0089, 0x20002000}, + {0x008a, 0x00000000}, {0x008b, 0x20002000}, {0x0008, 0x00000000}, {0x0009, 0x00000000}, + {0x0010, 0x80000180}, {0x0011, 0x20000180}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, + {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, + {0x001c, 0x00000000}, {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x0002, 0x00000000}, + {0x0005, 0x00000000}, {0x0007, 0x00000000}, {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, + {0x0090, 0x80000000}, {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, {0x02fb, 0x3f800000}, + {0x02fc, 0x3f800000}, {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, {0x02e3, 0x00000000}, + {0x02e0, 0x00000000}, {0x02e1, 0x00000000}, {0x0003, 0x00000000}, {0x0004, 0x00000000}, + {0x0318, 0x00000000}, {0x031b, 0x00000000}, {0x031c, 0x00000000}, {0x031d, 0x00000000}, + {0x031e, 0x00000048}, {0x031f, 0x00000000}, {0x0321, 0x00000000}, {0x0323, 0x00000000}, + {0x0324, 0x00000000}, {0x0325, 0x00000000}, {0x0390, 0x00000000}, {0x0398, 0x00000000}, + {0x03a0, 0x00000000}, {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, {0x03b8, 0x08c6c000}, + {0x0327, 0x00000000}, {0x032a, 0x00000000}, {0x032b, 0x00000000}, {0x032c, 0x00000000}, + {0x032d, 0x00000048}, {0x032e, 0x00000000}, {0x0330, 0x00000000}, {0x0332, 0x00000000}, + {0x0333, 0x00000000}, {0x0334, 0x00000000}, {0x0391, 0x00000000}, {0x0399, 0x00000000}, + {0x03a1, 0x00000000}, {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, {0x03b9, 0x08c6c000}, + {0x0336, 0x00000000}, {0x0339, 0x00000000}, {0x033a, 0x00000000}, {0x033b, 0x00000000}, + {0x033c, 0x00000048}, {0x033d, 0x00000000}, {0x033f, 0x00000000}, {0x0341, 0x00000000}, + {0x0342, 0x00000000}, {0x0343, 0x00000000}, {0x0392, 0x00000000}, {0x039a, 0x00000000}, + {0x03a2, 0x00000000}, {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, {0x03ba, 0x08c6c000}, + {0x0345, 0x00000000}, {0x0348, 0x00000000}, {0x0349, 0x00000000}, {0x034a, 0x00000000}, + {0x034b, 0x00000048}, {0x034c, 0x00000000}, {0x034e, 0x00000000}, {0x0350, 0x00000000}, + {0x0351, 0x00000000}, {0x0352, 0x00000000}, {0x0393, 0x00000000}, {0x039b, 0x00000000}, + {0x03a3, 0x00000000}, {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, {0x03bb, 0x08c6c000}, + {0x0354, 0x00000000}, {0x0357, 0x00000000}, {0x0358, 0x00000000}, {0x0359, 0x00000000}, + {0x035a, 0x00000048}, {0x035b, 0x00000000}, {0x035d, 0x00000000}, {0x035f, 0x00000000}, + {0x0360, 0x00000000}, {0x0361, 0x00000000}, {0x0394, 0x00000000}, {0x039c, 0x00000000}, + {0x03a4, 0x00000000}, {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, {0x03bc, 0x08c6c000}, + {0x0363, 0x00000000}, {0x0366, 0x00000000}, {0x0367, 0x00000000}, {0x0368, 0x00000000}, + {0x0369, 0x00000048}, {0x036a, 0x00000000}, {0x036c, 0x00000000}, {0x036e, 0x00000000}, + {0x036f, 0x00000000}, {0x0370, 0x00000000}, {0x0395, 0x00000000}, {0x039d, 0x00000000}, + {0x03a5, 0x00000000}, {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, {0x03bd, 0x08c6c000}, + {0x0372, 0x00000000}, {0x0375, 0x00000000}, {0x0376, 0x00000000}, {0x0377, 0x00000000}, + {0x0378, 0x00000048}, {0x0379, 0x00000000}, {0x037b, 0x00000000}, {0x037d, 0x00000000}, + {0x037e, 0x00000000}, {0x037f, 0x00000000}, {0x0396, 0x00000000}, {0x039e, 0x00000000}, + {0x03a6, 0x00000000}, {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, {0x03be, 0x08c6c000}, + {0x0381, 0x00000000}, {0x0384, 0x00000000}, {0x0385, 0x00000000}, {0x0386, 0x00000000}, + {0x0387, 0x00000048}, {0x0388, 0x00000000}, {0x038a, 0x00000000}, {0x038c, 0x00000000}, + {0x038d, 0x00000000}, {0x038e, 0x00000000}, {0x0397, 0x00000000}, {0x039f, 0x00000000}, + {0x03a7, 0x00000000}, {0x03af, 0x00000000}, {0x03b7, 0x00000000}, {0x03bf, 0x08c6c000}, + {0x000c, 0x00000000}, {0x000d, 0x40004000}, {0x0191, 0x00000000}, {0x0192, 0x00000000}, + {0x0193, 0x00000000}, {0x0194, 0x00000000}, {0x0195, 0x00000000}, {0x0196, 0x00000000}, + {0x0197, 0x00000000}, {0x0198, 0x00000000}, {0x0199, 0x00000000}, {0x019a, 0x00000000}, + {0x019b, 0x00000000}, {0x019c, 0x00000000}, {0x019d, 0x00000000}, {0x019e, 0x00000000}, + {0x019f, 0x00000000}, {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, {0x01a2, 0x00000000}, + {0x01a3, 0x00000000}, {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, {0x01a6, 0x00000000}, + {0x01a7, 0x00000000}, {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, {0x01aa, 0x00000000}, + {0x01ab, 0x00000000}, {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, {0x01ae, 0x00000000}, + {0x01af, 0x00000000}, {0x01b0, 0x00000000}, {0x016f, 0x00000000}, {0x0170, 0x00000000}, + {0x0171, 0x00000000}, {0x0172, 0x00000000}, {0x0173, 0x00000000}, {0x0174, 0x00000000}, + {0x0175, 0x00000000}, {0x0176, 0x00000000}, {0x0177, 0x00000000}, {0x0178, 0x00000000}, + {0x0179, 0x00000000}, {0x017a, 0x00000000}, {0x017b, 0x00000000}, {0x017c, 0x00000000}, + {0x017d, 0x00000000}, {0x017e, 0x00000000}, {0x017f, 0x00000000}, {0x0180, 0x00000000}, + {0x0181, 0x00000000}, {0x0182, 0x00000000}, {0x0183, 0x00000000}, {0x0184, 0x00000000}, + {0x0185, 0x00000000}, {0x0186, 0x00000000}, {0x0187, 0x00000000}, {0x0188, 0x00000000}, + {0x0189, 0x00000000}, {0x018a, 0x00000000}, {0x018b, 0x00000000}, {0x018c, 0x00000000}, + {0x018d, 0x00000000}, {0x018e, 0x00000000}, {0x010f, 0x3f800000}, {0x0111, 0x3f800000}, + {0x0113, 0x3f800000}, {0x0110, 0x00000000}, {0x0112, 0x00000000}, {0x0114, 0x00000000}, + {0x0094, 0x80000000}, {0x0095, 0x40004000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, + {0x0115, 0x3f800000}, {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, {0x0116, 0x00000000}, + {0x0118, 0x00000000}, {0x011a, 0x00000000}, {0x0096, 0x80000000}, {0x0097, 0x40004000}, + {0x00b6, 0x00000000}, {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, {0x011d, 0x3f800000}, + {0x011f, 0x3f800000}, {0x011c, 0x00000000}, {0x011e, 0x00000000}, {0x0120, 0x00000000}, + {0x0098, 0x80000000}, {0x0099, 0x40004000}, {0x00b8, 0x00000000}, {0x00b9, 0x00000000}, + {0x0121, 0x3f800000}, {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, {0x0122, 0x00000000}, + {0x0124, 0x00000000}, {0x0126, 0x00000000}, {0x009a, 0x80000000}, {0x009b, 0x40004000}, + {0x00ba, 0x00000000}, {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, {0x0129, 0x3f800000}, + {0x012b, 0x3f800000}, {0x0128, 0x00000000}, {0x012a, 0x00000000}, {0x012c, 0x00000000}, + {0x009c, 0x80000000}, {0x009d, 0x40004000}, {0x00bc, 0x00000000}, {0x00bd, 0x00000000}, + {0x012d, 0x3f800000}, {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, {0x012e, 0x00000000}, + {0x0130, 0x00000000}, {0x0132, 0x00000000}, {0x009e, 0x80000000}, {0x009f, 0x40004000}, + {0x00be, 0x00000000}, {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, {0x0135, 0x3f800000}, + {0x0137, 0x3f800000}, {0x0134, 0x00000000}, {0x0136, 0x00000000}, {0x0138, 0x00000000}, + {0x00a0, 0x80000000}, {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, {0x00c1, 0x00000000}, + {0x0139, 0x3f800000}, {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, {0x013a, 0x00000000}, + {0x013c, 0x00000000}, {0x013e, 0x00000000}, {0x00a2, 0x80000000}, {0x00a3, 0x40004000}, + {0x00c2, 0x00000000}, {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, {0x0141, 0x3f800000}, + {0x0143, 0x3f800000}, {0x0140, 0x00000000}, {0x0142, 0x00000000}, {0x0144, 0x00000000}, + {0x00a4, 0x80000000}, {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, {0x00c5, 0x00000000}, + {0x0145, 0x3f800000}, {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, {0x0146, 0x00000000}, + {0x0148, 0x00000000}, {0x014a, 0x00000000}, {0x00a6, 0x80000000}, {0x00a7, 0x40004000}, + {0x00c6, 0x00000000}, {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, {0x014d, 0x3f800000}, + {0x014f, 0x3f800000}, {0x014c, 0x00000000}, {0x014e, 0x00000000}, {0x0150, 0x00000000}, + {0x00a8, 0x80000000}, {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, + {0x0151, 0x3f800000}, {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, {0x0152, 0x00000000}, + {0x0154, 0x00000000}, {0x0156, 0x00000000}, {0x00aa, 0x80000000}, {0x00ab, 0x40004000}, + {0x00ca, 0x00000000}, {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, {0x0159, 0x3f800000}, + {0x015b, 0x3f800000}, {0x0158, 0x00000000}, {0x015a, 0x00000000}, {0x015c, 0x00000000}, + {0x00ac, 0x80000000}, {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, {0x00cd, 0x00000000}, + {0x015d, 0x3f800000}, {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, {0x015e, 0x00000000}, + {0x0160, 0x00000000}, {0x0162, 0x00000000}, {0x00ae, 0x80000000}, {0x00af, 0x40004000}, + {0x00ce, 0x00000000}, {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, {0x0165, 0x3f800000}, + {0x0167, 0x3f800000}, {0x0164, 0x00000000}, {0x0166, 0x00000000}, {0x0168, 0x00000000}, + {0x00b0, 0x80000000}, {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, {0x00d1, 0x00000000}, + {0x0169, 0x3f800000}, {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, {0x016a, 0x00000000}, + {0x016c, 0x00000000}, {0x016e, 0x00000000}, {0x00b2, 0x80000000}, {0x00b3, 0x40004000}, + {0x00d2, 0x00000000}, {0x00d3, 0x00000000}, {0x0081, 0x80000000}, {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV4Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003c, + 0x004c, 0x004e, 0x0050, 0x0054, 0x005c, 0x005e, 0x0066, 0x0068, 0x0076, 0x0078, 0x007a, 0x007e, + 0x0080, 0x0082, 0x0084, 0x0104, 0x0106, 0x0126, 0x0146, 0x01e6, +}; + +static ShaderRegister agcPublicRegDefaultsV4Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0087, 0x0000ffff}, {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, + {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, + {0x0108, 0x00000000}, {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, + {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x00b2, 0x00000000}, {0x00b3, 0x00000000}, + {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0132, 0x00000000}, {0x0133, 0x00000000}, + {0x0134, 0x00000000}, {0x0135, 0x00000000}, {0x0032, 0x00000000}, {0x0033, 0x00000000}, + {0x0034, 0x00000000}, {0x0035, 0x00000000}, {0x0082, 0x00000000}, {0x0083, 0x00000000}, + {0x0102, 0x00000000}, {0x0103, 0x00000000}, {0x0240, 0x00000000}, {0x0241, 0x00000000}, + {0x0242, 0x00000000}, {0x0243, 0x00000000}, {0x0244, 0x00000000}, {0x0245, 0x00000000}, + {0x0246, 0x00000000}, {0x0247, 0x00000000}, {0x0248, 0x00000000}, {0x0249, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x024c, 0x00000000}, {0x024d, 0x00000000}, + {0x024e, 0x00000000}, {0x024f, 0x00000000}, {0x008c, 0x00000000}, {0x008d, 0x00000000}, + {0x008e, 0x00000000}, {0x008f, 0x00000000}, {0x0090, 0x00000000}, {0x0091, 0x00000000}, + {0x0092, 0x00000000}, {0x0093, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x0096, 0x00000000}, {0x0097, 0x00000000}, {0x0098, 0x00000000}, {0x0099, 0x00000000}, + {0x009a, 0x00000000}, {0x009b, 0x00000000}, {0x009c, 0x00000000}, {0x009d, 0x00000000}, + {0x009e, 0x00000000}, {0x009f, 0x00000000}, {0x00a0, 0x00000000}, {0x00a1, 0x00000000}, + {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, {0x00a5, 0x00000000}, + {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, {0x00a9, 0x00000000}, + {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, {0x010c, 0x00000000}, {0x010d, 0x00000000}, + {0x010e, 0x00000000}, {0x010f, 0x00000000}, {0x0110, 0x00000000}, {0x0111, 0x00000000}, + {0x0112, 0x00000000}, {0x0113, 0x00000000}, {0x0114, 0x00000000}, {0x0115, 0x00000000}, + {0x0116, 0x00000000}, {0x0117, 0x00000000}, {0x0118, 0x00000000}, {0x0119, 0x00000000}, + {0x011a, 0x00000000}, {0x011b, 0x00000000}, {0x011c, 0x00000000}, {0x011d, 0x00000000}, + {0x011e, 0x00000000}, {0x011f, 0x00000000}, {0x0120, 0x00000000}, {0x0121, 0x00000000}, + {0x0122, 0x00000000}, {0x0123, 0x00000000}, {0x0124, 0x00000000}, {0x0125, 0x00000000}, + {0x0126, 0x00000000}, {0x0127, 0x00000000}, {0x0128, 0x00000000}, {0x0129, 0x00000000}, + {0x012a, 0x00000000}, {0x012b, 0x00000000}, {0x000c, 0x00000000}, {0x000d, 0x00000000}, + {0x000e, 0x00000000}, {0x000f, 0x00000000}, {0x0010, 0x00000000}, {0x0011, 0x00000000}, + {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, + {0x0016, 0x00000000}, {0x0017, 0x00000000}, {0x0018, 0x00000000}, {0x0019, 0x00000000}, + {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, + {0x001e, 0x00000000}, {0x001f, 0x00000000}, {0x0020, 0x00000000}, {0x0021, 0x00000000}, + {0x0022, 0x00000000}, {0x0023, 0x00000000}, {0x0024, 0x00000000}, {0x0025, 0x00000000}, + {0x0026, 0x00000000}, {0x0027, 0x00000000}, {0x0028, 0x00000000}, {0x0029, 0x00000000}, + {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV4Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x0022, 0x0026, 0x002a, 0x002c, 0x002e, 0x003e, 0x005e, 0x007e, +}; + +static ShaderRegister agcPublicRegDefaultsV4Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x02e4, 0x00000000}, {0x02e5, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02cc, 0x00000000}, {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, + {0x02cf, 0x00000000}, {0x02bd, 0x00000000}, {0x02bc, 0x00000000}, {0x02e6, 0x00000000}, + {0x02e7, 0x00000000}, {0x02c8, 0x00000000}, {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, + {0x02cb, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bf, 0x00000000}, + {0x02be, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV4Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, + 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, + 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, +}; + +static std::uint32_t agcPublicRegDefaultsV4Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0xac198e0b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0x7d42019a, 0x00040428, + 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, + 0x00040434, 0x00000000, 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, + 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, 0x7f7bd53e, 0x00040448, + 0x00000000, 0x0c06f17c, 0x0004044c, 0x00000000, 0x6f104b72, 0x00040450, 0x00000000, 0x25c70d9c, + 0x00040454, 0x00000000, 0x3881201e, 0x00040458, 0x00000000, 0x09afddaf, 0x0004045c, 0x00000000, + 0x367d63cf, 0x00040460, 0x00000000, 0x43707db8, 0x00040464, 0x00000000, 0xf6ae26ba, 0x00040468, + 0x00000000, 0x1b917652, 0x0004046c, 0x00000000, 0x2cac726e, 0x00040470, 0x00000000, 0x2cac7111, + 0x00040474, 0x00000000, 0x94b1e4f7, 0x00040478, 0x00000000, 0xe3661b6c, 0x0004047c, 0x00000000, + 0x1eb8d73a, 0x00040480, 0x00000000, 0x15051fa3, 0x00040484, 0x00000000, 0x9c51a7f1, 0x00040488, + 0x00000000, 0xa20efc70, 0x0004048c, 0x00000000, 0x0ec09f6e, 0x00040490, 0x00000000, 0x34a7d6d3, + 0x00040494, 0x00000000, 0xce831b94, 0x00040498, 0x00000000, 0x5cc72a74, 0x0004049c, 0x00000000, + 0x3b77713c, 0x000404a0, 0x00000000, 0x40f64410, 0x000404a4, 0x00000000, 0x69441268, 0x000404a8, + 0x00000000, 0x2e418b83, 0x000404ac, 0x00000000, 0xa00d0c8d, 0x000404b0, 0x00000000, 0xb1289fb3, + 0x000404b4, 0x00000000, 0x144832fb, 0x000404b8, 0x00000000, 0x9890d9fa, 0x000404bc, 0x00000000, + 0x9016faf1, 0x000404c0, 0x00000000, 0x4b73ce27, 0x000404c4, 0x00000000, 0x5f5a3e7b, 0x000404c8, + 0x00000000, 0xd4af3a51, 0x000404cc, 0x00000000, 0x6cf4f543, 0x000404d0, 0x00000000, 0x5fb86ccb, + 0x000404d4, 0x00000000, 0xedefa188, 0x000404d8, 0x00000000, 0xd0de9ee6, 0x000404dc, 0x00000000, + 0xc5831803, 0x000404e0, 0x00000000, 0x8e6de84b, 0x000404e4, 0x00000000, 0xd0771662, 0x000408e8, + 0x00000000, 0x569f7444, 0x004004ec, 0x00000000, 0x5c6637cd, 0x000408f0, 0x00000000, 0xcae3e690, + 0x000408f4, 0x00000000, 0x43fbd769, 0x000410f8, 0x00000000, 0xef550356, 0x002004fc, 0x00000000, + 0x8f52e279, 0x00040900, 0x00000000, 0x1f2d8149, 0x00100904, 0x00000000, 0x4413c6f9, 0x00040908, + 0x00000000, 0x67096014, 0x0004390c, 0x00000000, 0x88f5e915, 0x00040910, 0x00000000, 0x918106bb, + 0x00040914, 0x00000000, 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, + 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, 0x38e92c91, 0x00204128, + 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, + 0x00201134, 0x00000000, 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, + 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, + 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, + 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, + 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, + 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, + 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, + 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, + 0x00000000, 0xb26219ca, 0x0010044d, 0x00000000, 0xb25b6cf9, 0x00100451, 0x00000000, 0xb2f86101, + 0x00100455, 0x00000000, 0x07e3b155, 0x00040859, 0x00000000, 0x07e383c6, 0x0004085d, 0x00000000, + 0xbda98653, 0x00400461, 0x00000000, 0xbdbd1d0f, 0x00800465, 0x00000000, 0xbd946fd4, 0x00800469, + 0x00000000, 0xbdf02a4c, 0x0080046d, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xf6be6f25, + 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, 0x862ee1be, 0x0004042e, 0x00000000, + 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, 0x00000000, 0xd1006f62, 0x0004043a, + 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, 0x00040442, 0x00000000, 0x141f6002, + 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, 0x14f68dfa, 0x0004044e, 0x00000000, + 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, 0x00000000, 0x5d9ed616, 0x0004045a, + 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, 0x00040462, 0x00000000, 0x5f4aaed9, + 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, 0x5ec84729, 0x0004046e, 0x00000000, + 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, 0x00000000, 0x5f0f3449, 0x0004047a, + 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, 0x00040482, 0x00000000, 0xee4f8201, + 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, 0x381fc91f, 0x0004048e, 0x00000000, + 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, 0x00000000, 0xf6d8a76e, 0x0004049a, + 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, 0x000404a2, 0x00000000, 0x98a09d0e, + 0x000408a6, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV4 = { + agcPublicRegDefaultsV4Tbl0Regs, + 488, + agcPublicRegDefaultsV4Tbl0Ptrs, + 80, + agcPublicRegDefaultsV4Tbl1Regs, + 158, + agcPublicRegDefaultsV4Tbl1Ptrs, + 28, + agcPublicRegDefaultsV4Tbl2Regs, + 43, + agcPublicRegDefaultsV4Tbl2Ptrs, + 42, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV4Types, + 150, +}; + + +static ShaderRegister agcPublicRegDefaultsV5Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000008}, {0x0104, 0x00000000}, {0x008f, 0x00000000}, + {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, {0x0200, 0x00000000}, + {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, {0x001f, 0x00000000}, + {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010b, 0x00000000}, {0x01ff, 0x00000000}, {0x0204, 0x00000000}, + {0x020d, 0x00000000}, {0x0206, 0x0000043f}, {0x02f8, 0x00000000}, {0x0083, 0x0000ffff}, + {0x0313, 0x00006000}, {0x00f0, 0x00000000}, {0x00f1, 0x00000000}, {0x00f2, 0x00000000}, + {0x00ea, 0x00000000}, {0x00e9, 0x00000000}, {0x0292, 0x00000002}, {0x0293, 0x06020000}, + {0x00e8, 0x00000000}, {0x0080, 0x00000000}, {0x0211, 0x00000000}, {0x0210, 0x04000000}, + {0x008d, 0x00000000}, {0x0282, 0x00000008}, {0x0281, 0xffff0000}, {0x0280, 0x00080008}, + {0x02df, 0x00000000}, {0x02de, 0x000001e9}, {0x0205, 0x00000240}, {0x020c, 0x00000021}, + {0x02f9, 0x0000002d}, {0x01ba, 0x00000000}, {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, + {0x029b, 0x00000002}, {0x02d6, 0x00000000}, {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, + {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, {0x02d4, 0x88101010}, {0x02db, 0x00000000}, + {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, + {0x0300, 0x00000000}, {0x0301, 0x00000000}, {0x0302, 0x00000000}, {0x0303, 0x00000000}, + {0x0304, 0x00000000}, {0x0305, 0x00000000}, {0x0306, 0x00000000}, {0x0307, 0x00000000}, + {0x0308, 0x00000000}, {0x0309, 0x00000000}, {0x030a, 0x00000000}, {0x030b, 0x00000000}, + {0x030c, 0x00000000}, {0x030d, 0x00000000}, {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, + {0x0311, 0x01fd2002}, {0x0312, 0x03ff0080}, {0x0105, 0x00000000}, {0x0106, 0x00000000}, + {0x0107, 0x00000000}, {0x0108, 0x00000000}, {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, + {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, + {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, {0x0020, 0x00000000}, {0x0021, 0x00000000}, + {0x0084, 0x00000000}, {0x0085, 0x20002000}, {0x0086, 0x00000000}, {0x0087, 0x20002000}, + {0x0088, 0x00000000}, {0x0089, 0x20002000}, {0x008a, 0x00000000}, {0x008b, 0x20002000}, + {0x00db, 0x00000000}, {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0010, 0x80000180}, + {0x0011, 0x20000180}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, + {0x0015, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, + {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x0002, 0x00000000}, {0x0005, 0x00000000}, + {0x0007, 0x00000000}, {0x000b, 0x00000000}, {0x000a, 0x00000000}, {0x00eb, 0xff00ff00}, + {0x00ec, 0x00010000}, {0x00f1, 0x00000000}, {0x00f2, 0x00000000}, {0x0090, 0x80000000}, + {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, {0x02fb, 0x3f800000}, {0x02fc, 0x3f800000}, + {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, {0x02e3, 0x00000000}, {0x02e0, 0x00000000}, + {0x02e1, 0x00000000}, {0x0003, 0x00000000}, {0x0004, 0x00000000}, {0x0318, 0x00000000}, + {0x031b, 0x00000000}, {0x031c, 0x00000000}, {0x031d, 0x00000000}, {0x031e, 0x00000048}, + {0x031f, 0x00000000}, {0x0321, 0x00000000}, {0x0323, 0x00000000}, {0x0324, 0x00000000}, + {0x0325, 0x00000000}, {0x0390, 0x00000000}, {0x0398, 0x00000000}, {0x03a0, 0x00000000}, + {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, {0x03b8, 0x08c6c000}, {0x0327, 0x00000000}, + {0x032a, 0x00000000}, {0x032b, 0x00000000}, {0x032c, 0x00000000}, {0x032d, 0x00000048}, + {0x032e, 0x00000000}, {0x0330, 0x00000000}, {0x0332, 0x00000000}, {0x0333, 0x00000000}, + {0x0334, 0x00000000}, {0x0391, 0x00000000}, {0x0399, 0x00000000}, {0x03a1, 0x00000000}, + {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, {0x03b9, 0x08c6c000}, {0x0336, 0x00000000}, + {0x0339, 0x00000000}, {0x033a, 0x00000000}, {0x033b, 0x00000000}, {0x033c, 0x00000048}, + {0x033d, 0x00000000}, {0x033f, 0x00000000}, {0x0341, 0x00000000}, {0x0342, 0x00000000}, + {0x0343, 0x00000000}, {0x0392, 0x00000000}, {0x039a, 0x00000000}, {0x03a2, 0x00000000}, + {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, {0x03ba, 0x08c6c000}, {0x0345, 0x00000000}, + {0x0348, 0x00000000}, {0x0349, 0x00000000}, {0x034a, 0x00000000}, {0x034b, 0x00000048}, + {0x034c, 0x00000000}, {0x034e, 0x00000000}, {0x0350, 0x00000000}, {0x0351, 0x00000000}, + {0x0352, 0x00000000}, {0x0393, 0x00000000}, {0x039b, 0x00000000}, {0x03a3, 0x00000000}, + {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, {0x03bb, 0x08c6c000}, {0x0354, 0x00000000}, + {0x0357, 0x00000000}, {0x0358, 0x00000000}, {0x0359, 0x00000000}, {0x035a, 0x00000048}, + {0x035b, 0x00000000}, {0x035d, 0x00000000}, {0x035f, 0x00000000}, {0x0360, 0x00000000}, + {0x0361, 0x00000000}, {0x0394, 0x00000000}, {0x039c, 0x00000000}, {0x03a4, 0x00000000}, + {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, {0x03bc, 0x08c6c000}, {0x0363, 0x00000000}, + {0x0366, 0x00000000}, {0x0367, 0x00000000}, {0x0368, 0x00000000}, {0x0369, 0x00000048}, + {0x036a, 0x00000000}, {0x036c, 0x00000000}, {0x036e, 0x00000000}, {0x036f, 0x00000000}, + {0x0370, 0x00000000}, {0x0395, 0x00000000}, {0x039d, 0x00000000}, {0x03a5, 0x00000000}, + {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, {0x03bd, 0x08c6c000}, {0x0372, 0x00000000}, + {0x0375, 0x00000000}, {0x0376, 0x00000000}, {0x0377, 0x00000000}, {0x0378, 0x00000048}, + {0x0379, 0x00000000}, {0x037b, 0x00000000}, {0x037d, 0x00000000}, {0x037e, 0x00000000}, + {0x037f, 0x00000000}, {0x0396, 0x00000000}, {0x039e, 0x00000000}, {0x03a6, 0x00000000}, + {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, {0x03be, 0x08c6c000}, {0x0381, 0x00000000}, + {0x0384, 0x00000000}, {0x0385, 0x00000000}, {0x0386, 0x00000000}, {0x0387, 0x00000048}, + {0x0388, 0x00000000}, {0x038a, 0x00000000}, {0x038c, 0x00000000}, {0x038d, 0x00000000}, + {0x038e, 0x00000000}, {0x0397, 0x00000000}, {0x039f, 0x00000000}, {0x03a7, 0x00000000}, + {0x03af, 0x00000000}, {0x03b7, 0x00000000}, {0x03bf, 0x08c6c000}, {0x000c, 0x00000000}, + {0x000d, 0x40004000}, {0x0191, 0x00000000}, {0x0192, 0x00000000}, {0x0193, 0x00000000}, + {0x0194, 0x00000000}, {0x0195, 0x00000000}, {0x0196, 0x00000000}, {0x0197, 0x00000000}, + {0x0198, 0x00000000}, {0x0199, 0x00000000}, {0x019a, 0x00000000}, {0x019b, 0x00000000}, + {0x019c, 0x00000000}, {0x019d, 0x00000000}, {0x019e, 0x00000000}, {0x019f, 0x00000000}, + {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, {0x01a2, 0x00000000}, {0x01a3, 0x00000000}, + {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, {0x01a6, 0x00000000}, {0x01a7, 0x00000000}, + {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, {0x01aa, 0x00000000}, {0x01ab, 0x00000000}, + {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, {0x01ae, 0x00000000}, {0x01af, 0x00000000}, + {0x01b0, 0x00000000}, {0x016f, 0x00000000}, {0x0170, 0x00000000}, {0x0171, 0x00000000}, + {0x0172, 0x00000000}, {0x0173, 0x00000000}, {0x0174, 0x00000000}, {0x0175, 0x00000000}, + {0x0176, 0x00000000}, {0x0177, 0x00000000}, {0x0178, 0x00000000}, {0x0179, 0x00000000}, + {0x017a, 0x00000000}, {0x017b, 0x00000000}, {0x017c, 0x00000000}, {0x017d, 0x00000000}, + {0x017e, 0x00000000}, {0x017f, 0x00000000}, {0x0180, 0x00000000}, {0x0181, 0x00000000}, + {0x0182, 0x00000000}, {0x0183, 0x00000000}, {0x0184, 0x00000000}, {0x0185, 0x00000000}, + {0x0186, 0x00000000}, {0x0187, 0x00000000}, {0x0188, 0x00000000}, {0x0189, 0x00000000}, + {0x018a, 0x00000000}, {0x018b, 0x00000000}, {0x018c, 0x00000000}, {0x018d, 0x00000000}, + {0x018e, 0x00000000}, {0x010f, 0x3f800000}, {0x0111, 0x3f800000}, {0x0113, 0x3f800000}, + {0x0110, 0x00000000}, {0x0112, 0x00000000}, {0x0114, 0x00000000}, {0x0094, 0x80000000}, + {0x0095, 0x40004000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0115, 0x3f800000}, + {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, {0x0116, 0x00000000}, {0x0118, 0x00000000}, + {0x011a, 0x00000000}, {0x0096, 0x80000000}, {0x0097, 0x40004000}, {0x00b6, 0x00000000}, + {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, {0x011d, 0x3f800000}, {0x011f, 0x3f800000}, + {0x011c, 0x00000000}, {0x011e, 0x00000000}, {0x0120, 0x00000000}, {0x0098, 0x80000000}, + {0x0099, 0x40004000}, {0x00b8, 0x00000000}, {0x00b9, 0x00000000}, {0x0121, 0x3f800000}, + {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, {0x0122, 0x00000000}, {0x0124, 0x00000000}, + {0x0126, 0x00000000}, {0x009a, 0x80000000}, {0x009b, 0x40004000}, {0x00ba, 0x00000000}, + {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, {0x0129, 0x3f800000}, {0x012b, 0x3f800000}, + {0x0128, 0x00000000}, {0x012a, 0x00000000}, {0x012c, 0x00000000}, {0x009c, 0x80000000}, + {0x009d, 0x40004000}, {0x00bc, 0x00000000}, {0x00bd, 0x00000000}, {0x012d, 0x3f800000}, + {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, {0x012e, 0x00000000}, {0x0130, 0x00000000}, + {0x0132, 0x00000000}, {0x009e, 0x80000000}, {0x009f, 0x40004000}, {0x00be, 0x00000000}, + {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, {0x0135, 0x3f800000}, {0x0137, 0x3f800000}, + {0x0134, 0x00000000}, {0x0136, 0x00000000}, {0x0138, 0x00000000}, {0x00a0, 0x80000000}, + {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, {0x00c1, 0x00000000}, {0x0139, 0x3f800000}, + {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, {0x013a, 0x00000000}, {0x013c, 0x00000000}, + {0x013e, 0x00000000}, {0x00a2, 0x80000000}, {0x00a3, 0x40004000}, {0x00c2, 0x00000000}, + {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, {0x0141, 0x3f800000}, {0x0143, 0x3f800000}, + {0x0140, 0x00000000}, {0x0142, 0x00000000}, {0x0144, 0x00000000}, {0x00a4, 0x80000000}, + {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, {0x00c5, 0x00000000}, {0x0145, 0x3f800000}, + {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, {0x0146, 0x00000000}, {0x0148, 0x00000000}, + {0x014a, 0x00000000}, {0x00a6, 0x80000000}, {0x00a7, 0x40004000}, {0x00c6, 0x00000000}, + {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, {0x014d, 0x3f800000}, {0x014f, 0x3f800000}, + {0x014c, 0x00000000}, {0x014e, 0x00000000}, {0x0150, 0x00000000}, {0x00a8, 0x80000000}, + {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0151, 0x3f800000}, + {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, {0x0152, 0x00000000}, {0x0154, 0x00000000}, + {0x0156, 0x00000000}, {0x00aa, 0x80000000}, {0x00ab, 0x40004000}, {0x00ca, 0x00000000}, + {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, {0x0159, 0x3f800000}, {0x015b, 0x3f800000}, + {0x0158, 0x00000000}, {0x015a, 0x00000000}, {0x015c, 0x00000000}, {0x00ac, 0x80000000}, + {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, {0x00cd, 0x00000000}, {0x015d, 0x3f800000}, + {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, {0x015e, 0x00000000}, {0x0160, 0x00000000}, + {0x0162, 0x00000000}, {0x00ae, 0x80000000}, {0x00af, 0x40004000}, {0x00ce, 0x00000000}, + {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, {0x0165, 0x3f800000}, {0x0167, 0x3f800000}, + {0x0164, 0x00000000}, {0x0166, 0x00000000}, {0x0168, 0x00000000}, {0x00b0, 0x80000000}, + {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, {0x00d1, 0x00000000}, {0x0169, 0x3f800000}, + {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, {0x016a, 0x00000000}, {0x016c, 0x00000000}, + {0x016e, 0x00000000}, {0x00b2, 0x80000000}, {0x00b3, 0x40004000}, {0x00d2, 0x00000000}, + {0x00d3, 0x00000000}, {0x0081, 0x80000000}, {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV5Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x003a, 0x004a, 0x004c, + 0x004e, 0x0052, 0x005a, 0x005c, 0x0064, 0x0065, 0x0067, 0x0077, 0x0079, 0x007b, 0x007d, 0x0081, + 0x0083, 0x0085, 0x0087, 0x0107, 0x0109, 0x0129, 0x0149, 0x01e9, +}; + +static ShaderRegister agcPublicRegDefaultsV5Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0087, 0x0000ffff}, {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, + {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, + {0x0108, 0x00000000}, {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, + {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0280, 0x00000000}, {0x00b2, 0x00000000}, + {0x00b3, 0x00000000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0132, 0x00000000}, + {0x0133, 0x00000000}, {0x0134, 0x00000000}, {0x0135, 0x00000000}, {0x0032, 0x00000000}, + {0x0033, 0x00000000}, {0x0034, 0x00000000}, {0x0035, 0x00000000}, {0x0082, 0x00000000}, + {0x0083, 0x00000000}, {0x0102, 0x00000000}, {0x0103, 0x00000000}, {0x0240, 0x00000000}, + {0x0241, 0x00000000}, {0x0242, 0x00000000}, {0x0243, 0x00000000}, {0x0244, 0x00000000}, + {0x0245, 0x00000000}, {0x0246, 0x00000000}, {0x0247, 0x00000000}, {0x0248, 0x00000000}, + {0x0249, 0x00000000}, {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x024c, 0x00000000}, + {0x024d, 0x00000000}, {0x024e, 0x00000000}, {0x024f, 0x00000000}, {0x008c, 0x00000000}, + {0x008d, 0x00000000}, {0x008e, 0x00000000}, {0x008f, 0x00000000}, {0x0090, 0x00000000}, + {0x0091, 0x00000000}, {0x0092, 0x00000000}, {0x0093, 0x00000000}, {0x0094, 0x00000000}, + {0x0095, 0x00000000}, {0x0096, 0x00000000}, {0x0097, 0x00000000}, {0x0098, 0x00000000}, + {0x0099, 0x00000000}, {0x009a, 0x00000000}, {0x009b, 0x00000000}, {0x009c, 0x00000000}, + {0x009d, 0x00000000}, {0x009e, 0x00000000}, {0x009f, 0x00000000}, {0x00a0, 0x00000000}, + {0x00a1, 0x00000000}, {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, + {0x00a5, 0x00000000}, {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, + {0x00a9, 0x00000000}, {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010e, 0x00000000}, {0x010f, 0x00000000}, {0x0110, 0x00000000}, + {0x0111, 0x00000000}, {0x0112, 0x00000000}, {0x0113, 0x00000000}, {0x0114, 0x00000000}, + {0x0115, 0x00000000}, {0x0116, 0x00000000}, {0x0117, 0x00000000}, {0x0118, 0x00000000}, + {0x0119, 0x00000000}, {0x011a, 0x00000000}, {0x011b, 0x00000000}, {0x011c, 0x00000000}, + {0x011d, 0x00000000}, {0x011e, 0x00000000}, {0x011f, 0x00000000}, {0x0120, 0x00000000}, + {0x0121, 0x00000000}, {0x0122, 0x00000000}, {0x0123, 0x00000000}, {0x0124, 0x00000000}, + {0x0125, 0x00000000}, {0x0126, 0x00000000}, {0x0127, 0x00000000}, {0x0128, 0x00000000}, + {0x0129, 0x00000000}, {0x012a, 0x00000000}, {0x012b, 0x00000000}, {0x000c, 0x00000000}, + {0x000d, 0x00000000}, {0x000e, 0x00000000}, {0x000f, 0x00000000}, {0x0010, 0x00000000}, + {0x0011, 0x00000000}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, + {0x0015, 0x00000000}, {0x0016, 0x00000000}, {0x0017, 0x00000000}, {0x0018, 0x00000000}, + {0x0019, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, + {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x001f, 0x00000000}, {0x0020, 0x00000000}, + {0x0021, 0x00000000}, {0x0022, 0x00000000}, {0x0023, 0x00000000}, {0x0024, 0x00000000}, + {0x0025, 0x00000000}, {0x0026, 0x00000000}, {0x0027, 0x00000000}, {0x0028, 0x00000000}, + {0x0029, 0x00000000}, {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV5Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, +}; + +static ShaderRegister agcPublicRegDefaultsV5Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x02e4, 0x00000000}, {0x02e5, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02cc, 0x00000000}, {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, + {0x02cf, 0x00000000}, {0x02bd, 0x00000000}, {0x02bc, 0x00000000}, {0x02e6, 0x00000000}, + {0x02e7, 0x00000000}, {0x02c8, 0x00000000}, {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, + {0x02cb, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bf, 0x00000000}, + {0x02be, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, {0x02e4, 0x00000000}, + {0x02e5, 0x00000000}, {0x02e6, 0x00000000}, {0x02e7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02c8, 0x00000000}, + {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, {0x02cb, 0x00000000}, {0x02cc, 0x00000000}, + {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, {0x02cf, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bc, 0x00000000}, + {0x02bd, 0x00000000}, {0x02be, 0x00000000}, {0x02bf, 0x00000000}, {0x00a2, 0x00000000}, + {0x025c, 0x00000000}, {0x025d, 0x00000000}, {0x025e, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV5Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002b, 0x0033, 0x0043, 0x0047, 0x0048, +}; + +static std::uint32_t agcPublicRegDefaultsV5Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x2cac726e, 0x00040468, + 0x00000000, 0x2cac7111, 0x0004046c, 0x00000000, 0x94b1e4f7, 0x00040470, 0x00000000, 0xe3661b6c, + 0x00040474, 0x00000000, 0x1eb8d73a, 0x00040478, 0x00000000, 0x15051fa3, 0x0004047c, 0x00000000, + 0x9c51a7f1, 0x00040480, 0x00000000, 0xa20efc70, 0x00040484, 0x00000000, 0x0ec09f6e, 0x00040488, + 0x00000000, 0x34a7d6d3, 0x0004048c, 0x00000000, 0xce831b94, 0x00040490, 0x00000000, 0x5cc72a74, + 0x00040494, 0x00000000, 0x3b77713c, 0x00040498, 0x00000000, 0x40f64410, 0x0004049c, 0x00000000, + 0x69441268, 0x000404a0, 0x00000000, 0x2e418b83, 0x000404a4, 0x00000000, 0xa00d0c8d, 0x000404a8, + 0x00000000, 0xb1289fb3, 0x000404ac, 0x00000000, 0x144832fb, 0x000404b0, 0x00000000, 0x9890d9fa, + 0x000404b4, 0x00000000, 0x9016faf1, 0x000404b8, 0x00000000, 0x4b73ce27, 0x000404bc, 0x00000000, + 0x5f5a3e7b, 0x000404c0, 0x00000000, 0xd4af3a51, 0x000404c4, 0x00000000, 0x6cf4f543, 0x000404c8, + 0x00000000, 0x5fb86ccb, 0x000404cc, 0x00000000, 0xedefa188, 0x000404d0, 0x00000000, 0xd0de9ee6, + 0x000404d4, 0x00000000, 0xc5831803, 0x000404d8, 0x00000000, 0x8e6de84b, 0x000404dc, 0x00000000, + 0xd0771662, 0x000408e0, 0x00000000, 0x569f7444, 0x004004e4, 0x00000000, 0x5c6637cd, 0x000408e8, + 0x00000000, 0xcae3e690, 0x000408ec, 0x00000000, 0x43fbd769, 0x000410f0, 0x00000000, 0xef550356, + 0x002004f4, 0x00000000, 0x8f52e279, 0x000408f8, 0x00000000, 0x1f2d8149, 0x001008fc, 0x00000000, + 0x853d0614, 0x00040500, 0x00000000, 0x4413c6f9, 0x00040904, 0x00000000, 0x67096014, 0x00044108, + 0x00000000, 0x88f5e915, 0x0004090c, 0x00000000, 0x033f1eff, 0x00040910, 0x00000000, 0x918106bb, + 0x00040914, 0x00000000, 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, + 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, 0x38e92c91, 0x00204128, + 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, + 0x00201134, 0x00000000, 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, + 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, + 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, + 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, + 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, + 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, + 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, + 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, + 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, + 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, + 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, 0xbdbd1d0f, 0x00800469, + 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, + 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, + 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, + 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, + 0x00040422, 0x00000000, 0xf6be6f25, 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, + 0x862ee1be, 0x0004042e, 0x00000000, 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, + 0x00000000, 0xd1006f62, 0x0004043a, 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, + 0x00040442, 0x00000000, 0x141f6002, 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, + 0x14f68dfa, 0x0004044e, 0x00000000, 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, + 0x00000000, 0x5d9ed616, 0x0004045a, 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, + 0x00040462, 0x00000000, 0x5f4aaed9, 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, + 0x5ec84729, 0x0004046e, 0x00000000, 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, + 0x00000000, 0x5f0f3449, 0x0004047a, 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, + 0x00040482, 0x00000000, 0xee4f8201, 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, + 0x381fc91f, 0x0004048e, 0x00000000, 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, + 0x00000000, 0xf6d8a76e, 0x0004049a, 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, + 0x000404a2, 0x00000000, 0x98a09d0e, 0x000408a6, 0x00000000, 0x195d37d2, 0x001008aa, 0x00000000, + 0xf9ec4f85, 0x001010ae, 0x00000000, 0x4626b750, 0x000808b2, 0x00000000, 0xde5b3431, 0x000404b6, + 0x00000000, 0x036ac8a6, 0x000c04ba, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV5 = { + agcPublicRegDefaultsV5Tbl0Regs, + 491, + agcPublicRegDefaultsV5Tbl0Ptrs, + 80, + agcPublicRegDefaultsV5Tbl1Regs, + 159, + agcPublicRegDefaultsV5Tbl1Ptrs, + 29, + agcPublicRegDefaultsV5Tbl2Regs, + 75, + agcPublicRegDefaultsV5Tbl2Ptrs, + 47, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV5Types, + 156, +}; + + +static ShaderRegister agcPublicRegDefaultsV7Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000008}, {0x0104, 0x00000000}, {0x008f, 0x00000000}, + {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, {0x0200, 0x00000000}, + {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, {0x001f, 0x00000000}, + {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010b, 0x00000000}, {0x01ff, 0x00000000}, {0x0204, 0x00000000}, + {0x020d, 0x00000000}, {0x0206, 0x0000043f}, {0x02f8, 0x00000000}, {0x0083, 0x0000ffff}, + {0x0313, 0x00006000}, {0x00f0, 0x00000000}, {0x00ea, 0x00000000}, {0x00e9, 0x00000000}, + {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, {0x0080, 0x00000000}, + {0x0211, 0x00000000}, {0x0210, 0x04000000}, {0x008d, 0x00000000}, {0x0282, 0x00000008}, + {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, {0x02de, 0x000001e9}, + {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, {0x01ba, 0x00000000}, + {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, {0x029b, 0x00000002}, {0x02d6, 0x00000000}, + {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, + {0x02d4, 0x88101010}, {0x02db, 0x00000000}, {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, + {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, {0x0300, 0x00000000}, {0x0301, 0x00000000}, + {0x0302, 0x00000000}, {0x0303, 0x00000000}, {0x0304, 0x00000000}, {0x0305, 0x00000000}, + {0x0306, 0x00000000}, {0x0307, 0x00000000}, {0x0308, 0x00000000}, {0x0309, 0x00000000}, + {0x030a, 0x00000000}, {0x030b, 0x00000000}, {0x030c, 0x00000000}, {0x030d, 0x00000000}, + {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, {0x0311, 0x01fd2002}, {0x0312, 0x03ff0080}, + {0x0105, 0x00000000}, {0x0106, 0x00000000}, {0x0107, 0x00000000}, {0x0108, 0x00000000}, + {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, + {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, + {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0084, 0x00000000}, {0x0085, 0x20002000}, + {0x0086, 0x00000000}, {0x0087, 0x20002000}, {0x0088, 0x00000000}, {0x0089, 0x20002000}, + {0x008a, 0x00000000}, {0x008b, 0x20002000}, {0x00db, 0x00000000}, {0x0008, 0x00000000}, + {0x0009, 0x00000000}, {0x0010, 0x80000180}, {0x0011, 0x20000180}, {0x0012, 0x00000000}, + {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x001a, 0x00000000}, + {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, {0x001e, 0x00000000}, + {0x0002, 0x00000000}, {0x0005, 0x00000000}, {0x0007, 0x00000000}, {0x000b, 0x00000000}, + {0x000a, 0x00000000}, {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, {0x00f1, 0x00000000}, + {0x00f2, 0x00000000}, {0x0090, 0x80000000}, {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, + {0x02fb, 0x3f800000}, {0x02fc, 0x3f800000}, {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, + {0x02e3, 0x00000000}, {0x02e0, 0x00000000}, {0x02e1, 0x00000000}, {0x0003, 0x00000000}, + {0x0004, 0x00000000}, {0x0318, 0x00000000}, {0x031b, 0x00000000}, {0x031c, 0x00000000}, + {0x031d, 0x00000000}, {0x031e, 0x00000048}, {0x031f, 0x00000000}, {0x0321, 0x00000000}, + {0x0323, 0x00000000}, {0x0324, 0x00000000}, {0x0325, 0x00000000}, {0x0390, 0x00000000}, + {0x0398, 0x00000000}, {0x03a0, 0x00000000}, {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, + {0x03b8, 0x08c6c000}, {0x0327, 0x00000000}, {0x032a, 0x00000000}, {0x032b, 0x00000000}, + {0x032c, 0x00000000}, {0x032d, 0x00000048}, {0x032e, 0x00000000}, {0x0330, 0x00000000}, + {0x0332, 0x00000000}, {0x0333, 0x00000000}, {0x0334, 0x00000000}, {0x0391, 0x00000000}, + {0x0399, 0x00000000}, {0x03a1, 0x00000000}, {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, + {0x03b9, 0x08c6c000}, {0x0336, 0x00000000}, {0x0339, 0x00000000}, {0x033a, 0x00000000}, + {0x033b, 0x00000000}, {0x033c, 0x00000048}, {0x033d, 0x00000000}, {0x033f, 0x00000000}, + {0x0341, 0x00000000}, {0x0342, 0x00000000}, {0x0343, 0x00000000}, {0x0392, 0x00000000}, + {0x039a, 0x00000000}, {0x03a2, 0x00000000}, {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, + {0x03ba, 0x08c6c000}, {0x0345, 0x00000000}, {0x0348, 0x00000000}, {0x0349, 0x00000000}, + {0x034a, 0x00000000}, {0x034b, 0x00000048}, {0x034c, 0x00000000}, {0x034e, 0x00000000}, + {0x0350, 0x00000000}, {0x0351, 0x00000000}, {0x0352, 0x00000000}, {0x0393, 0x00000000}, + {0x039b, 0x00000000}, {0x03a3, 0x00000000}, {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, + {0x03bb, 0x08c6c000}, {0x0354, 0x00000000}, {0x0357, 0x00000000}, {0x0358, 0x00000000}, + {0x0359, 0x00000000}, {0x035a, 0x00000048}, {0x035b, 0x00000000}, {0x035d, 0x00000000}, + {0x035f, 0x00000000}, {0x0360, 0x00000000}, {0x0361, 0x00000000}, {0x0394, 0x00000000}, + {0x039c, 0x00000000}, {0x03a4, 0x00000000}, {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, + {0x03bc, 0x08c6c000}, {0x0363, 0x00000000}, {0x0366, 0x00000000}, {0x0367, 0x00000000}, + {0x0368, 0x00000000}, {0x0369, 0x00000048}, {0x036a, 0x00000000}, {0x036c, 0x00000000}, + {0x036e, 0x00000000}, {0x036f, 0x00000000}, {0x0370, 0x00000000}, {0x0395, 0x00000000}, + {0x039d, 0x00000000}, {0x03a5, 0x00000000}, {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, + {0x03bd, 0x08c6c000}, {0x0372, 0x00000000}, {0x0375, 0x00000000}, {0x0376, 0x00000000}, + {0x0377, 0x00000000}, {0x0378, 0x00000048}, {0x0379, 0x00000000}, {0x037b, 0x00000000}, + {0x037d, 0x00000000}, {0x037e, 0x00000000}, {0x037f, 0x00000000}, {0x0396, 0x00000000}, + {0x039e, 0x00000000}, {0x03a6, 0x00000000}, {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, + {0x03be, 0x08c6c000}, {0x0381, 0x00000000}, {0x0384, 0x00000000}, {0x0385, 0x00000000}, + {0x0386, 0x00000000}, {0x0387, 0x00000048}, {0x0388, 0x00000000}, {0x038a, 0x00000000}, + {0x038c, 0x00000000}, {0x038d, 0x00000000}, {0x038e, 0x00000000}, {0x0397, 0x00000000}, + {0x039f, 0x00000000}, {0x03a7, 0x00000000}, {0x03af, 0x00000000}, {0x03b7, 0x00000000}, + {0x03bf, 0x08c6c000}, {0x000c, 0x00000000}, {0x000d, 0x40004000}, {0x0191, 0x00000000}, + {0x0192, 0x00000000}, {0x0193, 0x00000000}, {0x0194, 0x00000000}, {0x0195, 0x00000000}, + {0x0196, 0x00000000}, {0x0197, 0x00000000}, {0x0198, 0x00000000}, {0x0199, 0x00000000}, + {0x019a, 0x00000000}, {0x019b, 0x00000000}, {0x019c, 0x00000000}, {0x019d, 0x00000000}, + {0x019e, 0x00000000}, {0x019f, 0x00000000}, {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, + {0x01a2, 0x00000000}, {0x01a3, 0x00000000}, {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, + {0x01a6, 0x00000000}, {0x01a7, 0x00000000}, {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, + {0x01aa, 0x00000000}, {0x01ab, 0x00000000}, {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, + {0x01ae, 0x00000000}, {0x01af, 0x00000000}, {0x01b0, 0x00000000}, {0x016f, 0x00000000}, + {0x0170, 0x00000000}, {0x0171, 0x00000000}, {0x0172, 0x00000000}, {0x0173, 0x00000000}, + {0x0174, 0x00000000}, {0x0175, 0x00000000}, {0x0176, 0x00000000}, {0x0177, 0x00000000}, + {0x0178, 0x00000000}, {0x0179, 0x00000000}, {0x017a, 0x00000000}, {0x017b, 0x00000000}, + {0x017c, 0x00000000}, {0x017d, 0x00000000}, {0x017e, 0x00000000}, {0x017f, 0x00000000}, + {0x0180, 0x00000000}, {0x0181, 0x00000000}, {0x0182, 0x00000000}, {0x0183, 0x00000000}, + {0x0184, 0x00000000}, {0x0185, 0x00000000}, {0x0186, 0x00000000}, {0x0187, 0x00000000}, + {0x0188, 0x00000000}, {0x0189, 0x00000000}, {0x018a, 0x00000000}, {0x018b, 0x00000000}, + {0x018c, 0x00000000}, {0x018d, 0x00000000}, {0x018e, 0x00000000}, {0x010f, 0x3f800000}, + {0x0111, 0x3f800000}, {0x0113, 0x3f800000}, {0x0110, 0x00000000}, {0x0112, 0x00000000}, + {0x0114, 0x00000000}, {0x0094, 0x80000000}, {0x0095, 0x40004000}, {0x00b4, 0x00000000}, + {0x00b5, 0x00000000}, {0x0115, 0x3f800000}, {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, + {0x0116, 0x00000000}, {0x0118, 0x00000000}, {0x011a, 0x00000000}, {0x0096, 0x80000000}, + {0x0097, 0x40004000}, {0x00b6, 0x00000000}, {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, + {0x011d, 0x3f800000}, {0x011f, 0x3f800000}, {0x011c, 0x00000000}, {0x011e, 0x00000000}, + {0x0120, 0x00000000}, {0x0098, 0x80000000}, {0x0099, 0x40004000}, {0x00b8, 0x00000000}, + {0x00b9, 0x00000000}, {0x0121, 0x3f800000}, {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, + {0x0122, 0x00000000}, {0x0124, 0x00000000}, {0x0126, 0x00000000}, {0x009a, 0x80000000}, + {0x009b, 0x40004000}, {0x00ba, 0x00000000}, {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, + {0x0129, 0x3f800000}, {0x012b, 0x3f800000}, {0x0128, 0x00000000}, {0x012a, 0x00000000}, + {0x012c, 0x00000000}, {0x009c, 0x80000000}, {0x009d, 0x40004000}, {0x00bc, 0x00000000}, + {0x00bd, 0x00000000}, {0x012d, 0x3f800000}, {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, + {0x012e, 0x00000000}, {0x0130, 0x00000000}, {0x0132, 0x00000000}, {0x009e, 0x80000000}, + {0x009f, 0x40004000}, {0x00be, 0x00000000}, {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, + {0x0135, 0x3f800000}, {0x0137, 0x3f800000}, {0x0134, 0x00000000}, {0x0136, 0x00000000}, + {0x0138, 0x00000000}, {0x00a0, 0x80000000}, {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, + {0x00c1, 0x00000000}, {0x0139, 0x3f800000}, {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, + {0x013a, 0x00000000}, {0x013c, 0x00000000}, {0x013e, 0x00000000}, {0x00a2, 0x80000000}, + {0x00a3, 0x40004000}, {0x00c2, 0x00000000}, {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, + {0x0141, 0x3f800000}, {0x0143, 0x3f800000}, {0x0140, 0x00000000}, {0x0142, 0x00000000}, + {0x0144, 0x00000000}, {0x00a4, 0x80000000}, {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, + {0x00c5, 0x00000000}, {0x0145, 0x3f800000}, {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, + {0x0146, 0x00000000}, {0x0148, 0x00000000}, {0x014a, 0x00000000}, {0x00a6, 0x80000000}, + {0x00a7, 0x40004000}, {0x00c6, 0x00000000}, {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, + {0x014d, 0x3f800000}, {0x014f, 0x3f800000}, {0x014c, 0x00000000}, {0x014e, 0x00000000}, + {0x0150, 0x00000000}, {0x00a8, 0x80000000}, {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, + {0x00c9, 0x00000000}, {0x0151, 0x3f800000}, {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, + {0x0152, 0x00000000}, {0x0154, 0x00000000}, {0x0156, 0x00000000}, {0x00aa, 0x80000000}, + {0x00ab, 0x40004000}, {0x00ca, 0x00000000}, {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, + {0x0159, 0x3f800000}, {0x015b, 0x3f800000}, {0x0158, 0x00000000}, {0x015a, 0x00000000}, + {0x015c, 0x00000000}, {0x00ac, 0x80000000}, {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, + {0x00cd, 0x00000000}, {0x015d, 0x3f800000}, {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, + {0x015e, 0x00000000}, {0x0160, 0x00000000}, {0x0162, 0x00000000}, {0x00ae, 0x80000000}, + {0x00af, 0x40004000}, {0x00ce, 0x00000000}, {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, + {0x0165, 0x3f800000}, {0x0167, 0x3f800000}, {0x0164, 0x00000000}, {0x0166, 0x00000000}, + {0x0168, 0x00000000}, {0x00b0, 0x80000000}, {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, + {0x00d1, 0x00000000}, {0x0169, 0x3f800000}, {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, + {0x016a, 0x00000000}, {0x016c, 0x00000000}, {0x016e, 0x00000000}, {0x00b2, 0x80000000}, + {0x00b3, 0x40004000}, {0x00d2, 0x00000000}, {0x00d3, 0x00000000}, {0x0081, 0x80000000}, + {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV7Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0038, 0x0048, 0x004a, 0x004c, 0x0050, + 0x0058, 0x005a, 0x0062, 0x0063, 0x0065, 0x0075, 0x0077, 0x0079, 0x007b, 0x007f, 0x0081, 0x0083, + 0x0085, 0x0105, 0x0107, 0x0127, 0x0147, 0x01e7, +}; + +static ShaderRegister agcPublicRegDefaultsV7Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0087, 0x0000ffff}, {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, + {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, + {0x0108, 0x00000000}, {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, + {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0280, 0x00000000}, {0x00b2, 0x00000000}, + {0x00b3, 0x00000000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0132, 0x00000000}, + {0x0133, 0x00000000}, {0x0134, 0x00000000}, {0x0135, 0x00000000}, {0x0032, 0x00000000}, + {0x0033, 0x00000000}, {0x0034, 0x00000000}, {0x0035, 0x00000000}, {0x0082, 0x00000000}, + {0x0083, 0x00000000}, {0x0102, 0x00000000}, {0x0103, 0x00000000}, {0x0240, 0x00000000}, + {0x0241, 0x00000000}, {0x0242, 0x00000000}, {0x0243, 0x00000000}, {0x0244, 0x00000000}, + {0x0245, 0x00000000}, {0x0246, 0x00000000}, {0x0247, 0x00000000}, {0x0248, 0x00000000}, + {0x0249, 0x00000000}, {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x024c, 0x00000000}, + {0x024d, 0x00000000}, {0x024e, 0x00000000}, {0x024f, 0x00000000}, {0x008c, 0x00000000}, + {0x008d, 0x00000000}, {0x008e, 0x00000000}, {0x008f, 0x00000000}, {0x0090, 0x00000000}, + {0x0091, 0x00000000}, {0x0092, 0x00000000}, {0x0093, 0x00000000}, {0x0094, 0x00000000}, + {0x0095, 0x00000000}, {0x0096, 0x00000000}, {0x0097, 0x00000000}, {0x0098, 0x00000000}, + {0x0099, 0x00000000}, {0x009a, 0x00000000}, {0x009b, 0x00000000}, {0x009c, 0x00000000}, + {0x009d, 0x00000000}, {0x009e, 0x00000000}, {0x009f, 0x00000000}, {0x00a0, 0x00000000}, + {0x00a1, 0x00000000}, {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, + {0x00a5, 0x00000000}, {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, + {0x00a9, 0x00000000}, {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010e, 0x00000000}, {0x010f, 0x00000000}, {0x0110, 0x00000000}, + {0x0111, 0x00000000}, {0x0112, 0x00000000}, {0x0113, 0x00000000}, {0x0114, 0x00000000}, + {0x0115, 0x00000000}, {0x0116, 0x00000000}, {0x0117, 0x00000000}, {0x0118, 0x00000000}, + {0x0119, 0x00000000}, {0x011a, 0x00000000}, {0x011b, 0x00000000}, {0x011c, 0x00000000}, + {0x011d, 0x00000000}, {0x011e, 0x00000000}, {0x011f, 0x00000000}, {0x0120, 0x00000000}, + {0x0121, 0x00000000}, {0x0122, 0x00000000}, {0x0123, 0x00000000}, {0x0124, 0x00000000}, + {0x0125, 0x00000000}, {0x0126, 0x00000000}, {0x0127, 0x00000000}, {0x0128, 0x00000000}, + {0x0129, 0x00000000}, {0x012a, 0x00000000}, {0x012b, 0x00000000}, {0x000c, 0x00000000}, + {0x000d, 0x00000000}, {0x000e, 0x00000000}, {0x000f, 0x00000000}, {0x0010, 0x00000000}, + {0x0011, 0x00000000}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, + {0x0015, 0x00000000}, {0x0016, 0x00000000}, {0x0017, 0x00000000}, {0x0018, 0x00000000}, + {0x0019, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, + {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x001f, 0x00000000}, {0x0020, 0x00000000}, + {0x0021, 0x00000000}, {0x0022, 0x00000000}, {0x0023, 0x00000000}, {0x0024, 0x00000000}, + {0x0025, 0x00000000}, {0x0026, 0x00000000}, {0x0027, 0x00000000}, {0x0028, 0x00000000}, + {0x0029, 0x00000000}, {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV7Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, +}; + +static ShaderRegister agcPublicRegDefaultsV7Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, {0x02e4, 0x00000000}, + {0x02e5, 0x00000000}, {0x02e6, 0x00000000}, {0x02e7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02c8, 0x00000000}, + {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, {0x02cb, 0x00000000}, {0x02cc, 0x00000000}, + {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, {0x02cf, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bc, 0x00000000}, + {0x02bd, 0x00000000}, {0x02be, 0x00000000}, {0x02bf, 0x00000000}, {0x0035, 0x00000000}, + {0x0036, 0x00000000}, {0x0037, 0x00000000}, {0x0038, 0x00000000}, {0x0039, 0x00000000}, + {0x003a, 0x00000000}, {0x003b, 0x00000000}, {0x003c, 0x00000000}, {0x00a2, 0x00000000}, + {0x025c, 0x00000000}, {0x025d, 0x00000000}, {0x025e, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV7Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, +}; + +static std::uint32_t agcPublicRegDefaultsV7Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x94b1e4f7, 0x00040468, + 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, + 0x00040474, 0x00000000, 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, + 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, 0xce831b94, 0x00040488, + 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, + 0x00040494, 0x00000000, 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, + 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, 0x144832fb, 0x000404a8, + 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, + 0x000404b4, 0x00000000, 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, + 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, 0xedefa188, 0x000404c8, + 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, + 0x000404d4, 0x00000000, 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, + 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, 0x43fbd769, 0x000410e8, + 0x00000000, 0xef550356, 0x002004ec, 0x00000000, 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, + 0x001008f4, 0x00000000, 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, + 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, 0x033f1eff, 0x00040908, + 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, + 0x00040914, 0x00000000, 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, + 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, 0x48531062, 0x00800528, + 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, + 0x00040934, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, + 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, + 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, + 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, + 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, + 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, + 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, + 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, + 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, + 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, + 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, + 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, + 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, + 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, + 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, + 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, + 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, + 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, + 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV7 = { + agcPublicRegDefaultsV7Tbl0Regs, + 489, + agcPublicRegDefaultsV7Tbl0Ptrs, + 78, + agcPublicRegDefaultsV7Tbl1Regs, + 159, + agcPublicRegDefaultsV7Tbl1Ptrs, + 29, + agcPublicRegDefaultsV7Tbl2Regs, + 55, + agcPublicRegDefaultsV7Tbl2Ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV7Types, + 127, +}; + + +static ShaderRegister agcPublicRegDefaultsV8Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000008}, {0x0104, 0x00000000}, {0x008f, 0x00000000}, + {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, {0x0200, 0x00000000}, + {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, {0x001f, 0x00000000}, + {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010b, 0x00000000}, {0x01ff, 0x00000000}, {0x0204, 0x00000000}, + {0x020d, 0x00000000}, {0x0206, 0x0000043f}, {0x02f8, 0x00000000}, {0x0083, 0x0000ffff}, + {0x0313, 0x00006000}, {0x00f0, 0x00000000}, {0x00ea, 0x00000000}, {0x00e9, 0x00000000}, + {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, {0x0080, 0x00000000}, + {0x0211, 0x00000000}, {0x0210, 0x04000000}, {0x008d, 0x00000000}, {0x0282, 0x00000008}, + {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, {0x02de, 0x000001e9}, + {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, {0x01ba, 0x00000000}, + {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, {0x029b, 0x00000002}, {0x02d6, 0x00000000}, + {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, + {0x02d4, 0x88101000}, {0x02db, 0x00000000}, {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, + {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, {0x0300, 0x00000000}, {0x0301, 0x00000000}, + {0x0302, 0x00000000}, {0x0303, 0x00000000}, {0x0304, 0x00000000}, {0x0305, 0x00000000}, + {0x0306, 0x00000000}, {0x0307, 0x00000000}, {0x0308, 0x00000000}, {0x0309, 0x00000000}, + {0x030a, 0x00000000}, {0x030b, 0x00000000}, {0x030c, 0x00000000}, {0x030d, 0x00000000}, + {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, {0x0311, 0x01fd2002}, {0x0312, 0x03ff0080}, + {0x0105, 0x00000000}, {0x0106, 0x00000000}, {0x0107, 0x00000000}, {0x0108, 0x00000000}, + {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, + {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, + {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0084, 0x00000000}, {0x0085, 0x20002000}, + {0x0086, 0x00000000}, {0x0087, 0x20002000}, {0x0088, 0x00000000}, {0x0089, 0x20002000}, + {0x008a, 0x00000000}, {0x008b, 0x20002000}, {0x00db, 0x00000000}, {0x0008, 0x00000000}, + {0x0009, 0x00000000}, {0x0010, 0x80000180}, {0x0011, 0x20000180}, {0x0012, 0x00000000}, + {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x001a, 0x00000000}, + {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, {0x001e, 0x00000000}, + {0x0002, 0x00000000}, {0x0005, 0x00000000}, {0x0007, 0x00000000}, {0x000b, 0x00000000}, + {0x000a, 0x00000000}, {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, {0x00f1, 0x00000000}, + {0x00f2, 0x00000000}, {0x0090, 0x80000000}, {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, + {0x02fb, 0x3f800000}, {0x02fc, 0x3f800000}, {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, + {0x02e3, 0x00000000}, {0x02e0, 0x00000000}, {0x02e1, 0x00000000}, {0x0003, 0x00000000}, + {0x0004, 0x00000000}, {0x0318, 0x00000000}, {0x031b, 0x00000000}, {0x031c, 0x00000000}, + {0x031d, 0x00000000}, {0x031e, 0x00000048}, {0x031f, 0x00000000}, {0x0321, 0x00000000}, + {0x0323, 0x00000000}, {0x0324, 0x00000000}, {0x0325, 0x00000000}, {0x0390, 0x00000000}, + {0x0398, 0x00000000}, {0x03a0, 0x00000000}, {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, + {0x03b8, 0x08c6c000}, {0x0327, 0x00000000}, {0x032a, 0x00000000}, {0x032b, 0x00000000}, + {0x032c, 0x00000000}, {0x032d, 0x00000048}, {0x032e, 0x00000000}, {0x0330, 0x00000000}, + {0x0332, 0x00000000}, {0x0333, 0x00000000}, {0x0334, 0x00000000}, {0x0391, 0x00000000}, + {0x0399, 0x00000000}, {0x03a1, 0x00000000}, {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, + {0x03b9, 0x08c6c000}, {0x0336, 0x00000000}, {0x0339, 0x00000000}, {0x033a, 0x00000000}, + {0x033b, 0x00000000}, {0x033c, 0x00000048}, {0x033d, 0x00000000}, {0x033f, 0x00000000}, + {0x0341, 0x00000000}, {0x0342, 0x00000000}, {0x0343, 0x00000000}, {0x0392, 0x00000000}, + {0x039a, 0x00000000}, {0x03a2, 0x00000000}, {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, + {0x03ba, 0x08c6c000}, {0x0345, 0x00000000}, {0x0348, 0x00000000}, {0x0349, 0x00000000}, + {0x034a, 0x00000000}, {0x034b, 0x00000048}, {0x034c, 0x00000000}, {0x034e, 0x00000000}, + {0x0350, 0x00000000}, {0x0351, 0x00000000}, {0x0352, 0x00000000}, {0x0393, 0x00000000}, + {0x039b, 0x00000000}, {0x03a3, 0x00000000}, {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, + {0x03bb, 0x08c6c000}, {0x0354, 0x00000000}, {0x0357, 0x00000000}, {0x0358, 0x00000000}, + {0x0359, 0x00000000}, {0x035a, 0x00000048}, {0x035b, 0x00000000}, {0x035d, 0x00000000}, + {0x035f, 0x00000000}, {0x0360, 0x00000000}, {0x0361, 0x00000000}, {0x0394, 0x00000000}, + {0x039c, 0x00000000}, {0x03a4, 0x00000000}, {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, + {0x03bc, 0x08c6c000}, {0x0363, 0x00000000}, {0x0366, 0x00000000}, {0x0367, 0x00000000}, + {0x0368, 0x00000000}, {0x0369, 0x00000048}, {0x036a, 0x00000000}, {0x036c, 0x00000000}, + {0x036e, 0x00000000}, {0x036f, 0x00000000}, {0x0370, 0x00000000}, {0x0395, 0x00000000}, + {0x039d, 0x00000000}, {0x03a5, 0x00000000}, {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, + {0x03bd, 0x08c6c000}, {0x0372, 0x00000000}, {0x0375, 0x00000000}, {0x0376, 0x00000000}, + {0x0377, 0x00000000}, {0x0378, 0x00000048}, {0x0379, 0x00000000}, {0x037b, 0x00000000}, + {0x037d, 0x00000000}, {0x037e, 0x00000000}, {0x037f, 0x00000000}, {0x0396, 0x00000000}, + {0x039e, 0x00000000}, {0x03a6, 0x00000000}, {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, + {0x03be, 0x08c6c000}, {0x0381, 0x00000000}, {0x0384, 0x00000000}, {0x0385, 0x00000000}, + {0x0386, 0x00000000}, {0x0387, 0x00000048}, {0x0388, 0x00000000}, {0x038a, 0x00000000}, + {0x038c, 0x00000000}, {0x038d, 0x00000000}, {0x038e, 0x00000000}, {0x0397, 0x00000000}, + {0x039f, 0x00000000}, {0x03a7, 0x00000000}, {0x03af, 0x00000000}, {0x03b7, 0x00000000}, + {0x03bf, 0x08c6c000}, {0x000c, 0x00000000}, {0x000d, 0x40004000}, {0x0191, 0x00000000}, + {0x0192, 0x00000000}, {0x0193, 0x00000000}, {0x0194, 0x00000000}, {0x0195, 0x00000000}, + {0x0196, 0x00000000}, {0x0197, 0x00000000}, {0x0198, 0x00000000}, {0x0199, 0x00000000}, + {0x019a, 0x00000000}, {0x019b, 0x00000000}, {0x019c, 0x00000000}, {0x019d, 0x00000000}, + {0x019e, 0x00000000}, {0x019f, 0x00000000}, {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, + {0x01a2, 0x00000000}, {0x01a3, 0x00000000}, {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, + {0x01a6, 0x00000000}, {0x01a7, 0x00000000}, {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, + {0x01aa, 0x00000000}, {0x01ab, 0x00000000}, {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, + {0x01ae, 0x00000000}, {0x01af, 0x00000000}, {0x01b0, 0x00000000}, {0x016f, 0x00000000}, + {0x0170, 0x00000000}, {0x0171, 0x00000000}, {0x0172, 0x00000000}, {0x0173, 0x00000000}, + {0x0174, 0x00000000}, {0x0175, 0x00000000}, {0x0176, 0x00000000}, {0x0177, 0x00000000}, + {0x0178, 0x00000000}, {0x0179, 0x00000000}, {0x017a, 0x00000000}, {0x017b, 0x00000000}, + {0x017c, 0x00000000}, {0x017d, 0x00000000}, {0x017e, 0x00000000}, {0x017f, 0x00000000}, + {0x0180, 0x00000000}, {0x0181, 0x00000000}, {0x0182, 0x00000000}, {0x0183, 0x00000000}, + {0x0184, 0x00000000}, {0x0185, 0x00000000}, {0x0186, 0x00000000}, {0x0187, 0x00000000}, + {0x0188, 0x00000000}, {0x0189, 0x00000000}, {0x018a, 0x00000000}, {0x018b, 0x00000000}, + {0x018c, 0x00000000}, {0x018d, 0x00000000}, {0x018e, 0x00000000}, {0x010f, 0x3f800000}, + {0x0111, 0x3f800000}, {0x0113, 0x3f800000}, {0x0110, 0x00000000}, {0x0112, 0x00000000}, + {0x0114, 0x00000000}, {0x0094, 0x80000000}, {0x0095, 0x40004000}, {0x00b4, 0x00000000}, + {0x00b5, 0x00000000}, {0x0115, 0x3f800000}, {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, + {0x0116, 0x00000000}, {0x0118, 0x00000000}, {0x011a, 0x00000000}, {0x0096, 0x80000000}, + {0x0097, 0x40004000}, {0x00b6, 0x00000000}, {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, + {0x011d, 0x3f800000}, {0x011f, 0x3f800000}, {0x011c, 0x00000000}, {0x011e, 0x00000000}, + {0x0120, 0x00000000}, {0x0098, 0x80000000}, {0x0099, 0x40004000}, {0x00b8, 0x00000000}, + {0x00b9, 0x00000000}, {0x0121, 0x3f800000}, {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, + {0x0122, 0x00000000}, {0x0124, 0x00000000}, {0x0126, 0x00000000}, {0x009a, 0x80000000}, + {0x009b, 0x40004000}, {0x00ba, 0x00000000}, {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, + {0x0129, 0x3f800000}, {0x012b, 0x3f800000}, {0x0128, 0x00000000}, {0x012a, 0x00000000}, + {0x012c, 0x00000000}, {0x009c, 0x80000000}, {0x009d, 0x40004000}, {0x00bc, 0x00000000}, + {0x00bd, 0x00000000}, {0x012d, 0x3f800000}, {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, + {0x012e, 0x00000000}, {0x0130, 0x00000000}, {0x0132, 0x00000000}, {0x009e, 0x80000000}, + {0x009f, 0x40004000}, {0x00be, 0x00000000}, {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, + {0x0135, 0x3f800000}, {0x0137, 0x3f800000}, {0x0134, 0x00000000}, {0x0136, 0x00000000}, + {0x0138, 0x00000000}, {0x00a0, 0x80000000}, {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, + {0x00c1, 0x00000000}, {0x0139, 0x3f800000}, {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, + {0x013a, 0x00000000}, {0x013c, 0x00000000}, {0x013e, 0x00000000}, {0x00a2, 0x80000000}, + {0x00a3, 0x40004000}, {0x00c2, 0x00000000}, {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, + {0x0141, 0x3f800000}, {0x0143, 0x3f800000}, {0x0140, 0x00000000}, {0x0142, 0x00000000}, + {0x0144, 0x00000000}, {0x00a4, 0x80000000}, {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, + {0x00c5, 0x00000000}, {0x0145, 0x3f800000}, {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, + {0x0146, 0x00000000}, {0x0148, 0x00000000}, {0x014a, 0x00000000}, {0x00a6, 0x80000000}, + {0x00a7, 0x40004000}, {0x00c6, 0x00000000}, {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, + {0x014d, 0x3f800000}, {0x014f, 0x3f800000}, {0x014c, 0x00000000}, {0x014e, 0x00000000}, + {0x0150, 0x00000000}, {0x00a8, 0x80000000}, {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, + {0x00c9, 0x00000000}, {0x0151, 0x3f800000}, {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, + {0x0152, 0x00000000}, {0x0154, 0x00000000}, {0x0156, 0x00000000}, {0x00aa, 0x80000000}, + {0x00ab, 0x40004000}, {0x00ca, 0x00000000}, {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, + {0x0159, 0x3f800000}, {0x015b, 0x3f800000}, {0x0158, 0x00000000}, {0x015a, 0x00000000}, + {0x015c, 0x00000000}, {0x00ac, 0x80000000}, {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, + {0x00cd, 0x00000000}, {0x015d, 0x3f800000}, {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, + {0x015e, 0x00000000}, {0x0160, 0x00000000}, {0x0162, 0x00000000}, {0x00ae, 0x80000000}, + {0x00af, 0x40004000}, {0x00ce, 0x00000000}, {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, + {0x0165, 0x3f800000}, {0x0167, 0x3f800000}, {0x0164, 0x00000000}, {0x0166, 0x00000000}, + {0x0168, 0x00000000}, {0x00b0, 0x80000000}, {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, + {0x00d1, 0x00000000}, {0x0169, 0x3f800000}, {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, + {0x016a, 0x00000000}, {0x016c, 0x00000000}, {0x016e, 0x00000000}, {0x00b2, 0x80000000}, + {0x00b3, 0x40004000}, {0x00d2, 0x00000000}, {0x00d3, 0x00000000}, {0x0081, 0x80000000}, + {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV8Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0038, 0x0048, 0x004a, 0x004c, 0x0050, + 0x0058, 0x005a, 0x0062, 0x0063, 0x0065, 0x0075, 0x0077, 0x0079, 0x007b, 0x007f, 0x0081, 0x0083, + 0x0085, 0x0105, 0x0107, 0x0127, 0x0147, 0x01e7, +}; + +static ShaderRegister agcPublicRegDefaultsV8Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0087, 0x0000ffff}, {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, {0x020d, 0x00000000}, + {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0088, 0x00000000}, {0x0089, 0x00000000}, + {0x0108, 0x00000000}, {0x0109, 0x00000000}, {0x0148, 0x00000000}, {0x0149, 0x00000000}, + {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0280, 0x00000000}, {0x00b2, 0x00000000}, + {0x00b3, 0x00000000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, {0x0132, 0x00000000}, + {0x0133, 0x00000000}, {0x0134, 0x00000000}, {0x0135, 0x00000000}, {0x0032, 0x00000000}, + {0x0033, 0x00000000}, {0x0034, 0x00000000}, {0x0035, 0x00000000}, {0x0082, 0x00000000}, + {0x0083, 0x00000000}, {0x0102, 0x00000000}, {0x0103, 0x00000000}, {0x0240, 0x00000000}, + {0x0241, 0x00000000}, {0x0242, 0x00000000}, {0x0243, 0x00000000}, {0x0244, 0x00000000}, + {0x0245, 0x00000000}, {0x0246, 0x00000000}, {0x0247, 0x00000000}, {0x0248, 0x00000000}, + {0x0249, 0x00000000}, {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x024c, 0x00000000}, + {0x024d, 0x00000000}, {0x024e, 0x00000000}, {0x024f, 0x00000000}, {0x008c, 0x00000000}, + {0x008d, 0x00000000}, {0x008e, 0x00000000}, {0x008f, 0x00000000}, {0x0090, 0x00000000}, + {0x0091, 0x00000000}, {0x0092, 0x00000000}, {0x0093, 0x00000000}, {0x0094, 0x00000000}, + {0x0095, 0x00000000}, {0x0096, 0x00000000}, {0x0097, 0x00000000}, {0x0098, 0x00000000}, + {0x0099, 0x00000000}, {0x009a, 0x00000000}, {0x009b, 0x00000000}, {0x009c, 0x00000000}, + {0x009d, 0x00000000}, {0x009e, 0x00000000}, {0x009f, 0x00000000}, {0x00a0, 0x00000000}, + {0x00a1, 0x00000000}, {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, {0x00a4, 0x00000000}, + {0x00a5, 0x00000000}, {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, {0x00a8, 0x00000000}, + {0x00a9, 0x00000000}, {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010e, 0x00000000}, {0x010f, 0x00000000}, {0x0110, 0x00000000}, + {0x0111, 0x00000000}, {0x0112, 0x00000000}, {0x0113, 0x00000000}, {0x0114, 0x00000000}, + {0x0115, 0x00000000}, {0x0116, 0x00000000}, {0x0117, 0x00000000}, {0x0118, 0x00000000}, + {0x0119, 0x00000000}, {0x011a, 0x00000000}, {0x011b, 0x00000000}, {0x011c, 0x00000000}, + {0x011d, 0x00000000}, {0x011e, 0x00000000}, {0x011f, 0x00000000}, {0x0120, 0x00000000}, + {0x0121, 0x00000000}, {0x0122, 0x00000000}, {0x0123, 0x00000000}, {0x0124, 0x00000000}, + {0x0125, 0x00000000}, {0x0126, 0x00000000}, {0x0127, 0x00000000}, {0x0128, 0x00000000}, + {0x0129, 0x00000000}, {0x012a, 0x00000000}, {0x012b, 0x00000000}, {0x000c, 0x00000000}, + {0x000d, 0x00000000}, {0x000e, 0x00000000}, {0x000f, 0x00000000}, {0x0010, 0x00000000}, + {0x0011, 0x00000000}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, {0x0014, 0x00000000}, + {0x0015, 0x00000000}, {0x0016, 0x00000000}, {0x0017, 0x00000000}, {0x0018, 0x00000000}, + {0x0019, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, {0x001c, 0x00000000}, + {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x001f, 0x00000000}, {0x0020, 0x00000000}, + {0x0021, 0x00000000}, {0x0022, 0x00000000}, {0x0023, 0x00000000}, {0x0024, 0x00000000}, + {0x0025, 0x00000000}, {0x0026, 0x00000000}, {0x0027, 0x00000000}, {0x0028, 0x00000000}, + {0x0029, 0x00000000}, {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV8Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, +}; + +static ShaderRegister agcPublicRegDefaultsV8Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, {0x02e4, 0x00000000}, + {0x02e5, 0x00000000}, {0x02e6, 0x00000000}, {0x02e7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02c8, 0x00000000}, + {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, {0x02cb, 0x00000000}, {0x02cc, 0x00000000}, + {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, {0x02cf, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bc, 0x00000000}, + {0x02bd, 0x00000000}, {0x02be, 0x00000000}, {0x02bf, 0x00000000}, {0x0035, 0x00000000}, + {0x0036, 0x00000000}, {0x0037, 0x00000000}, {0x0038, 0x00000000}, {0x0039, 0x00000000}, + {0x003a, 0x00000000}, {0x003b, 0x00000000}, {0x003c, 0x00000000}, {0x00a2, 0x00000000}, + {0x025c, 0x00000000}, {0x025d, 0x00000000}, {0x025e, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV8Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, +}; + +static std::uint32_t agcPublicRegDefaultsV8Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x94b1e4f7, 0x00040468, + 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, + 0x00040474, 0x00000000, 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, + 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, 0xce831b94, 0x00040488, + 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, + 0x00040494, 0x00000000, 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, + 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, 0x144832fb, 0x000404a8, + 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, + 0x000404b4, 0x00000000, 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, + 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, 0xedefa188, 0x000404c8, + 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, + 0x000404d4, 0x00000000, 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, + 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, 0x43fbd769, 0x000410e8, + 0x00000000, 0xef550356, 0x002004ec, 0x00000000, 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, + 0x001008f4, 0x00000000, 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, + 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, 0x033f1eff, 0x00040908, + 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, + 0x00040914, 0x00000000, 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, + 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, 0x48531062, 0x00800528, + 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, + 0x00040934, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, + 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, + 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, + 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, + 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, + 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, + 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, + 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, + 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, + 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, + 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, + 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, + 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, + 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, + 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, + 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, + 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, + 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, + 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV8 = { + agcPublicRegDefaultsV8Tbl0Regs, + 489, + agcPublicRegDefaultsV8Tbl0Ptrs, + 78, + agcPublicRegDefaultsV8Tbl1Regs, + 159, + agcPublicRegDefaultsV8Tbl1Ptrs, + 29, + agcPublicRegDefaultsV8Tbl2Regs, + 55, + agcPublicRegDefaultsV8Tbl2Ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV8Types, + 127, +}; + + +static ShaderRegister agcPublicRegDefaultsV9Tbl0Regs[] = { + {0x0202, 0x00cc0010}, {0x0109, 0x00000010}, {0x0104, 0x00000000}, {0x008f, 0x00000000}, + {0x008e, 0x00000000}, {0x02dc, 0x0000aa00}, {0x0001, 0x11000100}, {0x0200, 0x00000000}, + {0x0201, 0x00000000}, {0x0000, 0x00000000}, {0x0006, 0x00000000}, {0x001f, 0x00000000}, + {0x0203, 0x00000000}, {0x02b0, 0x00000000}, {0x02b1, 0x00000000}, {0x010c, 0x00000000}, + {0x010d, 0x00000000}, {0x010b, 0x00000000}, {0x01ff, 0x00000000}, {0x0204, 0x00000000}, + {0x020d, 0x00000000}, {0x0206, 0x0000043f}, {0x02f8, 0x00000000}, {0x0083, 0x0000ffff}, + {0x0313, 0x00006000}, {0x00f0, 0x00000000}, {0x00ea, 0x00000000}, {0x00e9, 0x00000000}, + {0x0292, 0x00000002}, {0x0293, 0x06020000}, {0x00e8, 0x00000000}, {0x0080, 0x00000000}, + {0x0211, 0x00000000}, {0x0210, 0x04000000}, {0x008d, 0x00000000}, {0x0282, 0x00000008}, + {0x0281, 0xffff0000}, {0x0280, 0x00080008}, {0x02df, 0x00000000}, {0x02de, 0x000001e9}, + {0x0205, 0x00000240}, {0x020c, 0x00000021}, {0x02f9, 0x0000002d}, {0x01ba, 0x00000000}, + {0x02a6, 0x00000000}, {0x02ce, 0x00000400}, {0x029b, 0x00000002}, {0x02d6, 0x00000000}, + {0x0103, 0xffffffff}, {0x02a1, 0x00000000}, {0x02ad, 0x00000000}, {0x02d5, 0x00002000}, + {0x02d4, 0x88101000}, {0x02db, 0x00000000}, {0x02f5, 0x00000000}, {0x02f6, 0x00000000}, + {0x02fe, 0x00000000}, {0x02ff, 0x00000000}, {0x0300, 0x00000000}, {0x0301, 0x00000000}, + {0x0302, 0x00000000}, {0x0303, 0x00000000}, {0x0304, 0x00000000}, {0x0305, 0x00000000}, + {0x0306, 0x00000000}, {0x0307, 0x00000000}, {0x0308, 0x00000000}, {0x0309, 0x00000000}, + {0x030a, 0x00000000}, {0x030b, 0x00000000}, {0x030c, 0x00000000}, {0x030d, 0x00000000}, + {0x030e, 0xffffffff}, {0x030f, 0xffffffff}, {0x0311, 0x01fd2002}, {0x0312, 0x03ff0080}, + {0x0105, 0x00000000}, {0x0106, 0x00000000}, {0x0107, 0x00000000}, {0x0108, 0x00000000}, + {0x01e0, 0x20010001}, {0x01e1, 0x20010001}, {0x01e2, 0x20010001}, {0x01e3, 0x20010001}, + {0x01e4, 0x20010001}, {0x01e5, 0x20010001}, {0x01e6, 0x20010001}, {0x01e7, 0x20010001}, + {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0084, 0x00000000}, {0x0085, 0x20002000}, + {0x0086, 0x00000000}, {0x0087, 0x20002000}, {0x0088, 0x00000000}, {0x0089, 0x20002000}, + {0x008a, 0x00000000}, {0x008b, 0x20002000}, {0x00db, 0x00000000}, {0x0008, 0x00000000}, + {0x0009, 0x00000000}, {0x0010, 0x80000180}, {0x0011, 0x20000180}, {0x0012, 0x00000000}, + {0x0013, 0x00000000}, {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x001a, 0x00000000}, + {0x001b, 0x00000000}, {0x001c, 0x00000000}, {0x001d, 0x00000000}, {0x001e, 0x00000000}, + {0x0002, 0x00000000}, {0x0005, 0x00000000}, {0x0007, 0x00000000}, {0x000b, 0x00000000}, + {0x000a, 0x00000000}, {0x00eb, 0xff00ff00}, {0x00ec, 0x00010000}, {0x00f1, 0x00000000}, + {0x00f2, 0x00000000}, {0x0090, 0x80000000}, {0x0091, 0x40004000}, {0x02fa, 0x3f800000}, + {0x02fb, 0x3f800000}, {0x02fc, 0x3f800000}, {0x02fd, 0x3f800000}, {0x02e2, 0x00000000}, + {0x02e3, 0x00000000}, {0x02e0, 0x00000000}, {0x02e1, 0x00000000}, {0x0003, 0x00000000}, + {0x0004, 0x00000000}, {0x0318, 0x00000000}, {0x031b, 0x00000000}, {0x031c, 0x00000000}, + {0x031d, 0x00000000}, {0x031e, 0x00000048}, {0x031f, 0x00000000}, {0x0321, 0x00000000}, + {0x0323, 0x00000000}, {0x0324, 0x00000000}, {0x0325, 0x00000000}, {0x0390, 0x00000000}, + {0x0398, 0x00000000}, {0x03a0, 0x00000000}, {0x03a8, 0x00000000}, {0x03b0, 0x00000000}, + {0x03b8, 0x08c6c000}, {0x0327, 0x00000000}, {0x032a, 0x00000000}, {0x032b, 0x00000000}, + {0x032c, 0x00000000}, {0x032d, 0x00000048}, {0x032e, 0x00000000}, {0x0330, 0x00000000}, + {0x0332, 0x00000000}, {0x0333, 0x00000000}, {0x0334, 0x00000000}, {0x0391, 0x00000000}, + {0x0399, 0x00000000}, {0x03a1, 0x00000000}, {0x03a9, 0x00000000}, {0x03b1, 0x00000000}, + {0x03b9, 0x08c6c000}, {0x0336, 0x00000000}, {0x0339, 0x00000000}, {0x033a, 0x00000000}, + {0x033b, 0x00000000}, {0x033c, 0x00000048}, {0x033d, 0x00000000}, {0x033f, 0x00000000}, + {0x0341, 0x00000000}, {0x0342, 0x00000000}, {0x0343, 0x00000000}, {0x0392, 0x00000000}, + {0x039a, 0x00000000}, {0x03a2, 0x00000000}, {0x03aa, 0x00000000}, {0x03b2, 0x00000000}, + {0x03ba, 0x08c6c000}, {0x0345, 0x00000000}, {0x0348, 0x00000000}, {0x0349, 0x00000000}, + {0x034a, 0x00000000}, {0x034b, 0x00000048}, {0x034c, 0x00000000}, {0x034e, 0x00000000}, + {0x0350, 0x00000000}, {0x0351, 0x00000000}, {0x0352, 0x00000000}, {0x0393, 0x00000000}, + {0x039b, 0x00000000}, {0x03a3, 0x00000000}, {0x03ab, 0x00000000}, {0x03b3, 0x00000000}, + {0x03bb, 0x08c6c000}, {0x0354, 0x00000000}, {0x0357, 0x00000000}, {0x0358, 0x00000000}, + {0x0359, 0x00000000}, {0x035a, 0x00000048}, {0x035b, 0x00000000}, {0x035d, 0x00000000}, + {0x035f, 0x00000000}, {0x0360, 0x00000000}, {0x0361, 0x00000000}, {0x0394, 0x00000000}, + {0x039c, 0x00000000}, {0x03a4, 0x00000000}, {0x03ac, 0x00000000}, {0x03b4, 0x00000000}, + {0x03bc, 0x08c6c000}, {0x0363, 0x00000000}, {0x0366, 0x00000000}, {0x0367, 0x00000000}, + {0x0368, 0x00000000}, {0x0369, 0x00000048}, {0x036a, 0x00000000}, {0x036c, 0x00000000}, + {0x036e, 0x00000000}, {0x036f, 0x00000000}, {0x0370, 0x00000000}, {0x0395, 0x00000000}, + {0x039d, 0x00000000}, {0x03a5, 0x00000000}, {0x03ad, 0x00000000}, {0x03b5, 0x00000000}, + {0x03bd, 0x08c6c000}, {0x0372, 0x00000000}, {0x0375, 0x00000000}, {0x0376, 0x00000000}, + {0x0377, 0x00000000}, {0x0378, 0x00000048}, {0x0379, 0x00000000}, {0x037b, 0x00000000}, + {0x037d, 0x00000000}, {0x037e, 0x00000000}, {0x037f, 0x00000000}, {0x0396, 0x00000000}, + {0x039e, 0x00000000}, {0x03a6, 0x00000000}, {0x03ae, 0x00000000}, {0x03b6, 0x00000000}, + {0x03be, 0x08c6c000}, {0x0381, 0x00000000}, {0x0384, 0x00000000}, {0x0385, 0x00000000}, + {0x0386, 0x00000000}, {0x0387, 0x00000048}, {0x0388, 0x00000000}, {0x038a, 0x00000000}, + {0x038c, 0x00000000}, {0x038d, 0x00000000}, {0x038e, 0x00000000}, {0x0397, 0x00000000}, + {0x039f, 0x00000000}, {0x03a7, 0x00000000}, {0x03af, 0x00000000}, {0x03b7, 0x00000000}, + {0x03bf, 0x08c6c000}, {0x000c, 0x00000000}, {0x000d, 0x40004000}, {0x0191, 0x00000000}, + {0x0192, 0x00000000}, {0x0193, 0x00000000}, {0x0194, 0x00000000}, {0x0195, 0x00000000}, + {0x0196, 0x00000000}, {0x0197, 0x00000000}, {0x0198, 0x00000000}, {0x0199, 0x00000000}, + {0x019a, 0x00000000}, {0x019b, 0x00000000}, {0x019c, 0x00000000}, {0x019d, 0x00000000}, + {0x019e, 0x00000000}, {0x019f, 0x00000000}, {0x01a0, 0x00000000}, {0x01a1, 0x00000000}, + {0x01a2, 0x00000000}, {0x01a3, 0x00000000}, {0x01a4, 0x00000000}, {0x01a5, 0x00000000}, + {0x01a6, 0x00000000}, {0x01a7, 0x00000000}, {0x01a8, 0x00000000}, {0x01a9, 0x00000000}, + {0x01aa, 0x00000000}, {0x01ab, 0x00000000}, {0x01ac, 0x00000000}, {0x01ad, 0x00000000}, + {0x01ae, 0x00000000}, {0x01af, 0x00000000}, {0x01b0, 0x00000000}, {0x016f, 0x00000000}, + {0x0170, 0x00000000}, {0x0171, 0x00000000}, {0x0172, 0x00000000}, {0x0173, 0x00000000}, + {0x0174, 0x00000000}, {0x0175, 0x00000000}, {0x0176, 0x00000000}, {0x0177, 0x00000000}, + {0x0178, 0x00000000}, {0x0179, 0x00000000}, {0x017a, 0x00000000}, {0x017b, 0x00000000}, + {0x017c, 0x00000000}, {0x017d, 0x00000000}, {0x017e, 0x00000000}, {0x017f, 0x00000000}, + {0x0180, 0x00000000}, {0x0181, 0x00000000}, {0x0182, 0x00000000}, {0x0183, 0x00000000}, + {0x0184, 0x00000000}, {0x0185, 0x00000000}, {0x0186, 0x00000000}, {0x0187, 0x00000000}, + {0x0188, 0x00000000}, {0x0189, 0x00000000}, {0x018a, 0x00000000}, {0x018b, 0x00000000}, + {0x018c, 0x00000000}, {0x018d, 0x00000000}, {0x018e, 0x00000000}, {0x010f, 0x3f800000}, + {0x0111, 0x3f800000}, {0x0113, 0x3f800000}, {0x0110, 0x00000000}, {0x0112, 0x00000000}, + {0x0114, 0x00000000}, {0x0094, 0x80000000}, {0x0095, 0x40004000}, {0x00b4, 0x00000000}, + {0x00b5, 0x00000000}, {0x0115, 0x3f800000}, {0x0117, 0x3f800000}, {0x0119, 0x3f800000}, + {0x0116, 0x00000000}, {0x0118, 0x00000000}, {0x011a, 0x00000000}, {0x0096, 0x80000000}, + {0x0097, 0x40004000}, {0x00b6, 0x00000000}, {0x00b7, 0x00000000}, {0x011b, 0x3f800000}, + {0x011d, 0x3f800000}, {0x011f, 0x3f800000}, {0x011c, 0x00000000}, {0x011e, 0x00000000}, + {0x0120, 0x00000000}, {0x0098, 0x80000000}, {0x0099, 0x40004000}, {0x00b8, 0x00000000}, + {0x00b9, 0x00000000}, {0x0121, 0x3f800000}, {0x0123, 0x3f800000}, {0x0125, 0x3f800000}, + {0x0122, 0x00000000}, {0x0124, 0x00000000}, {0x0126, 0x00000000}, {0x009a, 0x80000000}, + {0x009b, 0x40004000}, {0x00ba, 0x00000000}, {0x00bb, 0x00000000}, {0x0127, 0x3f800000}, + {0x0129, 0x3f800000}, {0x012b, 0x3f800000}, {0x0128, 0x00000000}, {0x012a, 0x00000000}, + {0x012c, 0x00000000}, {0x009c, 0x80000000}, {0x009d, 0x40004000}, {0x00bc, 0x00000000}, + {0x00bd, 0x00000000}, {0x012d, 0x3f800000}, {0x012f, 0x3f800000}, {0x0131, 0x3f800000}, + {0x012e, 0x00000000}, {0x0130, 0x00000000}, {0x0132, 0x00000000}, {0x009e, 0x80000000}, + {0x009f, 0x40004000}, {0x00be, 0x00000000}, {0x00bf, 0x00000000}, {0x0133, 0x3f800000}, + {0x0135, 0x3f800000}, {0x0137, 0x3f800000}, {0x0134, 0x00000000}, {0x0136, 0x00000000}, + {0x0138, 0x00000000}, {0x00a0, 0x80000000}, {0x00a1, 0x40004000}, {0x00c0, 0x00000000}, + {0x00c1, 0x00000000}, {0x0139, 0x3f800000}, {0x013b, 0x3f800000}, {0x013d, 0x3f800000}, + {0x013a, 0x00000000}, {0x013c, 0x00000000}, {0x013e, 0x00000000}, {0x00a2, 0x80000000}, + {0x00a3, 0x40004000}, {0x00c2, 0x00000000}, {0x00c3, 0x00000000}, {0x013f, 0x3f800000}, + {0x0141, 0x3f800000}, {0x0143, 0x3f800000}, {0x0140, 0x00000000}, {0x0142, 0x00000000}, + {0x0144, 0x00000000}, {0x00a4, 0x80000000}, {0x00a5, 0x40004000}, {0x00c4, 0x00000000}, + {0x00c5, 0x00000000}, {0x0145, 0x3f800000}, {0x0147, 0x3f800000}, {0x0149, 0x3f800000}, + {0x0146, 0x00000000}, {0x0148, 0x00000000}, {0x014a, 0x00000000}, {0x00a6, 0x80000000}, + {0x00a7, 0x40004000}, {0x00c6, 0x00000000}, {0x00c7, 0x00000000}, {0x014b, 0x3f800000}, + {0x014d, 0x3f800000}, {0x014f, 0x3f800000}, {0x014c, 0x00000000}, {0x014e, 0x00000000}, + {0x0150, 0x00000000}, {0x00a8, 0x80000000}, {0x00a9, 0x40004000}, {0x00c8, 0x00000000}, + {0x00c9, 0x00000000}, {0x0151, 0x3f800000}, {0x0153, 0x3f800000}, {0x0155, 0x3f800000}, + {0x0152, 0x00000000}, {0x0154, 0x00000000}, {0x0156, 0x00000000}, {0x00aa, 0x80000000}, + {0x00ab, 0x40004000}, {0x00ca, 0x00000000}, {0x00cb, 0x00000000}, {0x0157, 0x3f800000}, + {0x0159, 0x3f800000}, {0x015b, 0x3f800000}, {0x0158, 0x00000000}, {0x015a, 0x00000000}, + {0x015c, 0x00000000}, {0x00ac, 0x80000000}, {0x00ad, 0x40004000}, {0x00cc, 0x00000000}, + {0x00cd, 0x00000000}, {0x015d, 0x3f800000}, {0x015f, 0x3f800000}, {0x0161, 0x3f800000}, + {0x015e, 0x00000000}, {0x0160, 0x00000000}, {0x0162, 0x00000000}, {0x00ae, 0x80000000}, + {0x00af, 0x40004000}, {0x00ce, 0x00000000}, {0x00cf, 0x00000000}, {0x0163, 0x3f800000}, + {0x0165, 0x3f800000}, {0x0167, 0x3f800000}, {0x0164, 0x00000000}, {0x0166, 0x00000000}, + {0x0168, 0x00000000}, {0x00b0, 0x80000000}, {0x00b1, 0x40004000}, {0x00d0, 0x00000000}, + {0x00d1, 0x00000000}, {0x0169, 0x3f800000}, {0x016b, 0x3f800000}, {0x016d, 0x3f800000}, + {0x016a, 0x00000000}, {0x016c, 0x00000000}, {0x016e, 0x00000000}, {0x00b2, 0x80000000}, + {0x00b3, 0x40004000}, {0x00d2, 0x00000000}, {0x00d3, 0x00000000}, {0x0081, 0x80000000}, + {0x0082, 0x40004000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV9Tbl0Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, + 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, + 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0038, 0x0048, 0x004a, 0x004c, 0x0050, + 0x0058, 0x005a, 0x0062, 0x0063, 0x0065, 0x0075, 0x0077, 0x0079, 0x007b, 0x007f, 0x0081, 0x0083, + 0x0085, 0x0105, 0x0107, 0x0127, 0x0147, 0x01e7, +}; + +static ShaderRegister agcPublicRegDefaultsV9Tbl1Regs[] = { + {0x0212, 0x00000000}, {0x0213, 0x00000000}, {0x0228, 0x00000000}, {0x0215, 0x00000000}, + {0x0218, 0x00000000}, {0x008a, 0x00000000}, {0x010a, 0x00000000}, {0x000a, 0x00000000}, + {0x008b, 0x00000000}, {0x010b, 0x00000000}, {0x000b, 0x00000000}, {0x0224, 0x00000000}, + {0x0225, 0x00000000}, {0x0226, 0x00000000}, {0x0227, 0x00000000}, {0x0107, 0xffff0000}, + {0x0087, 0x0000ffff}, {0x0081, 0x00000000}, {0x0007, 0x0000ffff}, {0x020c, 0x00000000}, + {0x020d, 0x00000000}, {0x00c8, 0x00000000}, {0x00c9, 0x00000000}, {0x0088, 0x00000000}, + {0x0089, 0x00000000}, {0x0108, 0x00000000}, {0x0109, 0x00000000}, {0x0148, 0x00000000}, + {0x0149, 0x00000000}, {0x0008, 0x00000000}, {0x0009, 0x00000000}, {0x0280, 0x00000000}, + {0x00b2, 0x00000000}, {0x00b3, 0x00000000}, {0x00b4, 0x00000000}, {0x00b5, 0x00000000}, + {0x0132, 0x00000000}, {0x0133, 0x00000000}, {0x0134, 0x00000000}, {0x0135, 0x00000000}, + {0x0032, 0x00000000}, {0x0033, 0x00000000}, {0x0034, 0x00000000}, {0x0035, 0x00000000}, + {0x0082, 0x00000000}, {0x0083, 0x00000000}, {0x0102, 0x00000000}, {0x0103, 0x00000000}, + {0x0240, 0x00000000}, {0x0241, 0x00000000}, {0x0242, 0x00000000}, {0x0243, 0x00000000}, + {0x0244, 0x00000000}, {0x0245, 0x00000000}, {0x0246, 0x00000000}, {0x0247, 0x00000000}, + {0x0248, 0x00000000}, {0x0249, 0x00000000}, {0x024a, 0x00000000}, {0x024b, 0x00000000}, + {0x024c, 0x00000000}, {0x024d, 0x00000000}, {0x024e, 0x00000000}, {0x024f, 0x00000000}, + {0x008c, 0x00000000}, {0x008d, 0x00000000}, {0x008e, 0x00000000}, {0x008f, 0x00000000}, + {0x0090, 0x00000000}, {0x0091, 0x00000000}, {0x0092, 0x00000000}, {0x0093, 0x00000000}, + {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x0096, 0x00000000}, {0x0097, 0x00000000}, + {0x0098, 0x00000000}, {0x0099, 0x00000000}, {0x009a, 0x00000000}, {0x009b, 0x00000000}, + {0x009c, 0x00000000}, {0x009d, 0x00000000}, {0x009e, 0x00000000}, {0x009f, 0x00000000}, + {0x00a0, 0x00000000}, {0x00a1, 0x00000000}, {0x00a2, 0x00000000}, {0x00a3, 0x00000000}, + {0x00a4, 0x00000000}, {0x00a5, 0x00000000}, {0x00a6, 0x00000000}, {0x00a7, 0x00000000}, + {0x00a8, 0x00000000}, {0x00a9, 0x00000000}, {0x00aa, 0x00000000}, {0x00ab, 0x00000000}, + {0x010c, 0x00000000}, {0x010d, 0x00000000}, {0x010e, 0x00000000}, {0x010f, 0x00000000}, + {0x0110, 0x00000000}, {0x0111, 0x00000000}, {0x0112, 0x00000000}, {0x0113, 0x00000000}, + {0x0114, 0x00000000}, {0x0115, 0x00000000}, {0x0116, 0x00000000}, {0x0117, 0x00000000}, + {0x0118, 0x00000000}, {0x0119, 0x00000000}, {0x011a, 0x00000000}, {0x011b, 0x00000000}, + {0x011c, 0x00000000}, {0x011d, 0x00000000}, {0x011e, 0x00000000}, {0x011f, 0x00000000}, + {0x0120, 0x00000000}, {0x0121, 0x00000000}, {0x0122, 0x00000000}, {0x0123, 0x00000000}, + {0x0124, 0x00000000}, {0x0125, 0x00000000}, {0x0126, 0x00000000}, {0x0127, 0x00000000}, + {0x0128, 0x00000000}, {0x0129, 0x00000000}, {0x012a, 0x00000000}, {0x012b, 0x00000000}, + {0x000c, 0x00000000}, {0x000d, 0x00000000}, {0x000e, 0x00000000}, {0x000f, 0x00000000}, + {0x0010, 0x00000000}, {0x0011, 0x00000000}, {0x0012, 0x00000000}, {0x0013, 0x00000000}, + {0x0014, 0x00000000}, {0x0015, 0x00000000}, {0x0016, 0x00000000}, {0x0017, 0x00000000}, + {0x0018, 0x00000000}, {0x0019, 0x00000000}, {0x001a, 0x00000000}, {0x001b, 0x00000000}, + {0x001c, 0x00000000}, {0x001d, 0x00000000}, {0x001e, 0x00000000}, {0x001f, 0x00000000}, + {0x0020, 0x00000000}, {0x0021, 0x00000000}, {0x0022, 0x00000000}, {0x0023, 0x00000000}, + {0x0024, 0x00000000}, {0x0025, 0x00000000}, {0x0026, 0x00000000}, {0x0027, 0x00000000}, + {0x0028, 0x00000000}, {0x0029, 0x00000000}, {0x002a, 0x00000000}, {0x002b, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV9Tbl1Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0013, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, + 0x0020, 0x0024, 0x0028, 0x002c, 0x002e, 0x0030, 0x0040, 0x0060, 0x0080, +}; + +static ShaderRegister agcPublicRegDefaultsV9Tbl2Regs[] = { + {0x041f, 0x00000000}, {0x041d, 0x00000000}, {0x041e, 0x00000000}, {0x025b, 0x00000000}, + {0x024a, 0x00000000}, {0x024b, 0x00000000}, {0x025f, 0x00000000}, {0x0262, 0x00000000}, + {0x02bb, 0x00000000}, {0x0384, 0x00000000}, {0x0383, 0x40000040}, {0x0248, 0x00000000}, + {0x0242, 0x00000000}, {0x0380, 0x00000000}, {0x0381, 0x00000000}, {0x02e4, 0x00000000}, + {0x02e5, 0x00000000}, {0x02e6, 0x00000000}, {0x02e7, 0x00000000}, {0x02e8, 0x00000000}, + {0x02e9, 0x00000000}, {0x02ea, 0x00000000}, {0x02eb, 0x00000000}, {0x02c4, 0x00000000}, + {0x02c5, 0x00000000}, {0x02c6, 0x00000000}, {0x02c7, 0x00000000}, {0x02c8, 0x00000000}, + {0x02c9, 0x00000000}, {0x02ca, 0x00000000}, {0x02cb, 0x00000000}, {0x02cc, 0x00000000}, + {0x02cd, 0x00000000}, {0x02ce, 0x00000000}, {0x02cf, 0x00000000}, {0x02d0, 0x00000000}, + {0x02d1, 0x00000000}, {0x02d2, 0x00000000}, {0x02d3, 0x00000000}, {0x02bc, 0x00000000}, + {0x02bd, 0x00000000}, {0x02be, 0x00000000}, {0x02bf, 0x00000000}, {0x0035, 0x00000000}, + {0x0036, 0x00000000}, {0x0037, 0x00000000}, {0x0038, 0x00000000}, {0x0039, 0x00000000}, + {0x003a, 0x00000000}, {0x003b, 0x00000000}, {0x003c, 0x00000000}, {0x00a2, 0x00000000}, + {0x025c, 0x00000000}, {0x025d, 0x00000000}, {0x025e, 0x00000000}, +}; + +static const std::uint16_t agcPublicRegDefaultsV9Tbl2Ptrs[] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, +}; + +static std::uint32_t agcPublicRegDefaultsV9Types[] = { + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x94b1e4f7, 0x00040468, + 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, + 0x00040474, 0x00000000, 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, + 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, 0xce831b94, 0x00040488, + 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, + 0x00040494, 0x00000000, 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, + 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, 0x144832fb, 0x000404a8, + 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, + 0x000404b4, 0x00000000, 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, + 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, 0xedefa188, 0x000404c8, + 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, + 0x000404d4, 0x00000000, 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, + 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, 0x43fbd769, 0x000410e8, + 0x00000000, 0xef550356, 0x002004ec, 0x00000000, 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, + 0x001008f4, 0x00000000, 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, + 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, 0x033f1eff, 0x00040908, + 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, + 0x00040914, 0x00000000, 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, + 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, 0x48531062, 0x00800528, + 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, + 0x00040934, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, + 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, + 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, + 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, + 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00041031, + 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, + 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, + 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, + 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, + 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, + 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, + 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, + 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, + 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, + 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, + 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, + 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, + 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, + 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, +}; + +static CompactRegisterDefaults agcPublicRegDefaultsV9 = { + agcPublicRegDefaultsV9Tbl0Regs, + 489, + agcPublicRegDefaultsV9Tbl0Ptrs, + 78, + agcPublicRegDefaultsV9Tbl1Regs, + 160, + agcPublicRegDefaultsV9Tbl1Ptrs, + 29, + agcPublicRegDefaultsV9Tbl2Regs, + 55, + agcPublicRegDefaultsV9Tbl2Ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + agcPublicRegDefaultsV9Types, + 127, +}; + +static CompactRegisterDefaults* agcPublicRegDefaultsByVersion[] = { + &agcPublicRegDefaultsV0, + &agcPublicRegDefaultsV0, + &agcPublicRegDefaultsV0, + &agcPublicRegDefaultsV0, + &agcPublicRegDefaultsV4, + &agcPublicRegDefaultsV5, + &agcPublicRegDefaultsV5, + &agcPublicRegDefaultsV7, + &agcPublicRegDefaultsV8, + &agcPublicRegDefaultsV9, + &agcPublicRegDefaultsV10, + &agcPublicRegDefaultsV11, + &agcPublicRegDefaultsV12, + &agcPublicRegDefaultsV11, +}; + +static CompactRegisterDefaults* agcInternalRegDefaultsByVersion[] = { + &agcInternalRegDefaultsV0, + &agcInternalRegDefaultsV0, + &agcInternalRegDefaultsV0, + &agcInternalRegDefaultsV0, + &agcInternalRegDefaultsV4, + &agcInternalRegDefaultsV5, + &agcInternalRegDefaultsV5, + &agcInternalRegDefaultsV7, + &agcInternalRegDefaultsV8, + &agcInternalRegDefaultsV9, + &agcInternalRegDefaultsV10, + &agcInternalRegDefaultsV11, + &agcInternalRegDefaultsV10, + &agcInternalRegDefaultsV13, +}; + +#endif diff --git a/core/libs/prx/libSceAgc/Command/src/Draw.cpp b/core/libs/prx/libSceAgc/Command/src/Draw.cpp new file mode 100644 index 000000000..115060c4a --- /dev/null +++ b/core/libs/prx/libSceAgc/Command/src/Draw.cpp @@ -0,0 +1,32 @@ +#include "prx/libSceAgc/Command/include/Draw.hpp" + +namespace Agc::Command { + +namespace { + +std::uint32_t sgprBase(std::uint64_t modifier) { + const auto stage = static_cast(modifier) >> 29u; + return stage == 3 || stage == 5 ? 0x10cu : 0x8cu; +} + +} + +std::uint32_t DrawInitiator(std::uint64_t modifier, bool indexed, const char* function) { + CheckBits(modifier, 0x1ffffffffull, function); + const auto flags = (modifier & 0x100000000ull) != 0 ? 0u : static_cast((modifier >> 3u) & 0x20u); + return flags | (indexed ? 0u : 2u); +} + +std::uint64_t DrawPatchOffsets(std::uint64_t modifier, const char* function) { + CheckBits(modifier, 0x1ffffffffull, function); + const auto base = sgprBase(modifier); + const auto vertex = (modifier & 1u) != 0 ? base + static_cast((modifier >> 9u) & 0x1fu) : 0x280u; + const auto instance = (modifier & 4u) != 0 ? base + static_cast((modifier >> 19u) & 0x1fu) : 0x280u; + return vertex | (static_cast(instance) << 32u); +} + +std::uint32_t DrawIndexLocation(std::uint64_t modifier) { + return (modifier & 8u) != 0 ? sgprBase(modifier) + static_cast((modifier >> 24u) & 0x1fu) : 0x280u; +} + +} diff --git a/core/libs/prx/libSceAgc/Command/src/RegisterDefaults.cpp b/core/libs/prx/libSceAgc/Command/src/RegisterDefaults.cpp new file mode 100644 index 000000000..ca1d966c3 --- /dev/null +++ b/core/libs/prx/libSceAgc/Command/src/RegisterDefaults.cpp @@ -0,0 +1,79 @@ +#include "prx/libSceAgc/Command/include/RegisterDefaults.hpp" +#include "prx/libSceAgc/Command/include/Packet.hpp" + +#include +#include +#include +#include +#include + +namespace Agc::Command { + +namespace { + +struct RegisterDefaults { + ShaderRegister** tables[4]; + std::uint32_t registerCounts[4]; + std::uint32_t* types; + std::uint32_t count; +}; + +static_assert(offsetof(RegisterDefaults, count) == 0x38); + +struct CompactBank { + ShaderRegister* registers; + std::uint32_t registerCount; + const std::uint16_t* offsets; + std::uint32_t pointerCount; +}; + +struct CompactRegisterDefaults { + CompactBank banks[4]; + std::uint32_t* types; + std::uint32_t count; +}; + +#include "prx/libSceAgc/Command/include/RegisterDefaultsData.hpp" + +struct Storage { + RegisterDefaults defaults{}; + std::array, 4> pointers; + bool initialized = false; +}; + +std::mutex defaultsMutex; +std::array, 2> storage; + +} + +void* GetRegisterDefaults(std::uint32_t version, bool internal, const char* function) { + Require(version < 14, function, "unsupported register defaults version"); + const auto* source = internal ? agcInternalRegDefaultsByVersion[version] : agcPublicRegDefaultsByVersion[version]; + std::lock_guard lock(defaultsMutex); + auto& destination = storage[internal ? 1 : 0][version]; + if (!destination.initialized) { + std::array, 4> pointers; + RegisterDefaults defaults{}; + for (std::size_t bank = 0; bank < pointers.size(); ++bank) { + const auto& input = source->banks[bank]; + Require(input.pointerCount == 0 || (input.registers != nullptr && input.offsets != nullptr), function, "invalid register defaults bank"); + auto& table = pointers[bank]; + table.reserve(input.pointerCount); + for (std::uint32_t index = 0; index < input.pointerCount; ++index) { + Require(input.offsets[index] < input.registerCount, function, "register defaults pointer exceeds bank"); + table.push_back(input.registers + input.offsets[index]); + } + defaults.tables[bank] = table.empty() ? nullptr : table.data(); + defaults.registerCounts[bank] = input.registerCount; + } + Require(source->count == 0 || source->types != nullptr, function, "missing register defaults types"); + defaults.types = source->types; + defaults.count = source->count; + destination.pointers = std::move(pointers); + destination.defaults = defaults; + destination.initialized = true; + } + return &destination.defaults; +} + +} diff --git a/core/libs/prx/libSceAgc/DcbDraw/src/DrawIndexed.cpp b/core/libs/prx/libSceAgc/DcbDraw/src/DrawIndexed.cpp index 9f7502175..8c81f1e8f 100644 --- a/core/libs/prx/libSceAgc/DcbDraw/src/DrawIndexed.cpp +++ b/core/libs/prx/libSceAgc/DcbDraw/src/DrawIndexed.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceAgc/Command/include/Draw.hpp" #include "prx/libSceAgc/DcbDraw/include/DrawIndexed.hpp" #include "prx/libSceAgc/Command/include/Packet.hpp" @@ -17,31 +18,20 @@ uint32_t* APS5_VABI sceAgcDcbDrawIndex(CommandBuffer* buf, uint32_t index_count, return nullptr; } -uint32_t APS5_VABI sceAgcDcbDrawIndexGetSize(void) { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDrawIndexGetSize() { + return 24; } -uint32_t* APS5_VABI sceAgcDcbDrawIndexAuto(CommandBuffer* buf, uint32_t index_count, uint64_t modifier) { - (void)buf; - (void)index_count; - (void)modifier; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcDcbDrawIndexAuto(CommandBuffer* buf, std::uint32_t indexCount, std::uint64_t modifier) { + return Agc::Command::Emit(buf, 0x2du, {indexCount, Agc::Command::DrawInitiator(modifier, false, __func__)}, __func__); } -uint32_t APS5_VABI sceAgcDcbDrawIndexAutoGetSize(void) { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDrawIndexAutoGetSize() { + return 12; } -uint32_t* APS5_VABI sceAgcDcbDrawIndexOffset(CommandBuffer* buf, uint32_t index_offset, uint32_t index_count, uint64_t modifier) { - (void)buf; - (void)index_offset; - (void)index_count; - (void)modifier; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcDcbDrawIndexOffset(CommandBuffer* buf, std::uint32_t indexOffset, std::uint32_t indexCount, std::uint64_t modifier) { + return Agc::Command::Emit(buf, 0x35u, {indexCount == 0 ? 1u : indexCount, indexOffset, indexCount, Agc::Command::DrawInitiator(modifier, true, __func__)}, __func__); } uint32_t APS5_VABI sceAgcDcbDrawIndexOffsetGetSize(void) { @@ -57,9 +47,8 @@ uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirect(CommandBuffer* buf, uint32_t data return nullptr; } -uint32_t APS5_VABI sceAgcDcbDrawIndexIndirectGetSize() { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDrawIndexIndirectGetSize() { + return 20; } uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirectMulti(CommandBuffer* buf, uint32_t data_offset_in_bytes, uint32_t count_indirect, uint32_t max_count_or_count, const volatile void* count_addr, uint32_t stride_in_bytes, uint64_t modifier) { @@ -74,9 +63,8 @@ uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirectMulti(CommandBuffer* buf, uint32_t return nullptr; } -uint32_t APS5_VABI sceAgcDcbDrawIndexIndirectMultiGetSize() { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDrawIndexIndirectMultiGetSize() { + return 40; } uint32_t* APS5_VABI sceAgcDcbDrawIndexMultiInstanced(CommandBuffer* buf, uint32_t index_count, const volatile void* index_addr, const volatile void* object_ids, uint32_t instance_count, uint64_t modifier) { diff --git a/core/libs/prx/libSceAgc/DcbDraw/src/DrawNonIndexed.cpp b/core/libs/prx/libSceAgc/DcbDraw/src/DrawNonIndexed.cpp index f32f5c8f9..15670ffae 100644 --- a/core/libs/prx/libSceAgc/DcbDraw/src/DrawNonIndexed.cpp +++ b/core/libs/prx/libSceAgc/DcbDraw/src/DrawNonIndexed.cpp @@ -1,3 +1,4 @@ +#include "prx/libSceAgc/Command/include/Draw.hpp" #include "prx/libSceAgc/DcbDraw/include/DrawNonIndexed.hpp" #include "prx/libSceAgc/Command/include/Packet.hpp" @@ -8,34 +9,51 @@ extern "C" { -uint32_t* APS5_VABI sceAgcDcbDrawIndirect(CommandBuffer* buf, uint32_t data_offset_in_bytes, uint64_t modifier) { - (void)buf; - (void)data_offset_in_bytes; - (void)modifier; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcDcbDrawIndirect(CommandBuffer* buf, std::uint32_t dataOffsetInBytes, std::uint64_t modifier) { + Agc::Command::Require((dataOffsetInBytes & 3u) == 0, __func__, "misaligned indirect argument offset"); + const auto offsets = Agc::Command::DrawPatchOffsets(modifier, __func__); + return Agc::Command::Emit(buf, 0x24u, {dataOffsetInBytes, static_cast(offsets), static_cast(offsets >> 32u), Agc::Command::DrawInitiator(modifier, false, __func__)}, __func__); } -uint32_t APS5_VABI sceAgcDcbDrawIndirectGetSize(void) { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDrawIndirectGetSize() { + return 20; } -uint32_t* APS5_VABI sceAgcDcbDrawIndirectMulti(CommandBuffer* buf, uint32_t data_offset_in_bytes, uint32_t count_indirect, uint32_t max_count_or_count, const volatile void* count_addr, uint32_t stride_in_bytes, uint64_t modifier) { - (void)buf; - (void)data_offset_in_bytes; - (void)count_indirect; - (void)max_count_or_count; - (void)count_addr; - (void)stride_in_bytes; - (void)modifier; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcDcbDrawIndirectMulti(CommandBuffer* buf, std::uint32_t dataOffsetInBytes, std::uint32_t countIndirect, std::uint32_t maxCountOrCount, const volatile void* countAddress, std::uint32_t strideInBytes, std::uint64_t modifier) { + Agc::Command::CheckBits(countIndirect, 1, __func__); + Agc::Command::Require((dataOffsetInBytes & 3u) == 0 && (strideInBytes & 3u) == 0 && strideInBytes >= 16, __func__, "invalid indirect draw offset or stride"); + const auto address = reinterpret_cast(countAddress); + if (countIndirect != 0) { + Agc::Command::CheckAddress(address, 4, __func__); + } else { + Agc::Command::Require(address == 0, __func__, "count address supplied for a direct draw count"); + } + const auto offsets = Agc::Command::DrawPatchOffsets(modifier, __func__); + const auto initiator = Agc::Command::DrawInitiator(modifier, false, __func__); + const auto low = static_cast(modifier); + const auto control = Agc::Command::DrawIndexLocation(modifier) | ((low & 0x10u) << 23u) | (countIndirect << 30u) | ((low & 8u) << 28u); + auto* packet = Agc::Command::Allocate(buf, 16, __func__); + packet[0] = Agc::Command::Header(0x79u, 3, 1); + packet[1] = 0x342u; + packet[2] = 0xc6000008u; + packet[3] = Agc::Command::Header(0x2cu, 10); + packet[4] = dataOffsetInBytes; + packet[5] = static_cast(offsets); + packet[6] = static_cast(offsets >> 32u); + packet[7] = control; + packet[8] = maxCountOrCount; + packet[9] = static_cast(address); + packet[10] = static_cast(address >> 32u); + packet[11] = strideInBytes; + packet[12] = initiator; + packet[13] = Agc::Command::Header(0x79u, 3, 1); + packet[14] = 0x342u; + packet[15] = 0xc6000000u; + return packet; } -uint32_t APS5_VABI sceAgcDcbDrawIndirectMultiGetSize() { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDrawIndirectMultiGetSize() { + return 64; } } diff --git a/core/libs/prx/libSceAgc/DcbFlow/include/Memory.hpp b/core/libs/prx/libSceAgc/DcbFlow/include/Memory.hpp index 3137a5cc9..184131f90 100644 --- a/core/libs/prx/libSceAgc/DcbFlow/include/Memory.hpp +++ b/core/libs/prx/libSceAgc/DcbFlow/include/Memory.hpp @@ -1,4 +1,8 @@ #ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_MEMORY_HPP #define CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_MEMORY_HPP +#include "SceTypes.hpp" + +extern "C" std::uint32_t* APS5_VABI sceAgcDcbAcquireMem(CommandBuffer* buf, std::uint8_t engine, std::uint32_t cbDbOp, std::uint32_t gcrControl, const volatile void* base, std::uint64_t sizeBytes, std::uint32_t pollCycles); + #endif diff --git a/core/libs/prx/libSceAgc/DcbFlow/include/Sync.hpp b/core/libs/prx/libSceAgc/DcbFlow/include/Sync.hpp index 8f5517adc..6cad00334 100644 --- a/core/libs/prx/libSceAgc/DcbFlow/include/Sync.hpp +++ b/core/libs/prx/libSceAgc/DcbFlow/include/Sync.hpp @@ -1,4 +1,5 @@ #ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_SYNC_HPP #define CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_SYNC_HPP + #endif diff --git a/core/libs/prx/libSceAgc/DcbFlow/src/Control.cpp b/core/libs/prx/libSceAgc/DcbFlow/src/Control.cpp index 028ca26bb..633f78f4a 100644 --- a/core/libs/prx/libSceAgc/DcbFlow/src/Control.cpp +++ b/core/libs/prx/libSceAgc/DcbFlow/src/Control.cpp @@ -6,7 +6,7 @@ #include #include "SceTypes.hpp" #include "prx/libc/include/General.hpp" -#include "shader/recompilier/Recompiler.hpp" + extern "C" { @@ -20,27 +20,14 @@ uint32_t* APS5_VABI sceAgcDcbJump(CommandBuffer* buf, uint8_t mode, uint8_t cach return nullptr; } -uint32_t APS5_VABI sceAgcDcbJumpGetSize(void) { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbJumpGetSize() { + return 16; } -uint32_t* APS5_VABI sceAgcDcbResetQueue(CommandBuffer* buf, uint32_t op, uint32_t state) { - (void)buf; - (void)op; - (void)state; - const std::array code = {0xbf810000u}; - const std::array capabilities = {1u}; - const std::array shaderRegisters = {{{0x207u, 1u}, {0x208u, 1u}, {0x209u, 1u}}}; - const std::array memory = {{{0x10000u, std::as_bytes(std::span(code))}}}; - const ShaderRecompiler::RecompileRequest request{ - {ShaderRecompiler::ShaderStage::Compute, 0x10000u, code, 0, {}}, - {64, 0, {}, shaderRegisters, {}, {}, memory}, - {0x00403000u, 0x00010600u, 64, capabilities, {}, {1024, 1024, 64}, 1024, 32768}, - {0, 0, 0, 0} - }; - (void)ShaderRecompiler::Recompile(request); - return nullptr; +std::uint32_t* APS5_VABI sceAgcDcbResetQueue(CommandBuffer* buf, std::uint32_t op, std::uint32_t state) { + Agc::Command::CheckBits(op, 0xfffu, __func__); + Agc::Command::CheckBits(state, 0xfu, __func__); + return Agc::Command::Emit(buf, 0x12u, {state}, __func__); } uint32_t* APS5_VABI sceAgcDcbRewind(CommandBuffer* buf, uint32_t initial_state) { diff --git a/core/libs/prx/libSceAgc/DcbFlow/src/Dispatch.cpp b/core/libs/prx/libSceAgc/DcbFlow/src/Dispatch.cpp index abde2b1bd..6accba9b1 100644 --- a/core/libs/prx/libSceAgc/DcbFlow/src/Dispatch.cpp +++ b/core/libs/prx/libSceAgc/DcbFlow/src/Dispatch.cpp @@ -18,9 +18,8 @@ uint32_t* APS5_VABI sceAgcDcbDispatchIndirect(CommandBuffer* buf, uint32_t data_ return nullptr; } -uint32_t APS5_VABI sceAgcDcbDispatchIndirectGetSize(void) { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbDispatchIndirectGetSize() { + return 12; } } diff --git a/core/libs/prx/libSceAgc/DcbFlow/src/Memory.cpp b/core/libs/prx/libSceAgc/DcbFlow/src/Memory.cpp index 776b8364e..ae3fb5b7c 100644 --- a/core/libs/prx/libSceAgc/DcbFlow/src/Memory.cpp +++ b/core/libs/prx/libSceAgc/DcbFlow/src/Memory.cpp @@ -10,16 +10,16 @@ extern "C" { -uint32_t* APS5_VABI sceAgcDcbAcquireMem(CommandBuffer* buf, uint8_t engine, uint32_t cb_db_op, uint32_t gcr_cntl, const volatile void* base, uint64_t size_bytes, uint32_t poll_cycles) { - (void)buf; - (void)engine; - (void)cb_db_op; - (void)gcr_cntl; - (void)base; - (void)size_bytes; - (void)poll_cycles; - NotImplemented_nid_no_patch(__func__); - return nullptr; +std::uint32_t* APS5_VABI sceAgcDcbAcquireMem(CommandBuffer* buf, std::uint8_t engine, std::uint32_t cbDbOp, std::uint32_t gcrControl, const volatile void* base, std::uint64_t sizeBytes, std::uint32_t pollCycles) { + Agc::Command::CheckBits(engine, 1, __func__); + Agc::Command::CheckBits(cbDbOp, 0x7fffffffu, __func__); + Agc::Command::CheckBits(gcrControl, 0x7ffffu, __func__); + const auto address = reinterpret_cast(base); + Agc::Command::Require((address & 0xffu) == 0 && (address >> 40u) == 0, __func__, "invalid acquire memory base address"); + const auto wholeAddressSpace = sizeBytes == 0xffffffffffffffffull; + Agc::Command::Require(wholeAddressSpace || ((sizeBytes & 0xffu) == 0 && (sizeBytes >> 40u) == 0), __func__, "invalid acquire memory range size"); + Agc::Command::Require(pollCycles / 40u <= 0xffffu, __func__, "acquire poll interval overflow"); + return Agc::Command::Emit(buf, 0x58u, {(static_cast(engine) << 31u) | cbDbOp, wholeAddressSpace ? 0u : static_cast(sizeBytes >> 8u), 0, static_cast(address >> 8u), 0, pollCycles / 40u, gcrControl}, __func__); } uint32_t APS5_VABI sceAgcDcbAcquireMemGetSize(void) { diff --git a/core/libs/prx/libSceAgc/DcbState/src/ContextState.cpp b/core/libs/prx/libSceAgc/DcbState/src/ContextState.cpp index 839760dc5..4c0bb5b80 100644 --- a/core/libs/prx/libSceAgc/DcbState/src/ContextState.cpp +++ b/core/libs/prx/libSceAgc/DcbState/src/ContextState.cpp @@ -29,14 +29,12 @@ uint32_t* APS5_VABI sceAgcDcbContextStateAnotherOp(CommandBuffer* buf, uint32_t return nullptr; } -uint32_t APS5_VABI sceAgcDcbSetBaseDispatchIndirectArgsGetSize() { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbSetBaseDispatchIndirectArgsGetSize() { + return 16; } -uint32_t APS5_VABI sceAgcDcbSetBaseDrawIndirectArgsGetSize() { - NotImplemented_nid_no_patch(__func__); - return 0; +std::uint32_t APS5_VABI sceAgcDcbSetBaseDrawIndirectArgsGetSize() { + return 16; } uint32_t APS5_VABI sceAgcDcbQueueEndOfShaderActionGetSize() { diff --git a/core/libs/prx/libSceAgc/Misc/src/RegisterDefaults.cpp b/core/libs/prx/libSceAgc/Misc/src/RegisterDefaults.cpp index 1b7e43bfc..4866a9186 100644 --- a/core/libs/prx/libSceAgc/Misc/src/RegisterDefaults.cpp +++ b/core/libs/prx/libSceAgc/Misc/src/RegisterDefaults.cpp @@ -1,3 +1,5 @@ +#include "prx/libSceAgc/Command/include/RegisterDefaults.hpp" +#include "prx/libSceAgc/Command/include/Packet.hpp" #include "prx/libSceAgc/Misc/include/RegisterDefaults.hpp" #include @@ -7,16 +9,12 @@ extern "C" { -void* APS5_VABI sceAgcGetRegisterDefaults2(uint32_t ver) { - (void)ver; - NotImplemented_nid_no_patch(__func__); - return nullptr; +void* APS5_VABI sceAgcGetRegisterDefaults2(std::uint32_t version) { + return Agc::Command::GetRegisterDefaults(version, false, __func__); } -void* APS5_VABI sceAgcGetRegisterDefaults2Internal(uint32_t ver) { - (void)ver; - NotImplemented_nid_no_patch(__func__); - return nullptr; +void* APS5_VABI sceAgcGetRegisterDefaults2Internal(std::uint32_t version) { + return Agc::Command::GetRegisterDefaults(version, true, __func__); } } diff --git a/core/libs/prx/libSceAgc/Patch/src/QueueEndOfPipeAction.cpp b/core/libs/prx/libSceAgc/Patch/src/QueueEndOfPipeAction.cpp index 03f94b82f..bf4e041d0 100644 --- a/core/libs/prx/libSceAgc/Patch/src/QueueEndOfPipeAction.cpp +++ b/core/libs/prx/libSceAgc/Patch/src/QueueEndOfPipeAction.cpp @@ -9,11 +9,25 @@ extern "C" { -int APS5_VABI sceAgcQueueEndOfPipeActionPatchAddress(uint32_t* cmd, const volatile Label* address) { - (void)cmd; - (void)address; - NotImplemented_nid_no_patch(__func__); - return 0; +int APS5_VABI sceAgcQueueEndOfPipeActionPatchAddress(std::uint32_t* cmd, const volatile Label* address) { + Agc::Command::CheckAddress(reinterpret_cast(cmd), 4, __func__); + const auto guestAddress = reinterpret_cast(address); + const auto opcode = (cmd[0] >> 8u) & 0xffu; + if (opcode == 0x49u) { + Agc::Command::ValidatePacket(cmd, opcode, 8, __func__); + const auto dataSelect = cmd[2] >> 29u; + Agc::Command::CheckAddress(guestAddress, dataSelect == 2 || dataSelect == 3 ? 8 : 4, __func__); + cmd[3] = static_cast(guestAddress); + cmd[4] = static_cast(guestAddress >> 32u); + } else { + Agc::Command::ValidatePacket(cmd, 0x47u, 6, __func__); + const auto dataSelect = cmd[3] >> 29u; + Agc::Command::CheckAddress(guestAddress, dataSelect == 2 || dataSelect == 3 ? 8 : 4, __func__); + Agc::Command::CheckBits(guestAddress, 0xffffffffffffull, __func__); + cmd[2] = static_cast(guestAddress); + cmd[3] = (cmd[3] & 0xffff0000u) | static_cast(guestAddress >> 32u); + } + return 0; } int APS5_VABI sceAgcQueueEndOfPipeActionPatchData(uint32_t* cmd, uint32_t context_id, uint32_t data_sel, uint64_t data) { diff --git a/core/libs/prx/libSceAgc/Shader/src/CreateShader.cpp b/core/libs/prx/libSceAgc/Shader/src/CreateShader.cpp index 76160235e..52dd28ae9 100644 --- a/core/libs/prx/libSceAgc/Shader/src/CreateShader.cpp +++ b/core/libs/prx/libSceAgc/Shader/src/CreateShader.cpp @@ -28,6 +28,16 @@ int APS5_VABI sceAgcCreateShader(Shader** dst, void* header, const volatile void auto* h = static_cast(header); + if (h->file_header != ShaderRegs::SHADER_FILE_HEADER_MAGIC || h->version != ShaderRegs::SHADER_VERSION) { + throw std::runtime_error(std::string(fn) + ": invalid shader header or version"); + } + const auto base = reinterpret_cast(code); + if ((base & ShaderRegs::SHADER_BASE_ALIGN_MASK) != 0 || h->shader_size == 0 || (h->shader_size & 3u) != 0) { + throw std::runtime_error(std::string(fn) + ": invalid shader code address or size"); + } + std::uint32_t programOffset = 0; + (void)GetProgramAddressRegisterOffset(h->type, programOffset); + ResolveRelativePtr(h->cx_registers); ResolveRelativePtr(h->sh_registers); ResolveRelativePtr(h->user_data); @@ -45,19 +55,6 @@ int APS5_VABI sceAgcCreateShader(Shader** dst, void* header, const volatile void h->code = code; - if (h->file_header != ShaderRegs::SHADER_FILE_HEADER_MAGIC) { - throw std::runtime_error(std::string(fn) + ": invalid file_header magic"); - } - if (h->version != ShaderRegs::SHADER_VERSION) { - throw std::runtime_error(std::string(fn) + ": unsupported shader version"); - } - - const auto base = reinterpret_cast(code); - - if ((base & ShaderRegs::SHADER_BASE_ALIGN_MASK) != 0) { - throw std::runtime_error(std::string(fn) + ": code address violates alignment mask"); - } - int result = PatchProgramAddressRegister(h->sh_registers, h->num_sh_registers, h->type, base); if (result != 0) { return result; diff --git a/core/libs/prx/libSceAgc/Shader/src/PrimState.cpp b/core/libs/prx/libSceAgc/Shader/src/PrimState.cpp index 640d228ae..ace10ea99 100644 --- a/core/libs/prx/libSceAgc/Shader/src/PrimState.cpp +++ b/core/libs/prx/libSceAgc/Shader/src/PrimState.cpp @@ -18,6 +18,20 @@ int APS5_VABI sceAgcCreatePrimState(ShaderRegister* cx_regs, ShaderRegister* uc_ throw std::runtime_error(std::string(__func__) + ": gs is null"); } + if (gs->type != static_cast(ShaderRegs::ShaderBinaryType::Gs) || gs->specials == nullptr || (hs != nullptr && (hs->type != static_cast(ShaderRegs::ShaderBinaryType::Hs) || hs->specials == nullptr))) { + throw std::runtime_error(std::string(__func__) + ": invalid shader type or missing special registers"); + } + (void)GraphicsPrimTypeToGsOut(prim_type); + if (cx_regs != nullptr) { + const auto valid = [](const Shader* shader) { return shader->specials->vgt_shader_stages_en.offset == ShaderRegs::VGT_SHADER_STAGES_EN && shader->specials->vgt_gs_out_prim_type.offset == ShaderRegs::VGT_GS_OUT_PRIM_TYPE; }; + if (!valid(gs) || (hs != nullptr && !valid(hs))) { + throw std::runtime_error(std::string(__func__) + ": invalid context register offsets"); + } + } + if (uc_regs != nullptr && (gs->specials->ge_cntl.offset != ShaderRegs::GE_CNTL || gs->specials->ge_user_vgpr_en.offset != ShaderRegs::GE_USER_VGPR_EN || (hs != nullptr && hs->specials->ge_user_vgpr_en.offset != ShaderRegs::GE_USER_VGPR_EN))) { + throw std::runtime_error(std::string(__func__) + ": invalid user configuration register offsets"); + } + if (cx_regs != nullptr) { cx_regs[0] = gs->specials->vgt_shader_stages_en; if ((cx_regs[0].value & ShaderRegs::VGT_SHADER_STAGES_GS_BIT) != 0) { diff --git a/core/libs/prx/libSceAgc/Shader/src/ShaderUtils.cpp b/core/libs/prx/libSceAgc/Shader/src/ShaderUtils.cpp index 9eb22bdb4..8a783ea26 100644 --- a/core/libs/prx/libSceAgc/Shader/src/ShaderUtils.cpp +++ b/core/libs/prx/libSceAgc/Shader/src/ShaderUtils.cpp @@ -11,7 +11,12 @@ bool GetProgramAddressRegisterOffset(std::uint8_t type, std::uint32_t& loOffset) case ShaderBinaryType::Hs: loOffset = SPI_SHADER_PGM_LO_LS; return true; case ShaderBinaryType::GsBack: loOffset = SPI_SHADER_PGM_LO_GS; return true; case ShaderBinaryType::HsBack: loOffset = SPI_SHADER_PGM_LO_HS; return true; - default: return false; + case ShaderBinaryType::GsFront: + case ShaderBinaryType::HsFront: + case ShaderBinaryType::Fs: + return false; + default: + throw std::runtime_error(std::string(__func__) + ": invalid shader binary type"); } } @@ -34,6 +39,9 @@ int PatchProgramAddressRegister(ShaderRegister* regs, std::uint32_t numRegs, std const std::uint64_t shaderOffset = (static_cast(regs[i].value) << 8u) | ((static_cast(regs[hiIndex].value) & 0xFFu) << 40u); + if (base > 0xffffffffffffull || shaderOffset > 0xffffffffffffull - base) { + throw std::runtime_error(std::string(__func__) + ": shader program address overflow"); + } const std::uint64_t addr = base + shaderOffset; regs[i].value = static_cast((addr >> 8u) & 0xFFFFFFFFu); regs[hiIndex].value &= 0xFFFFFF00u; @@ -57,8 +65,19 @@ std::uint32_t GraphicsPrimTypeToGsOut(std::uint32_t primType) { return static_cast(GsOutputPrimitiveType::Rectangle2D); case PrimitiveType::RectListLegacy: return static_cast(GsOutputPrimitiveType::RectList); - default: + case PrimitiveType::None: + case PrimitiveType::TriList: + case PrimitiveType::TriFan: + case PrimitiveType::TriStrip: + case PrimitiveType::Patch: + case PrimitiveType::TriListAdjacency: + case PrimitiveType::TriStripAdjacency: + case PrimitiveType::QuadListLegacy: + case PrimitiveType::QuadStripLegacy: + case PrimitiveType::Polygon: return static_cast(GsOutputPrimitiveType::Triangles); + default: + throw std::runtime_error(std::string(__func__) + ": invalid primitive type"); } } diff --git a/core/libs/prx/libSceAgc/tests/Commands.cpp b/core/libs/prx/libSceAgc/tests/Commands.cpp new file mode 100644 index 000000000..a2662cbce --- /dev/null +++ b/core/libs/prx/libSceAgc/tests/Commands.cpp @@ -0,0 +1,126 @@ +#include "prx/libSceAgc/Command/include/Packet.hpp" +#include "prx/libSceAgc/Command/include/Memory.hpp" +#include "prx/libSceAgc/Command/include/RegisterDefaults.hpp" + +#include +#include +#include +#include +#include + +extern "C" std::uint32_t* APS5_VABI sceAgcDcbResetQueue(CommandBuffer* buf, std::uint32_t op, std::uint32_t state); +extern "C" std::uint32_t* APS5_VABI sceAgcDcbDrawIndexAuto(CommandBuffer* buf, std::uint32_t indexCount, std::uint64_t modifier); +extern "C" int APS5_VABI sceAgcWaitRegMemPatchReference(std::uint32_t* cmd, std::uint64_t reference); + +namespace { + +void check(bool condition, const char* message) { + if (!condition) { + throw std::runtime_error(message); + } +} + +template +void expectFailure(TAction action) { + try { + action(); + } catch (const std::runtime_error& error) { + check(error.what()[0] != '\0', "empty exception message"); + return; + } + throw std::runtime_error("expected an exception"); +} + +struct Storage { + std::array words{}; + CommandBuffer buffer{words.data(), words.data() + words.size(), words.data(), words.data() + words.size(), nullptr, nullptr, 0}; +}; + +bool APS5_VABI grow(CommandBuffer* buffer, std::uint32_t count, void* userData) { + auto& storage = *static_cast(userData); + check(count == 5, "incorrect callback allocation including reserved words"); + buffer->bottom = storage.words.data(); + buffer->top = storage.words.data() + storage.words.size(); + buffer->cursor_up = buffer->bottom; + buffer->cursor_down = buffer->top; + return true; +} + +void testPackets() { + Storage storage; + sceAgcDcbResetQueue(&storage.buffer, 0, 3); + sceAgcDcbDrawIndexAuto(&storage.buffer, 17, 0); + const std::array expected{0xc0001200u, 3, 0xc0012d00u, 17, 2}; + check(std::equal(expected.begin(), expected.end(), storage.words.begin()), "reset or draw packet mismatch"); + check(storage.buffer.cursor_up == storage.words.data() + expected.size(), "incorrect packet cursor advance"); + const auto before = storage.words; + expectFailure([&] { sceAgcDcbResetQueue(&storage.buffer, 0, 16); }); + check(storage.words == before, "invalid reset modified packet memory"); + Storage destination; + CommandBuffer empty{nullptr, nullptr, nullptr, nullptr, grow, &destination, 0}; + Agc::Command::Emit(&empty, 0x15u, {1, 1, 1, 0x41u}, __func__); + check(empty.cursor_up == destination.words.data() + 5, "guest ABI allocation callback failed"); + Storage exhausted; + exhausted.buffer.cursor_down = exhausted.words.data() + 2; + expectFailure([&] { Agc::Command::WriteNop(&exhausted.buffer, 3, __func__); }); + check(exhausted.buffer.cursor_up == exhausted.words.data(), "failed allocation advanced cursor"); +} + +void testRegisters() { + Storage storage; + const std::array registers{{{0x10, 7}, {0x11, 8}, {0x20, 9}}}; + Agc::Command::WriteRegisters(&storage.buffer, 0x76u, registers.data(), registers.size(), true, __func__); + const std::array expected{0xc0027600u, 0x10, 7, 8, 0xc0017600u, 0x20, 9}; + check(std::equal(expected.begin(), expected.end(), storage.words.begin()), "register run packet mismatch"); + auto* packet = Agc::Command::WriteIndirectRegisters(&storage.buffer, 0x63u, registers.data(), 0x3ffeu, __func__); + Agc::Command::PatchIndirectCount(packet, 0x63u, 1, __func__); + check(packet[4] == 0x3fffu, "indirect register count mismatch"); + const auto before = storage.words; + expectFailure([&] { Agc::Command::PatchIndirectCount(packet, 0x63u, 1, __func__); }); + expectFailure([&] { Agc::Command::PatchIndirectAddress(packet, 0x64u, registers.data(), __func__); }); + check(storage.words == before, "invalid indirect patch modified memory"); +} + +void testMemory() { + Storage storage; + Agc::Command::WriteDma(&storage.buffer, false, 1, 0, 0, 0x2000, 2, 0, 0x12345678, 16, 0, 1, 1, __func__); + const std::array expected{0xc0055000u, 0xc0000001u, 0x12345678, 0, 0x2000, 0, 0x80000010u}; + check(std::equal(expected.begin(), expected.end(), storage.words.begin()), "DMA packet mismatch"); + std::uint64_t value = 0; + auto* packet = Agc::Command::WriteWait(&storage.buffer, 1, 3, 0, 0, &value, 0x1122334455667788ull, 0xffffffffffffffffull, 32, __func__); + check(packet[0] == 0xc0027901u && packet[4] == 0xc0079300u && packet[5] == 0x13u, "wait packet header mismatch"); + check(packet[8] == 0x55667788u && packet[9] == 0x11223344u && packet[12] == 2u, "wait reference or poll interval mismatch"); + sceAgcWaitRegMemPatchReference(packet, 7); + check(packet[8] == 7 && packet[9] == 0x11223344u, "reference patch changed the high word"); + const auto before = storage.words; + expectFailure([&] { sceAgcWaitRegMemPatchReference(packet, 0x100000000ull); }); + expectFailure([&] { Agc::Command::WriteWait(&storage.buffer, 0, 3, 0, 0, &value, 0x100000000ull, 0, 32, __func__); }); + check(storage.words == before, "invalid memory operation modified packet memory"); +} + +void testDefaults() { + for (std::uint32_t version = 0; version < 14; ++version) { + for (const bool internal : {false, true}) { + auto* first = Agc::Command::GetRegisterDefaults(version, internal, __func__); + check(first != nullptr && first == Agc::Command::GetRegisterDefaults(version, internal, __func__), "unstable register defaults pointer"); + } + } + expectFailure([] { Agc::Command::GetRegisterDefaults(14, false, __func__); }); + expectFailure([] { Agc::Command::GetRegisterDefaults(0xffffffffu, true, __func__); }); +} + +} + +int main() { + try { + testPackets(); + testRegisters(); + testMemory(); + testDefaults(); + std::puts("AGC command tests passed"); + return 0; + } catch (const std::exception& error) { + std::fprintf(stderr, "%s\n", error.what()); + return 1; + } +} diff --git a/core/libs/prx/libSceAgcDriver/Eq/src/Query.cpp b/core/libs/prx/libSceAgcDriver/Eq/src/Query.cpp index 9668a5d73..25fd0b2b5 100644 --- a/core/libs/prx/libSceAgcDriver/Eq/src/Query.cpp +++ b/core/libs/prx/libSceAgcDriver/Eq/src/Query.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "SceTypes.hpp" #include "prx/libc/include/General.hpp" @@ -14,9 +15,19 @@ uint32_t APS5_VABI sceAgcDriverGetEqContextId(const KernelEvent* ev) { } int APS5_VABI sceAgcDriverGetEqEventType(const KernelEvent* ev) { - (void)ev; - NotImplemented_nid_no_patch(__func__); - return 0; + if (ev == nullptr) { + throw std::runtime_error(std::string(__func__) + ": null event"); + } + if (ev->filter == -14) { + if (ev->ident > static_cast(std::numeric_limits::max())) { + throw std::runtime_error(std::string(__func__) + ": graphics event type overflow"); + } + return static_cast(ev->ident); + } + if (ev->data < std::numeric_limits::min() || ev->data > std::numeric_limits::max()) { + throw std::runtime_error(std::string(__func__) + ": event type overflow"); + } + return static_cast(ev->data); } }