Skip to content

Commit

Permalink
vertexjit: Use consistent skinInDecode.
Browse files Browse the repository at this point in the history
Just a little cleanup.
  • Loading branch information
unknownbrackets committed Sep 11, 2022
1 parent a2ca85b commit 4889d52
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion GPU/Common/VertexDecoderArm.cpp
Expand Up @@ -204,7 +204,7 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int

// Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead.
if (dec.weighttype && g_Config.bSoftwareSkinning) {
if (dec.skinInDecode) {
// Copying from R3 to R4
MOVP2R(R3, gstate.boneMatrix);
MOVP2R(R4, bones);
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/VertexDecoderArm64.cpp
Expand Up @@ -190,7 +190,7 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int

// Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead.
if (dec.weighttype && g_Config.bSoftwareSkinning) {
if (dec.skinInDecode) {
// Copying from R3 to R4
MOVP2R(X3, gstate.boneMatrix);
MOVP2R(X4, bones);
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/VertexDecoderCommon.cpp
Expand Up @@ -1083,7 +1083,7 @@ void VertexDecoder::SetVertexType(u32 fmt, const VertexDecoderOptions &options,
DEBUG_LOG(G3D, "VTYPE: THRU=%i TC=%i COL=%i POS=%i NRM=%i WT=%i NW=%i IDX=%i MC=%i", (int)throughmode, tc, col, pos, nrm, weighttype, nweights, idx, morphcount);
}

bool skinInDecode = weighttype != 0 && g_Config.bSoftwareSkinning;
skinInDecode = weighttype != 0 && g_Config.bSoftwareSkinning;

if (weighttype) { // && nweights?
weightoff = size;
Expand Down
1 change: 1 addition & 0 deletions GPU/Common/VertexDecoderCommon.h
Expand Up @@ -458,6 +458,7 @@ class VertexDecoder {
DecVtxFormat decFmt;

bool throughmode;
bool skinInDecode;
u8 size;
u8 onesize_;

Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/VertexDecoderX86.cpp
Expand Up @@ -219,7 +219,7 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int

// Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead.
if (dec.weighttype && g_Config.bSoftwareSkinning) {
if (dec.skinInDecode) {
MOV(PTRBITS, R(tempReg1), ImmPtr(&threeMasks));
MOVAPS(XMM4, MatR(tempReg1));
MOV(PTRBITS, R(tempReg1), ImmPtr(&aOne));
Expand Down

0 comments on commit 4889d52

Please sign in to comment.