[Bug 7901] ShaderStudio: rcp instruction works incorrectly in
vertex shaders 1.1/wine 0.9.33
Wine Bugs
wine-bugs at winehq.org
Sat Mar 31 08:32:54 CDT 2007
http://bugs.winehq.org/show_bug.cgi?id=7901
------- Additional Comments From ErV2005 at rambler.ru 2007-31-03 08:32 -------
>Is this with ARB or GLSL shaders?
Wine currently uses ARB shaders.
>If I read the sdk description of rcp correctly, those source swizzles are
>incorrect. r0.x, r0.y, r0.z, r0.w are each allowed, r0 is the same as r0.x,
>but things like r0.xy r0.xz, r0.wz, r0.xyz, etc are not allowed. Are you sure
>that these shaders work correctly in windows? With which drivers did you test
>on windows?
The shader was originally written for ATI Radeon 9100/Catalyst 3.6..3.9(don't
know exact version). I don't have access to that hardware anymore and can't be
absolutely sure that this hardware actually swapped sources and used different
channels.
However, I've just tried same shader on my current Windows configuration: WinXP
SP2/GeForce FX 7100 GS/ForceWare 93.71.
I've got some interesting results:
1) On Windows including rcp instruction with source mask doesn't kill shader.
On Wine All graphic output from that shader disappears immediatly when rcp
instruction with source mask is placed somewhere inside vertex shader. Even if
result of instruction is not used.
2) On both platforms (Wine/WinXP) shader compiles with no errors/no error
messages, even if source mask is present. (It looks like Shader Studio uses
D3DXAssembleShader)
3) On Windows rcp instruction source mask DOESN'T work, but behave in
undocumented way. If any source mask is given, rcp instruction uses last given
channel as an argument. I.e. "rcp r0.xy, r0.xy" works as "rcp r0.xy, r0.y",
"rcp r0.xyz, r0.yxz" works as "rcp r0.xyz, r0.z". You can test that yourself,
by defining some constants in shader and using rcp result to multiply texture
coordinates. For example, like this:
def c0, 0.5, 1.0, 2.0, 4.0
mad r0.xy, v7.xy, c0.zz, -c0.yy
mov oPos.x, r0.x
mov oPos.y, -r0.y
mov oPos.z, c0.x
mov oPos.w, c0.y
rcp r0.xy, c0.xy
;rcp r0.xy, c0.yx
mul oT0.xy, r0, v0
On my system texture on resulting picture have same tiling in U and V
directions, as if only last source channel was given in rcp source mask.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list