Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan does not properly synchronize with OpenGL in X-Plane 11.50 #179

Open
JT8D-17 opened this issue Aug 22, 2020 · 19 comments
Open

Vulkan does not properly synchronize with OpenGL in X-Plane 11.50 #179

JT8D-17 opened this issue Aug 22, 2020 · 19 comments
Assignees
Labels
fix available The issue has been fixed by AMD internally or in dev branch

Comments

@JT8D-17
Copy link

JT8D-17 commented Aug 22, 2020

Issue

When running X-Plane in Vulkan mode with AMDVLK, any plugin drawing in OpenGL space exhibits rendering artifacts.

Example screenshot

 

Information:

AMD 3700X
Arch Linux with Kernel 5.8.2
Xserver 1.20.8-3

AMD 5700XT (Navi10)
AMDVLK 2020.Q3.3
Mesa 20.1.6 (for OpenGL)

X-Plane 11.50r1
X-Plane launch options: VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_icd64.json ./X-Plane-x86_64 --vulkan
X-Plane log

Renderdoc capture

 

Reproduction:

  1. Download and install the X-Plane demo from the official site (requires around 10 GB of free disk space)
  2. Update the demo by running the installer again, checking the "Check for new betas..." box. This is crucial in switching to the 11.50 codepath that includes Vulkan mode!
  3. X-Plane can be directly launched in Vulkan mode from the terminal with the "--vulkan" switch. Might be worth running it once to check if everything is in order. Make sure to quit XP before going on.
  4. Obtain the latest DataRefTool release from GitHub
  5. The archive needs to be unzipped twice. The resulting folder needs to be moved into "/X-Plane 11/Resources/plugins". The resulting path to the plugin file should be "/X-Plane 11/Resources/plugins/DataRefTool_2020_03_23/lin.xpl".
  6. Start X-Plane in Vulkan mode, start a flight at Seattle (KSEA), one of the demo areas, and access DatarefTool from the menubar at the top ("Plugins" --> "DataRefTool" --> "View Datarefs")
  7. The result should be what you see in the example picture above.

 

Notes:

  • This bug affects any plugin that tries to draw in 2D space via OpenGL and not just DataRefTool.
  • The "other" open source Vulkan driver for Linux is also affected.
  • As far as I remember, this issue does not occur in Windows (it's been a while since I've tested it).
  • Can't test the sync behavior of AMDGPU Pro since it breaks KDE 5 for me.
  • The developer of X-Plane is aware of this issue, but says it needs to be fixed/worked around on the driver side.
  • GPUs from a major competitor are neither affected by this on Windows or Linux.

 

Hope that's enough information for a start. Tell me if you need more.

@jinjianrong jinjianrong added the reproduced The issue is reproduced by CQE label Sep 28, 2020
@qiaojbao
Copy link
Collaborator

The root cause is the imported image for plugin render, its creation option's default values have some difference with Mesa's.
We will fix it.

@JT8D-17
Copy link
Author

JT8D-17 commented Oct 22, 2020

Thank you!

Let me know if you need more information.

@jinjianrong jinjianrong added the fix available The issue has been fixed by AMD internally or in dev branch label Nov 23, 2020
JaxLinAMD added a commit that referenced this issue Dec 15, 2020
New feature and improvement
* Update Vulkan API version to 1.2.162
* Performance tuning for Shadow of the Tomb Raider on Navi21
* Enable extension VK_EXT_shader_terminate_invocation
* Enable extension VK_KHR_fragment_shading_rate

Issue fix
* [AMDVLK issue #179] Corruption in X-Plane 11.50
@JaxLinAMD
Copy link
Contributor

@JT8D-17 issue fixed in v-2020.Q4.6

@JT8D-17
Copy link
Author

JT8D-17 commented Dec 18, 2020

The situation is now better, but some plugins still do not synchronize properly.

See Avitab (freeware) with vFlyteAir's Navion (freeware, butr requires registration to download):

AMDVLK

For comparison, this is in X-Plane's OpenGL mode (provided by Mesa):

Nav_OGL

This is with the ToLiSS Airbus A321 (payware):

AMDVLK_A321

Again, for comparison, OpenGL mode provided by Mesa)::

A321_OGL

I think this is a texture coordinate space issue.

X-Plane log for the Navion with AMDVLK

Terminal output for the Navion with AMDVLK

X-Plane log for the A321 with AMDVLK

Terminal output for the A321 with AMDVLK

I sadly can not provide a Renderdoc capture, because as of release 11.51b3, X-Plane blocks AMDVLK and the "--force_run" argument does not work from Renderdoc (but it does when launched from a terminal). See my Renderdoc launch options:

image

X-Plane log from a failed launch

For comparison, a working launch:

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_icd64.json "$PWD/X-Plane-x86_64" --vulkan --force_run

I have informed Laminar Research, X-Plane's developer, about this and tried to argue in favor of the Mesa+AMDVLK combination, but despite an e-mail exchange, I did not receive feedback whether future X-Plane versions will fix this.

All I have in terms of Renderdoc captures is those I made for Mesa's Vulkan driver, which seems to suffer from the same issue.

@qiaojbao
Copy link
Collaborator

I had reproduced this new issue on Navi10.
And it works well on Vega20.
I will try to find out the root cause and the difference between Vega20 and Navi10.

@qiaojbao
Copy link
Collaborator

Hi JT8D-17,
The root cause is OGL not handle the image mipLevels info correctly while import external memory.
AMD pro driver also has this issue too.
The AMD pro driver stack will be fixed firstly.

About the Mesa OGL and Mesa RADV, the iPad seems be black. I guess there will be a lot of work to do for Mesa OGL + RADV, and for Mesa OGL + AMDVLK.

@Gfurst
Copy link

Gfurst commented Dec 27, 2020

Hi all, I don't know if its been mentioned before, but there also seems to be an error with the terrain radar mod, that adds functioning terrain radars to some compatible aircraft, namely the default Boeing 737-800 from Laminar. It just doesn't show up, silently fails without any clue to the logs.
Also, I still keep getting some issues, with python graphical elements flashing (fse ui, xsquackbox, text boxes and such).

@JT8D-17
Copy link
Author

JT8D-17 commented Jan 3, 2021

Thanks for looking into this @qiaojbao!

@Gfurst Could be the same bug.

@dechilders
Copy link

@jinjianrong I see this was closed (I've been watching it for a while because this affects my system), but I am still seeing this bug. If this has supposedly been fixed, then do I need to open a new issue? I'm currently on AMDVLK 2021.Q1.4-1 from Arch (says last updated 02/25/2021).

@jinjianrong
Copy link
Member

Just realized the issue needs a fix in opengl which has not been included in latest AMDGPU Pro release. Reopen the issue

@jinjianrong jinjianrong reopened this Mar 12, 2021
@jinjianrong jinjianrong removed the reproduced The issue is reproduced by CQE label Mar 12, 2021
@Gfurst
Copy link

Gfurst commented Mar 16, 2021

Was this fixed for the open-source driver though? I haven't noticed it so far

@jinjianrong
Copy link
Member

The fix is only for Linux Pro OGL + AMDVLK. Still needs a fix in MesaGL to get MesaGL + AMDVLK working.

@JT8D-17
Copy link
Author

JT8D-17 commented Apr 29, 2021

Does the fix involve VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT?

@ICSimulations
Copy link

Hello. I was wondering if the AMD driver will be updated to stop the flashing with X-plane and amd 6900xt cards. This happens with certain plugins.

@qiaojbao
Copy link
Collaborator

@ICSimulations, this issue was only fixed in AMD Linux Pro OGL + AMDVLK, if you run into some similar issues under the latest AMD pro driver stack, could you list the plugins and AMD Linux pro driver version here, please?

@ICSimulations
Copy link

@ICSimulations, this issue was only fixed in AMD Linux Pro OGL + AMDVLK, if you run into some similar issues under the latest AMD pro driver stack, could you list the plugins and AMD Linux pro driver version here, please?

Ahh..sorry, this was under windows. Should I try the AMD Pro driver? Happy to try that against with the plugins causing the flickering.

@jinjianrong
Copy link
Member

@ICSimulations, yes, please help try AMD Linux Pro driver. thanks

@ICSimulations
Copy link

ICSimulations commented Nov 10, 2021 via email

@JT8D-17
Copy link
Author

JT8D-17 commented Nov 13, 2021

I am on windows.

Then neither this Linux-only driver nor this issue tracker is for you. If you have problems with AMD's Windows graphics driver, use the respective support channels to report them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix available The issue has been fixed by AMD internally or in dev branch
Projects
None yet
Development

No branches or pull requests

7 participants