Skip to content

Commit

Permalink
Need to include getUVGenMode in vertex cache hash. Fixes #9263
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Feb 4, 2017
1 parent ab599d2 commit b4dd529
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions GPU/Common/VertexDecoderCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ void VertexDecoder::SetVertexType(u32 fmt, const VertexDecoderOptions &options,
biggest = tcalign[tc];

// NOTE: That we check getUVGenMode here means that we must include it in the decoder ID!
// throughmode is automatically included though, because it's part of the vertType.
if (!throughmode && (gstate.getUVGenMode() == GE_TEXMAP_TEXTURE_COORDS || gstate.getUVGenMode() == GE_TEXMAP_UNKNOWN)) {
if (g_DoubleTextureCoordinates)
steps_[numSteps_++] = morphcount == 1 ? tcstep_prescale_remaster[tc] : tcstep_prescale_morph_remaster[tc];
Expand Down
2 changes: 1 addition & 1 deletion GPU/GLES/DrawEngineGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ void DrawEngineGLES::DoFlush() {
useCache = false;

if (useCache) {
u32 id = dcid_;
u32 id = dcid_ ^ gstate.getUVGenMode(); // This can have an effect on which UV decoder we need to use! And hence what the decoded data will look like. See #9263
auto iter = vai_.find(id);
VertexArrayInfo *vai;
if (iter != vai_.end()) {
Expand Down

0 comments on commit b4dd529

Please sign in to comment.