From 2e464800bc9e9f389917a3be8926258b320805de Mon Sep 17 00:00:00 2001 From: magumagu Date: Sun, 4 May 2014 22:44:10 -0700 Subject: [PATCH] VideoCommon: correctly compute whether an indirect texture stage is active. This is consistent with the implementation in PixelShaderGen. --- Source/Core/VideoCommon/BPMemory.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h index a615f5d3a7..312bc2d01d 100644 --- a/Source/Core/VideoCommon/BPMemory.h +++ b/Source/Core/VideoCommon/BPMemory.h @@ -321,7 +321,6 @@ struct TevStageCombiner union TevStageIndirect { - // if mid, sw, tw, and addprev are 0, then no indirect stage is used, mask = 0x17fe00 struct { u32 bt : 2; // Indirect tex stage ID @@ -342,7 +341,9 @@ struct TevStageCombiner u32 unused : 11; }; - bool IsActive() { return (hex & 0x17fe00) != 0; } + // If bs and mid are zero, the result of the stage is independent of + // the texture sample data, so we can skip sampling the texture. + bool IsActive() { return bs != ITBA_OFF || mid != 0; } }; union TwoTevStageOrders