From 7de3edb46cdcba7effcfe45c7abc324abd932c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 10 Apr 2018 12:22:26 +0200 Subject: [PATCH] Revert "Remove gstate_c.deferredVertTypeDirty" This reverts commit fcdb816235d46e582f797e41d7ee344c81194cd4. --- GPU/GPUCommon.cpp | 6 ++++++ GPU/GPUState.h | 1 + 2 files changed, 7 insertions(+) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 60eace01ac..83afe4b40c 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1428,6 +1428,12 @@ void GPUCommon::Execute_VertexType(u32 op, u32 diff) { gstate.vertType ^= diff; if (diff & (GE_VTYPE_TC_MASK | GE_VTYPE_THROUGH_MASK)) gstate_c.Dirty(DIRTY_UVSCALEOFFSET); + // In this case, we may be doing weights and morphs. + // Update any bone matrix uniforms so it uses them correctly. + if ((op & GE_VTYPE_MORPHCOUNT_MASK) != 0) { + gstate_c.Dirty(gstate_c.deferredVertTypeDirty); + gstate_c.deferredVertTypeDirty = 0; + } gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE); } if (diff & GE_VTYPE_THROUGH_MASK) diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 8e6a7c8665..18d8cdd21b 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -553,6 +553,7 @@ struct GPUStateCache { bool allowShaderBlend; float morphWeights[8]; + u32 deferredVertTypeDirty; u32 curTextureWidth; u32 curTextureHeight;