• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 … 48 49 50 51 52 … 117 Next »

cmakelist changes for opencl on linux
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
cmakelist changes for opencl on linux
12-18-2012, 08:12 AM
#1
algarues Offline
Junior Member
**
Posts: 20
Threads: 6
Joined: Mar 2009
I have been compiling dolphin on linux for a while

i have the opencl headers installed, as well as an nvidia cards

however, by looking at the cmakelist, it seems to me that opencl can be compiled only for mac

am I wrong?

could anyone suggest a modification to enable compilation of opencl also on linux?
Find
Reply
12-18-2012, 02:49 PM
#2
Shonumi Offline
Linux User/Tester
**********
Administrators
Posts: 6,526
Threads: 55
Joined: Dec 2011
Have you actually tried compiling it on Linux? I've been building Dolphin myself for the past year, and so far it's always compiled the OpenCL texture decoder just fine (though it's not particularly useful in its current state). Which part of the CMakeList.txt are you looking at (it's the one in the root directory of the git repo, right?)

If you look carefully at Line 480, it appears CMake will try to find existing libraries for OpenCL (which I assume includes the headers) on OS X. For everything else, looks like Dolphin just pulls the files from Externals. It should still be possible to compile the OpenCL texture decoder regardless of OS. I'm not very experienced in reading CMake scripts, so hopefully a dev will expand and correct what I've said.
Website Find
Reply
12-18-2012, 06:49 PM
#3
algarues Offline
Junior Member
**
Posts: 20
Threads: 6
Joined: Mar 2009
(12-18-2012, 02:49 PM)Shonumi Wrote: Have you actually tried compiling it on Linux? I've been building Dolphin myself for the past year, and so far it's always compiled the OpenCL texture decoder just fine (though it's not particularly useful in its current state). Which part of the CMakeList.txt are you looking at (it's the one in the root directory of the git repo, right?)

If you look carefully at Line 480, it appears CMake will try to find existing libraries for OpenCL (which I assume includes the headers) on OS X. For everything else, looks like Dolphin just pulls the files from Externals. It should still be possible to compile the OpenCL texture decoder regardless of OS. I'm not very experienced in reading CMake scripts, so hopefully a dev will expand and correct what I've said.
I made the post because I read exactly what you mentioned in line 480
thus it seems to me that upon configuration, cmake only checks for opencl headers only on osx
Find
Reply
12-19-2012, 12:19 AM (This post was last modified: 12-19-2012, 12:20 AM by neobrain.)
#4
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
OpenCL doesn't have any specific build requirements on Linux, support gets compiled in and enabled on the fly depending on runtime support.

How do you think to know OpenCL is not enabled in your build, anyway?
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
12-19-2012, 06:34 AM
#5
algarues Offline
Junior Member
**
Posts: 20
Threads: 6
Joined: Mar 2009
(12-19-2012, 12:19 AM)neobrain Wrote: OpenCL doesn't have any specific build requirements on Linux, support gets compiled in and enabled on the fly depending on runtime support.

How do you think to know OpenCL is not enabled in your build, anyway?
That was exactly the question
how do I find out whether it is enabled or not in the end?
Simply because I get the opencl option available in the configuration dialog?
Find
Reply
12-19-2012, 06:46 AM
#6
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
I think it's not visible at all unless you add some code modifications to make Dolphin explicitely tell you.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
12-20-2012, 10:50 AM
#7
algarues Offline
Junior Member
**
Posts: 20
Threads: 6
Joined: Mar 2009
(12-19-2012, 06:46 AM)neobrain Wrote: I think it's not visible at all unless you add some code modifications to make Dolphin explicitely tell you.

anyway, below there is the output that I get when running cmake ..
it seems to me that upon configuration there is not detection for the opencl libraries and headers that I have installed

