Project

General

Profile

Actions

Emulator Issues #2927

closed

OpenCL not working

Added by phpechayrebri over 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

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

Description

What steps will reproduce the problem?

Enable OpenCL in options

What is the expected output? What do you see instead?

I expect to see a running emulation. I see a black screen.

Dolphin version with the problem? Other Dolphin version without the
problem?

5785

32-bit or 64-bit and any other build parameters?

32-bit

OS version and versions of tools/libraries used?

Vista

Please provide any additional information below.

In the file exceptioninfo.txt, I have the message:

Unhandled Exception
Code: 0xC0000005
Call stack info:
0x0741FE38 : ?

Please note that I am using an nvidia GTX 470 (Fermi), driver 258.69 and Vista 32 bits. Only new builts have problems, the old built that I still kept (built 5790) works great in OpenCL mode.


Related issues 3 (0 open3 closed)

Has duplicate Emulator - Emulator Issues #2884: After opening opencl crash Version 5813 (5815)Duplicate

Actions
Has duplicate Emulator - Emulator Issues #2900: OpenCL ERROR on Latest BuildsDuplicateorphis

Actions
Has duplicate Emulator - Emulator Issues #2928: OpenCL Not working in recent builds (Nvidi?a)Duplicate

Actions
Actions #1

Updated by aavindraa over 14 years ago

I have the same graphics card as you, the latest revision and no problem with OpenCL.

Your drivers are old. Try updating them:

http://www.nvidia.com/object/win7-winvista-32bit-257.21-whql-driver.html

Actions #2

Updated by aavindraa over 14 years ago

Sorry, not old, beta. That link is for the latest stable driver, which works for me.

Actions #3

Updated by aavindraa over 14 years ago

If you want to try beta, update to 258.96 though.

Actions #4

Updated by arturbc93 over 14 years ago

I did not notice much difference with or without OpenCL, but when I stop the emulation, the emulator stops responding when it is active. I use Windows 7 64bit and my video card is ATI Radeon HD5870 1GB, latest driver.

Actions #5

Updated by phpechayrebri over 14 years ago

I tried driver 257.21 whql and 258.96 that you mentioned and same problem with either set, opencl does not work properly even though GPU-Z says OpenCL works.

Actions #6

Updated by WC-Predator over 14 years ago

Were it not only possible with a driver from the 196.xx series?

Actions #8

Updated by phpechayrebri over 14 years ago

driver 196.xx is not compatible with my card (GTX 470). Only driver 197.41 and above supports my card.

But this is not a driver issue because Dolphin built 5790 works PERFECTLY fine in OpenCL mode, no matter the driver version. Judging from reactions in the forum, other people seem to notice too that only new builts of Doplhin do not work in OpenCL

Actions #9

Updated by phpechayrebri over 14 years ago

I am beginning to think it is the "CLRun" introduced in versions 58xx which is the source of the problem since builts prior to the implementation of CLRUn worked great.

Actions #10

Updated by phpechayrebri over 14 years ago

Thank you agoso, I tried the jakeslogan patch from the link you gaveand now OpenCL works again!!!! This patch really should be added to the Dolphin svn!

Actions #11

Updated by DimitriPilot3 over 14 years ago

"The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."

This is what a debug build shows during run-time - more specifically, after calling any function from clrun.c (as well as clrungl.c, I guess). The crash is due to the stack (ESP) being unwinded twice (by the callee and the calling functions). NOPing (erasing) the instruction which unwinds ESP the second time causes the program to run normally, until the next CLRun call...

After searching/reading about calling conventions in C/C++, I found out that the function pointer is defaulted to _cdecl whereas the function call uses _stdcall (as defined by CL_API_CALL) - it's not the same! With the patch I posted below, I can run Dolphin with OpenCL without the crash upon initialization (using a 8800 GTS 512). Not sure about the improvements... But I hope this is the correct fix :P

By curiosity, what code did jakeslogan modify in its patched builds?

Actions #12

Updated by orphis over 14 years ago

Oh, sorry I never thought of looking if it was a 32bit or 64bit build !
This fix is correct and should be applied as soon as possible. Since I'm on holidays, I can't do it but I'll bug the other devs for it.

Actions #13

Updated by NeoBrainX over 14 years ago

  • Status changed from New to Fixed

This issue was closed by revision r5905.

Actions #14

Updated by orphis over 14 years ago

Issue 2928 has been merged into this issue.

Actions #15

Updated by orphis over 14 years ago

Issue 2900 has been merged into this issue.

Actions #16

Updated by orphis over 14 years ago

Issue 2884 has been merged into this issue.

Actions #17

Updated by Sonicadvance1 about 12 years ago

Issue 2884 has been merged into this issue.

Actions

Also available in: Atom PDF