revert previous commit r5578. Didn't work as expected on CG and didn't solve radeon driver issue neither.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5579 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-03-01 17:37:05 +00:00
parent 2157fb4907
commit 2769fe7e32
5 changed files with 20 additions and 22 deletions

View File

@ -417,7 +417,7 @@ void LoadglFunctions()
inline bool TryBlockFormat(GLint fmt, const GLvoid* vBlockData) {
g_internalFloatFmt = fmt;
glTexImage2D(GL_TEXTURE_2D, 0, g_internalFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_RED, GL_FLOAT, vBlockData);
glTexImage2D(GL_TEXTURE_2D, 0, g_internalFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_ALPHA, GL_FLOAT, vBlockData);
return (glGetError() == GL_NO_ERROR);
}
@ -612,9 +612,7 @@ bool ZZCreate(int _width, int _height)
// We store block data on u16 rather float numbers. It's not so preciese, but ALPHA16 is OpenGL 2.0 standart
// and use only 16 bit. Old zerogs use red channel, but it does not work.
// Note: GL_ALPHA was dropped in GL3.0 in favor of GL_RED ... Time to upgrade -- gregory
glTexImage2D(GL_TEXTURE_2D, 0, g_internalFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_RED, GL_UNSIGNED_SHORT, &vBlockData[0]);
glTexImage2D(GL_TEXTURE_2D, 0, g_internalFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_ALPHA, GL_UNSIGNED_SHORT, &vBlockData[0]);
if( glGetError() != GL_NO_ERROR ) {
ZZLog::Error_Log("ZZogl ERROR: could not fill blocks");
return false;

Binary file not shown.

View File

@ -96,7 +96,7 @@ float2 ps2memcoord(float2 realtex)
off.xy = realtex.xy-fblock.xy;
#ifdef ACCURATE_DECOMPRESSION
off.z = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).r;
off.zw = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).ar;
off.x = dot(off.xy, g_fTexOffset.xy);
float r = g_fTexOffset.w;
float f = frac(off.x);
@ -105,7 +105,7 @@ float2 ps2memcoord(float2 realtex)
off.x = frac(f + fadd + r);
off.w -= off.x ;
#else
off.z = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).r;
off.z = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).a;
// combine the two
off.x = dot(off.xyz, g_fTexOffset.xyz)+g_fTexOffset.w;
@ -135,10 +135,10 @@ void ps2memcoord4(float4 orgtex, out float4 off0, out float4 off1)
float4 colors;// = tex2D(g_sBilinearBlocks, ftransblock.xy);
// this is faster on ffx ingame
colors.x = tex2D(g_sBlocks, ftransblock.xy).r;
colors.y = tex2D(g_sBlocks, ftransblock.zy).r;
colors.z = tex2D(g_sBlocks, ftransblock.xw).r;
colors.w = tex2D(g_sBlocks, ftransblock.zw).r;
colors.x = tex2D(g_sBlocks, ftransblock.xy).a;
colors.y = tex2D(g_sBlocks, ftransblock.zy).a;
colors.z = tex2D(g_sBlocks, ftransblock.xw).a;
colors.w = tex2D(g_sBlocks, ftransblock.zw).a;
float4 fr, rem;

View File

@ -141,7 +141,7 @@ float2 ps2memcoord(float2 realtex)
off.xy = realtex.xy-fblock.xy;
#ifdef ACCURATE_DECOMPRESSION
off.z = texture(g_sBlocks, g_fTexBlock[CTX].xy*fblock + g_fTexBlock[CTX].zw).r;
off.zw = texture(g_sBlocks, g_fTexBlock[CTX].xy*fblock + g_fTexBlock[CTX].zw).ar;
off.x = dot(off.xy, g_fTexOffset[CTX].xy);
float r = g_fTexOffset[CTX].w;
float f = fract(off.x);
@ -150,7 +150,7 @@ float2 ps2memcoord(float2 realtex)
off.x = fract(f + fadd + r);
off.w -= off.x ;
#else
off.z = texture(g_sBlocks, g_fTexBlock[CTX].xy*fblock + g_fTexBlock[CTX].zw).r;
off.z = texture(g_sBlocks, g_fTexBlock[CTX].xy*fblock + g_fTexBlock[CTX].zw).a;
// combine the two
off.x = dot(off.xyz, g_fTexOffset[CTX].xyz)+g_fTexOffset[CTX].w;
@ -180,10 +180,10 @@ void ps2memcoord4(float4 orgtex, out float4 off0, out float4 off1)
float4 colors;// = texture(g_sBilinearBlocks, ftransblock.xy);
// this is faster on ffx ingame
colors.x = texture(g_sBlocks, ftransblock.xy).r;
colors.y = texture(g_sBlocks, ftransblock.zy).r;
colors.z = texture(g_sBlocks, ftransblock.xw).r;
colors.w = texture(g_sBlocks, ftransblock.zw).r;
colors.x = texture(g_sBlocks, ftransblock.xy).a;
colors.y = texture(g_sBlocks, ftransblock.zy).a;
colors.z = texture(g_sBlocks, ftransblock.xw).a;
colors.w = texture(g_sBlocks, ftransblock.zw).a;
float4 fr, rem;

View File

@ -193,7 +193,7 @@ float2 ps2memcoord(float2 realtex)
off.xy = realtex.xy-fblock.xy;
#ifdef ACCURATE_DECOMPRESSION
off.z = texture(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).r;
off.zw = texture(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).ar;
off.x = dot(off.xy, g_fTexOffset.xy);
float r = g_fTexOffset.w;
float f = fract(off.x);
@ -202,7 +202,7 @@ float2 ps2memcoord(float2 realtex)
off.x = fract(f + fadd + r);
off.w -= off.x ;
#else
off.z = texture(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).r;
off.z = texture(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).a;
// combine the two
off.x = dot(off.xyz, g_fTexOffset.xyz)+g_fTexOffset.w;
@ -232,10 +232,10 @@ void ps2memcoord4(float4 orgtex, out float4 off0, out float4 off1)
float4 colors;// = texture(g_sBilinearBlocks, ftransblock.xy);
// this is faster on ffx ingame
colors.x = texture(g_sBlocks, ftransblock.xy).r;
colors.y = texture(g_sBlocks, ftransblock.zy).r;
colors.z = texture(g_sBlocks, ftransblock.xw).r;
colors.w = texture(g_sBlocks, ftransblock.zw).r;
colors.x = texture(g_sBlocks, ftransblock.xy).a;
colors.y = texture(g_sBlocks, ftransblock.zy).a;
colors.z = texture(g_sBlocks, ftransblock.xw).a;
colors.w = texture(g_sBlocks, ftransblock.zw).a;
float4 fr, rem;