Posts: 1.157
Threads: 11
Joined: Dec 2008
Reputation:
4
12-14-2008, 05:58 PM
(This post was last modified: 12-14-2008, 05:59 PM by Zeydlitz.)
ZeroGS OGL is only way to use graphics at linux, but it have a bunch of errors. So I made a little patch with followings stuff:
1) Solve crush when using AA 2x or 4x. There was uninitialising variable (issue 3)
2) Solve crush when switching F5, F6 (AA, interlace, bilinear filtering) in Linux with MGTS on. There was race condition. (issue 6)
3) Solve GSGifReset (issue 7 and 9).
Sponsored links
Posts: 543
Threads: 16
Joined: Dec 2008
Reputation:
7
Location: Las Vegas, NV
Oh, just for anyone curious, this patch is exactly what is in the patched copy of ZeroGS in the binaries I posted. Of course, since you posted most of those issues, and that's where I got the fixes, its not suprising...
Posts: 1
Threads: 0
Joined: Dec 2008
Reputation:
0
Well unfortunately for some dumbos (me for instance) who bought a Radeon 4850/4870, it's kinda useless, as this plugin use the CG toolkit, meaning that only owners of Nvidia graphic cards can enjoys PS2 games on Linux.
So since AMD finally made its Stream SDK available on Linux, on RPM package based distributions, and with some manipulations on DEB package based distributions like Ubuntu, I wonder if the author of the OpenGL Linux plugin plans to make it possible to use this SDK instead of the Nvidia CG toolkit ?
Posts: 1.157
Threads: 11
Joined: Dec 2008
Reputation:
4
Why? I have an ATI4870. And use this plugun. CG-Toolkit works with ATI cards.
Posts: 178
Threads: 10
Joined: Dec 2008
Reputation:
0
Mind my nitpicking, but its crash not crush.
Old habits die hard - System Shock
Posts: 76
Threads: 3
Joined: Dec 2008
Reputation:
0
Location: Finland
Well anyway Nvidia released full OpenGL 3.0 supported drivers recently (181 for windows, 180 for linux)
Posts: 1.157
Threads: 11
Joined: Dec 2008
Reputation:
4
Could someone help me? I don't understand this shader code, and have no understanding why #ifdef code generated such different output. This is ZeroGS OGL shader that give hightly incorrect picture with no-bilinear mode at some games.
Code: // given a local tex coord, returns the coord in the memory
float2 ps2memcoord(float2 realtex)
{
float4 off;
// block off
realtex.xy = realtex.xy * g_fTexDims.xy + g_fTexDims.zw;
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fMult.zw;
float2 fblock = frac(realtex.xy);
off.xy = realtex.xy-fblock.xy;
#ifdef ACCURATE_DECOMPRESSION
off.zw = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).ar;
off.x = dot(off.xyw, g_fTexOffset.xyw);
float f = frac(off.x);
float fadd = g_fTexOffset.z * off.z;
off.w = off.x + fadd;
off.x = frac(f + fadd);
off.w -= off.x;
#else
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;
off.x = modf(off.x, off.w);
#endif
off.xy = off.xw * g_fPageOffset.zy + g_fPageOffset.wx;
//off.y = off.w * g_fPageOffset.y + g_fPageOffset.x;
return off.xy;
}
Posts: 178
Threads: 10
Joined: Dec 2008
Reputation:
0
(12-19-2008, 05:21 PM)Zeydlitz Wrote: Could someone help me? I don't understand this shader code, and have no understanding why #ifdef code generated such different output. This is ZeroGS OGL shader that give hightly incorrect picture with no-bilinear mode at some games.
Code: // given a local tex coord, returns the coord in the memory
float2 ps2memcoord(float2 realtex)
{
float4 off;
// block off
realtex.xy = realtex.xy * g_fTexDims.xy + g_fTexDims.zw;
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fMult.zw;
float2 fblock = frac(realtex.xy);
off.xy = realtex.xy-fblock.xy;
#ifdef ACCURATE_DECOMPRESSION
off.zw = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).ar;
off.x = dot(off.xyw, g_fTexOffset.xyw);
float f = frac(off.x);
float fadd = g_fTexOffset.z * off.z;
off.w = off.x + fadd;
off.x = frac(f + fadd);
off.w -= off.x;
#else
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;
off.x = modf(off.x, off.w);
#endif
off.xy = off.xw * g_fPageOffset.zy + g_fPageOffset.wx;
//off.y = off.w * g_fPageOffset.y + g_fPageOffset.x;
return off.xy;
}
Ok I`m not even claiming to be an expert on this type of stuff, and correct me if I`m wrong but shouldn`t the line:
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fMult.zw
be:
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fTexDims.zw
Old habits die hard - System Shock
Posts: 19
Threads: 3
Joined: Dec 2008
Location: San Antonio, Tx
(12-20-2008, 12:27 PM)icemann Wrote: (12-19-2008, 05:21 PM)Zeydlitz Wrote: Could someone help me? I don't understand this shader code, and have no understanding why #ifdef code generated such different output. This is ZeroGS OGL shader that give hightly incorrect picture with no-bilinear mode at some games.
Code: // given a local tex coord, returns the coord in the memory
float2 ps2memcoord(float2 realtex)
{
float4 off;
// block off
realtex.xy = realtex.xy * g_fTexDims.xy + g_fTexDims.zw;
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fMult.zw;
float2 fblock = frac(realtex.xy);
off.xy = realtex.xy-fblock.xy;
#ifdef ACCURATE_DECOMPRESSION
off.zw = tex2D(g_sBlocks, g_fTexBlock.xy*fblock + g_fTexBlock.zw).ar;
off.x = dot(off.xyw, g_fTexOffset.xyw);
float f = frac(off.x);
float fadd = g_fTexOffset.z * off.z;
off.w = off.x + fadd;
off.x = frac(f + fadd);
off.w -= off.x;
#else
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;
off.x = modf(off.x, off.w);
#endif
off.xy = off.xw * g_fPageOffset.zy + g_fPageOffset.wx;
//off.y = off.w * g_fPageOffset.y + g_fPageOffset.x;
return off.xy;
}
Ok I`m not even claiming to be an expert on this type of stuff, and correct me if I`m wrong but shouldn`t the line:
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fMult.zw
be:
realtex.xy = (realtex.xy - frac(realtex.xy)) * g_fTexDims.zw
Damn dude, are u a real coder???
U don't understand this lines at all so for what u've wrote this?
It's so much dumber than original that ain't got any sense
function g_fTexDims gets textures dimensions as i remember
Posts: 178
Threads: 10
Joined: Dec 2008
Reputation:
0
Me or Zeydlitz you speaking to? As I`m not a coder and was taking a total guess.
Old habits die hard - System Shock
|