mixed commit:

in D3D and Opengl:
fixed one nasty bug in texture loading where if a dynamic texture keeps his format but the tlut format is changed, the try or reloading the texture in the same texture could cause a hang if the size of the resulting texture is different than the original (size in bytes)
Applied a ugly temporal hack to the texture conversor to solve efb to ram misalignments and effect distortions.
in D3D:
Pseudo implementation of logic ops using basic blending: the first 8 operations are "good approximations", the remaining 8 are bullshit :) if someone have a better approximation to emulate this logic please let me know.
please test if i don't break anything in the process and test Mario kart wee you will get a nice surprise.:)
 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4656 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2009-12-07 18:48:31 +00:00
parent 85a9b3dc2c
commit d02426a8e9
14 changed files with 634 additions and 67 deletions

View File

@ -107,12 +107,16 @@ void WriteSwizzler(char*& p, u32 format,bool HLSL)
if(!HLSL)
WRITE(p," sampleUv.y = textureDims.y - sampleUv.y;\n");
WRITE(p, " sampleUv.x = sampleUv.x + textureDims.z;\n"
" sampleUv.y = sampleUv.y + textureDims.w;\n");
WRITE(p, " sampleUv = sampleUv + textureDims.zw;\n");
if(HLSL)
{
WRITE(p, " sampleUv.x = sampleUv.x / blkDims.z;\n"
" sampleUv.y = sampleUv.y / blkDims.w;\n");
WRITE(p, " sampleUv = sampleUv + float2(1.0f,1.0f);\n"
" sampleUv = sampleUv / blkDims.zw;\n");
}
else
{
WRITE(p, " sampleUv = sampleUv + float2(1.0f,-1.0f);\n");
}
}
@ -158,15 +162,18 @@ void Write32BitSwizzler(char*& p, u32 format, bool HLSL)
WRITE(p, " sampleUv = sampleUv * blkDims.xy;\n");
if(!HLSL)
WRITE(p, " sampleUv.y = textureDims.y - sampleUv.y;\n");
WRITE(p," sampleUv.y = textureDims.y - sampleUv.y;\n");
WRITE(p, " sampleUv.x = sampleUv.x + textureDims.z;\n");
WRITE(p, " sampleUv.y = sampleUv.y + textureDims.w;\n");
WRITE(p, " sampleUv = sampleUv + textureDims.zw;\n");
if(HLSL)
{
WRITE(p, " sampleUv.x = sampleUv.x / blkDims.z;\n"
" sampleUv.y = sampleUv.y / blkDims.w;\n");
WRITE(p, " sampleUv = sampleUv + float2(1.0f,1.0f);\n"
" sampleUv = sampleUv / blkDims.zw;\n");
}
else
{
WRITE(p, " sampleUv = sampleUv + float2(1.0f,-1.0f);\n");
}
}