[Bug 43948] New: d3dx9 effects - pixel shader 2.0 does not render well

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Oct 31 17:01:15 CDT 2017


https://bugs.winehq.org/show_bug.cgi?id=43948

            Bug ID: 43948
           Summary: d3dx9 effects - pixel shader 2.0 does not render well
           Product: Wine
           Version: 2.19
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: directx-d3dx9
          Assignee: wine-bugs at winehq.org
          Reporter: havran.jan at email.cz
      Distribution: ArchLinux

Created attachment 59587
  --> https://bugs.winehq.org/attachment.cgi?id=59587
d3dx9 effects

I have strange behaviour of effects in d3dx9 application where I have access to
source code. I tried to reduce code size to the minimum where this bug is still
reproduciable. The problem is, when I apply attached shaders.fx effects (VS +
PS) on some objects (triangle for example), then the object is black in Wine,
while in Windows or Gallium Nine it is grey.

Here is list of configuration where it works as expected (expected = how it
works on native Windows):
Windows 7 + D3D9 + AMD graphics
Windows 7 + D3D9 + Intel graphics
Linux + Wine + Gallium Nine + AMD graphics (Mesa)

Here is list of configuration where it does not work (renders black objects):
Windows 7 + WineD3D + AMD graphics
Windows 7 + WineD3D + Intel graphics
Linux + Wine + WineD3D + AMD graphics (Mesa)
Linux + Wine + WineD3D + Intel graphics (Mesa)

There are possibly two issues in attached pixel shader:
1) uninitialized IN.lightVec
2) usage of normalize() function (and possible division by zero)

But here is the strange behaviour:
1) when I set IN.lightVec red, green or blue to 0.0 (one or two of them, but
not all of them, because it cause crash), then it is rendered black in Windows
and in Wine as well.
2) when I set IN.lightVec.r (for example) to "IN.lightVec.r + 0.0f", then it
has no effect.

>From point 2 it looks like IN.lightVec default values are 0.0f, but from point
1 it looks opposite. So I have no idea what are values of uninitialized vector.

I thought that it could be related to bug #34266 [1], but:
1) created patch did not work for me
2) when I set IN.lightVec to zero, the bug disappears

I can upload simple d3d app which use these effect and also binary file (exe).

I have no D3D (and D3D shaders) deep knowledge, so maybe I something understand
wrong.

I also used native d3dcompiler_43 so Wine could compile these shaders.

[1] https://bugs.winehq.org/show_bug.cgi?id=34266

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list