Move ForgetLastTexture() into DrawPixels().

This commit is contained in:
Unknown W. Brackets 2014-09-13 14:57:45 -07:00
parent 96b497f955
commit f33515723b
2 changed files with 3 additions and 7 deletions

View file

@ -250,7 +250,8 @@ namespace DX9 {
dxstate.viewport.set(0, 0, vfb->renderWidth, vfb->renderHeight);
MakePixelTexture(srcPixels, srcPixelFormat, srcStride, width, height);
DisableState();
DrawActiveTexture(0, dstX, dstY, width, height, vfb->bufferWidth, vfb->bufferHeight, false, 0.0f, 0.0f, 1.0f, 1.0f);
DrawActiveTexture(drawPixelsTex_, dstX, dstY, width, height, vfb->bufferWidth, vfb->bufferHeight, false, 0.0f, 0.0f, 1.0f, 1.0f);
textureCache_->ForgetLastTexture();
}
void FramebufferManagerDX9::DrawFramebuffer(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, bool applyPostShader) {
@ -286,10 +287,6 @@ namespace DX9 {
}
// TODO: StretchRect instead?
if (tex) {
pD3Ddevice->SetTexture(0, tex);
}
float coord[20] = {
x,y,0, u0,v0,
x+w,y,0, u1,v0,

View file

@ -498,6 +498,7 @@ void FramebufferManager::DrawPixels(VirtualFramebuffer *vfb, int dstX, int dstY,
MakePixelTexture(srcPixels, srcPixelFormat, srcStride, width, height);
DisableState();
DrawActiveTexture(0, dstX, dstY, width, height, vfb->bufferWidth, vfb->bufferHeight, false, 0.0f, 0.0f, 1.0f, 1.0f);
textureCache_->ForgetLastTexture();
}
void FramebufferManager::DrawFramebuffer(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, bool applyPostShader) {
@ -1883,7 +1884,6 @@ bool FramebufferManager::NotifyFramebufferCopy(u32 src, u32 dst, int size, bool
DrawPixels(dstBuffer, 0, dstY, srcBase, dstBuffer->format, dstBuffer->fb_stride, dstBuffer->width, dstH);
SetColorUpdated(dstBuffer);
RebindFramebuffer();
textureCache_->ForgetLastTexture();
// This is a memcpy, let's still copy just in case.
return false;
}
@ -2098,7 +2098,6 @@ void FramebufferManager::NotifyBlockTransferAfter(u32 dstBasePtr, int dstStride,
DrawPixels(dstBuffer, dstX * dstXFactor, dstY, srcBase, dstBuffer->format, srcStride * dstXFactor, dstWidth * dstXFactor, dstHeight);
SetColorUpdated(dstBuffer);
RebindFramebuffer();
textureCache_->ForgetLastTexture();
}
}
}