d3d: a little speedup in efb to ram please test and let me know the result

opengl: a little code cleanup and possible speedup in texture recreation.
d3d and opengl :plugins corrected the efb alignment when efb to ram is used.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4637 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2009-12-03 20:09:15 +00:00
parent afdfd29fcd
commit a99a1451f9
5 changed files with 158 additions and 196 deletions

View File

@ -292,11 +292,16 @@ void EncodeToRam(u32 address, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyf
float MValueX = Renderer::GetTargetScaleX();
float MValueY = Renderer::GetTargetScaleY();
float top = Renderer::GetTargetHeight() - (source.top + expandedHeight) * MValueY;
float top = Renderer::GetTargetHeight() - floorf((source.top + expandedHeight) * MValueY - 0.5f);
float sampleStride = bScaleByHalf?2.0f:1.0f;
TextureConversionShader::SetShaderParameters((float)expandedWidth, expandedHeight * MValueY, source.left * MValueX, top, sampleStride * MValueX, sampleStride * MValueY);
TextureConversionShader::SetShaderParameters((float)expandedWidth,
expandedHeight * MValueY,
ceilf(source.left * MValueX + 0.5f),
top,
sampleStride * MValueX,
sampleStride * MValueY);
TargetRectangle scaledSource;
scaledSource.top = 0;