Keep track of the current render target scale. Will be used to adjust mipmap lod bias.

This commit is contained in:
Henrik Rydgård 2017-12-08 11:56:41 +01:00
parent 6e3cb0cd48
commit 836ae73f92
3 changed files with 3 additions and 1 deletions

View File

@ -518,6 +518,7 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(const Frame
gstate_c.curRTHeight = vfb->height;
gstate_c.curRTRenderWidth = vfb->renderWidth;
gstate_c.curRTRenderHeight = vfb->renderHeight;
gstate_c.curRTScale = (float)vfb->renderWidth / (float)vfb->width;
return vfb;
}

View File

@ -289,5 +289,5 @@ void GPUStateCache::DoState(PointerWrap &p) {
p.Do(curRTWidth);
p.Do(curRTHeight);
// curRTBufferWidth, curRTBufferHeight, and cutRTOffsetX don't need to be saved.
// curRTRenderWidth, curRTRenderHeight, and cutRTOffsetX don't need to be saved. Probably don't even need curRTWidth/height either...
}

View File

@ -585,6 +585,7 @@ struct GPUStateCache {
u32 curRTHeight;
u32 curRTRenderWidth;
u32 curRTRenderHeight;
float curRTScale;
void SetCurRTOffsetX(int off) {
if (off != curRTOffsetX) {