diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index fc5bd30d6b..08cbf3efa3 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -441,6 +441,7 @@ GLES_GPU::GLES_GPU() // No need to flush before the tex scale/offset commands if we are baking // the tex scale/offset into the vertices anyway. + if (g_Config.bPrescaleUV) { commandFlags_[GE_CMD_TEXSCALEU] &= ~FLAG_FLUSHBEFOREONCHANGE; commandFlags_[GE_CMD_TEXSCALEV] &= ~FLAG_FLUSHBEFOREONCHANGE; diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index c48bee19e4..05a4ea8b9f 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -946,6 +946,9 @@ void TransformDrawEngine::SubmitPrim(void *verts, void *inds, GEPrimitiveType pr } void TransformDrawEngine::DecodeVerts() { + UVScale origUV; + if (uvScale) + origUV = gstate_c.uv; for (int i = 0; i < numDrawCalls; i++) { const DeferredDrawCall &dc = drawCalls[i]; @@ -975,7 +978,7 @@ void TransformDrawEngine::DecodeVerts() { while (j < numDrawCalls) { if (drawCalls[j].verts != dc.verts) break; - if (uvScale && memcmp(&uvScale[j], &uvScale[i], sizeof(uvScale[0]) != 0)) + if (uvScale && memcmp(&uvScale[j], &uvScale[i], sizeof(uvScale[0])) != 0) break; indexLowerBound = std::min(indexLowerBound, (int)drawCalls[j].indexLowerBound); @@ -1016,6 +1019,8 @@ void TransformDrawEngine::DecodeVerts() { // Force to points (0) indexGen.AddPrim(GE_PRIM_POINTS, 0); } + if (uvScale) + gstate_c.uv = origUV; } u32 TransformDrawEngine::ComputeHash() { @@ -1036,6 +1041,11 @@ u32 TransformDrawEngine::ComputeHash() { fullhash += XXH32((const char *)drawCalls[i].inds, indexSize * drawCalls[i].vertexCount, 0x955FD1CA); } } + if (uvScale) { + for (int i = 0; i < numDrawCalls; i++) { + fullhash += XXH32(&uvScale[i], sizeof(uvScale[0]), 0x0123e658); + } + } return fullhash; } diff --git a/lang b/lang index 60b4010fb4..50fe9235cd 160000 --- a/lang +++ b/lang @@ -1 +1 @@ -Subproject commit 60b4010fb4b16fb83718172a08a4850df6f0d8da +Subproject commit 50fe9235cde6004892fe3bb04f8780c693d5b38a diff --git a/native b/native index 67bea6c7ed..c18d1bcc6d 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 67bea6c7ed9eba715d42164944c70ba5a2838223 +Subproject commit c18d1bcc6d8690145211fd4f65260930d28d44e6