Commit Graph

179 Commits

Author SHA1 Message Date
Sylvain Munaut 68f0302bce fosphor: Misc typo & whitespace fixes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-10 22:24:06 +01:00
Sylvain Munaut dfb5081b91 gr-fosphor: Link to python libraries if python is enabled
This is required for OSX. And although not strictly required for linux,
it doesn't hurt.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-06 18:53:34 +01:00
Sylvain Munaut e53ee91fef gr-fosphor/python: Improve error reporting is wx_sink_c failed import
Originally the symbol would just not be defined.

Now we keep the original import error context and re-raise it if we're
asked to instanciate the block. This should give the user better
visibility on what's wrong.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-05 09:43:07 +01:00
Sylvain Munaut 0ea1177108 gr-fosphor: Submit data for processing in adaptative batch sizes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-04 22:24:22 +01:00
Sylvain Munaut 3e35c83ded fosphor/gl_cmap_gen: Use the float version of round
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-04 22:01:48 +01:00
Sylvain Munaut 4066201ca8 fosphor/fft: Fix the window formula
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-04 22:01:27 +01:00
Sylvain Munaut 869ba4d156 fosphor/cl: Use OpenCL 1.1 API for everything except OSX
It seems that some linux distro ship OpenCL 1.2 headers but a OpenCL 1.1
ICD ...

So we just use OpenCL 1.1 API everywhere and disable 1.1 deprecated
warnings.

OSX OTOH doesn't allow to disable the deprecated but at least ships
consistent headers/ICD so we use 1.2 is available.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-04 22:00:48 +01:00
Sylvain Munaut 180fd0042a gr-fosphor: Make the different GUI version optional
You'd don't have to have glfw, qt and wx all at once, you can select
which variant you want built.

Python support is also make fully optional

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:09:50 +02:00
Sylvain Munaut 6183eefc9a gr-fosphor: Add Qt widget version of the fosphor sink
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:07:14 +02:00
Sylvain Munaut e3732c0609 gr-fosphor: Add WX widget version of the fosphor sink
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:06:04 +02:00
Sylvain Munaut b056fcc1a8 gr-fosphor: Split block into base function and UI specific part
It's split into:

 - A generic "base" sink that handles pretty much everything except
   managing a GL context and getting the UI interaction for it
 - The GLFW specific part

This is preparation for for WX and QT widget implementations of a
fosphor sink.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:05:08 +02:00
Sylvain Munaut 062040ae70 gr-fosphor: Move to the _impl paradigm
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:03:03 +02:00
Sylvain Munaut 4f102ee334 fosphor: Add AMD include path to the standalone benchmark tool Makefile
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:54:52 +02:00
Sylvain Munaut 5229e996b1 gr-fosphor: Add dummy version in .pc file
The whole version stuff is a bit screwed up and we probably want to fix
it eventually but for the time being I don't care enough to bother with
this.

Just always use the GIT of everyting and it should compile ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:54:02 +02:00
Sylvain Munaut bbbd9986a4 fosphor/gl_cmap: Use an explicit 'context' object rather than static var
I originally thought that even with multiple fosphor instance, the shaders
could just be shared. But if those instances are binded to different
GL Contexts, shaders aren't shared and so need to be recreated.

So all the gl_cmap shader stuff is now stored inside a fosphor_gl_cmap_ctx
struct and the latter is stored in fosphor_gl_state

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:52:43 +02:00
Sylvain Munaut 6b93698f16 fosphor/gl_cmap: Prefix enum with fosphor_ for consitency
Since all the cmap stuff is fosphor-specific and can't be really
reused, use the fosphor_ prefix for stuff exposed outside gl_cmap.c
itself.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:52:11 +02:00
Sylvain Munaut dec2f97875 gr-fosphor: Make sure FindGnuradioRuntime caches GNURADIO_RUNTIME_LIBRARIES
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:51:38 +02:00
Sylvain Munaut f73efd5172 gr-fosphor: Fix include guard #define on glfw_sink_c.h
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:51:12 +02:00
Sylvain Munaut bdb346607a gr-fosphor: Fix indentation in __init__.py
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:50:53 +02:00
Sylvain Munaut 36d05cfc57 fosphor/cl: Make the batch size dynamic and up to FOSPHOR_FFT_MAX_BATCH
Basically need to :
 - Set the kernel parameter at each kernel invocation
 - Modify the kernel to deal with wrap-around when writing the
   waterfall texture

The batch size still must meet some constraint :
 - Be a multiple of FOSPHOR_FFT_MULT_BATCH
 - Be less than FOSPHOR_FFT_MAX_BATCH

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:49:48 +02:00
Sylvain Munaut 020f5b1c6f fosphor: Make sure the FFT len is from #define everywhere
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:49:19 +02:00
Sylvain Munaut e828e7faff fosphor/cl: Add a debug block allowing to save compile CL binary for debug
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:48:25 +02:00
Sylvain Munaut 95f8775ce2 gr-fosphor/cmake: Import latest GrPython from gnuradio git for OSX build
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-20 10:00:03 +02:00
Sylvain Munaut 20fd7fac53 fosphor/cl: Allow the use of cl_khr_local_int32_base_atomics extension
Apparently there are some cards that are neither Nvidia SM1.1, nor
OpenCL 1.1 but that do have cl_khr_local_int32_base_atomics extension.

This is enough for fosphor to implement the histogram so add the
required code to test for it and enable its use in the kernel if
required.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-18 11:43:06 +02:00
Sylvain Munaut 72f71d5f00 gr-fosphor: Rewrite the FindGnuradioRuntime to use all libraries in .pc
The .pc has several libraries listed but the current cmake module for
it only takes gnuradio-runtime.

The new logic takes all libraries in the .pc and only fallsback to only
gnuradio-runtime if no .pc is found

This seems required for OSX.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-16 09:14:46 +02:00
Sylvain Munaut 6db631c466 fosphor/cl: Add a workaround for OSX hiding the NVidia attributes
OSX doesn't allow query of NV attributes even on NVidia cards so we just
assume any non-opencl 1.1 nvidia card that does OpenCL is a SM1.1 one.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-16 09:12:59 +02:00
Sylvain Munaut 32e410a8c8 fosphor/cl: Remove extraneous CL/xxx includes
Those are taken care of by the cl_platform.h wrapper now

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-16 09:12:32 +02:00
Sylvain Munaut aabc21b7f2 fosphor: Initial import of the core code
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-13 22:05:38 +02:00
Sylvain Munaut edfee19c61 Initial import of the GNURadio block
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-13 22:02:56 +02:00