Bug 107942

Summary: Isaac AntiBirth under wine has invisible entities tu to clipping plane issue
Product: Mesa Reporter: Fabian Maurer <dark.shadow4>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 18.2   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: Traces and hacked shader

Description Fabian Maurer 2018-09-15 12:58:05 UTC
Created attachment 141571 [details]
Traces and hacked shader

The game plays fine under wine, but in a certain stage the player and enemies are invisible.
There is a semi-official hack for this problem, involving a changed shader. (See attachment):
> //gl_ClipDistance[0] = dot(gl_Vertex, ClipPlane);

Two apitraces included, with the hack and one without.

A few more things:
- Some windows machines have the same issue, but most seem to run the game just fine
- The trace I made doesn't replay fine on my win10 either (AMD driver issue or maybe wine making broken opengl calls?)

I'd test with wine and proprietary drivers on my linux, but can't get them to work.
Since I don't know what's wrong here, I hope you can help me shed a light on this - wheter it's an actual mesa issue or just a broken game.

Arch Linux x64
Using mesa 18.2.0
Linux 4.18.7, amdgpu
Radeon R9 285
Comment 1 Timothy Arceri 2018-09-17 06:17:47 UTC
This is a game bug. Compilation of this (and other) shaders are failing because the game is using features of later glsl versions but its not setting the required version in the shader. When the version is not specified I believe the spec says it should default to glsl 1.10.

For example a more correct work around would be to add the following to the top of the shader:

#version 130

This should really be reported to the developer. And we should also create some CTS tests to make sure the binary drivers don't allow this behavior. This is a long standing difference where the behaviors of the binary drivers causes games to end up not working on Mesa.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.