Project

General

Profile

Actions

Emulator Issues #6105

closed

GLSL-master merge destroys graphics on fglrx/Linux

Added by seele almost 12 years ago.

Status:
Fixed
Priority:
High
Assignee:
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Do not attach files to this issue. Upload them to another site and
link here. Use imgur.com for images.

Have you searched the issue tracker for a similar issue?
Yes

Game Name?
Seems to be all of them. I've provided screenshots of Smash Bros Brawl, Custom Robo, and Twilight Princess

Game ID?
n/a

What went wrong?
The graphics are now completely chaotic, psychedelic colledoscopes of vertices and textures flying all over the place.

What did you expect to happen?
The game's graphics to be intelligible by minds other than those of the Outer Gods.

What steps will reproduce the problem?
Running the emulator.

What version of Dolphin were you using?
3.5-1030

64 or 32 bit Dolphin?
64

What version of Dolphin used to work?
Can't remember, last updated from AUR around the middle of Frebruary; i.e. before the GLSL merge.

What Operating System were you using and what are your hardware
specifications?
OS: Manjaro Linux Openbox Edition
Kernel: x86_64 Linux 3.7.10-1-MANJARO
CPU: Intel Core i5-750
Graphics: AMD 5850 running on fglrx driver

64 or 32 bit Operating system?
64
Any other relevant information or links to logs:
screenshots of the problem:
Title screen of Custom Robo: http://i.imgur.com/S0HcuK1.png
Title screen/intro of Twilight Princess: http://i.imgur.com/zDDCSKC.png
Menu screen of Smash Bros Brawl: http://i.imgur.com/9SPMIO8.png

Actions #1

Updated by delroth almost 12 years ago

  • Status changed from New to Accepted
  • Issue type set to Bug
  • Priority set to High
  • Category set to gfx
  • Regression set to Yes
  • Milestone set to Current
  • Operating system N/A added

Could you give us the output of glxinfo?

Actions #2

Updated by seele almost 12 years ago

Actions #3

Updated by degasus almost 12 years ago

Your picture looks like streaming vertices don't work. As we support the new extension AMD_pinned_memory, I think the best way to debug is to disable it, but in this way, we would loose the biggest performance gain.
So could you please try it again with this patch:
http://markus.members.selfnet.de/dolphin/use_buffersubdata.patch

Actions #4

Updated by seele almost 12 years ago

The patch fixed it, thanks.

Actions #5

Updated by amotiss almost 12 years ago

I have a similar problem with last compiled Dolphin (3.5-1034)
No artefact, just a blackscreen for Wii and GC games/homebrews/systemenu/bios.
I have try your patch, it change nothing.

Linux Ubuntu 12.10 x86-64 / AMD Radeon HD 7850 / Catalyst 13.2 bĂȘta 7 / Core I5 3570K / 16Go ram

Actions #6

Updated by NeoBrainX almost 12 years ago

Yo degasus, fyi that patch didn't fix my issue.

Actions #7

Updated by Sonicadvance1 almost 12 years ago

The official catalyst release works fine here. I have problems installing the beta though.

Actions #8

Updated by degasus almost 12 years ago

seele:
I think we should split this issue as amotiss report a different bug. It seems that some fglrx versions/gpus/distributions don't like the pinned memory extension. So now it is disabled complete for fglrx.
Do you want to check the performance difference between master 3.5-1035 and the last patch?

others:
Can someone please try it on a debug build? Perhaps some gl_errors would help to point out the issue.

I'm sorry for this issue isn't fixed as fast as the others, but it's hard to debug just "black screens" :-(

Actions #9

Updated by amotiss almost 12 years ago

Do not be sorry, the work of the whole team is awesome, you do good work, thank you for all that has been done ! Be blocked it can happen :)

I compile the new revision and test all your need, be patient ! :)

Actions #10

Updated by amotiss almost 12 years ago

Okay, i tested the new build (1035), same problem, blackscreen.

I try with two games, Resident Evil rebirth PAL, and Resident Evil Code Veronica X Pal.

Logfiles with debug dolphin => http://paste.ubuntu.com/5621879/

Actions #11

Updated by seele almost 12 years ago

Reccompiled to ver 3.5-1044 and the problem returned. Once again though, the patch you provided fixed it.

Actions #12

Updated by degasus almost 12 years ago

seele: but to be sure, "pinned memory" is now listed on "missing extensions"?

Actions #13

Updated by seele almost 12 years ago

How do I check? The OSD does show a "Missing Extensions:" but there's nothing following the colon.

Actions #14

Updated by nerzhultheking almost 12 years ago

Confirmed, i have no graphics with fglrx. All is black.
But http://markus.members.selfnet.de/dolphin/use_buffersubdata.patch fixed the problem for me.

Actions #15

Updated by degasus almost 12 years ago

nerzhultheking: which gpu / driver / os do you use?

Actions #16

Updated by degasus almost 12 years ago

so, finally I gave up to find which versions of fglrx are broken and disabled it for all non-windows plattforms.

seele, nerzhultheking: it should now work for you
amotiss: I think we have another issue. But as there are no gl errors, I still don't know what has happend :-(

Actions #17

Updated by degasus almost 12 years ago

amotiss: You've wrote you use a beta gpu driver. Maybe it's because of the driver. Is it possible to try some different versions?

Actions #18

Updated by YuriShish almost 12 years ago

I have GTX660 with 310.40 driver and this bug happens to me.
Appears message: "Missing Extensions: PinnedMemory".
Patch didn't help, this error message still appears and no video.

Actions #19

Updated by degasus almost 12 years ago

YuriShish: this bug seems to be amd only, so I think you have another issue. What are you MSAA settings? Could you please try a debug build (eg http://dl.dolphin-emu.org/builds/dolphin-GLSL-master-3.5-1023-dbg-x64.7z ) and look for ogl errors

Actions #20

Updated by degasus over 11 years ago

seele, nerzhultheking: Can you please check current master? Sonic has pushed a patch disabling pinned memory on index buffer which solve this issue for him.

amotiss: I'm sure it wouldn't help you as disabling it completely doesn't help either :-(

Actions #21

Updated by fast.rizwaan over 11 years ago

in Fedora 18 x86_64 NVidia 9800GT (nouveau mesa 9.1) dolphin emu 3.5-1062

I'm getting black screen/video, sound is working fine.

Actions #22

Updated by ccox421 over 11 years ago

Hi,

Under Debian, with a Geforce GT 30M and the latest NVIDIA drivers, I also get the message "Missing Extensions: PinnedMemory", and the ingame speed is 1/2 of the speed I had before the GLSL merge.

How can I compile a Debug build under Debian with cmake?

Thanks.

Actions #23

Updated by NeoBrainX over 11 years ago

cmake -DCMAKE_BUILD_TYPE=Debug

Actions #24

Updated by degasus over 11 years ago

fast.rizwaan: can you please upload the output of glxinfo? I doubt nouveau supports glsl130

ccox421: efb2ram is known to be slower, else glsl /should/ be faster.

Actions #25

Updated by ccox421 over 11 years ago

Thanks.
Recompiled the Debug version, but I do not see anything related to OGL in the output. What should I expect, or should I do anything to test it?

wickmarkus: I don't understand well, is it a general remark, or is there something I should change in the config?

Actions #26

Updated by degasus over 11 years ago

ccox: Tt is more like a general remark. Or just be sure efb2tex is selected (default in most games). Have you tried the "hacked buffer" option? This may speed up, but not up tp 50% ...

Actions #27

Updated by ccox421 over 11 years ago

OK. I have efb2tex selected, and indeed the "hacked buffer" option improves the framerate, but still it is slower than before...

Actions #28

Updated by pauldacheez over 11 years ago

The game you're playing might have EFB to RAM forced in its config. Changing the graphics settings in-game overrides this (but the settings are forced in the config for good reason, so don't report bugs after doing this).

Actions #29

Updated by hatarumoroboshi over 11 years ago

I can confirm that after the GLSL merge I get nearly half of the speed with the OpenGL plugin (copy to RAM or Texture doesn't matter).
My system: Amd Hd4850 (Catalyst 13.1), Intel e8400, WindowsXP, Dolphin r3.5-1103 32-bit

Actions #30

Updated by ccox421 over 11 years ago

I checked, and the games I tested have efb2tex enabled... So the half speed is probably related to the PinnedMemory problem. BTW, I have a GeForce GT 330M.

Actions #31

Updated by ccox421 over 11 years ago

FYI, I tested a many versions, and this problem was not present before the GLSL merge (Rev. d63d7fde9e9c was fine and fast), and the problem appeared in the first compilable version (Rev. 234604e067c4).

I use a 64-bit Dolphin version under Linux Debian (unstable) with latest Nvidia beta drivers.

Actions #32

Updated by degasus over 11 years ago

Actions #33

Updated by degasus over 11 years ago

btw: Rendering on nouveau is also broken with UBO. There is another offset issue (like the one on radeon) and textureing isn't working at all.

Actions #34

Updated by majosamaso over 11 years ago

Seems more or less the same issue which happens on Gentoo x86_64 AMD 4850HD but I have less weird vertices and more solid color screens

glxInfo: http://pastebin.com/UufzsmUJ

Mesa building info:

media-libs/mesa-9.1.1 was built with the following:
USE="bindist classic egl gallium gles2 llvm nptl shared-glapi -debug -gbm -gles1 -openvg -osmesa -pax_kernel -pic (-r600-llvm-compiler) (-selinux) -vdpau -wayland -xa -xorg -xvmc" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" VIDEO_CARDS="radeon -i915 -i965 -intel -nouveau -r100 -r200 -r300 -r600 -radeonsi -vmware"

When I have time, I will try recompile Mesa with that patch

Actions #35

Updated by majosamaso over 11 years ago

I confirm that the issue is fixed with the mesa patch but it isn't in Mesa 9.1.2

I tested using the patch with a custom ebuild and it worked

Actions #36

Updated by degasus over 11 years ago

airlied just promised me it will be in 9.1.3. They missed this commit on the last cherry-pick

Actions #37

Updated by thepouar over 11 years ago

didn't work for me on Mesa 9.1.3, patch didn't help, I'm using nouveau (Gallium 0.4 on NVCE)

Actions #38

Updated by pauldacheez over 11 years ago

thepo, nouveau's currently unusable for Dolphin, and the patch was for AMD cards anyway. Use the official Nvidia drivers.

Actions #39

Updated by thepouar over 11 years ago

@pauldacheez not going to happen, No KMS, some of my programs segfault when trying to start them while running perfectly fine in Nouveau, and it's a binary blob.

Actions #40

Updated by thepouar over 11 years ago

can't you just include an option to toggle the use of the extension or to toggle between OGL2 and OGL3.

Actions #41

Updated by degasus over 11 years ago

thepouar: The broken feature are uniform buffer objects (ubo). You can disable it here, but there will be a huge performance drop:
https://code.google.com/p/dolphin-emu/source/browse/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp#361

Or try to help the neauvou project to fix this issue :-)

Actions #42

Updated by degasus over 11 years ago

This bug is finally also fixed on nouveau: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c37039797938e43a7dfb6c7d39a1f0bb4f32df3

As this patch is also in mesa-9.1.6, all mesa drivers should be able to run dolphin out of the box soon. Also the performance seems to be fine on mesa-9.2 :-)

I'll create a workaround to disable UBO on unsopported drivers.

Could someone please test again the fglrx pinned memory + index buffer bug?

Actions #43

Updated by cwz0522 over 11 years ago

I have no idea about how to test the bug, I am newcomer, test the emu during the two week, and the speed of linux version is slower than windows one.

I am glad to test it and speed up it.

I have AMD FireGL M8900 (i.e. 6970M) + fglrx driver: 13.4 + Smash Bros Brawl.

What configurations needed to test the bug?
Need patch file?
Only show black window?
Which version?

Actions #44

Updated by degasus over 11 years ago

Can you try to change this line:
https://code.google.com/p/dolphin-emu/source/browse/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp#64
from
s_indexBuffer = new StreamBuffer(GL_ELEMENT_ARRAY_BUFFER, MAX_IBUFFER_SIZE, (StreamType)(DETECT_MASK & ~PINNED_MEMORY));
to
s_indexBuffer = new StreamBuffer(GL_ELEMENT_ARRAY_BUFFER, MAX_IBUFFER_SIZE);

Then you either see a black screen or not.

For performance, have you also tried the OpenGL backend on windows? As DirectX isn't available on linux, only the performance of the OpenGL backend matters. It's also known that the amd linux driver is a bit slower than the windows one.

Actions #45

Updated by cwz0522 over 11 years ago

I got a black screen w/ dolphin 3.5-1686 + AMD_pinned_memory.

Actions #46

Updated by cwz0522 over 11 years ago

I clean & rebuild 3.5-1687, remove ~/.dolphin-emu & installed dirs & files, and get screen other than black.

http://imgur.com/9FLVniH,4H3PnFl,aH4cfXh,iZULHlL,xeItyGL#0

Actions #47

Updated by cwz0522 over 11 years ago

I upload 5 screenshots.

Actions #48

Updated by degasus over 11 years ago

  • Status changed from Accepted to Fixed

As this issue report is used for many different bugs, I'm going to close it now. Please follow the other issues for updates:

YuriShish: do you still get a black screen with the closed source nvidia driver? If so, please create another issue report.

All mesa black screen should be fixed with recent mesa versions. For older ones, ubo need to be disabled. Please see issue 6446.

The performance issue on nvidia tesla devices + linux still exists (and I don't know why). Please see issue 6333.

The original issue report: AMD pinned memory + index buffer is still broken (thx @ cwz0522) and so stays disabled. I hope they support buffer storage object soon.

Actions #49

Updated by NeoBrainX about 11 years ago

Does this issue occur again with revision 672fa65ee76c or has it been fixed in recent driver versions?

Actions

Also available in: Atom PDF