Code:
The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Git: /usr/bin/git (found version "1.7.10.4")
-- Performing Test NO_UNUSED_RESULT
-- Performing Test NO_UNUSED_RESULT - Success
-- Performing Test VISIBILITY_INLINES_HIDDEN
-- Performing Test VISIBILITY_INLINES_HIDDEN - Success
-- Performing Test VISIBILITY_HIDDEN
-- Performing Test VISIBILITY_HIDDEN - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
OpenMP parallelization enabled
-- Found ALSA: /usr/lib/x86_64-linux-gnu/libasound.so (found version "1.0.25")
ALSA found, enabling ALSA sound backend
ao found, enabling ao sound backend
bluez found, enabling bluetooth support
PulseAudio found, enabling PulseAudio sound backend
-- Could NOT find OpenAL (missing:  OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
OpenAL NOT found, disabling OpenAL sound backend
X11 found
Xrandr found
-- checking for modules 'libavcodec>=53.35.0;libavformat>=53.21.0;libswscale>=2.1.0;libavutil>=51.22.1'
--   found libavcodec, version 54.59.100
--   found libavformat, version 54.29.104
--   found libswscale, version 2.1.101
--   found libavutil, version 51.73.101
libav found, enabling AVI frame dumps
-- Performing Test PORTAUDIO
-- Performing Test PORTAUDIO - Failed
PortAudio not found, disabling mic support
Using static lzo from Externals
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found.
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Could NOT find SDL2 (missing:  SDL2_LIBRARY SDL2_INCLUDE_DIR)
-- Found SDL: /usr/lib/x86_64-linux-gnu/libSDLmain.a;/usr/lib/x86_64-linux-gnu/libSDL.so;-pthread  
Using shared SDL
Could NOT find SFML (missing:  SFML_INCLUDE_DIR)
Using static SFML 1.5 from Externals
Using static SOIL from Externals
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.7")
Using shared zlib
GLEW found
Cg found
CgGL found
-- Found wxWidgets: TRUE  
Found wxWidgets version 2.8.12
At least 2.9.3 is required; ignoring found version
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.4.9")
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so  
Using static wxWidgets from Externals
gthread-2.0 found
pangocairo found
-- Found Gettext: /usr/bin/msgmerge (found version "0.18.1")
-- Configuring done
-- Generating done
-- Build files have been written to:
Find
Reply
12-20-2012, 06:36 PM
#8
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
Again, OpenCL isn't a build requirement on linux so it's expected that you don't see anything there.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
12-21-2012, 02:00 AM
#9
algarues Offline
Junior Member
**
Posts: 20
Threads: 6
Joined: Mar 2009
(12-20-2012, 06:36 PM)neobrain Wrote: Again, OpenCL isn't a build requirement on linux so it's expected that you don't see anything there.
anyway whether i select or not the opencl option in the video config nothing changes at the level of emulation speed

similarly for other options

e.g. ztp hack does not change any of the emulation speed in hyrule fields (GC version)

I am trying to understand whether any of this is compilation dependent
Find
Reply
12-21-2012, 02:55 AM
#10
Shonumi Offline
Linux User/Tester
**********
Administrators
Posts: 6,526
Threads: 55
Joined: Dec 2011
(12-21-2012, 02:00 AM)algarues Wrote: anyway whether i select or not the opencl option in the video config nothing changes at the level of emulation speed

The OpenCL texture decoder is actually slower than the SSE2 optimized one, or something like that. IIRC, it could run better if someone decided to code it to use a more recent version of OpenCL. You're not really going to see any benefit in using OpenCL right now.

(12-21-2012, 02:00 AM)algarues Wrote: e.g. ztp hack does not change any of the emulation speed in hyrule fields (GC version)

I am trying to understand whether any of this is compilation dependent

That's probably because your system is running Hyrule Field as best as it currently can. Though, that's hard to say for sure, since we can't see what kind of hardware you're running (unless you post it). In any case, the ZTP hack is part of Dolphin's code; as long as you don't remove the related code, it gets compiled.
Website Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma