CGX: Fix sVtxDescList size

This commit is contained in:
Luke Street 2022-03-20 16:52:07 -04:00
parent 671539d7eb
commit e4715a2df6
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
namespace metaforce::CGX {
SGXState sGXState{};
std::array<GX::VtxDescList, 11> sVtxDescList{};
std::array<GX::VtxDescList, 12> sVtxDescList{};
void ResetGXStates() noexcept {
sGXState.x48_descList = 0;

View File

@ -53,7 +53,7 @@ struct SGXState {
GXColor x25c_fogColor;
};
extern SGXState sGXState;
extern std::array<GX::VtxDescList, 11> sVtxDescList;
extern std::array<GX::VtxDescList, 12> sVtxDescList;
static inline void update_fog(u32 value) noexcept {
if (sGXState.x53_fogType == GX::FOG_NONE || (sGXState.x56_blendMode & 0xE0) == (value & 0xE0)) {
@ -396,7 +396,7 @@ static inline void SetTexCoordGen(GX::TexCoordID dstCoord, u32 flags) noexcept {
static inline void SetVtxDescv_Compressed(u32 descList) noexcept {
u32 currentDescList = sGXState.x48_descList;
if (descList != currentDescList) {
size_t remain = sVtxDescList.size();
size_t remain = sVtxDescList.size() - 1;
u32 shift = 0;
u32 attrIdx = 0;
do {